| | |
| | | ref="crudBasic" |
| | | :table-loading="loadingBasic" |
| | | :data="basicData" |
| | | @row-click="codeBasicSecRowClick" |
| | | @search-change="basicSearchChange" |
| | | @search-reset="basicSearchReset" |
| | | :permission="permissionList" |
| | | @selection-change="selectionBasicChange" |
| | | @refresh-change="refreshChangeBasicSec"> |
| | |
| | | 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> |
| | |
| | | }, |
| | | classisyValueTreeOption: classisyValueTreeOption, //分类码段树相关配置项 |
| | | classifyValueTreeData: [], |
| | | currentSelectTreeData: '', //当前选中的分类码值树节点 |
| | | //currentSelectClsValueTreeData: '', //当前选中的分类码值树节点 |
| | | |
| | | /* 为属性选取值窗口显示打开控制变量 */ |
| | | isShowSelectAttrOption: false, |
| | |
| | | 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; |
| | | //清空当前选中的行 |
| | |
| | | /** 基础码段相关方法 */ |
| | | //防止打开过编辑窗口之后表单中存在值,所以需要清空,并初始化form表单属性 |
| | | clearBasicAddForm(){ |
| | | this.form = this.$options.data().form;; |
| | | this.form = this.$options.data().form; |
| | | // this.changeSectypeFormItems(null); |
| | | }, |
| | | // 打开新增窗口 |
| | |
| | | //存储当前关联的编码规则相关信息 |
| | | 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); |
| | |
| | | // 基础码段选中时触发 |
| | | 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){ |
| | |
| | | this.loadBasic({"oid":this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid}); |
| | | }, |
| | | |
| | | |
| | | |
| | | /** 编码规则相关方法 */ |
| | | // 查询使用范围 |
| | | handleRange(){ |
| | |
| | | codeOtherCloneRuleRowClick (row) { |
| | | this.loadBasic(row); |
| | | }, |
| | | // 编码规则当前选中行变化的时候触发 |
| | | // 从其他规则克隆码段界面中编码规则当前选中行变化的时候触发 |
| | | selectionOtherCloneCodeRuleChange(list) { |
| | | //console.log(list); |
| | | this.selectionOtherCloneCodeRuleList = list; |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 添加 |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | |
| | | // 编码规则当前选中行变化的时候触发 |
| | | 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; |
| | |
| | | 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]; |
| | |
| | | //this.$emit('openSelectreferConfig') |
| | | } |
| | | }, |
| | | |
| | | // 点击输入框的×号,清空输入框中的内容 |
| | | clearAttrDataByIcon(condition){ |
| | | if(condition === 'attr'){ |