dedsudiyu преди 11 месеца
родител
ревизия
9863bda9d7
променени са 3 файла, в които са добавени 29 реда и са изтрити 11 реда
  1. 8 0
      src/api/systemManagement/index.js
  2. 3 1
      src/assets/styles/index.scss
  3. 18 10
      src/views/integratedManagement/messageNotice/notice/addPage.vue

+ 8 - 0
src/api/systemManagement/index.js

@@ -288,6 +288,14 @@ export function systemNoticeList(data) {
     data: data
   })
 }
+// 发送-校院通知/工作计划
+export function systemNotifyAdd(data) {
+  return request({
+    url: '/system/notify/add',
+    method: 'post',
+    data: data
+  })
+}
 /*********************************角色管理*********************************/
 //角色列表
 export function systemRoleList(data) {

+ 3 - 1
src/assets/styles/index.scss

@@ -7,7 +7,9 @@
 *{
   margin:0;
   padding:0;
-  font-weight:500;
+  div,p,i{
+    font-weight:500;
+  }
 }
 /*火狐浏览器*/
 @-moz-document url-prefix() {

+ 18 - 10
src/views/integratedManagement/messageNotice/notice/addPage.vue

@@ -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();
+                });
+              }
             }
           }
         })