Sfoglia il codice sorgente

填报结果完成

xjc 4 anni fa
parent
commit
2067ce3c28
4 ha cambiato i file con 47 aggiunte e 65 eliminazioni
  1. 3 0
      src/api.js
  2. 1 1
      src/style/home.scss
  3. 42 63
      src/views/message/Message.vue
  4. 1 1
      src/views/system/Account.vue

+ 3 - 0
src/api.js

@@ -162,6 +162,9 @@ export default {
 	saveSurveyResult:params => {
 		return axios.post(`${baseURL}/api/admin/message/survey/result`, params);
 	},
+	getMessageSurveyAnalyse:params => {
+		return axios.get(`${baseURL}/api/admin/message/survey/analyse`, {params:params});
+	},
 	// 会议相关
 	getCityList:params => {
 		return axios.get(`${baseURL}/api/admin/common/city`, {params:params});

+ 1 - 1
src/style/home.scss

@@ -121,7 +121,7 @@ $height: 50px;
 		background: #fff;
 		padding: 20px;
 		margin-top: 12px;
-		height: calc(100vh - 190px);
+		// height: calc(100vh - 190px);
 		box-shadow:0px 4px 12px 0px rgba(0,0,0,0.12);
 		// overflow:scroll;
 	}

+ 42 - 63
src/views/message/Message.vue

@@ -126,21 +126,21 @@ a {
           <template slot-scope="scope">
             <span v-if="scope.row.receiver_ids"
               >共统计:
-              <a target="_blank" @click="analyseData('total')"
+              <a target="_blank" @click="analyseData('total',scope.row.id)"
                 ><span>{{ scope.row.receiver_ids.length }}</span></a
               >人<br />
             </span>
             已填报:<a
               :href="scope.row.fileurl"
               target="_blank"
-              @click="analyseData('finish')"
+              @click="analyseData('finish',scope.row.id)"
               ><span>{{ scope.row.finish_ids.length }}</span></a
             >人<br />
             <span v-if="scope.row.receiver_ids">
               未填报:<a
                 :href="scope.row.fileurl"
                 target="_blank"
-                @click="analyseData('unfinish')"
+                @click="analyseData('unfinish',scope.row.id)"
                 ><span>{{ scope.row.unfinish_ids.length }}</span></a
               >人<br
             /></span>
@@ -324,7 +324,7 @@ a {
     </el-dialog>
     <!-- 数据统计分析 -->
     <el-dialog
-      :title="dialogTitle"
+      :title="dialogTitle2"
       :close-on-click-modal="false"
       :visible.sync="dialogVisible2"
     >
@@ -347,13 +347,13 @@ a {
               <el-button type="primary" @click="search">搜索</el-button>
             </el-form-item>
             <el-form-item style="float: right">
-              <el-button @click="openDiag" type="primary">发送消息</el-button>
+              <el-button type="primary">导出Excel</el-button>
             </el-form-item>
           </el-form>
         </div>
         <el-table
           class="table"
-          :data="list"
+          :data="analyseDataList"
           height="50vh"
           border
           v-loading="loading"
@@ -361,65 +361,22 @@ a {
           row-key="id"
           style="width: 100%"
         >
-          <el-table-column prop="name" label="标题"> </el-table-column>
-          <el-table-column prop="name" label="附件">
-            <template slot-scope="scope">
-              <a :href="scope.row.fileurl" target="_blank"
-                ><span>{{ scope.row.filename }}</span></a
-              >
-            </template>
-          </el-table-column>
-          <el-table-column prop="cname" label="是否问卷">
-            <template slot-scope="scope">
-              <a @click="showSurvey(scope.row)" target="_blank"
-                ><span>查看问卷</span></a
-              >
-              <a
-                v-if="scope.row.template_qrcode"
-                :href="scope.row.template_qrcode"
-                target="_blank"
-                ><span> | 生成二维码</span></a
-              >
-            </template>
-          </el-table-column>
-          <el-table-column prop="cname" label="问卷统计">
-            <template slot-scope="scope">
-              <span v-if="scope.row.receiver_ids"
-                >共统计:
-                <a target="_blank" @click="analyseData('total')"
-                  ><span>{{ scope.row.receiver_ids.length }}</span></a
-                >人<br />
-              </span>
-              已填报:<a
-                :href="scope.row.fileurl"
-                target="_blank"
-                @click="analyseData('finish')"
-                ><span>{{ scope.row.finish_ids.length }}</span></a
-              >人<br />
-              <span v-if="scope.row.receiver_ids">
-                未填报:<a
-                  :href="scope.row.fileurl"
-                  target="_blank"
-                  @click="analyseData('unfinish')"
-                  ><span>{{ scope.row.unfinish_ids.length }}</span></a
-                >人<br
-              /></span>
-            </template>
-          </el-table-column>
-          <el-table-column prop="cname" label="发送者"> </el-table-column>
-          <el-table-column prop="receiver_names" label="接收者">
-          </el-table-column>
-          <el-table-column prop="ctime" label="发送时间"> </el-table-column>
-          <el-table-column prop="zip" width="150" label="操作">
+          <el-table-column prop="realname" label="姓名"> </el-table-column>
+          <el-table-column prop="journal_name" label="所属期刊"></el-table-column>
+          <el-table-column prop="cname" label="状态">
             <template slot-scope="scope">
-              <el-button class="edit" type="text" @click="edit(scope.row)"
-                >编辑</el-button
-              >
-              <el-button class="del" @click="del(scope.row.id)" type="text"
-                >删除</el-button
-              >
+              <span v-if="scope.row.post_status">已填报</span>
+              <span v-else>未填报</span>
             </template>
           </el-table-column>
+          <el-table-column prop="post_time" label="填报时间"> </el-table-column>
+          <el-table-column prop="zip" width="80" label="操作">
+          <template slot-scope="scope">
+            <el-button class="edit" type="text" @click="showPostResult"
+              >查看</el-button
+            >
+          </template>
+        </el-table-column>
         </el-table>
         <Page
           ref="pageButton"
@@ -430,6 +387,16 @@ a {
         />
       </div>
     </el-dialog>
+    <!-- 展示填报结果 -->
+    <el-dialog
+    :title="dialogTitle3"
+    :close-on-click-modal="false"
+    :visible.sync="dialogVisible3"
+    >
+    <div class="content">
+        111111
+    </div>
+    </el-dialog>
   </section>
 </template>
 <script>
@@ -441,6 +408,7 @@ export default {
   data() {
     return {
     //   checked: [],
+      analyseDataList:[],
       title: "",
       widgetList: [],
       form: { name: "", page: 1, page_size: 20 },
@@ -454,7 +422,10 @@ export default {
       dialogVisible: false,
       dialogVisible1: false,
       dialogVisible2: false,
+      dialogVisible3:false,
       dialogTitle: "",
+      dialogTitle2:"",
+      dialogTitle3:"",
       defaultProps: {},
       data: [],
       templateList: [],
@@ -525,8 +496,16 @@ export default {
   },
   computed() {},
   methods: {
-    analyseData(type) {
+    showPostResult(){
+        this.dialogTitle3 = "填报结果"
+        this.dialogVisible3 = true
+    },
+    analyseData(type,message_id) {
+      this.dialogTitle2 = "统计结果"
       this.dialogVisible2 = true;
+      this.$api.getMessageSurveyAnalyse({type:type,message_id:message_id}).then((res)=>{
+          this.analyseDataList = res.data.data.list
+      })
     },
     handleSuccess(res, file) {
       this.form2[res.data.type] = res.data.url;

+ 1 - 1
src/views/system/Account.vue

@@ -105,7 +105,7 @@
         :visible.sync="dialogVisible">
         <el-form size="small" class="preview" :inline='false' label-width="80px" :model="form1" ref="form1" :rules="rules">
                 <el-form-item label="所属期刊" prop='journal_id'>
-                    <el-select v-model="form1.journal_id" placeholder="请选择期刊">
+                    <el-select v-model="form1.journal_id" placeholder="请选择期刊" filterable>
                         <el-option
                         v-for="item in journalsList"
                         :key="item.id"