| | |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="taocan = false">取 消</el-button> |
| | | <el-button @click="quzxiao">取 消</el-button> |
| | | <el-button type="primary" @click="queding">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | bzxz() { |
| | | this.taocan = true; |
| | | var deptAdviceList1 =[] |
| | | let data = { proId: this.proId, tjNum: this.tableAll.tjNumber }; |
| | | getAdviceByTjNumAndPro(data).then((res) => { |
| | | if (res.data) { |
| | | this.deptAdviceList3 = res.data; |
| | | // let data = { proId: this.proId, tjNum: this.tableAll.tjNumber }; |
| | | // getAdviceByTjNumAndPro(data).then((res) => { |
| | | // if (res.data) { |
| | | // this.deptAdviceList3 = res.data; |
| | | if (this.proParentList.xiaoJieIds.length != 0) { |
| | | if (this.vaids.length != 0) { |
| | | const result = this.vaids.reduce((acc, item) => { |
| | | const matches = this.deptAdviceList.filter(items => { |
| | | return item == items.id; // 或 === 根据需求 |
| | | }); |
| | | return acc.concat(matches); |
| | | }, []); |
| | | deptAdviceList1 = result; |
| | | |
| | | return this.deptAdviceList1 = [ |
| | | ...new Set(deptAdviceList1), |
| | | ]; |
| | | } else { |
| | | this.proParentList.xiaoJieIds.forEach(item => { |
| | | this.deptAdviceList3.forEach((items) => { |
| | | this.deptAdviceList.forEach((items) => { |
| | | if (item == items.id) { |
| | | deptAdviceList1.push(items) |
| | | } |
| | | }); |
| | | }) |
| | | this.deptAdviceList1 = [ |
| | | return this.deptAdviceList1 = [ |
| | | ...new Set(deptAdviceList1), |
| | | ]; |
| | | } |
| | | |
| | | |
| | | } else if (this.proParentList.xiaoJieIds == null) { |
| | | this.deptAdviceList1 = [] |
| | | } |
| | | |
| | | // this.deptAdviceList1 = [ |
| | | // ...new Set(this.deptAdviceList2.concat(this.deptAdviceList3)), |
| | | // ]; |
| | |
| | | // this.idss.push(items.id); |
| | | // this.remakes += items.advice + ","; |
| | | // }); |
| | | } |
| | | }); |
| | | // } |
| | | // }); |
| | | }, |
| | | |
| | | result() { |
| | |
| | | // } |
| | | |
| | | }, |
| | | |
| | | quzxiao() { |
| | | this.taocan = false; |
| | | this.deptAdviceList1 = [] |
| | | }, |
| | | queding() { |
| | | if (this.proParentList.xiaoJie.length != 0) { |
| | | this.remakes = ""; |