BUG 30239

This commit is contained in:
aixianling
2022-06-16 17:32:46 +08:00
parent 154ad8bdc8
commit 10b197b553
4 changed files with 305 additions and 27 deletions

View File

@@ -9,24 +9,16 @@
<u-icon name="arrow-right" color="#999" size="24" style="margin-left:8px;"/>
</AiAreaPicker>
</div>
<div class="area-flex">
<p class="title">部门</p>
<div class="value">
<AiPagePicker type="dept" :selected.sync="deptList" nodeKey="id" :isRequire="0">
<AiMore v-model="moreTextDept"/>
</AiPagePicker>
</div>
</div>
<div class="area-flex">
<p class="title">人员</p>
<div class="value">
<AiPagePicker type="sysUser" :selected.sync="userList" action="/app/wxcp/wxuser/list?status=1" nodeKey="id" :isRequire="0">
<AiMore v-model="moreText"/>
</AiPagePicker>
</div>
</div>
<div class="type-content">
<div class="type-list">
<p v-text="`部门/人员`"/>
<div class="list">
<AiPagePicker type="custom" :selected.sync="deptUserList" nodeKey="id" :ops="{url:'./selectDeptUser',label:'name'}" valueObj>
<div class="item active" v-for="item in deptUserList" :key="item.id">{{ item.name }}</div>
<AiMore v-if="deptUserList.length==0" class="right"/>
</AiPagePicker>
</div>
</div>
<div class="type-list" v-for="(item, index) in tagList" :key="index">
<p>{{ item.name }}</p>
<div class="list">
@@ -48,6 +40,7 @@ import {mapState} from 'vuex'
export default {
name: "chooseUser",
appName: "条件选择",
data() {
return {
value: '',
@@ -62,12 +55,16 @@ export default {
},
computed: {
...mapState(['user']),
moreText() {
if (this.userList.length) return '已选择'
},
moreTextDept() {
if (this.deptList.length) return '已选择'
},
deptUserList: {
set(v) {
this.userList = v.filter(e => e.kind == 'user')
this.deptList = v.filter(e => e.kind == 'dept')
},
get() {
let {userList, deptList} = this
return [userList, deptList].flat()
}
}
},
methods: {
getTagList() {
@@ -75,10 +72,7 @@ export default {
if (res?.code == 0) {
res.data.records.map((item) => {
item.tagList.map((items) => {
items.isCheck = false
if (this.tagIdList.includes(items.id)) {
items.isCheck = true
}
items.isCheck = this.tagIdList.includes(items.id);
})
})
this.tagList = res.data.records
@@ -281,5 +275,8 @@ export default {
font-size: 28px !important;
}
.right {
float: right;
}
}
</style>