| | |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | <div> |
| | | <div style="height: 380px"> |
| | | <el-descriptions :column="2" border class="margin-top" size="medium"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | |
| | | <i :class="icons.from"></i> |
| | | From端类型 |
| | | </template> |
| | | <span v-for="item in nodeRow.btmItemsFrom" style="margin-left:2px;"> |
| | | <el-tag effect="plain" style="margin-top: 2px;"> |
| | | <div style="height: 60px;overflow-y: auto;display: flex;flex-wrap: wrap"> |
| | | <span v-for="item in nodeRow.btmItemsFrom" style="margin-left:3px;"> |
| | | <el-tag effect="plain" style="margin-top: 3px;"> |
| | | {{ item }} |
| | | </el-tag> |
| | | </span> |
| | | </span> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | |
| | | <i :class="icons.to"></i> |
| | | To端类型 |
| | | </template> |
| | | <span v-for="item in nodeRow.btmItemsTo" style="margin-left:2px;"> |
| | | <el-tag effect="plain" style="margin-top: 2px;"> |
| | | <div style="height: 60px;overflow-y: auto;display: flex;flex-wrap: wrap"> |
| | | <span v-for="item in nodeRow.btmItemsTo" style="margin-left:2px;"> |
| | | <el-tag effect="plain" style="margin-top: 2px;"> |
| | | {{ item }} |
| | | </el-tag> |
| | | </span> |
| | | </el-tag> |
| | | </span> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | |
| | | |
| | | </el-descriptions> |
| | | </div> |
| | | <div style="margin-top: 20px"> |
| | | <div style="margin-top: 30px"> |
| | | <h3>属性池列表</h3> |
| | | <avue-crud |
| | | :data="tableData" |
| | |
| | | |
| | | <div class="centerForm"> |
| | | <el-form-item label="Form端类型:" label-width="110px"> |
| | | <!-- <el-button v-if="!form.btmItemsFrom" plain size="mini" type="success"--> |
| | | <!-- @click="FormItemReferChange('form')">添加--> |
| | | <!-- </el-button>--> |
| | | <!-- <el-input v-if="form.btmItemsFrom" v-model="form.btmItemsFrom"></el-input>--> |
| | | <div style="display: flex; align-items: center"> |
| | | <div style="height: 200px; width: 280px; border: 1px solid #bdbbbb;overflow-y: auto"> |
| | | <!-- 内容 --> |
| | |
| | | highlightCurrentRow: true, |
| | | searchMenuSpan: 8, |
| | | searchLabelWidth: 100, |
| | | calcHeight: 30, |
| | | column: [ |
| | | { |
| | | label: '业务类型名', |
| | |
| | | editBtn: false, |
| | | refreshBtn: false, |
| | | selection: false, |
| | | height: 300, |
| | | height: 200, |
| | | addBtn: false, |
| | | // index:false, |
| | | column: [ |
| | |
| | | { |
| | | label: '说明', |
| | | prop: 'description', |
| | | overHidden: true |
| | | } |
| | | ] |
| | | }, |
| | |
| | | // index:false, |
| | | addBtn: false, |
| | | menu: false, |
| | | calcHeight: -40, |
| | | column: [ |
| | | { |
| | | label: '属性名', |
| | |
| | | { |
| | | label: '说明', |
| | | prop: 'description', |
| | | overHidden: true |
| | | } |
| | | ] |
| | | }, |
| | |
| | | desc: 'el-icon-chat-line-square' |
| | | }, |
| | | bizLastIndex: null, |
| | | attrLastIndex:null |
| | | attrLastIndex: null |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.$message.error('请至少选择一条数据'); |
| | | return; |
| | | } |
| | | deleteLink(this.nodeRow).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('删除成功'); |
| | | this.getTreeList(); |
| | | } |
| | | }) |
| | | ; |
| | | this.$confirm('您确定要删除所选择的数据吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteLink(this.nodeRow).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('删除成功'); |
| | | this.getTreeList(); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 创建按钮 |
| | |
| | | |
| | | // 一致性检查 |
| | | checkClickHandler() { |
| | | this.conCheckVisible = true; |
| | | this.conCheckLoading = true; |
| | | checkLinkType().then(res => { |
| | | if (res.data.code === 200) { |
| | | const data = res.data.data; |
| | | this.conDefaultCheckData = data; // 保留一份原始数据 |
| | | this.conCheckLoading = false; |
| | | if (res && res.data && res.data.data) { |
| | | this.conCheckVisible = true; |
| | | this.conCheckLoading = true; |
| | | if (res.data.code === 200) { |
| | | const data = res.data.data; |
| | | this.conDefaultCheckData = data; // 保留一份原始数据 |
| | | this.conCheckLoading = false; |
| | | |
| | | const outputData = []; |
| | | const outputData = []; |
| | | |
| | | data.forEach(item => { |
| | | Object.entries(item.btmCheckMap).forEach(([id, methodsArray]) => { |
| | | methodsArray.forEach(methods => { |
| | | // 判断前缀 |
| | | const action = methods.startsWith('F_') ? '移除form端业务类型' : '移除to端业务类型'; |
| | | const detail = methods.split('_')[1]; // 获取 _ 后面的内容 |
| | | outputData.push({ |
| | | id: id, |
| | | methods: `${action}:${detail}`, |
| | | status: '未修复' |
| | | data.forEach(item => { |
| | | Object.entries(item.btmCheckMap).forEach(([id, methodsArray]) => { |
| | | methodsArray.forEach(methods => { |
| | | // 判断前缀 |
| | | const action = methods.startsWith('F_') ? '移除form端业务类型' : '移除to端业务类型'; |
| | | const detail = methods.split('_')[1]; // 获取 _ 后面的内容 |
| | | outputData.push({ |
| | | id: id, |
| | | methods: `${action}:${detail}`, |
| | | status: '未修复' |
| | | }); |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | // 处理 dbCheckMap |
| | | Object.entries(item.dbCheckMap).forEach(([id, methods]) => { |
| | | const splitMethods = methods.split('('); |
| | | // 判断第一个符号前面的值 |
| | | if (splitMethods[0].startsWith('_ADD')) { |
| | | outputData.push({ |
| | | id: id, |
| | | methods: '增加列(' + splitMethods[1].slice(0, -1) + ')', // 结束位置减去)的字符 |
| | | status: '未修复' |
| | | }); |
| | | } else if (splitMethods[0].startsWith('_CREATE')) { |
| | | outputData.push({ |
| | | id: id, |
| | | methods: '创建表(' + splitMethods[1].slice(0, -1) + ')', |
| | | status: '未修复' |
| | | }); |
| | | } else if (splitMethods[0].startsWith('_DROP')) { |
| | | outputData.push({ |
| | | id: id, |
| | | methods: '移除列(' + splitMethods[1].slice(0, -1) + ')', |
| | | status: '未修复' |
| | | }); |
| | | } else { |
| | | this.$message.error("不支持的 dbCheckMap 类型: " + methods) |
| | | } |
| | | // 处理 dbCheckMap |
| | | Object.entries(item.dbCheckMap).forEach(([id, methods]) => { |
| | | const splitMethods = methods.split('('); |
| | | // 判断第一个符号前面的值 |
| | | if (splitMethods[0].startsWith('_ADD')) { |
| | | outputData.push({ |
| | | id: id, |
| | | methods: '增加列(' + splitMethods[0].slice(0, -1) + ')', // 结束位置减去)的字符 |
| | | status: '未修复' |
| | | }); |
| | | } else if (splitMethods[0].startsWith('_CREATE')) { |
| | | outputData.push({ |
| | | id: id, |
| | | methods: '创建表(' + splitMethods[0].slice(0, -1) + ')', |
| | | status: '未修复' |
| | | }); |
| | | } else if (splitMethods[0].startsWith('_DROP')) { |
| | | outputData.push({ |
| | | id: id, |
| | | methods: '移除列(' + splitMethods[0].slice(0, -1) + ')', |
| | | status: '未修复' |
| | | }); |
| | | } else { |
| | | this.$message.error("不支持的 dbCheckMap 类型: " + methods) |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | | this.conCheckData = outputData; |
| | | this.conCheckData = outputData; |
| | | } |
| | | } else { |
| | | this.$message.success(res.data.msg); |
| | | } |
| | | }).catch(err => { |
| | | this.$message.error(err); |
| | |
| | | |
| | | // 修复一致性检查 |
| | | repairClickHandler() { |
| | | console.log(this.conDefaultCheckData) |
| | | const params = this.conDefaultCheckData[0]; |
| | | repairTable(params).then(res => { |
| | | if (func.isEmptyObject(res.data.obj[0])) { |
| | | this.$message.success('修复成功'); |
| | | this.conCheckData = []; |
| | | } else { |
| | | this.$message.error('修复失败,请重新尝试!'); |
| | | } |
| | |
| | | this.createViewLoading = false; |
| | | this.$message.success(res.data.obj); |
| | | } |
| | | }).catch(err => { |
| | | this.createViewLoading = false; |
| | | }) |
| | | }, |
| | | |
| | |
| | | row, |
| | | this.$refs.dialogAttrCrud, |
| | | this.attrLastIndex, |
| | | (newIndex) => { this.attrLastIndex = newIndex; }, |
| | | () => { this.selectList = []; } |
| | | (newIndex) => { |
| | | this.attrLastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | } |
| | | ); |
| | | }, |
| | | |
| | |
| | | this.bizFormData = []; |
| | | this.bizToData = []; |
| | | this.dialogBottomData = []; |
| | | console.log(this.form); |
| | | console.log('--', this.nodeRow) |
| | | }, |
| | | |
| | | // 添加属性池 保存 |
| | |
| | | |
| | | //添加属性池 搜索 |
| | | attrHandleSearch(params, done) { |
| | | this.searchAttrParams = { |
| | | "conditionMap[id]": "*" + params.id + "*" |
| | | }; |
| | | if (func.isEmptyObject(params)) { |
| | | this.searchAttrParams = {}; |
| | | } else { |
| | | this.searchAttrParams = { |
| | | "conditionMap[id]": "*" + params.id + "*" |
| | | }; |
| | | } |
| | | this.getAttrDialogDta(); |
| | | done(); |
| | | }, |
| | |
| | | row, |
| | | this.$refs.bizTypeCrud, |
| | | this.bizLastIndex, |
| | | (newIndex) => { this.bizLastIndex = newIndex; }, |
| | | () => { this.selectList = []; } |
| | | (newIndex) => { |
| | | this.bizLastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | } |
| | | ); |
| | | }, |
| | | |
| | |
| | | this.$message.error('form端业务类型和to端类型均不能为空!') |
| | | return; |
| | | } |
| | | this.form.btmItemsFrom = this.bizFormData.map(item => item.name); |
| | | this.form.btmItemsTo = this.bizToData.map(item => item.name); |
| | | this.form.attributes = this.dialogBottomData.map(item => item.id); |
| | | let flag = this.title === 'add' ? true : false; |
| | | addAndEditLink(flag, this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.visible = false; |
| | | this.$message.success(res.data.msg); |
| | | this.resetForm(); |
| | | this.getTreeList(); |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.form.btmItemsFrom = this.bizFormData.map(item => item.name); |
| | | this.form.btmItemsTo = this.bizToData.map(item => item.name); |
| | | this.form.attributes = this.dialogBottomData.map(item => item.id); |
| | | let flag = this.title === 'add' ? true : false; |
| | | addAndEditLink(flag, this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.visible = false; |
| | | this.$message.success(res.data.msg); |
| | | this.resetForm(); |
| | | this.getTreeList(); |
| | | } |
| | | }); |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |