Parcourir la source

任务模块功能

yf_zhb il y a 2 ans
Parent
commit
79ba16d876
34 fichiers modifiés avec 10670 ajouts et 9534 suppressions
  1. 3 1
      MingGaoApp/App.vue
  2. 1 1
      MingGaoApp/components/task-card/task-card.vue
  3. 2 1
      MingGaoApp/manifest.json
  4. 11 0
      MingGaoApp/pages.json
  5. 10 4
      MingGaoApp/pages/index/clockDetail.vue
  6. 6 2
      MingGaoApp/pages/index/components/ClockInRecord.vue
  7. 21 9
      MingGaoApp/pages/index/components/Entrapment.vue
  8. 46 23
      MingGaoApp/pages/index/components/EntrapmentAdd.vue
  9. 2 2
      MingGaoApp/pages/index/components/Gis.vue
  10. 1 2
      MingGaoApp/pages/index/details.vue
  11. 30 12
      MingGaoApp/pages/index/index.vue
  12. 388 0
      MingGaoApp/pages/index/taskEdit.vue
  13. 538 564
      MingGaoApp/pages/response/details.vue
  14. 4 9
      MingGaoApp/static/response/video.svg
  15. BIN
      MingGaoApp/unpackage/cache/apk/__UNI__1BA09AD_cm.apk
  16. 1 1
      MingGaoApp/unpackage/cache/apk/apkurl
  17. 1 1
      MingGaoApp/unpackage/cache/apk/cmManifestCache.json
  18. 2 2
      MingGaoApp/unpackage/cache/wgt/__UNI__1BA09AD/app-config-service.js
  19. 5 5
      MingGaoApp/unpackage/cache/wgt/__UNI__1BA09AD/app-service.js
  20. 1 1
      MingGaoApp/unpackage/cache/wgt/__UNI__1BA09AD/app-view.js
  21. 1 1
      MingGaoApp/unpackage/cache/wgt/__UNI__1BA09AD/pages/response/video.js
  22. BIN
      MingGaoApp/unpackage/debug/android_debug.apk
  23. 2 2
      MingGaoApp/unpackage/dist/build/app-plus/app-config-service.js
  24. 5 5
      MingGaoApp/unpackage/dist/build/app-plus/app-service.js
  25. 1 1
      MingGaoApp/unpackage/dist/build/app-plus/app-view.js
  26. 1 1
      MingGaoApp/unpackage/dist/build/app-plus/manifest.json
  27. 1 1
      MingGaoApp/unpackage/dist/build/app-plus/pages/response/video.js
  28. 2 2
      MingGaoApp/unpackage/dist/dev/app-plus/app-config-service.js
  29. 5087 4785
      MingGaoApp/unpackage/dist/dev/app-plus/app-service.js
  30. 4491 4090
      MingGaoApp/unpackage/dist/dev/app-plus/app-view.js
  31. 1 1
      MingGaoApp/unpackage/dist/dev/app-plus/manifest.json
  32. 1 1
      MingGaoApp/unpackage/dist/dev/app-plus/pages/response/video.js
  33. BIN
      MingGaoApp/unpackage/release/apk/__UNI__1BA09AD__20230216175320.apk
  34. 4 4
      MingGaoApp/util/url.js

+ 3 - 1
MingGaoApp/App.vue

@@ -66,7 +66,7 @@
 					that.globalData.token = res.data
 					// console.log('登录成功了')
 					console.log(res)
-					that.msgInit(); // 文本初始化
+					// that.msgInit(); // 文本初始化
 				},
 				fail: function(err) {
 					console.log(err)
@@ -227,6 +227,7 @@
 						if (val.data.errorCode == 403) {
 							uni.setStorageSync('session_key', '')
 							uni.$u.totast('用户在其他地方登陆,请重新登陆')
+							this.close();
 							setTimeout(() => {
 								uni.navigateTo({
 									url: "/pages/login/login"
@@ -331,6 +332,7 @@
 				that.globalData.socketTask = null
 				clearTimeout(that.globalData.timeoutObj);
 				clearTimeout(that.globalData.reconnectTimeOutObj);
+				uni.hideLoading(); // 关闭通信异常弹框
 			},
 			//允许程序后台运行,以持续获取GPS位置  
 			wakeLock() {

+ 1 - 1
MingGaoApp/components/task-card/task-card.vue

@@ -85,7 +85,7 @@
 								<image src="@/static/image/task/icon/finished.svg" mode="aspectFit" class="img">
 								</image>
 							</view>
-							<view class="actions__btn-text">完成</view>
+							<view class="actions__btn-text">填报</view>
 						</view>
 					</template>
 				</view>

+ 2 - 1
MingGaoApp/manifest.json

@@ -22,7 +22,8 @@
         /* 模块配置 */
         "modules" : {
             "Geolocation" : {},
-            "Maps" : {}
+            "Maps" : {},
+            "Camera" : {}
         },
         /* 应用发布信息 */
         "distribute" : {

+ 11 - 0
MingGaoApp/pages.json

@@ -244,6 +244,17 @@
 			}
 		},
 		{
+			"path": "pages/index/taskEdit",
+			"style": {
+				"navigationBarTitleText": "任务填报",
+				"enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#ffffff",
+				"navigationBarShadow": {
+					"colorType": "grey"
+				}
+			}
+		},
+		{
 			"path": "pages/supervise/supetask",
 			"style": {
 				"navigationBarTitleText": "",

+ 10 - 4
MingGaoApp/pages/index/clockDetail.vue

@@ -21,7 +21,7 @@
 						<view class="icon" @click="handleRemove(index)">
 							<u-icon name="close" color="#fff"></u-icon>
 						</view>
-						<image :src="baseUrl+item" mode="" class="img"></image>
+						<image :src="baseUrl+item" mode="aspectFit" class="img"></image>
 					</view>
 					<view class="clock-details__upload" @click="chooseImage" v-if="urllist.length<3">
 						<u-icon size="20" name="plus" color="#409eff"></u-icon>
@@ -73,6 +73,8 @@
 		},
 		onLoad(options) {
 			console.warn('clock detail ', options)
+			this.message = '';
+			this.urllist = [];
 			this.taskID = options.taskID;
 		},
 		mounted() {
@@ -145,7 +147,7 @@
 				try {
 					this.validate();
 				} catch (error) {
-					uni.$u.toast(error.message);
+					return uni.$u.toast(error.message);
 				}
 
 				this.loading = true;
@@ -184,8 +186,11 @@
 				});
 			},
 			handleRemove(index) {
+				console.log(index, 'handle remove', this.urllist)
 				if (index !== undefined) {
-					pullAt(this.urllist, index)
+					// pullAt(this.urllist, index)
+					this.urllist.splice(index, 1)
+					console.log(this.urllist, 'remove finished ')
 				}
 			},
 			oncancle() {
@@ -255,7 +260,8 @@
 		}
 
 		&__img-container {
-			@include hairline-bottom(rgba(151, 151, 151, 0.09));
+			border-bottom: 1px solid rgba(151, 151, 151, 0.09);
+			// @include hairline-bottom(rgba(151, 151, 151, 0.09));
 		}
 
 		&__imgs {

+ 6 - 2
MingGaoApp/pages/index/components/ClockInRecord.vue

@@ -14,16 +14,20 @@
 							<uni-icons type="location-filled" color="#1B76FF"></uni-icons>
 						</view>
 						<view class="step-item__content">
-							<image v-for="(imgItem,index) in item.img_list" :key="imgItem+index" ::src="baseUrl+imgItem"
+							<!-- <view v-for="(imgItem,index) in item.img_list" :key="imgItem+index">{{imgItem}}
+							</view> -->
+							<image v-for="(imgItem,index) in item.img_list" :key="imgItem+index" :src="baseUrl+imgItem"
 								mode="aspectFit" class="img"></image>
 
 						</view>
 						<view class="step-item__tips">
-							任务描述:{{item.message || ''}}
+							签到描述:{{item.message || ''}}
 						</view>
 					</view>
 				</u-steps-item>
 			</u-steps>
+			<u-empty text="暂无数据" v-if="dataSource.clock_in_list && !dataSource.clock_in_list.length">
+			</u-empty>
 		</view>
 	</view>
 </template>

+ 21 - 9
MingGaoApp/pages/index/components/Entrapment.vue

@@ -1,13 +1,13 @@
 <template>
 	<view class="entrapment">
 		<view class="entrapment-card">
-			<!-- <view class="entrapment-card__header">
-				<view class="entrapment-card__title"></view>
-				<view class="entrapment-card__update">
+			<view class="entrapment-card__header" v-if="isShowHeader">
+				<view class="entrapment-card__title edit-title">诱捕器</view>
+				<!-- <view class="entrapment-card__update">
 					<uni-icons type="loop" color="#1B76FF"></uni-icons>
 					<text class="text">更新</text>
-				</view>
-			</view> -->
+				</view> -->
+			</view>
 			<view class="entrapment-card__list">
 				<view class="entrapment-card__item" v-for="item in dataSource.trap_record_list" :key="item.id">
 					<view class="entrapment-card__text">{{item.trap_number}}<text
@@ -16,14 +16,13 @@
 						<u-button v-if="!item.report_status" type="primary" text="填写" size="small"
 							@click="handleEditEntrapmentInfo(item)">
 						</u-button>
-						<view class="entrapment-card__update" v-else>
+						<view class="entrapment-card__update" v-else @click="handleEditEntrapmentInfo(item)">
 							<uni-icons type="loop" color="#1B76FF"></uni-icons>
 							<text class="text">更新</text>
 						</view>
 					</view>
 					<view class="entrapment-card__btn" v-else>
-						<u-button type="primary" text="查看" size="small"
-							@click="handleEditEntrapmentInfo(item)">
+						<u-button type="primary" text="查看" size="small" @click="handleEditEntrapmentInfo(item)">
 						</u-button>
 					</view>
 					<!--  -->
@@ -100,6 +99,10 @@
 			isEdit: {
 				type: Boolean,
 				default: false,
+			},
+			isShowHeader: {
+				type: Boolean,
+				default: false,
 			}
 		},
 		components: {
@@ -130,7 +133,8 @@
 				this.entrapmentBaseInfo = {
 					id: row.id,
 					trap_number: row.trap_number,
-					comtype: this.isEdit
+					comtype: this.isEdit,
+					taskStatus:this.dataSource.task_status
 				};
 			}
 		}
@@ -153,6 +157,14 @@
 				font-size: 12px;
 				line-height: 18px;
 				margin-bottom: 28rpx;
+				
+				.edit-title {
+					font-size: 14px;
+					color: #333;
+					line-height: 40rpx;
+					padding-bottom: 10rpx;
+					@include hairline-bottom(rgba(151, 151, 151, 0.09));
+				}
 			}
 
 			&__update {

+ 46 - 23
MingGaoApp/pages/index/components/EntrapmentAdd.vue

@@ -13,16 +13,28 @@
 						<uni-icons type="arrowright" size="12" color="#fff"></uni-icons>
 					</view>
 				</view>
-				<u--input border="none" type="number" v-model="item.pest_number" :disabled="!baseinfo.comtype">
-					<template slot="prefix">
-						<image src="@/static/image/task/pest/statistics.png" mode="aspectFit" class="icon">
-						</image>
-					</template>
-					<template slot="suffix">
-						<text>头</text>
-					</template>
+				<!-- #ifndef APP-NVUE -->
+				<u-input border="none" type="number" v-model="item.pest_number" disabled>
+					<!-- #endif -->
+					<!-- #ifdef APP-NVUE -->
+					<u--input border="none" type="number" v-model="item.pest_number" disabled>
+						<!-- #endif -->
+						<template slot="prefix">
+							<image src="@/static/image/task/pest/statistics.png" mode="aspectFit" class="icon">
+							</image>
+						</template>
+						<template slot="suffix">
+							<text>头</text>
+						</template>
+
+						<!-- #ifndef APP-NVUE -->
+				</u-input>
+				<!-- #endif -->
+				<!-- #ifdef APP-NVUE -->
 				</u--input>
-				<view class="entrapment-form__close" @click="selectdelold(item,index)">
+				<!-- #endif -->
+				<view class="entrapment-form__close" @click="selectdelold(item,index)"
+					v-if="baseinfo.taskStatus==='处理中'">
 					<uni-icons type="clear"></uni-icons>
 				</view>
 			</view>
@@ -37,20 +49,20 @@
 				</view>
 				<!-- #ifndef APP-NVUE -->
 				<u-input border="none" type="number" v-model="notwornlistdata.num[index]">
-				<!-- #endif -->
-				<!-- #ifdef APP-NVUE -->
-				<u--input border="none" type="number" v-model="notwornlistdata.num[index]">
 					<!-- #endif -->
+					<!-- #ifdef APP-NVUE -->
+					<u--input border="none" type="number" v-model="notwornlistdata.num[index]">
+						<!-- #endif -->
 
-					<template slot="prefix">
-						<image src="@/static/image/task/pest/statistics.png" mode="aspectFit" class="icon">
-						</image>
-					</template>
-					<template slot="suffix">
-						<text>头</text>
-					</template>
+						<template slot="prefix">
+							<image src="@/static/image/task/pest/statistics.png" mode="aspectFit" class="icon">
+							</image>
+						</template>
+						<template slot="suffix">
+							<text>头</text>
+						</template>
 
-					<!-- #ifndef APP-NVUE -->
+						<!-- #ifndef APP-NVUE -->
 				</u-input>
 				<!-- #endif -->
 				<!-- #ifdef APP-NVUE -->
@@ -133,6 +145,7 @@
 				</view>
 			</view>
 		</view>
+
 		<!-- <u-loading-page loading-text="加载中..." :loading="loading" font-size="16"></u-loading-page> -->
 		<u-picker :show="show" :columns="columns" @confirm="confirm" @cancel="show = false"></u-picker>
 	</view>
@@ -205,6 +218,9 @@
 </template>
 
 <script>
+	import {
+		isEmpty
+	} from 'lodash-es';
 	export default {
 		props: {
 			dataSource: {
@@ -269,6 +285,13 @@
 				return this.$store.state.video
 			},
 		},
+		mounted() {
+			if (this.isFirstLoad && !isEmpty(this.dataSource)) {
+				this.isFirstLoad = false;
+				this.baseinfo = this.dataSource;
+				this.init();
+			}
+		},
 		methods: {
 			init() {
 				this.getselectworn();
@@ -283,7 +306,7 @@
 						trap_record_id: id
 					}
 				})
-				console.log(res)
+				console.warn(res, '诱捕器信息')
 				this.wornlist = res
 				this.loading = false
 				var arr = []
@@ -435,7 +458,7 @@
 						arr.push(obj)
 					}
 				}
-				console.log(arr)
+				console.warn(arr,'已带回')
 				// this.$store.state.wornlist = arr
 				this.$store.state.wornlist = {
 					record_id: this.baseinfo.id, //      			填报记录id
@@ -475,7 +498,7 @@
 				var tf = arr.every((item) => {
 					return item.pest_number
 				})
-				console.log(tf, arr)
+				console.warn(tf, arr,'提交 1213131313331')
 				if (arr.length != 0 && tf) {
 					// this.$store.state.wornlist = arr
 					this.$store.state.wornlist = {

+ 2 - 2
MingGaoApp/pages/index/components/Gis.vue

@@ -91,8 +91,8 @@
 
 					return {
 						points: paths,
-						color: '#f00',
-						width: 10
+						color: '#409eff',
+						width: 20
 					}
 				})
 

+ 1 - 2
MingGaoApp/pages/index/details.vue

@@ -68,7 +68,7 @@
 				draft: [],
 				taskinfo: {},
 				task_type: false,
-				isEdit: false,
+				isEdit: false, // 详情页面,不做编辑,编辑页面单独处理
 				istask: 1 // 任务模块
 			}
 		},
@@ -128,7 +128,6 @@
 				taskService.getTaskDetailByTaskID(this.taskID).then(res => {
 					console.warn(res, 'get task detail')
 					this.taskDetail = this.taskinfo = res;
-					this.isEdit = res.task_status === '处理中';
 					this.task_id = res.task_id;
 
 					console.log(this.taskinfo, '------------------------------- task info', this.taskDetail)

+ 30 - 12
MingGaoApp/pages/index/index.vue

@@ -17,11 +17,14 @@
 		<view class="task__body">
 			<task-card @click="handleCardClick" @btntap="handleBtnClick" v-for="item in taskList" :key="item.task_id"
 				:dataSource="item" @confirm="handleTaskConfirm"></task-card>
+			<u-empty text="暂无数据" v-if="!taskList.length">
+			</u-empty>
 		</view>
 		<u-modal :show="confirmModalVisible" :content="content" :showCancelButton="true" :closeOnClickOverlay="false"
 			@confirm="handleModalConfirm" @cancel="handleModalCancel" :asyncClose="true">
 		</u-modal>
 		<u-notify ref="uNotify" message=""></u-notify>
+		<u-toast ref="uToast"></u-toast>
 		<u-popup :show="show" @close="close" @open="open" :closeOnClickOverlay="true" :safeAreaInsetTop="true">
 			<view class="task-finished__area">
 				<u--textarea :focus="true" v-model="report_msg" placeholder="" :maxlength="200" autoHeight border="none"
@@ -30,7 +33,6 @@
 
 				<u-button text="提交" type="primary" size="small" @click="handleSubmit" :disabled="loading"></u-button>
 			</view>
-
 		</u-popup>
 	</view>
 </template>
@@ -45,6 +47,7 @@
 	import {
 		assign,
 		concat,
+		debounce
 	} from 'lodash-es';
 
 	import {
@@ -133,7 +136,9 @@
 
 		},
 		onShow() {
+			this.searchKey = '';
 			this.page = 1;
+			this.total = 0;
 			this.tasklist = [];
 			this.getTaskList();
 		},
@@ -142,11 +147,11 @@
 			click(item) {
 				console.log('item', item);
 			},
-			search() {
+			search: debounce(function() {
 				this.page = 1;
 				this.total = 0;
 				this.getTaskList();
-			},
+			}),
 			handleTabClick(tabItem) {
 				if (!tabItem.id) {
 					return
@@ -177,8 +182,11 @@
 						})
 						break;
 					case TASK_ACTION_TYPE.FINISHED:
-						this.currentTaskID = taskID;
-						this.show = true;
+						// this.currentTaskID = taskID;
+						// this.show = true;
+						uni.navigateTo({
+							url: '/pages/index/taskEdit?taskID=' + taskID
+						})
 						break;
 				}
 			},
@@ -208,14 +216,23 @@
 				console.warn('update status', payload)
 				this.loading = true;
 				taskService.updateTaskWalkStatus(payload).then(() => {
-					this.$refs.uNotify.show({
-						top: 10,
+					// this.$refs.uNotify.show({
+					// 	top: 10,
+					// 	type: 'success',
+					// 	message,
+					// 	duration: 1000 * 3,
+					// 	fontSize: 16,
+					// 	bgColor: '#1B76FF',
+					// 	safeAreaInsetTop: true
+					// })
+					this.$refs.uToast.show({
 						type: 'success',
-						message,
-						duration: 1000 * 3,
-						fontSize: 16,
-						bgColor: '#1B76FF',
-						safeAreaInsetTop: true
+						message: message,
+						complete() {
+							params.url && uni.navigateTo({
+								url: params.url
+							})
+						}
 					})
 					this.getTaskList();
 					// 处理轨迹坐标点
@@ -285,6 +302,7 @@
 			resetTaskList() {
 				this.page = 1;
 				this.total = 0;
+				this.taskList = [];
 				this.getTaskList();
 			},
 			getTaskList() {

+ 388 - 0
MingGaoApp/pages/index/taskEdit.vue

@@ -0,0 +1,388 @@
+<template>
+	<view class="task-details">
+		<view class="task-details__header">
+			<task-card type="show" :dataSource="taskDetail"></task-card>
+		</view>
+		<view class="panel">
+			<view class="panel__header">
+				<view class="panel__title">任务汇报</view>
+			</view>
+			<view class="panel__content">
+				<view class="task-details__area">
+					<view class="task-details__edit-icon" v-if="!isMessageEdit" @click="isMessageEdit=!isMessageEdit">
+						<uni-icons type="compose" color="#1B76FF"></uni-icons>
+					</view>
+					<u--textarea :focus="true" v-else v-model="report_msg" placeholder="" :maxlength="200" autoHeight
+						border="none">
+					</u--textarea>
+				</view>
+			</view>
+		</view>
+		<view class="task-details__body" v-if="task_type">
+			<!-- <u-sticky>
+				<task-tabs @tabClick="handleTabClick" :tabList="tabList"></task-tabs>
+			</u-sticky> -->
+			<view class="task-details__content">
+				<!-- <transition name="slide-fade" mode="out-in" appear>
+					<component :is="currentComponent" :dataSource="taskDetail" :isEdit="isEdit"></component>
+				</transition> -->
+				<EntrapmentComponent :dataSource="taskDetail" :isEdit="true" :isShowHeader="true"></EntrapmentComponent>
+			</view>
+		</view>
+		<view class="task-details__footer">
+			<u-button text="提交" type="primary" size="small" @click="taskfillingcom"></u-button>
+		</view>
+		<u-loading-page loading-text="加载中..." :loading="loading" font-size="16"></u-loading-page>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	import ClockInRecordComponent from './components/ClockInRecord.vue';
+	import EntrapmentComponent from './components/Entrapment.vue';
+	import GisComponent from './components/Gis.vue';
+	import * as taskService from '@/service/task.js';
+	import HeartBeat from '@/util/HeartBeat.js'
+
+	export default {
+		components: {
+			ClockInRecordComponent,
+			EntrapmentComponent,
+			GisComponent
+		},
+		computed: {
+			...mapState({
+				wornlist: state => state.wornlist
+			}),
+			tabList() {
+				if (this.task_type) {
+					return [{
+						id: 1,
+						name: '签到记录',
+					}, {
+						id: 2,
+						name: '诱捕器',
+					}, {
+						id: 3,
+						name: '行驶轨迹'
+					}]
+				} else {
+					return [{
+						id: 1,
+						name: '签到记录',
+					}, {
+						id: 3,
+						name: '行驶轨迹'
+					}]
+				}
+			}
+		},
+		data() {
+			return {
+				currentComponent: ClockInRecordComponent,
+				taskID: '',
+				loading: false,
+				taskDetail: {},
+				draft: [],
+				taskinfo: {},
+				report_msg: '',
+				task_type: false,
+				isEdit: false,
+				isMessageEdit: false,
+				istask: 1 // 任务模块
+			}
+		},
+		onShow() {
+			this.report_msg = ''
+		},
+		onLoad(options) {
+			console.warn(options, '------------- on load --------------')
+			this.taskID = options.taskID;
+			this.getTaskDetail()
+		},
+		watch: {
+			wornlist(news, old) {
+				// console.log(this.taskinfo.trap_record_list)
+				console.warn(news, ' task edit watch')
+				this.draft = []
+				this.draft.push(news)
+				for (var i = 0; i < this.taskinfo.trap_record_list.length; i++) {
+					for (var j = 0; j < news; j++) {
+						if (this.taskinfo.trap_record_list[i].id == news.record_id) {
+							this.taskinfo.trap_record_list[i].report_status = news.report_status
+						} else {
+							this.taskinfo.trap_record_list[i].report_status = ""
+						}
+					}
+				}
+				this.taskfillingdraft()
+			},
+			// kpsurlL(news, old) {
+			// 	if (this.istask == 1) {
+			// 		if (news != "") {
+			// 			let pages = getCurrentPages();
+			// 			var page = pages[pages.length - 1];
+			// 			var currentWebview = page.$getAppWebview();
+			// 			currentWebview.setTitleNViewButtonStyle(0, {
+			// 				text: " ",
+			// 			});
+			// 			this.$store.state.kpsurlL = 1
+			// 		} else {
+			// 			let pages = getCurrentPages();
+			// 			var page = pages[pages.length - 1];
+			// 			var currentWebview = page.$getAppWebview();
+			// 			currentWebview.setTitleNViewButtonStyle(0, {
+			// 				text: "提交",
+			// 			});
+			// 			this.$store.state.kpsurlL = 0
+			// 		}
+			// 	}
+
+			// }
+		},
+		methods: {
+			getTaskDetail() {
+				console.warn('get task detail start')
+				if (!this.taskID) {
+					return
+				}
+				console.warn('get task detail fetch')
+				this.loading = true;
+				taskService.getTaskDetailByTaskID(this.taskID).then(res => {
+					console.warn(res, 'get task detail')
+					this.taskDetail = this.taskinfo = res;
+					this.isEdit = res.task_status === '处理中';
+					this.task_id = res.task_id;
+
+					console.log(this.taskinfo, '------------------------------- task info', this.taskDetail)
+					// if (this.taskinfo.img_list == "" || this.taskinfo.img_list.length == 0) {
+					// 	this.taskinfo.img_list = []
+					// } else {
+					// 	this.taskinfo.img_list = JSON.parse(this.taskinfo.img_list)
+					// }
+					console.warn(this.taskinfo.task_type, 'get task detail --1213144')
+					if (res.task_type == "有害生物监测") {
+						this.task_type = true
+					} else {
+						this.task_type = false
+					}
+
+					this.$store.state.worndatabase = JSON.parse(JSON.stringify(this.taskinfo.trap_record_list))
+				}).finally(() => {
+					this.loading = false;
+				})
+			},
+			handleTabClick(id) {
+				switch (id) {
+					case 1:
+						this.currentComponent = ClockInRecordComponent;
+						break;
+					case 2:
+						this.currentComponent = EntrapmentComponent;
+						break;
+					case 3:
+						this.currentComponent = GisComponent;
+						break;
+				}
+			},
+			async taskfillingdraft() { //任务填报接口
+				// this.gettaskinfo()
+
+				var arr = JSON.parse(JSON.stringify(this.$store.state.worndatabase))
+				console.warn(this.draft, 'draft')
+				console.log(arr, 'arr draft')
+				for (var i = 0; i < arr.length; i++) {
+					for (var j = 0; j < this.draft.length; j++) {
+						if (arr[i].id == this.draft[j].record_id || arr[i].record_id == this.draft[j].record_id) {
+							arr.splice(i, 1)
+							i--;
+						}
+					}
+				}
+				for (var i = 0; i < this.taskinfo.trap_record_list.length; i++) {
+					for (var j = 0; j < this.draft.length; j++) {
+						if (this.taskinfo.trap_record_list[i].id == this.draft[j].record_id) {
+							// console.log(this.taskinfo.trap_record_list[i])
+							this.taskinfo.trap_record_list[i].report_status = this.draft[j].report_status
+						}
+					}
+				}
+				this.draft = this.draft.concat(arr)
+
+				this.$store.state.worndatabase = JSON.parse(JSON.stringify(this.draft))
+				// console.log(arr)
+				for (var i = 0; i < this.draft.length; i++) {
+					if (this.draft[i].id) {
+						this.draft[i]["record_id"] = this.draft[i].id
+					}
+				}
+				console.warn(this.draft, "0000 草稿提交")
+				var data = {}
+				if (this.task_type) {
+					data = {
+						task_id: this.task_id, //            是       任务id
+						// report_msg: this.textareavalue, //            是       任务汇报内容
+						// img_list: JSON.stringify(this.urllist), //            是       图片列表					['http://www.c.com']
+						trap_record_list: JSON.stringify(this.draft),
+					}
+					console.log("有数据", data)
+				} else {
+					data = {
+						task_id: this.task_id, //            是       任务id
+						report_msg: this.textareavalue, //            是       任务汇报内容
+						img_list: JSON.stringify(this.urllist), //            是       图片列表					['http://www.c.com']
+					}
+					console.log("无数据", data)
+				}
+				console.log(data, 555)
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=app.task.task_filling_draft',
+					data: data,
+				})
+				// console.log(res)
+			},
+			taskfillingcom() {
+				console.log(this.taskinfo.trap_record_list)
+				var tf = this.taskinfo.trap_record_list.every((item) => {
+					console.log(item.report_status)
+					return item.report_status != ""
+				})
+				if (!this.report_msg) {
+					uni.$u.toast('请填写任务汇报')
+				} else if (!tf) {
+					if (this.task_type) {
+						uni.$u.toast('请将所有设备全部登记后提交!')
+					} else {
+						// this.taskfillingdraft()+
+						this.taskfilling()
+					}
+				} else {
+					// this.taskfillingdraft()
+					this.taskfilling()
+				}
+
+			},
+			async taskfilling() { //任务填报接口
+				this.loading = true;
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=app.task.task_filling',
+					data: {
+						// task_id:id,
+						task_id: this.task_id, //            是       任务id
+						report_msg: this.report_msg, //            是       任务汇报内容
+						// img_list: JSON.stringify(this.urllist), //            是       图片列表
+					}
+				})
+				console.log(res)
+				uni.$u.toast('提交成功')
+				HeartBeat.getInstance().clearByType('record_' + this.task_id);
+				setTimeout(() => {
+					this.loading = false;
+					uni.switchTab({
+						url: '/pages/index/index'
+					})
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.task-details {
+		padding: 24rpx 24rpx 100rpx;
+
+		&__header {
+			margin-bottom: 24rpx;
+		}
+
+		&__body {
+			display: flex;
+			flex-direction: column;
+			box-sizing: border-box;
+			// padding: 32rpx 0;
+			background-color: #fff;
+			border-radius: 8rpx;
+		}
+
+		&__content {
+			flex: 1 1 auto;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			// padding: 10rpx 0;
+		}
+
+		&__area {
+			font-size: 12px;
+			line-height: 18px;
+			color: #656565;
+			font-weight: 400;
+		}
+
+		&__edit-icon {
+			padding: 24rpx 0;
+		}
+
+		&__footer {
+			position: fixed;
+			bottom: 0rpx;
+			left: 0;
+			right: 0;
+			background-color: #fff;
+			padding: 40rpx;
+		}
+	}
+
+	.panel {
+		background-color: #fff;
+		border-radius: 16rpx;
+		padding: 16rpx;
+		margin-bottom: 24rpx;
+
+		&__header {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+		}
+
+		&__title {
+			flex: 1 1 auto;
+			font-size: 14px;
+			color: #333;
+			line-height: 40rpx;
+			margin-right: 100rpx;
+			padding-bottom: 10rpx;
+			@include hairline-bottom(rgba(151, 151, 151, 0.09));
+		}
+
+		&__content {
+			padding: 10rpx 0;
+		}
+	}
+</style>
+<style>
+	page {
+		background-color: #F7F8FB;
+	}
+
+	/* 可以设置不同的进入和离开动画 */
+	/* 设置持续时间和动画函数 */
+	.slide-fade-enter-active {
+		transition: all .3s ease;
+	}
+
+	.slide-fade-leave-active {
+		transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0);
+	}
+
+	.slide-fade-enter,
+	.slide-fade-leave-to
+
+	/* .slide-fade-leave-active for below version 2.1.8 */
+		{
+		transform: translateX(10px);
+		opacity: 0;
+	}
+</style>

Fichier diff supprimé car celui-ci est trop grand
+ 538 - 564
MingGaoApp/pages/response/details.vue


Fichier diff supprimé car celui-ci est trop grand
+ 4 - 9
MingGaoApp/static/response/video.svg


BIN
MingGaoApp/unpackage/cache/apk/__UNI__1BA09AD_cm.apk


+ 1 - 1
MingGaoApp/unpackage/cache/apk/apkurl

@@ -1 +1 @@
-https://ide.dcloud.net.cn/build/download/6730fbc0-a9e7-11ed-a304-23670aa13d14
+https://ide.dcloud.net.cn/build/download/be6f9030-addf-11ed-aa1b-e928befa84aa

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
MingGaoApp/unpackage/cache/apk/cmManifestCache.json


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 2
MingGaoApp/unpackage/cache/wgt/__UNI__1BA09AD/app-config-service.js


Fichier diff supprimé car celui-ci est trop grand
+ 5 - 5
MingGaoApp/unpackage/cache/wgt/__UNI__1BA09AD/app-service.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
MingGaoApp/unpackage/cache/wgt/__UNI__1BA09AD/app-view.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
MingGaoApp/unpackage/cache/wgt/__UNI__1BA09AD/pages/response/video.js


BIN
MingGaoApp/unpackage/debug/android_debug.apk


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 2
MingGaoApp/unpackage/dist/build/app-plus/app-config-service.js


Fichier diff supprimé car celui-ci est trop grand
+ 5 - 5
MingGaoApp/unpackage/dist/build/app-plus/app-service.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
MingGaoApp/unpackage/dist/build/app-plus/app-view.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
MingGaoApp/unpackage/dist/build/app-plus/manifest.json


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
MingGaoApp/unpackage/dist/build/app-plus/pages/response/video.js


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 2
MingGaoApp/unpackage/dist/dev/app-plus/app-config-service.js


Fichier diff supprimé car celui-ci est trop grand
+ 5087 - 4785
MingGaoApp/unpackage/dist/dev/app-plus/app-service.js


Fichier diff supprimé car celui-ci est trop grand
+ 4491 - 4090
MingGaoApp/unpackage/dist/dev/app-plus/app-view.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
MingGaoApp/unpackage/dist/dev/app-plus/manifest.json


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
MingGaoApp/unpackage/dist/dev/app-plus/pages/response/video.js


BIN
MingGaoApp/unpackage/release/apk/__UNI__1BA09AD__20230216175320.apk


+ 4 - 4
MingGaoApp/util/url.js

@@ -4,10 +4,10 @@ export default {
 	// baseUrl:"https://yfznscd.com"
 	// baseUrl:"https://www.toreskj.com"
 	// baseUrl:"https://www.yhswjc.com"
-	baseUrl:"http://192.168.1.52:12345",
-	wsUrl:"ws://192.168.1.52:12345",
+	// baseUrl:"http://192.168.1.52:12345",
+	// wsUrl:"ws://192.168.1.52:12345",
 	// baseUrl:"http://192.168.1.77:12345",
 	// baseUrl:"https://www.toreskj.com",
-	// baseUrl:"http://114.115.147.140:12345",
-	// wsUrl:"ws://114.115.147.140:12345",
+	baseUrl:"http://114.115.147.140:12345",
+	wsUrl:"ws://114.115.147.140:12345",
 }