Browse Source

通讯模块

zhengkaixin 11 tháng trước cách đây
mục cha
commit
2e61fbb6c9

+ 15 - 4
pages/equipmentDataMonitoring/electronicMonitoring.vue

@@ -287,7 +287,7 @@
 		<!-- 设备信息弹窗 -->
 
 		<view class="equipment-popup">
-			<u-popup v-model="equipmentInfosShow" mode="bottom" border-radius="12">
+			<u-popup v-model="equipmentInfosShow" mode="bottom" height='90%' border-radius="12">
 				<view class="content">
 					<view class="headline">
 						设备信息
@@ -359,6 +359,15 @@
 								{{meterDetail.enablingTime}}
 							</view>
 						</view>
+						
+						<view class="item" v-if="dtuInfo.id">
+							<view class="item-title">
+								通讯模块
+							</view>
+							<view class="item-value">
+								{{dtuInfo.name}} {{dtuInfo.imei}}
+							</view>
+						</view>
 					
 					</view>
 					<button class="get" @click="equipmentInfosShow=false">知道了</button>
@@ -484,6 +493,7 @@
 				intervalId: null, // 用于存储间隔ID  
 				intervalReady: true, // 用于存储间隔ID 
 				ref:false,
+				dtuInfo:{},
 			};
 		},
 		onLoad(op) {
@@ -588,7 +598,8 @@
 					meterId: meterId
 				}).then((res) => {
 					uni.hideLoading();
-					this.meterDetail = res.data.meter;
+					this.meterDetail = res.data.meter;
+					this.dtuInfo = res.data.dtuInfo;
 					this.meterDetail.name=this.replaceLastTwoWords(this.meterDetail.name)
 					this.codes =this.carhelp.getPersonInfo().codes;
 					
@@ -1613,8 +1624,8 @@
 					display: flex;
 					align-items: center;
 
-					line-height: 48rpx;
-					padding: 24rpx 0;
+					//line-height: 48rpx;
+					padding: 20rpx 0;
 					border-bottom: 1px solid #cccccc;
 
 					.item-title {

+ 0 - 342
pages/test/workOrderManagement/faultReport.vue

@@ -1,342 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="故障上报" title-color="#101010"></u-navbar>
-		<!-- 设备选择器 -->
-		<u-select title="设备选择" v-model="show" mode="single-column" :list="deviceList" @confirm="deviceConfirm">
-		</u-select>
-		
-		<view class="main">
-			<!-- 故障设备 -->
-			<view class="fault-equipment" @click="show=true">
-				<view class="title">
-					<text class="asterisk">*</text>故障设备
-
-				</view>
-				<view class="value">
-					<view class="placeholder" v-if="!faultForm.deviceName">
-						请选择设备
-					</view>
-					<view v-else>
-						{{faultForm.deviceName}}
-					</view>
-					<view class="icon">
-						<u-icon name="arrow-right" color="#acacac"></u-icon>
-					</view>
-				</view>
-			</view>
-			<!-- 故障类型 -->
-			<view class="fault-type">
-				<view class="title">
-					<text class="asterisk">*</text>请选择故障类型:
-				</view>
-				<view class="type">
-					<view class="type-item" v-for="(item,index) in stateList" :key="index"
-						:class="stateIndex==index ? 'item-checked' : ''" @click="stateClick(item,index)">
-						{{item.label}}
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 照片上传 -->
-		<view class="picture-upload">
-			<view class="title">
-				现场照片/视频(最多4张)
-			</view>
-			<view class="upload">
-				<!-- <u-upload :action="action" :file-list="fileList" max-count="4" width="144" height="144"></u-upload> -->
-				<u-upload max-count="4" name="photoFile" ref="uUpload" :form-data="formData" :header="header"
-					:action="action" :file-list="fileList" width="144" height="144"></u-upload>
-			</view>
-		</view>
-		<!-- 故障描述 -->
-		<view class="fault-description">
-			<view class="title">
-				<text class="asterisk">*</text>故障描述
-			</view>
-			<view class="textarea">
-				<textarea v-model="faultForm.content" placeholder="请详细描述故障现象,以便我们更准确快速的为您解决问题"></textarea>
-			</view>
-		</view>
-		<!-- 底部 --> 
-		<view class="bottom">
-			<button class="submit" @click="submit">提交工单</button>
-		</view>
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/pagejs/index.js'
-	import * as API_workOrder from '@/apis/pagejs/workOrder.js'
-	
-	export default {
-		data() {
-			return {
-				stateIndex: -1,
-				stateList: [], //故障类型List
-				faultForm: {
-					deviceId: '', //故障设备id
-					deviceName: '',
-					faultType: '', //故障类型
-					pic: '', //故障拍照
-					content: '' //故障内容
-				},
-				show: false,
-				deviceList: [], //设备
-				action: '',
-				fileList: [],
-				formData: {}
-			}
-		},
-		onLoad() {
-			this.action = process.car.BASE_URL + "uploadFile";
-			this.formData = {
-				subFolder: "workorder"
-			}
-			var token = this.carhelp.getToken();
-			this.header={
-				'Authorization': token,
-				'X-Requested-With': 'application/x-www-form-urlencoded'
-			}
-			
-			this.getLoadMyDevices();
-			this.getFindByCatalogName();
-		},
-		methods: {
-			submit() {
-				let files = [];
-				// 通过filter,筛选出上传进度为100的文件(因为某些上传失败的文件,进度值不为100,这个是可选的操作)
-				files = this.$refs.uUpload.lists.filter(val => {
-					return val.progress == 100;
-				})
-				// 如果您不需要进行太多的处理,直接如下即可
-				files = this.$refs.uUpload.lists;
-				var imgUrl = files.map(item => {
-					return item.response.data.url;
-				})
-				this.faultForm.pic = imgUrl.join(',');
-				
-				if(!this.faultForm.deviceId){
-					uni.showToast({
-						icon: "none",
-						title: "请选择故障设备"
-					})
-					return
-				}
-				if(!this.faultForm.faultType){
-					uni.showToast({
-						icon: "none",
-						title: "请选择故障类型"
-					})
-					return
-				}
-				if(!this.faultForm.content){
-					uni.showToast({
-						icon: "none",
-						title: "请填写故障描述"
-					})
-					return
-				}
-				
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				API_workOrder.usCreate(this.faultForm).then((res) => {
-					uni.hideLoading();
-					uni.navigateTo({
-						url: '/pages/workOrderManagement/workOrderManagement'
-					})
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			//选择故障类型
-			stateClick(item,index) {
-				this.stateIndex = index;
-				this.faultForm.faultType = item.value;
-			},
-			// 异常查询条件
-			getFindByCatalogName() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				API_workOrder.findByCatalogName({
-					catalogName: '故障类型'
-				}).then((response) => {
-					uni.hideLoading();
-					var list = response.data.map(item => {
-						return {
-							label: item.name,
-							value: item.id
-						}
-					});
-					this.stateList = list;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			//选择设备
-			deviceConfirm(e) {
-				console.log(e)
-				this.faultForm.deviceId = e[0].value;
-				this.faultForm.deviceName = e[0].label;
-			},
-			getLoadMyDevices() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				API_workOrder.loadMyDevices().then((response) => {
-					uni.hideLoading();
-					this.deviceList = [];
-					this.deviceList = response.data.map(item => {
-						return {
-							label: item.name,
-							value: item.id
-						}
-					});
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	/deep/.u-select__header__title {
-		font-size: 36rpx;
-		font-weight: bold;
-	}
-	
-	.main {
-		background-color: #fff;
-
-		// 故障设备
-		.fault-equipment {
-			display: flex;
-			align-items: center;
-			padding: 24rpx 32rpx;
-			border-bottom: 1px solid rgba(221, 221, 221, 1);
-
-			.title {
-				font-size: 32rpx;
-				color: #777777;
-				width: 144rpx;
-
-				.asterisk {
-					color: rgba(238, 49, 56, 1);
-
-				}
-			}
-
-			.value {
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-				margin-left: 64rpx;
-				flex: 1;
-
-				.placeholder {
-					color: rgba(172, 172, 172, 1);
-					font-size: 32rpx;
-				}
-			}
-		}
-
-		// 故障类型
-		.fault-type {
-			.title {
-				font-size: 32rpx;
-				color: #111111;
-				padding: 32rpx 32rpx 0;
-				font-weight: bold;
-
-				.asterisk {
-					color: rgba(238, 49, 56, 1);
-
-				}
-			}
-
-			.type {
-				display: flex;
-				padding: 24rpx 32rpx;
-				align-items: center;
-				flex-wrap: wrap;
-
-				.type-item {
-					border: 1px solid rgba(216, 223, 232, 1);
-					color: rgba(16, 16, 16, 1);
-					line-height: 66rpx;
-					text-align: center;
-					border-radius: 4px;
-					padding:0 16rpx;
-					line-height: 66rpx;
-					margin-right: 16rpx;
-					margin-bottom: 16rpx;
-				}
-
-				.item-checked {
-					background-color: rgba(22, 119, 255, 1);
-					color: rgba(255, 255, 255, 1);
-				}
-			}
-		}
-	}
-
-	// 照片上传 故障描述
-	.picture-upload,
-	.fault-description {
-		padding: 32rpx 32rpx;
-		background-color: #fff;
-		margin-top: 24rpx;
-
-		.title {
-			color: rgb(16, 16, 16);
-			font-size: 32rpx;
-			margin-bottom: 24rpx;
-			font-weight: bold;
-		}
-
-		.textarea {
-
-			/deep/.uni-textarea-placeholder {
-				color: #b2b2b2;
-			}
-
-			/deep/uni-textarea {
-				width: 660rpx;
-				height: 180rpx;
-
-			}
-		}
-	}
-
-	// 底部
-	.bottom {
-		padding: 20rpx 32rpx;
-		background-color: #fff;
-		position: fixed;
-		left: 0;
-		right: 0;
-		bottom: 0;
-
-		.submit {
-			border-radius: 4px;
-			background-color: rgba(22, 119, 255, 1);
-			color: rgba(255, 255, 255, 1);
-			font-size: 32rpx;
-			line-height: 80rpx;
-		}
-	}
-</style>

+ 0 - 544
pages/test/workOrderManagement/workOrderDetails.vue

@@ -1,544 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="工单详情" title-color="#101010"></u-navbar>
-
-		<!-- 工单详情 -->
-		<view class="main">
-			<view class="title">
-				<view class="number">
-					工单编号:{{detail.billNum}}
-				</view>
-				<view class="state" v-if="detail.status == 'dispatched'">
-					进行中
-				</view>
-				<view class="state state2" v-if="detail.status == 'created'">
-					待指派
-				</view>
-				<view class="state state3" v-if="detail.status == 'ended'">
-					已解决
-				</view>
-				<view class="state state4" v-if="detail.status == 'closed'">
-					已关闭
-				</view>
-			</view>
-			<view class="content">
-				<view class="content-item">
-					<view class="item-title">
-						告警设备
-					</view>
-					<view class="item-value">
-						{{detail.ownerOrgName}}-{{detail.deviceName}}
-					</view>
-
-				</view>
-				<view class="content-item">
-					<view class="item-title">
-						告警类型
-					</view>
-					<view class="item-value">
-						{{detail.faultTypeName}}
-					</view>
-				</view>
-
-				<view class="content-item">
-					<view class="item-title">
-						地址
-					</view>
-					<view class="item-value">
-						{{detail.deviceAddress}}
-						<image class="img" src="@/assets/img/riFill-navigation-fill 1.svg" mode=""></image>
-					</view>
-				</view>
-				<view class="content-item">
-					<view class="item-title">
-						告警时间
-					</view>
-					<view class="item-value">
-						{{detail.createTime}}
-					</view>
-				</view>
-				<view class="content-picture" v-if="picList.length != 0">
-					<view class="picture-title">
-						现场照片/视频
-					</view>
-					<view class="picture-box">
-						<image v-for="item in picList" class="img" :src="item" mode=""></image>
-					</view>
-				</view>
-				<view class="content-item" v-if="detail.repairAccepter != null">
-					<view class="item-title">
-						运维专员
-					</view>
-					<view class="item-value">
-						<view class="photo">
-							<image class="photo-img" src="@/assets/img/默认头像.png" mode=""></image>
-						</view>
-						{{detail.repairAccepter}} {{detail.repairContacter}}
-						<image class="img" src="@/assets/img/riFill-phone-fill.svg" mode=""></image>
-					</view>
-				</view>
-			</view>
-		</view>
-
-		<!-- 处理记录 -->
-		<view class="record" v-if="false">
-			<view class="title">
-				<view class="icon">
-
-				</view>
-				<view class="text">
-					处理记录
-				</view>
-			</view>
-			<!-- 时间轴 -->
-			<view class="time-line">
-				<u-time-line>
-					<!-- 关闭原因 -->
-					<u-time-line-item nodeTop="10">
-						<template v-slot:node>
-							<view class="u-node">
-
-							</view>
-						</template>
-						<template v-slot:content>
-							<view>
-								<view class="u-order-title"> <text class="name">我 </text>关闭了工单</view>
-								<view class="u-order-desc">关闭原因:错误告警</view>
-								<view class="u-order-time">2019-05-08 12:12</view>
-							</view>
-						</template>
-					</u-time-line-item>
-
-					<!-- 关闭工单 -->
-					<u-time-line-item nodeTop="10">
-						<template v-slot:node>
-							<view class="u-node">
-
-							</view>
-						</template>
-						<template v-slot:content>
-							<view>
-								<view class="u-order-title">关闭工单</view>
-								<view class="u-order-time">2019-05-08 12:12</view>
-							</view>
-						</template>
-					</u-time-line-item>
-					
-					<!-- 完成工单 -->
-					<u-time-line-item nodeTop="10">
-						<template v-slot:content>
-							<view>
-								<view class="u-order-title"> <text class="name">郭群 </text>完成工单</view>
-								<view class="u-order-desc">处理结果:冻雨天气导致私变线路问题,已解决。</view>
-								<view class="u-order-picture">
-									<image  class="img" src="@/assets/img/pImage@1x.png" mode="">
-									</image>
-								</view>
-								<view class="u-order-time">2019-05-08 12:12</view>
-							</view>
-						</template>
-					</u-time-line-item>
-
-					<u-time-line-item nodeTop="10">
-						<template v-slot:content>
-							<view>
-								<view class="u-order-title">平台指派 <text class="name">郭群 </text>处理工单</view>
-								<view class="u-order-time">2019-05-08 12:12</view>
-							</view>
-						</template>
-					</u-time-line-item>
-					
-					<u-time-line-item nodeTop="10">
-						<template v-slot:content>
-							<view>
-								<view class="u-order-title">触发告警 温度过高</view>
-								<view class="u-order-time">2019-05-08 12:12</view>
-							</view>
-						</template>
-					</u-time-line-item>
-				</u-time-line>
-			</view>
-		</view>
-		<!-- 底部 -->
-		<view class="bottom" v-if="detail.status == 'dispatched'">
-			<button class="back" @click="back">返回</button>
-			<button class="confirm" @click="resultShow=true">确认解决</button>
-		</view>
-		<!-- 填写处理结果 -->
-
-		<u-popup v-model="resultShow" mode="bottom" border-radius="12">
-			<view class="result-content">
-				<view class="title">
-					填写处理结果
-				</view>
-				<view class="textarea">
-					<textarea placeholder="请填写处理结果"></textarea>
-				</view>
-				<!-- 上传照片 -->
-				<view class="upload">
-					<view class="title">
-						上传现场照片
-					</view>
-					<view class="upload-picture">
-						<u-upload max-count="4" width="144" height="144" :action="action" :file-list="fileList"></u-upload>
-					</view>
-				</view>
-				<!-- 按钮 -->
-				<view class="btn-box">
-					<button class="cancel">取消</button>
-					<button class="submit">提交</button>
-				</view>
-			</view>
-		</u-popup>
-
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/pagejs/index.js'
-	import * as API_workOrder from '@/apis/pagejs/workOrder.js'
-	
-	export default {
-		data() {
-			return {
-				picList: [],
-				detail: {}, //工单详细
-				resultShow: false,
-				action: '',
-				fileList: [],
-				formData: {}
-			}
-		},
-		onLoad(op) {
-			this.action = process.car.BASE_URL + "uploadFile";
-			this.formData = {
-				subFolder: "workorder"
-			}
-			var token = this.carhelp.getToken();
-			this.header = {
-				'Authorization': token,
-				'X-Requested-With': 'application/x-www-form-urlencoded'
-			}
-			
-			if(op.id) {
-				this.getWorkOrderDetail(op.id);
-			}
-		},
-		methods: {
-			getWorkOrderDetail(id) {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				API_workOrder.workOrderDetail(id).then((res) => {
-					uni.hideLoading();
-					this.detail = res.data;
-					this.picList = res.data.pic.split(',');
-					console.log(this.picList)
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			back() {
-				uni.navigateBack()
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	
-
-	// 工单详情
-	.main {
-		background-color: #fff;
-
-		.title {
-			display: flex;
-			justify-content: space-between;
-			padding: 24rpx 32rpx;
-			box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.1);
-
-			.number {
-				color: rgba(51, 51, 51, 1);
-			}
-
-			.state {
-				border-radius: 4px;
-				background-color: rgba(255, 255, 255, 1);
-				color: rgba(22, 119, 255, 1);
-				font-size: 24rpx;
-				border: 1px solid rgba(22, 119, 255, 1);
-				width: 96rpx;
-				height: 48rpx;
-				line-height: 48rpx;
-				text-align: center;
-			}
-
-			.state2 {
-				color: rgba(255,123,0,1);
-				border: 1px solid rgba(255,123,0,1);
-				// color: rgba(255, 68, 68, 1);
-				// border: 1px solid rgba(255, 68, 68, 1);
-			}
-
-			.state3 {
-				color: rgba(0, 185, 98, 1);
-				border: 1px solid rgba(0, 185, 98, 1);
-			}
-
-			.state4 {
-				border: 1px solid rgba(171, 171, 171, 1);
-				color: rgba(119, 119, 119, 1);
-			}
-		}
-
-		.content {
-			.content-item {
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-				padding: 24rpx 0;
-				margin: 0 32rpx;
-				border-bottom: 1px solid rgba(242, 242, 242, 1);
-				font-size: 32rpx;
-
-				.item-title {
-					color: rgba(51, 51, 51, 1);
-
-				}
-
-				.item-value {
-					color: rgba(16, 16, 16, 1);
-					display: flex;
-					align-items: center;
-
-					.photo-img {
-						width: 40rpx;
-						height: 40rpx;
-						border-radius: 999px;
-						vertical-align: middle;
-						margin-right: 24rpx;
-					}
-
-					.img {
-						width: 32rpx;
-						height: 32rpx;
-						transform: scaleX(-1);
-						margin-left: 8rpx;
-					}
-				}
-			}
-
-			.content-picture {
-				padding: 24rpx 32rpx;
-				border-bottom: 1px solid rgba(242, 242, 242, 1);
-
-				.picture-title {
-					color: rgba(51, 51, 51, 1);
-					font-size: 32rpx;
-				}
-
-				.picture-box {
-					margin-top: 16rpx;
-					display: flex;
-					// justify-content: space-around;
-
-					.img {
-						width: 160rpx;
-						height: 160rpx;
-						border-radius: 4px;
-						margin-right: 16rpx;
-					}
-				}
-			}
-
-		}
-	}
-
-	// 处理记录
-	.record {
-		padding: 32rpx;
-		margin-top: 54rpx;
-		background-color: #fff;
-
-		.title {
-			display: flex;
-			align-items: center;
-			line-height: 32rpx;
-
-			.icon {
-				background-color: rgba(22, 119, 255, 1);
-				width: 4px;
-				height: 16px;
-			}
-
-			.text {
-				color: rgb(16, 16, 16);
-				font-size: 36rpx;
-				margin-left: 12rpx;
-				font-weight: bold;
-			}
-		}
-
-		// 时间轴
-		.time-line {
-			margin-top: 28rpx;
-
-			.u-node {
-				width: 18rpx;
-				height: 18rpx;
-				border-radius: 10px;
-				background-color: rgba(22, 119, 255, 1);
-			}
-
-
-			/deep/.u-time-axis {
-				padding-left: 4rpx;
-			}
-
-			// 照片
-			.u-order-picture {
-				.img {
-					width: 120rpx;
-					height: 120rpx;
-					margin-right: 16rpx;
-				}
-			}
-
-			.u-order-title {
-				color: rgba(51, 51, 51, 1);
-				font-size: 32rpx;
-
-				.name {
-					color: #1677FF;
-					margin: 0 4rpx;
-					font-weight: bold;
-				}
-			}
-
-			.u-order-desc {
-				color: rgba(51, 51, 51, 1);
-				font-size: 28rpx;
-				margin: 16rpx 0;
-			}
-
-			.u-order-time {
-				color: rgba(119, 119, 119, 1);
-				font-size: 24rpx;
-				margin-top: 8rpx;
-			}
-
-			/deep/.u-dot {
-				background: #cdcdcd !important;
-				width: 18rpx;
-				height: 18rpx;
-				border-radius: 10px;
-			}
-
-
-			/deep/.u-time-axis-item::before {
-				border-left: 1px solid #cdcdcd !important;
-			}
-
-			/deep/.u-time-axis-item {
-				margin-bottom: 40rpx;
-			}
-
-		}
-
-	}
-
-	// 底部
-	.bottom {
-		display: flex;
-		justify-content: space-between;
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		right: 0;
-		background-color: #fff;
-		padding: 20rpx 32rpx;
-		z-index: 999;
-
-		.back {
-			width: 328rpx;
-			line-height: 80rpx;
-			border-radius: 4px;
-			background-color: rgba(222, 225, 228, 1);
-			color: rgba(51, 51, 51, 1);
-			font-size: 32rpx
-		}
-
-		.confirm {
-			width: 328rpx;
-			line-height: 80rpx;
-			border-radius: 4px;
-			background-color: rgba(22, 119, 255, 1);
-			color: rgba(255, 255, 255, 1);
-			font-size: 32rpx
-		}
-	}
-
-	// 填写处理结果
-	.result-content {
-		padding: 32rpx;
-
-		.textarea {
-			margin-top: 32rpx;
-
-			uni-textarea {
-				width: 100%;
-				height: 160rpx;
-				background-color: rgba(241, 242, 245, 1);
-				text-indent: 28rpx;
-				padding: 8rpx 0;
-				border-radius: 8px;
-			}
-		}
-
-		// 上传照片
-		.upload {
-			margin-top: 24rpx;
-
-			.title {
-				color: rgba(16, 16, 16, 1);
-				font-size: 32rpx;
-			}
-
-			.upload-picture {
-				margin-top: 16rpx;
-
-			}
-		}
-
-		// 按钮
-		.btn-box {
-			display: flex;
-			justify-content: space-between;
-			background-color: #fff;
-			margin-top: 68rpx;
-
-			.cancel {
-				width: 328rpx;
-				line-height: 80rpx;
-				border-radius: 4px;
-				background-color: rgba(222, 225, 228, 1);
-				color: rgba(51, 51, 51, 1);
-				font-size: 32rpx
-			}
-
-			.submit {
-				width: 328rpx;
-				line-height: 80rpx;
-				border-radius: 4px;
-				background-color: rgba(22, 119, 255, 1);
-				color: rgba(255, 255, 255, 1);
-				font-size: 32rpx
-			}
-		}
-	}
-</style>

+ 0 - 615
pages/test/workOrderManagement/workOrderManagement.vue

@@ -1,615 +0,0 @@
-<template>
-	<view>
-
-		<view class="navbar-c">
-			<view class="back" @click="toWorkOrderMap">
-				<image class="img" src="@/assets/img/riLine-road-map-line.svg" mode=""></image>
-			</view>
-			<view class="title">
-				工单管理
-			</view>
-			<view class="right" @click="gotoUrl('/pages/workOrderManagement/faultReport')">
-				故障上报
-			</view>
-		</view>
-
-		<!-- 搜索 -->
-		<view class="search-box">
-			<u-search placeholder="搜索" bg-color="#fff" height="80" :show-action="true" v-model="queryForm.qkey"
-				@custom="searchWorkOrder">
-
-
-			</u-search>
-
-		</view>
-		<!-- 我的工单 -->
-		<view class="my-work-order">
-			<view class="title">
-				<view class="name">
-					<view class="icon">
-						<image class="img" src="@/assets/img/riFill-bar-chart-fill.svg" mode=""></image>
-					</view>
-					我的工单
-				</view>
-				<view class="more" @click="toWorkOrderStatistics">
-					工单统计<u-icon name="arrow-right" color="#777777"></u-icon>
-				</view>
-			</view>
-			<!-- 分类 -->
-			<view class="classify">
-				<view class="item" v-for="(item,index) in classificationList" :key="index"
-					:class="classificationIndex==index ? 'item-checked' : ''" @click="classificationClick(item,index)">
-					{{item.name}}18
-					<view class="checked-circle" v-if="classificationIndex==index">
-
-					</view>
-				</view>
-			</view>
-			<!-- 工单详情 -->
-			<view class="work-order" v-for="(item,index) in workOrderList" :key="index">
-				<!-- 紧急 -->
-				<view @click="gotoUrl('/pages/workOrderManagement/workOrderDetails?id='+item.id)">
-					<view class="urgency" v-if="item.urgentIf">
-						紧急
-					</view>
-					<view class="order-item">
-						<view class="item-icon">
-							<image class="img" src="@/assets/img/riFill-building-fill1.svg" mode=""></image>
-						</view>
-						<view class="item-value value-bold">
-							{{item.ownerOrgName}}-{{item.deviceName}}
-						</view>
-					</view>
-					<view class="order-item">
-						<view class="item-icon">
-							<image class="img" src="@/assets/img/riFill-alert-fill.svg" mode=""></image>
-						</view>
-						<view class="item-value value-bold">
-							{{item.faultTypeName}}
-						</view>
-					</view>
-					<view class="order-item">
-						<view class="item-icon">
-							<image class="img" src="@/assets/img/riFill-map-pin-fill.svg" mode=""></image>
-						</view>
-						<view class="item-value">
-							{{item.deviceAddress}}
-						</view>
-					</view>
-					<view class="order-item">
-						<view class="item-icon">
-							<image class="img" src="@/assets/img/riFill-time-fill.svg" mode=""></image>
-						</view>
-						<view class="item-value">
-							{{item.createTime}}
-						</view>
-					</view>
-				</view>
-
-				<view class="button">
-					<view class="state" v-if="item.status == 'created'">
-						待指派
-					</view>
-					<view class="state state2" v-if="item.status == 'dispatched'">
-						进行中
-					</view>
-					<view class="state state3" v-if="item.status == 'ended'">
-						已解决
-					</view>
-					<view class="state state4" v-if="item.status == 'closed'">
-						已关闭
-					</view>
-					<view class="btn">
-						<button class="close" @click="closePopupShow(item)" v-if="item.status == 'created'">关闭</button>
-						<button class="reminder" @click="reminderShow=true" v-if="item.status == 'created'">催单</button>
-						<button class="resolved" v-if="item.status == 'dispatched'"
-							@click="gotoUrl('/pages/workOrderManagement/workOrderDetails?id='+item.id)">确认解决</button>
-						<button class="view" v-if="item.status == 'ended' || item.status == 'closed'"
-							@click="gotoUrl('/pages/workOrderManagement/workOrderDetails?id='+item.id)">查看详情</button>
-					</view>
-				</view>
-			</view>
-			
-			<u-divider :isnone="workOrderList.length==0" nonetext="暂无工单" border-color="#CFD2D5">
-				已经到底了</u-divider>
-		</view>
-
-		<!-- 关闭原因 -->
-		<u-popup v-model="closeShow" mode="bottom" closeable close-icon-size="24" close-icon-color="#101010"
-			border-radius="24">
-			<view class="close-reason">
-				<view class="title">
-					请选择关闭原因:
-				</view>
-				<view class="reason-content">
-					<view class="reason-item" v-for="(item,index) in reasonList" :key="index">
-						<view class="item-title">
-							{{item}}
-						</view>
-						<view class="item-value" @click="reasonClick(item,index)">
-							<label class="radio">
-								<radio name="reason" :checked="index === current" /><text></text>
-							</label>
-						</view>
-					</view>
-				</view>
-				<view class="button-box">
-					<button class="think" @click="closeShow=false">我在想想</button>
-					<button class="confirm" @click="closeWorkOrder">确认关闭</button>
-				</view>
-			</view>
-		</u-popup>
-		<!-- 催单 -->
-
-		<u-popup v-model="reminderShow" mode="bottom" closeable close-icon-size="24" close-icon-color="#101010"
-			border-radius="24">
-			<view class="reminder-content">
-				<view class="title">
-					催单
-				</view>
-				<view class="content">
-					我们已催促平台尽快指派工程师处理工单。
-				</view>
-				<button class="know" @click="reminderClick">知道了</button>
-			</view>
-		</u-popup>
-
-		<energyCenterTabbar :current="1"></energyCenterTabbar>
-	</view>
-</template>
-
-<script>
-	import energyCenterTabbar from '@/components/energyCenterTabbar.vue'
-	import * as API_workOrder from '@/apis/pagejs/workOrder.js'
-	
-	export default {
-		components: {
-			energyCenterTabbar
-		},
-		data() {
-			return {
-				workOrderId: '', //工单id
-				classificationIndex: 0, //分类
-				classificationList: [
-					{value: '', name: '全部'},
-					{value: 'created', name: '待指派'},
-					{value: 'dispatched', name: '进行中'},
-					{value: 'ended', name: '已解决'}
-				],
-				workOrderList: [], //工单列表
-				recordsTotal: 0,
-				queryForm: {
-					pageIndex: 1,
-					pageSize: 5,
-					qkey: '', //关键字(工单编号/设备名/故障信息)
-					startDate: '', //开始日期	
-					endDate: '', //截止日期
-					status: '' //工单状态
-				},
-				keyword: '',
-				closeShow: false,
-				reminderShow: false,
-				reasonList: ['错误告警','设备已自动恢复','不需要上门解决','平台移桩,可忽视','其他'],
-				current: 0
-			}
-		},
-		onLoad() {
-			this.getQueryMy();
-		},
-		onReachBottom() {
-			if (this.workOrderList.length < this.recordsTotal) {
-				this.myLoadmore();
-			}
-		},
-		methods: {
-			//打开关闭原因
-			closePopupShow(item) {
-				this.closeShow = true;
-				this.workOrderId = item.id;
-			},
-			//催单
-			reminderClick() {
-				this.reminderShow = false;
-			},
-			//搜索
-			searchWorkOrder() {
-				this.getQueryMy(true);
-			},
-			//分类
-			classificationClick(item,index) {
-				this.classificationIndex = index;
-				this.queryForm.status = item.value;
-				
-				this.getQueryMy(true);
-			},
-			myLoadmore() {
-				this.queryForm.pageIndex += 1;
-				this.getAbnormalAlarmRecord();
-			},
-			getQueryMy(bl) {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				if (bl) {
-					this.workOrderList = [];
-					this.queryForm.pageIndex = 1;
-				}
-				API_workOrder.queryMy(this.queryForm).then((res) => {
-					uni.hideLoading();
-					this.workOrderList = [
-						...this.workOrderList,
-						...res.data.data
-					];
-					this.recordsTotal = res.data.recordsTotal;
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			//选择关闭原因
-			reasonClick(item,index) {
-				this.current = index;
-				this.closeReason = item;
-			},
-			//关闭工单
-			closeWorkOrder() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				API_workOrder.usClose({
-					id: this.workOrderId,
-					closeReason: this.closeReason
-				}).then((res) => {
-					uni.hideLoading();
-					this.closeShow = false;
-					uni.navigateTo({
-						url: '/pages/workOrderManagement/workOrderDetails?id='+this.workOrderId
-					})
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			toWorkOrderMap() {
-				uni.navigateTo({
-					url: '/pages/workOrderManagement/workOrderMap'
-				})
-			},
-			toWorkOrderStatistics() {
-				uni.navigateTo({
-					url: '/pages/workOrderManagement/workOrderStatistics'
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.navbar-c {
-		.back {
-			z-index: 999;
-			width: 200rpx;
-		}
-		.right {
-			z-index: 999;
-			// width: 200rpx;
-		}
-	}
-
-	
-
-	// 搜索
-	.search-box {
-		padding: 16rpx 32rpx;
-		position: sticky;
-		top: 88rpx;
-		z-index: 999;
-		background-color: #F2F4F6;
-
-		/deep/.u-content {
-			border-radius: 8px !important;
-		}
-
-		;
-
-		/deep/.u-search {
-			position: relative
-		}
-
-		;
-
-		/deep/.u-action {
-			width: 96rpx;
-			line-height: 56rpx;
-			border-radius: 4px;
-			background-color: rgba(22, 119, 255, 1);
-			color: rgba(255, 255, 255, 1);
-			text-align: center;
-			z-index: 9999;
-			position: absolute;
-			right: 12rpx;
-		}
-	}
-
-	// 我的工单
-	.my-work-order {
-
-		.title {
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			padding: 16rpx 32rpx;
-
-			.name {
-				display: flex;
-				align-items: center;
-				color: rgba(16, 16, 16, 1);
-				font-size: 36rpx;
-				font-weight: bold;
-
-				.icon {
-					width: 36rpx;
-					height: 36rpx;
-					border-radius: 4px;
-					background-color: rgba(22, 119, 255, 1);
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					margin-right: 12rpx;
-
-					.img {
-						width: 28rpx;
-						height: 28rpx;
-
-					}
-				}
-			}
-
-			.more {
-				color: #777777;
-				font-size: 32rpx;
-			}
-		}
-
-		// 分类
-		.classify {
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			padding: 0 32rpx;
-			margin-top: 8rpx;
-
-			.item {
-				width: 160rpx;
-				line-height: 72rpx;
-				border-radius: 8px;
-				background-color: rgba(255, 255, 255, 1);
-				border: 1px solid rgba(22, 119, 255, 1);
-				text-align: center;
-				color: rgba(22, 119, 255, 1);
-				font-weight: bold;
-				overflow: hidden;
-			}
-
-			.item-checked {
-				background: linear-gradient(180deg, rgba(78, 141, 246, 1) 0%, rgba(22, 119, 255, 1) 100%);
-				color: #fff;
-				position: relative;
-
-				.checked-circle {
-					width: 20rpx;
-					height: 20rpx;
-					background-color: rgba(255, 150, 0, 1);
-					border-radius: 999px;
-					position: absolute;
-					bottom: -10rpx;
-					left: 50%;
-					transform: translateX(-50%);
-				}
-			}
-		}
-
-		// 工单详情
-		.work-order {
-			border-radius: 8px;
-			background-color: rgba(255, 255, 255, 1);
-			margin: 24rpx 32rpx;
-			padding: 32rpx 24rpx 0;
-			position: relative;
-
-			// 紧急
-			.urgency {
-				width: 120rpx;
-				line-height: 56rpx;
-				border-radius: 0px 8px 0px 8px;
-				color: rgba(255, 255, 255, 1);
-				font-size: 32rpx;
-				text-align: center;
-				background: linear-gradient(180deg, rgba(255, 79, 63, 1) 0%, rgba(255, 124, 112, 1) 100%);
-				position: absolute;
-				top: 0;
-				right: 0;
-
-			}
-
-			.order-item {
-				display: flex;
-				align-items: center;
-				margin-bottom: 16rpx;
-
-				.item-icon {
-					.img {
-						width: 40rpx;
-						height: 40rpx;
-						vertical-align: middle;
-					}
-				}
-
-				.item-value {
-					color: rgba(51, 51, 51, 1);
-					font-size: 32rpx;
-					margin-left: 16rpx;
-				}
-
-				.value-bold {
-					font-weight: bold;
-				}
-			}
-		}
-
-		// 按钮
-		.button {
-			margin-top: 32rpx;
-			border-top: 1px solid rgba(232, 232, 232, 1);
-			padding: 20rpx 0;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-
-			.state {
-				color: rgba(255, 123, 0, 1);
-			}
-
-			.state2 {
-				color: rgba(22, 119, 255, 1);
-			}
-
-			.state3 {
-				color: rgba(0, 185, 98, 1);
-			}
-
-			.state4 {
-				color: rgba(119, 119, 119, 1);
-			}
-
-			.btn {
-				display: flex;
-
-				.close {
-					border: 1px solid rgba(187, 187, 187, 1);
-					width: 144rpx;
-					height: 64rpx;
-					line-height: 64rpx;
-					border-radius: 4px;
-					background-color: rgba(255, 255, 255, 1);
-					color: rgba(119, 119, 119, 1);
-					margin-right: 24rpx;
-					font-size: 28rpx
-				}
-
-				.reminder,
-				.resolved {
-					width: 144rpx;
-					height: 64rpx;
-					line-height: 64rpx;
-					border-radius: 4px;
-					color: rgba(255, 255, 255, 1);
-					background-color: rgba(22, 119, 255, 1);
-					font-size: 28rpx
-				}
-
-				.resolved {
-					width: 176rpx;
-				}
-
-				.view {
-					width: 176rpx;
-					height: 64rpx;
-					line-height: 64rpx;
-					border-radius: 4px;
-					background-color: rgba(255, 255, 255, 1);
-					color: rgba(119, 119, 119, 1);
-					font-size: 28rpx;
-					border: 1px solid rgba(187, 187, 187, 1);
-				}
-			}
-		}
-
-	}
-
-	//关闭原因
-	.close-reason {
-		padding: 32rpx;
-
-		.title {
-			color: rgba(16, 16, 16, 1);
-			font-size: 36rpx;
-			font-weight: bold;
-		}
-
-		.reason-content {
-			margin-top: 60rpx;
-
-			.reason-item {
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-				margin-bottom: 56rpx;
-
-				.item-title {
-					color: rgba(16, 16, 16, 1);
-					font-size: 32rpx;
-				}
-			}
-		}
-
-		.button-box {
-			display: flex;
-
-			.think {
-				width: 328rpx;
-
-				line-height: 80rpx;
-				font-size: 32rpx;
-				border-radius: 4px;
-				background-color: rgba(222, 225, 228, 1);
-				color: rgba(51, 51, 51, 1);
-
-			}
-
-			.confirm {
-				width: 328rpx;
-
-				line-height: 80rpx;
-				font-size: 32rpx;
-				border-radius: 4px;
-				background-color: rgba(255, 68, 68, 1);
-				color: rgba(255, 255, 255, 1);
-			}
-		}
-	}
-
-	// 催单
-	.reminder-content {
-		padding: 32rpx;
-		text-align: center;
-
-		.title {
-			color: rgba(16, 16, 16, 1);
-			font-size: 36rpx;
-			font-weight: bold;
-		}
-
-		.content {
-			color: rgba(16, 16, 16, 1);
-			font-size: 32rpx;
-			margin-top: 40rpx;
-		}
-
-		.know {
-			width: 100%;
-			line-height: 80rpx;
-			border-radius: 4px;
-			background-color: rgba(22, 119, 255, 1);
-			color: rgba(255, 255, 255, 1);
-			font-size: 32rpx;
-			margin-top: 84rpx;
-		}
-	}
-</style>

+ 0 - 351
pages/test/workOrderManagement/workOrderMap.vue

@@ -1,351 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="工单地图" title-color="#101010">
-
-		</u-navbar>
-		<view class="tabs">
-			<u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
-		</view>
-		<!-- 地图 -->
-		<view class="map">
-			<image class="map-img" src="@/assets/img/map.png" mode=""></image>
-			<!-- 标注1 -->
-			<view class="location1">
-				<image class="img" src="@/assets/img/riFill-cloud-off-fill1.svg" mode=""></image>
-				<view class="corner">
-
-				</view>
-			</view>
-			<!-- 标注2 -->
-			<view class="location2">
-				<view class="icon2-left">
-					<image class="img1" src="@/assets/img/riFill-temp-cold-fill1.svg" mode=""></image>
-				</view>
-				<view class="icon2-right">
-					
-					<view class="corner2-top">
-						荆鹏软件园01
-					</view>
-					<view class="corner2-bottom">
-						温度异常
-					</view>
-				</view>
-				<view class="corner2"></view>
-			</view>
-			<view class="card">
-				<view class="item">
-					<view class="title">
-						<view class="icon-box">
-							<image class="img" src="@/assets/img/riFill-temp-cold-fill1.svg" mode=""></image>
-						</view>
-						<view class="equipment">
-							<view class="name1">
-								荆鹏软件园01
-							</view>
-							<view class="name2">
-								荆鹏集团
-							</view>
-						</view>
-						<!-- 状态 -->
-						<view class="state">
-
-							<view class="icon ">
-
-							</view>
-							<view class="text">
-								温度异常
-							</view>
-
-
-						</view>
-					</view>
-					<!-- 其他信息 -->
-					<view class="else-infos">
-						<view class="infos">
-							<view class="infos-item">
-								<view class="item-icon">
-									<image class="icon-img" src="@/assets/img/riLine-map-pin-line 1.svg" mode=""></image>
-								</view>
-								<view class="item-value">
-									荆州市沙市区江津东路155号荆鹏软件园
-								</view>
-							</view>
-							<view class="infos-item">
-								<view class="item-icon">
-									<image class="icon-img" src="@/assets/img/riLine-map-pin-line 1.svg" mode=""></image>
-								</view>
-								<view class="item-value">
-									2024-02-24 12:00:00
-								</view>
-							</view>
-						</view>
-						<view class="navigation">
-							导航
-							<view class="icon">
-								<image class="navigation-img" src="@/assets/img/riFill-navigation-fill 1.svg" mode=""></image>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				list: [{
-					name: '全部'
-				}, {
-					name: '待指派(1)'
-				}, {
-					name: '进行中(2)',
-
-				}, {
-					name: '已解决(3)',
-
-				}],
-				current: 0
-			}
-		},
-		methods: {
-			toDataMonitoringList() {
-				uni.navigateBack()
-			},
-			change(index) {
-				this.current = index;
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.tabs {
-		background-color: #fff;
-		height: 96rpx;
-		position: sticky;
-		top: 88rpx;
-		z-index: 999;
-	}
-
-	// 地图
-	.map {
-		position: relative;
-
-		.map-img {
-			width: 100%;
-			height: 100vh;
-		}
-
-		.location1 {
-			width: 36px;
-			height: 36px;
-
-			text-align: center;
-			border: 2px solid rgba(22, 119, 255, 1);
-			border-radius: 999px;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			position: absolute;
-			top: 89px;
-			left: 38px;
-
-			.img {
-				width: 40rpx;
-				height: 40rpx;
-			}
-
-			.corner {
-				width: 0;
-				height: 0;
-				position: absolute;
-				top: 34px;
-				left: 0;
-				right: 0;
-				margin: auto;
-				border-bottom: 8rpx solid transparent;
-				border-left: 8rpx solid transparent;
-				border-right: 8rpx solid transparent;
-				border-top: 12rpx solid rgba(22, 119, 255, 1);
-			}
-		}
-
-		.location2 {
-			width: 280rpx;
-			border-radius: 50px;
-			background-color: rgba(22, 119, 255, 1);
-			display: flex;
-			position: absolute;
-			top: 370rpx;
-			left: 280rpx;
-            
-			.icon2-left {
-				width: 72rpx;
-				height: 72rpx;
-				line-height: 72rpx;
-				text-align: center;
-				border: 1px solid rgba(0, 185, 98, 100);
-				border-radius: 999px;
-				background-color: #fff;
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				
-               
-				.img1 {
-					width: 40rpx;
-					height: 40rpx;
-				}
-			}
-
-			.icon2-right {
-				color: #ffffff;
-				line-height: 36rpx;
-				padding-left: 8rpx;
-				font-size: 28rpx;
-                
-				.corner2-top {
-					font-weight: bold;
-				}
-
-				.corner2-bottom {
-					font-size: 24rpx;
-
-					.img2 {
-						width: 24rpx;
-						height: 24rpx;
-					}
-				}
-			}
-
-			.corner2 {
-				width: 0;
-				height: 0;
-				position: absolute;
-				top: 72rpx;
-				left: 0;
-				right: 0;
-				margin: auto;
-				border-bottom: 6px solid transparent;
-				border-left: 6px solid transparent;
-				border-right: 6px solid transparent;
-				border-top: 8px solid rgba(22, 119, 255, 1);
-
-			}
-		}
-
-		// 卡片
-		.card {
-			border-radius: 8px;
-			border: 1px solid rgba(232, 232, 232, 1);
-			box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
-			background-color: rgba(255, 255, 255, 1);
-			position: fixed;
-			left: 24rpx;
-			right: 24rpx;
-			bottom: 32rpx;
-
-			.item {
-				border-bottom: 1px solid rgba(245, 245, 245, 1);
-				padding: 32rpx 16rpx 16rpx 16rpx;
-
-				.title {
-					display: flex;
-					align-items: flex-start;
-
-					.icon-box {
-						width: 72rpx;
-						height: 72rpx;
-						border-radius: 4px;
-						display: flex;
-						align-items: center;
-						justify-content: center;
-						background-color: rgba(219, 234, 255, 1);
-
-						.img {
-							width: 48rpx;
-							height: 48rpx;
-						}
-					}
-
-					.equipment {
-						margin-left: 16rpx;
-
-						.name1 {
-							color: rgba(51, 51, 51, 1);
-						}
-
-						.name2 {
-							color: rgba(119, 119, 119, 1);
-							font-size: 24rpx;
-							margin-top: 4rpx;
-						}
-					}
-
-					// 状态
-					.state {
-						display: flex;
-						align-items: center;
-						margin-left: auto;
-
-						.icon {
-							width: 8px;
-							height: 8px;
-							background-color: rgba(22, 119, 255, 1);
-							border-radius: 999px;
-						}
-
-						.text {
-							color: rgba(51, 51, 51, 1);
-							margin-left: 8rpx;
-							font-weight: bold;
-						}
-					}
-				}
-
-				// 其他信息
-				.else-infos {
-					display: flex;
-					justify-content: space-between;
-					align-items: baseline;
-					margin-top: 16rpx;
-
-					.infos {
-						color: rgba(119,119,119,1);
-						font-size: 24rpx;
-						.infos-item {
-							display: flex;
-							align-items: center;
-                            margin-bottom: 8rpx;
-							.item-icon {
-								display: flex;
-								align-items: center;
-								.icon-img {
-									width: 28rpx;
-									height: 28rpx;
-									
-								}
-							}
-						}
-					}
-					.navigation{
-						color: #333333;
-						display: flex;
-						align-items: center;
-						.navigation-img{
-							width: 28rpx;
-							height: 28rpx;
-							vertical-align: middle;
-							margin-left: 8rpx;
-							 transform: scaleX(-1);
-						}
-					}
-				}
-
-			}
-		}
-	}
-</style>

+ 0 - 510
pages/test/workOrderManagement/workOrderStatistics.vue

@@ -1,510 +0,0 @@
-<template>
-	<view>
-		<u-navbar title="工单统计" title-color="#fff" :background="background" back-icon-color="#ffffff"></u-navbar>
-
-		<view class="main">
-			<!-- 标签 -->
-			<view class="tabs">
-				<view class="tabs-item" v-for="(item,index) in tabsList" :key="index"
-					:class="tabsIndex==index ? 'item-checked' : ''" @click="tabsClick(item,index)">
-					{{item}}
-				</view>
-			</view>
-			
-			<!-- 日期范围 -->
-			<view class="example-body" v-if="show">
-				<uni-datetime-picker v-model="range" type="daterange" @maskClick="maskClick" @change="dateChange" />
-			</view>
-			
-			<!-- 数据统计 -->
-			<view class="data-statistics">
-				<view class="title">
-					数据统计
-				</view>
-				<view class="state">
-					<view class="state-item state1">
-						<view class="state-classify">
-							待指派
-						</view>
-						<view class="state-number">
-							{{createdNum}}
-						</view>
-					</view>
-					<view class="state-item state2">
-						<view class="state-classify">
-							进行中
-						</view>
-						<view class="state-number">
-							{{dispatchedNum}}
-						</view>
-					</view>
-					<view class="state-item state3">
-						<view class="state-classify">
-							已解决
-						</view>
-						<view class="state-number">
-							{{endedNum}}
-						</view>
-					</view>
-					<view class="state-item state4">
-						<view class="state-classify">
-							已关闭
-						</view>
-						<view class="state-number">
-							{{closedNum}}
-						</view>
-					</view>
-				</view>
-			</view>
-			<!-- 工单状态 -->
-			<view class="workOrder-state">
-				<view class="title">
-					工单状态
-				</view>
-				<view class="progress">
-					<view class="progress-item">
-						<view class="circle-progress">
-							<u-circle-progress active-color="#FF7B00" width="136" :percent="createdPercent">
-								<view class="u-progress-content">
-
-									<text class='u-progress-info1'>{{createdPercent}}%</text>
-								</view>
-							</u-circle-progress>
-						</view>
-						<view class="state">
-							待指派
-						</view>
-					</view>
-					<view class="progress-item">
-						<view class="circle-progress">
-							<u-circle-progress active-color="#008FA9" width="136" :percent="dispatchedPercent">
-								<view class="u-progress-content">
-
-									<text class='u-progress-info2'>{{dispatchedPercent}}%</text>
-								</view>
-							</u-circle-progress>
-						</view>
-						<view class="state">
-							进行中
-						</view>
-					</view>
-					<view class="progress-item">
-						<view class="circle-progress">
-							<u-circle-progress active-color="#18C272" width="136" :percent="endedPercent">
-								<view class="u-progress-content">
-
-									<text class='u-progress-info3'>{{endedPercent}}%</text>
-								</view>
-							</u-circle-progress>
-						</view>
-						<view class="state">
-							已解决
-						</view>
-					</view>
-				</view>
-			</view>
-
-		</view>
-		<!-- 每月工单数量 -->
-		<view class="workOrder-amount">
-			<view class="title">
-				每月工单数量
-			</view>
-			<view class="chat">
-				<view id="barEcharts" style="min-height:692rpx;">
-
-				</view>
-				<!-- <image class="chat-img" src="@/assets/img/AUgyKM0@1x2.png" mode=""></image> -->
-
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import * as echarts from 'echarts';
-	import {
-		parseUnixTime,
-		beforeTimeStamp,
-		getWeek
-	} from '@/apis/utils'
-	import * as API_workOrder from '@/apis/pagejs/workOrder.js'
-
-	export default {
-		data() {
-			return {
-				range: [],
-				createdPercent: 0,
-				dispatchedPercent: 0,
-				endedPercent: 0,
-				createdNum: 0, //待指派
-				dispatchedNum: 0, //进行中
-				endedNum: 0, //已解决
-				closedNum: 0, //已关闭
-				workForm: {
-					qkey: '',
-					startDate: '',
-					endDate: ''
-				}, //工单数据查询
-				today: '', //当天
-				weekStart: '', //一周
-				weekEnd: '',
-				monthStart: '', //一月
-				monthEnd: '',
-				show: false,
-				tabsList: ['当天','一周','一月','自定义'], //时间标签list
-				tabsIndex: 0,
-				myChart: null,
-				background: {
-					backgroundColor: '#1677FF'
-				}
-			}
-		},
-		onLoad() {
-			this.today = parseUnixTime(new Date(), '{y}-{m}-{d}');
-			
-			const today = new Date();
-			const firstDay = new Date(today.setDate(today.getDate() - today.getDay() + 1));
-			const lastDay = new Date(today.setDate(today.getDate() - today.getDay() + 7));
-			this.weekStart = parseUnixTime(firstDay, '{y}-{m}-{d}');
-			this.weekEnd = parseUnixTime(lastDay, '{y}-{m}-{d}');
-			
-			const start = new Date(today.getFullYear(), today.getMonth(), 1);
-			const end = new Date(today.getFullYear(), today.getMonth() + 1, 0);
-			this.monthStart = parseUnixTime(start, '{y}-{m}-{d}');
-			this.monthEnd = parseUnixTime(end, '{y}-{m}-{d}');
-			console.log('当天:'+this.today+'\n'+'一周:'+this.weekStart+'至'+this.weekEnd+'\n'
-				+'一月:'+this.monthStart+'至'+this.monthEnd)
-				
-			this.workForm.startDate = this.today;
-			this.workForm.endDate = this.today;
-			this.getRptByStatus();
-		},
-		onReady() {
-			this.getBarCharts();
-		},
-		watch: {
-			range(newval) {
-				// console.log('范围选:', this.range);
-			}
-		},
-		methods: {
-			dateChange(e) {
-				// console.log(e);
-				if(e.length != 0) {
-					this.workForm.startDate = e[0];
-					this.workForm.endDate = e[1];
-					this.getRptByStatus();
-				}
-			},
-			maskClick(e){
-				// console.log('maskClick事件:', e);
-			},
-			getRptByStatus() {
-				this.createdNum = 0;
-				this.dispatchedNum = 0;
-				this.endedNum = 0;
-				this.closedNum = 0;
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				API_workOrder.rptByStatus(this.workForm).then((res) => {
-					uni.hideLoading();
-					var list = res.data;
-					if(list != null) {
-						for (var i = 0; i < list.length; i++) {
-							if(list[i].status == 'created') {
-								this.createdNum = list[i].rpt_count;
-							}
-							if (list[i].status == 'dispatched') {
-								this.dispatchedNum = list[i].rpt_count;
-							}
-							if (list[i].status == 'ended') {
-								this.endedNum = list[i].rpt_count;
-							}
-							if (list[i].status == 'closed') {
-								this.closedNum = list[i].rpt_count;
-							}
-						}
-					}
-					
-					var num = this.createdNum + this.dispatchedNum + this.endedNum;
-					if(this.createdNum != 0) {
-						this.createdPercent = this.createdNum/num*100;
-					} else {
-						this.createdPercent = 0;
-					}
-					if(this.dispatchedNum != 0) {
-						this.dispatchedPercent = this.dispatchedNum/num*100;
-					} else {
-						this.dispatchedPercent = 0;
-					}
-					if(this.endedNum != 0) {
-						this.endedPercent = this.endedNum/num*100;
-					} else {
-						this.endedPercent = 0;
-					}
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			},
-			//选择时间
-			tabsClick(item,index) {
-				this.tabsIndex = index;
-				if(index != 3) {
-					this.show = false;
-					
-					if(index == 0) {
-						this.workForm.startDate = this.today;
-						this.workForm.endDate = this.today;
-					} else if(index == 1) {
-						this.workForm.startDate = this.weekStart;
-						this.workForm.endDate = this.weekEnd;
-					} else {
-						this.workForm.startDate = this.monthStart;
-						this.workForm.endDate = this.monthEnd;
-					}
-					this.getRptByStatus();
-				} else {
-					this.show = true;
-				}
-			},
-			//每月工单数量图
-			getBarCharts(list) {
-				if (!this.myChart) {
-					this.myChart = echarts.init(document.getElementById('barEcharts'), null, {
-						width: uni.upx2px(700),
-						height: uni.upx2px(692)
-					});
-				}
-				this.myChart.clear();
-
-				var data1 = ['1月','2月','3月','4月','5月','6月'];
-				var dataX = [2,1,0,1,3,0];
-				var dataC = [3,1,1,0,2,1];
-				var dataS = [5,2,1,1,5,1];
-				
-				var option = {
-					tooltip: {
-						trigger: 'axis',
-						axisPointer: {
-							type: 'shadow'
-						}
-					},
-					legend: {},
-					grid: {
-						top: '6%',
-						left: '3%',
-						right: '8%',
-						bottom: '8%',
-						containLabel: true
-					},
-					xAxis: {
-						type: 'value'
-					},
-					yAxis: {
-						type: 'category',
-						data: data1
-					},
-					barGap: '0',
-					series: [{
-							name: '新增工单',
-							type: 'bar',
-							data: dataX,
-							itemStyle: {
-								color: '#91cc75'
-							}
-						},
-						{
-							name: '处理工单',
-							type: 'bar',
-							data: dataC,
-							itemStyle: {
-								color: '#5470c6'
-							}
-						},
-						{
-							name: '剩余工单',
-							type: 'bar',
-							data: dataS,
-							itemStyle: {
-								color: '#fac858'
-							}
-						}
-					]
-				}
-				console.log(option)
-				this.myChart.setOption(option);
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	
-
-	/deep/.uicon-nav-back {
-		color: #FFF !important;
-
-	}
-
-	.main {
-		background: linear-gradient(180deg, rgba(22, 119, 255, 1) 0%, rgba(22, 119, 255, 0) 100%);
-		height: 720rpx;
-
-		// 标签
-		.tabs {
-			display: flex;
-			justify-content: space-between;
-			padding: 24rpx 32rpx;
-
-			.tabs-item {
-				width: 144rpx;
-				line-height: 56rpx;
-				text-align: center;
-				color: rgba(255, 255, 255, 0.6);
-			}
-
-			.item-checked {
-				border: 1px solid rgba(255, 255, 255, 1);
-				color: rgba(255, 255, 255, 1);
-				border-radius: 50px;
-			}
-		}
-
-		// 数据统计
-		.data-statistics {
-			margin: 24rpx 32rpx;
-			border-radius: 8px;
-			background-color: rgba(255, 255, 255, 1);
-			padding: 24rpx;
-
-			.title {
-				color: rgba(16, 16, 16, 1);
-				font-size: 36rpx;
-				font-weight: bold;
-			}
-
-			.state {
-				display: flex;
-				justify-content: space-between;
-				margin-top: 24rpx;
-
-				.state-item {
-					width: 144rpx;
-					height: 144rpx;
-					border-radius: 8px;
-					color: rgba(255, 255, 255, 1);
-					text-align: center;
-					padding: 24rpx;
-					font-weight: bold;
-
-					.state-classify {
-
-						font-size: 32rpx;
-					}
-
-					.state-number {
-						margin-top: 8rpx;
-						font-size: 40rpx;
-					}
-				}
-
-				.state1 {
-					background: linear-gradient(180deg, rgba(255, 174, 0, 1) 0%, rgba(255, 123, 0, 1) 100%);
-				}
-
-				.state2 {
-					background: linear-gradient(178.54deg, rgba(50, 204, 213, 1) 0%, rgba(0, 143, 169, 1) 99.73%);
-				}
-
-				.state3 {
-					background: linear-gradient(180deg, rgba(24, 194, 114, 1) 0%, rgba(0, 148, 79, 1) 100%);
-				}
-
-				.state4 {
-					background: linear-gradient(180deg, rgba(187, 187, 187, 1) 0%, rgba(153, 153, 153, 1) 100%);
-				}
-			}
-		}
-
-		// 工单状态
-		.workOrder-state {
-			border-radius: 8px;
-			background-color: rgba(255, 255, 255, 1);
-			margin: 24rpx 32rpx;
-			padding: 24rpx;
-
-			.title {
-				color: rgba(16, 16, 16, 1);
-				font-size: 36rpx;
-				font-weight: bold;
-			}
-
-			.progress {
-				display: flex;
-				justify-content: space-between;
-				margin-top: 24rpx;
-
-				.progress-item {
-					text-align: center;
-
-					.state {
-						color: rgba(51, 51, 51, 1);
-						margin-top: 16rpx;
-					}
-				}
-
-				.u-progress-info1 {
-					color: #FF7B00;
-
-					font-weight: bold;
-				}
-
-				.u-progress-info2 {
-					color: #008FA9;
-
-					font-weight: bold;
-				}
-
-				.u-progress-info3 {
-					color: #18C272;
-
-					font-weight: bold;
-				}
-			}
-		}
-
-
-	}
-
-	// 每月工单数量
-	.workOrder-amount {
-		border-radius: 8px;
-		background-color: rgba(255, 255, 255, 1);
-		margin: 24rpx 32rpx;
-		padding: 24rpx 0;
-
-		.title {
-			color: rgba(16, 16, 16, 1);
-			font-size: 36rpx;
-			font-weight: bold;
-			padding: 0 24rpx;
-		}
-
-		.chat {
-			width: 100%;
-			height: 692rpx;
-			margin-top: 54rpx;
-
-			.chat-img {
-				width: 100%;
-				height: 100%;
-			}
-		}
-	}
-</style>