Kaynağa Gözat

增加项目会议内容实时保存功能

humingbo 1 yıl önce
ebeveyn
işleme
9d411c85a0
2 değiştirilmiş dosya ile 23 ekleme ve 5 silme
  1. 12 0
      src/api/meeting/meeting.js
  2. 11 5
      src/views/meeting/meeting.vue

+ 12 - 0
src/api/meeting/meeting.js

@@ -246,4 +246,16 @@ export function endMeeting(id){
 }
 
 
+/**
+ * 编辑会议内容
+ * @param data
+ * @returns {*}
+ */
+export function editMeetingContent(data){
+  return request({
+    url: '/meeting/editMeetingContent',
+    method: 'post',
+    data: data
+  })
+}
 

+ 11 - 5
src/views/meeting/meeting.vue

@@ -320,19 +320,19 @@
         <el-table-column label="会议问题" prop="question">
           <template slot-scope="scope">
             <el-input size="mini" v-model="scope.row.question" type="textarea"
-                      :autosize="{ minRows: 4, maxRows: 10}" ></el-input>
+                      :autosize="{ minRows: 4, maxRows: 10}" @input="editMeetingContents(scope.row)"></el-input>
           </template>
         </el-table-column>
         <el-table-column label="会议方案" prop="optionss">
           <template slot-scope="scope">
             <el-input size="mini" v-model="scope.row.optionss" type="textarea"
-                      :autosize="{ minRows: 4, maxRows: 10}"></el-input>
+                      :autosize="{ minRows: 4, maxRows: 10}" @input="editMeetingContents(scope.row)"></el-input>
           </template>
         </el-table-column>
         <el-table-column label="执行人" width="180">
           <template slot-scope="scope">
             <el-input size="mini" v-model="scope.row.executorName" :readonly="true"
-                      @keyup.enter.native="openUsers1('executorName',scope.row)">
+                      @keyup.enter.native="openUsers1('executorName',scope.row)" @input="editMeetingContents(scope.row)">
               <el-button @click="openUsers1('executorName',scope.row)" icon="el-icon-search" slot="append" ></el-button>
             </el-input>
           </template>
@@ -347,7 +347,7 @@
                             style="width: 100%"
                             range-separator="至"
                             start-placeholder="开始日期"
-                            end-placeholder="结束日期">
+                            end-placeholder="结束日期" @change="editMeetingContents(scope.row)" >
             </el-date-picker>
           </template>
         </el-table-column>
@@ -423,7 +423,7 @@ import {
   startMeetingById,
   meetingAuthById,
   meetingDeleteAuth,
-  endMeeting
+  endMeeting, editMeetingContent
 } from '@/api/meeting/meeting'
 import {getDeptUserTree} from '@/api/system/user'
 import {getProjectList} from "@/api/task/project";
@@ -1051,6 +1051,12 @@ export default {
       let date2 = new Date(time2);
       let duration = Math.abs(date1.getTime() - date2.getTime());
       return duration;
+    },
+    editMeetingContents(row){
+      let data=row;
+      editMeetingContent(data).then(res=>{
+        this.$message.success("操作成功!")
+      });
     }
   }