From 554f8096e1f384f14b9424f5142d63f90c72a3eb Mon Sep 17 00:00:00 2001
From: hejianhao <15708179461@qq.com>
Date: 星期一, 19 五月 2025 22:57:46 +0800
Subject: [PATCH] H5接口对接

---
 H5/pages/supervision/supervision.vue               |   66 +++++++++++----------
 H5/pages/supervision/service.js                    |   22 ++++++-
 H5/pages/add-progress/index.vue                    |    2 
 H5/pages/supervision/supervision-progress.vue      |   24 ++++++-
 H5/pages/work-detail/work-detail.vue               |   20 ++++++
 H5/pages/supervision/edit-supervision-progress.vue |   13 +++-
 6 files changed, 101 insertions(+), 46 deletions(-)

diff --git a/H5/pages/add-progress/index.vue b/H5/pages/add-progress/index.vue
index a94cd59..58bc82d 100644
--- a/H5/pages/add-progress/index.vue
+++ b/H5/pages/add-progress/index.vue
@@ -236,7 +236,7 @@
 								timeout: 1000 * 45,
 								name: 'file',
 								header: {
-									Authorization: cuni.getStorageSync('token')
+									Authorization: uni.getStorageSync('token')
 								},
 								success: (res) => {
 									if (JSON.parse(res.data).code == 200) {
diff --git a/H5/pages/supervision/edit-supervision-progress.vue b/H5/pages/supervision/edit-supervision-progress.vue
index 4cc0ced..18a6bac 100644
--- a/H5/pages/supervision/edit-supervision-progress.vue
+++ b/H5/pages/supervision/edit-supervision-progress.vue
@@ -74,7 +74,7 @@
 			</view>
 		</view>
 		<view @click.stop="submit" class="mt-38 fs-35 lh-96 br-48 txt-center font-bold bgcolor6 color4 fixed"
-			style="width: calc(100% - 62rpx);bottom: calc(env(safe-area-inset-bottom) + 10rpx);">确认添加</view>
+			style="width: calc(100% - 62rpx);bottom: calc(env(safe-area-inset-bottom) + 10rpx);">确认</view>
 		<view class="btn-box"></view>
 		<view class="safe-box"></view>
 	</view>
@@ -82,7 +82,7 @@
 
 <script>
 	import {
-		saveProcess,
+		editProgress,
 		getComplaintDetail
 	} from './service'
 	import config from '@/config/index.js'
@@ -97,10 +97,16 @@
 				video: [],
 				againCklicFlag: true,
 				rulsFlag: false,
+				progressId: ''
 			}
 		},
 		onLoad(params) {
 			this.complaintId = params.id
+			this.describe = JSON.parse(params.data).describe
+			this.progressId = JSON.parse(params.data).id
+			this.video = JSON.parse(params.data).video.split(',')
+			this.imgUrls = JSON.parse(params.data).imgUrl.split(',')
+			this.localImageUrls = JSON.parse(params.data).imgUrl.split(',')
 			getComplaintDetail({
 				id: params.id
 			}).then(res => {
@@ -122,12 +128,13 @@
 					})
 				}
 				let obj = {
+					id: this.progressId,
 					complaintId: this.complaintId,
 					describe: this.describe,
 					imgUrl: this.imgUrls.join(','),
 					video: this.video.join(',')
 				}
-				saveProcess(obj).then(res => {
+				editProgress(obj).then(res => {
 					if (res.code == 200) {
 						uni.showToast({
 							title: '提交成功',
diff --git a/H5/pages/supervision/service.js b/H5/pages/supervision/service.js
index b9cb14f..bea37fd 100644
--- a/H5/pages/supervision/service.js
+++ b/H5/pages/supervision/service.js
@@ -1,11 +1,25 @@
 import request from '@/utils/request.js'
 
-// 工单列表
-export const getList = (params) => {
-	return request.post(`/api/huacheng-sangeshenbian/applet/complaint/list`, params)
+// 处理记录
+export const getProcessingList = (data) => {
+	return request.post(`/api/huacheng-sangeshenbian/applet/supervise/processing-record-page`, data)
+}
+// 问题驳回池
+export const getRejectList = (data) => {
+	return request.post(`/api/huacheng-sangeshenbian/applet/supervise/reject-record-page`, data)
 }
 
-// 工单详情
+// 详情
 export const getComplaintDetail = (params) => {
 	return request.get('/api/huacheng-sangeshenbian/applet/complaint/detail', params)
+}
+
+// 编辑办理进度
+export const editProgress = (params) => {
+	return request.put('/api/huacheng-sangeshenbian/applet/complaint-progress/edit', params)
+}
+
+// 删除办理进度
+export const delProgress = (id) => {
+	return request.delete(`/api/huacheng-sangeshenbian/applet/complaint-progress/${id}`)
 }
\ No newline at end of file
diff --git a/H5/pages/supervision/supervision-progress.vue b/H5/pages/supervision/supervision-progress.vue
index b0a7520..fc44a39 100644
--- a/H5/pages/supervision/supervision-progress.vue
+++ b/H5/pages/supervision/supervision-progress.vue
@@ -99,7 +99,8 @@
 <script>
 	import dayjs from '../../uni_modules/uview-ui/libs/util/dayjs'
 	import {
-		getComplaintDetail
+		getComplaintDetail,
+		delProgress
 	} from './service'
 	export default {
 		data() {
@@ -129,7 +130,6 @@
 			getComplaintDetail({
 				id: this.id
 			}).then(res => {
-
 				this.info = {
 					...res.data
 				}
@@ -137,7 +137,23 @@
 		},
 		methods: {
 			deleteProgress() {
-
+				delProgress(this.row.id).then(res => {
+					uni.showToast({
+						icon: 'none',
+						mask: true,
+						title: '删除成功'
+					})
+					this.$refs.customPopup.show = false
+					setTimeout(() => {
+						getComplaintDetail({
+							id: this.id
+						}).then(res => {
+							this.info = {
+								...res.data
+							}
+						})
+					}, 1500)
+				})
 			},
 			toDelete(item) {
 				this.row = item
@@ -145,7 +161,7 @@
 			},
 			toEdit(item) {
 				uni.navigateTo({
-					url: `/pages/supervision/edit-supervision-progress?id=${this.id}`
+					url: `/pages/supervision/edit-supervision-progress?id=${this.id}&data=${JSON.stringify(item)}`
 				})
 			},
 			callPhone(phoneNumber) {
diff --git a/H5/pages/supervision/supervision.vue b/H5/pages/supervision/supervision.vue
index a55d20b..8e72eae 100644
--- a/H5/pages/supervision/supervision.vue
+++ b/H5/pages/supervision/supervision.vue
@@ -2,25 +2,23 @@
 	<view class="content">
 		<view class="bgColor2 shadow1 pb-19" style="position: sticky;top: 0;z-index: 999;">
 			<view class="h-96 flex a-center fs-27  j-between txt-center  font-w400 color1">
-				<view @click="changeType('1')" class="flex1 bgColor2 relative"
-					:class="searchParams.type == '1' && 'color2 font-bold'">
+				<view @click="changeType(1)" class="flex1 bgColor2 relative" :class="type == 1 && 'color2 font-bold'">
 					<view class="relative zIndex1000">
 						处理记录
 					</view>
-					<view v-if="searchParams.type == '1'" class="bgColor1"></view>
+					<view v-if="type == 1" class="bgColor1"></view>
 				</view>
-				<view @click="changeType('2')" class="flex1 bgColor2 relative"
-					:class="searchParams.type == '2' && 'color2 font-bold'">
+				<view @click="changeType(2)" class="flex1 bgColor2 relative" :class="type == 2 && 'color2 font-bold'">
 					<view class="relative zIndex1000">
 						问题驳回池
 					</view>
-					<view v-if="searchParams.type == '2'" class="bgColor1"></view>
+					<view v-if="type == 2" class="bgColor1"></view>
 				</view>
 			</view>
 			<view class="flex a-center j-between mx-27 pl-38 border2">
 				<view class="flex a-center flex1">
 					<image src="../../static/search.png" mode="widthFix" class="w-31 h-31 shrink0 mr-13" />
-					<input v-model="searchParams.searchStr" class="fs-27 flex1" placeholder="输入姓名、联系电话关键字搜索" />
+					<input v-model="searchParams.keyword" class="fs-27 flex1" placeholder="输入姓名、联系电话关键字搜索" />
 				</view>
 				<view @click="searchList" class="fs-23 lh-69 txt-center px-29 br-48 my-4 mx-4 bgcolor88">搜索</view>
 			</view>
@@ -101,18 +99,18 @@
 				<view class="mt-31 border1">
 					<view class="left"></view>
 					<view class="right"></view>
-					<view v-if="searchParams.type == '1'">
+					<view v-if="type == 1">
 						<view class="flex a-center j-between lh-38 mt-29 ml-38 mr-23 fs-27">
 							<view>添加办理进度数</view>
-							<view class="font-bold">10</view>
+							<view class="font-bold">{{item.progressCount}}</view>
 						</view>
 						<view class="flex a-center j-between lh-38 mt-29 ml-38 mr-23 fs-27">
 							<view>已下派次数</view>
-							<view class="font-bold">10</view>
+							<view class="font-bold">{{item.assignmentCount}}</view>
 						</view>
 						<view class="flex a-center j-between lh-38 mt-29 ml-38 mr-23 fs-27">
 							<view>已上报次数</view>
-							<view class="font-bold">10</view>
+							<view class="font-bold">{{item.reportCount}}</view>
 						</view>
 						<view class="flex a-center j-between lh-38 mt-29 ml-38 mr-23 fs-27">
 							<view>创建时间</view>
@@ -122,31 +120,32 @@
 					<view v-else>
 						<view class="flex a-center j-between lh-38 mt-29 ml-38 mr-23 fs-27">
 							<view>申请时间</view>
-							<view class="font-bold">2025-09-09 11:09:09</view>
+							<view class="font-bold">{{ item.applyTime | formatTime }}</view>
 						</view>
 						<view class="flex a-center j-between lh-38 mt-29 ml-38 mr-23 fs-27">
 							<view>申请人</view>
 							<view class="flex a-center">
-								<view class="font-bold">李雷 13987654321</view>
-								<image @click.stop="callPhone(item.contactNumber)" src="../../static/tell.png"
+								<view class="font-bold">{{item.reporter}} {{item.reporterPhone}}</view>
+								<image @click.stop="callPhone(item.reporterPhone)" src="../../static/tell.png"
 									class="w-58 h-58 shrink0 ml-19" />
 							</view>
 						</view>
 						<view class="flex a-center j-between lh-38 mt-29 ml-38 mr-23 fs-27">
 							<view>审批时间</view>
-							<view class="font-bold">2025-09-09 11:09:09</view>
+							<view class="font-bold">{{ item.auditTime | formatTime }}</view>
 						</view>
 						<view class="flex a-center j-between lh-38 mt-29 ml-38 mr-23 fs-27">
 							<view>审批人</view>
 							<view class="flex a-center">
-								<view class="font-bold">李雷 13987654321</view>
-								<image @click.stop="callPhone(item.contactNumber)" src="../../static/tell.png"
+								<view class="font-bold">{{item.auditorName}} {{item.auditorPhone}}</view>
+								<image @click.stop="callPhone(item.auditorPhone)" src="../../static/tell.png"
 									class="w-58 h-58 shrink0 ml-19" />
 							</view>
 						</view>
-						<view class="flex a-center j-between lh-38 mt-29 ml-38 mr-23 fs-27">
+						<view class="flex j-between lh-38 mt-29 ml-38 mr-23 fs-27">
 							<view class="shrink0">驳回理由</view>
-							<view style="max-width: 458rpx; text-align: right;font-weight: bold;">不同意当前申请不同意当前申请不同意当前申请
+							<view style="max-width: 458rpx; text-align: right;font-weight: bold;">
+								{{item.rejectReason}}
 							</view>
 						</view>
 					</view>
@@ -160,17 +159,17 @@
 <script>
 	import dayjs from '@/uni_modules/uview-ui/libs/util/dayjs.js'
 	import {
-		getList
+		getProcessingList,
+		getRejectList
 	} from './service.js'
 	export default {
 		data() {
 			return {
-				active: 1,
+				type: 1,
 				searchParams: {
 					pageNum: 1,
 					pageSize: 10,
-					type: '1',
-					searchStr: ''
+					keyword: ''
 				},
 				list: [],
 				status: 'loadMore',
@@ -185,7 +184,7 @@
 					'6': '上级驳回',
 					'7': '延期待审核',
 					'8': '已办结'
-				}
+				},
 			}
 		},
 		onReachBottom() {
@@ -220,6 +219,14 @@
 		},
 		methods: {
 			searchList() {
+				if (this.searchParams.keyword == '') {
+					uni.showToast({
+						title: '请输入关键字搜索',
+						icon: 'none',
+						mask: true
+					})
+					return
+				}
 				this.searchParams.pageNum = 1
 				this.fetchList(this.searchParams, (e) => {
 					this.list = e.records || []
@@ -242,24 +249,19 @@
 			},
 			fetchList(params, callback) {
 				if (this.status == 'loading') return
-				this.status = 'loading'
-				getList(params).then(res => {
+				this.status = 'loading';
+				[getProcessingList, getRejectList][this.type - 1](params).then(res => {
 					if (res.code == 200) {
-						res.data.records.map(item => {
-							if (item.images) {
-								item.images = item.images.split(',')
-							}
-						})
 						callback(res.data)
 					}
 				})
 			},
 			// 切换状态筛选
 			changeType(type) {
+				this.type = type
 				this.searchParams = {
 					pageNum: 1,
 					pageSize: 10,
-					type, //全部:不传,上报待审核:0,正在办理:1, 办结:2
 				}
 				this.fetchList(this.searchParams, (e) => {
 					this.list = e.records || []
diff --git a/H5/pages/work-detail/work-detail.vue b/H5/pages/work-detail/work-detail.vue
index f0d15bd..a3bdef8 100644
--- a/H5/pages/work-detail/work-detail.vue
+++ b/H5/pages/work-detail/work-detail.vue
@@ -165,9 +165,9 @@
 			<!-- 问题描述 -->
 			<view class="problem">
 				<view class="title">问题描述</view>
-				<view v-for="(item,index) in 2" :key="index"
+				<view v-for="(item,index) in getVoiceFile(orderInfo.voiceFile)" :key="index"
 					class="flex a-center j-between py-17 px-19 br-8 bgcolor1 mb-19">
-					<view class="fs-27 lh-38">语音名字</view>
+					<view class="fs-27 lh-38">语音名字{{(index + 1) | numToWords}}</view>
 					<image v-if="!playFlag" @click.stop="playRecording(item)" src="../../static/24gf-playCircle@2x.png"
 						class="w-27 h-27 shrink0" />
 					<image v-else @click.stop="pausePlaying" src="../../static/pausePlaying.png"
@@ -432,6 +432,18 @@
 			formatTime(val) {
 				if (!val) return ''
 				return dayjs(val).format('YYYY-MM-DD HH:mm:ss')
+			},
+			numToWords(val) {
+				const words = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
+				// 处理 0-10
+				if (val >= 0 && val <= 10) return words[val];
+				// 处理 11-99
+				if (val > 10 && val < 100) {
+					const ten = Math.floor(val / 10);
+					const unit = val % 10;
+					return `${ten > 1 ? words[ten] : ''}十${unit > 0 ? words[unit] : ''}`;
+				}
+				return val; // 超过99返回原数字
 			}
 		},
 		onShow() {
@@ -454,6 +466,10 @@
 		},
 		methods: {
 			...mapActions(["playRecording", "pausePlaying"]),
+			getVoiceFile(voiceFile) {
+				if (!voiceFile || voiceFile.length == 0) return []
+				return voiceFile.split(',')
+			},
 			callPhone(phoneNumber) {
 				uni.makePhoneCall({
 					phoneNumber

--
Gitblit v1.7.1