Browse Source

2025-04-10

master
qiezi 9 months ago
parent
commit
e4cf3f2075
  1. 1
      src/api/project/project.js
  2. 41
      src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue

1
src/api/project/project.js

@ -14,6 +14,7 @@ export const searchProjectTeamStr = data => createAPI(`/project/searchProjectTea
export const searchUserRoll = data => createAPI(`/project/searchUserRoll`,'Post',data) export const searchUserRoll = data => createAPI(`/project/searchUserRoll`,'Post',data)
export const searchSelectionUserRole = data => createAPI(`/project/searchSelectionUserRole`,'post',data)
export const saveProjectInfo = data => createAPI(`/project/saveProjectInfo`,'Post',data) export const saveProjectInfo = data => createAPI(`/project/saveProjectInfo`,'Post',data)

41
src/views/modules/project/projectInfo/com_projectInfo-add-or-update.vue

@ -157,11 +157,13 @@
<el-input v-model="userRoleForm.userDisplay" placeholder=" "></el-input> <el-input v-model="userRoleForm.userDisplay" placeholder=" "></el-input>
</el-form-item> </el-form-item>
<el-form-item label=" "> <el-form-item label=" ">
<el-button type="primary" @click="searchUserRoll()">查询</el-button>
<!-- <el-button type="primary" @click="searchUserRoll()">查询</el-button>-->
<el-button type="primary" @click="loadView">查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
:data="userRoleList"
ref="table"
:data="copyUserRoleList"
border border
:height="300" :height="300"
v-loading="queryUserRoleListLoading" v-loading="queryUserRoleListLoading"
@ -257,6 +259,7 @@
searchOperatorWithSite, searchOperatorWithSite,
searchProjectTeamStr, searchProjectTeamStr,
searchUserRoll, searchUserRoll,
searchSelectionUserRole,
saveProjectInfo, saveProjectInfo,
} from "@/api/project/project.js" } from "@/api/project/project.js"
import Chooselist from '@/views/modules/common/Chooselist' import Chooselist from '@/views/modules/common/Chooselist'
@ -388,6 +391,9 @@
saveCheckAll:'N', saveCheckAll:'N',
queryUserRoleListLoading:false, queryUserRoleListLoading:false,
filterParams:{
},
} }
}, },
created () { created () {
@ -431,8 +437,30 @@
} }
}) })
}, },
copyUserRoleList:{
get(){
let arr = this.userRoleList.filter(item=>{
if (!!this.filterParams.username && !!this.filterParams.userDisplay){
return item.username.includes(this.filterParams.username) && item.userDisplay.includes(this.filterParams.userDisplay)
}
if (!!this.filterParams.username){
return item.username.includes(this.filterParams.username)
}
if (!!this.filterParams.userDisplay){
return item.userDisplay.includes(this.filterParams.userDisplay)
}
return true
})
return arr
}
}
}, },
methods: { methods: {
loadView(){
this.filterParams = {
...this.userRoleForm
}
},
// S // S
getBaseList (val, type) { getBaseList (val, type) {
this.tagNo = val this.tagNo = val
@ -608,9 +636,14 @@
site:this.dataForm.site, site:this.dataForm.site,
projectId:this.dataForm.projectId, projectId:this.dataForm.projectId,
} }
searchUserRoll(inData3).then(({data}) => {
// searchUserRoll(inData3).then(({data}) => {
// this.dataForm.userRoleList=data.rows;
// // this.userRollModal();
// })
searchSelectionUserRole(inData3).then(({data})=>{
if (data && data.code === 0){
this.dataForm.userRoleList = data.rows; this.dataForm.userRoleList = data.rows;
// this.userRollModal();
}
}) })
}, },
managerChooseModal(){ managerChooseModal(){

Loading…
Cancel
Save