ludc
2023-05-10 0365fc08606d1308b8a81258410c3feb4da0fa7d
Source/UBCS-WEB/src/views/code/code.vue
@@ -202,6 +202,9 @@
        ref="crudBasic"
        :table-loading="loadingBasic"
        :data="basicData"
        @row-click="codeBasicSecRowClick"
        @search-change="basicSearchChange"
        @search-reset="basicSearchReset"
        :permission="permissionList"
        @selection-change="selectionBasicChange"
        @refresh-change="refreshChangeBasicSec">
@@ -600,7 +603,7 @@
                  placeholder="请选择"
                  prefix-icon="el-icon-search"
                  readonly="true"
                  v-model="form.parentClassifySecOid"
                  v-model="form.parentClassifySecText"
                  @focus="openAttrSelectOrGetValue('parentClassifySecOid')"
                  :disabled="basicSecOnlyRead">
                  <i slot="suffix" class="el-icon-circle-close" @click="clearAttrDataByIcon('parentClassifySecOid')" style="margin-right: 5px;cursor: pointer;"></i>
@@ -894,7 +897,7 @@
          },
          classisyValueTreeOption: classisyValueTreeOption, //分类码段树相关配置项
          classifyValueTreeData: [],
          currentSelectTreeData: '', //当前选中的分类码值树节点
          //currentSelectClsValueTreeData: '', //当前选中的分类码值树节点
          /* 为属性选取值窗口显示打开控制变量 */
          isShowSelectAttrOption: false,
@@ -1170,10 +1173,10 @@
        saveSelectedParentClassify(){
          //console.log(this.parentClassifySelectionList.length);
          if(this.parentClassifySelectionList.length != 1){
            this.$message.warning("只能选择一条数据!");
            this.$message.warning("请选择一条数据!");
            return false;
          }
          //调用子组件并传递当前选中的参数值,实现回显
          //参数值,实现回显
          this.form.parentClassifySecOid = this.parentClassifySelectionList[0].oid;
          this.form.parentClassifySecText = this.parentClassifySelectionList[0].name;
          //清空当前选中的行
@@ -1609,7 +1612,7 @@
        /** 基础码段相关方法 */
        //防止打开过编辑窗口之后表单中存在值,所以需要清空,并初始化form表单属性
        clearBasicAddForm(){
          this.form = this.$options.data().form;;
          this.form = this.$options.data().form;
          // this.changeSectypeFormItems(null);
        },
        // 打开新增窗口
@@ -1903,9 +1906,12 @@
          //存储当前关联的编码规则相关信息
          this.currentCodeRuleOid = row.oid;
          this.currentRuleLcStatus = row.lcStatus;
          gridCodeBasicSec(1, -1, {"pkCodeRule":row.oid}).then(res => {
          this.sendGridCodeBasicSec({"pkCodeRule":row.oid});
        },
        // 发送加载基础码段的请求
        sendGridCodeBasicSec(condition){
          gridCodeBasicSec(1, -1, condition).then(res => {
            const data = res.data.data;
            // console.log(data);
            if(this.cloneSettingBox){
              this.cloneData = data.records;
              // console.log(tihs.cloneData);
@@ -1920,7 +1926,23 @@
        // 基础码段选中时触发
        selectionBasicChange(list) {
          this.selectionBasicList = list;
          this.$refs.crudBasic.setCurrentRow(this.selectionBasicList[list.length-1]);
          //console.log(this.selectionBasicList);
        },
        // 基础码段被单击表格行时触发
        codeBasicSecRowClick(row){
          this.$refs.crudBasic.toggleSelection();
          this.selectionBasicList = row;
          this.$refs.crudBasic.setCurrentRow(row);
          this.$refs.crudBasic.toggleRowSelection(row); //选中当前行
        },
        basicSearchChange(params, done){
          //this.$refs.crudBasic.tableOption.searchShow = false;
          this.sendGridCodeBasicSec(Object.assign(params,{"pkCodeRule":this.selectionList[this.selectionList.length-1].oid}));
          done();
        },
        basicSearchReset(){
          this.sendGridCodeBasicSec({"pkCodeRule":this.selectionList[this.selectionList.length-1].oid});
        },
        // 上移下移基础码段
        upOrderNum(row){
@@ -1973,7 +1995,7 @@
          this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid});
        },
        /** 编码规则相关方法 */
        // 查询使用范围
        handleRange(){
@@ -2077,7 +2099,7 @@
        codeOtherCloneRuleRowClick (row) {
          this.loadBasic(row);
        },
        // 编码规则当前选中行变化的时候触发
        // 从其他规则克隆码段界面中编码规则当前选中行变化的时候触发
        selectionOtherCloneCodeRuleChange(list) {
          //console.log(list);
          this.selectionOtherCloneCodeRuleList = list;
@@ -2152,7 +2174,6 @@
              });
            });
        },
        // 添加
        rowSave(row, done, loading) {
          add(row).then(() => {
@@ -2232,8 +2253,13 @@
        // 编码规则当前选中行变化的时候触发
        selectionChange(list) {
          this.selectionList = list;
          //console.log("selectionChange====="+list);
          // console.log("selectionChange====="+list);
          this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
          //当前选中行为空的时候就将码段管理表格数据置空
          if(list==''){
            this.basicData = '';
            console.log(this.$refs.crudBasic);
          }
          if(this.selectionList.length > 0){
            this.currentCodeRuleOid = this.selectionList[list.length-1].oid;
            this.currentRuleLcStatus = this.selectionList[list.length-1].lcStatus;
@@ -2264,7 +2290,7 @@
            this.loading = false;
            this.loadBasic(this.data[0])
            this.$nextTick(() => {
              //this.$refs.crud.toggleRowSelection(this.data[0]);
              this.$refs.crud.toggleRowSelection(this.data[0]);
              this.$refs.crud.setCurrentRow(this.data[0]);
            })
            this.selectionList = data.records[0];
@@ -2289,7 +2315,6 @@
            //this.$emit('openSelectreferConfig')
          }
        },
        // 点击输入框的×号,清空输入框中的内容
        clearAttrDataByIcon(condition){
          if(condition === 'attr'){