瀏覽代碼

接口调试

lilei 4 年之前
父節點
當前提交
2bcf97f22f

+ 4 - 2
api/checkTaskConfig.js

@@ -3,7 +3,8 @@ import axios from '@/libs/axios.js'
 export const getCheckTaskConfigList = params => {
   return axios.request({
     url: `checkTaskConfig/query/${params.pageNo}/${params.pageSize}`,
-    method: 'post'
+    method: 'post',
+	data: params
   })
 }
 // 点检配置删除
@@ -31,6 +32,7 @@ export const getCheckTaskConfig = params => {
 export const saveBackLog = params => {
   return axios.request({
     url: `checkTaskConfig/save`,
-    method: 'post'
+    method: 'post',
+	data: params
   })
 }

+ 15 - 1
api/store.js

@@ -10,7 +10,21 @@ export const findStoreList = param => {
 // 查询门店摄像头流列表
 export const findVsDeviceChannels = param => {
   return axios.request({
-    url: `store/findVsDeviceChannels/${param.storeId}`,
+    url: `vs/device/channels/${param.deviceId}`,
+    method: 'get',
+  })
+}
+// 拍照截图vs/stream/url/{streamId}/{outProtocol}
+export const photoPaiZhao = param => {
+  return axios.request({
+    url: `vs/stream/streamSnapshot/${param.streamId}`,
+    method: 'get',
+  })
+}
+// 获取播放地址
+export const getVideoUrl = param => {
+  return axios.request({
+    url: `vs/stream/url/${param.streamId}/${param.outProtocol}`,
     method: 'get',
   })
 }

+ 3 - 2
api/task.js

@@ -39,8 +39,9 @@ export const getTaskList = params => {
 // 查询门店当前任务是否进行
 export const queryCurrentTaskUsing = params => {
   return axios.request({
-    url: `task/queryCurrentTask/${params.storeId}`,
-    method: 'get'
+    url: `task/queryCurrentTask`,
+    method: 'post',
+	data: params
   })
 }
 // 我的巡店列表

+ 1 - 2
hybrid/html/video.html

@@ -17,8 +17,7 @@
 		<link rel="stylesheet" href="aliplayer/aliplayer-min.css" />
 		<script type="text/javascript" charset="utf-8" src="aliplayer/aliplayer-h5-min.js"></script>
 		<!-- 页面样式 -->
-		<link rel="stylesheet/less" type="text/css" href="css/styles.less" />
-		<script src="js/less.min.js"></script>
+		<link rel="stylesheet" href="css/styles.css" />
 	</head>
 	<body>
 		<div class="storeCheck" id="app">

+ 12 - 4
pages.json

@@ -170,12 +170,20 @@
 		{
 			"path": "pages/spotCheckConfigure/spotCheckList",
 			"style": {
-				"navigationStyle": "custom", //  是否显示导航栏  default显示,custom不显示
 				"navigationBarTitleText": "点检任务配置",
 				"app-plus": {
-					"titleView": false,
-					// 将回弹属性关掉
-					"bounce": "none"
+					"scrollIndicator": "none",
+					"titleNView": {
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue610 新增", //原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听
+								"fontSize": 16,
+								"color": "#eee",
+								"width": "90px",
+								"fontSrc": "/static/iconfont/iconfont.ttf"
+							}
+						]
+					}
 				}
 			}
 		},

+ 2 - 1
pages/shopTour/shopTour.vue

@@ -9,7 +9,7 @@
 	import {taskStart,submitTask,updateTaskItem,getTaskDetail} from '@/api/task'
 	import {getTaskItem,delTaskItem} from '@/api/taskItem'
 	import {taskTargetSave,taskCommentsSave} from '@/api/taskTarget'
-	import {findVsDeviceChannels} from '@/api/store'
+	import {findVsDeviceChannels,photoPaiZhao,getVideoUrl} from '@/api/store'
 	export default {
 		data() {
 			return {
@@ -199,6 +199,7 @@
 			// 获取视频列表
 			getVideoList(){
 				findVsDeviceChannels({storeId:this.storeId}).then(res=>{
+					console.log(res,'----')
 					if(res.status==200){
 						this.wv.evalJS("vm.setVideoList('"+JSON.stringify(res.data)+"')")
 					}

+ 11 - 63
pages/spotCheckConfigure/addSpotCheck.vue

@@ -4,22 +4,14 @@
 			<u-form :model="form" ref="uForm">
 				<u-form-item label="任务名称" label-width="160rpx" prop="name"><u-input v-model="form.name" maxlength="30" /></u-form-item>
 				<u-form-item label="任务周期" v-model="form.cycleType" label-width="160rpx" prop="cycleType">
-					<v-select ref="cycleType" code="BUSINESS_EXPERIRENCE_CONTENT_CLS" placeholder="请选择任务周期" v-model="form.cycleType"></v-select>
+					<v-select ref="cycleType" code="TASK_CONFIG_CYCLE_TYPE" placeholder="请选择任务周期" v-model="form.cycleType"></v-select>
 				</u-form-item>
-				<u-form-item label="执行日期" label-width="160rpx" prop="buildTime">
-					<view style="width: 100%;" @tap="choosePartMark">
-						<input v-show="markArr && markArr.length == 0" disabled placeholder-class="form-input-placeholder" placeholder="请选择执行日期" />
-						<u-tag
-							v-show="markArr && markArr.length != 0"
-							v-for="(item, index) in markArr"
-							:key="item.id"
-							:text="item.name"
-							size="mini"
-							style="margin: 6upx 0 6upx 6upx;"
-						/>
-					</view>
-					<!-- <view @click="onShowPickerBegin('date')" style="color: rgb(192,196,204);">{{date ? date : '请选择执行日期'}}</view>
-					<mx-date-picker class="beginTime" :show="showPickerBegin" :type="type" :value="form.beginTime" :show-tips="true"  @confirm="onSelectedBegin" @cancel="onSelectedBegin"/> -->
+				<u-form-item label="执行日期" v-if="form.cycleType=='DAY'" label-width="160rpx" prop="buildDateDay">
+					 <u-input v-model="form.buildDateDay" @click="showBuildDateDay=true" placeholder="请选择执行时间" type="select"/>
+					 <u-picker v-model="showBuildDateDay" @confirm="confirmBuildDateDay" mode="time" :default-time="form.buildDateDay"></u-picker>
+				</u-form-item>
+				<u-form-item label="执行日期" v-if="form.cycleType=='WEEK'" label-width="160rpx" prop="buildDateWeek">
+					<v-select ref="cycleType" code="WEEK" placeholder="请选择周几" v-model="form.buildDateWeek"></v-select>
 				</u-form-item>
 				<u-form-item label="执行时间" label-width="160rpx" prop="zxTime">
 					<view @click="onShowPickerTime('time')" style="color: rgb(192,196,204);">{{ time ? time : '请选择执行时间' }}</view>
@@ -88,6 +80,7 @@ export default {
 		// 	format: true
 		// })
 		return {
+			showBuildDateDay: false, // 执行日期
 			showPickerBegin: false, // 默认是否显示开始日期的日期组件
 			showPickerEnd: false, // 默认是否显示结束日期的日期组件
 			showPickerTime: false, // 默认是否显示时间的时间组件
@@ -106,9 +99,6 @@ export default {
 				storeList: '', // 考评门店
 				effectiveDay: '' // 任务有效天数
 			},
-			markList: [], //  配件标签数据列表
-			markArr: [], //  配件标签  已选 数据
-			isPartMark: false,
 			rules: {
 				name: [{ required: true, message: '请输入名称30个字以内', trigger: 'blur' }],
 				cycleType: [{ required: true, message: '请选择任务周期', trigger: 'blur' }],
@@ -121,19 +111,8 @@ export default {
 				storeList: [{ required: true, message: '请选择考评门店', trigger: 'blur' }],
 				effectiveDay: [{ required: true, message: '请输入任务有效天数', trigger: 'blur' }]
 			}
-			// // date: currentDate,
-			// dateMode: 'date',
-			// dateShow: false,
 		};
 	},
-	// computed: {
-	//         startDate() {
-	//             return this.getDate('start');
-	//         },
-	//         endDate() {
-	//             return this.getDate('end');
-	//         }
-	//     },
 	onReady() {
 		this.$refs.uForm.setRules(this.rules);
 		// 检测选择的考评指标
@@ -151,6 +130,9 @@ export default {
 		uni.$off('selKpStores')
 	},
 	methods: {
+		confirmBuildDateDay(val){
+			this.form.buildDateDay = val.year +"-"+ val.month +"-"+ val.day
+		},
 		//  显示开始日期选择
 		onShowPickerBegin(type) {
 			this.type = type;
@@ -194,40 +176,6 @@ export default {
 				this[this.type] = e.value;
 			}
 		},
-		// 		dateChange(e){
-		// 			this.form.entryDate = e.result
-		// 		},
-		// 		confirm(e){
-		// 			console.log(e)
-		// 		},
-		// 		openSeleteType(){
-		// 			this.show=true
-		// 		},
-		// 		bindDateChange: function(e) {
-		// 			this.date = e.target.value
-		// 		},
-		// 		getDate(type) {
-		// 			const date = new Date();
-		// 			let year = date.getFullYear();
-		// 			let month = date.getMonth() + 1;
-		// 			let day = date.getDate();
-
-		// 			if (type === 'start') {
-		// 				year = year - 60;
-		// 			} else if (type === 'end') {
-		// 				year = year + 2;
-		// 			}
-		// 			month = month > 9 ? month : '0' + month;;
-		// 			day = day > 9 ? day : '0' + day;
-		// 			return `${year}-${month}-${day}`;
-		// 		},
-		//  选择配件标签
-		choosePartMark() {
-			this.isPartMark = false;
-			this.$nextTick(function() {
-				this.isPartMark = true;
-			});
-		},
 		// 确认
 		markConfirm(arr) {
 			this.markArr = arr;

+ 3 - 3
pages/spotCheckConfigure/spotCheckList.vue

@@ -9,9 +9,9 @@
 			<view class="itemName">
 				<span>{{ item.startDate }} 至 {{ item.endDate }}</span>
 				<span>
-					<u-button v-if="item.status == 1" type="success" size="mini" style="margin-right: 15upx;" @click="handetail">查看</u-button>
-					<u-button v-if="item.status == 0" type="primary" size="mini" style="margin-right: 15upx;" @click="handedit">编辑</u-button>
-					<u-button v-if="item.status == 0" type="error" size="mini" @click="handelete(item)">删除</u-button>
+					<u-button type="success" size="mini" style="margin-right: 15upx;" @click="handetail">查看</u-button>
+					<u-button v-if="item.status == 0&&item.taskGenerateFlag==0" type="primary" size="mini" style="margin-right: 15upx;" @click="handedit">编辑</u-button>
+					<u-button v-if="item.status == 0&&item.taskGenerateFlag==0" type="error" size="mini" @click="handelete(item)">删除</u-button>
 				</span>
 			</view>
 		</view>

+ 2 - 2
pages/videoShopTour/videoShopTour.vue

@@ -52,6 +52,7 @@
 				this.status = 'loading'
 				// 获取门店列表
 				findStoreList({}).then(res => {
+					console.log(res)
 					if(res.status == 200){
 						this.list = res.data || []
 						this.noDataText = '暂无数据'  //  有列表数据时不显示,因此只用默认设置为无数据时所需显示的'暂无数据'即可
@@ -77,8 +78,7 @@
 			//  开始巡店
 			goPage(item){
 				//  校验是否有历史巡店记录
-				queryCurrentTaskUsing({ storeId: item.id }).then(res => {
-					console.log(res,{ storeId: item.id },'---')
+				queryCurrentTaskUsing({ storeId: item.id, type:"VIDEO_INSPECTION" }).then(res => {
 					if(res.status == 200){
 						if(res.data){  //  为true有历史巡店记录
 							clzConfirm({

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/app-config-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


File diff suppressed because it is too large
+ 341 - 365
unpackage/dist/dev/app-plus/app-view.js


+ 1 - 2
unpackage/dist/dev/app-plus/hybrid/html/video.html

@@ -17,8 +17,7 @@
 		<link rel="stylesheet" href="aliplayer/aliplayer-min.css" />
 		<script type="text/javascript" charset="utf-8" src="aliplayer/aliplayer-h5-min.js"></script>
 		<!-- 页面样式 -->
-		<link rel="stylesheet/less" type="text/css" href="css/styles.less" />
-		<script src="js/less.min.js"></script>
+		<link rel="stylesheet" href="css/styles.css" />
 	</head>
 	<body>
 		<div class="storeCheck" id="app">

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


Some files were not shown because too many files changed in this diff