|
@@ -50,11 +50,11 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="发布单位" prop="company" v-if="addForm.noticeType == 2">
|
|
|
+ <el-form-item label="发布单位" prop="company" v-if="addForm.noticeType != 1">
|
|
|
<el-input v-model="addForm.company" placeholder="请输入发布单位"
|
|
|
maxLength="20" style="width:500px;"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="发送状态" prop="sendState">
|
|
|
+ <el-form-item label="发送状态" prop="sendState" v-if="addForm.noticeType == 1">
|
|
|
<el-radio-group v-model="addForm.sendState" style="width:320px;">
|
|
|
<el-radio :label="1">立即发送</el-radio>
|
|
|
<el-radio :label="0">暂不发送</el-radio>
|
|
@@ -70,7 +70,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { systemNoticeGetSendType,systemNoticeAdd,
|
|
|
+ import { systemNoticeGetSendType,systemNoticeAdd,systemNotifyAdd,
|
|
|
systemNoticeDetail,systemNoticeUpdate,
|
|
|
systemNoticeSendUserIds } from "@/api/systemManagement/index";
|
|
|
import { systemNoticeGetNoticeType,systemUserSelect } from "@/api/commonality/permission";
|
|
@@ -170,14 +170,15 @@
|
|
|
if (valid) {
|
|
|
let obj = {
|
|
|
title:this.addForm.title,
|
|
|
- noticeType:this.addForm.noticeType,
|
|
|
- sendState:this.addForm.sendState,
|
|
|
content:this.$refs.UEditor.text||"",
|
|
|
}
|
|
|
- if(obj.noticeType == 1){
|
|
|
+ if(this.addForm.noticeType == 1){
|
|
|
+ obj.noticeType = this.addForm.noticeType;
|
|
|
obj.sendType = this.addForm.sendType;
|
|
|
obj.userIds = this.addForm.sendType == 5 ? this.addForm.userIds : [];
|
|
|
+ obj.sendState = this.addForm.sendState;
|
|
|
}else{
|
|
|
+ obj.notifyType = this.addForm.noticeType
|
|
|
obj.company = this.addForm.company;
|
|
|
}
|
|
|
if (this.addForm.noticeId){
|
|
@@ -187,10 +188,17 @@
|
|
|
this.backPage();
|
|
|
});
|
|
|
} else {
|
|
|
- systemNoticeAdd(obj).then(response => {
|
|
|
- this.msgSuccess(response.message)
|
|
|
- this.backPage();
|
|
|
- });
|
|
|
+ if(this.addForm.noticeType == 1){
|
|
|
+ systemNoticeAdd(obj).then(response => {
|
|
|
+ this.msgSuccess(response.message)
|
|
|
+ this.backPage();
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ systemNotifyAdd(obj).then(response => {
|
|
|
+ this.msgSuccess(response.message)
|
|
|
+ this.backPage();
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
})
|