|
@@ -268,7 +268,7 @@
|
|
|
|
|
|
<script>
|
|
|
import Vue from 'vue'
|
|
|
- import { columnsSelect, columnsEdit, proCostYSKdetail, proCostContractdetail, getDbList, getDbClList } from '@/api/kzksApi.js'
|
|
|
+ import { columnsSelect, columnsEdit, proCostYSKdetail, proCostContractdetail, getDbList, getHjList, getDbClList } from '@/api/kzksApi.js'
|
|
|
|
|
|
import '@/assets/less/TableExpand.less'
|
|
|
import { mixinDevice } from '@/utils/mixin'
|
|
@@ -788,22 +788,49 @@ import ProjectImportListModal from '../projectImportList/modules/ProjectImportLi
|
|
|
batchDuiBi(){
|
|
|
console.log(this.selectedRowKeys,this.selectionRows)
|
|
|
// console.log(JSON.stringify(this.selectedRowKeys))
|
|
|
- var a = this.selectedRowKeys
|
|
|
- var ids = a.toString()
|
|
|
- getDbList({ids: ids}).then((res) => {
|
|
|
- console.log(res)
|
|
|
- this.duibiList = res
|
|
|
- })
|
|
|
- var selectTasknos = this.selectionRows.map( res => {
|
|
|
- return res.taskno
|
|
|
- })
|
|
|
- var tasknos = selectTasknos.toString()
|
|
|
- console.log(tasknos)
|
|
|
- getDbClList({tasknos: tasknos}).then((res) => {
|
|
|
- console.log(res)
|
|
|
- this.duibiclList = res
|
|
|
- this.duiBi = true
|
|
|
- })
|
|
|
+ if (this.chooseRowType == 1) {
|
|
|
+ var a = this.selectedRowKeys
|
|
|
+ var ids = a.toString()
|
|
|
+ getHjList({ids: ids}).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ this.duibiList = res
|
|
|
+ this.duibiclList = []
|
|
|
+ this.duiBi = true
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ var a = this.selectedRowKeys
|
|
|
+ var ids = a.toString()
|
|
|
+ getDbList({ids: ids}).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ this.duibiList = res
|
|
|
+ })
|
|
|
+ var selectTasknos = this.selectionRows.map( res => {
|
|
|
+ return res.taskno
|
|
|
+ })
|
|
|
+ var tasknos = selectTasknos.toString()
|
|
|
+ console.log(tasknos)
|
|
|
+ getDbClList({tasknos: tasknos}).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ this.duibiclList = res
|
|
|
+ this.duiBi = true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // var a = this.selectedRowKeys
|
|
|
+ // var ids = a.toString()
|
|
|
+ // getDbList({ids: ids}).then((res) => {
|
|
|
+ // console.log(res)
|
|
|
+ // this.duibiList = res
|
|
|
+ // })
|
|
|
+ // var selectTasknos = this.selectionRows.map( res => {
|
|
|
+ // return res.taskno
|
|
|
+ // })
|
|
|
+ // var tasknos = selectTasknos.toString()
|
|
|
+ // console.log(tasknos)
|
|
|
+ // getDbClList({tasknos: tasknos}).then((res) => {
|
|
|
+ // console.log(res)
|
|
|
+ // this.duibiclList = res
|
|
|
+ // this.duiBi = true
|
|
|
+ // })
|
|
|
},
|
|
|
// 关闭对比弹框
|
|
|
handleGb(){
|
|
@@ -843,16 +870,41 @@ import ProjectImportListModal from '../projectImportList/modules/ProjectImportLi
|
|
|
this.$refs.xushi.open(record)
|
|
|
},
|
|
|
// 对比禁选判断
|
|
|
+ onSelectChange(selectedRowKeys, selectionRows) {
|
|
|
+ this.selectedRowKeys = selectedRowKeys;
|
|
|
+ this.selectionRows = selectionRows;
|
|
|
+ },
|
|
|
onSelect(record, selected, selectedRows, nativeEvent){
|
|
|
console.log(record, selected, selectedRows, nativeEvent)
|
|
|
- console.log(record.ji)
|
|
|
- if (record.ji == '2') {
|
|
|
- // 选中二级,一级禁选
|
|
|
- this.chooseRowType == 'chengben'
|
|
|
- } else {
|
|
|
- // 选中一级,二级禁选
|
|
|
- this.chooseRowType == 'huiji'
|
|
|
+ if(selected) {
|
|
|
+ if (selectedRows.length == 1) {
|
|
|
+ this.chooseRowType = record.ji
|
|
|
+ } else {
|
|
|
+ console.log(this.chooseRowType,record.ji)
|
|
|
+ if (this.chooseRowType != record.ji) {
|
|
|
+ this.chooseRowType = this.chooseRowType
|
|
|
+ this.$message.error("请选择同级项进行对比");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else{
|
|
|
+ if (selectedRows.length == 1) {
|
|
|
+ console.log(777,this.selectionRows[0].ji)
|
|
|
+ this.chooseRowType = this.selectionRows[0].ji
|
|
|
+ } else {
|
|
|
+ if (this.chooseRowType != record.ji) {
|
|
|
+ this.chooseRowType = this.chooseRowType
|
|
|
+ this.$message.error("请选择同级项进行对比");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+ // console.log(record.ji)
|
|
|
+ // if (record.ji == '2') {
|
|
|
+ // // 选中二级,一级禁选
|
|
|
+ // this.chooseRowType == 'chengben'
|
|
|
+ // } else {
|
|
|
+ // // 选中一级,二级禁选
|
|
|
+ // this.chooseRowType == 'huiji'
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
}
|