From 7116e6e5a387f769ac610d3396a7d61771eb90dd Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期日, 28 四月 2024 14:41:26 +0800
Subject: [PATCH] Merge branch 'master' into dev-threejs

---
 src/api/platform/check-score.js           |   16 +
 src/views/system/result/detail/detail.vue |  511 ++++++++----------------------------------
 src/views/system/contract/index.vue       |   59 +++-
 src/api/platform/calculate-money-rule.js  |    8 
 src/views/system/result/detail/index1.vue |   74 ++++--
 src/components/ImagePreview/index.vue     |    6 
 src/views/system/report/index.vue         |    7 
 7 files changed, 219 insertions(+), 462 deletions(-)

diff --git a/src/api/platform/calculate-money-rule.js b/src/api/platform/calculate-money-rule.js
index 025aebd..12285d2 100644
--- a/src/api/platform/calculate-money-rule.js
+++ b/src/api/platform/calculate-money-rule.js
@@ -9,6 +9,14 @@
   })
 }
 
+// 鏍规嵁鍚堝悓id鏌ヨ杩濈害瑙勫垯鍒楄〃
+export function getMoneyRulesByContractId(data) {
+  return request({
+    url: '/system/contract/selectMoneyRules?contractId=' + data,
+    method: 'get'
+  })
+}
+
 // 鏌ヨ鏍哥畻瑙勫垯璇︾粏
 export function getRule(id) {
   return request({
diff --git a/src/api/platform/check-score.js b/src/api/platform/check-score.js
index 2871241..e368106 100644
--- a/src/api/platform/check-score.js
+++ b/src/api/platform/check-score.js
@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 
-// 鏌ヨ鑰冩牳绉垎鏄庣粏鍒楄〃
+// 鏌ヨ鑰冩牳绉垎鍗$墖鍒楄〃
 export function listScore(query) {
   return request({
     url: '/check/score/list',
@@ -8,11 +8,19 @@
     params: query
   })
 }
+// 鏌ヨ鑰冩牳绉垎鏄庣粏鍒楄〃
+export function detailScore(query) {
+  return request({
+    url: '/check/score/detail',
+    method: 'get',
+    params: query
+  })
+}
 
 // 鏌ヨ鑰冩牳绉垎鏄庣粏璇︾粏
-export function getScore(id) {
+export function getScoreIndex(id) {
   return request({
-    url: '/check/score/' + id,
+    url: '/check/score/detail/' + id,
     method: 'get'
   })
 }
@@ -35,7 +43,7 @@
   })
 }
 
-// 淇敼鑰冩牳绉垎鏄庣粏
+// 鍙戝竷鑰冩牳绉垎
 export function publishScore(data) {
   return request({
     url: '/check/score/publish',
diff --git a/src/components/ImagePreview/index.vue b/src/components/ImagePreview/index.vue
index 3c770c7..f00a0d0 100644
--- a/src/components/ImagePreview/index.vue
+++ b/src/components/ImagePreview/index.vue
@@ -13,7 +13,7 @@
 
 <script>
 import { isExternal } from "@/utils/validate";
-
+const DEFAULT_IMAGE = 'https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357';
 export default {
   name: "ImagePreview",
   props: {
@@ -33,7 +33,7 @@
   computed: {
     realSrc() {
       if (!this.src) {
-        return;
+        return DEFAULT_IMAGE;
       }
       let real_src = this.src.split(",")[0];
       if (isExternal(real_src)) {
@@ -43,7 +43,7 @@
     },
     realSrcList() {
       if (!this.src) {
-        return;
+        return [DEFAULT_IMAGE];
       }
       let real_src_list = this.src.split(",");
       let srcList = [];
diff --git a/src/views/system/contract/index.vue b/src/views/system/contract/index.vue
index d495071..61ac223 100644
--- a/src/views/system/contract/index.vue
+++ b/src/views/system/contract/index.vue
@@ -1,12 +1,11 @@
 <template>
   <div class="app-container">
 
-    <el-row>
+    <el-row v-loading="loading">
       <el-col :span="8" v-for="(item, index) in contractList" :key="index" style="margin: 10px;width: 30%;">
         <el-card :body-style="{ padding: '0px' }">
-          <el-image style="width: 420px;height: 187px;"
-            :preview-src-list="['https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357']"
-            fit="cover" src="https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357"
+          <ImagePreview style="width: 100%;height: 187px;"
+            fit="cover" :src="item.attachment"
             class="image" />
           <div style="padding: 14px;">
             <span>{{ item.name }}</span>
@@ -34,10 +33,22 @@
           <el-collapse-item  v-for="(item, index) in ruleData" :key="index" :title="item.ruleName" :name="index">
             <div class="inline-input-container" v-for="(item, index) in item.children" :key="index">
               <b>{{ item.ruleDesc }}</b> <br v-if="item.ruleDesc"/>
-              <el-tooltip class="item" v-for="(item, index) in item.children" :key="index" effect="dark" :content="item.deductCategory + ' ' + item.calcFraction + (item.calcUnit ? '/' + item.calcUnit : '')" placement="top">
+              <el-tooltip class="item" v-for="(item, index) in item.children" :key="index" effect="dark" :content="item.deductCategory == '鍒嗘暟涔樹互鏁伴噺' ? '鎵�' + item.calcFraction  + '涔樹互鏁伴噺 ' : item.deductCategory == '闄や互鏁伴噺鍚庝箻浠ュ垎鏁�' ? '鎵�' + item.calcFraction + '鍒�/' +  item.calcUnit + '灏忔椂' : item.deductCategory + ' ' + item.calcFraction" placement="top">
                 <span>{{ item.ruleCondition }}<br/></span>
                 <!-- {{ item.deductCategory }} {{ item.calcFraction }}{{ item.calcUnit ? "/" + item.calcUnit : ''  }} -->
             </el-tooltip>
+            </div>
+          </el-collapse-item>
+          <el-collapse-item title="鑰冩牳缁撴灉搴旂敤瑙勫垯" :name="ruleData.length">
+            <div class="inline-input-container">
+                <span v-for="(item, index) in moneyRules" :key="index">
+                    <div>
+                      <span>{{ item.scoreCondition }}</span>
+                      <el-tooltip class="item" effect="dark" :content="item.description" placement="top">
+                        <span style="margin-left: 20px;">{{ item.description }}</span>
+                      </el-tooltip>
+                    </div>
+                </span>
             </div>
           </el-collapse-item>
           <el-form-item label="鍚堝悓闄勪欢" prop="attachment" class="top">
@@ -79,9 +90,9 @@
             <div class="row-right" style="margin-left: 80px;">
               <div class="margin-5">
                 <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
-                  :action="upload.url + '?unitId=' + upload.unitId + '&startTime=' + upload.startTime + '&endTime=' + upload.endTime + '&name=' + upload.name"
+                  :action="upload.url"
                   :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess"
-                  :file-list="upload.fileList"
+                  :data="upload"
                   :auto-upload="false" drag style="text-align: center;">
                   <i class="el-icon-upload"></i>
                   <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
@@ -128,16 +139,20 @@
 </template>
 
 <script>
-import { listContract, getContract, updateContract, addContract } from "@/api/platform/contract";
+import { listContract, getContract, updateContract } from "@/api/platform/contract";
 import { getRuleListByContractId } from "../../../api/platform/calculate-rule";
+import { getMoneyRulesByContractId } from "../../../api/platform/calculate-money-rule";
 import { unitSelect } from "../../../api/platform/unit";
 import { deptSelect } from "../../../api/system/dept";
 import { getToken } from "@/utils/auth";
+import { ImagePreview } from "@/components/ImagePreview";
 
 export default {
   name: "Contract",
+  comments: { ImagePreview },
   data() {
     return {
+      loading: false,
       contractInfo: {},
       // 鍚堝悓瀵煎叆鍙傛暟
       upload: {
@@ -152,7 +167,6 @@
         // 涓婁紶鐨勫湴鍧�
         url: process.env.VUE_APP_BASE_API + "/system/contract/importData",
         ruleList: [],
-        fileList: [],
         unitId: '',
         startTime: '',
         endTime: ''
@@ -191,6 +205,7 @@
       // 鏄惁鏄剧ず璇︽儏
       detail: false,
       ruleData: [],
+      moneyRules: [],
       // 琛ㄥ崟鍙傛暟
       form: {
       },
@@ -267,14 +282,13 @@
       let that = this;
       this.$refs["form"].validate(valid => {
         if (valid) {
-          addContract(this.upload).then (response => {
-            if (response.code != 200) {
-              this.$message.error("鎿嶄綔澶辫触");
-            } else {
-              this.$message.success("鎿嶄綔鎴愬姛");
-            }
+          that.upload.ruleList = JSON.stringify(this.upload.ruleList);
+          that.loading = true;
+          that.upload.open = false;
+          that.$refs.upload.submit().then(() => {
+            that.loading = false;
+            that.reset();
           });
-          // that.$refs.upload.submit();
         }
       })
     },
@@ -318,6 +332,9 @@
         this.form.id = item.id;
         this.contractInfo = item;
       });
+      getMoneyRulesByContractId(item.id).then(response => {
+        this.moneyRules = response.data;
+      });
     },
     /** 鏂板鎸夐挳鎿嶄綔 */
     handleAdd() {
@@ -344,6 +361,16 @@
     /** 涓嬭浇鎸夐挳鎿嶄綔 */
     handleDownload (data) {
       this.$download.resource(data);
+    },
+    reset () {
+      this.upload = {
+        open: false,
+        name: undefined,
+        unitId: undefined,
+        timezone: undefined,
+        ruleList: []
+      };
+      this.resetForm("form");
     }
   }
 };
diff --git a/src/views/system/report/index.vue b/src/views/system/report/index.vue
index 3bdc812..3c0a06c 100644
--- a/src/views/system/report/index.vue
+++ b/src/views/system/report/index.vue
@@ -60,7 +60,8 @@
             <div class="info-item">
               <div class="info-label">涓婃姤鏉愭枡</div>
               <div class="info-list">
-                <div class="list-item" v-for="file in formatFileList(scope.row.reportMaterials)" :key="file" @click="showFile(file)">
+                <div class="list-item" v-for="file in formatFileList(scope.row.reportMaterials)" :key="file"
+                  @click="showFile(file)">
                   <div class="item-icon">
                     <i class="el-icon-document"></i>
                   </div>
@@ -141,7 +142,7 @@
           <editor v-model="form.reportContent" :min-height="192" />
         </el-form-item>
         <el-form-item label="涓婃姤鏉愭枡" prop="reportMaterials">
-          <file-upload v-model="form.reportMaterials" />
+          <file-upload v-model="form.reportMaterials" :fileType='fileType' />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -211,6 +212,8 @@
   name: "Report",
   data() {
     return {
+      fileType: ["doc", "xls", "xlsx", "ppt", "txt", "pdf", "png", "jpg"],
+
       // 鐐逛綅list
       pointList: [],
       // 閬僵灞�
diff --git a/src/views/system/result/detail/detail.vue b/src/views/system/result/detail/detail.vue
index d6f25ac..a6ff943 100644
--- a/src/views/system/result/detail/detail.vue
+++ b/src/views/system/result/detail/detail.vue
@@ -6,10 +6,10 @@
     <el-container>
       <el-main>
         <h2>鑰冩牳瑙勫垯</h2>
-        <el-table v-loading="loading" :data="ruleList" @selection-change="handleSelectionChange">
+        <el-table v-loading="loading" :data="checkRuleList" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="55" align="center" />
-          <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="ruleName" />
-          <el-table-column label="瑙勫垯鏉冮噸" align="center" prop="ruleWeight" />
+          <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="checkRuleName" />
+          <el-table-column label="瑙勫垯鏉冮噸" align="center" prop="weight" />
           <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
               <el-button
@@ -47,37 +47,37 @@
           </el-col>
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getRuleList"></right-toolbar>
         </el-row>
-        <el-table v-loading="loading" :data="checkResultList" @selection-change="handleSelectionChange">
-          <el-table-column type="selection" width="55" align="center" />
-          <el-table-column label="鑰冩牳鏃ユ湡" align="center" prop="date" width="120px" fixed/>
-          <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="target" width="120px"/>
-          <el-table-column label="骞冲彴鍦ㄧ嚎鐜�(鏉冮噸锛�0.5)" align="center" prop="platformOnline" width="120px"/>
-          <el-table-column label="涓�鏈轰竴妗e悎鏍肩巼(鏉冮噸锛�0.5)" align="center" prop="monitorQualification" width="120px"/>
-          <el-table-column label="涓�鏈轰竴妗f敞鍐岀巼(鏉冮噸锛�0.5)" align="center" prop="monitorRegistration" width="120px"/>
-          <el-table-column label="妗f鑰冩牳姣�(鏉冮噸锛�0.5)" align="center" prop="archivesRate" width="120px"/>
-          <el-table-column label="鐐逛綅鍦ㄧ嚎鐜�(鏉冮噸锛�1)" align="center" prop="siteOnline" width="120px"/>
-          <el-table-column label="褰曞儚鍙敤鐜�(鏉冮噸锛�1)" align="center" prop="videoAvailable" width="120px"/>
-          <el-table-column label="鏍囨敞姝g‘鐜�(鏉冮噸锛�0.5)" align="center" prop="annotationAccuracy" width="120px"/>
-          <el-table-column label="鏍℃椂姝g‘鐜�(鏉冮噸锛�0.5)" align="center" prop="timingAccuracy" width="120px"/>
-          <el-table-column label="閲嶇偣鐐逛綅鍦ㄧ嚎鐜�(鏉冮噸锛�0.5)" align="center" prop="keySiteOnline" width="120px"/>
-          <el-table-column label="閲嶇偣鐐逛綅褰曞儚鍙敤鐜�(鏉冮噸锛�0.5)" align="center" prop="keyVideoAvailable" width="120px"/>
-          <el-table-column label="閲嶇偣鐐逛綅鏍囨敞姝g‘鐜�(鏉冮噸锛�0.5)" align="center" prop="keyAnnotationAccuracy" width="120px"/>
-          <el-table-column label="閲嶇偣鐐逛綅鎸夋椂姝g‘鐜�(鏉冮噸锛�0.5)" align="center" prop="keyTimingAccuracy" width="120px"/>
-          <el-table-column label="閲嶇偣鎸囨尌鍥惧儚鍏畨閮ㄥ贰妫�缁撴灉(鏉冮噸锛�0.2)" align="center" prop="keyCommandImageInspection" width="120px"/>
-          <el-table-column label="閲嶇偣鎸囨尌鍥惧儚鐩綍鏍�(鏉冮噸锛�0.8)" align="center" prop="keyCommandImageDirectoryTree" width="120px"/>
-          <el-table-column label="鍦ㄧ嚎妫�鏌ュ钩鍙伴儴缃插強杩愯鐜�(鏉冮噸锛�0.075)" align="center" prop="onlineInspectionPlatform" width="120px"/>
-          <el-table-column label="瑙嗛浼犺緭缃戣祫浜у噯纭巼(鏉冮噸锛�0.075)" align="center" prop="videoTransmissionAssetsAccuracy" width="120px"/>
-          <el-table-column label="瑙嗛浼犺緭缃戣祫浜у急鍙d护寰楀垎姣斾緥(鏉冮噸锛�0.075)" align="center" prop="videoTransmissionAssetsWeakPasswordScore" width="120px"/>
-          <el-table-column label="瑙嗛浼犺緭缃戝嵄闄╄祫浜у緱鍒嗘瘮閲�(鏉冮噸锛�0.075)" align="center" prop="videoTransmissionDangerousAssetsScore" width="120px"/>
-          <el-table-column label="瑙嗛浼犺緭缃戣竟鐣屽畬鏁存�ф娴嬫墸鍒嗛」(鏉冮噸锛�0.2)" align="center" prop="videoTransmissionBoundaryIntegrityDetection" width="120px"/>
-          <el-table-column label="鏈堣繍琛岀巼" align="center" prop="operatingRate"/>
+
+        <el-table  v-loading="loading" :data="dataMap" @selection-change="handleSelectionChange">
+          <el-table-column label="鑰冩牳鏃ユ湡" align="center" prop="create_time" width="120px" fixed>
+            <template slot-scope="scope">
+              <span>{{ scope.row.create_time.split('T')[0] }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="dept_id" width="120px" fixed>
+            <template slot-scope="scope">
+              <span>{{ translateDeptId(scope.row.dept_id) }}</span>
+            </template>
+          </el-table-column>
+          <template v-for="item in tableData">
+            <el-table-column
+              :key="item.ruleName"
+              :label="item.ruleName"
+              align="center"
+              width = "120px"
+            >
+              <template slot-scope="scope">
+                <span>{{ scope.row[item.ruleIndex] }}</span>
+              </template>
+            </el-table-column>
+          </template>
           <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"  fixed="right">
             <template slot-scope="scope">
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
-                @click="handleUpdate(scope.row,scope.index)"
+                @click="handleIndexUpdate(scope.row,scope.index)"
               >淇敼</el-button>
             </template>
           </el-table-column>
@@ -85,56 +85,14 @@
       </el-main>
     </el-container>
 
-    <!-- 娣诲姞鎴栦慨鏀硅�冩牳瑙勫垯瀵硅瘽妗� -->
+    <!-- 淇敼鑰冩牳鏉冮噸瀵硅瘽妗� -->
     <el-dialog :title="title" :visible.sync="ruleOpen" width="600px" append-to-body>
       <el-form ref="form" :model="ruleForm" :rules="rules" label-width="80px">
-        <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName">
-          <el-input v-model="ruleForm.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" />
+        <el-form-item label="瑙勫垯鍚嶇О" prop="checkRuleName">
+          <el-input v-model="ruleForm.checkRuleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" disabled/>
         </el-form-item>
-        <el-form-item label="瑙勫垯绫诲瀷" prop="category">
-          <el-select v-model="ruleForm.category" placeholder="瑙勫垯绫诲瀷">
-            <el-option
-              v-for="item in categoryList"
-              :key="item.id"
-              :label="item.value"
-              :value="item.id">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDetail">
-          <el-input v-model="ruleForm.ruleDetail" type="textarea" show-word-limit maxlength="150" placeholder="璇疯緭鍏ヨ鍒欐弿杩�"/>
-        </el-form-item>
-        <el-form-item label="鍙傛暟閰嶇疆" prop="ruleDetail">
-          <div class="row-warp">
-            <div class="row">
-              <div class="row-left">鍙傛暟鍚�</div>
-              <div class="row-right">鏉′欢</div>
-            </div>
-            <div class="row">
-              <div class="row-left">澶╃綉瑙嗛鐐逛綅鏁�</div>
-              <div class="row-right">
-                <div>涓嶅皯浜�</div>
-                <div>
-                  <el-input class="input-w" type="number" v-model="ruleForm.videoPointNum"/>{{" %"}}
-                </div>
-              </div>
-            </div>
-            <div class="row">
-              <div class="row-left">杞﹁締鍗″彛鐐逛綅鏁�</div>
-              <div class="row-right">
-                <div>涓嶅皯浜�</div>
-                <div><el-input class="input-w" type="number" v-model="ruleForm.vehicleCheckpointNum"/></div>{{" %"}}
-              </div>
-            </div>
-            <div class="row">
-              <div class="row-left">浜鸿劯鍗″彛鐐逛綅鏁�</div>
-              <div class="row-right">
-                <div>涓嶅皯浜�</div>
-                <div>
-                  <el-input class="input-w" type="number" v-model="ruleForm.faceChceckpointNum" /></div>{{" %"}}
-              </div>
-            </div>
-          </div>
+        <el-form-item label="瑙勫垯鏉冮噸" prop="weight">
+          <el-input-number v-model="ruleForm.weight" :precision="1" placeholder="璇疯緭鍏ヨ鍒欐潈閲�" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -143,76 +101,22 @@
       </div>
     </el-dialog>
 
-    <!-- 瑙勫垯璇︽儏 -->
-    <el-dialog title="瑙勫垯璇︽儏" :visible.sync="ruleDetailOpen" width="50%" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="瑙勫垯鍚嶇О" prop="ruleName">
-          <el-input class="input" disabled v-model="form.ruleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" />
-        </el-form-item>
-        <el-form-item label="杩愮淮鍏徃" prop="companyName">
-          <el-input class="input" disabled :value ="companyName" placeholder="璇疯緭鍏ヨ繍缁村叕鍙稿悕绉�"></el-input>
-        </el-form-item>
-        <el-form-item label="瑙勫垯鎻忚堪" prop="ruleDesc">
-          <el-input class="input" disabled v-model="form.ruleDesc" placeholder="璇疯緭鍏ヨ鍒欐弿杩�" />
-        </el-form-item>
-        <el-form-item label="瑙勫垯璁剧疆">
-          <div >
-            <div class="line">
-              <div class="line-left">鏃堕挓鍚屾锛堣秴杩嚶�3绉掍负涓嶅悎鏍硷級24灏忔椂鍐呮湭淇鐨勶細鎵i櫎鐩稿叧闀滃ご鏁伴噺*</div>
-              <div class="line-right"><el-input disabled v-model="jsonRule.overTime" type="text"/></div>鍒�
-            </div>
-            <div class="line">
-              <div class="line-left">OSD鏍囪瘑涓嶆弧瓒炽�奊AT 751-2008 瑙嗛鍥惧儚鏂囧瓧鏍囨敞瑙勮寖銆嬶紝24灏忔椂鍐呮湭淇鐨勶細鏍囨墸闄ょ浉鍏抽暅澶存暟閲�*</div>
-              <div class="line-right"><el-input disabled v-model="jsonRule.failNum" type="text"/></div>鍒�
-            </div>
-            <div class="line">
-              <div class="line-left">鐢ㄦ埛鎶芥锛屼竴鏈轰竴妗f暟鎹」涓嶅悎鏍硷紙鎻愪緵铏氬亣鏁版嵁鎴栭敊璇暟鎹负涓嶅悎鏍硷級锛�24灏忔椂鍐呮湭淇鐨勶細鎵i櫎鐩稿叧闀滃ご鏁伴噺*</div>
-              <div class="line-right"><el-input disabled v-model="jsonRule.failNum" type="text"/></div>鍒�
-            </div>
-          </div>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="cancel">鍏抽棴</el-button>
-      </div>
-    </el-dialog>
+    <!-- 淇敼鑰冩牳鎸囨爣瀵硅瘽妗� -->
+    <el-dialog :title="title" :visible.sync="indexOpen" width="600px" append-to-body>
+      <el-form ref="form" :model="indexForm" :rules="rules" label-width="150px">
+        <el-form-item label="鑰冩牳鏃ユ湡" prop="create_time">
+          <el-input v-model="ruleForm.create_time" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" disabled>
 
-    <!-- 娣诲姞鎴栦慨鏀硅�冩牳璁″垎瀵硅瘽妗� -->
-    <el-dialog :title="title" :visible.sync="scoreOpen" width="500px" append-to-body>
-      <el-form ref="form" :model="scoreForm" :rules="rules" label-width="80px">
-        <el-form-item label="鍒嗗��" prop="score">
-          <el-input v-model="scoreForm.score" placeholder="璇疯緭鍏ュ垎鍊�" />
+          </el-input>
         </el-form-item>
-        <el-form-item label="鑰冩牳鍚�" prop="examineId">
-          <el-select v-model="scoreForm.examineId" placeholder="璇烽�夋嫨">
-            <el-option
-              v-for="item in examineList"
-              :key="item.id"
-              :label="item.value"
-              :value="item.id">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="鑰冩牳瀵硅薄" prop="unitId">
-          <el-select v-model="scoreForm.unitId" placeholder="璇烽�夋嫨">
-            <el-option
-              v-for="item in unitList"
-              :key="item.id"
-              :label="item.value"
-              :value="item.id">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="鑰冩牳瑙勫垯" prop="ruleCategory">
-          <el-select v-model="scoreForm.ruleCategory" placeholder="璇烽�夋嫨">
-            <el-option
-              v-for="item in ruleCategoryList"
-              :key="item.id"
-              :label="item.value"
-              :value="item.id">
-            </el-option>
-          </el-select>
-        </el-form-item>
+<!--        <el-form-item label="鑰冩牳瀵硅薄" prop="checkRuleName">-->
+<!--          <el-input v-model="ruleForm.checkRuleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" disabled/>-->
+<!--        </el-form-item>-->
+        <div v-for="item in tableData" :key="item.ruleIndex">
+          <el-form-item :label="item.ruleName" :prop="item.ruleIndex">
+            <el-input-number v-model="indexForm[item.ruleIndex]" :precision="4" placeholder="璇疯緭鍏ユ寚鏍�"></el-input-number>
+          </el-form-item>
+        </div>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
@@ -224,59 +128,20 @@
 
 <script>
 import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result";
-import { listCheckRule, getCheckRule, delCheckRule, addCheckRule, updateCheckRule } from "@/api/platform/check-rule";
-import { listScore, getScore, delScore, addScore, updateScore } from "@/api/platform/check-score";
-import {unitSelect} from "@/api/platform/unit";
-import {publishSelect} from "@/api/platform/check-publish";
+import { listScore, getScoreIndex, delScore, addScore, updateScore } from "@/api/platform/check-score";
+import { areaSelect } from '@/api/system/dept'
 
 export default {
   name: "CheckResult",
   dicts: ['platform_audit_state'],
   data() {
     return {
-      activeIndex: '1',
-      activeIndex2: '1',
-      activeNames: ['1'],
-      companyName: "鎴愰兘x杩愮淮鍏徃",
-      detailTitle: '',
-      detailOpen: false,
-      detail:{
-      },
-      examineList: [],
-      unitList: [
-        {id:2,value: '鎴愰兘x杩愮淮'},
-        {id:3,value: '鑷祦浜曞尯'},
-      ],
-      ruleCategoryList: [
-        { id: 1, value: '瑙嗛鍦ㄧ嚎鐜�' },
-        { id: 2, value: '瀛樺偍鏁呴殰' },
-        { id: 3, value: '瑙嗗浘搴撳鎺ョǔ瀹氭��' },
-        { id: 4, value: '涓�鏈轰竴妗�24灏忔椂鏈慨澶�' },
-        { id: 5, value: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�' },
-      ],
-      tableData: [{
-        name: '瑙嗛骞冲潎鍦ㄧ嚎鐜�',
-        content: '97%',
-        score: '-5'
-      }, {
-        name: '涓�鏈轰竴妗�24灏忔椂鏈慨澶�',
-        content: '5涓�',
-        score: '-0.5'
-      }, {
-        name: '瀛樺偍鏁呴殰',
-        content: '5灏忔椂',
-        score: '-0.3'
-      }, {
-        name: '鏃堕挓涓嶅悓姝�24灏忔椂鏈慨澶�',
-        content: '3涓�',
-        score: '-0.5'
-      }],
-      // 杩愮淮绫诲瀷
-      categoryList: [
-        { id: 1, value: '瑙嗛鐩戞帶' },
-        { id: 2, value: '杞﹁締璇嗗埆' },
-        { id: 3, value: '浜鸿劯璇嗗埆' },
-      ],
+      id: null,
+      examineTag: null,
+      deptId: null,
+      areaList:[],
+      tableData: [],
+      dataMap: [],
       manualScoreOpen: false,
       manualScoreForm: {},
       manualScoreTitle: '',
@@ -293,223 +158,72 @@
       // 鎬绘潯鏁�
       total: 0,
       // 鑰冩牳缁撴灉琛ㄦ牸鏁版嵁
-      checkResultList: [
-        {
-          date: '2024-04-02',
-          target: '鑷祦浜曞尯',
-          platformOnline: '97%',
-          monitorQualification: '97%',
-          monitorRegistration: '97%',
-          archivesRate: '97%',
-          siteOnline: '97%',
-          videoAvailable: '97%',
-          annotationAccuracy: '97%',
-          timingAccuracy: '97%',
-          keySiteOnline: '97%',
-          keyVideoAvailable: '97%',
-          keyAnnotationAccuracy: '97%',
-          keyTimingAccuracy: '97%',
-          keyCommandImageInspection: '97%',
-          keyCommandImageDirectoryTree: '97%',
-          onlineInspectionPlatform: '97%',
-          videoTransmissionAssetsAccuracy: '97%',
-          videoTransmissionAssetsWeakPasswordScore: '97%',
-          videoTransmissionDangerousAssetsScore: '97%',
-          videoTransmissionBoundaryIntegrityDetection: '97%',
-          operatingRate: '97%',
-        },
-        {
-          date: '2024-04-03',
-          target: '鑷祦浜曞尯',
-          platformOnline: '97%',
-          monitorQualification: '97%',
-          monitorRegistration: '97%',
-          archivesRate: '97%',
-          siteOnline: '97%',
-          videoAvailable: '97%',
-          annotationAccuracy: '97%',
-          timingAccuracy: '97%',
-          keySiteOnline: '97%',
-          keyVideoAvailable: '97%',
-          keyAnnotationAccuracy: '97%',
-          keyTimingAccuracy: '97%',
-          keyCommandImageInspection: '97%',
-          keyCommandImageDirectoryTree: '97%',
-          onlineInspectionPlatform: '97%',
-          videoTransmissionAssetsAccuracy: '97%',
-          videoTransmissionAssetsWeakPasswordScore: '97%',
-          videoTransmissionDangerousAssetsScore: '97%',
-          videoTransmissionBoundaryIntegrityDetection: '97%',
-          operatingRate: '97%',
-        }
-
-      ],
+      checkRuleList: [],
       scoreTotal: 3,
       // 寮瑰嚭灞傛爣棰�
       title: "",
       // 鏄惁鏄剧ず寮瑰嚭灞�
-      scoreOpen: false,
       ruleOpen: false,
-      ruleDetailOpen: false,
+      indexOpen: false,
       // 閫昏緫鍒犻櫎鏃堕棿鑼冨洿
       daterangeCheckTime: [],
-
       // 琛ㄥ崟鍙傛暟
-      form: {},
-      scoreForm: {},
+      indexForm: {},
       ruleForm: {},
-      jsonRule: {},
-      // 鑰冩牳瑙勫垯鍒楄〃
-      ruleList: [
-        {ruleName: '骞冲彴鍦ㄧ嚎鐜�',ruleWeight: 0.5},
-        {ruleName: '涓�鏈轰竴妗e悎鏍肩巼',ruleWeight: 0.5},
-        {ruleName: '涓�鏈轰竴妗e湪绾跨巼',ruleWeight: 0.5},
-      ],
-      // 鑰冩牳璁″垎琛ㄦ牸鏁版嵁
-      scoreList: [],
-      //杩濈害瑙勫垯璇锋眰鍙傛暟
+      //璇锋眰鍙傛暟
       queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        ruleName: null,
-        ruleStatus: null,
-        createTime: null,
+        id: null,
       },
-      //鑰冩牳鍒嗘暟璇锋眰鍙傛暟
-      scoreQueryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        examineCategory: 2,
-      },
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() > Date.now();
-        },
-        shortcuts: [{
-          text: '浠婂ぉ',
-          onClick(picker) {
-            picker.$emit('pick', new Date());
-          }
-        }, {
-          text: '鏄ㄥぉ',
-          onClick(picker) {
-            const date = new Date();
-            date.setTime(date.getTime() - 3600 * 1000 * 24);
-            picker.$emit('pick', date);
-          }
-        }, {
-          text: '涓�鍛ㄥ墠',
-          onClick(picker) {
-            const date = new Date();
-            date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
-            picker.$emit('pick', date);
-          }
-        }]
-      },
-      value1: '',
-      value2: '',
       // 琛ㄥ崟鏍¢獙
-      rules: {
-      }
+      rules: {}
     };
   },
   created() {
     //鑰冩牳鎴愮哗璇︽儏璺宠浆鍙傛暟鎺ユ敹
-    if(this.$route.query.detail){
-      this.detail = this.$route.query.detail
-      console.log(this.$route.query.detail,"detail------------")
+    if(this.$route.query.id){
+      this.id = this.$route.query.id
     }
-    // 鑰冩牳瑙勫垯鍒楄〃
-    // this.getRuleList();
     // 鑰冩牳绉垎鍒楄〃
-    this.getScoreList();
-    // this.selectUnit();
-    this.selectExamine();
+    this.getList();
+    this.areaSelect();
   },
   methods: {
-    handleChange(val) {
-      console.log(val);
-    },
-    // 杩愮淮鍏徃涓嬫媺鏁版嵁
-    // selectUnit() {
-    //   unitSelect().then(res => {
-    //     this.unitList = res.data;
-    //   })
-    // },
-    // 鑰冩牳涓嬫媺鏁版嵁
-    selectExamine() {
-      publishSelect().then(res => {
-        this.examineList = res.data;
-      })
-    },
     /** 鏌ヨ鑰冩牳璁″垎鍒楄〃 */
-    getScoreList() {
+    getList() {
       this.loading = true;
-      listScore(this.scoreQueryParams).then(response => {
-        this.scoreList = response.rows;
-        this.loading = false;
-      });
-    },
-    /** 鏌ヨ杩濈害瑙勫垯鍒楄〃 */
-    getRuleList() {
-      this.loading = true;
-      if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
-        this.queryParams["start"] = this.daterangeCreateTime[0];
-        this.queryParams["end"] = this.daterangeCreateTime[1];
-      }
-      listCheckRule(this.queryParams).then(response => {
-        this.ruleList = response.data;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    frequencyFormatter(row) {
-      if (row.frequency === "1") {
-        return "鏈堝害鑰冩牳"
-      }
-      if (row.frequency === "2") {
-        return "瀛e害鑰冩牳"
-      }
-    },
-    examineRangeFormatter(row) {
-      if (row.examineRange === "1") {
-        return "鍒嗗眬鑰冩牳"
-      }
-      if (row.examineRange === "2") {
-        return "甯傚眬鑰冩牳"
-      }
-    },
-    /** 鏌ヨ鑰冩牳缁撴灉鍒楄〃 */
-    getCheckResult() {
-      this.loading = true;
-      getCheckResult(id).then(response => {
-        this.detail = response.data;
+      getScoreIndex(this.id).then(response => {
+        this.checkRuleList = response.data.checkRuleList;
+        this.dataMap = response.data.scoreMap.dataMap;
+        this.tableData = response.data.scoreMap.tableData
         this.loading = false;
       });
     },
     // 鍙栨秷鎸夐挳
     cancel() {
-      this.scoreOpen = false;
       this.ruleOpen = false;
-      this.ruleDetailOpen = false;
-      this.ruleDetailOpen = false;
-      this.reset();
+      this.indexOpen = false;
+      this.reset("ruleForm");
+      this.reset("indexForm");
     },
     // 琛ㄥ崟閲嶇疆
-    reset() {
-      this.form = {
-        id: null,
-        checkUnitId: null,
-        checkPublishId: null,
-        checkScore: null,
-        systemScore: null,
-        manualScore: null,
-        checkTime: null,
-        createTime: null,
-        updateTime: null,
-        deleted: null
+    reset(formName) {
+      this.ruleForm = {
+        checkRuleName: null,
+        weight: null,
       };
-      this.resetForm("form");
+      this.indexForm = {
+      };
+      this.resetForm(formName);
+    },
+    translateDeptId(deptId) {
+      const department = this.areaList.find(dept => dept.id == deptId);
+      return department ? department.value : '鏈煡';
+    },
+    // 鍖哄煙涓嬫媺鏁版嵁
+    areaSelect() {
+      areaSelect().then(res => {
+        this.areaList = res.data;
+      })
     },
     cancelManualScore() {
       this.manualScoreForm = {};
@@ -534,20 +248,8 @@
       this.manualScoreOpen = true;
     },
 
-    handlePublish(row) {
-      let text = row.publish == 1 ? '鍙栨秷鍙戝竷' : '鍙戝竷';
-      const ids = row.id || this.ids;
-      this.$modal.confirm('鏄惁纭' + text + '鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() {
-        return publishCheckResult(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess(text + "鎴愬姛");
-      }).catch(() => {});
-
-    },
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery() {
-      this.queryParams.pageNum = 1;
       this.getList();
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
@@ -568,32 +270,19 @@
       this.open = true;
       this.title = "娣诲姞鑰冩牳缁撴灉";
     },
-    /** 淇敼绉垎鎸夐挳鎿嶄綔 */
-    handleScoreUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids
-      getScore(id).then(response => {
-        this.scoreForm = response.data;
-        this.scoreOpen = true;
-        this.title = "淇敼鑰冩牳璁″垎";
-      });
+    /** 淇敼鎸囨爣鎸夐挳鎿嶄綔 */
+    handleIndexUpdate(row) {
+      this.reset("indexForm");
+      this.indexForm = row;
+      this.indexOpen = true;
+      this.title = "淇敼鑰冩牳鎸囨爣";
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleRuleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids
-      getCheckRule(id).then(response => {
-        this.ruleForm = response.data;
-        this.ruleOpen = true;
-        this.title = "淇敼鑰冩牳瑙勫垯";
-
-      });
-    },
-    // 璇︽儏鎸夐挳
-    handleRuleDetail(row) {
-      this.ruleDetailOpen = true;
-      this.form = row;
-      this.jsonRule = JSON.parse(this.form.ruleDetail);
+      this.reset("ruleForm");
+      this.ruleForm = row;
+      this.ruleOpen = true;
+      this.title = "淇敼鑰冩牳瑙勫垯";
     },
     /** 鎻愪氦鎸夐挳 */
     submitForm() {
diff --git a/src/views/system/result/detail/index1.vue b/src/views/system/result/detail/index1.vue
index f0f402b..f85981a 100644
--- a/src/views/system/result/detail/index1.vue
+++ b/src/views/system/result/detail/index1.vue
@@ -1,5 +1,5 @@
 <template>
-  <div style="padding: 0px 10px">
+  <div style="padding: 0px 10px" >
     <div>
       <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect"
         style="margin-bottom: 10px">
@@ -26,8 +26,8 @@
       </el-card>
     </div>
 
-    <div style="margin-top: 35px">
-      <el-table :data="tableData" style="width: 100%" v-loading="loading">
+    <div style="margin-top: 35px;margin-bottom: 35px">
+      <el-table :data="tableData" style="width: 100%" v-loading="tableLoading">
         <el-table-column label="鑰冩牳鏃堕棿" prop="createTime" align="center">
         </el-table-column>
         <el-table-column label="鑰冩牳瀵硅薄" prop="deptId" align="center">
@@ -53,29 +53,34 @@
         </el-table-column>
         <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
           <template slot-scope="scope">
-            <el-button size="small" type="text" v-show="scope.row.publish != 1">纭鍙戝竷</el-button>
-            <el-button size="small" type="text" v-show="scope.row.publish == 1">鍙栨秷鍙戝竷</el-button>
-            <el-button size="mini" type="text" icon="el-icon-view"
-              @click="handleDetail(scope.row, scope.index)">璇︾粏</el-button>
+            <el-button size="small" type="text"  v-show="scope.row.publish != 1">纭鍙戝竷</el-button>
+            <el-button size="small" type="text"  v-show="scope.row.publish == 1">鍙栨秷鍙戝竷</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleDetail(scope.row.id)"
+            >璇︾粏</el-button>
           </template>
         </el-table-column>
       </el-table>
-    </div>
 
-    <div style="text-align: right; margin-top: 10px">
-      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-        :current-page="queryParams.pageNum" :page-sizes="[10, 20, 50]" :page-size="queryParams.pageSize"
-        layout="total, sizes, prev, pager, next, jumper" :total="tableData.length">
-      </el-pagination>
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
     </div>
 
   </div>
 </template>
 
 <script>
-import { listScore, getScore, delScore, addScore, updateScore, publishScore } from "@/api/platform/check-score";
+import { listScore, getScore, delScore, addScore, updateScore, publishScore,detailScore } from "@/api/platform/check-score";
 import { areaSelect } from '@/api/system/dept';
-import { mapState } from 'vuex';
 import * as echarts from 'echarts';
 let lineChart = null;
 let observer = null;
@@ -88,11 +93,13 @@
       areaList: [],
       date: '',
       dateRange: '',
+      // 鎬绘潯鏁�
+      total: 0,
       queryParams: {
         pageNum: 1,
         pageSize: 10,
         deptId: null,
-        examinTag:0
+        examineTag:0
       },
       tableData: [],
       loading: false,
@@ -113,6 +120,8 @@
     this.date = year + '-' + month;
     this.queryParams.date = this.date;
     this.areaSelect();
+    this.getChart(this.$route.query.index)
+    this.getList(this.$route.query.index);
   },
   computed: {
 
@@ -131,17 +140,26 @@
     /** 瀵艰埅鍒囨崲 */
     handleSelect(key) {
       this.activeIndex = key;
-      this.queryParams.examinTag = key;
+      this.queryParams.examineTag = key;
+      this.getChart(this.queryParams.deptId);
       this.getList(this.queryParams.deptId);
     },
     /** 鏌ヨ鑰冩牳妯℃澘鍒楄〃 */
-    getList(deptId) {
+    getChart(deptId) {
       this.loading = true;
       lineChart.showLoading();
       listScore(this.queryParams).then(response => {
-        this.tableData = response.data[deptId];
-        this.loading = false;
         this.initChart(response.data[deptId]);
+        this.loading = false;
+      });
+    },
+    /** 鏌ヨ鑰冩牳妯℃澘鍒楄〃 */
+    getList() {
+      this.tableLoading = true;
+      detailScore(this.queryParams).then(response => {
+        this.tableData = response.rows;
+        this.total = response.total;
+        this.tableLoading = false;
       });
     },
     handleSizeChange(val) {
@@ -150,9 +168,13 @@
     handleCurrentChange(val) {
       console.log(`褰撳墠椤�: ${val}`);
     },
-    handleDetail(index, row) {
-      console.log(index, row);
-      this.$router.push("/examine/detail/detail")
+    handleDetail(id) {
+      this.$router.push({
+        path: '/examine/detail/detail',
+        query: {
+          id: id,
+        }
+      })
     },
     handleDelete(index, row) {
       console.log(index, row);
@@ -179,7 +201,7 @@
           data: dataList.map((item) => item[0]),
         },
         yAxis: {
-          min: 90,
+
         },
         series: [
           {
@@ -271,13 +293,13 @@
     dateChange() {
       this.queryParams.date = this.date;
       console.log(this.queryParams);
-      this.getList(this.queryParams.deptId);
+      this.getChart(this.queryParams.deptId);
     }
 
   },
   mounted() {
     lineChart = echarts.init(this.$refs.chartContent);
-    this.getList(this.$route.query.index);
+    this.getChart(this.$route.query.index);
     this.observe();
   },
   beforeDestroy() {

--
Gitblit v1.8.0