田源
2023-09-08 f79096d67dbd8a243c0b9808703142559dab4d2c
元数据编辑-枚举弹窗分页bug
已修改4个文件
48 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/index.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/original.vue 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/modeling/originalAdd.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
@@ -138,7 +138,7 @@
      let value=''
      formItemList.forEach((formItem) => {
        formItem = this.resetFormConfig(formItem);
        console.log('formItem',formItem)
        // console.log('formItem',formItem)
        // console.log('formItem.dicData.value',formItem.dicData)
        if (formItem.type === "line") {
          group.push({
@@ -195,10 +195,12 @@
          valueFormat:formItem.dateFormate,
          format: formItem.dateFormate,
          keyAttr: formItem.keyAttr,
          value: formItem.dicData && formItem.dicData.length > 0 && formItem.type == 'combox' ? formItem.dicData[0].id : null,
          value: (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) ||
            (formItem.secType == "codedatesec"?formItem.codeDateFormatStr: null),
          placeholder: formItem.inputTip,
          comboxKey: formItem.comboxKey,
          tip: formItem.tooltips,
          // hidden:formItem.secType && formItem.codeValueApplyStatus == 3 ? true : false,
          // readonly:formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ?true : false ,
          display: !formItem.hidden,
          maxlength: formItem.maxlength,
@@ -239,6 +241,7 @@
        };
        // console.log('columnItem',columnItem)
        slotColumnList.push(columnItem);
        // console.log('slotColumnList',slotColumnList)
        if (group.length === 0) {
          column.push(columnItem);
        } else {
@@ -255,6 +258,7 @@
      this.geDictData(dictKeys);
      this.getFormDetail();
      // console.log('selfColumnConfig',this.selfColumnConfig)
    },
    // 使用传入的表单数据配置
@@ -274,6 +278,9 @@
              if (Object.hasOwnProperty.call(element, newAttr)) {
                const oldAttr = element[newAttr];
                formItem[newAttr] = formItem[oldAttr];
                // console.log(formItem)
                // console.log(newAttr,oldAttr)
                // console.log(formItem[newAttr],formItem[oldAttr])
              }
            }
          } else if (configType === "directVoluation") {
@@ -364,7 +371,7 @@
      );
    },
    setReferValue(data) {
      console.log(data)
      // console.log(data)
      if (data.field) {
        this.form[data.field] = data.value || "";
        this.form[data.showField] = data.text || "";
Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -142,7 +142,7 @@
        coderefersec: "refer",//引用码段
        codeattrsec: "text",
        codelevelsec: "text",
        codedatesec: "date"
        codedatesec: "text"
      },
      selfColumnConfig: {
        function: {
@@ -263,9 +263,10 @@
    },
    // 获取码值申请数据
    getCodeRule() {
      getCodeRule({ codeClassifyOid: this.codeClassifyOid }).then((res) => {
      let  that = this;
      getCodeRule({ codeClassifyOid: that.codeClassifyOid }).then((res) => {
        if (res.data && res.data.code === 200) {
          this.codeRuleOid = res.data.data.oid;
          that.codeRuleOid = res.data.data.oid;
          const typeList = [
            //属性码段 只读
            "codeattrsec",
@@ -283,20 +284,20 @@
            "codelevelsec",
            //流水码段 隐藏
          ];
          this.secVOList = (res.data.data.secVOList || []).filter((item) =>
          that.secVOList = (res.data.data.secVOList || []).filter((item) =>
            typeList.includes(item.secType)
          );
          if (this.secVOList.length > 0 && this.type === "add") {
            this.showCodeApply = true;
            this.activeName = "codeApply";
            this.$nextTick(() => {
              this.$refs.CodeApply.templateRender(this.secVOList);
          if (that.secVOList.length > 0 && that.type === "add") {
            that.showCodeApply = true;
            that.activeName = "codeApply";
            that.$nextTick(() => {
              that.$refs.CodeApply.templateRender(that.secVOList);
            });
          } else {
            this.showCodeApply = false;
            that.showCodeApply = false;
          }
        }
        // console.log(' this.secVOList',this.secVOList)
        // console.log(' this.secVOList',that.secVOList)
        // console.log(' res.data.data.secVOList',res.data.data.secVOList)
      });
    },
@@ -382,7 +383,6 @@
        this.$delete(formValue, item);
      });
      const keys = Object.keys(formValue);
      debugger
      keys.forEach((item, index) => {
        keys.forEach((itm, idx) => {
          if ((item === ('$' + itm)) && idx !== index) {
@@ -475,6 +475,8 @@
      } else if (item.secType == "coderefersec") {
        //引用码段
        params = JSON.parse(item.referValueInfo);
        // console.log('item',item)
        console.log('params',params)
      }
      return params;
    },
@@ -492,6 +494,7 @@
    isRequired(item) {
      return item.nullableFlag != "true";
    },
    //默认值
    getOptionList(item) {
      if (
        Array.isArray(item.fixedValueVOList) &&
Source/UBCS-WEB/src/views/modeling/original.vue
Source/UBCS-WEB/src/views/modeling/originalAdd.vue
@@ -111,7 +111,7 @@
            <!-- 选择枚举时的弹窗 -->
            <el-dialog title="枚举列表" :visible.sync="enumRefer.show" append-to-body @close="closeEnumDialog" width="70%"
                style="height: 115vh;">
                <avue-crud ref="eunmTable" :option="enumRefer.option" :data="enumRefer.data" class="enumTable"
                <avue-crud ref="eunmTable" :option="enumRefer.option"  @on-load="enumOnLoad" :data="enumRefer.data" class="enumTable"
                    @row-click="enumReferClick" :page.sync="enumRefer.enumPage">
                    <template slot="radio" slot-scope="{row}">
                        <el-radio v-model="enumRefer.selectRow" :label="row.$index">&nbsp;
@@ -281,6 +281,12 @@
        this.initAttributeReferTypeList();
    },
    methods: {
        enumOnLoad(){
          getParentList(this.enumRefer.enumPage.currentPage, this.enumRefer.enumPage.pageSize).then(res => {
            this.enumRefer.enumPage.total = res.data.data.total;
            this.enumRefer.data = res.data.data.records;
          })
        },
        closeSubmitDialog() {
            this.resetAttributeForm();
            this.showSubmitDialog = false;