From 9e13a2a022272ae2bd82fc4d27b6595bfa6419e6 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 29 一月 2026 14:04:40 +0800
Subject: [PATCH] 应急预案查阅

---
 src/api/safeProduction/emergencyPlanReview.js          |   35 ++
 src/views/safeProduction/emergencyPlanReview/index.vue |  810 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 845 insertions(+), 0 deletions(-)

diff --git a/src/api/safeProduction/emergencyPlanReview.js b/src/api/safeProduction/emergencyPlanReview.js
new file mode 100644
index 0000000..7eac73e
--- /dev/null
+++ b/src/api/safeProduction/emergencyPlanReview.js
@@ -0,0 +1,35 @@
+// 鍙戣揣鍙拌处椤甸潰鎺ュ彛
+import request from "@/utils/request";
+
+// 鍒嗛〉鏌ヨ
+export function safeContingencyPlanListPage(query) {
+  return request({
+    url: "/safeContingencyPlan/page",
+    method: "get",
+    params: query,
+  });
+}
+
+export function safeContingencyPlanAdd(query) {
+    return request({
+        url: '/safeContingencyPlan',
+        method: 'post',
+        data: query
+    })
+}
+
+export function safeContingencyPlanUpdate(query) {
+    return request({
+        url: '/safeContingencyPlan',
+        method: 'put',
+        data: query
+    })
+}
+
+export function safeContingencyPlanDel(ids) {
+    return request({
+        url: '/safeContingencyPlan/' + ids,
+        method: 'delete',
+        data: ids
+    })
+}
\ No newline at end of file
diff --git a/src/views/safeProduction/emergencyPlanReview/index.vue b/src/views/safeProduction/emergencyPlanReview/index.vue
new file mode 100644
index 0000000..07bf56e
--- /dev/null
+++ b/src/views/safeProduction/emergencyPlanReview/index.vue
@@ -0,0 +1,810 @@
+<template>
+  <div class="app-container">
+    <div class="search_form">
+      <div>
+        <span class="search_title">搴旀�ラ妗堝悕绉帮細</span>
+        <el-input v-model="searchForm.planName"
+                  style="width: 240px"
+                  placeholder="璇疯緭鍏ュ簲鎬ラ妗堝悕绉版悳绱�"
+                  @change="handleQuery"
+                  clearable
+                  :prefix-icon="Search" />
+        <span class="search_title ml10">搴旀�ラ妗堢被鍨嬶細</span>
+        <el-select v-model="searchForm.planType"
+                   clearable
+                   @change="handleQuery"
+                   style="width: 240px">
+          <el-option v-for="item in emergencyPlanTypeOptions"
+                     :key="item.value"
+                     :label="item.label"
+                     :value="item.value" />
+        </el-select>
+        <el-button type="primary"
+                   @click="handleQuery"
+                   style="margin-left: 10px">
+          鎼滅储
+        </el-button>
+      </div>
+      <div>
+        <el-button type="primary"
+                   @click="openForm('add')">鏂板搴旀�ラ妗�</el-button>
+        <el-button type="danger"
+                   plain
+                   @click="handleDelete">鍒犻櫎</el-button>
+      </div>
+    </div>
+    <div class="table_list">
+      <PIMTable rowKey="id"
+                :column="tableColumn"
+                :tableData="tableData"
+                :page="page"
+                :isSelection="true"
+                @selection-change="handleSelectionChange"
+                :tableLoading="tableLoading"
+                @pagination="pagination"
+                :total="page.total"></PIMTable>
+    </div>
+    <!-- 鏂板/缂栬緫搴旀�ラ妗堝脊绐� -->
+    <el-dialog v-model="dialogVisible"
+               :title="dialogTitle"
+               width="800px"
+               :close-on-click-modal="false">
+      <el-form ref="formRef"
+               :model="form"
+               :rules="rules"
+               label-width="120px">
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="搴旀�ラ妗堢紪鐮�"
+                          prop="planCode">
+              <el-input v-model="form.planCode"
+                        placeholder="璇疯緭鍏ュ簲鎬ラ妗堢紪鐮�" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="搴旀�ラ妗堝悕绉�"
+                          prop="planName">
+              <el-input v-model="form.planName"
+                        placeholder="璇疯緭鍏ュ簲鎬ラ妗堝悕绉�" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="鍙戝竷鐢熸晥鏃堕棿锛�"
+                          prop="publishTime">
+              <el-date-picker style="width: 100%"
+                              v-model="form.publishTime"
+                              value-format="YYYY-MM-DD"
+                              format="YYYY-MM-DD"
+                              type="date"
+                              placeholder="璇烽�夋嫨"
+                              clearable />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鏍稿績璐d换浜猴細"
+                          prop="coreResponsorUserId">
+              <el-select v-model="form.coreResponsorUserId"
+                         placeholder="璇烽�夋嫨"
+                         @change="handleChange"
+                         clearable>
+                <el-option v-for="item in userList"
+                           :key="item.userId"
+                           :label="item.nickName"
+                           :value="item.userId" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="棰勬绫诲瀷"
+                          prop="planType">
+              <el-select v-model="form.planType"
+                         placeholder="璇烽�夋嫨棰勬绫诲瀷"
+                         style="width: 100%">
+                <el-option v-for="item in emergencyPlanTypeOptions"
+                           :key="item.value"
+                           :label="item.label"
+                           :value="item.value" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="澶囨敞"
+                          prop="remark">
+              <el-input v-model="form.remark"
+                        placeholder="璇疯緭鍏ュ娉�" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-form-item label="閫傜敤鑼冨洿"
+                      prop="applyScope">
+          <el-checkbox-group v-model="form.applyScope">
+            <el-checkbox label="all">鍏ㄤ綋鍛樺伐</el-checkbox>
+            <el-checkbox label="manager">绠$悊灞�</el-checkbox>
+            <el-checkbox label="hr">浜轰簨閮ㄩ棬</el-checkbox>
+            <el-checkbox label="finance">璐㈠姟閮ㄩ棬</el-checkbox>
+            <el-checkbox label="tech">鎶�鏈儴闂�</el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
+        <el-form-item label="搴旀�ュ缃楠�"
+                      prop="execSteps">
+          <div class="exec-steps-container"
+               style="width:100%">
+            <div v-for="(step, index) in execStepsList"
+                 :key="index"
+                 class="exec-step-item">
+              <div class="step-header">
+                <div>
+                  <el-input v-model="step.step"
+                            placeholder="姝ラ"
+                            style="width: 200px; margin-right: 10px" />
+                  <el-button type="danger"
+                             size="small"
+                             @click="removeExecStep(index)"
+                             style="margin-left: 10px">鍒犻櫎</el-button>
+                </div>
+                <div style="margin-top: 5px;width: 100%;">
+                  <el-input v-model="step.description"
+                            placeholder="鎺柦"
+                            type="textarea"
+                            :rows="2"
+                            style="flex: 1" />
+                </div>
+              </div>
+            </div>
+            <el-button type="primary"
+                       size="small"
+                       @click="addExecStep"
+                       style="margin-top: 10px">娣诲姞姝ラ</el-button>
+          </div>
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="dialogVisible = false">鍙栨秷</el-button>
+          <el-button type="primary"
+                     @click="submitForm">纭畾</el-button>
+        </span>
+      </template>
+    </el-dialog>
+    <!-- 鏌ョ湅搴旀�ラ妗堣鎯呭脊绐� -->
+    <el-dialog v-model="viewDialogVisible"
+               title="搴旀�ラ妗堣鎯�"
+               width="900px"
+               :close-on-click-modal="false">
+      <div class="knowledge-detail">
+        <el-descriptions :column="2"
+                         border>
+          <el-descriptions-item label="搴旀�ラ妗堝悕绉�"
+                                :span="2">
+            <span class="detail-title">{{ currentKnowledge.planName }}</span>
+          </el-descriptions-item>
+          <el-descriptions-item label="搴旀�ラ妗堢紪鐮�">
+            <span>{{ currentKnowledge.planCode }}</span>
+          </el-descriptions-item>
+          <el-descriptions-item label="鍙戝竷鐢熸晥鏃堕棿">
+            {{ currentKnowledge.publishTime }}
+          </el-descriptions-item>
+          <el-descriptions-item label="鏍稿績璐d换浜�">
+            {{ currentKnowledge.coreResponsorUserName }}
+          </el-descriptions-item>
+          <el-descriptions-item label="棰勬绫诲瀷">
+            <el-tag type="warning"> {{ currentKnowledge.planType }}</el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item label="澶囨敞">
+            {{ currentKnowledge.remark }}
+          </el-descriptions-item>
+        </el-descriptions>
+        <div class="detail-section">
+          <h4>閫傜敤鑼冨洿</h4>
+          <div class="key-points">
+            <el-tag v-for="(point, index) in currentKnowledge.applyScope.split(',')"
+                    :key="index"
+                    type="primary"
+                    style="margin-right: 8px; margin-bottom: 8px;">
+              {{ getApplyScopeLabel(point.trim()) }}
+            </el-tag>
+          </div>
+        </div>
+        <div class="detail-section">
+          <h4>搴旀�ュ缃楠�</h4>
+          <div class="detail-content">
+            <div v-if="currentKnowledge.execSteps">
+              <div v-for="(step, index) in JSON.parse(currentKnowledge.execSteps)"
+                   :key="index"
+                   class="exec-step-view">
+                <span class="step-number">{{ index + 1 }}.</span>
+                <span class="step-title">{{ step.step }}锛�</span>
+                <span>{{ step.description }}</span>
+              </div>
+            </div>
+            <div v-else
+                 class="no-data">鏃犲簲鎬ュ缃楠�</div>
+          </div>
+        </div>
+      </div>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="viewDialogVisible = false">鍏抽棴</el-button>
+          <!-- <el-button type="success" @click="markAsFavorite">鏀惰棌@</el-button> -->
+        </span>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+  import { Search } from "@element-plus/icons-vue";
+  import {
+    onMounted,
+    ref,
+    reactive,
+    toRefs,
+    getCurrentInstance,
+    computed,
+  } from "vue";
+  import { ElMessage, ElMessageBox } from "element-plus";
+  import PIMTable from "@/components/PIMTable/PIMTable.vue";
+  import { userListNoPage } from "@/api/system/user.js";
+  import {
+    safeContingencyPlanListPage,
+    safeContingencyPlanAdd,
+    safeContingencyPlanUpdate,
+    safeContingencyPlanDel,
+  } from "@/api/safeProduction/emergencyPlanReview.js";
+
+  // 琛ㄥ崟楠岃瘉瑙勫垯
+  const rules = {
+    planCode: [
+      { required: true, message: "璇疯緭鍏ュ簲鎬ラ妗堢紪鐮�", trigger: "blur" },
+    ],
+    applyScope: [
+      { required: true, message: "璇烽�夋嫨閫傜敤鑼冨洿", trigger: "change" },
+    ],
+    planType: [{ required: true, message: "璇烽�夋嫨棰勬绫诲瀷", trigger: "change" }],
+    planName: [
+      { required: true, message: "璇疯緭鍏ュ簲鎬ラ妗堝悕绉�", trigger: "blur" },
+    ],
+    publishTime: [
+      { required: true, message: "璇烽�夋嫨鍙戝竷鐢熸晥鏃堕棿", trigger: "change" },
+    ],
+    coreResponsorUserId: [
+      { required: true, message: "璇烽�夋嫨鏍稿績璐d换浜�", trigger: "change" },
+    ],
+  };
+
+  // 鍝嶅簲寮忔暟鎹�
+  const data = reactive({
+    searchForm: {
+      planName: "",
+      planType: "",
+    },
+    tableLoading: false,
+    page: {
+      current: 1,
+      size: 20,
+      total: 0,
+    },
+    tableData: [],
+    selectedIds: [],
+    form: {
+      planCode: "", // 棰勬缂栧彿
+      applyScope: [], // 閫傜敤鑼冨洿
+      planType: "", // 棰勬绫诲瀷
+      planName: "", // 棰勬鍚嶇О
+      publishTime: "", // 鍙戝竷鏃堕棿
+      coreResponsorUserId: "", // 鏍稿績璐熻矗浜虹敤鎴稩D
+      coreResponsorUserName: "", // 鏍稿績璐熻矗浜虹敤鎴峰悕
+      remark: "", // 澶囨敞
+      execSteps: "", // 鎵ц姝ラ
+    },
+    dialogVisible: false,
+    dialogTitle: "",
+    dialogType: "add",
+    viewDialogVisible: false,
+    currentKnowledge: {},
+  });
+
+  const {
+    searchForm,
+    tableLoading,
+    page,
+    tableData,
+    selectedIds,
+    form,
+    dialogVisible,
+    dialogTitle,
+    dialogType,
+    viewDialogVisible,
+    currentKnowledge,
+  } = toRefs(data);
+
+  // 琛ㄥ崟寮曠敤
+  const formRef = ref();
+  const execStepsList = ref([]);
+
+  // 琛ㄦ牸鍒楅厤缃�
+  const tableColumn = ref([
+    {
+      label: "搴旀�ラ妗堢紪鐮�",
+      prop: "planCode",
+      showOverflowTooltip: true,
+    },
+    {
+      label: "搴旀�ラ妗堝悕绉�",
+      prop: "planName",
+      showOverflowTooltip: true,
+    },
+    {
+      label: "鍙戝竷鐢熸晥鏃堕棿",
+      prop: "publishTime",
+      showOverflowTooltip: true,
+    },
+    {
+      label: "鏍稿績璐d换浜�",
+      prop: "coreResponsorUserName",
+      showOverflowTooltip: true,
+    },
+    {
+      label: "棰勬绫诲瀷",
+      prop: "planType",
+      showOverflowTooltip: true,
+    },
+    {
+      label: "澶囨敞",
+      prop: "remark",
+      showOverflowTooltip: true,
+    },
+    {
+      dataType: "action",
+      label: "鎿嶄綔",
+      align: "center",
+      fixed: "right",
+      width: 200,
+      operation: [
+        {
+          name: "缂栬緫",
+          type: "text",
+          clickFun: row => {
+            openForm("edit", row);
+          },
+        },
+        {
+          name: "鏌ョ湅",
+          type: "text",
+          clickFun: row => {
+            viewKnowledge(row);
+          },
+        },
+      ],
+    },
+  ]);
+  const userList = ref([]);
+  // 鐢熷懡鍛ㄦ湡
+  onMounted(() => {
+    userListNoPage().then(res => {
+      userList.value = res.data;
+    });
+    getList();
+    startAutoRefresh();
+  });
+  const handleChange = userId => {
+    const selectedUser = userList.value.find(user => user.userId === userId);
+    if (selectedUser) {
+      form.value.coreResponsorUserName = selectedUser.nickName;
+    }
+  };
+
+  // 搴旀�ュ缃楠ょ鐞�
+  const addExecStep = () => {
+    const stepNumber = execStepsList.value.length + 1;
+    execStepsList.value.push({
+      step: `姝ラ${stepNumber}`,
+      description: "",
+    });
+  };
+
+  const removeExecStep = index => {
+    execStepsList.value.splice(index, 1);
+  };
+
+  const initExecSteps = execSteps => {
+    if (execSteps) {
+      try {
+        execStepsList.value = JSON.parse(execSteps);
+      } catch (e) {
+        execStepsList.value = [];
+      }
+    } else {
+      execStepsList.value = [];
+    }
+  };
+  // 寮�濮嬭嚜鍔ㄥ埛鏂�
+  const startAutoRefresh = () => {
+    setInterval(() => {
+      getList();
+    }, 600000); // 10鍒嗛挓鍒锋柊涓�娆� (10 * 60 * 1000 = 600000ms)
+  };
+
+  // 鏌ヨ鏁版嵁
+  const handleQuery = () => {
+    page.value.current = 1;
+    getList();
+  };
+
+  const getList = () => {
+    tableLoading.value = true;
+    safeContingencyPlanListPage({ ...page.value, ...searchForm.value })
+      .then(res => {
+        tableLoading.value = false;
+        tableData.value = res.data.records;
+        page.total = res.data.total;
+      })
+      .catch(err => {
+        tableLoading.value = false;
+      });
+  };
+
+  // 鍒嗛〉澶勭悊
+  const pagination = obj => {
+    page.value.current = obj.page;
+    page.value.size = obj.limit;
+    handleQuery();
+  };
+
+  // 閫夋嫨鍙樺寲澶勭悊
+  const handleSelectionChange = selection => {
+    selectedIds.value = selection.map(item => item.id);
+  };
+
+  // 鎵撳紑琛ㄥ崟
+  const openForm = (type, row = null) => {
+    dialogType.value = type;
+    if (type === "add") {
+      dialogTitle.value = "鏂板搴旀�ラ妗�";
+      // 閲嶇疆琛ㄥ崟
+      Object.assign(form.value, {
+        planCode: "", // 棰勬缂栧彿
+        applyScope: [], // 閫傜敤鑼冨洿
+        planType: "", // 棰勬绫诲瀷
+        planName: "", // 棰勬鍚嶇О
+        publishTime: "", // 鍙戝竷鏃堕棿
+        coreResponsorUserId: "", // 鏍稿績璐熻矗浜虹敤鎴稩D
+        coreResponsorUserName: "", // 鏍稿績璐熻矗浜虹敤鎴峰悕
+        remark: "", // 澶囨敞
+        execSteps: "", // 鎵ц姝ラ
+      });
+      initExecSteps("");
+    } else if (type === "edit" && row) {
+      dialogTitle.value = "缂栬緫搴旀�ラ妗�";
+      Object.assign(form.value, {
+        id: row.id,
+        planCode: row.planCode, // 棰勬缂栧彿
+        applyScope: row.applyScope ? row.applyScope.split(",") : [], // 閫傜敤鑼冨洿
+        planType: row.planType, // 棰勬绫诲瀷
+        planName: row.planName, // 棰勬鍚嶇О
+        publishTime: row.publishTime, // 鍙戝竷鏃堕棿
+        coreResponsorUserId: row.coreResponsorUserId, // 鏍稿績璐熻矗浜虹敤鎴稩D
+        coreResponsorUserName: row.coreResponsorUserName, // 鏍稿績璐熻矗浜虹敤鎴峰悕
+        remark: row.remark, // 澶囨敞
+        execSteps: row.execSteps, // 鎵ц姝ラ
+      });
+      initExecSteps(row.execSteps);
+    }
+    dialogVisible.value = true;
+  };
+
+  // 鏌ョ湅搴旀�ラ妗堣鎯�
+  const viewKnowledge = row => {
+    currentKnowledge.value = { ...row };
+    viewDialogVisible.value = true;
+  };
+  const getApplyScopeLabel = scope => {
+    const scopeMap = {
+      all: "鍏ㄤ綋鍛樺伐",
+      manager: "绠$悊灞�",
+      hr: "浜轰簨閮ㄩ棬",
+      finance: "璐㈠姟閮ㄩ棬",
+      tech: "鎶�鏈儴闂�",
+    };
+    return scopeMap[scope] || scope;
+  };
+
+  // 鑾峰彇绫诲瀷鏍囩绫诲瀷
+  const getTypeTagType = type => {
+    const typeMap = {
+      contract: "success",
+      approval: "warning",
+      solution: "primary",
+      experience: "info",
+      guide: "danger",
+    };
+    return typeMap[type] || "info";
+  };
+
+  // 鑾峰彇绫诲瀷鏍囩鏂囨湰
+  const getTypeLabel = type => {
+    return getKnowledgeTypeLabel(type);
+  };
+
+  // 鑾峰彇鏁堢巼鏍囩绫诲瀷
+  const getEfficiencyTagType = efficiency => {
+    const typeMap = {
+      high: "success",
+      medium: "warning",
+      low: "info",
+    };
+    return typeMap[efficiency] || "info";
+  };
+
+  // 鑾峰彇鏁堢巼鏍囩鏂囨湰
+  const getEfficiencyLabel = efficiency => {
+    const efficiencyMap = {
+      high: "鏄捐憲鎻愬崌",
+      medium: "涓�鑸彁鍗�",
+      low: "杞诲井鎻愬崌",
+    };
+    return efficiencyMap[efficiency] || efficiency;
+  };
+
+  // 鑾峰彇鏁堢巼鎻愬崌鐧惧垎姣�
+  const getEfficiencyScore = efficiency => {
+    const scoreMap = {
+      high: 40,
+      medium: 25,
+      low: 15,
+    };
+    return scoreMap[efficiency] || 0;
+  };
+
+  // 鑾峰彇骞冲潎鑺傜渷鏃堕棿
+  const getTimeSaved = efficiency => {
+    const timeMap = {
+      high: "2-3澶�",
+      medium: "1-2澶�",
+      low: "0.5-1澶�",
+    };
+    return timeMap[efficiency] || "鏈煡";
+  };
+  const emergencyPlanTypeOptions = computed(() => [
+    {
+      value: "棰勯槻鎬у簲鎬ラ妗�",
+      label: "棰勯槻鎬у簲鎬ラ妗�",
+    },
+    {
+      value: "搴旀�ュ鐞嗛妗�",
+      label: "搴旀�ュ鐞嗛妗�",
+    },
+    {
+      value: "鎭㈠鎬у簲鎬ラ妗�",
+      label: "鎭㈠鎬у簲鎬ラ妗�",
+    },
+  ]);
+  // 鎻愪氦搴旀�ラ妗堣〃鍗�
+  const submitForm = async () => {
+    try {
+      await formRef.value.validate();
+
+      // 楠岃瘉搴旀�ュ缃楠�
+      for (let i = 0; i < execStepsList.value.length; i++) {
+        const step = execStepsList.value[i];
+        if (!step.step || !step.step.trim()) {
+          ElMessage.error(`绗�${i + 1}鏉℃楠ょ殑"姝ラ"涓嶈兘涓虹┖`);
+          return;
+        }
+        if (!step.description || !step.description.trim()) {
+          ElMessage.error(`绗�${i + 1}鏉℃楠ょ殑"鎺柦"涓嶈兘涓虹┖`);
+          return;
+        }
+      }
+
+      // 灏嗗簲鎬ュ缃楠よ浆鎹负JSON瀛楃涓�
+      form.value.execSteps = JSON.stringify(execStepsList.value);
+      if (dialogType.value === "add") {
+        // 鏂板搴旀�ラ妗�
+        form.value.applyScope = form.value.applyScope.join(",");
+        safeContingencyPlanAdd({ ...form.value })
+          .then(res => {
+            if (res.code == 200) {
+              ElMessage.success("娣诲姞鎴愬姛");
+              dialogVisible.value = false;
+              getList();
+            }
+          })
+          .catch(err => {
+            ElMessage.error(err.msg);
+          });
+      } else {
+        form.value.applyScope = form.value.applyScope.join(",");
+        safeContingencyPlanUpdate({ ...form.value })
+          .then(res => {
+            if (res.code == 200) {
+              ElMessage.success("鏇存柊鎴愬姛");
+              dialogVisible.value = false;
+              getList();
+            }
+          })
+          .catch(err => {
+            ElMessage.error(err.msg);
+          });
+      }
+    } catch (error) {
+      console.error("琛ㄥ崟楠岃瘉澶辫触:", error);
+    }
+  };
+
+  // 鍒犻櫎搴旀�ラ妗�
+  const handleDelete = () => {
+    if (selectedIds.value.length === 0) {
+      ElMessage.warning("璇烽�夋嫨瑕佸垹闄ょ殑搴旀�ラ妗�");
+      return;
+    }
+
+    ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "鍒犻櫎", {
+      confirmButtonText: "纭",
+      cancelButtonText: "鍙栨秷",
+      type: "warning",
+    })
+      .then(() => {
+        // console.log(selectedIds.value);
+        safeContingencyPlanDel(selectedIds.value).then(res => {
+          if (res.code == 200) {
+            ElMessage.success("鍒犻櫎鎴愬姛");
+            selectedIds.value = [];
+            getList();
+          }
+        });
+      })
+      .catch(() => {
+        // 鐢ㄦ埛鍙栨秷
+      });
+  };
+
+  // 瀵煎嚭
+  const { proxy } = getCurrentInstance();
+  const { knowledge_type } = proxy.useDict("knowledge_type");
+
+  // 瀛楀吀宸ュ叿
+  const knowledgeTypeOptions = computed(() => knowledge_type?.value || []);
+  const getKnowledgeTypeLabel = val => {
+    const item = knowledgeTypeOptions.value.find(
+      i => String(i.value) === String(val)
+    );
+    return item ? item.label : val;
+  };
+  const getKnowledgeTypeTagType = val => {
+    const item = knowledgeTypeOptions.value.find(
+      i => String(i.value) === String(val)
+    );
+    return item?.elTagType || "info";
+  };
+  const handleExport = () => {
+    proxy.download(
+      "/knowledgeBase/export",
+      { ...searchForm.value },
+      "搴旀�ラ妗堝簱.xlsx"
+    );
+  };
+</script>
+
+<style scoped>
+  .auto-refresh-info {
+    margin-bottom: 15px;
+  }
+
+  .auto-refresh-info .el-alert {
+    border-radius: 8px;
+  }
+
+  .dialog-footer {
+    text-align: right;
+  }
+
+  .knowledge-detail {
+    padding: 20px 0;
+  }
+
+  .detail-title {
+    font-size: 18px;
+    font-weight: bold;
+    color: #303133;
+  }
+
+  .detail-section {
+    margin-top: 24px;
+  }
+
+  .detail-section h4 {
+    margin: 0 0 12px 0;
+    font-size: 16px;
+    font-weight: 600;
+    color: #303133;
+    border-left: 4px solid #409eff;
+    padding-left: 12px;
+  }
+
+  .detail-content {
+    background: #f8f9fa;
+    padding: 16px;
+    border-radius: 6px;
+    line-height: 1.6;
+    color: #606266;
+    white-space: pre-wrap;
+  }
+
+  .key-points {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 8px;
+  }
+
+  .usage-stats {
+    margin-top: 16px;
+  }
+
+  .stat-item {
+    text-align: center;
+    padding: 20px;
+    background: #f8f9fa;
+    border-radius: 8px;
+  }
+
+  .stat-number {
+    font-size: 24px;
+    font-weight: bold;
+    color: #409eff;
+    margin-bottom: 8px;
+  }
+
+  .stat-label {
+    font-size: 14px;
+    color: #909399;
+  }
+
+  .exec-steps-container {
+    border: 1px solid #e4e7ed;
+    border-radius: 4px;
+    padding: 15px;
+    background-color: #f9fafc;
+  }
+
+  .exec-step-item {
+    margin-bottom: 10px;
+    padding: 10px;
+    background-color: #ffffff;
+    border: 1px solid #e4e7ed;
+    border-radius: 4px;
+  }
+
+  .step-header {
+    display: flex;
+    align-items: flex-start;
+    flex-direction: column;
+  }
+
+  .exec-step-view {
+    margin-bottom: 8px;
+    padding-left: 20px;
+    position: relative;
+  }
+
+  .step-number {
+    position: absolute;
+    left: 0;
+    font-weight: bold;
+    color: #409eff;
+  }
+
+  .step-title {
+    font-weight: bold;
+    margin-right: 5px;
+  }
+
+  .no-data {
+    color: #909399;
+    font-style: italic;
+  }
+</style>

--
Gitblit v1.9.3