From 75f043dfa6660716364e66ee0b3cf99f44255686 Mon Sep 17 00:00:00 2001
From: DYL0109 <dn18191638832@163.com>
Date: 星期三, 16 四月 2025 19:20:36 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/develop1.0' into dyl_dev

---
 zhitan-vue/src/views/businessconfiguration/prealarmmanage/components/statisticalindicatorsmanage/StatisticalIndicatorsManage.vue |  125 ++++++++++++++++++++++-------------------
 1 files changed, 66 insertions(+), 59 deletions(-)

diff --git a/zhitan-vue/src/views/businessconfiguration/prealarmmanage/components/statisticalindicatorsmanage/StatisticalIndicatorsManage.vue b/zhitan-vue/src/views/businessconfiguration/prealarmmanage/components/statisticalindicatorsmanage/StatisticalIndicatorsManage.vue
index 5937030..91a86fa 100644
--- a/zhitan-vue/src/views/businessconfiguration/prealarmmanage/components/statisticalindicatorsmanage/StatisticalIndicatorsManage.vue
+++ b/zhitan-vue/src/views/businessconfiguration/prealarmmanage/components/statisticalindicatorsmanage/StatisticalIndicatorsManage.vue
@@ -1,6 +1,6 @@
 <template>
   <div class="table-box">
-    <div class="form-card">
+    <div class="form-card" style="padding: 16px 16px 0 16px">
       <el-form :model="queryParams" ref="queryRef" :inline="true">
         <el-form-item label="閲囬泦鐐瑰悕绉�">
           <el-input v-model="queryParams.name" placeholder="璇疯緭鍏ラ噰闆嗙偣鍚嶇О" maxlength="30" />
@@ -9,9 +9,7 @@
           <el-input v-model="queryParams.code" placeholder="璇疯緭鍏ラ噰闆嗙偣缂栫爜" maxlength="30" />
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" icon="Search" @click="getTabList">
-            鎼滅储
-          </el-button>
+          <el-button type="primary" icon="Search" @click="getTabList"> 鎼滅储 </el-button>
           <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button>
         </el-form-item>
         <el-form-item>
@@ -24,29 +22,38 @@
         </el-form-item>
       </el-form>
     </div>
-    <el-table v-loading="loading" row-key="indexId" ref="tableRef" :data="tableData"
-      @selection-change="handleSelectionChange" height="calc(100vh - 430px)"
-      :default-sort="{ prop: 'date', order: 'descending' }">
+    <el-table
+      v-loading="loading"
+      row-key="indexId"
+      ref="tableRef"
+      :data="tableData"
+      @selection-change="handleSelectionChange"
+      height="calc(100vh - 430px)"
+      :default-sort="{ prop: 'date', order: 'descending' }"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="閲囬泦鐐瑰悕绉�" align="center" prop="name" />
       <el-table-column label="閲囬泦鐐圭紪鐮�" align="center" prop="code" />
       <el-table-column label="鍚仠鐘舵��" align="center" prop="indexCategory" />
       <el-table-column label="鎿嶄綔" width="150" align="center">
         <template #default="scope">
-          <el-button link type="primary" @click="handleAlarm(scope.row)">
-            鎶ヨ
-          </el-button>
+          <el-button link type="primary" @click="handleAlarm(scope.row)"> 鎶ヨ </el-button>
         </template>
       </el-table-column>
     </el-table>
-    <pagination v-show="queryParams.total > 0" :total="queryParams.total" v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize" @pagination="getTabList" />
+    <pagination
+      v-show="queryParams.total > 0"
+      :total="queryParams.total"
+      v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize"
+      @pagination="getTabList"
+    />
     <StatisticsAlarmModal ref="statisticsAlarmModalRef" />
   </div>
 </template>
 <script setup>
-import StatisticsAlarmModal from './StatisticsAlarmModal.vue'
-import { getSettingIndex, getStartStop, getSettingCount, updateSet } from '@/api/businessConfiguration/preAlarmManage'
+import StatisticsAlarmModal from "./StatisticsAlarmModal.vue"
+import { getSettingIndex, getStartStop, getSettingCount, updateSet } from "@/api/businessConfiguration/preAlarmManage"
 
 let { proxy } = getCurrentInstance()
 const data = reactive({
@@ -58,8 +65,8 @@
     pageSize: 10,
     total: 0,
   },
-});
-const { queryParams } = toRefs(data);
+})
+const { queryParams } = toRefs(data)
 let ids = ref([])
 let names = ref([])
 let single = ref(true)
@@ -73,41 +80,40 @@
 function getList(modelNode) {
   currentNode.value = modelNode
   queryParams.value.nodeId = modelNode.id
-  queryParams.value.indexType = 'STATISTIC',
-    getTabList()
+  ;(queryParams.value.indexType = "STATISTIC"), getTabList()
 }
 function getTabList() {
-  loading.value = true;
-  getSettingIndex(queryParams.value).then(res => {
-    tableData.value = res.data.records;
+  loading.value = true
+  getSettingIndex(queryParams.value).then((res) => {
+    tableData.value = res.data.records
     queryParams.value.total = res.data.total
-    loading.value = false;
+    loading.value = false
     initStartStop()
   })
 }
 function resetQuery() {
-  proxy.resetForm("queryRef");
-  queryParams.value.code = null;
-  queryParams.value.name = null;
-  queryParams.value.pageNum = 1;
-  queryParams.value.pageSize = 10;
-  queryParams.value.total = 0;
-  getTabList();
+  proxy.resetForm("queryRef")
+  queryParams.value.code = null
+  queryParams.value.name = null
+  queryParams.value.pageNum = 1
+  queryParams.value.pageSize = 10
+  queryParams.value.total = 0
+  getTabList()
 }
 function initStartStop() {
   for (let i = 0; i < tableData.value.length; i++) {
-    let ndy = ''
-    getStartStop(tableData.value[i].indexId).then(response => {
-      if (response.code == '200') {
-        if (response.msg == '1') {
-          tableData.value[i].indexCategory = '鍚姩'
-        } else if (response.msg == '2') {
-          tableData.value[i].indexCategory = '鍋滄'
+    let ndy = ""
+    getStartStop(tableData.value[i].indexId).then((response) => {
+      if (response.code == "200") {
+        if (response.msg == "1") {
+          tableData.value[i].indexCategory = "鍚姩"
+        } else if (response.msg == "2") {
+          tableData.value[i].indexCategory = "鍋滄"
         } else {
-          tableData.value[i].indexCategory = '灏氭湭璁剧疆'
+          tableData.value[i].indexCategory = "灏氭湭璁剧疆"
         }
       } else {
-        tableData.value[i].indexCategory = ''
+        tableData.value[i].indexCategory = ""
       }
     })
   }
@@ -120,22 +126,22 @@
 
 // 澶氶�夋閫変腑鏁版嵁
 function handleSelectionChange(selection) {
-  ids.value = selection.map(item => item.indexId)
-  names.value = selection.map(item => item.name)
+  ids.value = selection.map((item) => item.indexId)
+  names.value = selection.map((item) => item.name)
   single.value = selection.length !== 1
   multiple.value = !selection.length
-  startStopOptions.value = selection.map(item => item.indexCategory)
-  codeOptions.value = selection.map(item => item.code)
+  startStopOptions.value = selection.map((item) => item.indexCategory)
+  codeOptions.value = selection.map((item) => item.code)
 }
 
 function handleUpdateState(flag) {
-  let stateName = ''
-  if (flag == '1') {
-    stateName = '鍚姩'
+  let stateName = ""
+  if (flag == "1") {
+    stateName = "鍚姩"
   } else {
-    stateName = '鍋滄'
+    stateName = "鍋滄"
   }
-  getSettingCount(ids.value).then(response => {
+  getSettingCount(ids.value).then((response) => {
     let unStartStopArrName = []
     let startStopArrIds = []
     for (let i = 0; i < response.data.length; i++) {
@@ -146,19 +152,20 @@
       }
     }
     if (unStartStopArrName.length > 0) {
-      var bh = unStartStopArrName.join('锛�')
-      proxy.$modal.confirm('閫変腑瀛樺湪鏈缃檺鍊肩殑浠櫒璁惧' + bh + '锛屾殏鏃犳硶' + stateName + '锛�', '璀﹀憡', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning'
-      }).catch(function () {
-      })
+      var bh = unStartStopArrName.join("锛�")
+      proxy.$modal
+        .confirm("閫変腑瀛樺湪鏈缃檺鍊肩殑浠櫒璁惧" + bh + "锛屾殏鏃犳硶" + stateName + "锛�", "璀﹀憡", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+          type: "warning",
+        })
+        .catch(function () {})
     } else {
       if (startStopArrIds.length > 0) {
-        updateSet(startStopArrIds || '', flag).then(response => {
+        updateSet(startStopArrIds || "", flag).then((response) => {
           if (response.code === 200) {
             initStartStop()
-            proxy.$modal.msgSuccess('鎴愬姛')
+            proxy.$modal.msgSuccess("鎴愬姛")
           } else {
             proxy.$modal.msgError(response.msg)
           }
@@ -168,8 +175,8 @@
   })
 }
 defineExpose({
-  getList
-});
+  getList,
+})
 </script>
 
-<style lang='scss' scoped></style>
\ No newline at end of file
+<style lang="scss" scoped></style>

--
Gitblit v1.9.3