fix:成品库、工艺路线、工艺路线详情、工艺路线编辑时展示流程图
This commit is contained in:
parent
d854913b09
commit
02d5b0f840
|
|
@ -142,23 +142,26 @@
|
||||||
:mtype="wmtype"
|
:mtype="wmtype"
|
||||||
:apiObj="apiObjPrint"
|
:apiObj="apiObjPrint"
|
||||||
></print-dialog>
|
></print-dialog>
|
||||||
<degraDialog
|
<el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
||||||
v-if="limitedWatch"
|
<degrad3
|
||||||
ref="degraDialogs"
|
v-if="limitedWatch"
|
||||||
:code="showBatch"
|
ref="degraDialogs"
|
||||||
@closeDialog="limitedWatch = false"
|
:nodes="nodes"
|
||||||
>
|
:edges="edges"
|
||||||
</degraDialog>
|
:rankdir="'LR'"
|
||||||
|
>
|
||||||
|
</degrad3>
|
||||||
|
</el-drawer>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import degraDialog from "./../template/degraD3.vue";
|
import degrad3 from "./../template/degraD3.vue";
|
||||||
import printDialog from "./../template/printmaterial.vue";
|
import printDialog from "./../template/printmaterial.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "halfgood",
|
name: "halfgood",
|
||||||
components: {
|
components: {
|
||||||
printDialog,
|
printDialog,
|
||||||
degraDialog
|
degrad3
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -169,7 +172,8 @@ export default {
|
||||||
warehouseOptions: [],
|
warehouseOptions: [],
|
||||||
apiObjWm: this.$API.wpm.wmaterial.list,
|
apiObjWm: this.$API.wpm.wmaterial.list,
|
||||||
paramsWm: { count__gte: 1, material__type: 10 },
|
paramsWm: { count__gte: 1, material__type: 10 },
|
||||||
// processOptions: [],
|
nodes:[],
|
||||||
|
edges:[],
|
||||||
queryWm: {},
|
queryWm: {},
|
||||||
wmtype:0,
|
wmtype:0,
|
||||||
print_m:false,
|
print_m:false,
|
||||||
|
|
@ -206,11 +210,14 @@ export default {
|
||||||
},
|
},
|
||||||
handleWatch(row) {
|
handleWatch(row) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.showBatch = row.batch;
|
that.$API.wpm.batchlog.dag.req({batch:row.batch}).then((res) => {
|
||||||
that.limitedWatch = true;
|
that.nodes = res.nodes;
|
||||||
that.$nextTick(() => {
|
that.edges = res.edges;
|
||||||
that.$refs.degraDialogs.open('batch');
|
that.limitedWatch = true;
|
||||||
});
|
that.$nextTick(() => {
|
||||||
|
that.$refs.degraDialogs.open();
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//打印物料标签
|
//打印物料标签
|
||||||
printMaterial(row){
|
printMaterial(row){
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<el-container v-loading="loading">
|
<el-container v-loading="loading">
|
||||||
<el-main>
|
<el-header style="height: 80px;display: block;padding:0">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-descriptions :column="3" title="基本信息">
|
<el-descriptions :column="3" title="基本信息">
|
||||||
<el-descriptions-item label="工艺名称:">{{
|
<el-descriptions-item label="工艺名称:">{{
|
||||||
|
|
@ -19,43 +19,72 @@
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 8px" shadow="hover">
|
</el-header>
|
||||||
<scTable
|
<el-main id="degInnerMain">
|
||||||
ref="tables"
|
<el-container>
|
||||||
:data="tableData"
|
<el-side style="width: 50%;overflow: scroll;">
|
||||||
row-key="id"
|
<div style="font-weight: 600;color: #303133;font-size: 16px;padding: 10px 0;position: fixed;">工艺路线流程图</div>
|
||||||
hidePagination
|
<el-tabs
|
||||||
hideDo
|
v-if="tabsTitle.length>1"
|
||||||
stripe
|
v-model="activeName"
|
||||||
>
|
:tab-position="'left'"
|
||||||
<el-table-column label="排序" prop="sort" width="50">
|
style="flex-direction: row;"
|
||||||
</el-table-column>
|
@tab-click="tabshandleClick"
|
||||||
<el-table-column label="工序" prop="process_name">
|
>
|
||||||
</el-table-column>
|
<el-tab-pane :label="item" v-for="item in tabsTitle" :key="item"></el-tab-pane>
|
||||||
<el-table-column label="输入" prop="material_in_name">
|
</el-tabs>
|
||||||
</el-table-column>
|
<degrad3
|
||||||
<el-table-column label="输出" prop="material_out_name">
|
style="margin-top: 50px;"
|
||||||
</el-table-column>
|
v-if="limitedWatch"
|
||||||
<el-table-column label="出材率" prop="out_rate">
|
ref="degraDialogs"
|
||||||
</el-table-column>
|
:nodes="nodes"
|
||||||
<el-table-column label="切分融合数量" prop="div_number">
|
:edges="edges"
|
||||||
</el-table-column>
|
:rankdir="'DL'"
|
||||||
<el-table-column label="工时" prop="hour_work">
|
@closeDialog="limitedWatch = false"
|
||||||
</el-table-column>
|
>
|
||||||
<el-table-column label="批次校验" v-if="project_code!=='bxerp'">
|
</degrad3>
|
||||||
<template #default="scope">
|
</el-side>
|
||||||
<el-tag v-if="scope.row.batch_bind" type="success">是</el-tag>
|
<el-main>
|
||||||
</template>
|
<scTable
|
||||||
</el-table-column>
|
ref="tables"
|
||||||
</scTable>
|
:data="tableData"
|
||||||
</el-card>
|
row-key="id"
|
||||||
|
hidePagination
|
||||||
|
hideDo
|
||||||
|
stripe
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column label="排序" prop="sort" width="50">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="工序" prop="process_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="输入" prop="material_in_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="输出" prop="material_out_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="出材率" prop="out_rate">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="切分融合数量" prop="div_number">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="工时" prop="hour_work">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="批次校验" v-if="project_code!=='bxerp'">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.batch_bind" type="success">是</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import degrad3 from "./../template/degraD3.vue";
|
||||||
export default {
|
export default {
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
|
components: { degrad3 },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|
@ -68,8 +97,14 @@ export default {
|
||||||
50: "已完成",
|
50: "已完成",
|
||||||
},
|
},
|
||||||
form: {},
|
form: {},
|
||||||
|
nodes:[],
|
||||||
|
edges:[],
|
||||||
|
tabsTitle:['总图'],
|
||||||
|
tabsData:{},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
project_code: "",
|
project_code: "",
|
||||||
|
activeName:"总图",
|
||||||
|
limitedWatch:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -87,6 +122,38 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
Object.assign(that.form, data);
|
Object.assign(that.form, data);
|
||||||
that.getRoute(that.form.material);
|
that.getRoute(that.form.material);
|
||||||
|
that.getDEGdatas(data.id);
|
||||||
|
this.getTabsList(data.id);
|
||||||
|
},
|
||||||
|
getDEGdatas(id){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.routepack.dag.req(id).then((res) => {
|
||||||
|
that.nodes = res.nodes;
|
||||||
|
that.edges = res.edges;
|
||||||
|
that.tabsData['总图'] = res;
|
||||||
|
if(!that.limitedWatch){
|
||||||
|
that.limitedWatch = true;
|
||||||
|
that.$nextTick(() => {
|
||||||
|
that.$refs.degraDialogs.open();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTabsList(id){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.routepack.dags.req(id).then((res) => {
|
||||||
|
let arr = [];
|
||||||
|
for(let key in res){
|
||||||
|
arr.push(key);
|
||||||
|
}
|
||||||
|
if(arr.length>1){
|
||||||
|
for(let key in res){
|
||||||
|
that.tabsTitle.push(res[key].name);
|
||||||
|
that.tabsData[res[key].name]=res[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(that.tabsData);
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//文件列表加载
|
//文件列表加载
|
||||||
getRoute(id) {
|
getRoute(id) {
|
||||||
|
|
@ -96,6 +163,14 @@ export default {
|
||||||
this.tableData = res;
|
this.tableData = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
tabshandleClick(val){
|
||||||
|
let that = this;
|
||||||
|
let label = val.props.label;
|
||||||
|
that.$nextTick(() => {
|
||||||
|
that.nodes = that.tabsData[label].nodes;
|
||||||
|
that.edges = that.tabsData[label].edges;
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
|
v-if="scope.row.state != 10"
|
||||||
@click="table_show(scope.row, scope.$index)"
|
@click="table_show(scope.row, scope.$index)"
|
||||||
>查看
|
>查看
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -118,9 +119,9 @@
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
<el-link :underline="false" type="primary"
|
<!-- <el-link :underline="false" type="primary"
|
||||||
@click="handleWatch(scope.row)"
|
@click="handleWatch(scope.row)"
|
||||||
>流程图</el-link>
|
>流程图</el-link> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
@ -138,24 +139,27 @@
|
||||||
ref="showDialog"
|
ref="showDialog"
|
||||||
@closed="dialog.show = false"
|
@closed="dialog.show = false"
|
||||||
></show-dialog>
|
></show-dialog>
|
||||||
<degraDialog
|
<!-- <el-drawer v-model="limitedWatch" title="工艺路线流程图" size="80%" @closeDialog="limitedWatch = false">
|
||||||
v-if="limitedWatch"
|
<degrad3
|
||||||
ref="degraDialogs"
|
v-if="limitedWatch"
|
||||||
:code="showrotepack"
|
ref="degraDialogs"
|
||||||
@closeDialog="limitedWatch = false"
|
:nodes="nodes"
|
||||||
>
|
:edges="edges"
|
||||||
</degraDialog>
|
:rankdir="'DL'"
|
||||||
|
>
|
||||||
|
</degrad3>
|
||||||
|
</el-drawer> -->
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./routepack_form.vue";
|
import saveDialog from "./routepack_form.vue";
|
||||||
import showDialog from "./route_show.vue";
|
import showDialog from "./route_show.vue";
|
||||||
import degraDialog from "./../template/degraD3.vue";
|
import degrad3 from "./../template/degraD3.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "route",
|
name: "route",
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
showDialog,
|
showDialog,
|
||||||
degraDialog
|
degrad3
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -179,6 +183,8 @@ export default {
|
||||||
search: "",
|
search: "",
|
||||||
keyword: null,
|
keyword: null,
|
||||||
},
|
},
|
||||||
|
nodes:[],
|
||||||
|
edges:[],
|
||||||
timeRange: [],
|
timeRange: [],
|
||||||
filteType: "all",
|
filteType: "all",
|
||||||
stateOptions: [
|
stateOptions: [
|
||||||
|
|
@ -200,7 +206,6 @@ export default {
|
||||||
20: "审批中",
|
20: "审批中",
|
||||||
30: "已确认",
|
30: "已确认",
|
||||||
},
|
},
|
||||||
showrotepack: "",
|
|
||||||
filterType: "all",
|
filterType: "all",
|
||||||
isSaveing:false,
|
isSaveing:false,
|
||||||
limitedWatch:false,
|
limitedWatch:false,
|
||||||
|
|
@ -255,14 +260,17 @@ export default {
|
||||||
return err;
|
return err;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleWatch(row) {
|
// handleWatch(row) {
|
||||||
let that = this;
|
// let that = this;
|
||||||
that.showrotepack = row.id;
|
// that.$API.mtm.routepack.dag.req(row.id).then((res) => {
|
||||||
that.limitedWatch = true;
|
// that.nodes = res.nodes;
|
||||||
that.$nextTick(() => {
|
// that.edges = res.edges;
|
||||||
that.$refs.degraDialogs.open('routepack');
|
// that.limitedWatch = true;
|
||||||
});
|
// that.$nextTick(() => {
|
||||||
},
|
// that.$refs.degraDialogs.open();
|
||||||
|
// });
|
||||||
|
// })
|
||||||
|
// },
|
||||||
table_state(row){
|
table_state(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.mtm.routepack.togglestate.req(row.id).then((res) => {
|
that.$API.mtm.routepack.togglestate.req(row.id).then((res) => {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
v-for="(item, index) of stepes"
|
v-for="(item, index) of stepes"
|
||||||
:key="index"
|
:key="index"
|
||||||
:title="item"
|
:title="item"
|
||||||
style="50%"
|
|
||||||
@click="handleStep(index)"
|
@click="handleStep(index)"
|
||||||
>
|
>
|
||||||
</el-step>
|
</el-step>
|
||||||
|
|
@ -94,87 +93,96 @@
|
||||||
<!--工序!-->
|
<!--工序!-->
|
||||||
<el-main class="nopadding" v-if="active === 1">
|
<el-main class="nopadding" v-if="active === 1">
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-side style="width: 50%;overflow: scroll;">
|
||||||
<div class="left-panel" style="margin: 10px">
|
<div style="font-weight: 600;color: #303133;font-size: 16px;padding: 10px 0;position: fixed;width: 30px;">工艺路线流程图</div>
|
||||||
<el-button
|
<degrad3
|
||||||
type="primary"
|
style="margin-top: 50px;"
|
||||||
icon="el-icon-plus"
|
v-if="limitedWatch"
|
||||||
@click="table_add"
|
ref="degraDialogs"
|
||||||
></el-button>
|
:nodes="nodes"
|
||||||
</div>
|
:edges="edges"
|
||||||
</el-header>
|
:rankdir="'DL'"
|
||||||
<el-main>
|
|
||||||
<scTable
|
|
||||||
ref="tables"
|
|
||||||
:apiObj="apiObj"
|
|
||||||
:query="query"
|
|
||||||
:params="query"
|
|
||||||
row-key="id"
|
|
||||||
stripe
|
|
||||||
>
|
|
||||||
<el-table-column label="排序" prop="sort" width="50">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="工序" prop="process_name">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="输入" prop="material_in_name">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="输出" prop="material_out_name">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="出材率" prop="out_rate">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="工时" prop="hour_work">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="切分数量" prop="div_number" v-if="project_code=='bxerp'">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="批次校验" prop="batch_bind" v-else>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="操作"
|
|
||||||
fixed="right"
|
|
||||||
align="center"
|
|
||||||
width="200"
|
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
</degrad3>
|
||||||
|
</el-side>
|
||||||
|
<el-main style="width: 50%;overflow: scroll;">
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel" style="margin: 10px">
|
||||||
<el-button
|
<el-button
|
||||||
text
|
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
icon="el-icon-plus"
|
||||||
@click="table_edit(scope.row)"
|
@click="table_add"
|
||||||
>编辑</el-button
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main>
|
||||||
|
<scTable
|
||||||
|
ref="tables"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
:params="query"
|
||||||
|
row-key="id"
|
||||||
|
hidePagination
|
||||||
|
hideDo
|
||||||
|
stripe
|
||||||
|
>
|
||||||
|
<el-table-column label="排序" prop="sort" width="50">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="工序" prop="process_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="输入" prop="material_in_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="输出" prop="material_out_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="出材率" prop="out_rate">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="工时" prop="hour_work">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="切分数量" prop="div_number" v-if="project_code=='bxerp'">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="批次校验" prop="batch_bind" v-else>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
align="center"
|
||||||
|
width="200"
|
||||||
>
|
>
|
||||||
<el-popconfirm
|
<template #default="scope">
|
||||||
title="确定删除该工序吗?"
|
<el-button
|
||||||
@confirm="delWorker(scope.row)"
|
text
|
||||||
>
|
type="primary"
|
||||||
<template #reference>
|
size="small"
|
||||||
<el-button text type="danger" size="small"
|
@click="table_edit(scope.row)"
|
||||||
>删除</el-button
|
>编辑</el-button>
|
||||||
|
<el-popconfirm
|
||||||
|
title="确定删除该工序吗?"
|
||||||
|
@confirm="delWorker(scope.row)"
|
||||||
>
|
>
|
||||||
|
<template #reference>
|
||||||
|
<el-button text type="danger" size="small">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-table-column>
|
||||||
</template>
|
</scTable>
|
||||||
</el-table-column>
|
</el-main>
|
||||||
</scTable>
|
</el-container>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer v-if="active === 1" style="text-align: center">
|
<el-footer v-if="active === 1" style="text-align: center">
|
||||||
<el-button @click="handleLastStep" style="margin-right: 4px"
|
<el-button @click="handleLastStep" style="margin-right: 4px">上一步</el-button>
|
||||||
>上一步</el-button
|
<el-button
|
||||||
>
|
v-for="item in initForm.transitions"
|
||||||
<el-button
|
:key="item.id"
|
||||||
v-for="item in initForm.transitions"
|
type="primary"
|
||||||
:key="item.id"
|
:loading="isSaveing"
|
||||||
type="primary"
|
:disabled="isSaveing"
|
||||||
:loading="isSaveing"
|
@click="submitTicketCreate(item.id)"
|
||||||
:disabled="isSaveing"
|
style="margin-right: 4px"
|
||||||
@click="submitTicketCreate(item.id)"
|
>{{ item.name }}</el-button>
|
||||||
style="margin-right: 4px"
|
<el-button @click="$emit('closed')" type="warning">退出</el-button>
|
||||||
>{{ item.name }}</el-button
|
|
||||||
>
|
|
||||||
<el-button @click="$emit('closed')" type="warning"
|
|
||||||
>退出</el-button
|
|
||||||
>
|
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-container>
|
</el-container>
|
||||||
<save-dialog
|
<save-dialog
|
||||||
|
|
@ -188,10 +196,10 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./route_form.vue";
|
import saveDialog from "./route_form.vue";
|
||||||
|
import degrad3 from "./../template/degraD3.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "routepack_form",
|
name: "routepack_form",
|
||||||
components: { saveDialog },
|
components: { saveDialog,degrad3 },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
active: 0,
|
active: 0,
|
||||||
|
|
@ -222,9 +230,12 @@ export default {
|
||||||
rules: {
|
rules: {
|
||||||
name: [{ required: true, message: "请输入" }],
|
name: [{ required: true, message: "请输入" }],
|
||||||
},
|
},
|
||||||
|
nodes:[],
|
||||||
|
edges:[],
|
||||||
routepack: "",
|
routepack: "",
|
||||||
project_code:'',
|
project_code:'',
|
||||||
productName:'',
|
productName:'',
|
||||||
|
limitedWatch:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -242,15 +253,14 @@ export default {
|
||||||
setData(data) {
|
setData(data) {
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.name=data.document_.name;
|
if(data.document_&&data.document_.name){
|
||||||
obj.url=data.document_.file;
|
obj.name=data.document_.name;
|
||||||
this.fileList.push(obj);
|
obj.url=data.document_.file;
|
||||||
// console.log("setData this.form", this.form);
|
this.fileList.push(obj);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
fileUPSuccess(res) {
|
fileUPSuccess(res) {
|
||||||
let that = this;
|
let that = this;
|
||||||
// console.log('res',res);
|
|
||||||
// console.log('that.fileList',that.fileList);
|
|
||||||
that.form.document = res.id;
|
that.form.document = res.id;
|
||||||
},
|
},
|
||||||
getMaterials() {
|
getMaterials() {
|
||||||
|
|
@ -288,7 +298,7 @@ export default {
|
||||||
that.query.routepack = res.id;
|
that.query.routepack = res.id;
|
||||||
that.apiObj = that.$API.mtm.route.list;
|
that.apiObj = that.$API.mtm.route.list;
|
||||||
that.active = 1;
|
that.active = 1;
|
||||||
// that.$refs.tables.refresh();
|
that.getDEGdatas();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
that.$API.mtm.routepack.create.req(form).then((res) => {
|
that.$API.mtm.routepack.create.req(form).then((res) => {
|
||||||
|
|
@ -303,6 +313,19 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getDEGdatas(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.routepack.dag.req(that.routepack).then((res) => {
|
||||||
|
that.nodes = res.nodes;
|
||||||
|
that.edges = res.edges;
|
||||||
|
if(!that.limitedWatch){
|
||||||
|
that.limitedWatch = true;
|
||||||
|
that.$nextTick(() => {
|
||||||
|
that.$refs.degraDialogs.open();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
table_add() {
|
table_add() {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
@ -331,16 +354,14 @@ export default {
|
||||||
//删除工序步骤
|
//删除工序步骤
|
||||||
delWorker(row) {
|
delWorker(row) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.mtm.route.delete
|
that.$API.mtm.route.delete.req(row.id).then((res) => {
|
||||||
.req(row.id)
|
that.$message.success("工序步骤删除成功");
|
||||||
.then((res) => {
|
that.getDEGdatas();
|
||||||
that.$message.success("工序步骤删除成功");
|
that.$refs.tables.refresh();
|
||||||
that.$refs.tables.refresh();
|
return res;
|
||||||
return res;
|
}).catch((err) => {
|
||||||
})
|
return err;
|
||||||
.catch((err) => {
|
});
|
||||||
return err;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//渲染工单提交按钮
|
//渲染工单提交按钮
|
||||||
|
|
@ -378,6 +399,7 @@ export default {
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
handleSaveSuccess() {
|
handleSaveSuccess() {
|
||||||
this.$refs.tables.refresh();
|
this.$refs.tables.refresh();
|
||||||
|
this.getDEGdatas();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue