|
@@ -1,8 +1,21 @@
|
|
|
<template>
|
|
|
- <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
|
|
|
+ <a-card :bordered="false" class="card" :title="modalTitle">
|
|
|
<h1 style="margin:20px auto; text-align: center"> 生产过程工艺流程画面 </h1>
|
|
|
- <a-card v-for="position in treeData" :key="position.key" :title="position.title">
|
|
|
- <a-card-grid v-for="child in position.children" :key="child.key" style="cursor: pointer;width:25%;text-align:center" @click="showScreen(child, position.key)">
|
|
|
+ <a-card v-show="visible">
|
|
|
+ <a-card-grid v-for="position in treeData" v-if="position.type==1" :key="position.key" style="cursor: pointer;width:25%;text-align:center" @click="showChild(position)">
|
|
|
+ {{ position.title }}
|
|
|
+ </a-card-grid>
|
|
|
+ </a-card>
|
|
|
+
|
|
|
+ <a-card v-show="visible2">
|
|
|
+ <a-row :gutter="48" slot="extra">
|
|
|
+ <a-col :md="48" :sm="48">
|
|
|
+ <span class="table-page-search-submitButtons" style="float: right">
|
|
|
+ <a-button style="margin-left: 8px" @click="handleCancel()">返回</a-button>
|
|
|
+ </span>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-card-grid v-for="child in childData" v-if="child.type==2" :key="child.key" style="cursor: pointer;width:25%;text-align:center" @click="showScreen(child)">
|
|
|
{{ child.title }}
|
|
|
</a-card-grid>
|
|
|
</a-card>
|
|
@@ -22,7 +35,9 @@ export default {
|
|
|
confirmLoading: false,
|
|
|
modalTitle: null,
|
|
|
treeData: [],
|
|
|
- visible: true
|
|
|
+ childData: [],
|
|
|
+ visible: true,
|
|
|
+ visible2: false
|
|
|
}
|
|
|
},
|
|
|
props: {
|
|
@@ -33,11 +48,23 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- showScreen (position, parentId) {
|
|
|
+ showChild (position) {
|
|
|
+ this.visible = false
|
|
|
+ this.visible2 = true
|
|
|
+ this.childData = position.children
|
|
|
+ },
|
|
|
+ showScreen (position) {
|
|
|
const a = document.createElement('a')
|
|
|
- a.href = '/opc/info?line=' + position.key + '&parentId=' + parentId
|
|
|
+ const select = position.children[0]
|
|
|
+ a.href = '/opc/info?line=' + select.id + '&parentId=' + position.id
|
|
|
a.target = '_blank'
|
|
|
a.click()
|
|
|
+ },
|
|
|
+ handleCancel () {
|
|
|
+ this.visible = true
|
|
|
+ this.visible2 = false
|
|
|
+ this.childData = []
|
|
|
+ this.confirmLoading = false
|
|
|
}
|
|
|
}
|
|
|
}
|