From bdb3123664234ec9bfe7f43be21fac7250f9479f Mon Sep 17 00:00:00 2001
From: 王恒 <318726284@qq.com>
Date: 星期三, 13 八月 2025 20:00:51 +0800
Subject: [PATCH] '修改字段、处理空值'

---
 policy/reportDetails/reportDetails.vue |  288 +++++++++++++++++++++++++++++----------------------------
 1 files changed, 148 insertions(+), 140 deletions(-)

diff --git a/policy/reportDetails/reportDetails.vue b/policy/reportDetails/reportDetails.vue
index da7420a..0c9453e 100644
--- a/policy/reportDetails/reportDetails.vue
+++ b/policy/reportDetails/reportDetails.vue
@@ -1,149 +1,157 @@
 <template>
-	<view class="page-box">
-		<view class="box">
-			<view class="form">
-				<view class="form-item">
-					<view class="label">鎵ф硶涓婚</view>
-					<view class="input">{{details.enforceReason}}</view>
-				</view>
-				<view class="form-item">
-					<view class="label">鎵ф硶瀵硅薄</view>
-					<view class="input">{{details.companyName}}</view>
-				</view>
-				<view class="form-item">
-					<view class="label">鎵ф硶鏃堕棿</view>
-					<view class="input">{{details.planTime}}</view>
-				</view>
-				<view class="form-item">
-					<view class="label">鎵ф硶绫诲瀷</view>
-					<view class="input">{{enforceType}}</view>
-				</view>
-				<view class="form-item">
-					<view class="label">鎵ф硶浜哄憳</view>
-					<view class="input">{{details.executeUser}}</view>
-				</view>
-				<view class="form-item">
-					<view class="label">鎵ф硶閮ㄩ棬</view>
-					<view class="input">{{details.executeDeptName}}</view>
-				</view>
-			</view>
-		</view>
-		<view class="box">
-			<view class="form-input">
-				<view class="form-input-item" style="margin-bottom: 40rpx;">
-					<view class="form-label require" style="margin-bottom: 40rpx;">鎵ф硶缁撴灉</view>
-					<view>
-						<u-radio-group v-model="form.regionStatus">
-							<u-radio shape="circle" label="姝e父" name="0"></u-radio>
-							<u-radio shape="circle" label="寰呮暣鏀�" name="1"></u-radio>
-						</u-radio-group>
-					</view>
-				</view>
-				<view class="form-input-item">
-					<view class="form-label require">鎵ф硶缁撴灉璇存槑</view>
-					<u-textarea placeholder="璇疯緭鍏�..." count v-model="form.regionReason" maxlength="500"></u-textarea>
-				</view>
-				
-				<view class="form-input-item">
-					<view class="form-label require">鎵ф硶鐓х墖</view>
-					<view>
-						<view class="show-hint">鍙笂浼�9寮犲浘锛屽崟寮犱笉寰楄秴杩�10M</view>
-					</view>
-					<view>
-						<uploadImage ref="uploadImage"></uploadImage>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="down">
-			<view class="button" @click="startReport">
-				涓婃姤缁撴灉
-			</view>
-		</view>
-	</view>
+  <view class="page-box">
+    <view class="box">
+      <view class="form">
+        <view class="form-item">
+          <view class="label">鎵ф硶涓婚</view>
+          <view class="input">{{details.enforceReason}}</view>
+        </view>
+        <view class="form-item">
+          <view class="label">鎵ф硶瀵硅薄</view>
+          <view class="input">{{details.companyName}}</view>
+        </view>
+        <view class="form-item">
+          <view class="label">鎵ф硶鏃堕棿</view>
+          <view class="input">{{details.planTime}}</view>
+        </view>
+        <view class="form-item">
+          <view class="label">妫�鏌ユ柟寮�</view>
+          <view class="input">{{enforceType}}</view>
+        </view>
+        <view class="form-item">
+          <view class="label">鎵ф硶浜哄憳</view>
+          <view class="input">{{details.executeUser}}</view>
+        </view>
+        <view class="form-item">
+          <view class="label">鎵ф硶閮ㄩ棬</view>
+          <view class="input">{{details.executeDeptName}}</view>
+        </view>
+      </view>
+    </view>
+    <view class="box">
+      <view class="form-input">
+        <view class="form-input-item" style="margin-bottom: 40rpx;">
+          <view class="form-label require" style="margin-bottom: 40rpx;">鎵ф硶缁撴灉</view>
+          <view>
+            <u-radio-group v-model="form.regionStatus">
+              <u-radio shape="circle" label="姝e父" name="0"></u-radio>
+              <u-radio shape="circle" label="寰呮暣鏀�" name="1"></u-radio>
+            </u-radio-group>
+          </view>
+        </view>
+        <view class="form-input-item">
+          <view class="form-label require">鎵ф硶缁撴灉璇存槑</view>
+          <u-textarea placeholder="璇疯緭鍏�..." count v-model="form.regionReason" maxlength="500"></u-textarea>
+        </view>
+
+        <view class="form-input-item">
+          <view class="form-label require">鎵ф硶鐓х墖</view>
+          <view>
+            <view class="show-hint">鍙笂浼�9寮犲浘锛屽崟寮犱笉寰楄秴杩�10M</view>
+          </view>
+          <view>
+            <uploadImage ref="uploadImage"></uploadImage>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="down">
+      <view class="button" @click="startReport">
+        涓婃姤缁撴灉
+      </view>
+    </view>
+  </view>
 </template>
 
 <script>
-	import uploadImage from '@/policy/components/upload.vue'
-	import { orderDetails,orderUpd } from '@/api/policy.js'
-	import { getDicts } from '@/api/data.js'
-	export default {
-		components: {
-			uploadImage
-		},
-		data() {
-			return {
-				form: {
-					regionReason: '',
-					regionStatus: '0'
-				},
-				fileList1: [],
-				details: {},
-				enforceType: ""
-			}
-		},
-		onLoad(options) {
-			this.orderDetails(options.id)
-		},
-		methods: {
-			// 鑾峰彇鎵ф硶绫诲瀷鏋氫妇
-			getDicts() {
-				getDicts('enforce_type').then(val => {
-					if(val.data.data) {
-						this.enforceType = val.data.data.find(item => item.dictCode == this.details.enforceType).dictLabel
-					}
-				})
-			},
-			// 鑾峰彇鎵ф硶鍗曡鎯�
-			orderDetails(id) {
-				orderDetails({orderId: id}).then(val => {
-					this.details = val.data.data
-					this.getDicts()
-				})
-			},
-			// 涓婃姤鎵ц缁撴灉
-			startReport() {
-				if(!this.form.regionReason){
-					uni.showToast({
-						title: '璇峰~鍐欐墽娉曠粨鏋�',
-						icon: 'none'
-					})
-					return
-				}
-				const image = this.$refs.uploadImage.imageList
-				if(!image.length){
-					uni.showToast({
-						title: '璇蜂笂浼犳墽娉曞浘鐗�',
-						icon: 'none'
-					})
-					return
-				}
-				this.details.regionReason = this.form.regionReason
-				this.form.regionImgs = image.join()
-				this.form.orderId = this.details.orderId
-				orderUpd(this.form).then(val  =>{
-					if(val.data.code == 200) {
-						uni.showToast({
-							title: '涓婃姤鎴愬姛',
-							icon: 'none'
-						})
-						setTimeout(() => {
-							uni.navigateBack()
-						}, 500)
-					}
-				})
-			}
-		}
-	}
+  import uploadImage from '@/policy/components/upload.vue'
+  import {
+    orderDetails,
+    orderUpd
+  } from '@/api/policy.js'
+  import {
+    getDicts
+  } from '@/api/data.js'
+  export default {
+    components: {
+      uploadImage
+    },
+    data() {
+      return {
+        form: {
+          regionReason: '',
+          regionStatus: '0'
+        },
+        fileList1: [],
+        details: {},
+        enforceType: ""
+      }
+    },
+    onLoad(options) {
+      this.orderDetails(options.id)
+    },
+    methods: {
+      // 鑾峰彇鎵ф硶绫诲瀷鏋氫妇
+      getDicts() {
+        getDicts('enforce_type').then(val => {
+          if (val.data.data) {
+            this.enforceType = val.data.data.find(item => item.dictCode == this.details.enforceType).dictLabel
+          }
+        })
+      },
+      // 鑾峰彇鎵ф硶鍗曡鎯�
+      orderDetails(id) {
+        orderDetails({
+          orderId: id
+        }).then(val => {
+          this.details = val.data.data
+          this.getDicts()
+        })
+      },
+      // 涓婃姤鎵ц缁撴灉
+      startReport() {
+        if (!this.form.regionReason) {
+          uni.showToast({
+            title: '璇峰~鍐欐墽娉曠粨鏋�',
+            icon: 'none'
+          })
+          return
+        }
+        const image = this.$refs.uploadImage.imageList
+        if (!image.length) {
+          uni.showToast({
+            title: '璇蜂笂浼犳墽娉曞浘鐗�',
+            icon: 'none'
+          })
+          return
+        }
+        this.details.regionReason = this.form.regionReason
+        this.form.regionImgs = image.join()
+        this.form.orderId = this.details.orderId
+        orderUpd(this.form).then(val => {
+          if (val.data.code == 200) {
+            uni.showToast({
+              title: '涓婃姤鎴愬姛',
+              icon: 'none'
+            })
+            setTimeout(() => {
+              uni.navigateBack()
+            }, 500)
+          }
+        })
+      }
+    }
+  }
 </script>
 <style>
-	page {
-		background-color: #F4F4F4;
-	}
+  page {
+    background-color: #F4F4F4;
+  }
 </style>
 <style lang="scss" scoped>
-	@import "./reportDetails.scss";
-	/deep/ .u-radio{
-		margin-right: 80rpx;
-	}
+  @import "./reportDetails.scss";
+
+  ::v-deep .u-radio {
+    margin-right: 80rpx;
+  }
 </style>
\ No newline at end of file

--
Gitblit v1.9.1