Commit f2816c1f by 史敦盼

修改

1 parent 5787cddc
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Autor: pan * @Autor: pan
* @Date: 2024-03-12 14:55:59 * @Date: 2024-03-12 14:55:59
* @LastEditors: pan * @LastEditors: pan
* @LastEditTime: 2024-04-30 09:52:55 * @LastEditTime: 2024-05-07 15:00:21
--> -->
<template> <template>
<div class="form-box"> <div class="form-box">
...@@ -109,11 +109,11 @@ export default { ...@@ -109,11 +109,11 @@ export default {
changeFormItemData(prop, value) { changeFormItemData(prop, value) {
this.$nextTick(() => { this.$nextTick(() => {
this.$set( this.$set(
this.$refs['addForm'].formData, this.formData,
prop, prop,
value, value,
) )
this.$refs['addForm'].$refs['formRef'].clearValidate(prop) this.$refs['formRef'].clearValidate(prop)
}) })
}, },
createUniqueString() { createUniqueString() {
......
...@@ -30,13 +30,13 @@ export default { ...@@ -30,13 +30,13 @@ export default {
formOptions: [ formOptions: [
{ {
label: "中台服务名称", label: "中台服务名称",
prop: "name", prop: "abilityName",
element: "el-input", element: "el-input",
placeholder: "服务名称", placeholder: "服务名称",
}, },
{ {
label: "统计日期", label: "统计日期",
prop: "buildType", prop: "statTime",
element: "el-date-picker", element: "el-date-picker",
type: 'date', type: 'date',
valueFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd',
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
}, },
{ {
label: "业务活动名称", label: "业务活动名称",
prop: "buildType", prop: "businessActName",
element: "el-select", element: "el-select",
dictType: "build_type", dictType: "build_type",
placeholder: "业务活动名称", placeholder: "业务活动名称",
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
columns: [ columns: [
{ {
label: "中台服务编码", label: "中台服务编码",
prop: "buildType", prop: "abilityCode",
showOverflowTooltip: true, showOverflowTooltip: true,
align: "center", align: "center",
fixed: "left", fixed: "left",
...@@ -101,21 +101,21 @@ export default { ...@@ -101,21 +101,21 @@ export default {
}, },
{ {
label: "中台服务名称", label: "中台服务名称",
prop: "buildType2", prop: "abilityName",
minWidth: 140, minWidth: 140,
showOverflowTooltip: true, showOverflowTooltip: true,
align: "center", align: "center",
}, },
{ {
label: "业务活动名称", label: "业务活动名称",
prop: "buildType2", prop: "businessActName",
minWidth: 120, minWidth: 120,
showOverflowTooltip: true, showOverflowTooltip: true,
align: "center", align: "center",
}, },
{ {
label: "业务活动编码", label: "业务活动编码",
prop: "buildType2", prop: "businessActName",
minWidth: 120, minWidth: 120,
showOverflowTooltip: true, showOverflowTooltip: true,
align: "center", align: "center",
...@@ -175,7 +175,7 @@ export default { ...@@ -175,7 +175,7 @@ export default {
}, },
}, },
], ],
data: [{ buildType2: 11 }], data: [],
}; };
}, },
mounted() { }, mounted() { },
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Autor: pan * @Autor: pan
* @Date: 2024-04-23 11:30:05 * @Date: 2024-04-23 11:30:05
* @LastEditors: pan * @LastEditors: pan
* @LastEditTime: 2024-05-07 08:55:57 * @LastEditTime: 2024-05-07 17:58:40
--> -->
<template> <template>
<div class="dataMapping w-100"> <div class="dataMapping w-100">
...@@ -105,18 +105,28 @@ ...@@ -105,18 +105,28 @@
<el-table-column <el-table-column
align="center" align="center"
prop="archiAssetType" prop="archiAssetType"
:formatter="formatterStatus"
label="状态" label="状态"
> >
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作"> <el-table-column align="center" label="操作">
<template #default="{ row, $index }"> <template #default="{ row, $index }">
<el-button <el-button
v-if="row.archiAssetType!=2"
type="primary" type="primary"
size="mini" size="mini"
plain plain
@click="fnPerfect(row, $index)" @click="fnPerfect(row, $index)"
>完善</el-button >完善</el-button
> >
<el-button
type="danger"
size="mini"
icon="el-icon-delete"
plain
@click="fnDel(row, $index)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -133,10 +143,13 @@ ...@@ -133,10 +143,13 @@
</div> </div>
</div> </div>
<Add <Add
title="添加行" :title="title"
:archi-belong-id="activeName" :archi-belong-id="activeName"
@add="handleAdd" @add="handleAdd"
@perfect="handlePerfect"
:visible.sync="visible" :visible.sync="visible"
:id="assetId"
:add-row-data="addRowData"
/> />
</div> </div>
</template> </template>
...@@ -172,7 +185,11 @@ export default { ...@@ -172,7 +185,11 @@ export default {
collapse: false, collapse: false,
dataSubGraphData: [], dataSubGraphData: [],
treeLoading: false, treeLoading: false,
checkedNodes: [] checkedNodes: [],
title: '',
assetId: '',
addRowData: {},
rowIndex: 0
} }
}, },
components: { MxGraph, Add, SvgIcon }, components: { MxGraph, Add, SvgIcon },
...@@ -218,6 +235,15 @@ export default { ...@@ -218,6 +235,15 @@ export default {
} }
}) })
}, },
handlePerfect(data) {
// this.tableData[this.rowIndex] = data
const repData = {
...this.tableData[this.rowIndex],
archiAssetType: 2
}
this.tableData.splice(this.rowIndex, 1, repData);
this.handleBusGraph('init')
},
handleAdd(data) { handleAdd(data) {
this.addData = [] this.addData = []
const includeAddData = this.tableData.findIndex(v => v.id === data.id) const includeAddData = this.tableData.findIndex(v => v.id === data.id)
...@@ -234,21 +260,39 @@ export default { ...@@ -234,21 +260,39 @@ export default {
}, },
fnPushData(row, index) { fnPushData(row, index) {
this.visible = true this.visible = true
// this.tableData.splice(index + 1, 0, { this.title = '添加行'
// ...row, },
// status: '0', fnDel(row, index) {
// }) if(row.id) {
this.$refs.tree.setChecked(row.id, false)
if(row.checkChildren) {
row.checkChildren.forEach(v => {
this.$refs.tree.setChecked(v.id, false)
})
}
}
this.tableData.splice(index, 1)
// 有子级,对应删除子级
if(row.checkChildren) {
this.tableData = this.tableData.filter(v => v.parentId != row.id)
}
this.handleBusGraph('init')
}, },
fnPerfect(row, index) { fnPerfect(row, index) {
this.$confirm('是否确认完善?', '提示', { this.visible = true
confirmButtonText: '确认', this.title = '完善'
cancelButtonText: '取消', this.assetId = row.id
type: 'warning', this.rowIndex = index
}) this.addRowData = row
.then(() => { // this.$confirm('是否确认完善?', '提示', {
this.$set(row, 'status', '1') // confirmButtonText: '确认',
}) // cancelButtonText: '取消',
.catch(() => {}) // type: 'warning',
// })
// .then(() => {
// this.$set(row, 'status', '1')
// })
// .catch(() => {})
}, },
formatter(row, column, cellValue, index) { formatter(row, column, cellValue, index) {
if (row.parentId === '0') { if (row.parentId === '0') {
...@@ -276,6 +320,15 @@ export default { ...@@ -276,6 +320,15 @@ export default {
return cellValue return cellValue
} }
}, },
formatterStatus(row, column, cellValue, index) {
if(cellValue == '3') {
return '新增'
} else if(cellValue == '2') {
return '完善'
} else {
return '遵从'
}
},
handleTabChange() { handleTabChange() {
if (this.activeName != '0') { if (this.activeName != '0') {
this.fnGetAutomaticGraphing() this.fnGetAutomaticGraphing()
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Autor: pan * @Autor: pan
* @Date: 2024-04-28 11:05:28 * @Date: 2024-04-28 11:05:28
* @LastEditors: pan * @LastEditors: pan
* @LastEditTime: 2024-05-06 20:35:36 * @LastEditTime: 2024-05-07 09:53:27
*/ */
const businessCapabilityGraphMixin = { const businessCapabilityGraphMixin = {
data() { data() {
...@@ -29,6 +29,7 @@ const businessCapabilityGraphMixin = { ...@@ -29,6 +29,7 @@ const businessCapabilityGraphMixin = {
// mxgraph 被暴露在window下,所以可以直接调用 // mxgraph 被暴露在window下,所以可以直接调用
const parent = this.graph.getDefaultParent() const parent = this.graph.getDefaultParent()
this.graph.removeCells(this.graph.getChildVertices(parent)) //清空画布 this.graph.removeCells(this.graph.getChildVertices(parent)) //清空画布
if(!this.mockData.length) return
const model = this.graph.getModel() const model = this.graph.getModel()
// mxGraphHandler.prototype.guidesEnabled = true // mxGraphHandler.prototype.guidesEnabled = true
var style = this.graph.getStylesheet().getDefaultVertexStyle() var style = this.graph.getStylesheet().getDefaultVertexStyle()
...@@ -161,7 +162,7 @@ const businessCapabilityGraphMixin = { ...@@ -161,7 +162,7 @@ const businessCapabilityGraphMixin = {
v.checkChildren ? null : 100, v.checkChildren ? null : 100,
v.checkChildren ? null : 40, v.checkChildren ? null : 40,
`html=1;fontColor=#000000;fillColor=${ `html=1;fontColor=#000000;fillColor=${
v.checkChildren ? '#dcf8e5' : '#f2fcf5' v.checkChildren ? '#dcf8e5' : this.handleColor(v)// '#f2fcf5'
};labelPosition=center;verticalAlign=${ };labelPosition=center;verticalAlign=${
v.checkChildren ? 'top' : 'middle' v.checkChildren ? 'top' : 'middle'
};align=center;strokeColor=#7fc2a0;`, };align=center;strokeColor=#7fc2a0;`,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!