change - 通知公告:通知下发到指定用户,公告下发全部用户

master
yinq 4 months ago
parent 972b968753
commit 3e8a7b2151

@ -155,7 +155,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="通知用户" > <el-form-item label="通知用户" v-if="userVisible">
<el-select v-model="form.userNoticeList" placeholder="请选择通知用户" multiple> <el-select v-model="form.userNoticeList" placeholder="请选择通知用户" multiple>
<el-option <el-option
v-for="item in userList" v-for="item in userList"
@ -201,6 +201,8 @@ export default {
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
//
userVisible: false,
// //
total: 0, total: 0,
// //
@ -232,6 +234,14 @@ export default {
userList: [] userList: []
}; };
}, },
watch: {
// form.noticeType
'form.noticeType': {
handler(val) {
this.userVisible = (val === '1');
},
}
},
created() { created() {
this.getList(); this.getList();
}, },
@ -306,6 +316,9 @@ export default {
if (this.form.userNoticeList.length > 0){ if (this.form.userNoticeList.length > 0){
this.form.sysUserNoticeList = this.form.userNoticeList.map(userId => ({ userId })); this.form.sysUserNoticeList = this.form.userNoticeList.map(userId => ({ userId }));
} }
if (this.form.noticeType == '2'){
this.form.sysUserNoticeList = this.userList.map(user => ({ userId: user.userId }));
}
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.noticeId != undefined) { if (this.form.noticeId != undefined) {

Loading…
Cancel
Save