Просмотр исходного кода

任务、监督列表完成 2/24

zhangyun 3 лет назад
Родитель
Сommit
1ce410d5b0

+ 465 - 6
MingGaoApp/components/task-details.vue

@@ -1,20 +1,479 @@
+<!-- taskshow  true 编辑模式 false 展示模式-->
+<!-- istask  0 完成任务模块 1 任务模块 2 监督模块 3监督记录模块-->
 <template name="task-details">
-	<view>
-		
+	<view class="" style="padding-bottom: 40rpx;">
+		<view class="taskbtn">
+			<view class="taskbtn_item" v-if="istask==1" @click="taskfilling">
+				提交
+			</view>
+			<view class="taskbtn_item" v-if="istask==2" @click="skip">
+				监督
+			</view>
+		</view>
+		<view class="taskbox">
+			<view class="taskbox_item">
+				<view class="taskbox_item_l">
+					任务派发人
+				</view>
+				<view class="taskbox_item_r">
+					{{taskinfo.owner_user}}
+				</view>
+			</view>
+			<view class="taskbox_item">
+				<view class="taskbox_item_l">
+					任务监督人
+				</view>
+				<view class="taskbox_item_r">
+					{{taskinfo.supervisor_user}}
+				</view>
+			</view>
+			<view class="taskbox_item">
+				<view class="taskbox_item_l">
+					任务处理人
+				</view>
+				<view class="taskbox_item_r">
+					{{taskinfo.operator_user}}
+				</view>
+			</view>
+			<view class="taskbox_item">
+				<view class="taskbox_item_l">
+					任务时间
+				</view>
+				<view class="taskbox_item_r">
+					{{taskinfo.start_time}} ~ {{taskinfo.last_time}}
+				</view>
+			</view>
+			<view class="taskbox_item2">
+				<view class="taskbox_item_l">
+					操作描述
+				</view>
+				<view class="taskbox_item_r">
+					{{taskinfo.tesk_msg}}
+				</view>
+			</view>
+		</view>
+		<view class="imgshow">
+			<view class="imgshow_compile" v-if="taskshow">
+				<view class="title">
+					签到
+				</view>
+				<view class="imgbox_box">
+					<view class="addimg" @click="gainimg">
+						<u-icon size="20" name="plus" color="#409eff"></u-icon>
+					</view>
+					<view class="imgitem" v-for="item,index in urllist" :key="index">
+						<!-- <image :src="" mode="" class="img"></image> -->
+						<u--image :src="baseUrl+item" class="img">
+							<view slot="error" style="font-size: 24rpx;">加载失败</view>
+						</u--image>
+					</view>
+				</view>
+			</view>
+			<view class="imgshow_show" v-else>
+				<view class="title">
+					<view class="title_l">
+						签到<span v-if="taskinfo.img_list.length == 0" style="font-size: 24rpx;">(暂无图片)</span>
+					</view>
+					<view class="title_r">
+						{{taskinfo.end_time}}
+					</view>
+				</view>
+				<view class="imgbox_box">
+					<view class="imgitem" v-for="item,index in taskinfo.img_list" :key="index">
+						<image :src="baseUrl+item" mode="" class="img"></image>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="report">
+			<view class="title">
+				任务汇报
+			</view>
+			<view class="textareainput" v-if="taskshow">
+				<u--textarea v-model="textareavalue" placeholder="请输入内容"></u--textarea>
+			</view>
+			<view class="textarea" v-else>
+				{{taskinfo.report_msg || "暂无描述"}}
+			</view>
+		</view>
+		<view class="basebox" v-if="task_type">
+			<view class="title">
+				<view class="title_l">
+					设备登记
+				</view>
+				<view class="title_r" v-if="taskinfo.trap_record_list.length>5">
+					更多
+				</view>
+			</view>
+			<view class="basebox_info">
+				<view class="basebox_info_item" v-for="item,index in taskinfo.trap_record_list" :key="index">
+					<view class="box" v-if="index<5">
+						<view class="basebox_info_item_l">
+							{{item.trap_number}}
+						</view>
+						<view class="basebox_info_item_c">
+							{{item.report_status}}
+						</view>
+						<view class="basebox_info_item_r">
+							<u-icon name="search" color="#2979ff" size="20" v-if="!taskshow"></u-icon>
+							<u-icon name="edit-pen-fill" color="#2979ff" size="20" v-else></u-icon>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="recordbox" v-if="istask==3">
+			<view class="title">
+				监督信息
+			</view>
+			<view class="recordbox_info">
+				<view class="recordbox_info_item">
+					<view class="recordbox_info_item_l">
+						监督形式
+					</view>
+					<view class="recordbox_info_item_r">
+						{{taskinfo.supervisor_type}}
+					</view>
+				</view>
+				<view class="recordbox_info_item">
+					<view class="recordbox_info_item_l">
+						监督单位
+					</view>
+					<view class="recordbox_info_item_r">
+						{{taskinfo.supervisor_depa}}
+					</view>
+				</view>
+				<view class="recordbox_info_item">
+					<view class="recordbox_info_item_l">
+						监督时间
+					</view>
+					<view class="recordbox_info_item_r">
+						{{taskinfo.supervisor_time}}
+					</view>
+				</view>
+				<view class="recordbox_info_item">
+					<view class="recordbox_info_item_l">
+						监督情况
+					</view>
+					<view class="recordbox_info_item_r">
+						{{taskinfo.supervisor_msg}}
+					</view>
+				</view>
+			</view>
+		</view>
+		<kps-image-cutter @ok="onok" @cancel="oncancle" :url="kpsurlL" :fixed="false" :blob="false" :maxWidth="500"
+			:maxHeight="500"></kps-image-cutter>
+		<u-loading-page loading-text="加载中..." :loading="loading" font-size="16"></u-loading-page>
 	</view>
 </template>
 
 <script>
+	import kpsImageCutter from "@/components/ksp-image-cutter/ksp-image-cutter.vue";
 	export default {
-		name:"task-details",
+		name: "task-details",
+		components: {
+			kpsImageCutter
+		},
 		data() {
 			return {
-				
+				kpsurlL: "",
+				urllist: [],
+				textareavalue: "",
+				taskinfo: {
+					img_list: [],
+					trap_record_list: []
+				},
+				task_type: false,
+				loading:false
 			};
-		}
+		},
+		props: { //此处定义传入的参数
+			taskshow: {
+				type: Boolean
+			},
+			istask: {
+				type: Number
+			}
+		},
+		methods: {
+			gainimg() { //添加图片
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择
+					success: (res) => {
+						console.log(res)
+						// this.urllist.push(res.tempFilePaths[0])
+						this.kpsurlL = res.tempFilePaths[0]
+					}
+				});
+			},
+			oncancle() {
+				this.kpsurlL = ""
+			},
+			onok(ev) {
+				uni.uploadFile({
+					url: this.baseUrl +
+						'/api/api_gateway?method=monitor_manage.cbd_manage.add_img', //仅为示例,非真实的接口地址
+					filePath: ev.path,
+					name: 'img_file',
+					success: (uploadFileRes) => {
+						console.log(JSON.parse(uploadFileRes.data).data.src)
+						this.urllist.push(JSON.parse(uploadFileRes.data).data.src)
+						this.kpsurlL = ""
+					}
+				});
+			},
+			async gettaskinfo(id) {
+				this.loading = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=control_center.task.task_info',
+					data: {
+						task_id: id,
+					}
+				})
+				this.taskinfo = res
+				this.taskinfo.img_list = JSON.parse(this.taskinfo.img_list)
+				if (this.taskinfo.task_type == "有害生物监测") {
+					this.task_type = true
+				} else {
+					this.task_type = false
+				}
+				this.loading = false
+				console.log(res)
+			},
+			async taskfilling() { //任务填报接口
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=app.task.task_filling',
+					data: {
+						// task_id:id,
+					}
+				})
+			},
+			skip() { //跳转
+				// uni.redirectTo({
+				// 	url:"../pages/supervise/submitsupe?id"+ this.taskinfo.task_id
+				// });
+				// console.log(this.$parent)
+				// this.$parent.tosubm();
+				this.$emit('tosubm')
+			}
+		},
 	}
 </script>
 
-<style>
+<style lang="less" scoped>
+	.taskbtn {
+		position: absolute;
+		top: -60rpx;
+		right: 20rpx;
+		z-index: 9999;
+		color: #409eff;
+		font-size: 28rpx;
+	}
+
+	.taskbox {
+		width: 90%;
+		margin: 0 auto;
+		margin-bottom: 30rpx;
+
+		.taskbox_item {
+			display: flex;
+			justify-content: space-between;
+			padding: 20rpx 0;
+			border-bottom: 1rpx solid #F6F6F6;
+
+			.taskbox_item_l {
+				width: 30%;
+				font-size: 28rpx;
+
+			}
+
+			.taskbox_item_r {
+				width: 70%;
+				text-align: right;
+				font-size: 28rpx;
+				color: #999999;
+			}
+		}
+
+		.taskbox_item2 {
+			padding: 20rpx 0;
+			border-bottom: 1rpx solid #F6F6F6;
+
+			.taskbox_item_l {
+				margin-bottom: 20rpx;
+				font-size: 28rpx;
+			}
+
+			.taskbox_item_r {
+				font-size: 28rpx;
+				color: #999999;
+			}
+		}
+	}
+
+	.imgshow {
+		width: 90%;
+		margin: 0 auto;
+
+		.imgshow_compile {
+			.title {
+				margin-bottom: 30rpx;
+				font-weight: 700;
+			}
+
+			.imgbox_box {
+				display: flex;
+				flex-wrap: wrap;
+				width: 80%;
+
+				// justify-content: space-around;
+				.addimg {
+					width: 140rpx;
+					height: 140rpx;
+					border: 1px dashed #409eff;
+					// text-align: center;
+					display: flex;
+					justify-content: space-around;
+					margin-right: 30rpx;
+					margin-bottom: 30rpx;
+				}
+
+				.imgitem {
+					width: 140rpx;
+					height: 140rpx;
+					margin-right: 30rpx;
+					margin-bottom: 30rpx;
+
+					.img {
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+		}
+
+		.imgshow_show {
+			.title {
+				display: flex;
+				justify-content: space-between;
+				margin-bottom: 30rpx;
+
+				.title_l {
+					font-weight: 700;
+				}
+
+				.title_r {
+					font-size: 28rpx;
+					color: #999999;
+				}
+			}
+
+			.imgbox_box {
+				display: flex;
+				flex-wrap: wrap;
+				width: 80%;
+
+				.imgitem {
+					width: 140rpx;
+					height: 140rpx;
+					margin-right: 30rpx;
+					margin-bottom: 30rpx;
+
+					.img {
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+		}
+	}
+
+	.report {
+		width: 90%;
+		margin: 0 auto;
+		margin-bottom: 30rpx;
+
+		.title {
+			margin-bottom: 30rpx;
+			font-weight: 700;
+		}
+	}
+
+	.basebox {
+		width: 90%;
+		margin: 0 auto;
+
+		.title {
+			margin-bottom: 20rpx;
+			display: flex;
+			justify-content: space-between;
+
+			.title_l {
+				font-weight: 700;
+			}
+
+			.title_r {
+				font-size: 26rpx;
+				color: #409eff;
+			}
+		}
+
+		.basebox_info {
+			width: 100%;
+
+			.basebox_info_item {
+				width: 100%;
 
+				.box {
+					display: flex;
+					justify-content: space-between;
+					padding: 20rpx 0;
+					border-bottom: 1px solid #F6F6F6;
+
+					.basebox_info_item_l {
+						font-size: 28rpx;
+					}
+
+					.basebox_info_item_c {
+						color: #999999;
+						font-size: 28rpx;
+					}
+				}
+			}
+		}
+	}
+
+	.recordbox {
+		width: 90%;
+		margin: 20rpx auto 0;
+
+		.title {
+			font-weight: 700;
+			// margin-bottom: 20rpx;
+		}
+
+		.recordbox_info {
+			width: 100%;
+
+			.recordbox_info_item {
+				display: flex;
+				padding: 20rpx 0;
+				border-bottom: 1px solid #F6F6F6;
+				width: 100%;
+
+				.recordbox_info_item_l {
+					width: 30%;
+					font-size: 28rpx;
+				}
+
+				.recordbox_info_item_r {
+					width: 70%;
+					text-align: right;
+					font-size: 28rpx;
+				}
+			}
+		}
+	}
 </style>

+ 85 - 49
MingGaoApp/pages.json

@@ -13,15 +13,23 @@
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "我的",
-				"navigationBarBackgroundColor":"#FFFFFF",
-				"enablePullDownRefresh": true
+				"navigationBarTitleText": "任务",
+				"navigationBarBackgroundColor": "#fff",
+				"enablePullDownRefresh": true,
+				"app-plus": {
+					"titleNView": {
+						"splitLine": { //原生导航栏加下边框
+							"color": "#000",
+							"height": "1px"
+						}
+					}
+				}
 			}
 		}, {
 			"path": "pages/response/index",
 			"style": {
 				"navigationBarTitleText": "应答中心",
-				"navigationBarBackgroundColor":"#f7f7f7"
+				"navigationBarBackgroundColor": "#f7f7f7"
 			}
 
 		},
@@ -29,9 +37,9 @@
 			"path": "pages/response/details",
 			"style": {
 				"navigationBarTitleText": "应答中心详情",
-				"navigationBarBackgroundColor":"#f7f7f7"
+				"navigationBarBackgroundColor": "#f7f7f7"
 			}
-		
+
 		}, {
 			"path": "pages/my/index",
 			"style": {
@@ -42,62 +50,89 @@
 		}, {
 			"path": "pages/supervise/index",
 			"style": {
-				"navigationBarTitleText": "",
-				"navigationBarBackgroundColor":"#FFFFFF"
+				"navigationBarTitleText": "监督",
+				"navigationBarBackgroundColor": "#FFFFFF"
+			}
+
+		}, {
+			"path": "pages/my/myinfo",
+			"style": {
+				"navigationBarTitleText": "个人中心",
+				"enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#FFFFFF"
+			}
+
+		}, {
+			"path": "pages/my/password",
+			"style": {
+				"navigationBarTitleText": "修改密码",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/my/monitorlog",
+			"style": {
+				"navigationBarTitleText": "监测日志",
+				"enablePullDownRefresh": true
+			}
+
+		}, {
+			"path": "pages/my/addcont",
+			"style": {
+				"navigationBarTitleText": "新增内容",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/my/version",
+			"style": {
+				"navigationBarTitleText": "更新记录",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/my/mymonit",
+			"style": {
+				"navigationBarTitleText": "监督记录",
+				"enablePullDownRefresh": true
+			}
+
+		}, {
+			"path": "pages/my/mtmonitdetails",
+			"style": {
+				"navigationBarTitleText": "监督记录详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/my/monitorlogdata",
+			"style": {
+				"navigationBarTitleText": "记录详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/index/harmfultask",
+			"style": {
+				"navigationBarTitleText": "生物监测任务",
+				"enablePullDownRefresh": false
 			}
 
 		}
 	    ,{
-            "path" : "pages/my/myinfo",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "个人中心",
-                "enablePullDownRefresh": false,
-				"navigationBarBackgroundColor":"#FFFFFF"
-            }
-            
-        }
-        ,{
-            "path" : "pages/my/password",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "修改密码",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/my/monitorlog",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "监测日志",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/my/addcont",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "新增内容",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/my/version",
+            "path" : "pages/supervise/supetask",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "更新记录",
+                "navigationBarTitleText": "生物监测任务监督",
                 "enablePullDownRefresh": false
             }
             
         }
         ,{
-            "path" : "pages/my/mymonit",
+            "path" : "pages/supervise/submitsupe",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "",
+                "navigationBarTitleText": "监督",
                 "enablePullDownRefresh": false
             }
             
@@ -113,6 +148,7 @@
 		"color": "#cdcdcd",
 		"selectedColor": "#56C979",
 		"borderStyle": "white",
+		"backgroundColor": "#fff",
 		"list": [{
 				"pagePath": "pages/index/index",
 				"iconPath": "static/image/indeximg/renwuon.png",

+ 44 - 0
MingGaoApp/pages/index/harmfultask.vue

@@ -0,0 +1,44 @@
+<template>
+	<view>
+		<view class="" style="width: 100%;height: 30rpx;background-color: #f7f7f7;">
+			
+		</view>
+		<taskdetails :taskshow="taskshow" :istask="istask" ref="child"></taskdetails>
+	</view>
+</template>
+
+<script>
+	import taskdetails from "../../components/task-details.vue"
+	export default {
+		components:{
+			taskdetails
+		},
+		data() {
+			return {
+				taskshow:true,
+				istask:1,
+			}
+		},
+		methods: {
+
+		},
+		onLoad(option) {
+			// this.taskid = Number(option.id)
+			if(option.current==2){
+				this.taskshow = false
+				this.istask = 0
+			}else{
+				this.taskshow = true
+				this.istask = 1
+			}
+			this.$nextTick(()=>{
+				this.$refs.child.gettaskinfo(option.id)
+			})
+			// this.$refs.child.no()
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 181 - 28
MingGaoApp/pages/index/index.vue

@@ -1,6 +1,44 @@
 <template>
 	<view class="content">
-		<!-- <uni-nav-bar left-icon="back" right-icon="search" title="设备列表" @clickRight="clickRight"></uni-nav-bar> -->
+		<view class="subsection">
+			<u-subsection :list="list" :current="current" @change="sectionChange"></u-subsection>
+		</view>
+		<view class="screen" v-if="current==2" @click="opencale">
+			<u-icon name="calendar" color="#2979ff" size="24"></u-icon>
+		</view>
+		<u-loading-page loading-text="加载中..." :loading="loading" font-size="16"></u-loading-page>
+		<view class="taskbox">
+			<view class="taskbox_item" v-for="item,index in tasklist" :key="index" @click="totask(item.task_id)">
+				<view class="taskbox_item_t">
+					<view class="taskbox_item_t_l">
+						{{item.task_type}}
+					</view>
+					<view class="taskbox_item_t_r">
+						{{item.start_time}}
+					</view>
+				</view>
+				<view class="taskbox_item_l">
+					<view class="taskbox_item_l_l">
+						<view class="taskbox_item_l_l_l">
+							下发人:{{item.owner_user}}
+						</view>
+						<view class="taskbox_item_l_l_r" v-if="status=='待处理'">
+							距结束{{item.diff_day}}天
+						</view>
+						<view class="taskbox_item_l_l_r" v-if="status=='未完成'">
+							剩余{{item.diff_day}}天
+						</view>
+						<view class="taskbox_item_l_l_r" v-if="status=='已完成'">
+							逾期{{item.diff_day}}天
+						</view>
+					</view>
+					<view class="taskbox_item_l_r" :style="{color:colors(item.task_status),borderColor:colors(item.task_status)}">
+						{{item.task_status}}
+					</view>
+				</view>
+			</view>
+		</view>
+		<uni-calendar :insert="false" ref="calendar" :range="true" @confirm="confirm" />
 	</view>
 </template>
 
@@ -8,44 +46,159 @@
 	export default {
 		data() {
 			return {
-				title: 'Hello'
+				list: ['待处理', '未完成', '已完成'],
+				current: 0,
+				tasklist: [],
+				status: "待处理",
+				loading:false,
+				page:1,
+				start_time:"",
+				end_time:""
 			}
 		},
 		onLoad() {
-
+			this.gettaskdata()
+		},
+		onReachBottom() {
+			this.page++
+			this.gettaskdata()
+		},
+		onPullDownRefresh(){
+			this.tasklist = []
+			this.page = 1
+			this.start_time="",
+			this.end_time=""
+			this.gettaskdata()
+			setTimeout(() => {
+				uni.stopPullDownRefresh()
+			}, 1000)
 		},
 		methods: {
-			clickRight(){
-				
-			}
+			sectionChange(e) {
+				this.current = e
+				this.status = this.list[e]
+				this.tasklist = []
+				this.page = 1
+				this.gettaskdata()
+			},
+			colors(type){
+				if(type=='未开始'||type=='未处理'){
+					return '#ffaa00';
+				}else if (type == '已完成'){
+					return '#02C644';
+				}else if(type == '逾期完成'){
+					return '#ff0000';
+				}else if(type == '处理中'){
+					return '#409EFF';
+				}
+			},
+			async gettaskdata() {
+				this.loading = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=app.task.task_list',
+					data: {
+						page: this.page, //            否       页码, 默认1
+						page_item: "10", //
+						status: this.status,
+						start_time:this.start_time,//                              非必填                     开始时间
+						end_time:this.end_time
+					}
+				})
+				// this.tasklist = res.page_list
+				for(var i=0;i<res.page_list.length;i++){
+					this.tasklist.push(res.page_list[i])
+				}
+				console.log(res)
+				this.loading = false
+			},
+			totask(id){
+				uni.navigateTo({
+					url:"./harmfultask?id="+id+"&current="+this.current
+				})
+			},
+			opencale(){
+				this.$refs.calendar.open();
+			},
+			confirm(e){
+				this.start_time = e.range.before
+				this.end_time = e.range.after
+				this.hislist = []
+				this.page = 1
+				this.gettaskdata()
+			},
 		}
 	}
 </script>
 
-<style>
-	.content {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
+<style lang="less" scoped>
+	.screen {
+		position: fixed;
+		top: 20rpx;
+		right: 20rpx;
+		z-index: 9999;
 	}
-
-	.logo {
-		height: 200rpx;
-		width: 200rpx;
-		margin-top: 200rpx;
-		margin-left: auto;
-		margin-right: auto;
-		margin-bottom: 50rpx;
+	.subsection{
+		width: 100%;
+		position: fixed;
+		top: 88rpx;
+		height: 70rpx;
+		z-index: 9999;
 	}
-
-	.text-area {
-		display: flex;
-		justify-content: center;
+	/deep/.u-subsection {
+		background-color: #f7f7f7 !important;
+		
+		// margin: 20rpx 0;
+		.u-subsection__bar {
+			background-color: #fff;
+		}
 	}
-
-	.title {
-		font-size: 36rpx;
-		color: #8f8f94;
+	.taskbox{
+		// margin-top: 88rpx;
+		width: 90%;
+		margin: 88rpx auto 0;
+		.taskbox_item{
+			width: 100%;
+			font-size: 28rpx;
+			border-bottom: 1px solid #F6F6F6;
+			padding-top: 20rpx;
+			.taskbox_item_t,.taskbox_item_l{
+				width: 100%;
+				display: flex;
+				justify-content: space-between;
+				margin-bottom: 20rpx;
+			}
+			.taskbox_item_t_l{
+				font-weight: 700;
+			}
+			.taskbox_item_t_r{
+				color: #999999 ;
+			}
+			.taskbox_item_l_l{
+				display: flex;
+			}
+			.taskbox_item_l_l_l{
+				padding: 8rpx;
+				font-size: 24rpx;
+				background-color: rgba(64,158,255,0.15);
+				font-weight: 700;
+				color: #409EFF;
+				margin-right: 10rpx;
+				border-radius: 10rpx;
+			}
+			.taskbox_item_l_l_r{
+				padding: 8rpx;
+				font-size: 24rpx;
+				background-color: rgba(2,198,68,0.15);
+				font-weight: 700;
+				color: #02C644 ;
+				border-radius: 10rpx;
+			}
+			.taskbox_item_l_r{
+				padding: 8rpx;
+				font-size: 24rpx;
+				border: 1px solid;
+				border-radius: 10rpx;
+			}
+		}
 	}
 </style>

+ 5 - 2
MingGaoApp/pages/login/login.vue

@@ -16,7 +16,7 @@
 				<u-checkbox :customStyle="{marginBottom: '8px'}" label="记住密码" name="0" size="13" labelSize="13">
 				</u-checkbox>
 			</u-checkbox-group>
-			<u-button type="primary" text="登录" @click="verify"></u-button>
+			<u-button type="primary" text="登录" @click="verify">{{isloading?"登录中...":"登录"}}</u-button>
 		</view>
 	</view>
 </template>
@@ -43,7 +43,8 @@
 						trigger: ['blur', 'change']
 					},
 				},
-				checkboxValue1: []
+				checkboxValue1: [],
+				isloading:false
 			}
 		},
 		methods: {
@@ -56,6 +57,7 @@
 				})
 			},
 			async login() {
+				this.isloading = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=sysmenage.usermanager.user_login',
 					data: {
@@ -64,6 +66,7 @@
 					}
 				})
 				console.log(res)
+				this.isloading = false
 				if (res) {
 					if (this.checkboxValue1.length) {
 						uni.setStorage({

+ 5 - 2
MingGaoApp/pages/my/addcont.vue

@@ -1,5 +1,5 @@
 <template>
-	<view>
+	<view style="background-color: #fff;margin-top: 30rpx;">
 		<view class="context_box">
 			<view class="weatherbox">
 				<u--form labelPosition="left" :model="weatherdatas" :rules="rules" ref="form1">
@@ -145,10 +145,13 @@
 </script>
 
 <style lang="less" scoped>
+	page{
+		background-color: #f7f7f7;
+	}
 	.context_box {
 		width: 90%;
 		margin: 0 auto;
-
+		padding-bottom: 40rpx;
 		/deep/.u-form-item__body {
 			border-bottom: 1px solid #F6F6F6;
 			margin-bottom: 20rpx;

+ 19 - 11
MingGaoApp/pages/my/index.vue

@@ -2,7 +2,7 @@
 	<view class="my_box">
 		<view class="my_info">
 			<view class="my_info_logo">
-				<image :src="userinfo.theme_info.logo_url.indexOf('http') == -1 ?'http://192.168.1.17:12345'+userinfo.theme_info.logo_url:userinfo.theme_info.logo_url" mode=""></image>
+				<image :src="userinfo.theme_info.logo_url.indexOf('http') == -1 ?(baseUrl+userinfo.theme_info.logo_url):userinfo.theme_info.logo_url" mode=""></image>
 			</view>
 			<view class="my_info_name">{{userinfo.username}}</view>
 		</view>
@@ -12,10 +12,10 @@
 					{{item}}
 				</view>
 				<view class="item_info">
-					<view class="" v-if="index==3&&newversion">
+					<view class="" v-if="index==3">
 						{{userinfo.current_version}}
 					</view>
-					<view class="item_info_dian" v-if="index==3">
+					<view class="item_info_dian" v-if="index==3&&newversion">
 						
 					</view>
 					<u-icon name="arrow-right" color="#606060"></u-icon>
@@ -54,13 +54,15 @@
 						current_version:this.userinfo.current_version
 					}
 				})
-				console.log(res.new_app.app_version.match(/\d+/g).join(""))
-				var news = res.new_app.app_version.match(/\d+/g).join("")
-				var old = this.userinfo.current_version.match(/\d+/g).join("")
-				if(news > old){
-					this.newversion = true
-				}else{
-					this.newversion = false
+				if(res.new_app.app_version){
+					console.log(res.new_app.app_version.match(/\d+/g).join(""))
+					var news = res.new_app.app_version.match(/\d+/g).join("")
+					var old = this.userinfo.current_version.match(/\d+/g).join("")
+					if(news > old){
+						this.newversion = true
+					}else{
+						this.newversion = false
+					}
 				}
 				// this.userinfo = res
 			},
@@ -75,6 +77,9 @@
 					});
 					
 				}else if (index == 2){
+					uni.navigateTo({
+						url: './mymonit',
+					});
 				}else if(index == 3){
 					uni.navigateTo({
 						url: './version?id='+this.userinfo.current_version,
@@ -89,9 +94,12 @@
 </script>
 
 <style lang="less">
+	page{
+		background-color: #f7f7f7;
+	}
 	.my_box {
 		width: 100%;
-		height: 100vh;
+		height: calc(100vh - 100rpx);
 		background-image: url(../../static/image/geren.jpg);
 		background-size: 100%;
 		background-repeat: no-repeat;

+ 103 - 23
MingGaoApp/pages/my/monitorlog.vue

@@ -1,13 +1,16 @@
 <template>
-	<view>
+	<view style="background-color: #fff;">
 		<view class="screen" v-if="current==1" @click="opencale">
 			<u-icon name="calendar" color="#2979ff" size="24"></u-icon>
 		</view>
-		<u-subsection :list="list" :current="current" @change="sectionChange"></u-subsection>
+		<view class="subsection">
+			<u-subsection :list="list" :current="current" @change="sectionChange"></u-subsection>
+		</view>
 		<view class="weatherbox" v-if="current == 0">
 			<u--form labelPosition="left" :model="weatherdatas" :rules="rules" ref="uForm">
 				<u-form-item label="温度" prop="temp" ref="item1">
 					<u--input v-model="weatherdatas.temp" placeholder="请填写温度" border="none"></u--input>
+					℃
 				</u-form-item>
 				<u-form-item label="天气" prop="weather" ref="item1">
 					<u--input v-model="weatherdatas.weather" placeholder="请填写天气" border="none"></u--input>
@@ -51,29 +54,30 @@
 					</u-swipe-action-item>
 				</u-swipe-action>
 			</view>
-			<u-button type="primary" text="提交" @click="submit" style="margin-top: 30rpx;"></u-button>
+			<u-button type="primary" text="提交" @click="submit" style="margin-top: 30rpx;" :loading="passload" shape="circle"></u-button>
 		</view>
 		<view class="hisbox" v-else>
-			<view class="hisbox_hint">
+			<view class="hisbox_hint" v-if="hislist.length==0">
 				暂无数据
 			</view>
-			<view class="hisbox_item">
+			<view class="hisbox_item" v-for="item,index in hislist" :key="index" @click="todata(item.id)">
 				<view class="task_box_left">
 					<view class="task_box_left_f">
-						<!-- {{item.name}} -->
+						{{item.monitor_time}}
 					</view>
 					<view class="task_box_left_t">
-						<!-- {{}} -->
+						{{item.weather}}
 					</view>
 				</view>
 				<view class="task_box_con">
-					<!-- {{item.text}} -->
+					{{item.owner_user}}
 				</view>
 			</view>
 		</view>
 		<!-- <u-calendar :show="caleshow" mode="range" @confirm="confirm"></u-calendar> -->
 		<uni-calendar :insert="false" ref="calendar" @confirm="confirm" />
 		<uni-calendar :insert="false" ref="calendars" :range="true" @confirm="confirms" />
+		<u-loading-page loading-text="加载中..." :loading="loading" font-size="16"></u-loading-page>
 	</view>
 </template>
 
@@ -94,9 +98,9 @@
 				}],
 				rules: {
 					'temp': {
-						type: 'string',
+						type: 'number',
 						required: true,
-						message: '请填写温度',
+						message: '请填写温度(数字)',
 						trigger: ['blur', 'change']
 					},
 					'weather': {
@@ -120,12 +124,20 @@
 				},
 				kpsurlL: "",
 				tasklist: [],
+				hislist:[],
+				start_time:"",//开始时间
+				end_time:"",//结束时间
+				page:1,
+				passload:false,
+				loading:false,
 			}
 		},
 		methods: {
 			sectionChange(e) {
 				this.current = e
 				if (e == 1) {
+					this.page = 1
+					this.hislist = []
 					this.gethis()
 				}
 			},
@@ -165,6 +177,7 @@
 					}
 					list.push(obj)
 				}
+				this.passload = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=app.my.app_monitor_log_add',
 					data: {
@@ -176,6 +189,7 @@
 						.date, //         必填                     监督日期   2021-01-03
 					}
 				})
+				this.passload = false
 				if (res) {
 					uni.$u.toast('提交成功!')
 					for (var key in this.weatherdatas) {
@@ -198,14 +212,20 @@
 				});
 			},
 			async gethis() {
+				this.loading = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=control_center.task.monitor_log_list',
 					data: {
-						page: 1,
-						start_time: "",
-						end_time: ""
+						page: this.page,
+						start_time:this.start_time,
+						end_time: this.end_time
 					}
 				})
+				console.log(res.page_list)
+				for(var i =0;i<res.page_list.length;i++){
+					this.hislist.push(res.page_list[i])
+				}
+				this.loading = false
 			},
 			caleshow() {
 				this.$refs.calendar.open();
@@ -214,7 +234,16 @@
 				this.$refs.calendars.open();
 			},
 			confirms(e){
-				console.log(e)
+				console.log(e.range)
+				this.start_time = e.range.before
+				this.end_time = e.range.after
+				this.hislist = []
+				this.gethis()
+			},
+			todata(id){
+				uni.navigateTo({
+					url: './monitorlogdata?id='+id,
+				});
 			}
 		},
 		onLoad() {
@@ -234,30 +263,54 @@
 			uni.removeStorage({
 				key: "addobj",
 			})
-		}
+		},
+		onReachBottom() {
+			this.page++
+			this.gethis()
+		},
+		onPullDownRefresh(){
+			this.hislist = []
+			this.page = 1
+			this.start_time="",
+			this.end_time=""
+			this.gethis()
+			setTimeout(() => {
+				uni.stopPullDownRefresh()
+			}, 1000)
+		},
 	}
 </script>
 
 <style lang="less" scoped>
+	page{
+		background-color: #f7f7f7;
+	}
 	.screen {
-		position: absolute;
-		top: -70rpx;
+		position: fixed;
+		top: 20rpx;
 		right: 20rpx;
 		z-index: 9999;
 	}
-
+	.subsection{
+		width: 100%;
+		position: fixed;
+		top: 88rpx;
+		height: 70rpx;
+		z-index: 9999;
+	}
 	/deep/.u-subsection {
-		background-color: #fff !important;
-
+		background-color: #f7f7f7 !important;
+		// margin: 20rpx 0;
 		.u-subsection__bar {
-			background-color: #eeeeef;
+			background-color: #fff;
 		}
 	}
 
 	.weatherbox {
 		width: 90%;
-		margin: 0 auto;
-
+		margin: 0 auto 0;
+		padding-top: 80rpx;
+		padding-bottom: 40rpx;
 		/deep/.u-form-item__body {
 			border-bottom: 1px solid #F6F6F6;
 			margin-bottom: 20rpx;
@@ -305,4 +358,31 @@
 			}
 		}
 	}
+	.hisbox{
+		width: 90%;
+		margin: 70rpx auto 0;
+		.hisbox_hint{
+			width: 100%;
+			text-align: center;
+			font-size: 28rpx;
+			height: 100rpx;
+			line-height: 100rpx;
+			color: #999999;
+		}
+		.hisbox_item{
+			box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
+			padding: 20rpx;
+			margin-bottom: 30rpx;
+			font-size: 28rpx;
+			.task_box_left{
+				display: flex;
+				margin-bottom: 20rpx;
+				justify-content: space-between;
+			}
+			.task_box_con{
+				color: #999999;
+			}
+		}
+		
+	}
 </style>

+ 181 - 0
MingGaoApp/pages/my/monitorlogdata.vue

@@ -0,0 +1,181 @@
+<template>
+	<view class="" style="background-color: #fff;">
+		<view class="" style="width: 100%;height: 40rpx;background-color: #f7f7f7;">
+			
+		</view>
+		<view class="wearthbox">
+			<view class="wearthbox_item">
+				<view class="wearthbox_item_l">
+					温度
+				</view>
+				<view class="wearthbox_item_r">
+					{{datainfo.temperature}}
+				</view>
+			</view>
+			<view class="wearthbox_item">
+				<view class="wearthbox_item_l">
+					天气
+				</view>
+				<view class="wearthbox_item_r">
+					{{datainfo.weather}}
+				</view>
+			</view>
+			<view class="wearthbox_item">
+				<view class="wearthbox_item_l">
+					日期
+				</view>
+				<view class="wearthbox_item_r">
+					{{datainfo.monitor_time}}
+				</view>
+			</view>
+			<view class="wearthbox_item">
+				<view class="wearthbox_item_l">
+					地址
+				</view>
+				<view class="wearthbox_item_r">
+					{{datainfo.address}}
+				</view>
+			</view>
+			<view class="title_box">
+				监测内容
+			</view>
+			<view class="task_box" v-for="item,index in baselist" :key="index" @click="examine(item.img_list)">
+				<view class="task_box_left">
+					<view class="task_box_left_f">
+						{{item.title}}
+					</view>
+					<view class="task_box_left_t">
+						{{item.img_list.length}}张图片
+					</view>
+				</view>
+				<view class="task_box_con">
+					<view class="task_box_con_f">
+						{{item.create_time}}
+					</view>
+					<view class="task_box_con_t">
+						{{item.message}}
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-loading-page loading-text="加载中..." :loading="loading" font-size="16"></u-loading-page>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				datainfo: {},
+				baselist: [],
+				loading:false
+			}
+		},
+		methods: {
+			async getdatalist(id) {
+				this.loading = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=control_center.task.monitor_log_info',
+					data: {
+						record_id: id
+					}
+				})
+				console.log(res)
+				this.datainfo = res.monitor_info
+				this.baselist = res.page_list
+				for(var i = 0; i < this.baselist.length; i++){
+					this.baselist[i].img_list = JSON.parse(this.baselist[i].img_list) || []
+				}
+				this.loading = false
+			},
+			examine(item) {
+				var imgarr = []
+				for (var i = 0; i < item.length; i++) {
+					imgarr.push(this.baseUrl + item[i])
+				}
+				if(imgarr.length!=0){
+					uni.previewImage({
+						urls: imgarr,
+						current: 0
+					});
+				}else{
+					uni.$u.toast('暂无图片!')
+				}
+				
+			},
+		},
+		onLoad(option) {
+			this.getdatalist(option.id)
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	page{
+		background-color: #f7f7f7;
+	}
+	
+	.wearthbox {
+		width: 90%;
+		margin: 0 auto;
+		padding-bottom: 40rpx;
+		.wearthbox_item {
+			display: flex;
+			justify-content: space-between;
+			border-bottom: 1px solid #F6F6F6;
+			margin-bottom: 20rpx;
+			padding: 20rpx 0;
+
+			.wearthbox_item_r {
+				color: #999999;
+			}
+		}
+
+		.title_box {
+			width: 100%;
+			display: flex;
+			justify-content: space-between;
+			margin-top: 30rpx;
+			margin-bottom: 30rpx;
+			font-weight: 700;
+		}
+
+		.task_box {
+			padding: 20rpx 10rpx;
+			border-top: 1px solid #dadbde;
+			border-bottom: 1px solid #dadbde;
+			.task_box_left {
+				display: flex;
+				justify-content: space-between;
+				margin-bottom: 20rpx;
+
+				.task_box_left_f {
+					font-weight: 700;
+					font-size: 28rpx;
+				}
+
+				.task_box_left_t {
+					color: #999999;
+					font-size: 24rpx;
+				}
+			}
+
+			.task_box_con {
+				font-size: 28rpx;
+				.task_box_con_f{
+					margin-bottom: 10rpx;
+				}
+				.task_box_con_t{
+					text-overflow: -o-ellipsis-lastline;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					display: -webkit-box;
+					-webkit-line-clamp: 2;
+					line-clamp: 2;
+					-webkit-box-orient: vertical;
+				}
+				
+			}
+		}
+	}
+</style>

+ 37 - 0
MingGaoApp/pages/my/mtmonitdetails.vue

@@ -0,0 +1,37 @@
+<template>
+	<view>
+		<view class="" style="width: 100%;height: 30rpx;background-color: #f7f7f7;">
+			
+		</view>
+		<taskdetails :taskshow="taskshow" :istask="istask" ref="child"></taskdetails>
+	</view>
+</template>
+
+<script>
+	import taskdetails from "../../components/task-details.vue"
+	export default {
+		components:{
+			taskdetails
+		},
+		data() {
+			return {
+				taskshow:false,
+				istask:3,
+			}
+		},
+		methods: {
+
+		},
+		onLoad(option) {
+			// this.taskid = Number(option.id)
+			this.$nextTick(()=>{
+				this.$refs.child.gettaskinfo(option.id)
+			})
+			// this.$refs.child.no()
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 12 - 4
MingGaoApp/pages/my/myinfo.vue

@@ -1,5 +1,8 @@
 <template>
-	<view>
+	<view style="background-color: #fff;">
+		<view class="" style="width: 100%;height: 30rpx;background-color: #f7f7f7;">
+			
+		</view>
 		<view class="my_infobox">
 			<view class="my_info_item">
 				<view class="">
@@ -14,7 +17,7 @@
 					<u-collapse-item title="隶属海关" name="Docs guide">
 						<p class="u-collapse-content" v-for="(item,index) in userinfo.org_list" :key="index">
 							{{index+1+"、"}}{{item.org_name}}</p>
-							<p v-if="userinfo.org_list.length == 0">暂无</p>
+							<p v-if="userinfo.org_list.length == 0">暂无组织信息</p>
 					</u-collapse-item>
 				</u-collapse>
 			</view>
@@ -51,7 +54,7 @@
 				</view>
 			</view>
 			<view class="my_info_item">
-				<u-button type="primary" text="退出账号" @click="show = true"></u-button>
+				<u-button type="primary" text="退出账号" @click="show = true" shape="circle"></u-button>
 				<u-modal :show="show" :title="title" :content='content' :showCancelButton="true" @confirm="confirm" @cancel="show = false"></u-modal>
 			</view>
 		</view>
@@ -62,7 +65,9 @@
 	export default {
 		data() {
 			return {
-				userinfo: {},
+				userinfo: {
+					org_list:[]
+				},
 				orglist: "",
 				title: "",
 				show: false,
@@ -114,6 +119,9 @@
 </script>
 
 <style lang="less" scoped>
+	page{
+		background-color: #f7f7f7;
+	}
 	.my_infobox {
 		width: 90%;
 		margin: 0 auto;

+ 124 - 11
MingGaoApp/pages/my/mymonit.vue

@@ -1,26 +1,139 @@
 <template>
-	<view>
-		
+	<view class="mymonitbox">
+		<view class="hisbox_hint" v-if="pagelist.length==0">
+			暂无数据
+		</view>
+		<view class="mymonitbox_item" v-for="item,index in pagelist" :key="index" @click="tab(item.id)">
+			<view class="mymonitbox_item_l">
+				<view class="top">
+					{{item.task_type}}
+				</view>
+				<view class="bot">
+					{{item.supervisor_time}}
+				</view>
+			</view>
+			<view class="mymonitbox_item_c">
+				<view class="top">
+					{{item.supervisor_type}}
+				</view>
+				<view class="bot">
+					{{item.supervisor_user}}
+				</view>
+			</view>
+			<view class="mymonitbox_item_r" :style="{color:colors(item.task_status)}">
+					{{item.task_status}}
+			</view>
+		</view>
+		<u-loading-page loading-text="加载中..." :loading="loading" font-size="16"></u-loading-page>
 	</view>
 </template>
 
 <script>
-	// import task-details from "../../components/task-details.vue"
 	export default {
-		// components:{
-		// 	task-details
-		// },
 		data() {
 			return {
-
+				page: 1,
+				pagelist: [],
+				loading:false
 			}
 		},
 		methods: {
-
-		}
+			async asyncgetmonitlist() {
+				this.loading = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=control_center.task.supervisor_record_list',
+					data: {
+						page: this.page, //            否       页码, 默认1
+						page_item: "10", //
+					}
+				})
+				
+				// this.pagelist = res.page_list
+				if (res.page_list.length != 0) {
+					for (var i = 0; i < res.page_list.length; i++) {
+						this.pagelist.push(res.page_list[i])
+					}
+				}
+				this.loading = false
+				console.log(this.pagelist)
+			},
+			colors(type){
+				if(type == "未开始"){
+					return "#ffaa00"
+				}else if(type == "已完成"){
+					return "#02C644"
+				}else if(type == "未处理"||type == "处理中"){
+					return "#409EFF"
+				}else{
+					return "#FA4E4E"
+				}
+			},
+			tab(id){
+				uni.navigateTo({
+					url: './mtmonitdetails?id='+id,
+				});
+			}
+		},
+		onLoad() {
+			this.asyncgetmonitlist()
+		},
+		onReachBottom() {
+			this.page++
+			this.asyncgetmonitlist()
+		},
+		onPullDownRefresh(){
+			this.pagelist = []
+			this.page = 1
+			// this.start_time="",
+			// this.end_time=""
+			this.asyncgetmonitlist()
+			setTimeout(() => {
+				uni.stopPullDownRefresh()
+			}, 1000)
+		},
 	}
 </script>
 
-<style>
-
+<style lang="less" scoped>
+	.mymonitbox {
+		width: 90%;
+		margin: 20rpx auto 0;
+		.hisbox_hint{
+			width: 100%;
+			text-align: center;
+			font-size: 28rpx;
+			height: 100rpx;
+			line-height: 100rpx;
+			color: #999999;
+		}
+		.mymonitbox_item {
+			display: flex;
+			// height: 100rpx;
+			padding: 20rpx 10rpx;
+			box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08);
+			font-size: 28rpx;
+			margin-bottom: 30rpx;
+			.mymonitbox_item_l{
+				width: 50%;
+				.top{
+					margin-bottom: 20rpx;
+				}
+				.bot{
+					color: #606060;
+				}
+			}
+			.mymonitbox_item_c{
+				width: 30%;
+				.top{
+					margin-bottom: 20rpx;
+				}
+				.bot{
+					color: #606060;
+				}
+			}
+			.mymonitbox_item_r{
+				width: 20%;
+			}
+		}
+	}
 </style>

+ 13 - 2
MingGaoApp/pages/my/password.vue

@@ -1,5 +1,8 @@
 <template>
-	<view>
+	<view style="background-color: #fff;">
+		<view class="" style="width: 100%;height: 30rpx;background-color: #f7f7f7;">
+			
+		</view>
 		<view class="alterbox">
 			<u--form labelPosition="left" :model="setpass" :rules="rules" ref="uForm">
 				<u-form-item label="旧密码" prop="password" ref="item1" :labelWidth="80">
@@ -12,7 +15,8 @@
 					<u--input v-model="setpass.newpasswordtwo" border="none" type="password"></u--input>
 				</u-form-item>
 			</u--form>
-			<u-button type="primary" text="确定修改" @click="submit"></u-button>
+			<u-button type="primary" text="确定修改" @click="submit" :loading="passload" shape="circle">
+			</u-button>
 		</view>
 	</view>
 </template>
@@ -54,6 +58,7 @@
 						}
 					]
 				},
+				passload:false
 			}
 		},
 		methods: {
@@ -65,6 +70,7 @@
 				})
 			},
 			async alterpass() {
+				this.passload = true
 				const res = await this.$myRequest({
 					url: '/api/api_gateway?method=app.my.app_change_pwd',
 					data: {
@@ -73,6 +79,7 @@
 						confirm_password: this.setpass.newpasswordtwo,
 					}
 				})
+				this.passload = false
 				console.log(res)
 				this.userinfo = res
 			},
@@ -81,9 +88,13 @@
 </script>
 
 <style lang="less" scoped>
+	page{
+		background-color: #f7f7f7;
+	}
 	.alterbox {
 		width: 90%;
 		margin: 0 auto;
+		padding-bottom: 40rpx;
 	}
 
 	.u-form {

+ 3 - 0
MingGaoApp/pages/my/version.vue

@@ -1,5 +1,8 @@
 <template>
 	<view>
+		<view class="" style="width: 100%;height: 30rpx;background-color: #f7f7f7;">
+			
+		</view>
 		<view class="gengxin_box">
 			<image src="../../static/image/pilianggengxin.png" mode="" class="gengxin"></image>
 			<view class="gengxin_box_dian" v-if="newversion">

+ 114 - 4
MingGaoApp/pages/supervise/index.vue

@@ -1,6 +1,34 @@
 <template>
 	<view>
-		
+		<view class="division">
+			<u-search placeholder="请输入任务处理人名称" v-model="keyword" :showAction="false" @search="search"></u-search>
+		</view>
+		<view class="hisbox_hint" v-if="tasklist.length==0">
+			暂无数据
+		</view>
+		<u-loading-page loading-text="加载中..." :loading="loading" font-size="16"></u-loading-page>
+		<view class="taskbox">
+			<view class="taskbox_item" v-for="item,index in tasklist" :key="index" @click="totask(item.task_id)">
+				<view class="taskbox_item_t">
+					<view class="taskbox_item_t_l">
+						{{item.task_type}}
+					</view>
+					<view class="taskbox_item_t_r">
+						{{item.start_time}}
+					</view>
+				</view>
+				<view class="taskbox_item_l">
+					<view class="taskbox_item_l_l">
+						<view class="taskbox_item_l_l_l">
+							下发人:{{item.owner_user}}
+						</view>
+					</view>
+					<view class="taskbox_item_l_r">
+						{{item.task_status}}
+					</view>
+				</view>
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -8,15 +36,97 @@
 	export default {
 		data() {
 			return {
-				
+				loading: false,
+				tasklist: [],
+				keyword:""
 			}
 		},
+		onLoad() {
+			this.gettaskdata()
+		},
 		methods: {
-			
+			async gettaskdata() {
+				this.loading = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=control_center.task.supervisor_list',
+					data: {
+						page: this.page, //            否       页码, 默认1
+						page_item: "10", //
+						status: this.status
+					}
+				})
+				this.tasklist = res.page_list
+				console.log(res)
+				this.loading = false
+			},
+			totask(id){
+				uni.navigateTo({
+					url:"./supetask?id="+id
+				})
+			},
+			search(){
+				
+			}
 		}
 	}
 </script>
 
-<style>
+<style lang="scss" scoped>
+	.division{
+		position: fixed;
+		width: 90%;
+		left: 5%;
+		background-color: #FFFFFF;
+	}
+	.hisbox_hint {
+		width: 100%;
+		text-align: center;
+		font-size: 28rpx;
+		height: 100rpx;
+		line-height: 100rpx;
+		color: #999999;
+	}
+
+	.taskbox {
+		// margin-top: 88rpx;
+		width: 90%;
+		margin: 0 auto;
+		padding-top: 70rpx;
+		.taskbox_item {
+			width: 100%;
+			font-size: 28rpx;
+			border-bottom: 1px solid #F6F6F6;
+			padding-top: 20rpx;
+
+			.taskbox_item_t,
+			.taskbox_item_l {
+				width: 100%;
+				display: flex;
+				justify-content: space-between;
+				margin-bottom: 20rpx;
+			}
+
+			.taskbox_item_t_l {
+				font-weight: 700;
+			}
+
+			.taskbox_item_l_l_l {
+				padding: 8rpx;
+				font-size: 24rpx;
+				background-color: rgba(64, 158, 255, 0.15);
+				font-weight: 700;
+				color: #409EFF;
+				margin-right: 10rpx;
+				border-radius: 10rpx;
+			}
 
+			.taskbox_item_l_r {
+				padding: 8rpx;
+				font-size: 24rpx;
+				border: 1px solid #409EFF;
+				border-radius: 10rpx;
+				color: #409EFF;
+			}
+		}
+	}
 </style>

+ 124 - 0
MingGaoApp/pages/supervise/submitsupe.vue

@@ -0,0 +1,124 @@
+<template>
+	<view>
+		<view class="" style="width: 100%;height: 30rpx;background-color: #f7f7f7;">
+
+		</view>
+		<view class="frombox">
+			<u--form labelPosition="left" :model="supervise" :rules="rules" ref="uForm" labelWidth="70">
+				<u-form-item label="监督形式" prop="supervisor_type" borderBottom ref="item1">
+					<u-radio-group v-model="supervise.supervisor_type" placement="row" @change="groupChange">
+						<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
+							:label="item.name" :name="item.name" @change="radioChange">
+						</u-radio>
+					</u-radio-group>
+				</u-form-item>
+				<u-form-item label="监督部门" prop="supervisor_depa" borderBottom ref="item1">
+					<u--input v-model="supervise.supervisor_depa" border="none" placeholder="请输入监督部门"></u--input>
+				</u-form-item>
+				<u-form-item label="监督情况" prop="supervisor_msg" borderBottom ref="item1">
+					<u--textarea v-model="supervise.supervisor_msg" placeholder="请输入监督情况" count maxlength="100"
+						:autoHeight="true" height="100"></u--textarea>
+				</u-form-item>
+			</u--form>
+			<u-button type="primary" text="确定" :loading="loading" shape="circle" @click="uploading" style="margin-top: 30rpx;"></u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				radiolist1: [{
+						name: '现场监督',
+						disabled: false
+					},
+					{
+						name: '远程监督',
+						disabled: false
+					},
+				],
+				supervise: {
+					task_id: "", //                 必填                   任务id
+					supervisor_type: "", //         必填                   监督类型
+					supervisor_depa: "", //          必填                   监督部门
+					supervisor_msg: "", //           必填                   监督内容
+				},
+				rules: {
+					supervisor_type: {
+						type: 'string',
+						required: true,
+						message: '请选择监督形式',
+						trigger: ['blur', 'change']
+					},
+					supervisor_depa: {
+						type: 'string',
+						required: true,
+						message: '请填写监督部门',
+						trigger: ['blur', 'change']
+					},
+					supervisor_msg: {
+						type: 'string',
+						required: true,
+						message: '请填写监督情况',
+						trigger: ['blur', 'change']
+					},
+				},
+				loading: false
+			}
+		},
+		onLoad(option) {
+			this.supervise.task_id = option.id
+		},
+		methods: {
+			groupChange() {
+
+			},
+			radioChange() {
+
+			},
+			uploading() {
+				console.log(this.supervise)
+				this.$refs.uForm.validate().then(res => {
+					this.upload()
+				}).catch(errors => {
+					uni.$u.toast('请将信息填写完成')
+				})
+			},
+			async upload(){
+				this.loading = true
+				const res = await this.$myRequest({
+					url: '/api/api_gateway?method=control_center.task.supervisor_add',
+					data: {
+						task_id: this.supervise.task_id, //                 必填                   任务id
+						supervisor_type: this.supervise.supervisor_type, //         必填                   监督类型
+						supervisor_depa: this.supervise.supervisor_depa, //          必填                   监督部门
+						supervisor_msg: this.supervise.supervisor_msg,
+					}
+				})
+				if(res){
+					uni.$u.toast('发布成功')
+					uni.navigateBack({
+						delta:1
+					})
+				}
+				this.loading = false
+			}
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	.frombox {
+		width: 90%;
+		margin: 0 auto;
+
+		/deep/.u-radio-group {
+			padding-top: 20rpx;
+
+			.u-radio {
+				margin-right: 30rpx;
+			}
+		}
+	}
+</style>

+ 42 - 0
MingGaoApp/pages/supervise/supetask.vue

@@ -0,0 +1,42 @@
+<template>
+	<view>
+		<view class="" style="width: 100%;height: 30rpx;background-color: #f7f7f7;">
+			
+		</view>
+		<taskdetails :taskshow="taskshow" :istask="istask" @tosubm="tosubm" ref="child"></taskdetails>
+	</view>
+</template>
+
+<script>
+	import taskdetails from "../../components/task-details.vue"
+	export default {
+		components:{
+			taskdetails
+		},
+		data() {
+			return {
+				taskshow:false,
+				istask:2,
+				taskid:''
+			}
+		},
+		methods: {
+			tosubm(){
+				uni.navigateTo({
+					url:"./submitsupe?id="+this.taskid
+				})
+			}
+		},
+		onLoad(option) {
+			this.taskid = Number(option.id)
+			this.$nextTick(()=>{
+				this.$refs.child.gettaskinfo(option.id)
+			})
+			// this.$refs.child.no()
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 1 - 1
MingGaoApp/util/url.js

@@ -1,3 +1,3 @@
 export default{
- baseUrl:"http://192.168.1.17:12345"
+ baseUrl:"http://114.115.147.140:12345"
 }