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

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

View File

@ -195,7 +195,21 @@
<el-row :gutter="20">
<el-col :span="12">
<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-col>
<el-col :span="12">
@ -323,19 +337,23 @@ export default {
name: "ProjectWorkitem",
props: {
projectAccessLevel: Number,
projectGroup: []
},
data() {
return {
dialogVisible: false,
form: {},
workitems: [],
defaultTime: new Date(1870, 1, 1, 12, 0, 0),
defaultTime: new Date(1970, 1, 1, 12, 0, 0),
maps: new Map()
}
},
watch: {
projectAccessLevel: function (val) {
this.getWorkitems() //
},
projectGroup: function (val) {
}
},
created() {
@ -585,8 +603,7 @@ export default {
that.getWorkitems()
} else {
//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] = []
}
let rtr = that.maps.get(row.taskFatherId);