|
|
@ -23,36 +23,36 @@ |
|
|
|
<div class="listtop" style="width: 500px"> |
|
|
|
<div class="tit" >项目列表</div> |
|
|
|
</div> |
|
|
|
<el-table :data="dataList" border max-height="380px" style="width: 500px" highlight-current-row |
|
|
|
<el-table :data="formobj" border ref="multipleTab" max-height="380px" style="width: 500px" highlight-current-row |
|
|
|
@row-click="singleElection"> |
|
|
|
<el-table-column align="center" width="55" label="选择"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 可以手动的修改label的值,从而控制选择哪一项 --> |
|
|
|
<el-radio class="radio" v-model="templateSelection" :label="scope.row.id" style="margin-left:10px" |
|
|
|
<el-radio class="radio" v-model="uploadData.projectSid" :label="scope.row.sid" style="margin-left:10px" |
|
|
|
>{{''}}</el-radio |
|
|
|
> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="typeName" label="项目名称" align="center" /> |
|
|
|
<el-table-column prop="remarks" label="贷款银行" align="center" /> |
|
|
|
<el-table-column prop="entryName" label="项目名称" align="center" /> |
|
|
|
<el-table-column prop="bankName" label="贷款银行" align="center" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div class="rigth"> |
|
|
|
<div class="listtop" style="width: 700px"> |
|
|
|
<div class="tit" > 项目名称:{{projectList.remarks }} {{"\xa0\xa0\xa0"}}{{"\xa0\xa0\xa0"}}{{"\xa0\xa0\xa0"}}{{"\xa0\xa0\xa0"}} 贷款银行:{{projectList.id }}</div> |
|
|
|
<div class="tit" > 项目名称:{{projectList.entryName }} {{"\xa0\xa0\xa0"}}{{"\xa0\xa0\xa0"}}{{"\xa0\xa0\xa0"}}{{"\xa0\xa0\xa0"}} 贷款银行:{{projectList.bankName }}</div> |
|
|
|
</div> |
|
|
|
<div style="float: left;"> |
|
|
|
<el-table v-loading="tableLoading" :data="dataList" border max-height="380px" style="width: 350px" |
|
|
|
@selection-change="handleSelectionChange"> |
|
|
|
<el-table ref="multipleTable" :data="dataListOne" border max-height="380px" style="width: 350px" |
|
|
|
@selection-change="handlChange" tooltip-effect="dark" > |
|
|
|
<el-table-column type="selection" width="55" align="center"/> |
|
|
|
<el-table-column prop="typeName" label="监管人员" align="center" /> |
|
|
|
<el-table-column prop="name" label="监管人员" align="center" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div style="float: left;"> |
|
|
|
<el-table v-loading="tableLoading" :data="dataList" border max-height="380px" style="width: 350px" |
|
|
|
@selection-change="handleSelectionChange"> |
|
|
|
<el-table ref="multipleTables" :data="dataListTwo" border max-height="380px" style="width: 350px" |
|
|
|
@selection-change="handleSelectionChange" tooltip-effect="dark"> |
|
|
|
<el-table-column type="selection" width="55" align="center"/> |
|
|
|
<el-table-column prop="remarks" label="银行人员" align="center" /> |
|
|
|
<el-table-column prop="name" label="银行人员" align="center" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -62,7 +62,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import req from '@/api/dataDict/datadict' |
|
|
|
import req from '@/api/projectStaff/index' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
@ -80,11 +80,9 @@ |
|
|
|
isSearchShow: false, |
|
|
|
searchxianshitit: '显示查询条件', |
|
|
|
tableLoading: false, |
|
|
|
dataList: [ |
|
|
|
{remarks:'fff',id:15}, |
|
|
|
{remarks:'kfdjakdfjdkajfkafjka',id:52}, |
|
|
|
{remarks:'fff',id:11} |
|
|
|
], |
|
|
|
formobj:[], |
|
|
|
dataListOne: [], |
|
|
|
dataListTwo: [], |
|
|
|
btnList: [ |
|
|
|
{ |
|
|
|
type: 'info', |
|
|
@ -107,9 +105,20 @@ |
|
|
|
// 当前选择的行的数据 |
|
|
|
checkList: [], |
|
|
|
projectList:{ |
|
|
|
remarks:'', |
|
|
|
id:'', |
|
|
|
} |
|
|
|
entryName:'', |
|
|
|
bankName:'', |
|
|
|
}, |
|
|
|
uploadData:{ |
|
|
|
projectSid:'', |
|
|
|
bankUsers:[], |
|
|
|
users:[], |
|
|
|
}, |
|
|
|
one:1, |
|
|
|
two:3, |
|
|
|
ValSid:[], |
|
|
|
ValSids:[], |
|
|
|
DataLists:[], |
|
|
|
usersList:[], |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
@ -138,15 +147,54 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
loadList() { |
|
|
|
|
|
|
|
req.projectinformation().then(res=>{ |
|
|
|
if (res.success) { |
|
|
|
this.formobj = res.data |
|
|
|
this.uploadData.projectSid = res.data[0].sid |
|
|
|
this.projectList.entryName=res.data[0].entryName |
|
|
|
this.projectList.bankName=res.data[0].bankName |
|
|
|
req.getUserProjectBySid(res.data[0].sid).then(res=>{ |
|
|
|
this.DataLists=res.data.bankUsers |
|
|
|
this.usersList=res.data.users |
|
|
|
this.estimate() |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
req.getUserByType(this.one).then(res=>{ |
|
|
|
if (res.success) { |
|
|
|
this.dataListOne = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
req.getUserByType(this.two).then(res=>{ |
|
|
|
if (res.success) { |
|
|
|
this.dataListTwo = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
clearList(){ |
|
|
|
this.ValSid=[] |
|
|
|
this.ValSids=[] |
|
|
|
this.DataLists=[] |
|
|
|
this.usersList=[] |
|
|
|
this.uploadData={ |
|
|
|
projectSid:'', |
|
|
|
bankUsers:[], |
|
|
|
users:[], |
|
|
|
} |
|
|
|
}, |
|
|
|
singleElection(row) { |
|
|
|
this.templateSelection = row.id |
|
|
|
this.checkList = this.dataList.filter((item) => item.id === row.id) |
|
|
|
this.uploadData.projectSid = row.sid |
|
|
|
this.checkList = this.formobj.filter((item) => item.sid === row.sid) |
|
|
|
console.log(`该行的编号为${row.id}`) |
|
|
|
console.log(this.checkList[0].id) |
|
|
|
this.projectList.remarks=this.checkList[0].remarks |
|
|
|
this.projectList.id=this.checkList[0].id |
|
|
|
console.log(this.checkList[0].entryName) |
|
|
|
this.projectList.entryName=this.checkList[0].entryName |
|
|
|
this.projectList.bankName=this.checkList[0].bankName |
|
|
|
|
|
|
|
req.getUserProjectBySid(row.sid).then(res=>{ |
|
|
|
this.DataLists=res.data.bankUsers |
|
|
|
this.usersList=res.data.users |
|
|
|
this.estimate() |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
@ -173,10 +221,64 @@ |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
|
getPurchaseList(){ |
|
|
|
let val=this.ValSid |
|
|
|
|
|
|
|
}, |
|
|
|
handleSelectionChange(){ |
|
|
|
for(let i=0;i<val.length;i++){ |
|
|
|
this.uploadData.bankUsers.push(val[i].sid) |
|
|
|
} |
|
|
|
|
|
|
|
let vals=this.ValSids |
|
|
|
for(let i=0;i<vals.length;i++){ |
|
|
|
this.uploadData.users.push(vals[i].sid) |
|
|
|
} |
|
|
|
console.log(this.uploadData); |
|
|
|
req.userprojectSave(this.uploadData).then(res=>{ |
|
|
|
if (res.success) { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'success', |
|
|
|
message: res.msg |
|
|
|
}) |
|
|
|
this.$refs.multipleTable.clearSelection(); |
|
|
|
this.$refs.multipleTables.clearSelection(); |
|
|
|
this.clearList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
handlChange(val){ |
|
|
|
this.ValSid=val |
|
|
|
}, |
|
|
|
handleSelectionChange(val){ |
|
|
|
this.ValSids=val |
|
|
|
}, |
|
|
|
estimate(){ |
|
|
|
this.$refs.multipleTable.clearSelection(); |
|
|
|
this.$refs.multipleTables.clearSelection(); |
|
|
|
const { dataListOne,dataListTwo, DataLists,usersList } = this |
|
|
|
DataLists.forEach(key => { |
|
|
|
dataListOne.forEach(row => { |
|
|
|
if (row.sid == key.sid) { |
|
|
|
if(row.sid){ |
|
|
|
this.$refs.multipleTable.toggleRowSelection(row, true); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
usersList.forEach(key => { |
|
|
|
dataListTwo.forEach(row => { |
|
|
|
if (row.sid == key.sid) { |
|
|
|
if(row.sid){ |
|
|
|
this.$refs.multipleTables.toggleRowSelection(row, true); |
|
|
|
}else{ |
|
|
|
this.$refs.multipleTables.clearSelection(); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
doClose() { |
|
|
|
this.$store.dispatch('tagsView/delView', this.$route) |
|
|
|
this.$router.go(-1) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|