|
@@ -238,7 +238,7 @@
|
|
|
<td style="width:50%;">{{val.tableName}}</td>
|
|
|
<td style="text-align: center;height:30px;">
|
|
|
<el-button
|
|
|
- v-if="val.isLinkTable==1"
|
|
|
+ v-if="val.isLinkTable!==2"
|
|
|
type="info"
|
|
|
size="small"
|
|
|
@click="relation(index)"
|
|
@@ -324,7 +324,7 @@ export default {
|
|
|
const { data: res } = await wbstree({ parentId: node.data.id, wbsId: this.excelForm.wbsId, wbsType: this.excelForm.wbsType })
|
|
|
console.log(res);
|
|
|
if (res.code === 200) {
|
|
|
- if (Array.isArray(res.data)) {
|
|
|
+ if (res.msg != '未查询到信息') {
|
|
|
res.data.forEach((val) => {
|
|
|
if (!val.hasChildren) {
|
|
|
val.leaf = true
|
|
@@ -413,26 +413,27 @@ export default {
|
|
|
const { data: res } = await wbstree({ parentId: 0, wbsId: this.excelForm.wbsId, wbsType: this.excelForm.wbsType })
|
|
|
console.log(res);
|
|
|
if (res.code === 200) {
|
|
|
- res.data.forEach((val) => {
|
|
|
- if (!val.hasChildren) {
|
|
|
- val.leaf = true
|
|
|
- }
|
|
|
- })
|
|
|
- this.wbsdata = res.data
|
|
|
+ if (res.msg != "未查询到信息") {
|
|
|
+ res.data.forEach((val) => {
|
|
|
+ if (!val.hasChildren) {
|
|
|
+ val.leaf = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.wbsdata = res.data
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
async selectByNodeTable (id, wbsType) {//wbs树获取表
|
|
|
const { data: res } = await selectByNodeTable({ id, wbsType })
|
|
|
console.log(res);
|
|
|
if (res.code === 200) {
|
|
|
- console.log(Array.isArray(res.data));
|
|
|
- if (Array.isArray(res.data)) {
|
|
|
+ if (res.msg == "未查询到信息") {
|
|
|
+ this.tableData = []
|
|
|
+ } else {
|
|
|
this.tableData = res.data
|
|
|
this.tableData.forEach(val => {
|
|
|
val.changeTable = val.isLinkTable
|
|
|
})
|
|
|
- } else {
|
|
|
- this.tableData = []
|
|
|
}
|
|
|
}
|
|
|
},
|