| | |
| | | }); |
| | | }, |
| | | onSuccess(res) { |
| | | console.log('res',res) |
| | | if (Object.keys(res.data).length === 0) { |
| | | this.$message.success(this.title + "导入成功!"); |
| | | this.dialogVisible = false; |
| | |
| | | const fileName = res.data.filePath.split("/").pop(); |
| | | this.$message.error("请下载错误信息文件进行查看!"); |
| | | downloadErrorFile({ uuid: res.data.fileOid }).then((res2) => { |
| | | console.log('res2',res2) |
| | | this.$utilFunc.downloadFileByBlob(res2.data, fileName); |
| | | }); |
| | | } |
| | |
| | | const result = this.$route.query.id.substring(0, index); |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({ oid: oid, btmname: result, lcStatus: 'Disabled' }).then(res => { |
| | | console.log(res); |
| | | if(res.data.code == 200 ){ |
| | | this.$message.success('停用成功') |
| | | this.onLoad() |
| | |
| | | this.$message.warning("请选择一条数据"); |
| | | } else { |
| | | let hasEditing = this.selectRow.every(item => item.lcstatus == 'Disabled'); |
| | | console.log('hasEditing',hasEditing) |
| | | let showMessage = true; |
| | | this.selectRow.forEach(item => { |
| | | if (this.selectRow.length === 1 && item.lcstatus !== "Disabled" && showMessage) { |
| | |
| | | const result = this.$route.query.id.substring(0, index); |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({ oid: oid, btmname: result, lcStatus: 'Released' }).then(res => { |
| | | console.log(res); |
| | | if(res.data.code == 200 ){ |
| | | this.$message.success('启用成功') |
| | | this.onLoad() |
| | |
| | | // 停用-只能启用、回收 |
| | | const disabledCount = this.selectRow.filter(item => item.lcstatus === 'Disabled').length; |
| | | const releasedCount = this.selectRow.filter(item => item.lcstatus === 'Released').length; |
| | | console.log('hasEditing',disabledCount,releasedCount) |
| | | let showMessage = true; |
| | | this.selectRow.forEach(item => { |
| | | if (this.selectRow.length === 1 && item.lcstatus == "TakeBack" && showMessage) { |
| | |
| | | const result = this.$route.query.id.substring(0, index); |
| | | const oid = this.selectRow.map(obj => obj.oid).join(","); |
| | | changeStatus({ oid: oid, btmname: result, lcStatus: 'TakeBack' }).then(res => { |
| | | console.log(res); |
| | | if(res.data.code == 200 ){ |
| | | this.$message.success('回收成功') |
| | | this.onLoad() |
| | |
| | | }, |
| | | doLayout() { |
| | | this.$nextTick(() => { |
| | | console.log(this.$refs) |
| | | this.$refs.crud.doLayout(); |
| | | }); |
| | | }, |
| | |
| | | list.forEach((item) => { |
| | | this.parameter.ids.push(item.oid); |
| | | }); |
| | | console.log(this.selectRow) |
| | | }, |
| | | //选择 |
| | | handleSelection(list, row) { |
| | |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | ...val, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | this.tableData = res.data.data; |
| | | this.page.total = res.data.total |
| | | }); |
| | |
| | | //增加保存 |
| | | AddSumbit(val) { |
| | | this.addvisible = false; |
| | | console.log(val) |
| | | addSaveCode(val).then(res => { |
| | | console.log(res) |
| | | this.$nextTick(() => { |
| | | this.onLoad() |
| | | }) |
| | |
| | | }, |
| | | EditSumbit(val) { |
| | | this.editvisible = false; |
| | | console.log(val) |
| | | editSaveCode(val).then(res => { |
| | | console.log(res) |
| | | this.$nextTick(() => { |
| | | this.onLoad() |
| | | }) |
| | |
| | | } |
| | | }, |
| | | 'injectOption.classifyInvokeAttr': function(newVal) { |
| | | console.log('newVal',newVal) |
| | | if (newVal === "name") { |
| | | this.injectOption.classifyInvokeAttrName='分类名称' |
| | | } else if (newVal === "id") { |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | formAttr(row, column) { |
| | | console.log(row,column) |
| | | }, |
| | | //新增搜索 |
| | | AddFindHandler(){ |
| | | if(this.SelectValue == 'id'){ |
| | |
| | | }, |
| | | //参照配置子组件 |
| | | echoReferConfig(val){ |
| | | console.log('val--',val) |
| | | this.referObject=val |
| | | this.$set(this.CurrentCell,'referConfig',JSON.stringify(val)) |
| | | |
| | |
| | | this.$message.warning('请选择模板属性') |
| | | } else { |
| | | this.attrVisible = true; |
| | | console.log(this.attrSelectList) |
| | | } |
| | | }, |
| | | //属性分组提交 |
| | | attrHandle() { |
| | | console.log(this.attrSelectList) |
| | | this.attrSelectList.forEach(item=>{ |
| | | item.attributeGroup=this.attrModel |
| | | }) |
| | |
| | | //业务类型选择 |
| | | businessSelect(selection, row) { |
| | | this.busineSelectList = selection; |
| | | console.log(selection) |
| | | }, |
| | | // 从业务类型中选择数据弹窗 |
| | | busineHandle() { |
| | |
| | | selectHandle(selection, row) { |
| | | this.attrOid = row.oid; |
| | | this.attrRow = row; |
| | | console.log(row) |
| | | }, |
| | | //表格选择 |
| | | selectionChange(list) { |
| | |
| | | referConfig:'', |
| | | } |
| | | } |
| | | console.log('--',this.referConfigOption) |
| | | // this.$refs.referConfigFormDialog.onloadAttrData(); |
| | | }else if(column.property == 'classifyInvokeText'){ |
| | | this.injectVisible=true; |
| | | this.injectOption.classifyInvokeAttr=this.CurrentCell.classifyInvokeAttr; |
| | | this.injectOption.classifyInvokeAttrName=this.CurrentCell.classifyInvokeAttrName; |
| | | this.injectOption.classifyInvokeEditFlag=this.CurrentCell.classifyInvokeEditFlag; |
| | | if(this.CurrentCell.classifyInvokeLevel == 'min'){ |
| | | this.injectOption.classifyInvokeLevel='min' |
| | | }else { |
| | | this.injectOption.classifyInvokeLevel='max' |
| | | this.injectOption.classifyNumber=this.CurrentCell.classifyInvokeLevel; |
| | | } |
| | | }else if(column.property == 'componentRule'){ |
| | | if(this.CurrentCell){ |
| | | this.CurrentCell.componentRule=this.componentRuleText; |
| | |
| | | 'conditionMap[oid_notequal]': this.CurrentCell.oid, |
| | | limit:-1 |
| | | }).then(res => { |
| | | console.log(res) |
| | | this.CascadeData = res.data.data; |
| | | }) |
| | | this.CascadeVisible=true; |
| | |
| | | }, |
| | | //验证规则检查 |
| | | rulesExamine() { |
| | | console.log(this.RulesForm.expressionText) |
| | | const regex = new RegExp(this.rulesData.ruleRowBds); |
| | | if(regex.test(this.RulesForm.TestContent)){ |
| | | this.$message.success('校验成功') |
| | |
| | | "层级设置": this.injectOption.classifyInvokeLevel=='max'?this.injectOption.classifyNumber :'min', |
| | | "是否可修改": this.injectOption.classifyInvokeEditFlag |
| | | } |
| | | //单元格编辑赋值一遍 |
| | | // noinspection JSCheckFunctionSignatures |
| | | if(this.CurrentCell){ |
| | | //如果是指定层赋值为数字 |
| | | if(this.injectOption.classifyInvokeLevel!== 'min'){ |
| | | this.CurrentCell.classifyInvokeLevel=this.injectOption.classifyNumber |
| | | }else { |
| | | this.CurrentCell.classifyInvokeLevel='min' |
| | | } |
| | | //其余正常赋值 |
| | | this.CurrentCell.classifyInvokeAttr=this.injectOption.classifyInvokeAttr, |
| | | this.CurrentCell.classifyInvokeAttrName=this.injectOption.classifyInvokeAttrName, |
| | | this.CurrentCell.classifyInvokeEditFlag=this.injectOption.classifyInvokeEditFlag, |
| | | // this.$set(this.CurrentCell, 'classifyInvokeText', data) |
| | | this.CurrentCell.classifyInvokeText = data; |
| | | this.injectHandleReset() |
| | | }else { |
| | | //勾选操作 |
| | | for (const key in this.injectOption) { |
| | | this.attrSelectList[0][key] = this.injectOption[key]; |
| | |
| | | this.$set(this.attrSelectList[0],'classifyInvokeText',data) |
| | | } |
| | | this.injectHandleReset() |
| | | } |
| | | |
| | | if(this.injectOption.classifyInvokeLevel !== 'min'){ |
| | | this.injectOption.classifyInvokeLevel=this.injectOption.classifyNumber; |
| | | }else { |
| | |
| | | |
| | | }, |
| | | watch:{ |
| | | FormList:{ |
| | | handler(newval,oldval){ |
| | | console.log('FormList',newval) |
| | | } |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | | /** 导入 */ |
| | |
| | | ExportExcel(){ |
| | | if(this.nodeClickList){ |
| | | exportClassify({oid:this.nodeClickList.oid}).then(res=>{ |
| | | console.log(res) |
| | | func.downloadFileByBlob(res); |
| | | }) |
| | | }else { |
| | | this.$message.warning('请先选择要导出的主题库分类') |
| | | } |
| | | }, |
| | | //模板管理已发布编辑 |
| | | // checkShowEditBtn() { |
| | | // this.showEditBtn = this.Formlist.some(item => item.lcStatus === 'Released'); |
| | | // }, |
| | | //编码规则失焦 |
| | | CodeFoucus(){ |
| | | this.MasterdialogVisible=true; |
| | |
| | | return item.codeclassifyoid == this.nodeClickList.oid |
| | | } |
| | | }) |
| | | console.log('form',this.Formlist) |
| | | if(this.Formlist.length >= 1){ |
| | | this.crudLCStatus=this.Formlist[this.selectRow].lcStatus; |
| | | this.crudArray.push(this.Formlist[this.selectRow]); |
| | |
| | | }); |
| | | } else { |
| | | this.$set(row, "codeclassifyoid", this.nodeClickList.oid) |
| | | console.log(this.nodeClickList) |
| | | addSave(row).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | }); |
| | | }) |
| | | }, |
| | | //模板管理表格查询,只有一条数据没必要做搜索 |
| | | /*nterFind() { |
| | | if (this.findText == "") { |
| | | gridCodeClassifyTemplate().then(res => { |
| | | this.Formlist = res.data.data |
| | | }) |
| | | } else { |
| | | gridCodeClassifyTemplate().then(res => { |
| | | this.Formlist = res.data.data.filter(item => { |
| | | return item.name.includes(this.findText) |
| | | }) |
| | | }) |
| | | } |
| | | },*/ |
| | | //克隆模板查询 |
| | | CloneEnterFind(){ |
| | | gridCodeClassifyTemplate().then(res => { |
| | |
| | | this.Formlist = res.data.data.filter(item => { |
| | | return item.codeclassifyoid == this.nodeClickList.oid |
| | | }) |
| | | this.crudLCStatus=this.Formlist[this.selectRow].lcStatus; |
| | | this.crudArray.push(this.Formlist[this.selectRow]); |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': res.data.data[this.selectRow].oid,limit:-1}).then(res => { |
| | | this.ProData = res.data.data; |
| | | //分类注入数据格式 |
| | | this.ProData = res.data.data.map((item) => { |
| | | //如果分类注入classifyInvokeAttr为空说明是初始状态 |
| | | if(item.classifyInvokeAttr !== ''){ |
| | | if (!item.hasOwnProperty('classifyInvokeText')) { // 检查classifyInvokeText属性是否存在 |
| | | item = { |
| | | ...item, |
| | | classifyInvokeText: { |
| | | "注入类型": item.classifyInvokeAttr, |
| | | "注入类型名称": item.classifyInvokeAttrName, |
| | | "层级设置": item.classifyInvokeLevel, |
| | | "是否可修改": item.classifyInvokeEditFlag |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | return item; |
| | | }); |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | }) |
| | | } else { |
| | | this.FormLoing = true |