wangting
2023-09-18 f822a19da6819da91c5f8af669bc749c2878a325
修改参照配置
已修改6个文件
122 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/code-dialog-page/referConfigDialog.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebRefer.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/code/code.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/code-dialog-page/referConfigDialog.vue
@@ -37,9 +37,6 @@
        },
    },
    methods: {
        echoReferConfig(value) {
            this.emitData = value;
        },
        // 当前已存在编辑过的参照配置,所以直接打开参照配置界面
        openReconfigInterFace(preReferConfigForm){
            const form = preReferConfigForm;
Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue
@@ -699,7 +699,7 @@
                                },{
                                    label: '映射其他属性',
                                    prop: 'mapFields',
                                    tip: '选择数据后,将选择的数据拷贝到表单里的其他属性,书写格式为{当前表单上的属性:选择数据里的属性,XXXXx:yyyy}',
                      tip: '选择数据后,将选择的数据拷贝到表单里的其他属性,书写格式为{当前表单上的属性:选择数据里的属性,"XXXXx":"yyyy"}',
                                    tipPlacement: 'right',
                                    span: 7,
                                },{
@@ -779,6 +779,11 @@
                                    span: 8,
                                    tip: '分页时每页显示的数量,不分页填-1',
                                    value: 15,
                      rules: [{
                        required: true,
                        message: "必填项不能为空",
                        trigger: "blur",
                      }],
                                    tipPlacement: 'right',
                                },{
                                    label: '排序字段',
@@ -928,7 +933,6 @@
            }
        },
        methods: {
            // 选择完参照配置之后点击保存按钮触发
            async selectedListReferConfig(){
                // 标记所有表单是否通过校验的变量
@@ -942,7 +946,6 @@
                                break;
                            }
                            isValid = false;
                            //console.log(valid);
                        }
                        done();
                    })
@@ -951,7 +954,6 @@
                if (isValid) {
                    // 根据类型对form表单中的参数进行过滤,只保留非空且需要的属性
                    let submitForm = this.filterForm();
                    // console.log(submitForm);
                    this.$emit('echoReferConfig', submitForm) // 触发update:data将子组件值传递给父组件
                    this.isShowReferConfigForm = false;
                }
@@ -959,7 +961,6 @@
            // 单击表格实现表格行编辑
            clickAttrEdit(row, column, event){
                if(this.preClickAttrRow && this.preClickAttrRow != row){
                    //console.log(this.codeShowFieldConfigVOS[this.preClickAttrRow.$index]);
                    this.codeShowFieldConfigVOS[this.preClickAttrRow.$index].$cellEdit = false;
                }
                row.$cellEdit = true;
Source/UBCS-WEB/src/components/refer/vciWebRefer.vue
@@ -26,10 +26,9 @@
    };
  },
  created() {
    console.log('referer')
    if (!this.referConfig.options) {
    if (!this.referConfig.options && this.referConfig.options.isMuti==undefined) {
      this.referConfig.options = {
        isMuti: false
        isMuti: this.referConfig.options.muti || false
      }
    }
  },
Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue
@@ -86,9 +86,11 @@
    this.getParams();
  },
  mounted() {
    if(this.referConfig.options.page){
      this.page.pageSize=this.referConfig.options.page.limit || this.referConfig.options.page.pageSize;
      this.page.currentPage=this.referConfig.options.page.page || this.referConfig.options.page.currentPage;
    if(this.referConfig.options.tableConfig.page){
      this.page.pageSize=this.referConfig.options.tableConfig.page.limit || this.referConfig.options.tableConfig.page.pageSize;
      this.page.currentPage=this.referConfig.options.tableConfig.page.page || this.referConfig.options.tableConfig.page.currentPage;
    }else if(!validatenull(this.referConfig.options.limit)){
      this.page.pageSize=this.referConfig.options.limit
    }
  },
  computed:{
@@ -123,6 +125,12 @@
      if (this.options.remoteSort && this.options.initSort) {
        queryParams['order'] = this.options.initSort.type;//方法
        queryParams['sort'] = this.options.initSort.field;//字段
      }
      if(this.options.sortField){
        queryParams['sort'] = this.options.sortField;//字段
      }
      if(this.options.sortType){
        queryParams['order'] = this.options.sortType;//方法
      }
      if (this.options.conditionParams) {
        //说明是扩展属性
@@ -248,24 +256,41 @@
        if(isMutiValue){
          var valueFieldArray = _that.props.value.split(",");
          valueFieldArray.forEach((_itemField,_indexField)=>{
            value.push( (item[_itemField] || item['data'][_itemField]) + (_that.referConfig.valueSep?_that.referConfig.valueSep:' '));
            let itemValue=item[_itemField];
            if(itemValue==undefined || itemValue == null){
              itemValue=item['data'][_itemField]
            }
            value.push( itemValue + (_that.referConfig.valueSep?_that.referConfig.valueSep:' '));
          })
        }else {
          value.push(item[_that.props.value] || item['data'][_that.props.value]);
          let itemValue=item[_that.props.value];
          if(itemValue==undefined || itemValue == null){
            itemValue=item['data'][_that.props.value]
          }
          value.push(itemValue);
        }
        if(isMutiRaw) {
          var rawFieldArray = _that.props.label.split(",");
          rawFieldArray.forEach((_itemField,_indexField)=>{
            text.push((item[_itemField] || item['data'][_itemField]) + (_that.referConfig.textSep?_that.referConfig.textSep:' ')) ;
            let itemText=item[_itemField];
            if(itemText==undefined || itemText == null){
              itemText=item['data'][_itemField]
            }
            text.push(itemText + (_that.referConfig.textSep?_that.referConfig.textSep:' ')) ;
          })
        }else{
          text.push(item[_that.props.label] || item['data'][_that.props.label]);
          let itemText=item[_that.props.label];
          if(itemText==undefined || itemText == null){
            itemText=item['data'][_that.props.label]
          }
          text.push(itemText);
        }
      })
      let mapFields =Object.assign(this.referConfig.fieldMap,JSON.parse(this.options.mapFields)) ;
      this.value=value.join(',');
      this.text=text.join(',')
      this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList,fieldMap:this.referConfig.fieldMap});
      this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList,fieldMap:mapFields});
      this.visible=false;
    },
    searchReset() {
Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue
@@ -93,10 +93,11 @@
    // console.log(this.referConfig)
  },
  mounted() {
    console.log('referrTable')
    if(this.referConfig.options.page){
      this.page.pageSize=this.referConfig.options.page.limit || this.referConfig.options.page.pageSize;
      this.page.currentPage=this.referConfig.options.page.page || this.referConfig.options.page.currentPage;
      this.page.pageSize=this.referConfig.options.tableConfig.page.limit || this.referConfig.options.tableConfig.page.pageSize;
      this.page.currentPage=this.referConfig.options.tableConfig.page.page || this.referConfig.options.tableConfig.page.currentPage;
    }else if(!validatenull(this.referConfig.options.limit)){
      this.page.pageSize=this.referConfig.options.limit
    }
    this.$nextTick(() => {
      this.$refs.referCrud.doLayout()
@@ -135,6 +136,12 @@
      if (this.options.remoteSort && this.options.initSort) {
        queryParams['order'] = this.options.initSort.type;//方法
        queryParams['sort'] = this.options.initSort.field;//字段
      }
      if(this.options.sortField){
        queryParams['sort'] = this.options.sortField;//字段
      }
      if(this.options.sortType){
        queryParams['order'] = this.options.sortType;//方法
      }
      if (this.options.conditionParams) {
        //说明是扩展属性
@@ -241,7 +248,7 @@
        if(!tableConfig){
          this.$message.error( '没有定义参照的表格配置');
        }
        this.page.pageSize=tableConfig.page.limit || 10;
        //this.page.pageSize=tableConfig.page.limit || 10;
        if(!paramsData){
          paramsData = {
            currentUserReferModelKey:this.options.currentUserReferModelKey,
@@ -307,24 +314,40 @@
        if(isMutiValue){
          var valueFieldArray = _that.props.value.split(",");
          valueFieldArray.forEach((_itemField,_indexField)=>{
            value.push( (item[_itemField] || item['data'][_itemField]) + (_that.referConfig.valueSep?_that.referConfig.valueSep:' '));
            let itemValue=item[_itemField];
            if(itemValue==undefined || itemValue == null){
              itemValue=item['data'][_itemField]
            }
            value.push( itemValue + (_that.referConfig.valueSep?_that.referConfig.valueSep:' '));
          })
        }else {
          value.push(item[_that.props.value] || item['data'][_that.props.value]);
          let itemValue=item[_that.props.value];
          if(itemValue==undefined || itemValue == null){
            itemValue=item['data'][_that.props.value]
          }
          value.push(itemValue);
        }
        if(isMutiRaw) {
          var rawFieldArray = _that.props.label.split(",");
          rawFieldArray.forEach((_itemField,_indexField)=>{
            text.push((item[_itemField] || item['data'][_itemField]) + (_that.referConfig.textSep?_that.referConfig.textSep:' ')) ;
            let itemText=item[_itemField];
            if(itemText==undefined || itemText == null){
              itemText=item['data'][_itemField]
            }
            text.push(itemText + (_that.referConfig.textSep?_that.referConfig.textSep:' ')) ;
          })
        }else{
          text.push(item[_that.props.label] || item['data'][_that.props.label]);
          let itemText=item[_that.props.label];
          if(itemText==undefined || itemText == null){
            itemText=item['data'][_that.props.label]
          }
          text.push(itemText);
        }
      })
      let mapFields =Object.assign(this.referConfig.fieldMap,JSON.parse(this.options.mapFields)) ;
      this.value=value.join(',');
      this.text=text.join(',')
      this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList,fieldMap:this.referConfig.fieldMap});
      this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList,fieldMap:mapFields});
      this.visible=false;
    },
    searchReset() {
Source/UBCS-WEB/src/views/code/code.vue
@@ -1650,7 +1650,6 @@
        } else {
          this.sendGridCodeBasicSec(conditionMaps, true);
        }
        //console.log(conditionMaps);
      }
    },
    /* 公式编辑框内容改变,子组件编辑完公式之后内容回显时调用 */
@@ -1659,12 +1658,12 @@
    },
    /* 引用码段参照配置,子组件填完参照配置之后内容回显时调用 */
    setReferConfigValue(content) {
      // console.log(content.referTypeName);
      this.form.referBtmId = content.referType || "";
      this.form.referBtmName = content.referTypeName || content.referType;
      //转换成JSON字符串进行父组件回显
      let submitFormJson = JSON.stringify(content);
      this.form.referConfig = submitFormJson || "";
      debugger;
    },
    /** 引用码段为【参照引用的业务类型】选取值之后的内容回显时调用 */
    echoReferBtmType(content) {
@@ -1676,7 +1675,6 @@
    /** 父分类选择对话框,第二层嵌套对话框,及其相关方法 */
    /** 保存当前父分类码段的选中行,并进行回显 */
    saveSelectedParentClassify() {
      //console.log(this.parentClsfyParams.parentClassifySelectionList.length);
      if (this.parentClsfyParams.parentClassifySelectionList.length != 1) {
        this.$message.warning("请选择一条数据!");
        return false;
@@ -1744,7 +1742,6 @@
        page.pageSize,
        conditionMaps
      ).then((res) => {
        //console.log(res.data);
        const data = res.data.data;
        parentClsParam.parentClassifyDataPage.total = data.total;
        parentClsParam.parentClassifyData = data.records;
@@ -1762,7 +1759,6 @@
    /** 加载分类连接属性表格数据 */
    loadlistClassifyLinkAttr() {
      let attrParam = this.selectAttrParams;
      //console.log(this.currentSelectTreeData);
      this.selectAttrParams.selectAttrOptionLoading = true;
      let conditionMaps = {};
      if (attrParam.selectAttrQeury) {
@@ -1780,7 +1776,6 @@
        this.$nextTick(() => {
          this.$refs[attrParam.ref].doLayout();
        });
        //console.log(data.data);
        this.selectAttrParams.selectAttrData = data.data;
        this.selectAttrParams.selectAttrOptionLoading = false;
        // 将搜索框内容置空
@@ -1850,13 +1845,11 @@
      this.fixedValueOptionLoading = true;
      gridCodeFixedValue(1, -1, { codeFixedSecOid: row.oid }).then((res) => {
        this.fixedValueData = res.data.data.records;
        //console.log(this.fixedValueData);
        this.fixedValueOptionLoading = false;
      });
    },
    /** 单击固定码段的码值表中行时触发的事件*/
    selectedCodeValueRow(row) {
      //console.log(row);
      this.selectedFixedOrCodeclassifyValue = row;
      this.codeFixdForm.id = row.id;
      this.codeFixdForm.description = row.description;
@@ -1892,7 +1885,6 @@
        }
        this.codeClassifyForm.codeClassifySecOid =
          this.codefixedsecOrCodeclassifysec.oid;
        // console.log(this.codeClassifyForm);
        addSaveCodeClassifyValue(this.codeClassifyForm).then(
          () => {
            this.loadClassifyValueData({
@@ -1917,7 +1909,6 @@
    clearFixedOrClassifyForm(condition) {
      //点击取消时清空表单与当前选中的码值,并禁用按钮
      this.selectedFixedOrCodeclassifyValue = "";
      //console.log(condition);
      if (condition === "close") {
        this.codeFixdForm = this.$options.data().codeFixdForm;
        this.codeClassifyForm = this.$options.data().codeClassifyForm;
@@ -2470,7 +2461,6 @@
    },
    /** 添加*/
    rowSave(row, done, loading) {
      console.log(row);
      add(row).then(
        () => {
          this.onLoad(this.page);
@@ -3145,7 +3135,6 @@
    },
    /** 码段类型改变时,增加对应的form表单中的属性*/
    changeSectypeFormItems(row) {
      //console.log(row);
      if (
        func.isEmpty(this.enumParam.secTypeList) ||
        this.enumParam.secTypeList.length == 0
@@ -3179,7 +3168,6 @@
          componentCodeFlag: this.form.componentCodeFlag, //是否参与编码
          pkCodeRule: this.form.pkCodeRule, //所属编码规则
        };
        //console.log(this.form);
      }
      if (this.form.secType === "codefixedsec") {
        //固定码段
@@ -3245,8 +3233,6 @@
              ? row.customCodeSerialClass
              : "", //自定义流水算法
        });
        console.log(this.form);
        console.log(this.enumParam.codeFillType);
        this.loadCodeFillType();
        this.loadCodeFillSeparator();
      } else if (this.form.secType === "codelevelsec") {
@@ -3292,7 +3278,6 @@
              : "", //日期格式
        });
      } else if (this.form.secType === "codeclassifysec") {
        //console.log(this.form);
        //分类码段
        this.form = Object.assign({}, this.form, {
          codeSecLengthType:
@@ -3335,7 +3320,6 @@
        this.loadCodeFillType();
        this.loadCodeFillSeparator();
      }
      // console.log(this.form);
    },
    /** 第一次请求的枚举数据放缓存*/
    getLocalStorageEnum(enumKey) {
@@ -3392,7 +3376,6 @@
    },
    // 最大流水号
    maxSerialNum() {
      console.log(this.selectionList);
      if (this.selectionList.length === 0) {
        this.$message.warning("请选择一条编码规则!");
        return;