| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | crudOption:{...optionRule}, |
| | | ruleForm: {}, |
| | | query: {}, |
| | | loading: true, |
| | |
| | | } else { |
| | | this.sendGridCodeBasicSec(conditionMaps, true); |
| | | } |
| | | //console.log(conditionMaps); |
| | | } |
| | | }, |
| | | /* 公式编辑框内容改变,子组件编辑完公式之后内容回显时调用 */ |
| | |
| | | }, |
| | | /* 引用码段参照配置,子组件填完参照配置之后内容回显时调用 */ |
| | | 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) { |
| | |
| | | /** 父分类选择对话框,第二层嵌套对话框,及其相关方法 */ |
| | | /** 保存当前父分类码段的选中行,并进行回显 */ |
| | | saveSelectedParentClassify() { |
| | | //console.log(this.parentClsfyParams.parentClassifySelectionList.length); |
| | | if (this.parentClsfyParams.parentClassifySelectionList.length != 1) { |
| | | this.$message.warning("请选择一条数据!"); |
| | | return false; |
| | |
| | | page.pageSize, |
| | | conditionMaps |
| | | ).then((res) => { |
| | | //console.log(res.data); |
| | | const data = res.data.data; |
| | | parentClsParam.parentClassifyDataPage.total = data.total; |
| | | parentClsParam.parentClassifyData = data.records; |
| | |
| | | /** 加载分类连接属性表格数据 */ |
| | | loadlistClassifyLinkAttr() { |
| | | let attrParam = this.selectAttrParams; |
| | | //console.log(this.currentSelectTreeData); |
| | | this.selectAttrParams.selectAttrOptionLoading = true; |
| | | let conditionMaps = {}; |
| | | if (attrParam.selectAttrQeury) { |
| | |
| | | this.$nextTick(() => { |
| | | this.$refs[attrParam.ref].doLayout(); |
| | | }); |
| | | //console.log(data.data); |
| | | this.selectAttrParams.selectAttrData = data.data; |
| | | this.selectAttrParams.selectAttrOptionLoading = false; |
| | | // 将搜索框内容置空 |
| | |
| | | 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; |
| | |
| | | if (!this.tipsCodeSecValueMessage(this.codeFixdForm.id)) { |
| | | return; |
| | | } |
| | | this.codeFixdForm.codeFixedSecOid = |
| | | this.codefixedsecOrCodeclassifysec.oid; |
| | | this.codeFixdForm.codeFixedSecOid = this.codefixedsecOrCodeclassifysec.oid; |
| | | addSaveCodeFixedValue(this.codeFixdForm).then( |
| | | () => { |
| | | this.loadFixedValueTableData({ |
| | |
| | | } |
| | | this.codeClassifyForm.codeClassifySecOid = |
| | | this.codefixedsecOrCodeclassifysec.oid; |
| | | // console.log(this.codeClassifyForm); |
| | | addSaveCodeClassifyValue(this.codeClassifyForm).then( |
| | | () => { |
| | | this.loadClassifyValueData({ |
| | |
| | | clearFixedOrClassifyForm(condition) { |
| | | //点击取消时清空表单与当前选中的码值,并禁用按钮 |
| | | this.selectedFixedOrCodeclassifyValue = ""; |
| | | //console.log(condition); |
| | | if (condition === "close") { |
| | | this.codeFixdForm = this.$options.data().codeFixdForm; |
| | | this.codeClassifyForm = this.$options.data().codeClassifyForm; |
| | |
| | | }, |
| | | /** 添加*/ |
| | | rowSave(row, done, loading) { |
| | | console.log(row); |
| | | add(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | // 编码规则快速查询 |
| | | // 编码规则快速查询searchChange |
| | | searchChange(params, done) { |
| | | this.page.currentPage = 1; |
| | | // 多个conditionMap这样传参,快速查询默认采用模糊查询 |
| | |
| | | } |
| | | this.query = requestData; |
| | | this.onLoad(this.page, this.query); |
| | | // console.log( this.findObject(this.optionRule.column,'id')) |
| | | // console.log(this.crudOption.column[0]) |
| | | // this.crudOption.column && this.crudOption.column.length > 0 |
| | | // ? (this.crudOption.column[0].value = '') |
| | | // : null; |
| | | done(); |
| | | }, |
| | | /** 编码规则当前选中行变化的时候触发*/ |
| | |
| | | }, |
| | | /** 码段类型改变时,增加对应的form表单中的属性*/ |
| | | changeSectypeFormItems(row) { |
| | | //console.log(row); |
| | | if ( |
| | | func.isEmpty(this.enumParam.secTypeList) || |
| | | this.enumParam.secTypeList.length == 0 |
| | |
| | | componentCodeFlag: this.form.componentCodeFlag, //是否参与编码 |
| | | pkCodeRule: this.form.pkCodeRule, //所属编码规则 |
| | | }; |
| | | //console.log(this.form); |
| | | } |
| | | if (this.form.secType === "codefixedsec") { |
| | | //固定码段 |
| | |
| | | ? row.customCodeSerialClass |
| | | : "", //自定义流水算法 |
| | | }); |
| | | console.log(this.form); |
| | | console.log(this.enumParam.codeFillType); |
| | | this.loadCodeFillType(); |
| | | this.loadCodeFillSeparator(); |
| | | } else if (this.form.secType === "codelevelsec") { |
| | |
| | | : "", //日期格式 |
| | | }); |
| | | } else if (this.form.secType === "codeclassifysec") { |
| | | //console.log(this.form); |
| | | //分类码段 |
| | | this.form = Object.assign({}, this.form, { |
| | | codeSecLengthType: |
| | |
| | | this.loadCodeFillType(); |
| | | this.loadCodeFillSeparator(); |
| | | } |
| | | // console.log(this.form); |
| | | }, |
| | | /** 第一次请求的枚举数据放缓存*/ |
| | | getLocalStorageEnum(enumKey) { |
| | |
| | | }, |
| | | // 最大流水号 |
| | | maxSerialNum() { |
| | | console.log(this.selectionList); |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("请选择一条编码规则!"); |
| | | return; |