| | |
| | | @click="handleDelete"> |
| | | 删 除 |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button type="primary" |
| | | size="small" |
| | | icon="el-icon-search" |
| | | plain |
| | | @click="openAdvancedQuery('codeRule')"> |
| | | 高级查询 |
| | | </el-button> |
| | | <el-button |
| | | size="small" |
| | | icon="icon-kelong" |
| | | plain |
| | | @click="openCodeRuleDialog"> |
| | | 克 隆 |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button |
| | | size="small" |
| | | icon="icon-lianjiekelong" |
| | | style="font-size: 12px;" |
| | | plain |
| | | @click="openOtherCodeRuleDialog"> |
| | | 从其他规则中克隆码段 |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button |
| | | size="small" |
| | | icon="el-icon-s-help" |
| | | plain |
| | | @click="handleRange"> |
| | | 使用范围 |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button |
| | | size="small" |
| | | icon="icon-qingkong" |
| | | plain |
| | | @click="clearAllCodeSec"> |
| | | 清空码值 |
| | | </el-button> |
| | | <el-button size="small" |
| | | icon="el-icon-search" |
| | | plain |
| | | @click="openAdvancedQuery"> |
| | | 高级查询 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | |
| | | <!-- 高级查询对话框 --> |
| | | <advanced-query |
| | | ref="advancedQuery" |
| | | :ref="advancedQueryParam.ref" |
| | | :options="advancedQueryParam.options" |
| | | :visible.sync="advancedQueryParam.advancedQuerySettingBox" |
| | | v-model="value"> |
| | | @echoContion="echoSeniorContionMap"> |
| | | </advanced-query> |
| | | |
| | | <!-- 编码规则相关对话框 --> |
| | | <el-dialog title="编码规则使用范围" |
| | | append-to-body |
| | |
| | | @refresh-change="refreshUseRangeChange"> |
| | | </avue-crud> |
| | | </el-dialog> |
| | | |
| | | <!-- 编码规则,克隆对话框 --> |
| | | <el-dialog title="克隆编码规则" |
| | | append-to-body |
| | |
| | | <el-button @click="cloneSettingBox = false">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 编码规则,从其他规则克隆对话框 --> |
| | | <el-dialog title="克隆编码规则的基础信息" |
| | | append-to-body |
| | |
| | | plain |
| | | @click="deleteBasicCode(scope.row)"> |
| | | 删 除 |
| | | </el-button> |
| | | <el-button type="primary" |
| | | size="small" |
| | | icon="el-icon-search" |
| | | plain |
| | | @click="openAdvancedQuery('codeBasicSec')"> |
| | | 高级查询 |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | addSave, |
| | | refDataGridClassifySec, |
| | | } from "@/api/code/codebasic"; |
| | | import { treeTopCodeClassify, listClassifyLinkAttr } from "@/api/code/codeclassify"; |
| | | import { listClassifyLinkAttr } from "@/api/code/codeclassify"; |
| | | import { gridCodeFixedValue,addSaveCodeFixedValue,deleteCodeFixedValue,editCodeFixedValue,saveOrder } from "@/api/code/codeFixedValue"; |
| | | import { treeCodeClassifyValue,addSaveCodeClassifyValue,editCodeClassifyValue,deleteCodeClassifyValue,saveCodeClassifyValueOrder } from "@/api/code/codeClassifyValue"; |
| | | import { getDictionary } from "@/api/omd/enum"; |
| | |
| | | import treeOption from "@/const/code/classifyTreeOptionDialog"; |
| | | import classisyValueTreeOption from "@/const/code/classisyValueTreeDialog"; |
| | | import parentClassifyParentOption from "@/const/code/parentClassifyParentOptionDialog"; |
| | | import referBtmOption from "@/const/code/referBtmDialog"; |
| | | import fixedValueOption from "@/const/code/fixedValueMgrDialog"; |
| | | import {mapGetters} from "vuex"; |
| | | import func from "@/util/func"; |
| | | import {MasterTable} from "@/api/GetItem"; |
| | | import referBtmTypeCrudDialog from '../../components/code-dialog-page/referBtmTypeCrudDialog.vue'; |
| | | |
| | | export default { |
| | | components: { referBtmTypeCrudDialog }, |
| | | data() { |
| | | return { |
| | | value:"1", |
| | | ruleForm: {}, |
| | | query: {}, |
| | | loading: true, |
| | |
| | | |
| | | // 高级查询对话框相关参数 |
| | | advancedQueryParam: { |
| | | ref: 'advancedQuery', |
| | | advancedQuerySettingBox: false, |
| | | searchForm: { |
| | | name: 'advanced', |
| | | }, |
| | | options: { |
| | | labelWidth: '110px', |
| | | // 查询字段 |
| | | searchfeildName: [ |
| | | { |
| | | label: '编号', |
| | | value: 'id', |
| | | }, |
| | | { |
| | | label: '名称', |
| | | value: 'name', |
| | | }, |
| | | { |
| | | label: '状态', |
| | | value: 'status', |
| | | }, |
| | | ], |
| | | // 查询条件 等于、包含、不等于、介于…… |
| | | searchCondition: [ |
| | | { |
| | | label: '等于', |
| | | value: '=', |
| | | }, |
| | | { |
| | | label: '包含', |
| | | value: 'like', |
| | | }, |
| | | { |
| | | label: '大于等于', |
| | | value: '>=', |
| | | }, |
| | | { |
| | | label: '小于等于', |
| | | value: '<=', |
| | | }, |
| | | { |
| | | label: '不等于', |
| | | value: '!=', |
| | | }, |
| | | { |
| | | label: '介于', |
| | | value: 'between', |
| | | }, |
| | | ], |
| | | column: [ |
| | | { |
| | | type: 'text', |
| | | |
| | | |
| | | }, |
| | | { |
| | | |
| | | }, |
| | | ], |
| | | }, |
| | | options: [], |
| | | //conditionMapParams: {}, |
| | | }, |
| | | |
| | | |
| | | }; |
| | | }, |
| | |
| | | }; |
| | | }, |
| | | }, |
| | | created() { |
| | | MasterTable({ |
| | | codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | | functionId: 5, |
| | | }).then(res=>{ |
| | | console.log(res.data.tableDefineVO.seniorQueryColumns); |
| | | }) |
| | | watch:{ |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | /** 高级查询对话框组件,组件返回的值是condtionMap[field]形式的查询条件,保留了和之前一样的方式 */ |
| | | echoSeniorContionMap(conditionMaps){ |
| | | // console.log(conditionMaps); |
| | | this.query = conditionMaps; |
| | | this.onLoad(this.page); |
| | | }, |
| | | |
| | | /* 公式编辑框内容改变,子组件编辑完公式之后内容回显时调用 */ |
| | | updateFormulaContent(content){ |
| | |
| | | |
| | | /** 编码规则相关方法 */ |
| | | // 打开高级查询窗口 |
| | | openAdvancedQuery(){ |
| | | //this.$refs.advancedQuery.visible = true; |
| | | //this.advancedQueryParam.timer = new Date().getTime() |
| | | this.advancedQueryParam.advancedQuerySettingBox = !this.advancedQueryParam.advancedQuerySettingBox; |
| | | openAdvancedQuery(condition){ |
| | | // MasterTable({ |
| | | // codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | | // functionId: 5, |
| | | // }).then(res=>{ |
| | | // console.log(res.data.tableDefineVO.seniorQueryColumns); |
| | | // }) |
| | | if(condition=='codeRule'){ |
| | | this.advancedQueryParam.options = [ |
| | | { |
| | | data: [], |
| | | title: '编号', |
| | | fieldType: 'text', |
| | | queryField: 'id', |
| | | },{ |
| | | data: [], |
| | | title: '名称', |
| | | fieldType: 'text', |
| | | queryField: 'name', |
| | | },{ |
| | | data: [], |
| | | title: '描述', |
| | | fieldType: 'text', |
| | | queryField: 'description', |
| | | },{ |
| | | data: [ |
| | | // { |
| | | // key: '编辑中', |
| | | // value: 'Editing', |
| | | // }, |
| | | // { |
| | | // key: '已发布', |
| | | // value: 'Released', |
| | | // }, |
| | | // { |
| | | // key: '停用', |
| | | // value: 'Disabled', |
| | | // }, |
| | | ], |
| | | title: '状态', |
| | | fieldType: 'combox', |
| | | queryField: 'lcStatus', |
| | | comboxKey: 'Eummaterialtype', |
| | | } |
| | | ] |
| | | }else { |
| | | this.advancedQueryParam.options = [ |
| | | { |
| | | data: [], |
| | | title: '码段编号', |
| | | fieldType: 'text', |
| | | queryField: 'id', |
| | | },{ |
| | | data: [], |
| | | title: '码段名称', |
| | | fieldType: 'text', |
| | | queryField: 'name', |
| | | },{ |
| | | data: [], |
| | | title: '描述', |
| | | fieldType: 'text', |
| | | queryField: 'description', |
| | | },{ |
| | | data: [], |
| | | title: '码段类型', |
| | | fieldType: 'combox', |
| | | queryField: 'secType', |
| | | comboxKey: 'codeSecType', |
| | | } |
| | | ] |
| | | } |
| | | this.advancedQueryParam.advancedQuerySettingBox = true; |
| | | }, |
| | | // 查询使用范围 |
| | | handleRange(){ |
| | |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | // 多个conditionMap这样传参,快速查询默认采用模糊查询 |
| | | if(params){ |
| | | Object.keys(params).forEach(key=>{ |
| | | this.query['conditionMap['+key+'_like]'] = params[key]; |
| | | }); |
| | | } |
| | | console.log(this.query); |
| | | this.onLoad(this.page); |
| | | done(); |
| | | }, |
| | | // 编码规则当前选中行变化的时候触发 |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]); |
| | | //当前选中行为空的时候就将码段管理表格数据置空 |
| | | //当前选中行为空的时候就将码段管理表格数据置空,并禁用相关功能 |
| | | if(list == ''){ |
| | | this.basicData = []; |
| | | this.hideBasicTable(false); |
| | |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | onLoad(page,params={}) { |
| | | this.loading = true; |
| | | gridCodeRule(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | gridCodeRule( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | this.query |
| | | ).then(res => { |
| | | //console.log(res.data); |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | // 查询的值为空时,要将码段管理相关的内容禁用 |
| | | if(data.records.length <= 0) { |
| | | this.hideBasicTable(false); |
| | | this.selectionList = []; |
| | | this.basicData = []; |
| | | return; |
| | | } |
| | | this.loadBasic(this.data[0]) |
| | | this.$nextTick(() => { |
| | | this.$refs.crud.toggleRowSelection(this.data[0]); |