Commit ff4f8fab authored by Morson's avatar Morson

解决冲突

parents 21477a12 9578e392
......@@ -5,8 +5,8 @@ const UNI_APP = {
// banshou: 'https://m.banshou.com', //扳手app
},
systemUrl: {
// apiUrl: 'http://192.168.1.22', //java端域名请求头
apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
apiUrl: 'http://192.168.1.22', //java端域名请求头
// apiUrl: 'http://apidoc.banshouhui.com:3000/mock/31', // mock端域名请求头
},
qn_base_url: 'https://qn-static.banshouhui.com/self-support/'
}
......
......@@ -157,9 +157,9 @@ export default {
})
},
setUserData(userInfo) {
if (userInfo && userInfo.token) {
if (userInfo && userInfo.token) {
// 如果已经登录则直接获取相关信息
this.$u.vuex('vuex_token', userInfo.token);
this.$u.vuex('vuex_token',userInfo.token); // RTOKENf22df8e7b9db396f560e8f61bebceea2000cb05c
this.$u.vuex('vuex_user', userInfo);
this.$u.vuex('vuex_wx_uid', userInfo.wxopenid);
} else {
......
......@@ -5,7 +5,7 @@ let orderApiFun = function(vm){
/**
* 工单数量查询接口
*/
let listOrderCount = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/'+ vm.vuex_token+'/order/queryOrdersCount/V2', params);
let listOrderCount = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/'+ vm.vuex_token+'/wokerOrder/queryOrdersCount/V2', params);
/**
* 工单列表接口 wxh-worker-rest/rest/order/revision/{token}/list
......@@ -31,7 +31,7 @@ let orderApiFun = function(vm){
/**
* 订单详情查询
*/
let orderDetail = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/'+ vm.vuex_token+'/'+params.orderId, params);
let orderDetail = async (params = {},orderId) => await vm.$u.get('/wxh-worker-rest/rest/order/revision/'+ vm.vuex_token+'/'+orderId, params);
/* 过程反馈查询接口 */
let feedbackConfig = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rst/order/v2/getFeedBack/' + vm.vuex_token, params)
......@@ -58,6 +58,20 @@ let orderApiFun = function(vm){
*/
let orderGan = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/revision/applets/'+ vm.vuex_token+'/order/acceptAppletsOrder', params,{'content-type': 'application/x-www-form-urlencoded'});
/**
* 获取拍照标准
*/
let orderStandard = async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/'+ vm.vuex_token+'/photo/standard', params);
/**
* 保存图片信息
*/
let saveImage = async (params = {},orderId) => await vm.$u.post('/wxh-worker-rest/rest/'+ vm.vuex_token+'/order/'+orderId+'/maintain/saveImage', params);
/**
* 获取师傅水印 or 默认水印
*/
let getWatermark= async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/'+ vm.vuex_token+'/photo/watermark', params);
const orderApi = {
listByRecommendOrder,
......@@ -73,7 +87,10 @@ let orderApiFun = function(vm){
maintainWorkerCheckin,
feedbackConfig,
traceAndAppointment,
rejectOrder
rejectOrder,
orderStandard,
saveImage,
getWatermark
}
return orderApi
}
......
<template>
<u-popup border-radius="12" v-model="visible" safe-area-inset-bottom mode="center" width="690rpx"
:mask-close-able="false">
<view class="order-pop-view">
<view class="order-pop-title">
<text>{{title}}</text>
</view>
<view class="line-view" />
<view class="order-pop-text">
<text>{{message}}</text>
</view>
<view class="order-pop-btn-view">
<u-button :custom-style="customStyleCancel" hover-class="none" shape="circle" type="primary"
@click="handleClickCancel">
取消
</u-button>
<u-button :custom-style="customStyleSave" shape="circle" type="primary" @click="handleClickSure">
确定
</u-button>
</view>
</view>
</u-popup>
</template>
<script>
export default {
props: {
visible: Boolean,
title: String,
message: String,
},
data() {
return {}
},
computed: {
customStyleCancel() {
return {
'background-color': '#D1D4D4',
'width': '300rpx',
'height': '104rpx',
'background-color': 'transparent',
'border': '1px solid #2272FF',
'color': '#2272FF',
'font-weight': 'bold',
'font-size': '32rpx',
}
},
customStyleSave() {
return {
'background-color': '#2272FF',
'width': '300rpx',
'height': '104rpx',
'font-weight': 'bold',
'font-size': '32rpx',
'margin-left': '30rpx'
}
}
},
methods: {
changeVisibleValue(val) {
this.$emit('update:visible', val)
},
handleClickCancel() {
this.changeVisibleValue(false)
this.$emit('cancel')
},
handleClickSure() {
this.$emit('click')
}
}
}
</script>
<style lang="scss" scoped>
.order-pop-view {
padding: 30rpx;
.order-pop-title {
font-size: 40rpx;
margin-top: 40rpx;
margin-bottom: 40rpx;
text-align: center;
color: #333333;
}
.order-pop-text {
color: #999999;
text-align: center;
margin-top: 40rpx;
font-size: 28rpx;
margin-bottom: 260rpx;
}
.line-view {
background-color: #F4F5F7;
height: 2rpx;
width: 100%;
}
.order-pop-btn-view {
display: flex;
position: absolute;
bottom: 50rpx;
align-items: center;
justify-content: center;
}
}
</style>
......@@ -6,8 +6,12 @@
class="course-video"
id="courseVideo"
:src="courseSrc"
:options="playerOptions"
:playsinline="true"
@play="playCourse"
@error="videoErrorCallback"
@ready="playerReadied"
@timeupdate = "onPlayerTimeupdate($event)"
controls
></video
></view>
......@@ -64,6 +68,34 @@ export default {
section_id:0,
isShowVideo: false,
CourseSectionlist: {},//节信息
playerOptions : {
playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
autoplay: false, //如果true,浏览器准备好时开始回放。
muted: false, // 默认情况下将会消除任何音频。
loop: false, // 导致视频一结束就重新开始。
preload: 'auto',
language: 'zh-CN',
aspectRatio: '16:9',
fluid: true,
// sources: [{
// type: "",
// src: "" //url地址
// }],
// poster: "../../static/images/test.jpg", //你的封面地址
// width: document.documentElement.clientWidth,
notSupportedMessage: '此视频暂无法播放,请稍后再试',
controlBar: {
timeDivider: true,
durationDisplay: true,
remainingTimeDisplay: false,
fullscreenToggle: true //全屏按钮
}
},
gklog: '',
videoTotalTime: 0,
howTimeToUpdateLearnedStatus: 5,//设置几秒提交一次状态
status: 1,//是否已学习默认1已学习
howLongIsLearned: this.videoTotalTime/2,//默认设置观看1/2就是已学
};
},
computed: {
......@@ -97,10 +129,6 @@ export default {
},
},
onLoad(e) {
this.courseSrc = 'https://qn-static.banshouhui.com/self-support/videoen.mp4';
this.courseTitle = '大吉大利';
this.courseDesc = '今晚吃鸡';
this.section_id = e.section_id
this.getCourseSection({section_id:e.section_id})
},
onReady: function (res) {
......@@ -109,6 +137,14 @@ export default {
// #endif
},
methods: {
onPlayerTimeupdate (player) {
console.log('-----onplay----');
console.log(player);
let intCurrentTime = parseInt(player.detail.currentTime);
this.updateLearnedStatus(intCurrentTime);
this.gklog = intCurrentTime;
console.log(' onPlayerTimeupdate!', this.gklog)
},
videoErrorCallback: function (e) {
uni.showModal({
content: e.target.errMsg,
......@@ -130,6 +166,10 @@ export default {
}
this.changeCourseStatus();
},
playerReadied (player) {
console.log('i go to playerReadied gklog:' + this.gklog)
player.currentTime(this.gklog)
},
changeCourseStatus() {
let that = this;
if (that.courseId) {
......@@ -162,22 +202,49 @@ export default {
console.log(this.CourseSectionlist)
let wareVal = this.CourseSectionlist.ware;
this.isShowVideo = wareVal == "0";
if(this.isShowVideo){
let coureWareList = res.data.courseware;
this.courseSrc = coureWareList[0].src;
this.videoTotalTime = parseInt(JSON.parse(coureWareList[0].info).time);
console.log('视频时长信息:' + this.videoTotalTime);
this.courseTitle = res.data.name;
this.courseDesc = res.data.content;
this.section_id = res.data.id;
}
}
}
})
.catch((err) => {
console.log('--------settttt---------');
console.log(err);
uni.showToast({
title: err,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
});
},
updateLearnedStatus(nowLength) {
if(this.gklog != nowLength && nowLength%this.howTimeToUpdateLearnedStatus == 0){
if(nowLength < this.howLongIsLearned){
this.status = 0;
}else{
this.status = 1;
console.log('--已学习--');
}
//大于
let param = {
section_id: this.section_id,
video_time: nowLength,
status: this.status,
};
this.$u.api.updateLearnCourses(param).then((res) => {
console.log('--'+this.howTimeToUpdateLearnedStatus+'更新一次观看状态--time:' + nowLength);
});
}
}
},
};
</script>
<style lang="scss" scoped>
......@@ -203,6 +270,19 @@ export default {
padding: 80rpx 60rpx 40rpx 60rpx;
}
.title {
font-weight: 700;
font-family: Medium,Helvetica Neue,Helvetica,Arial,sans-serif;
font-size: 77rpx;
color: #333;
padding: 80rpx 60rpx 40rpx 60rpx;
}
.content {
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
}
.course-desc {
margin-left: 60rpx;
}
......
......@@ -183,7 +183,7 @@ export default {
if (userInfo && userInfo.token) {
// 如果已经登录则直接获取相关信息
util.setOpenid(userInfo.wxopenid);
this.$u.vuex('vuex_token', userInfo.token);
this.$u.vuex('vuex_token',userInfo.token );
uni.setStorageSync("user-info", userInfo);
} else {
this.$u.vuex('vuex_token', '');
......
......@@ -112,16 +112,19 @@
</view>
</view>
<take-photo type="test" v-if="takeStatus" @close="closeTake"></take-photo>
<PopView title="查看交互规范" message="为完善交付质量,请查看对应的交付规范" :visible.sync="visibale" @click="handleClick"/>
</view>
</template>
<script>
import appointTime from '@/components/appoint/appoint-time.vue'
import takePhoto from '@/components/take/index.vue'
import PopView from "@/components/popView/index.vue"
export default {
components: {
appointTime,
'take-photo': takePhoto
'take-photo': takePhoto,
PopView
},
data() {
return {
......@@ -133,6 +136,7 @@
// backgroundSize: 'cover',
// 渐变色
},
visibale: false,
orderId: null,
order: {},
allowRejection: false, // 允许拒单
......@@ -149,7 +153,7 @@
btnClass:'appoint-btn',
takeStatus:false,
errorSignIn:false,
scenePhoto: false
scenePhoto: true
}
},
onLoad(option) {
......@@ -187,10 +191,25 @@
uni.hideTabBar()
this.takeStatus = true
},
closeTake() {
closeTake(img) {
console.log(img)
this.takeStatus = false
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
if(img){ // 拍照完成
this.$refs.uToast.show({
title: '签到成功',
type: 'success',
url: 'pages/order/detail',
params: {
id: 1
}
})
}else{
this.$refs.uToast.show({
title: '异常签到失败,请先按要求拍照',
type: 'waning'
})
}
},
loadOrderDetail() { // 获取工单详情
let self = this
......@@ -198,11 +217,12 @@
var data = {
'orderId': self.orderId
};
self.$u.api.orderDetail(data).then((res) => {
self.$u.api.orderDetail(data, self.orderId).then((res) => {
if (res.code == 200) {
console.log("===", res.data.list[0])
self.order = res.data.list[0]
console.log("===", res.data)
self.order = res.data
this.getCurrentBtn()
this.visibale = true
// self.order.operationType = "accept"
// }else{
// self.order.operationType = "appointment"
......@@ -421,6 +441,12 @@
this.btnClass='timeOut-btn'
self.$refs['uCountDown'].seconds += 2
}
},handleClick(){
this.visibale = false
// 去完工
uni.navigateTo({
url: 'pages/photo/list'
})
}
}
};
......
......@@ -30,31 +30,32 @@
<!-- </swiper-item> -->
</view>
<!-- </view> -->
<!-- </view> -->
<PopView title="aaaa" message="bbbb" :visible="visibale"/>
</TabBarPage>
</template>
<script>
import TabBarPage from "@/components/tabBarList/index.vue"
import OrderCell from "@/components/order/index.vue";
import OrderCell from "@/components/order/index.vue"
export default {
components: {
TabBarPage,
OrderCell
},
data() {
return {
return {
visibale: false,
showSview: true,
curNow: 0,
pageNumber: 0,
pageSize: 10,
//waitAccept、waitAppointment、waitCheckIn、waitFinish、exception、finish
indexStatus: {
0: 'waitAccept',
1: 'waitAppointment',
2: 'waitCheckIn',
3: 'waitFinish',
4: 'exception',
0: 'waitAppointment',
1: 'waitCheckIn',
2: 'waitFinish',
3: 'exception',
5: 'finish'
},
orderList: [],
......@@ -147,7 +148,7 @@
// 页面数据
getOrderList(index) {
// 状态处理
this.pageNumber += 1
// this.pageNumber += 1
var param = {
pageNumber: this.pageNumber,
pageSize: this.pageSize,
......@@ -181,6 +182,7 @@
submissionTime: '2021.04.19 16:24:48', // 提交时间
auditResults: {}, // 审核结果
orderBusinessType: 'R', // 业务类型 R 为抢单
orderId:'1100000216'
}]
}
......
......@@ -4,30 +4,34 @@
<view class="topView">
<view :class="['topItemView', {'active':activeTop===ikey}]" @click="handleTopItemChange(ikey,item)"
v-for="(item,ikey) in dataList" :key="ikey">
<text :class="['ph-lst-top-index', {'active':activeTop===ikey}]">{{ ikey + 1 }}</text>
<text class="topItemTitle">{{item.type}}</text>
</view>
</view>
<view class="rightView">
<view class="right-view-title">拍照项有:</view>
<template v-for="(item,ikey) in rightList">
<view class="rightItemView" @click="rightItemClick(item,ikey)" :key="ikey">
<view :class="['rightContentView', {'active':item.imageList[0]}]">
<view class="rightItemView" @click="take(item,ikey)" :key="ikey">
<view :class="['rightContentView', {'active':item.images[0]}]">
<text class="ph-lst-item-index">{{ ikey + 1 }}</text>
<text class="">{{item.name}}</text>
<image class="ph-list-item-arrow" src="/static/photo/arrow.png"></image>
<!-- <text class="rightContent u-m-t-14 u-m-l-30 u-p-b-30">{{item.describe}}</text> -->
</view>
<view class="rightImageView" v-if="item.imageList.length > 0">
<image class="rightImage" v-for="(image, index) in item.imageList.slice(0 , 10)" :src="image"
<view class="rightImageView" v-if="item.images.length > 0">
<image class="rightImage" v-for="(image, index) in item.images.slice(0 , 10)" :src="image"
:key="index" @click.stop="handleClickImage(item, index)" mode="aspectFill"></image>
</view>
</view>
</template>
<u-button v-if="activeTop + 1 === dataList.length" class="ph-list-button" type="error" shape="circle"
:disabled="buttonDisabled" :custom-style="buttonStyle" @click="isPopShow = true">一键清空展示图片</u-button>
<take-photo type="test" v-if="takeStatus" :currentItem="currentItemDate" @close="closeTake"></take-photo>
<!-- <u-button v-if="activeTop + 1 === dataList.length" class="ph-list-button" type="error" shape="circle"
:disabled="buttonDisabled" :custom-style="buttonStyle" @click="isPopShow = true">一键清空展示图片</u-button> -->
</view>
<u-popup border-radius="10" v-model="isPopShow" safe-area-inset-bottom mode="center" width="690rpx"
<!-- <u-popup border-radius="10" v-model="isPopShow" safe-area-inset-bottom mode="center" width="690rpx"
height="600rpx">
<view class="ph-list-pop-title">
<text>是否一键清空系统展示的图片?</text>
......@@ -44,14 +48,20 @@
确定
</u-button>
</view>
</u-popup>
</u-popup> -->
</view>
</template>
<script>
import takePhoto from '@/components/take/index.vue'
export default {
components: {
'take-photo': takePhoto
},
data() {
return {
takeStatus: false,
currentItemDate:{},
topList: [],
activeTop: 0,
leftList: [],
......@@ -60,9 +70,11 @@
systemId: '',
brand: '',
brandId: '',
orderId:'',
dataList: [],
loading: true,
isPopShow: false
isPopShow: false,
userWatermark:{}
}
},
onLoad(e) {
......@@ -70,14 +82,21 @@
if (e && e.brandId) {
this.brandId = e.brandId
}
if (e && e.brand) {
this.brand = e.brand
uni.setNavigationBarTitle({
title: this.brand
});
uni.setNavigationBarTitle({
title: "郭小清"
});
// if (e && e.brand) {
// this.brand = e.brand!==undefined?e.brand:"郭小清"
// uni.setNavigationBarTitle({
// title: this.brand
// });
// }
if (e && e.orderId) {
this.orderId = e.orderId
}
if (e && e.systemId) {
this.systemId = e.systemId
......@@ -86,8 +105,8 @@
if (e && e.classifyId) {
this.classifyId = e.classifyId
}
this.getListData()
// this.getListData()
this.getListDataNew()
},
......@@ -108,7 +127,6 @@
}
}
}
return true
},
customStyleCancel() {
......@@ -127,7 +145,6 @@
}
}
},
methods: {
getListData: function() {
this.loading = true
......@@ -149,17 +166,60 @@
}
}
})
},
handleData: function(result) {
getListDataNew() {
this.loading = true
let self = this
var data = {
partnerCompanyId:this.systemId ,
orderId:this.orderId,
categoryId:this.classifyId,
brandId:this.brandId
};
self.$u.api.orderStandard(data).then((res) => {
this.loading = false
if (res.code == 200) {
console.log("===", res.data)
if(res.data && res.data.length > 0){
let dataList = []
var flag = false;
res.data.forEach(item=>{
if(dataList.length===0 ){
var dataItem = {type:'',list:[]}
dataItem.type = item.type
dataItem.list.push(item)
dataList.push(dataItem)
}else{
dataList.forEach(dataListItem=>{
if(dataListItem.type===item.type){
dataListItem.list.push(item)
flag = true
return false;
}else{
flag = false
}
})
if(!flag){
var dataItem = {type:'',list:[]}
dataItem.type = item.type
dataItem.list.push(item)
dataList.push(dataItem)
}
}
})
this.handleData(dataList)
}
} else {
console.log(res.code.message)
}
});
},
handleData: function(result) {
this.activeTop = 0
const globalData = getApp().globalData
globalData.photo.productList = result
this.dataList = result
if (result.length > 0) {
var item = result[0]
globalData.photo.waterSetting = item.userWatermark
globalData.photo.waterSetting = this.userWatermark
this.rightList = item.list
}
},
......@@ -176,7 +236,6 @@
duration: 0
});
},
// 点击图片
handleClickImage(item, index) {
uni.previewImage({
......@@ -184,7 +243,6 @@
current: index
})
},
//右侧点击
rightItemClick: function(item, ikey) {
const photo = getApp().globalData.photo
......@@ -196,7 +254,6 @@
url: '/pages/photo/take'
})
},
// 清除图片
handleClickSure: function() {
this.$u.cloudApi.cleanImage({
......@@ -207,6 +264,42 @@
this.getListData()
}
})
},
take(item,ikey) {
this.currentItemDate = item
uni.hideTabBar()
this.takeStatus = true
},
closeTake(img) {
console.log(img)
if(img !==undefined ){
// step1 添加图片
this.currentItemDate.images.push(img)
// step2 保存图片
var data={
type : this.currentItemDate.type,
images : this.currentItemDate.images,
fieldsName:this.currentItemDate.fieldName
}
this.$u.api.saveImage(data,this.orderId).then((res) => {
if (res.code == 200) {
console.log("===", res.data)
} else {
console.log("保存图片异常",res.data.message)
}
});
}
this.takeStatus = false
},
getWatermark(){
this.$u.api.getWatermark(data,this.orderId).then((res) => {
if (res.code == 200) {
console.log("===", res.data)
this.userWatermark = res.data
} else {
console.log("获取水印备注异常",res.data.message)
}
});
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment