|
|
|
@ -155,7 +155,7 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="通知用户" >
|
|
|
|
|
<el-form-item label="通知用户" v-if="userVisible">
|
|
|
|
|
<el-select v-model="form.userNoticeList" placeholder="请选择通知用户" multiple>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in userList"
|
|
|
|
@ -201,6 +201,8 @@ export default {
|
|
|
|
|
multiple: true,
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
showSearch: true,
|
|
|
|
|
// 通知用户显示
|
|
|
|
|
userVisible: false,
|
|
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
// 公告表格数据
|
|
|
|
@ -232,6 +234,14 @@ export default {
|
|
|
|
|
userList: []
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
// 监听form.noticeType
|
|
|
|
|
'form.noticeType': {
|
|
|
|
|
handler(val) {
|
|
|
|
|
this.userVisible = (val === '1');
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
@ -306,6 +316,9 @@ export default {
|
|
|
|
|
if (this.form.userNoticeList.length > 0){
|
|
|
|
|
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 => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.noticeId != undefined) {
|
|
|
|
|