From ff817dab1f7b3e762896446afbcd68579381adcf Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 02 二月 2026 16:52:10 +0800
Subject: [PATCH] 危险作业审批模块开发
---
src/pages/safeProduction/hazardSourceLedger/view.vue | 187 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 187 insertions(+), 0 deletions(-)
diff --git a/src/pages/safeProduction/hazardSourceLedger/view.vue b/src/pages/safeProduction/hazardSourceLedger/view.vue
new file mode 100644
index 0000000..441aeb6
--- /dev/null
+++ b/src/pages/safeProduction/hazardSourceLedger/view.vue
@@ -0,0 +1,187 @@
+<template>
+ <view class="hazard-source-detail">
+ <PageHeader title="鍗遍櫓婧愯鎯�"
+ @back="goBack" />
+ <!-- 鍐呭瀹瑰櫒 -->
+ <view class="content-container">
+ <!-- 鍗遍櫓婧愪俊鎭� -->
+ <view class="section">
+ <view class="section-title">鍗遍櫓婧愪俊鎭�</view>
+ <view class="info-item">
+ <text class="info-label">鍗遍櫓婧愬悕绉�</text>
+ <text class="info-value">{{ form.name || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="info-label">鍗遍櫓婧愮紪鐮�</text>
+ <text class="info-value">{{ form.code || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="info-label">鍗遍櫓婧愮被鍨�</text>
+ <text class="info-value">{{ hazard_source_type.find(item => item.value === form.type)?.label || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="info-label">椋庨櫓绛夌骇</text>
+ <text class="info-value"><u-tag :type="getRiskLevelType(form.riskLevel)">
+ {{ form.riskLevel || '-' }}
+ </u-tag></text>
+ </view>
+ <view class="info-item">
+ <text class="info-label">鎵�鍦ㄤ綅缃�</text>
+ <text class="info-value">{{ form.location || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="info-label">绠℃帶鎺柦</text>
+ <text class="info-value">{{ form.controlMeasures || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="info-label">搴撳瓨鏁伴噺</text>
+ <text class="info-value">{{ form.stockQty || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="info-label">绠℃帶璐d换浜�</text>
+ <text class="info-value">{{ form.principalUser || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="info-label">璐d换浜鸿仈绯荤數璇�</text>
+ <text class="info-value">{{ form.principalMobile || '-' }}</text>
+ </view>
+ <view class="info-item">
+ <text class="info-label">瑙勬牸 / 椋庨櫓鎻忚堪</text>
+ <text class="info-value">{{ form.specInfo || '-' }}</text>
+ </view>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script setup>
+ // 鏇挎崲 toast 鏂规硶
+ const showToast = message => {
+ uni.showToast({
+ title: message,
+ icon: "none",
+ });
+ };
+
+ import { ref, onMounted } from "vue";
+ import PageHeader from "@/components/PageHeader.vue";
+ import useUserStore from "@/store/modules/user";
+ import { useDict } from "@/utils/dict";
+
+ const userStore = useUserStore();
+
+ // 鑾峰彇瀛楀吀鏁版嵁
+ const { hazard_source_type } = useDict("hazard_source_type");
+ const { risk_level } = useDict("risk_level");
+
+ // 琛ㄥ崟鏁版嵁
+ const form = ref({
+ name: "",
+ code: "",
+ type: "",
+ riskLevel: "",
+ location: "",
+ controlMeasures: "",
+ stockQty: "",
+ principalUser: "",
+ principalMobile: "",
+ specInfo: "",
+ });
+
+ // 杩斿洖涓婁竴椤�
+ const goBack = () => {
+ // 杩斿洖鏃舵竻闄ゆ湰鍦板瓨鍌ㄧ殑鏁版嵁
+ uni.removeStorageSync("hazardSourceLedger");
+ uni.navigateBack();
+ };
+ const getRiskLevelType = riskLevel => {
+ const typeMap = {
+ 浣庨闄�: "info",
+ 涓�鑸闄�: "info",
+ 杈冨ぇ椋庨櫓: "warning",
+ 閲嶅ぇ椋庨櫓: "error",
+ };
+ return typeMap[riskLevel] || "info";
+ };
+
+ // 鍒濆鍖栭〉闈㈡暟鎹�
+ const initPageData = () => {
+ // 浠庢湰鍦板瓨鍌ㄨ幏鍙栧嵄闄╂簮璇︽儏
+ const row = uni.getStorageSync("hazardSourceLedger");
+ if (row) {
+ form.value = { ...row };
+ } else {
+ showToast("鏆傛棤鍗遍櫓婧愭暟鎹�");
+ }
+ };
+
+ onMounted(() => {
+ initPageData();
+ });
+</script>
+
+<style scoped lang="scss">
+ @import "@/static/scss/form-common.scss";
+
+ .client-visit-detail {
+ min-height: 100vh;
+ background-color: #f8f9fa;
+ }
+
+ .content-container {
+ padding: 16px;
+ }
+
+ .section {
+ background-color: #ffffff;
+ border-radius: 12px;
+ margin-bottom: 16px;
+ overflow: hidden;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
+ }
+
+ .section-title {
+ font-size: 16px;
+ font-weight: 600;
+ color: #333333;
+ padding: 16px 16px 12px;
+ border-bottom: 1px solid #f0f0f0;
+ }
+
+ .info-item {
+ display: flex;
+ padding: 14px 16px;
+ border-bottom: 1px solid #f8f8f8;
+ align-items: flex-start;
+ }
+
+ .info-item:last-child {
+ border-bottom: none;
+ }
+
+ .info-label {
+ font-size: 14px;
+ color: #666666;
+ min-width: 80px;
+ flex-shrink: 0;
+ line-height: 22px;
+ }
+
+ .info-value {
+ font-size: 14px;
+ color: #333333;
+ flex: 1;
+ line-height: 22px;
+ text-align: right;
+ }
+
+ .multi-line {
+ text-align: left;
+ word-break: break-all;
+ line-height: 1.6;
+ }
+
+ .remark-item {
+ padding-bottom: 16px;
+ }
+</style>
\ No newline at end of file
--
Gitblit v1.9.3