From a60d21cdda7df7733050315fc6462a70c273fcb4 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 04 二月 2026 17:01:02 +0800
Subject: [PATCH] Merge branch 'dev_new' of http://114.132.189.42:9002/r/product-inventory-APP-before into dev_new

---
 src/pages/safeProduction/emergencyPlanReview/view.vue |  372 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 372 insertions(+), 0 deletions(-)

diff --git a/src/pages/safeProduction/emergencyPlanReview/view.vue b/src/pages/safeProduction/emergencyPlanReview/view.vue
new file mode 100644
index 0000000..45a8124
--- /dev/null
+++ b/src/pages/safeProduction/emergencyPlanReview/view.vue
@@ -0,0 +1,372 @@
+<template>
+  <view class="emergency-plan-view">
+    <!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
+    <PageHeader title="搴旀�ラ妗堣鎯�"
+                @back="goBack" />
+    <!-- 璇︽儏鍐呭 -->
+    <view class="detail-content"
+          v-if="currentPlan">
+      <!-- 鍩烘湰淇℃伅 -->
+      <view class="info-section">
+        <!-- <view class="section-title">
+          <text class="title-text">{{ currentPlan.planName }}</text>
+        </view> -->
+        <view class="info-grid">
+          <view class="info-item">
+            <text class="info-label">搴旀�ラ妗堢紪鐮�</text>
+            <text class="info-value">{{ currentPlan.planCode || '-' }}</text>
+          </view>
+          <view class="info-item">
+            <text class="info-label">搴旀�ラ妗堝悕绉�</text>
+            <text class="info-value">{{ currentPlan.planName || '-' }}</text>
+          </view>
+          <view class="info-item">
+            <text class="info-label">棰勬绫诲瀷</text>
+            <u-tag :type="getPlanTypeTagType(currentPlan.planType)">
+              {{ emergencyPlanTypeLabel(currentPlan.planType) }}
+            </u-tag>
+          </view>
+          <view class="info-item">
+            <text class="info-label">鍙戝竷鐢熸晥鏃堕棿</text>
+            <text class="info-value">{{ currentPlan.publishTime || '-' }}</text>
+          </view>
+          <view class="info-item">
+            <text class="info-label">鏍稿績璐d换浜�</text>
+            <text class="info-value">{{ currentPlan.coreResponsorUserName || '-' }}</text>
+          </view>
+          <view class="info-item">
+            <text class="info-label">澶囨敞</text>
+            <text class="info-value">{{ currentPlan.remark || '-' }}</text>
+          </view>
+        </view>
+      </view>
+      <!-- 閫傜敤鑼冨洿 -->
+      <view class="scope-section">
+        <view class="section-header">
+          <text class="section-heading">閫傜敤鑼冨洿</text>
+        </view>
+        <view class="scope-tags">
+          <u-tag v-for="(scope, index) in applyScopeList"
+                 :key="index"
+                 type="primary"
+                 size="small"
+                 class="scope-tag">
+            {{ scope }}
+          </u-tag>
+        </view>
+      </view>
+      <!-- 搴旀�ュ缃楠� -->
+      <view class="steps-section">
+        <view class="section-header">
+          <text class="section-heading">搴旀�ュ缃楠�</text>
+        </view>
+        <view class="steps-list"
+              v-if="execStepsList.length > 0">
+          <view v-for="(step, index) in execStepsList"
+                :key="index"
+                class="step-item">
+            <view class="step-number">{{ index + 1 }}</view>
+            <view class="step-content">
+              <text class="step-title">{{ step.step }}</text>
+              <text class="step-description">{{ step.description }}</text>
+            </view>
+          </view>
+        </view>
+        <view class="no-steps"
+              v-else>
+          <text>鏆傛棤搴旀�ュ缃楠�</text>
+        </view>
+      </view>
+    </view>
+    <!-- 绌虹姸鎬� -->
+    <view class="empty-state"
+          v-else>
+      <text>鏆傛棤搴旀�ラ妗堜俊鎭�</text>
+    </view>
+  </view>
+</template>
+
+<script setup>
+  import { ref, onMounted, computed } from "vue";
+  import { onShow } from "@dcloudio/uni-app";
+  import PageHeader from "@/components/PageHeader.vue";
+  import { useDict } from "@/utils/dict";
+
+  // 鏇挎崲 toast 鏂规硶
+  defineOptions({ name: "emergency-plan-view" });
+  const showToast = message => {
+    uni.showToast({
+      title: message,
+      icon: "none",
+    });
+  };
+
+  // 褰撳墠搴旀�ラ妗�
+  const currentPlan = ref(null);
+
+  // 搴旀�ュ缃楠ゅ垪琛�
+  const execStepsList = ref([]);
+
+  // 閫傜敤鑼冨洿鍒楄〃
+  const applyScopeList = ref([]);
+
+  // 搴旀�ラ妗堢被鍨嬮�夐」
+  const { emergency_plan_type } = useDict("emergency_plan_type");
+  const emergencyPlanTypeOptions = computed(
+    () => emergency_plan_type?.value || []
+  );
+
+  // 鑾峰彇棰勬绫诲瀷鏍囩绫诲瀷
+  const getPlanTypeTagType = planType => {
+    const typeMap = {
+      emergency: "warning",
+      fire: "danger",
+      natural: "info",
+      accident: "error",
+    };
+    return typeMap[planType] || "info";
+  };
+
+  // 鑾峰彇棰勬绫诲瀷鏍囩鏂囨湰
+  const emergencyPlanTypeLabel = val => {
+    const item = emergencyPlanTypeOptions.value.find(
+      i => String(i.value) === String(val)
+    );
+    return item ? item.label : val;
+  };
+
+  // 鍒濆鍖栨暟鎹�
+  const initData = () => {
+    const emergencyPlan = uni.getStorageSync("emergencyPlan") || {};
+    if (emergencyPlan.id) {
+      currentPlan.value = emergencyPlan;
+
+      // 澶勭悊閫傜敤鑼冨洿
+      if (emergencyPlan.applyScope) {
+        const scopes = emergencyPlan.applyScope.split(",");
+        applyScopeList.value = scopes.map(scope => {
+          const scopeMap = {
+            all: "鍏ㄤ綋鍛樺伐",
+            manager: "绠$悊灞�",
+            hr: "浜轰簨閮ㄩ棬",
+            finance: "璐㈠姟閮ㄩ棬",
+            tech: "鎶�鏈儴闂�",
+          };
+          return scopeMap[scope] || scope;
+        });
+      } else {
+        applyScopeList.value = [];
+      }
+
+      // 澶勭悊搴旀�ュ缃楠�
+      if (emergencyPlan.execSteps) {
+        try {
+          execStepsList.value = JSON.parse(emergencyPlan.execSteps);
+        } catch (e) {
+          execStepsList.value = [];
+        }
+      } else {
+        execStepsList.value = [];
+      }
+    } else {
+      currentPlan.value = null;
+      applyScopeList.value = [];
+      execStepsList.value = [];
+      showToast("鏈壘鍒板簲鎬ラ妗堜俊鎭�");
+    }
+  };
+
+  // 杩斿洖涓婁竴椤�
+  const goBack = () => {
+    uni.navigateBack();
+  };
+
+  onMounted(() => {
+    initData();
+  });
+
+  onShow(() => {
+    initData();
+  });
+</script>
+
+<style scoped lang="scss">
+  @import "../../../styles/sales-common.scss";
+
+  .emergency-plan-view {
+    min-height: 100vh;
+    background: #f8f9fa;
+    padding-bottom: 32px;
+  }
+
+  .detail-content {
+    padding: 20px;
+  }
+
+  // 淇℃伅 section
+  .info-section {
+    background: #ffffff;
+    border-radius: 12px;
+    padding: 24px;
+    margin-bottom: 24px;
+    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+  }
+
+  .section-title {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    margin-bottom: 24px;
+  }
+
+  .title-text {
+    font-size: 18px;
+    font-weight: 600;
+    color: #303133;
+    flex: 1;
+  }
+
+  .type-tag {
+    margin-left: 16px;
+  }
+
+  .info-grid {
+    display: grid;
+    grid-template-columns: 1fr 1fr;
+    gap: 20px;
+  }
+
+  .info-item {
+    display: flex;
+    flex-direction: column;
+    gap: 8px;
+  }
+
+  .info-label {
+    font-size: 14px;
+    color: #909399;
+  }
+
+  .info-value {
+    font-size: 14px;
+    color: #303133;
+    word-break: break-all;
+  }
+
+  // 閫傜敤鑼冨洿 section
+  .scope-section {
+    background: #ffffff;
+    border-radius: 12px;
+    padding: 24px;
+    margin-bottom: 24px;
+    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+  }
+
+  .section-header {
+    margin-bottom: 16px;
+  }
+
+  .section-heading {
+    font-size: 16px;
+    font-weight: 600;
+    color: #303133;
+    border-left: 4px solid #2979ff;
+    padding-left: 16px;
+  }
+
+  .scope-tags {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 12px;
+  }
+
+  .scope-tag {
+    margin-bottom: 8px;
+  }
+
+  // 搴旀�ュ缃楠� section
+  .steps-section {
+    background: #ffffff;
+    border-radius: 12px;
+    padding: 24px;
+    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+  }
+
+  .steps-list {
+    margin-top: 16px;
+  }
+
+  .step-item {
+    display: flex;
+    margin-bottom: 24px;
+    position: relative;
+  }
+
+  .step-item::before {
+    content: "";
+    position: absolute;
+    left: 15px;
+    top: 40px;
+    bottom: -24px;
+    width: 2px;
+    background-color: #eaeaea;
+  }
+
+  .step-item:last-child::before {
+    display: none;
+  }
+
+  .step-number {
+    width: 32px;
+    height: 32px;
+    border-radius: 50%;
+    background-color: #2979ff;
+    color: #ffffff;
+    font-size: 14px;
+    font-weight: 600;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-right: 16px;
+    flex-shrink: 0;
+    margin-top: 4px;
+  }
+
+  .step-content {
+    flex: 1;
+  }
+
+  .step-title {
+    font-size: 16px;
+    font-weight: 600;
+    color: #303133;
+    display: block;
+    margin-bottom: 8px;
+  }
+
+  .step-description {
+    font-size: 14px;
+    color: #606266;
+    line-height: 1.5;
+    word-break: break-all;
+  }
+
+  .no-steps {
+    padding: 40px;
+    text-align: center;
+    color: #909399;
+    font-size: 14px;
+    background-color: #f8f9fa;
+    border-radius: 8px;
+  }
+
+  // 绌虹姸鎬�
+  .empty-state {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    height: 60vh;
+    font-size: 16px;
+    color: #909399;
+  }
+</style>

--
Gitblit v1.9.3