修改工作项负责人时可选择项目成员

main
wuyize 2022-07-08 09:33:37 +08:00
parent 2c69eb0462
commit 968fc8d3c2
2 changed files with 26 additions and 6 deletions

View File

@ -57,7 +57,10 @@
</div> </div>
</el-header> </el-header>
<el-main style="overflow: unset"> <el-main style="overflow: unset">
<router-view :projectAccessLevel="projectAccessLevel"></router-view> <router-view
:projectAccessLevel="projectAccessLevel"
:projectGroup="projectGroup"
></router-view>
</el-main> </el-main>
</el-container> </el-container>
</el-container> </el-container>
@ -135,7 +138,7 @@ export default {
}).then(response => { }).then(response => {
if (response.data.code === 200) { if (response.data.code === 200) {
that.projectGroup = response.data.data that.projectGroup = response.data.data.records
} }
}).catch(function (error) { }).catch(function (error) {
console.log(error) console.log(error)

View File

@ -195,7 +195,21 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="负责人"> <el-form-item label="负责人">
<el-input v-model="form.taskHolderId" :disabled="form.disabled"/>
<el-select style="width: 100%" v-model="form.taskHolderId" filterable :disabled="form.disabled">
<el-option
v-for="member in projectGroup"
:key="member.staffId"
:label="member.staffFullname"
:value="member.staffId"
>
<span style="float: left">{{ member.staffFullname }}</span>
<span
style="float: right;color: var(--el-text-color-secondary);font-size: 13px;"
>{{ member.staffUsername }}</span
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -323,19 +337,23 @@ export default {
name: "ProjectWorkitem", name: "ProjectWorkitem",
props: { props: {
projectAccessLevel: Number, projectAccessLevel: Number,
projectGroup: []
}, },
data() { data() {
return { return {
dialogVisible: false, dialogVisible: false,
form: {}, form: {},
workitems: [], workitems: [],
defaultTime: new Date(1870, 1, 1, 12, 0, 0), defaultTime: new Date(1970, 1, 1, 12, 0, 0),
maps: new Map() maps: new Map()
} }
}, },
watch: { watch: {
projectAccessLevel: function (val) { projectAccessLevel: function (val) {
this.getWorkitems() // this.getWorkitems() //
},
projectGroup: function (val) {
} }
}, },
created() { created() {
@ -585,8 +603,7 @@ export default {
that.getWorkitems() that.getWorkitems()
} else { } else {
//console.log(that.$refs.tableRef.store.states.lazyTreeNodeMap) //console.log(that.$refs.tableRef.store.states.lazyTreeNodeMap)
if(that.$refs.tableRef.store.states.lazyTreeNodeMap.value[row.taskFatherId].length===1) if (that.$refs.tableRef.store.states.lazyTreeNodeMap.value[row.taskFatherId].length === 1) {
{
that.$refs.tableRef.store.states.lazyTreeNodeMap.value[row.taskFatherId] = [] that.$refs.tableRef.store.states.lazyTreeNodeMap.value[row.taskFatherId] = []
} }
let rtr = that.maps.get(row.taskFatherId); let rtr = that.maps.get(row.taskFatherId);