From 1c684aad3c5b368cb1dffa6a7ae8eb701ac243a9 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期四, 27 七月 2023 16:48:55 +0800
Subject: [PATCH] 新增响应措施和修改

---
 src/views/Admin/release.vue |   32 +++++++++++---------------------
 1 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/src/views/Admin/release.vue b/src/views/Admin/release.vue
index 6adf908..330525d 100644
--- a/src/views/Admin/release.vue
+++ b/src/views/Admin/release.vue
@@ -60,9 +60,9 @@
             <a-button @click="viewFile(item)" type="link" v-for="(item,index) in attachment" :key="index"><a-icon type="paper-clip"/>{{item.attachmentName}}</a-button>
           </div>
         </template >
-        <template #responseSituation="text">
-          <a-tag :color="text === 3 ? 'green' :text === 2? 'blue':text === 1?'orange':'red'">
-            {{text == 1 ? '均未叫应' : text == 2 ?'部分叫应':text == 3 ?'全部叫应' : ''}}
+        <template #responsesRate="text">
+          <a-tag :color="Number(text.split('%')[0]) == 100 ? 'green' :Number(text.split('%')[0]) == 0? 'red':'orange'">
+            {{ text }}
           </a-tag>
         </template>
         <template #operation="text, record, index">
@@ -73,12 +73,6 @@
       <msg-detail-mod ref="msgDetail"></msg-detail-mod>
       <call-list-mod ref="callList" @refresh="getData"></call-list-mod>
     </div>
-	  <!-- 对话框 -->
-	  <a-modal title="查看叫应详情" 
-	  okText="确认"
-	  cancelText="关闭"
-	  :visible="visible" :confirm-loading="confirmLoading" @ok="handleOk" @cancel="handleOk">
-	  </a-modal>
   </div>
 </template>
 <script>
@@ -141,10 +135,10 @@
 		},
 		{
 			title: '叫应情况',
-			dataIndex: 'responseSituation',
+			dataIndex: 'responsesRate',
 			width: '10%',
 			scopedSlots: {
-				customRender: 'responseSituation'
+				customRender: 'responsesRate'
 			}, //设置定制化表格数据
 		},
 		{
@@ -153,7 +147,7 @@
 			scopedSlots: {
 				customRender: 'operation'
 			},
-		},
+		}
 	];
 	export default {
     name: 'release',
@@ -255,10 +249,11 @@
             let blob = new Blob([res.data],{type: res.data.type})
             link.style.display = "none";
             link.href = URL.createObjectURL(blob); // 创建URL
-            link.setAttribute("download", item.attachmentName);
-            document.body.appendChild(link);
-            link.click();
-            document.body.removeChild(link);
+            window.open(link.href)
+            // link.setAttribute("download", item.attachmentName);
+            // document.body.appendChild(link);
+            // link.click();
+            // document.body.removeChild(link);
           } else {
             this.$message.error('获取文件失败')
           }
@@ -283,11 +278,6 @@
         t.timeRange = []
         t.getData()
       },
-
-			//弹出层
-			showModal() {
-				this.visible = true;
-			},
 
 			handleOk(e) {
 				this.visible = false;

--
Gitblit v1.9.2