田源
2024-03-28 f37b3eceb7e962d32ebe420bb8b931ea4dae4fe2
表单参照
已修改8个文件
已添加1个文件
897 ■■■■ 文件已修改
Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-table.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/refer/vciWebRefer.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/const/refer/refer.js 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/router/page/index.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/views/base/buttonTable.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/views/base/uiDefineVO.js 572 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/views/test/referDemo/DynamicsFrom.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/views/test/referDemo/referDemoDialog.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
@@ -18,13 +18,34 @@
      <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,
@@ -61,6 +82,7 @@
  data() {
    return {
      form: {},
      ruleForm:{}
    }
  },
  mounted() {
@@ -71,11 +93,11 @@
        submitBtn: false,
        emptyBtn: false,
        height: 300,
        column: this.getColumnData(0)
        column: this.getColumnData()
      }
    },
    slotData() {
      return this.getColumnData(0)
      return this.getColumnData()
    }
  },
  watch:{
@@ -87,26 +109,66 @@
      }
    }
  },
  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}!`,
@@ -117,9 +179,9 @@
    },
    //数据判空
    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;
      }
@@ -128,6 +190,101 @@
    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>
Source/ProjectWeb/src/components/dynamic-components/dynamic-table.vue
@@ -7,6 +7,7 @@
               :page.sync="pageType"
               :table-loading="loading"
               @row-click="rowClickChange"
               @search-change='searchChange'
               @selection-change="selectChange">
      <!--top区域按钮-->
      <template slot="menuLeft" slot-scope="scope">
@@ -514,7 +515,7 @@
      });
    },
    pageType() {
      return this.areasName.indexOf('westArea') == 0  ? this.simplePage : this.page;
      return this.areasName === 'westArea' ? this.simplePage : this.page;
    }
  },
  watch: {
@@ -538,13 +539,6 @@
          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() {
@@ -562,6 +556,13 @@
    },
    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
Source/ProjectWeb/src/components/refer/vciWebRefer.vue
@@ -178,10 +178,10 @@
  },
  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: {
Source/ProjectWeb/src/const/refer/refer.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,99 @@
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(",");
        }
      }
    }
  },
}
Source/ProjectWeb/src/router/page/index.js
@@ -95,10 +95,22 @@
    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
      }
    ]
  },
]
Source/ProjectWeb/src/views/base/buttonTable.js
@@ -33,6 +33,7 @@
    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;
Source/ProjectWeb/src/views/base/uiDefineVO.js
@@ -2625,7 +2625,175 @@
          "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,
@@ -2646,403 +2814,7 @@
          "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,
@@ -3064,7 +2836,7 @@
      "extendAttr": "",
      "firstR": null,
      "firstV": null,
      "id": "1",
      "id": "6",
      "international": null,
      "lastModifier": "developer",
      "lastModifyTime": "2022-07-18 17:30:52.000",
@@ -3160,7 +2932,7 @@
      "extendAttr": "",
      "firstR": null,
      "firstV": null,
      "id": "2",
      "id": "7",
      "international": null,
      "lastModifier": "developer",
      "lastModifyTime": "2022-07-18 17:30:52.000",
Source/ProjectWeb/src/views/test/referDemo/DynamicsFrom.vue
@@ -201,14 +201,14 @@
    },
    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 &&
@@ -216,7 +216,7 @@
          ) {
            code.referConfig.formValues = val;
            code.referConfigTemp.options = code.referConfig;
            // code.referConfigTemp.options = code.referConfig;
          }
        }
        this.$emit("input", val);
Source/ProjectWeb/src/views/test/referDemo/referDemoDialog.vue
@@ -1,8 +1,9 @@
<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"
@@ -15,11 +16,11 @@
      :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",
@@ -41,13 +42,15 @@
  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 = "修改";