| | |
| | | <template slot="menuForm"> |
| | | <dynamic-button type="form" :butttonList="componentVO.buttons" @buttonClick="buttonClick"></dynamic-button> |
| | | </template> |
| | | |
| | | <template v-for="item in slotData" :slot="item.prop + ''"> |
| | | <vciWebRefer v-if="item.type == 'refer'" |
| | | :key="item.prop" |
| | | referType="master" |
| | | :data-key="item.prop" |
| | | :disabled="item.disabled || false" |
| | | :display="item.display || true" |
| | | :referConfig="item.referConfig || {}" |
| | | :reloadFormKey="(item.referConfig.useFormKey && item.referConfig.formValues && item.referConfig.formValues[item.referConfig.useFormKey]) || ''" |
| | | :text="item.referConfig.showProp" |
| | | :value="item.prop || item.value" |
| | | @setReferValue="setReferValue" |
| | | :ref="'referFormRef'+item.prop"> |
| | | |
| | | </vciWebRefer> |
| | | </template> |
| | | </avue-form> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import vciWebRefer from '@/components/refer/vciWebRefer' |
| | | import VciWebRefer from "@/components/refer/vciWebRefer"; |
| | | import {verifyNull, verifySlash} from "@/util/validate"; |
| | | export default { |
| | | name: "dynamic-form", |
| | | components: {VciWebRefer}, |
| | | props: { |
| | | componentVO: { |
| | | type: Object, |
| | |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | ruleForm:{} |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | submitBtn: false, |
| | | emptyBtn: false, |
| | | height: 300, |
| | | column: this.getColumnData(0) |
| | | column: this.getColumnData() |
| | | } |
| | | }, |
| | | slotData() { |
| | | return this.getColumnData(0) |
| | | return this.getColumnData() |
| | | } |
| | | }, |
| | | watch:{ |
| | |
| | | } |
| | | } |
| | | }, |
| | | watch:{ |
| | | slotData:{ |
| | | handler(newV){ |
| | | this.getDictList(newV) |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | ruleForm: { |
| | | handler(val) { |
| | | if (val) { |
| | | if (Array.isArray(val)) { // æ£æ¥ val æ¯å¦ä¸ºæ°ç» |
| | | for (let code of val) { |
| | | if ( |
| | | code.type == "refer" && |
| | | code.referConfig && |
| | | code.referConfig.useFormKey |
| | | ) { |
| | | code.referConfig.formValues = val; |
| | | // code.referConfigTemp.options = code.referConfig; |
| | | } |
| | | } |
| | | } else if (typeof val === 'object') { // æ£æ¥ val æ¯å¦ä¸ºå¯¹è±¡ |
| | | // è¿ä»£å¯¹è±¡çé»è¾ |
| | | } |
| | | this.$emit("input", val); |
| | | } |
| | | }, |
| | | deep: true, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | methods: { |
| | | //è½¬åæ°æ® |
| | | formColumn(formList) { |
| | | return formList.map(item => { |
| | | const typeValue = item.type === 'text' ? 'input' : item.type === 'combox' ? 'select' : item.type; |
| | | |
| | | const focusFunc = item.type === 'refer' ? (i) => { |
| | | |
| | | } : undefined; |
| | | |
| | | |
| | | return { |
| | | label: item.text, |
| | | prop: item.field, |
| | | type: typeValue, |
| | | labelWidth:item.text.length >= 6 ? 115 : 90, |
| | | value: item.defaultValue, |
| | | dicData: item.type === 'combox' ? item.dicData : item.dicUrl, |
| | | readonly: item.readOnly, |
| | | disabled: item.disabled, |
| | | display: !item.hidden, |
| | | labelSuffix: item.suffix, |
| | | suffixIcon: item.prefix, |
| | | placeholder: item.placeholder, |
| | | clearable: item.clearable, |
| | | tip: item.tooltips, |
| | | keyAttr: item.keyAttr, |
| | | focus:focusFunc, |
| | | referConfig:item.referConfig, |
| | | rules: [{ |
| | | required: item.required, |
| | | message: `请è¾å
¥${item.text}!`, |
| | |
| | | }, |
| | | |
| | | //æ°æ®å¤ç©º |
| | | getColumnData(index) { |
| | | if (this.componentVO && this.componentVO.tableDefineVO && this.componentVO.tableDefineVO.cols && this.componentVO.tableDefineVO.cols.length > 0) { |
| | | return this.formColumn(this.componentVO.tableDefineVO.cols[index]) |
| | | getColumnData() { |
| | | if (this.componentVO && this.componentVO.formDefineVO && this.componentVO.formDefineVO.items && this.componentVO.formDefineVO.items.length > 0) { |
| | | return this.formColumn(this.componentVO.formDefineVO.items) |
| | | } else { |
| | | return null; |
| | | } |
| | |
| | | buttonClick(item) { |
| | | console.log(item.id) |
| | | }, |
| | | async getDictList(val) { |
| | | for (let code of val) { |
| | | if (!verifyNull(code.dictData) && code.type == "select") { |
| | | if ( |
| | | verifySlash(code.dictCode) && |
| | | Object.prototype.hasOwnProperty.call(code, "dictCode") |
| | | ) { |
| | | const res = await getlistByCode(code.dictCode); |
| | | if (res.success) { |
| | | const dic = res.data; |
| | | code.dictData = dic.map((d) => { |
| | | return { |
| | | label: d.name, |
| | | key: d.code, |
| | | value: d.id, |
| | | }; |
| | | }); |
| | | } |
| | | } else { |
| | | this.getDicts(code.dictCode) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | const dic = res.obj.datas; |
| | | code.dictData = dic.map((d) => { |
| | | return { |
| | | label: d.name, |
| | | key: d.code, |
| | | value: d.code, |
| | | }; |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | this.$message.error(` æ°æ®åå
¸${code.dictCode}é误`); |
| | | }); |
| | | } |
| | | } |
| | | if (code.type == "refer") { |
| | | if (code.referConfig && code.referConfig.useFormKey) { |
| | | if (verifyNull(code.referConfig.formValuesKey)) { |
| | | code.referConfig.formValuesKey = "ruleForm"; |
| | | } |
| | | code.referConfig.formValues = this[code.referConfig.formValuesKey]; |
| | | } |
| | | code.referConfigTemp = { |
| | | title: code.label, |
| | | showProp: |
| | | code.showProp || code.referConfig.showProp || code.prop + "Name", |
| | | prop: code.prop, |
| | | propMap: code.propMap || {}, |
| | | placeholder: code.placeholder |
| | | ? code.placeholder |
| | | : ` è¯·éæ©` + code.label, |
| | | options: code.referConfig, |
| | | }; |
| | | } |
| | | } |
| | | this.formTemplateData = val; |
| | | }, |
| | | setReferValue(data) { |
| | | if (data.prop) { |
| | | this.ruleForm[data.prop] = data.value || ""; |
| | | this.ruleForm[data.showProp] = data.text || ""; |
| | | if (data.propMap) { |
| | | //说æéè¦æ å° |
| | | for (let key in data.propMap) { |
| | | let mapFields = data.propMap[key].split(","); |
| | | let value = []; |
| | | data.rawData.forEach((_item) => { |
| | | var temp; |
| | | if (!_item.extendData) { |
| | | _item.extendData = {}; |
| | | } |
| | | if (mapFields.length == 1) { |
| | | var mapField = mapFields[0]; |
| | | temp = _item[mapField] || _item["extendData"][mapField]; |
| | | } else { |
| | | //æå¤ä¸ª |
| | | var mutiTemp = []; |
| | | mapFields.forEach((_itemField) => { |
| | | mutiTemp.push( |
| | | _item[_itemField] || _item["extendData"][_itemField] |
| | | ); |
| | | }); |
| | | temp = mutiTemp.join(" "); |
| | | } |
| | | if (temp != null && temp != "") { |
| | | value.push(temp); |
| | | } |
| | | }); |
| | | this.ruleForm[key] = value.join(","); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | :page.sync="pageType" |
| | | :table-loading="loading" |
| | | @row-click="rowClickChange" |
| | | @search-change='searchChange' |
| | | @selection-change="selectChange"> |
| | | <!--topåºåæé®--> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | |
| | | }); |
| | | }, |
| | | pageType() { |
| | | return this.areasName.indexOf('westArea') == 0 ? this.simplePage : this.page; |
| | | return this.areasName === 'westArea' ? this.simplePage : this.page; |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.parentHeight = this.$el.clientHeight - this.$children[0].$children[1].$children[0].$el.clientHeight - this.$children[0].$children[2].$el.clientHeight - 5; |
| | | } |
| | | } |
| | | }, |
| | | sourceData:{ |
| | | handler(newval) { |
| | | //æºæ°æ®æååæ¶åæ´å½ååºåæ°æ® |
| | | console.log(this.areasName); |
| | | console.log(newval); |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | selectChange(row) { |
| | | this.selectList = row; |
| | | }, |
| | | TreeSelectChange(row) { |
| | | this.TreeSelectList = row; |
| | | }, |
| | | searchChange(form,done){ |
| | | console.log(form) |
| | | done() |
| | | this.$emit("setDataStore", { |
| | | area: this.areasName, |
| | | dataStore:row |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | refertype: this.referConfig.options.type, |
| | | refertype: this.referConfig.type, |
| | | emitData: {}, |
| | | width:this.referConfig.options.width || '900px', |
| | | height:this.referConfig.options.height || '600px' |
| | | width:this.referConfig.width || '900px', |
| | | height:this.referConfig.height || '600px' |
| | | }; |
| | | }, |
| | | computed: { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import {verifyNull, verifySlash} from "@/util/validate"; |
| | | |
| | | export default { |
| | | async getDictList(val,that) { |
| | | for (let code of val) { |
| | | if (!verifyNull(code.dictData) && code.type == "select") { |
| | | if ( |
| | | verifySlash(code.dictCode) && |
| | | Object.prototype.hasOwnProperty.call(code, "dictCode") |
| | | ) { |
| | | const res = await getlistByCode(code.dictCode); |
| | | if (res.success) { |
| | | const dic = res.data; |
| | | code.dictData = dic.map((d) => { |
| | | return { |
| | | label: d.name, |
| | | key: d.code, |
| | | value: d.id, |
| | | }; |
| | | }); |
| | | } |
| | | } else { |
| | | that.getDicts(code.dictCode) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | const dic = res.obj.datas; |
| | | code.dictData = dic.map((d) => { |
| | | return { |
| | | label: d.name, |
| | | key: d.code, |
| | | value: d.code, |
| | | }; |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | that.$message.error(` æ°æ®åå
¸${code.dictCode}é误`); |
| | | }); |
| | | } |
| | | } |
| | | if (code.type == "refer") { |
| | | if (code.referConfig && code.referConfig.useFormKey) { |
| | | if (verifyNull(code.referConfig.formValuesKey)) { |
| | | code.referConfig.formValuesKey = "ruleForm"; |
| | | } |
| | | code.referConfig.formValues = that[code.referConfig.formValuesKey]; |
| | | } |
| | | code.referConfigTemp = { |
| | | title: code.label, |
| | | showProp: |
| | | code.showProp || code.referConfig.showProp || code.prop + "Name", |
| | | prop: code.prop, |
| | | propMap: code.propMap || {}, |
| | | placeholder: code.placeholder |
| | | ? code.placeholder |
| | | : ` è¯·éæ©` + code.label, |
| | | options: code.referConfig, |
| | | }; |
| | | } |
| | | } |
| | | that.formTemplateData = val; |
| | | }, |
| | | setReferValue(data,that) { |
| | | if (data.prop) { |
| | | that.ruleForm[data.prop] = data.value || ""; |
| | | that.ruleForm[data.showProp] = data.text || ""; |
| | | if (data.propMap) { |
| | | //说æéè¦æ å° |
| | | for (let key in data.propMap) { |
| | | let mapFields = data.propMap[key].split(","); |
| | | let value = []; |
| | | data.rawData.forEach((_item) => { |
| | | var temp; |
| | | if (!_item.extendData) { |
| | | _item.extendData = {}; |
| | | } |
| | | if (mapFields.length == 1) { |
| | | var mapField = mapFields[0]; |
| | | temp = _item[mapField] || _item["extendData"][mapField]; |
| | | } else { |
| | | //æå¤ä¸ª |
| | | var mutiTemp = []; |
| | | mapFields.forEach((_itemField) => { |
| | | mutiTemp.push( |
| | | _item[_itemField] || _item["extendData"][_itemField] |
| | | ); |
| | | }); |
| | | temp = mutiTemp.join(" "); |
| | | } |
| | | if (temp != null && temp != "") { |
| | | value.push(temp); |
| | | } |
| | | }); |
| | | that.ruleForm[key] = value.join(","); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | |
| | | component: Layout, |
| | | children: [ |
| | | { |
| | | path: '', // 空路å¾è¡¨ç¤ºè®¿é® '/dynamic-table' æ¶å è½½ Layout ç»ä»¶ |
| | | path: '', // 空路å¾è¡¨ç¤ºè®¿é® '/dynamic-form' æ¶å è½½ Layout ç»ä»¶ |
| | | component: () => import('@/components/dynamic-components/dynamic-form'), |
| | | props: true |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/referIndex', |
| | | name: 'å¨æè¡¨æ ¼é¡µé¢', |
| | | component: Layout, |
| | | children: [ |
| | | { |
| | | path: '', // 空路å¾è¡¨ç¤ºè®¿é® '/dynamic-form' æ¶å è½½ Layout ç»ä»¶ |
| | | component: () => import('@/views/test/referDemo/index'), |
| | | props: true |
| | | } |
| | | ] |
| | | }, |
| | | ] |
| | |
| | | if (location === 'menu') { |
| | | that.visible = true; |
| | | that.$refs.dynamicForm.form = that.scope.row; |
| | | console.log('1',that.scope.row) |
| | | console.log(that.scope.row) |
| | | } else if (location === 'top' && that.selectList.length === 1) { |
| | | that.visible = true; |
| | |
| | | "extendAttr": "", |
| | | "firstR": null, |
| | | "firstV": null, |
| | | "formDefineVO": null, |
| | | "formDefineVO": { |
| | | "btmType": "test", |
| | | "columnOneRow": 3, |
| | | "freeMarkerEls": [], |
| | | "id": "materialform", |
| | | "items": [ |
| | | { |
| | | 'comboxKey': null, |
| | | 'customClass': null, |
| | | 'data': null, |
| | | 'dateFormate': null, |
| | | 'defaultValue': "", |
| | | 'displayExtension': "", |
| | | 'extendAttrMap': null, |
| | | 'extendAttrString': null, |
| | | 'field': "name", |
| | | 'hidden': false, |
| | | 'keyAttr': true, |
| | | 'prefix': null, |
| | | 'readOnly': false, |
| | | 'referConfig': null, |
| | | 'required': true, |
| | | 'selectLibFlag': null, |
| | | 'showField': null, |
| | | 'suffix': '$', |
| | | 'text': "åç§°", |
| | | 'tooltips': 'åç§°', |
| | | 'type': "text", |
| | | 'unique': false, |
| | | 'verify': "" |
| | | }, |
| | | { |
| | | 'comboxKey': null, |
| | | 'customClass': null, |
| | | 'data': null, |
| | | 'dateFormate': null, |
| | | 'defaultValue': "", |
| | | 'displayExtension': "", |
| | | 'extendAttrMap': null, |
| | | 'extendAttrString': null, |
| | | 'field': "code", |
| | | 'hidden': false, |
| | | 'keyAttr': false, |
| | | 'prefix': null, |
| | | 'readOnly': false, |
| | | 'referConfig': null, |
| | | 'required': false, |
| | | 'selectLibFlag': null, |
| | | 'showField': null, |
| | | 'suffix': null, |
| | | 'disabled':true, |
| | | 'text': "ç¼ç ", |
| | | 'tooltips': null, |
| | | 'type': "text", |
| | | 'unique': false, |
| | | 'verify': "" |
| | | }, |
| | | { |
| | | 'comboxKey': "EnumReviewType", |
| | | 'customClass': null, |
| | | 'data': null, |
| | | 'dateFormate': null, |
| | | 'defaultValue': "department", |
| | | 'displayExtension': "", |
| | | 'extendAttrMap': null, |
| | | 'extendAttrString': null, |
| | | 'field': "reviewtype", |
| | | 'hidden': false, |
| | | 'keyAttr': false, |
| | | 'prefix': null, |
| | | 'readOnly': false, |
| | | 'referConfig': null, |
| | | 'required': false, |
| | | 'selectLibFlag': null, |
| | | 'showField': null, |
| | | 'suffix': null, |
| | | 'text': "ç±»å", |
| | | 'tooltips': null, |
| | | 'type': "combox", |
| | | 'unique': false, |
| | | 'verify': "", |
| | | 'dicData': [{ |
| | | 'label': 'æµè¯1', |
| | | 'value': 'department' |
| | | }, { |
| | | 'label': 'æµè¯2', |
| | | 'value': 'departments' |
| | | }] |
| | | }, |
| | | { |
| | | 'comboxKey': null, |
| | | 'customClass': null, |
| | | 'data': null, |
| | | 'dateFormate': null, |
| | | 'defaultValue': "", |
| | | 'displayExtension': "", |
| | | 'extendAttrMap': null, |
| | | 'extendAttrString': null, |
| | | 'field': "creator", |
| | | 'hidden': true, |
| | | 'keyAttr': false, |
| | | 'prefix': null, |
| | | 'readOnly': true, |
| | | 'referConfig': null, |
| | | 'required': false, |
| | | 'selectLibFlag': null, |
| | | 'showField': null, |
| | | 'suffix': null, |
| | | 'text': "å建人", |
| | | 'tooltips': null, |
| | | 'type': "text", |
| | | 'unique': false, |
| | | 'verify': "" |
| | | }, |
| | | { |
| | | 'comboxKey': null, |
| | | 'customClass': null, |
| | | 'data': null, |
| | | 'dateFormate': "yyyy-MM-dd HH:mm:ss", |
| | | 'defaultValue': "", |
| | | 'displayExtension': "", |
| | | 'extendAttrMap': null, |
| | | 'extendAttrString': null, |
| | | 'field': "createtime", |
| | | 'hidden': true, |
| | | 'keyAttr': false, |
| | | 'prefix': null, |
| | | 'readOnly': false, |
| | | 'referConfig': null, |
| | | 'required': false, |
| | | 'selectLibFlag': null, |
| | | 'showField': null, |
| | | 'suffix': null, |
| | | 'text': "å建æ¶é´", |
| | | 'tooltips': null, |
| | | 'type': "datetime", |
| | | 'unique': false, |
| | | 'verify': "" |
| | | }, |
| | | { |
| | | 'comboxKey': null, |
| | | 'customClass': null, |
| | | 'data': null, |
| | | 'dateFormate': null, |
| | | 'defaultValue': "", |
| | | 'displayExtension': "", |
| | | 'extendAttrMap': null, |
| | | 'extendAttrString': null, |
| | | 'field': "content", |
| | | 'hidden': false, |
| | | 'keyAttr': false, |
| | | 'prefix': null, |
| | | 'readOnly': false, |
| | | 'referConfig': null, |
| | | 'required': false, |
| | | 'selectLibFlag': null, |
| | | 'showField': null, |
| | | 'suffix': null, |
| | | 'text': "夿³¨", |
| | | 'tooltips': null, |
| | | 'type': "textarea", |
| | | 'unique': false, |
| | | 'verify': "" |
| | | } |
| | | ], |
| | | "linkTypeFlag": false, |
| | | "oid": "ED51077B-253F-2AB9-A0E6-BA289052B03C", |
| | | "queryTemplateName": "" |
| | | } , |
| | | "id": null, |
| | | "lastModifier": null, |
| | | "lastModifyTime": null, |
| | |
| | | "revisionValue": null, |
| | | "secretGrade": null, |
| | | "secretGradeText": null, |
| | | "tableDefineVO": { |
| | | "btmType": "fileobject", |
| | | "cols": [ |
| | | [ |
| | | { |
| | | 'comboxKey': null, |
| | | 'customClass': null, |
| | | 'data': null, |
| | | 'dateFormate': null, |
| | | 'defaultValue': "", |
| | | 'displayExtension': "", |
| | | 'extendAttrMap': null, |
| | | 'extendAttrString': null, |
| | | 'field': "name", |
| | | 'hidden': false, |
| | | 'keyAttr': true, |
| | | 'prefix': null, |
| | | 'readOnly': false, |
| | | 'referConfig': null, |
| | | 'required': true, |
| | | 'selectLibFlag': null, |
| | | 'showField': null, |
| | | 'suffix': '$', |
| | | 'text': "åç§°", |
| | | 'tooltips': 'åç§°', |
| | | 'type': "text", |
| | | 'unique': false, |
| | | 'verify': "" |
| | | }, |
| | | { |
| | | 'comboxKey': null, |
| | | 'customClass': null, |
| | | 'data': null, |
| | | 'dateFormate': null, |
| | | 'defaultValue': "", |
| | | 'displayExtension': "", |
| | | 'extendAttrMap': null, |
| | | 'extendAttrString': null, |
| | | 'field': "code", |
| | | 'hidden': false, |
| | | 'keyAttr': false, |
| | | 'prefix': null, |
| | | 'readOnly': false, |
| | | 'referConfig': null, |
| | | 'required': false, |
| | | 'selectLibFlag': null, |
| | | 'showField': null, |
| | | 'suffix': null, |
| | | 'disabled':true, |
| | | 'text': "ç¼ç ", |
| | | 'tooltips': null, |
| | | 'type': "text", |
| | | 'unique': false, |
| | | 'verify': "" |
| | | }, |
| | | { |
| | | 'comboxKey': "EnumReviewType", |
| | | 'customClass': null, |
| | | 'data': null, |
| | | 'dateFormate': null, |
| | | 'defaultValue': "department", |
| | | 'displayExtension': "", |
| | | 'extendAttrMap': null, |
| | | 'extendAttrString': null, |
| | | 'field': "reviewtype", |
| | | 'hidden': false, |
| | | 'keyAttr': false, |
| | | 'prefix': null, |
| | | 'readOnly': false, |
| | | 'referConfig': null, |
| | | 'required': false, |
| | | 'selectLibFlag': null, |
| | | 'showField': null, |
| | | 'suffix': null, |
| | | 'text': "ç±»å", |
| | | 'tooltips': null, |
| | | 'type': "combox", |
| | | 'unique': false, |
| | | 'verify': "", |
| | | 'dicData': [{ |
| | | 'label': 'æµè¯1', |
| | | 'value': 'department' |
| | | }, { |
| | | 'label': 'æµè¯2', |
| | | 'value': 'departments' |
| | | }] |
| | | }, |
| | | { |
| | | 'comboxKey': null, |
| | | 'customClass': null, |
| | | 'data': null, |
| | | 'dateFormate': null, |
| | | 'defaultValue': "", |
| | | 'displayExtension': "", |
| | | 'extendAttrMap': null, |
| | | 'extendAttrString': null, |
| | | 'field': "creator", |
| | | 'hidden': true, |
| | | 'keyAttr': false, |
| | | 'prefix': null, |
| | | 'readOnly': true, |
| | | 'referConfig': null, |
| | | 'required': false, |
| | | 'selectLibFlag': null, |
| | | 'showField': null, |
| | | 'suffix': null, |
| | | 'text': "å建人", |
| | | 'tooltips': null, |
| | | 'type': "text", |
| | | 'unique': false, |
| | | 'verify': "" |
| | | }, |
| | | { |
| | | 'comboxKey': null, |
| | | 'customClass': null, |
| | | 'data': null, |
| | | 'dateFormate': "yyyy-MM-dd HH:mm:ss", |
| | | 'defaultValue': "", |
| | | 'displayExtension': "", |
| | | 'extendAttrMap': null, |
| | | 'extendAttrString': null, |
| | | 'field': "createtime", |
| | | 'hidden': true, |
| | | 'keyAttr': false, |
| | | 'prefix': null, |
| | | 'readOnly': false, |
| | | 'referConfig': null, |
| | | 'required': false, |
| | | 'selectLibFlag': null, |
| | | 'showField': null, |
| | | 'suffix': null, |
| | | 'text': "å建æ¶é´", |
| | | 'tooltips': null, |
| | | 'type': "datetime", |
| | | 'unique': false, |
| | | 'verify': "" |
| | | }, |
| | | { |
| | | 'comboxKey': null, |
| | | 'customClass': null, |
| | | 'data': null, |
| | | 'dateFormate': null, |
| | | 'defaultValue': "", |
| | | 'displayExtension': "", |
| | | 'extendAttrMap': null, |
| | | 'extendAttrString': null, |
| | | 'field': "content", |
| | | 'hidden': false, |
| | | 'keyAttr': false, |
| | | 'prefix': null, |
| | | 'readOnly': false, |
| | | 'referConfig': null, |
| | | 'required': false, |
| | | 'selectLibFlag': null, |
| | | 'showField': null, |
| | | 'suffix': null, |
| | | 'text': "夿³¨", |
| | | 'tooltips': null, |
| | | 'type': "textarea", |
| | | 'unique': false, |
| | | 'verify': "" |
| | | }, |
| | | ], |
| | | ], |
| | | "displayFolder": false, |
| | | "displayQueryArea": false, |
| | | "folderParentField": "", |
| | | "hasEditor": false, |
| | | "id": "documentFileList", |
| | | "limits": [ |
| | | 15, |
| | | 50, |
| | | 100, |
| | | 500, |
| | | 1000 |
| | | ], |
| | | "linkTypeFlag": false, |
| | | "oid": "40F0266E-9D12-F284-196B-379A40236F69", |
| | | "pageVO": null, |
| | | "queryColumns": null, |
| | | "queryTemplateName": "DocumentFiles", |
| | | "seniorQueryColumns": [ |
| | | { |
| | | "align": "left", |
| | | "colspan": 1, |
| | | "comboxKey": null, |
| | | "data": [], |
| | | "dateFormate": null, |
| | | "edit": null, |
| | | "editConfig": null, |
| | | "event": null, |
| | | "field": "name", |
| | | "fieldType": "text", |
| | | "fixed": null, |
| | | "hidden": false, |
| | | "minWidth": null, |
| | | "optionButtons": null, |
| | | "optionField": false, |
| | | "optionJsMap": null, |
| | | "queryField": null, |
| | | "referConfig": { |
| | | "backPath": null, |
| | | "displayTable": null, |
| | | "height": null, |
| | | "initSort": null, |
| | | "loadType": "all", |
| | | "mapFields": null, |
| | | "method": "GET", |
| | | "muti": false, |
| | | "onlyLeaf": false, |
| | | "paramForFormKey": null, |
| | | "parentFieldName": null, |
| | | "parentUsedField": null, |
| | | "parentValue": null, |
| | | "referContent": null, |
| | | "referType": null, |
| | | "remoteSort": false, |
| | | "tableConfig": null, |
| | | "textField": "name", |
| | | "type": null, |
| | | "url": null, |
| | | "useFormKey": null, |
| | | "valueField": "oid", |
| | | "where": null |
| | | }, |
| | | "rowspan": 1, |
| | | "showField": null, |
| | | "sort": false, |
| | | "sortField": null, |
| | | "style": null, |
| | | "templet": null, |
| | | "title": "åç§°", |
| | | "unresize": false, |
| | | "width": 300 |
| | | }, |
| | | { |
| | | "align": "left", |
| | | "colspan": 1, |
| | | "comboxKey": null, |
| | | "data": [], |
| | | "dateFormate": null, |
| | | "edit": null, |
| | | "editConfig": null, |
| | | "event": null, |
| | | "field": "filesize", |
| | | "fieldType": "radio", |
| | | "fixed": null, |
| | | "hidden": false, |
| | | "minWidth": null, |
| | | "optionButtons": null, |
| | | "optionField": false, |
| | | "optionJsMap": null, |
| | | "queryField": null, |
| | | "referConfig": { |
| | | "backPath": null, |
| | | "displayTable": null, |
| | | "height": null, |
| | | "initSort": null, |
| | | "loadType": "all", |
| | | "mapFields": null, |
| | | "method": "GET", |
| | | "muti": false, |
| | | "onlyLeaf": false, |
| | | "paramForFormKey": null, |
| | | "parentFieldName": null, |
| | | "parentUsedField": null, |
| | | "parentValue": null, |
| | | "referContent": null, |
| | | "referType": null, |
| | | "remoteSort": false, |
| | | "tableConfig": null, |
| | | "textField": "name", |
| | | "type": null, |
| | | "url": null, |
| | | "useFormKey": null, |
| | | "valueField": "oid", |
| | | "where": null |
| | | }, |
| | | "rowspan": 1, |
| | | "showField": null, |
| | | "sort": false, |
| | | "sortField": null, |
| | | "style": null, |
| | | "templet": null, |
| | | "title": "æä»¶å¤§å°", |
| | | "unresize": false, |
| | | "width": 150 |
| | | }, |
| | | { |
| | | "align": "left", |
| | | "colspan": 1, |
| | | "comboxKey": null, |
| | | "data": [], |
| | | "dateFormate": null, |
| | | "edit": null, |
| | | "editConfig": null, |
| | | "event": null, |
| | | "field": "creator_name,(,creator,)", |
| | | "fieldType": "text", |
| | | "fixed": null, |
| | | "hidden": false, |
| | | "minWidth": null, |
| | | "optionButtons": null, |
| | | "optionField": false, |
| | | "optionJsMap": null, |
| | | "queryField": null, |
| | | "referConfig": { |
| | | "backPath": null, |
| | | "displayTable": null, |
| | | "height": null, |
| | | "initSort": null, |
| | | "loadType": "all", |
| | | "mapFields": null, |
| | | "method": "GET", |
| | | "muti": false, |
| | | "onlyLeaf": false, |
| | | "paramForFormKey": null, |
| | | "parentFieldName": null, |
| | | "parentUsedField": null, |
| | | "parentValue": null, |
| | | "referContent": null, |
| | | "referType": null, |
| | | "remoteSort": false, |
| | | "tableConfig": null, |
| | | "textField": "name", |
| | | "type": null, |
| | | "url": null, |
| | | "useFormKey": null, |
| | | "valueField": "oid", |
| | | "where": null |
| | | }, |
| | | "rowspan": 1, |
| | | "showField": null, |
| | | "sort": false, |
| | | "sortField": "creator", |
| | | "style": null, |
| | | "templet": null, |
| | | "title": "å建è
", |
| | | "unresize": false, |
| | | "width": 150 |
| | | }, |
| | | { |
| | | "align": "left", |
| | | "colspan": 1, |
| | | "comboxKey": null, |
| | | "data": [], |
| | | "dateFormate": "yyyy-MM-dd HH:mm:ss", |
| | | "edit": null, |
| | | "editConfig": null, |
| | | "event": null, |
| | | "field": "createtime", |
| | | "fieldType": "text", |
| | | "fixed": null, |
| | | "hidden": false, |
| | | "minWidth": null, |
| | | "optionButtons": null, |
| | | "optionField": false, |
| | | "optionJsMap": null, |
| | | "queryField": null, |
| | | "referConfig": { |
| | | "backPath": null, |
| | | "displayTable": null, |
| | | "height": null, |
| | | "initSort": null, |
| | | "loadType": "all", |
| | | "mapFields": null, |
| | | "method": "GET", |
| | | "muti": false, |
| | | "onlyLeaf": false, |
| | | "paramForFormKey": null, |
| | | "parentFieldName": null, |
| | | "parentUsedField": null, |
| | | "parentValue": null, |
| | | "referContent": null, |
| | | "referType": null, |
| | | "remoteSort": false, |
| | | "tableConfig": null, |
| | | "textField": "name", |
| | | "type": null, |
| | | "url": null, |
| | | "useFormKey": null, |
| | | "valueField": "oid", |
| | | "where": null |
| | | }, |
| | | "rowspan": 1, |
| | | "showField": null, |
| | | "sort": false, |
| | | "sortField": null, |
| | | "style": null, |
| | | "templet": null, |
| | | "title": "å建æ¶é´", |
| | | "unresize": false, |
| | | "width": 150 |
| | | } |
| | | ], |
| | | "whereSql": "" |
| | | }, |
| | | "tableDefineVO":null, |
| | | "treeDefineVO": null, |
| | | "treeTableDefineVO": null, |
| | | "ts": null, |
| | |
| | | "extendAttr": "", |
| | | "firstR": null, |
| | | "firstV": null, |
| | | "id": "1", |
| | | "id": "6", |
| | | "international": null, |
| | | "lastModifier": "developer", |
| | | "lastModifyTime": "2022-07-18 17:30:52.000", |
| | |
| | | "extendAttr": "", |
| | | "firstR": null, |
| | | "firstV": null, |
| | | "id": "2", |
| | | "id": "7", |
| | | "international": null, |
| | | "lastModifier": "developer", |
| | | "lastModifyTime": "2022-07-18 17:30:52.000", |
| | |
| | | }, |
| | | formData: { |
| | | handler(val) { |
| | | this.rules = handlerObj("prop", "rule", val); |
| | | //this.getDictList(val); |
| | | this.rules = val; |
| | | this.getDictList(val); |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | ruleForm: { |
| | | handler(val) { |
| | | for (let code of this.formTemplateData) { |
| | | for (let code of val) { |
| | | if ( |
| | | code.type == "refer" && |
| | | code.referConfig && |
| | |
| | | ) { |
| | | code.referConfig.formValues = val; |
| | | |
| | | code.referConfigTemp.options = code.referConfig; |
| | | // code.referConfigTemp.options = code.referConfig; |
| | | } |
| | | } |
| | | this.$emit("input", val); |
| | |
| | | <template> |
| | | <basic-dialog |
| | | <el-dialog |
| | | :visible.sync="dialog.showDialog" |
| | | :title="dialog.title" |
| | | width="40%" |
| | | append-to-body |
| | | :submit-icon="dialog.submitIcon" |
| | | :submit-txt="dialog.submitTxt" |
| | | :loading="dialog.loading" |
| | |
| | | :form-prop="ruleForm" |
| | | ref="referDialogFormRef" |
| | | ></d-from> |
| | | </basic-dialog> |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | import { DFrom } from "@/views/test/referDemo/DynamicsFrom"; |
| | | import { deferFormTemplate } from "@/views/test/referDemo/referDemo"; |
| | | import DFrom from "@/views/test/referDemo/DynamicsFrom"; |
| | | import {deferFormTemplate} from "@/views/test/referDemo/referDemo"; |
| | | import { handlerObj } from "@/util/platformUtils"; |
| | | export default { |
| | | name: "referDemoDialog", |
| | |
| | | methods: { |
| | | // æå¼å¯¹è¯æ¡ |
| | | openDialog(event) { |
| | | console.log(event) |
| | | this.dialog.type = event.type; |
| | | if (event.type === "add") { |
| | | this.dialog.title = "æ°å¢"; |
| | | this.dialog.submitTxt = "æ°å¢"; |
| | | this.dialog.submitIcon = "el-icon-plus"; |
| | | this.formData = deferFormTemplate; |
| | | this.ruleForm = handlerObj("prop", "value", deferFormTemplate); |
| | | this.ruleForm = this.formData |
| | | |
| | | } else if (event.type === "edit") { |
| | | this.dialog.title = "ä¿®æ¹"; |
| | | this.dialog.submitTxt = "ä¿®æ¹"; |