Bladeren bron

Merge branch 'V3.0.1'

Yue 2 jaren geleden
bovenliggende
commit
f84139159e
2 gewijzigde bestanden met toevoegingen van 21 en 13 verwijderingen
  1. 5 3
      src/core/services/RequestService.ts
  2. 16 10
      src/views/examApproval/reptNotice.vue

+ 5 - 3
src/core/services/RequestService.ts

@@ -5,8 +5,8 @@ import VueAxios from "vue-axios"
 import JwtService from "@/core/services/JwtService"
 import configs from "@/core/config/Index"
 import { dialog, toast } from "@/core/utils/message"
-import router from "@/router"
-
+import { useRouter } from "vue-router"
+const router=useRouter()
 export interface errorObj {
   message: string
   details?: string
@@ -215,7 +215,9 @@ class RequestService {
     if (option.url && option.url.toLocaleLowerCase().indexOf("/get") > 0) {
       option.successAlert = option.successAlert ?? false
     }
-    option.data = option.data || {}
+    if (!option.data&&option.data==undefined) {
+      option.data={}
+    }
     option.method = "post"
     return this.request(option)
   }

+ 16 - 10
src/views/examApproval/reptNotice.vue

@@ -114,7 +114,7 @@ const notity = function (row: any) {
 }
 
 function getDetail(row: any) {
-  Rs.post(`sys/notice/getNoticeDetail`, { params: row.id }).then((res) => {
+  Rs.post(`sys/notice/getNoticeDetail`, { data: row.id }).then((res) => {
     details.value = Object.assign({}, res.data)
     details.value.clear_date = moment(res.data.clear_date, "YYYYMMDD").format("YYYY-MM-DD")
     modal.value.show()
@@ -191,7 +191,13 @@ function getDetail(row: any) {
       <span class="table-action" @click="notity(row)">查看通知</span>
     </template>
   </VbDataTable>
-  <VbModal v-model:modal="modal" :title="modalTitle">
+  <VbModal
+    v-model:modal="modal"
+    :title="modalTitle"
+    :confirm-btn="false"
+    close-btn-class="btn btn-primary"
+    :modal-class="`modal-${operationType == 'R' ? 'md' : 'lg'}`"
+  >
     <template #body>
       <el-row v-if="operationType == 'R' && details.type == 1">
         <el-col :span="12">
@@ -214,13 +220,13 @@ function getDetail(row: any) {
         </el-col>
       </el-row>
       <el-row v-if="operationType == 'R' && details.type == 0">
-        <el-col :span="12">
+        <el-col :span="23">
           <dl>
             <dt>设备名称:</dt>
             <dd>{{ details.device_name }}</dd>
           </dl>
         </el-col>
-        <el-col :span="12">
+        <el-col :span="24">
           <dl>
             <dt>异常类型:</dt>
             <dd>{{ details.warn_type_name }}</dd>
@@ -228,14 +234,14 @@ function getDetail(row: any) {
         </el-col>
         <el-col :span="24">
           <dl>
-            <dt>告警原因:</dt>
-            <dd>{{ details.content }}</dd>
+            <dt>异常原因:</dt>
+            <dd>{{ details.remark }}</dd>
           </dl>
         </el-col>
         <el-col :span="24">
           <dl>
-            <dt>异常原因:</dt>
-            <dd>{{ details.remark }}</dd>
+            <dt>告警原因:</dt>
+            <dd>{{ details.content }}</dd>
           </dl>
         </el-col>
       </el-row>
@@ -280,7 +286,7 @@ function getDetail(row: any) {
             <dd>{{ details.company_name }}</dd>
           </dl>
         </el-col>
-        <el-col :span="24">
+        <el-col :span="12">
           <dl>
             <dt>异常类型:</dt>
             <dd>{{ details.warn_type_name }}</dd>
@@ -305,7 +311,7 @@ function getDetail(row: any) {
           </dl>
         </el-col>
       </el-row>
-      <div class="separator mt-2 mb-5"></div>
+      <div v-if="operationType == 'N'" class="separator mt-2 mb-5"></div>
       <el-row v-if="operationType == 'N'">
         <el-col :span="12">
           <dl>