feat: 原route页面添加dag图
This commit is contained in:
parent
fcc36bf29b
commit
d1cf6b2afb
|
|
@ -404,6 +404,12 @@ export default {
|
|||
);
|
||||
},
|
||||
},
|
||||
dag: {
|
||||
name: "dag图",
|
||||
req: async function (data) {
|
||||
return await http.post(`${config.API_URL}/mtm/route/dag/`, data);
|
||||
},
|
||||
},
|
||||
},
|
||||
routemat: {
|
||||
list: {
|
||||
|
|
|
|||
|
|
@ -10,18 +10,21 @@
|
|||
</el-aside>
|
||||
<el-main class="nopadding">
|
||||
<el-container>
|
||||
<el-aside width="200px">
|
||||
<el-aside width="400px">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div style="font-size: 20px; padding: 8px;" v-if="selectedProduct">{{ selectedProduct.name }}
|
||||
<div style="font-size: 20px; padding: 8px;" v-if="selectedProduct">{{ selectedProduct.full_name }}
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<div style="height: 90%; padding: 8px">
|
||||
<el-steps direction="vertical" active="20" id="elSteps">
|
||||
<el-step v-for="item in currentRoute" v-bind:key="item.id" :title="item.process_name" />
|
||||
</el-steps>
|
||||
</div>
|
||||
<scDegra
|
||||
style="margin-top: 50px;"
|
||||
ref="degraDialogs"
|
||||
:nodes="nodes"
|
||||
:edges="edges"
|
||||
:rankdir="'DL'"
|
||||
>
|
||||
</scDegra>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-aside>
|
||||
|
|
@ -31,12 +34,12 @@
|
|||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="table_add"
|
||||
v-auth="'route.create'">新增</el-button>
|
||||
<div style="font-size: 16px">当前选择: {{ selectedProduct.name }}</div>
|
||||
<div style="font-size: 16px">当前选择: {{ selectedProduct.full_name }}</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :data="currentRoute" row-key="id" hidePagination>
|
||||
<el-table-column label="排序" prop="sort" min-width="80"></el-table-column>
|
||||
<el-table-column label="排序" prop="sort" width="80"></el-table-column>
|
||||
<el-table-column label="工序" min-width="120">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.process_cate }} - {{ scope.row.process_name }}</span>
|
||||
|
|
@ -57,9 +60,9 @@
|
|||
<el-table-column label="出材率" prop="out_rate" min-width="80"></el-table-column>
|
||||
<el-table-column label="统计工序" min-width="80">
|
||||
<template #default="scope">
|
||||
<el-icon v-if="scope.row.is_count_utask" color="green">
|
||||
<CircleCheckFilled />
|
||||
</el-icon>
|
||||
<span v-if="scope.row.is_count_utask" style="color:green">
|
||||
是
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||
|
|
@ -155,6 +158,8 @@ export default {
|
|||
dialogTitle: '新增',
|
||||
updateDisable: false,
|
||||
currentRoute: [],
|
||||
nodes: [],
|
||||
edges: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -163,11 +168,13 @@ export default {
|
|||
this.getMaterial()
|
||||
},
|
||||
methods: {
|
||||
getRoute() {
|
||||
this.$API.mtm.route.list({ material: this.selectedProduct.id, page: 0 }).then(res => {
|
||||
this.currentRoute = res
|
||||
getDEGdatas(){
|
||||
let that = this;
|
||||
that.$API.mtm.route.dag.req({product: that.selectedProduct.id}).then(res=>{
|
||||
that.nodes = res.nodes
|
||||
that.edges = res.edges
|
||||
})
|
||||
},
|
||||
},
|
||||
//获取工序列表
|
||||
getProcess() {
|
||||
var res = this.$API.mtm.process.list.req({ page: 0 }).then(res => {
|
||||
|
|
@ -232,6 +239,7 @@ export default {
|
|||
this.$API.mtm.route.list.req({ page: 0, material: materialId }).then(res => {
|
||||
this.currentRoute = res
|
||||
})
|
||||
this.getDEGdatas()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue