Commit de883b1c by 蒋秀川

jxc

1 parent 2896fd1b
......@@ -4,7 +4,7 @@ import { param2 } from '@/utils'
import { Toast } from 'vant';
//const baseURL = 'https://store.keliuyun.com/report';
//const baseURL = 'https://mall.keliuyun.com';
const baseURL = 'http://192.168.1.106:81';
const baseURL = 'https://store.keliuyun.com';
const Axios = axios.create({
baseURL: baseURL, // 因为我本地做了反向代理
timeout: 0,
......
......@@ -833,9 +833,9 @@ var SLPlayer = (function() {
return String.prototype.startsWith ? filename.startsWith(dataURIPrefix) : filename.indexOf(dataURIPrefix) === 0
}
var wasmBinaryFile = "slplayer.wasm";
if (process.env.NODE_ENV == "development") {
//if (process.env.NODE_ENV == "development") {
wasmBinaryFile = 'static/js/' + wasmBinaryFile;
}
//}
if (!isDataURI(wasmBinaryFile)) {
wasmBinaryFile = locateFile(wasmBinaryFile)
}
......
......@@ -47,7 +47,7 @@ export default defineConfig({
// rollupOptions:{
// plugins:[copy({
// targets: [
// { src: 'public/*', dest: 'dist/pp' }
// { src: 'public/*', dest: 'dist/static' }
// ]
// })]
// }
......
......@@ -33,6 +33,14 @@ module.exports = {
getPatrolRecordDetail(params,config) {
return http.get(`/patrol/patrolRecord/${params.id}`, params);
},
// 待点检任务
getPatrolCaptureRecordList(params){
return http.get(`/patrol/patrolCaptureRecord/list`,params)
},
// 定时抓怕配置
getRuleList(params){
return http.get(`/patrol/b-patrol-rule/list`, params)
},
//提交巡店记录
confirmPatrolRecord(params,config) {
return http.post(`/patrol/patrolRecord`, params,config);
......
{
"pages": [
"pages/login/index",
"pages/tour/point/index",
"pages/tour/titem/index",
"pages/home/index",
"pages/tour/list/index",
......@@ -7,10 +9,10 @@
"pages/tour/webview/index",
"pages/tour/index/index",
"pages/login/index",
"pages/index/index",
"pages/me/index",
"pages/tour/point/index"
"pages/me/index"
],
"subPackages": [
{
......
module.exports = {
//ajaxUrl:'https://mall.keliuyun.com',
ajaxUrl:'http://192.168.1.106:81',
ajaxUrl:'https://store.keliuyun.com',
//ajaxUrl:'http://192.168.1.106:81',
//ajaxUrl:'https://applet.keliuyun.com:17072',
picUrl:'https://store.keliuyun.com/images/applet'
}
\ No newline at end of file
......@@ -61,7 +61,7 @@
</view>
<van-dialog id="van-dialog" />
<van-action-sheet
description="指定处理人"
title="指定处理人"
show="{{ selectBody }}"
actions="{{ bodyList }}"
cancel-text="取消"
......
/* pages/tour/component/upload/index.wxss */
page{--font-weight-bold:600;}
.uwrap{
position: relative;
width: 750rpx;
......
......@@ -39,7 +39,7 @@ Page({
let mallObj = _.findWhere(this.data.mallList, {
id: mallId
});
if (!res.data || !res.data.list) {
if (!res.data || !res.data.list||res.data.list.length==0) {
mallObj.empty = true;
//this.triggerEvent('gateChange',{});
} else {
......
......@@ -8,7 +8,7 @@
<scroll-view scroll-y class="list">
<van-collapse value="{{ activeMall }}" bind:change="onChange">
<van-collapse-item custom-class="item" content-class="gcont" wx:for="{{mallList}}" wx:key="index" wx:for-item="mall" title="{{mall.name}}" name="{{mall.id}}" is-link="{{true}}">
<view style="text-align: center;" wx:if="{{mall.empty}}">暂无监控点</view>
<view style="text-align: center;display:{{mall.empty?'block':'none'}};">暂无监控点</view>
<van-cell data-id="{{item.id}}" data-channelid="{{item.channelId}}" data-name="{{item.name}}" data-mallid="{{mall.id}}" data-platform="{{item.patrolDeviceChannel.platform}}" data-mallname="{{mall.name}}" bindtap="selectGate" wx:for="{{mall.gates}}" wx:key="index" title="{{item.name}}">
<van-icon name="success" wx:if="{{gateId==item.id}}" color="#1267E0" size="20"/>
</van-cell>
......
......@@ -45,7 +45,9 @@ Page({
const dpr = wx.getSystemInfoSync().pixelRatio;
let img = canvas.createImage()
img.src = picInfo.path;
console.info('开始加载图片')
img.onload = () => {
console.info('图片加载完成')
let width = cObj.width;
let height = cObj.width * img.height / img.width;
this.setData({
......
......@@ -9,7 +9,7 @@
<!-- 视频截图 S -->
<view class="capview">
<image mode="widthFix" style="position:relative;width:{{cWidth}}px;height: {{cHeight}}px;" wx:if="{{tempUrl}}" src="{{tempUrl}}"/>
<canvas class="cvs" wx:if="{{!tempUrl}}" type="2d" bindtouchstart="startDraw" bindtouchmove="drawing"
<canvas disable-scroll class="cvs" wx:if="{{!tempUrl}}" type="2d" bindtouchstart="startDraw" bindtouchmove="drawing"
bindtouchend="endDraw" bindtouchcancel="endDraw" style="width:{{cWidth}}px;height: {{cHeight}}px;" id="painter" >
</canvas>
</view>
......
......@@ -6,6 +6,7 @@
.capview{
position: relative;
width: 100%;
overflow: hidden;
}
.capview image{
width: 100%;
......
// pages/tour/point/index.js
// pages/tour/list/index.js
import { dealTimer,getMonthStartDate,getMonthEndDate} from '../../../utils/util';
import {
getPatrolCaptureRecordList,
tourUserList,
getRuleList
} from "../../../api/tour.js";
import _ from 'underscore';
const app = getApp();
let userList = [];
let tourArrayList = [];
let loadSucc = false;
let showSucc = false;
Page({
/**
* 页面的初始数据
*/
data: {
navHeight:getApp().globalData.navHeight ,
userName:wx.getStorageSync('name'),
mallSelect:false,
mallName:'全部门店',
ruleName:'',
ruleList:[],
ruleVal:'',
type:'',//create:我发起的,handle:待我处理
tabIndex:0,
mallId:'',
date: {
startDate: '',
endDate: ''
},
scrollTop:0,
scrollHeight:600,
dateType: 1, // 时间类型 日 周 月 年
listData:[],
list:0,
uncheck:0,
check:0,
},
......@@ -12,23 +44,186 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let type = options.type;
let scrollHeight = app.globalData.windowHeight-app.globalData.navHeight*1.6;
let date = new Date();
this.setData({
type,
mallId: '',
scrollHeight,
mallName: '全部门店',
date: {
startDate: getMonthStartDate(date),
endDate: getMonthEndDate(date),
}
},()=>{
//loadSucc = true;
//if(showSucc)this.loadTourData();
this.loadTourData();
})
this.loadRuleList();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
loadRuleList(){
getRuleList({
pageNum: 1,
pageSize: 999,
accountId:wx.getStorageSync('accountId')
}).then(res=>{
let ruleList = res.data.list;
ruleList.unshift({
name:'全部规则',
id:''
});
this.setData({
ruleList,
ruleVal:ruleList[0].id,
ruleName:ruleList[0].name
})
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
showSucc = true;
//if(loadSucc)this.loadTourData();
},
backBtn(){
this.setData({
mallSelect:false
})
},
mallChange(evt){
let {id,name} = evt.detail;
this.backBtn();
this.setData({
mallId:id,
mallName:name
},()=>{
this.loadTourData();
wx.setStorageSync('mallId',id);
})
},
mallBtn(){
this.setData({
mallSelect:true
})
},
ruleBtn(){
this.setData({
ruleSelect:true
})
},
onCloseRule(){
this.setData({
ruleSelect:false
})
},
onSelectRule(evt){
let {id,name} = evt.detail;
this.setData({
ruleVal:id,
ruleName:name,
ruleSelect:false
},()=>{
this.loadTourData();
})
},
onPickerChange(evt){
let {startDate,endDate} = evt.detail;
this.setData({
date:{
startDate,
endDate
}
},()=>{
this.loadTourData();
})
},
tabsChange(evt){
let {index} = evt.detail;
let listData;
if(index>0){
listData = _.where(tourArrayList,{status:index-1});
}else{
listData = tourArrayList;
}
this.setData({
listData,
tabIndex:index,
scrollTop:0
})
},
jumpBtn(evt){
let {id} = evt.currentTarget.dataset;
let titem = _.findWhere(tourArrayList,{id});
wx.navigateTo({
url: `/pages/tour/index/index?action=capture&picUrl=${titem.pic}&id=${titem.gateId}&mallId=${titem.mallId}&title=${titem.gateName}`
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
async loadTourData(status){
wx.showLoading({
title: '加载中···',
})
let mallId = wx.getStorageSync('mallId');
let mallList = wx.getStorageSync('mallList');
let params = {
mallId:this.data.mallId||'',
pageSize:999,
ruleId:this.data.ruleVal,
...this.data.date
}
if(status){
params.status = status;
}
let res = await getPatrolCaptureRecordList(params);
let picUrl = app.globalData.ajaxUrl + '/images/';
let list = res.data.list.sort((a,b)=>{
return a.modifyTime-b.modifyTime;
})
list = _.map(list,item=>{
let mall = _.findWhere(mallList,{id:item.mallId});
item.mallName = mall&&mall.name;
item.image = picUrl + item.pic;
if(item.status==0){
item.text = '未点检';
item.color = '#ee0a24'
}
if(item.status==1){
item.text = '已点检';
item.color = '#07c160'
}
return item;
});
tourArrayList = list;
let uncheck = _.where(list,{status:0});
let check = _.where(list,{status:1})
let listData;
if(this.data.tabIndex==0){
listData = list;
}else if(this.data.tabIndex==1){
listData = uncheck;
}else if(this.data.tabIndex==2){
listData = check;
}
this.setData({
listData,
list:list.length,
uncheck:uncheck.length,
check:check.length,
scrollTop:0
})
setTimeout(()=>{
wx.hideLoading()
},1000);
},
/**
* 生命周期函数--监听页面隐藏
*/
......
{
"usingComponents": {}
"usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-nav-bar": "@vant/weapp/nav-bar/index",
"time-picker": "/components/timer/index",
"van-action-sheet": "@vant/weapp/action-sheet/index"
}
}
\ No newline at end of file
<!--pages/tour/point/index.wxml-->
<text>pages/tour/point/index.wxml</text>
<template name="tlist">
<scroll-view style="height:{{scrollHeight}}px" scroll-y scroll-top="{{scrollTop}}">
<view class="tour acea-row" wx:for="{{list}}" data-id="{{item.id}}" bindtap="jumpBtn">
<image class="pimg" mode="aspectFill" src="{{item.image}}"></image>
<view class="pinfo">
<view class="tit">{{item.gateName}}</view>
<view class="belong">门店:{{item.mallName}}</view>
<view class="time">抓拍时间:{{item.createTime}}</view>
<view class="status">状态:<text style="color:{{item.color}}">{{item.text}}</text></view>
</view>
</view>
<van-empty wx:if="{{list.length==0}}" image="search" description="暂无点检记录" />
<view style="height: 100rpx;"></view>
</scroll-view>
</template>
<!--pages/tour/list/index.wxml-->
<view class="container" style="padding-top: {{navHeight}}px">
<navbar2 bg-color="#fff" navbar-color="#000">
<view class="navtitle">
<van-icon bindtap="onGoBack" size="24" name="arrow-left" custom-class="back" />
<view class="title">点检巡店</view>
</view>
</navbar2>
<view class="tlist">
<van-tabs type="card" color="#1267E0" bindchange="tabsChange">
<van-tab title="全部" name="list"></van-tab>
<van-tab title="未点检" name="unckeck" dot="{{uncheck}}"></van-tab>
<van-tab title="已点检" name="check" dot="{{check}}"></van-tab>
</van-tabs>
<view class="fview acea-row">
<view class="mallselect" bindtap="mallBtn">{{mallName}}
<van-icon name="arrow-down" custom-class="drop" />
</view>
<view class="ruleselect" bindtap="ruleBtn">{{ruleName}}
<van-icon name="arrow-down" custom-class="drop" />
</view>
<time-picker icon class="picker" placeholder="请选择时间" initDate="{{date}}" dateType="{{dateType}}" bind:onPickerChange="onPickerChange" />
</view>
<template is="tlist" data="{{list:listData,scrollHeight,scrollTop}}"></template>
</view>
<view style="height: 100rpx;"></view>
</view>
<page-container show="{{mallSelect}}" position="right">
<malllist all="{{true}}" bindback="backBtn" bindmallChange="mallChange"></malllist>
</page-container>
<van-action-sheet
title="选择规则"
show="{{ ruleSelect }}"
actions="{{ ruleList }}"
cancel-text="取消"
bind:close="onCloseRule"
bind:cancel="onCloseRule"
bind:select="onSelectRule"
/>
\ No newline at end of file
/* pages/tour/point/index.wxss */
\ No newline at end of file
page{--font-weight-bold:600;}
.navtitle{color:#000;}
.title{width:600rpx;text-align: center;}
.container{overflow: hidden;height: 100vh;}
.tlist{position: relative;width:710rpx;margin:10px auto 0;--padding-md:0}
.tlist scroll-view{width: 710rpx;margin:0 auto 0;}
.tour{
--cell-vertical-padding:5px;
--cell-horizontal-padding:0;
--cell-text-color:#000;
--cell-font-size:16px;
background-color: #fff;
padding:10rpx 0 10rpx 10rpx;
margin:0px auto 15rpx;
font-size: 26rpx;
}
.tour .pimg{width:285rpx;height: 160rpx;}
.tour .pinfo{width:415rpx;padding-left:10rpx;}
.tour .pinfo .tit{color:#000}
.tour .pinfo view{overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
.tlist{color:#999;font-size:14px;}
.tcol{color:#000}
.fview{padding:20rpx 0;color:#000;font-size: 30rpx;align-items: center;}
.fview .drop{margin-left:-5rpx;}
.fview .tview{
font-size: 30rpx;
color:#000;
}
.fview .tview image{
width: 24rpx;
height: 24rpx;
margin-top: 6rpx;
transform: rotate(90deg);
}
......@@ -30,7 +30,18 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let id = options.id||58;
let id = options.id;
if(!id){
wx.showToast({
title: '参数错误',
icon: 'error',
duration: 2000
});
setTimeout(()=>{
wx.navigateBack()
},2000)
return
}
let mallList = wx.getStorageSync('mallList');
let captureUrl = options.picUrl;
getPatrolRecordDetail({id}).then(res=>{
......
......@@ -75,7 +75,7 @@
</view>
<!-- 视频截图 S -->
<view class="capview {{actionVal&&captureUrl?'show':'hide'}}" >
<canvas class="cvs" type="2d" bindtouchstart="startDraw" bindtouchmove="drawing"
<canvas disable-scroll class="cvs" type="2d" bindtouchstart="startDraw" bindtouchmove="drawing"
bindtouchend="endDraw" bindtouchcancel="endDraw" style="width:{{cWidth}}px;height: {{cHeight}}px;" id="painter" >
</canvas>
</view>
......
......@@ -146,6 +146,7 @@
position: relative;
width: 100%;
display: block;
overflow-x: hidden;
}
.capview.hide{
display: none;
......
......@@ -23,7 +23,7 @@ Page({
let name = option.name;
let platform = option.platform;
let tid = option.tid;
let webViewUrl = 'http://192.168.1.39:3000/';
let webViewUrl = 'https://store.keliuyun.com/video/';
webViewUrl+=`?atoken=${atoken}&type=${type}&id=${id}&channelid=${channelid}&platform=${platform}&name=${name}&mallId=${mallId}`;
if(tid){
webViewUrl+=`&tid=${tid}`;
......
......@@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": false,
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
......@@ -30,7 +30,6 @@
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
......@@ -39,7 +38,8 @@
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false
"useCompilerPlugins": false,
"ignoreUploadUnusedFiles": true
},
"compileType": "miniprogram",
"libVersion": "2.14.4",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!