|
@@ -374,7 +374,7 @@
|
|
v-for="(item,key) in roleList"
|
|
v-for="(item,key) in roleList"
|
|
:label="item.id"
|
|
:label="item.id"
|
|
:key="key"
|
|
:key="key"
|
|
- >{{item.title}}</el-radio-button>
|
|
|
|
|
|
+ >{{item.roleName}}</el-radio-button>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
@@ -387,7 +387,7 @@
|
|
<el-option
|
|
<el-option
|
|
v-for="item in postList"
|
|
v-for="item in postList"
|
|
:key="item.id"
|
|
:key="item.id"
|
|
- :label="item.postName"
|
|
|
|
|
|
+ :label="item.roleName"
|
|
:value="item.id"
|
|
:value="item.id"
|
|
></el-option>
|
|
></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -507,8 +507,7 @@
|
|
<script>
|
|
<script>
|
|
import { getProjectDeatil, findProjectTree } from "@/api/manager/projectinfo";
|
|
import { getProjectDeatil, findProjectTree } from "@/api/manager/projectinfo";
|
|
import {
|
|
import {
|
|
- submitContractInfo, getContractInfo, delFileFromUrl,
|
|
|
|
- findPostByType, findAllUserByCondition, findUserByName,
|
|
|
|
|
|
+ submitContractInfo, getContractInfo, delFileFromUrl, searchRole, findAllUserByCondition, findUserByName,
|
|
saveUserInfoByProjectTow, removeUsersByIds, resetPasswordByUserId,
|
|
saveUserInfoByProjectTow, removeUsersByIds, resetPasswordByUserId,
|
|
submitWbsTreeInContract, getContractInfoTree
|
|
submitWbsTreeInContract, getContractInfoTree
|
|
} from "@/api/manager/contractinfo";
|
|
} from "@/api/manager/contractinfo";
|
|
@@ -630,11 +629,7 @@ export default {
|
|
flageData: [],
|
|
flageData: [],
|
|
|
|
|
|
rId: '',
|
|
rId: '',
|
|
- roleList: [
|
|
|
|
- { title: '施工方人员', id: '1', },
|
|
|
|
- { title: '监理方人员', id: '2', },
|
|
|
|
- { title: '业主方人员', id: '3', }
|
|
|
|
- ],
|
|
|
|
|
|
+ roleList: [],
|
|
postId: '',
|
|
postId: '',
|
|
postList: [],
|
|
postList: [],
|
|
contractUserList: [],
|
|
contractUserList: [],
|
|
@@ -659,19 +654,29 @@ export default {
|
|
activeType: async function (newValue) {
|
|
activeType: async function (newValue) {
|
|
if (newValue == '3') {
|
|
if (newValue == '3') {
|
|
this.getUserByName();
|
|
this.getUserByName();
|
|
|
|
+ this.searchRole()
|
|
} else if (newValue == '2') {
|
|
} else if (newValue == '2') {
|
|
await this.getLeftTree();
|
|
await this.getLeftTree();
|
|
this.getRightTree();
|
|
this.getRightTree();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
rId: function (newValue) {
|
|
rId: function (newValue) {
|
|
- findPostByType(newValue).then((res) => {
|
|
|
|
- this.postList = res.data.data;
|
|
|
|
- }).catch(() => {
|
|
|
|
- this.postList = [];
|
|
|
|
- }).finally(() => {
|
|
|
|
- this.postId = '';
|
|
|
|
|
|
+ this.roleList.forEach(val => {
|
|
|
|
+ if (val.id === this.rId) {
|
|
|
|
+ if (val.children) {
|
|
|
|
+ this.postList = val.children
|
|
|
|
+ } else {
|
|
|
|
+ this.postList = []
|
|
|
|
+ }
|
|
|
|
+ }
|
|
})
|
|
})
|
|
|
|
+ // findPostByType(newValue).then((res) => {
|
|
|
|
+ // this.postList = res.data.data;
|
|
|
|
+ // }).catch(() => {
|
|
|
|
+ // this.postList = [];
|
|
|
|
+ // }).finally(() => {
|
|
|
|
+ // this.postId = '';
|
|
|
|
+ // })
|
|
},
|
|
},
|
|
postId: function (newValue) {
|
|
postId: function (newValue) {
|
|
if (newValue) {
|
|
if (newValue) {
|
|
@@ -682,7 +687,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created () {
|
|
created () {
|
|
- this.rId = '1'
|
|
|
|
this.init();
|
|
this.init();
|
|
//console.log(this.userInfo)
|
|
//console.log(this.userInfo)
|
|
},
|
|
},
|
|
@@ -696,6 +700,18 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ async searchRole () {
|
|
|
|
+ const { data: res } = await searchRole()
|
|
|
|
+ console.log(res);
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.roleList = []
|
|
|
|
+ res.data.forEach(val => {
|
|
|
|
+ if (val.roleName == "施工方" || val.roleName == "监理方" || val.roleName == "业主方") {
|
|
|
|
+ this.roleList.push(val)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
async init () {
|
|
async init () {
|
|
this.pid = this.$route.query.pid;
|
|
this.pid = this.$route.query.pid;
|
|
this.cid = this.$route.query.cid;
|
|
this.cid = this.$route.query.cid;
|
|
@@ -911,7 +927,7 @@ export default {
|
|
projectId: this.pid,
|
|
projectId: this.pid,
|
|
contractId: this.contractForm.id,
|
|
contractId: this.contractForm.id,
|
|
userId: this.userId,
|
|
userId: this.userId,
|
|
- postId: this.postId,
|
|
|
|
|
|
+ roleId: this.postId,
|
|
}];
|
|
}];
|
|
saveUserInfoByProjectTow(list).then(() => {
|
|
saveUserInfoByProjectTow(list).then(() => {
|
|
// this.findAllUserByCondition();
|
|
// this.findAllUserByCondition();
|