Commit 6feded7e authored by 刘用法's avatar 刘用法
parents 502e8a73 5419b705
...@@ -95,6 +95,23 @@ let orderApiFun = function(vm){ ...@@ -95,6 +95,23 @@ let orderApiFun = function(vm){
*/ */
let getSignDistance = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/' + vm.vuex_token + `/wokerOrder/sign/distance`, params) let getSignDistance = async (params = {}) => await vm.$u.get('/wxh-worker-rest/rest/order/' + vm.vuex_token + `/wokerOrder/sign/distance`, params)
/**
* 获取订单的完工项目(配置+数据)
*/
let getCompleteConfigAndData= async (orderId) => await vm.$u.get(prefix+ vm.vuex_token+'/order/'+ orderId +'/maintain/info');
/**
* 查询措施
*/
let getMeasure= async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/service/'+ vm.vuex_token+'/measure/queryMeasureItems', params);
/**
* 保存售后记录
*/
let saveCompleteData = async (params = {},orderId) => await vm.$u.post(prefix+ vm.vuex_token+'/order/'+ orderId +'/maintain/saveMaintainInfoV2', params);
const orderApi = { const orderApi = {
listByRecommendOrder, listByRecommendOrder,
listOrderCount, listOrderCount,
...@@ -106,7 +123,6 @@ let orderApiFun = function(vm){ ...@@ -106,7 +123,6 @@ let orderApiFun = function(vm){
listOrderRecord, listOrderRecord,
orderAccept, orderAccept,
orderGan, orderGan,
maintainWorkerCheckin,
feedbackConfig, feedbackConfig,
traceAndAppointment, traceAndAppointment,
rejectOrder, rejectOrder,
...@@ -116,7 +132,10 @@ let orderApiFun = function(vm){ ...@@ -116,7 +132,10 @@ let orderApiFun = function(vm){
openTimerange, openTimerange,
contactTime, contactTime,
checkRejectable, checkRejectable,
getSignDistance getSignDistance,
getCompleteConfigAndData,
getMeasure,
saveCompleteData
} }
return orderApi return orderApi
} }
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</template> </template>
<script> <script>
let now = Date.now() let now = new Date(new Date().toLocaleDateString()).getTime()
export default { export default {
props: { props: {
titleShow: { titleShow: {
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
return { return {
currentDay: 0, currentDay: 0,
currentTime: null, currentTime: null,
appointTime: Date.now(), appointTime: now,
appointRange: "", appointRange: "",
num: 0, num: 0,
hasLast: false hasLast: false
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
watch: { watch: {
title() { title() {
this.currentDay = 0 this.currentDay = 0
this.appointTime = Date.now() this.appointTime = now
this.currentTime = null this.currentTime = null
this.appointRange = "" this.appointRange = ""
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<template> <template>
<view class="list"> <view class="list">
<view v-for="(item,index) in settings" :key="index" <view v-for="(item,index) in settings" :key="index"
:class="{'txt':true,'active':checkStatus(item)}" @click="setValue(item)">{{item}} :class="{'txt':true,'active':checkStatus(item.key)}" @click="setValue(item.key)">{{item.label}}
</view> </view>
</view> </view>
</template> </template>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
}, },
computed: { computed: {
settings() { settings() {
return this.item.settings || [] return this.item.fieldsOptions || []
} }
}, },
watch: {}, watch: {},
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<view class="icon-del rotate"></view> <view class="icon-del rotate"></view>
</view> </view>
</view> </view>
<view class="img-list" @click="choose"> <view class="img-list">
<u-image class="pic" width="170rpx" height="170" @click="selectUpload" src="https://gitee.com/xuqu/uView/blob/master/static/uview/example/min_button.png"></u-image> <u-image class="pic" width="170rpx" height="170" @click="selectUpload" src="https://gitee.com/xuqu/uView/blob/master/static/uview/example/min_button.png"></u-image>
</view> </view>
<!-- <u-image class="pic" v-for="item in 6" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image> --> <!-- <u-image class="pic" v-for="item in 6" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image> -->
...@@ -23,12 +23,12 @@ ...@@ -23,12 +23,12 @@
</template> </template>
<script> <script>
import objMixin from './objMixin' import arrMixin from './arrMixin'
import baseFile from '@/components/upload/index'; import baseFile from '@/components/upload/index';
export default { export default {
name: 'XhFiles', name: 'XhFiles',
components: {}, components: {},
mixins: [objMixin,baseFile], mixins: [arrMixin,baseFile],
props: { props: {
files: { files: {
type: Array, type: Array,
...@@ -60,17 +60,37 @@ ...@@ -60,17 +60,37 @@
}, },
'files': { // 处理相机拍照返回的图片 'files': { // 处理相机拍照返回的图片
handler (val) { handler (val) {
this.imgList = val.map(v => { if(val && val.length > 0){
v.path = v.src val.forEach((item,index,array)=>{
return v item.path = item.src
this.imgList.push(item)
}) })
// this.imgList = val.map(v => {
// v.path = v.src
// return v
// })
this.setValue() this.setValue()
}
}, },
deep:true, deep:true,
immediate: true, immediate: true,
},
// 'value'(val, oldVal){
// if(val){
// this.imgList = val.map(img =>{
// return {path:img}
// })
// }
// }
},
mounted() {
if(this.value){
this.imgList = this.value.map(img =>{
return {path: img}
})
} }
this.setValue()
}, },
mounted() {},
methods: { methods: {
selectUpload(){ selectUpload(){
// 弹窗展示 // 弹窗展示
...@@ -90,7 +110,7 @@ ...@@ -90,7 +110,7 @@
let config = { let config = {
options:{ options:{
sourceType:['album'],//['album', 'camera'] sourceType:['album'],//['album', 'camera']
count: 5, count: 10,
sizeType: ['compressed'] sizeType: ['compressed']
} }
} }
...@@ -104,9 +124,8 @@ ...@@ -104,9 +124,8 @@
setValue() { setValue() {
const dataValue = [] const dataValue = []
this.imgList.map(item=>{ this.imgList.map(item=>{
dataValue.push(item.key) dataValue.push(item.src)
}) })
console.log(this.imgList)
this.valueChange(dataValue) this.valueChange(dataValue)
}, },
prviewImage(url, index) { prviewImage(url, index) {
...@@ -117,14 +136,15 @@ ...@@ -117,14 +136,15 @@
}, },
delFile(index) { delFile(index) {
this.imgList.splice(index, 1) this.imgList.splice(index, 1)
this.setValue()
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pic{ .pic{
margin-right: 15rpx; // margin-right: 15rpx;
margin-bottom: 15rpx; // margin-bottom: 15rpx;
&:nth-child(3n){ &:nth-child(3n){
margin-right: 0; margin-right: 0;
} }
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
}, },
computed: { computed: {
type() { type() {
console.log(this.item)
if (this.item && this.item.fieldsType == 'password' || this.item.fieldsType == 'textarea') { if (this.item && this.item.fieldsType == 'password' || this.item.fieldsType == 'textarea') {
return this.item.fieldsType return this.item.fieldsType
} else { } else {
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<view class="list u-flex u-row-between"> <view class="list u-flex u-row-between">
<image class="item-image" :src="mixingImage" v-if="item.required"></image> <image class="item-image" :src="mixingImage" v-if="item.required"></image>
<view class="u-m-r-20">{{item.fieldsTitle}}</view> <view class="u-m-r-20">{{item.fieldsTitle}}</view>
<!-- <u-button type="primary" size="mini" @click="$u.debounce(getLocation,1000)">自动定位</u-button> -->
<view class="u-flex-1 location-name"> <view class="u-flex-1 location-name">
<u-icon name="map" color="#2979ff" size="30"></u-icon>自动定位 <u-icon name="map" color="#2979ff" size="30"></u-icon>自动定位
</view> </view>
...@@ -14,11 +13,11 @@ ...@@ -14,11 +13,11 @@
</template> </template>
<script> <script>
import objMixin from './objMixin' import arrMixin from './arrMixin'
export default { export default {
name: 'XhLocation', name: 'XhLocation',
components: {}, components: {},
mixins: [objMixin], mixins: [arrMixin],
props: {}, props: {},
filters:{}, filters:{},
data() { data() {
......
<!-- ******************* 单级/多级 选择 ******************* --> <!-- ******************* 服务措施 ******************* -->
<template> <template>
<view class="picker-box"> <view class="picker-box">
<view class="u-flex u-row-between" @click="openPicker"> <view class="u-flex u-row-between" @click="openPicker">
......
<!-- ******************* 单选框 ******************* --> <!-- ******************* 单选框 ******************* -->
<template> <template>
<view class="list"> <view class="list">
<view v-for="(item,index) in settings" :key="index" :class="{'txt':true,'active':item===dataValue}" <view v-for="(item,index) in settings" :key="index" :class="{'txt':true,'active':item.key===dataValue}"
@click="setValue(item)">{{item}}</view> @click="setValue(item.key)">{{item.label}}</view>
</view> </view>
</template> </template>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
}, },
computed: { computed: {
settings(){ settings(){
return this.item.settings || [] return this.item.fieldsOptions || []
} }
}, },
watch: {}, watch: {},
......
<!-- ******************* 单个下拉选择 ******************* --> <!-- ******************* 单个下拉选择 ******************* -->
<template> <template>
<view> <view>
<u-input v-model="dataValue" readOnly @click="show=true" type="select" /> <u-input :value="text" readOnly @click="show=true" type="select" />
<u-action-sheet :list="settings" v-model="show" @click="actionSheetCallback"></u-action-sheet> <u-action-sheet :list="settings" v-model="show" @click="actionSheetCallback"></u-action-sheet>
</view> </view>
</template> </template>
...@@ -28,22 +28,27 @@ ...@@ -28,22 +28,27 @@
}, },
settings() { settings() {
let result = [] let result = []
let settings = this.item.settings || [] let settings = this.item.fieldsOptions || []
result = settings.map(item => { result = settings.map(item => {
return { return {
text: item text: item.label,
id: item.key
} }
}) })
return result return result
},
text(){
let option = this.item.fieldsOptions.find(a=>{return a.key === this.dataValue})
return option?option.label:''
} }
}, },
watch: {}, watch: {},
mounted() {}, mounted() {},
methods: { methods: {
actionSheetCallback(index) { actionSheetCallback(index) {
let txt = this.settings[index].text; let id = this.settings[index].id;
this.dataValue = txt this.dataValue = id
this.valueChange(txt) this.valueChange(id)
} }
} }
} }
......
<!-- ******************* 单级/多级 选择 ******************* -->
<template>
<view class="picker-box">
<view class="u-flex u-row-between" @click="openPicker">
<view class="txt u-flex-1">{{text||''}}</view>
<u-icon name="arrow-right" color="#666" size="28"></u-icon>
</view>
<u-picker v-model="showPicker" range-key="label" @columnchange="columnchange" :mode="isNotMulti?'selector':'multiSelector'" @confirm="pickerConfirm" :range="settings"></u-picker>
<!-- :default-selector='[0, 1]' -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import objMixin from './objMixin'
export default {
name: 'XhPicker',
components: {},
mixins: [objMixin],
props: {
// 当mode=selector或者mode=multiSelector时,提供的默认选中的下标
defaultSelector: {
type: Array,
default() {
return [0];
}
},
// 当 range 是一个 Array<Object> 时,通过 range-key 来指定 Object 中 key 的值作为选择器显示内容
rangeKey: {
type: String,
default: 'label'
},
value: {
type: String,
default: '{}'
},
orderId:{
type:Number,
default:0
},
categoryId:{
type:Number,
default:0
},
specificationId:{
type:String,
default:'0'
},
orderServiceType:{
type: String,
default: '安装'
},
},
filters:{},
data() {
return {
isNotMulti:true,
showPicker:false,
settings:[],
measure:[]
}
},
computed: {
text(){
let val = ''
if(this.value){
let data = JSON.parse(this.value);
val = data[0].measureTypeName + "-" + data[0].measureName
}
return val
}
},
watch: {
specificationId(val, oldVal){
this.initComponent()
},
},
mounted() {
this.isNotMulti = this.orderServiceType === '安装'
this.initComponent()
},
methods: {
openPicker(){
if(this.specificationId === '0'){
this.$refs.uToast.show({
title: '请先选择规格',
type: 'error'
})
return
}
this.showPicker = true
},
initComponent(){
if(this.isNotMulti){
this.initMeasure()
}else{
this.initSymptoms()
}
},
initSymptoms(){// 初始化现象
},
initCause(){// 初始化原因
},
initMeasure(){// 初始化措施
let self = this
if(self.orderId){
let param = {
orderId: self.orderId,
categoryId: self.categoryId,
specificationId: self.specificationId,
orderServiceTypeText: self.orderServiceType
}
self.$u.api.getMeasure(param).then((res) => {
if (res.code == 200) {
let result = []
for(let key in res.data){
self.measure = res.data[key].measureExtendDtos
res.data[key].measureExtendDtos.map((item,index) =>{
result.push({"id":item.measureId,"label":item.measureName})
})
}
if(self.orderServiceType === '安装'){
self.settings = result
}else{
self.settings[2] = result
}
} else {
console.log(res.message, "查询措施失败");
}
});
}
},
pickerConfirm(data){
let result = []
if(this.isMulti){// 维修
}else{// 安装
result.push(this.measure[data[0]])
}
this.valueChange(JSON.stringify(result))
},
columnchange(data){
// console.log(data,'data')
// // 树列改变时进行联动操作
// const {column ,index} = data
// let arr = [9,10,50]
// this.settings.splice(column+1,1,arr)
// console.log(this.settings,'this.settings')
},
}
}
</script>
<style lang="scss" scoped>
</style>
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<template> <template>
<view class="picker-box"> <view class="picker-box">
<view class="u-flex u-row-between" @click="openPicker"> <view class="u-flex u-row-between" @click="openPicker">
<view class="txt">{{item.fieldsTitle}}</view> <!-- <view class="txt">{{item.fieldsTitle}}</view> -->
<view class="txt u-flex-1">{{dataValue}}</view> <view class="txt u-flex-1">{{dataValue||'请选择时间'}}</view>
<u-icon name="arrow-right" color="#666" size="28"></u-icon> <u-icon name="arrow-right" color="#666" size="28"></u-icon>
</view> </view>
<u-picker :params="params" v-model="showPicker" mode="time" @confirm="pickerConfirm"></u-picker> <u-picker :params="params" v-model="showPicker" mode="time" @confirm="pickerConfirm"></u-picker>
...@@ -25,10 +25,9 @@ ...@@ -25,10 +25,9 @@
year: true, year: true,
month: true, month: true,
day: true, day: true,
hour: true, hour: false,
minute: true, minute: false,
second: true, second: false,
// 选择时间的时间戳
timestamp: true, timestamp: true,
} }
} }
...@@ -49,11 +48,8 @@ ...@@ -49,11 +48,8 @@
this.showPicker = true this.showPicker = true
}, },
pickerConfirm(data) { pickerConfirm(data) {
console.log(data, 'DATA')
let result = [] let result = []
let dataValue = data.year + '-' + data.month + '-' + data.day + ' ' + data.hour + ':' + data.minute + let dataValue = data.year + '-' + data.month + '-' + data.day
':' + data.second
console.log(dataValue, 'dataValue')
this.dataValue = dataValue this.dataValue = dataValue
this.valueChange(dataValue) this.valueChange(dataValue)
}, },
......
/** 自定义组件 共同逻辑 */
export default {
data() {
return {
dataValue:null
}
},
watch: {
value: function(val) {
this.dataValue = val
}
},
props: {
value: {
type: Array,
default: []
},
/** 索引值 用于更新数据 */
itemIndex: Number,
groupIndex: Number,
/** 包含数据源 */
item: Object,
disabled: {
type: Boolean,
default: false
}
},
mounted() {
/** 如果有值以传入值为主 如果无值 已默认值为主 */
this.dataValue = this.value
},
methods: {
// 输入的值
valueChange(val) {
const data = {
groupIndex: this.groupIndex, // 左侧菜单下标
itemIndex: this.itemIndex, //右侧某一项下标
value: val
}
this.$emit('value-change', data)
}
}
}
...@@ -62,8 +62,7 @@ export default { ...@@ -62,8 +62,7 @@ export default {
console.log("标识符4", this.userExamId); console.log("标识符4", this.userExamId);
console.log("标识符3" + num); console.log("标识符3" + num);
this.userExamId = num; this.userExamId = num.userExamId;
this.getExaminationQuestions(); this.getExaminationQuestions();
}, },
onUnload() { onUnload() {
...@@ -112,7 +111,7 @@ export default { ...@@ -112,7 +111,7 @@ export default {
"/serviceRule/next/" + "/serviceRule/next/" +
this.vuex_token + this.vuex_token +
"?userExamId=" + "?userExamId=" +
this.userExamId.userExamId, this.userExamId,
method: "POST", method: "POST",
header: { header: {
"Content-Type": "application/x-www-form-urlencoded", "Content-Type": "application/x-www-form-urlencoded",
...@@ -134,7 +133,7 @@ export default { ...@@ -134,7 +133,7 @@ export default {
this.isQuestion = ""; this.isQuestion = "";
console.log("标识符6666", this.userExamId.userExamId); console.log("标识符6666", this.userExamId.userExamId);
wx.navigateTo({ wx.navigateTo({
url: "./result?userExamId=" + this.userExamId.userExamId, url: "./result?userExamId=" + this.userExamId,
}); });
} }
//判断有没有选 //判断有没有选
...@@ -154,7 +153,7 @@ export default { ...@@ -154,7 +153,7 @@ export default {
"/serviceRule/next/" + "/serviceRule/next/" +
this.vuex_token + this.vuex_token +
"?userExamId=" + "?userExamId=" +
this.userExamId.userExamId + this.userExamId +
"&questionId=" + "&questionId=" +
this.ExaminationQuestions.question.id + this.ExaminationQuestions.question.id +
"&userAnswerIds=" + "&userAnswerIds=" +
......
<template> <template>
<view class="study"> <view class="study">
<u-navbar <u-navbar :is-back="false" background="{background: transparent}" :border-bottom="false" :is-fixed="false">
:is-back="false"
background="{background: transparent}"
:border-bottom="false"
:is-fixed="false"
>
<text class="title-view">学习</text> <text class="title-view">学习</text>
</u-navbar> </u-navbar>
<image :src="bannerImage" mode="" class="banner"></image> <image :src="bannerImage" mode="" class="banner"></image>
<view> <view>
<u-tabs-swiper <u-tabs-swiper bg-color="#F4F5F7" inactive-color="#999999" font-size="28" ref="uTabs" :list="tabs"
bg-color="#F4F5F7" :current="current" @change="tabsChange" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
inactive-color="#999999" </view>
font-size="28" <swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish"
ref="uTabs" style="height: 755rpx;">
:list="tabs"
:current="current"
@change="tabsChange"
:is-scroll="false"
swiperWidth="750"
></u-tabs-swiper>
</view>
<swiper
:current="swiperCurrent"
@transition="transition"
@animationfinish="animationfinish"
style="height: 755rpx"
>
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<scroll-view <scroll-view scroll-y style="height:796rpx;width:100%;" @scrolltolower="onreachBottom">
scroll-y
style="height: 796rpx; width: 100%"
@scrolltolower="onreachBottom"
>
<view class="standard" @click="goToPrint"> <view class="standard" @click="goToPrint">
<text>充电桩交付规范</text> <text>充电桩交付规范</text>
<text>></text> <text>></text>
...@@ -41,20 +19,13 @@ ...@@ -41,20 +19,13 @@
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<scroll-view <scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onreachBottom">
scroll-y <view v-for="item in list" :key="item.id" class="notice" @click="bbb(item)">
style="height: 100%; width: 100%" <view class="n-head">
@scrolltolower="onreachBottom" 《{{item.title}}》
> </view>
<view
v-for="item in list"
:key="item.id"
class="notice"
@click="bbb(item)"
>
<view class="n-head"> 《{{ item.title }}》 </view>
<view class="news" v-html="item.body"> <view class="news" v-html="item.body">
{{ item.body }} {{item.body}}
</view> </view>
</view> </view>
<view v-shou="isLoadMore"> <view v-shou="isLoadMore">
...@@ -63,116 +34,68 @@ ...@@ -63,116 +34,68 @@
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item class="swiper-item"> <swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%; width: 100%"> <scroll-view scroll-y style="height:100%;width:100%;">
<view class="lean"> <view class="lean">
<view class="top"> <view class="top">
<view class="title u-margin-top-10 u-margin-bottom-30">通用课程</view>
<view class="currency-class"> <view class="currency-class">
<view class="title">通用课程</view> <view class="class1" @click=ccc(courselist[0].id)>
<view <image class="img" :src="courselist[0].pic" mode=""></image>
class="class1"
@click="ccc(courselist[0].id)"
>
<image
class="img"
:src="courselist[0].pic"
mode=""
></image>
<view class="right"> <view class="right">
<view class=""> <view class="u-font-32 font-bold">
{{ courselist[0].title }} {{ courselist[0].title }}
</view> </view>
<view class="intro"> <view class="u-font-24">
{{ courselist[0].desc }} {{ courselist[0].desc }}
</view> </view>
<view <view class="line-percent">
class="" <u-line-progress active-color="#2979ff" :percent="courselist[0].percent"
style=" :show-percent="false">
display: flex;
justify-content: space-between;
"
>
<u-line-progress
active-color="#2979ff"
:percent="courselist[0].percent"
style="width: 54%"
>
</u-line-progress> </u-line-progress>
<text <text class="font-default-color"
v-text="courselist[0].status" :class="{'font-active-color':courselist[0].percent}"
></text> v-text="courselist[0].status"></text>
</view> </view>
</view> </view>
</view> </view>
<view <view class="class1 u-margin-top-40" @click=ccc(courselist[1].id)>
class="class1" <image class="img" :src="courselist[1].pic" mode=""></image>
@click="ccc(courselist[1].id)"
>
<image
class="img"
:src="courselist[1].pic"
mode=""
></image>
<view class="right"> <view class="right">
<view class=""> <view class="u-font-32 font-bold">
{{ courselist[1].title }} {{ courselist[1].title }}
</view> </view>
<view class=""> <view class="u-font-24">
{{ courselist[1].desc }} {{ courselist[1].desc }}
</view> </view>
<view <view class="line-percent">
class="" <u-line-progress active-color="#2979ff" :percent="courselist[1].percent"
style=" :show-percent="false">
display: flex;
justify-content: space-between;
"
>
<u-line-progress
active-color="#2979ff"
:percent="courselist[1].percent"
style="width: 54%"
>
</u-line-progress> </u-line-progress>
<text <text class="font-default-color"
v-text="courselist[1].status" :class="{'font-active-color':courselist[1].percent}"
></text> v-text="courselist[1].status"></text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="title u-margin-top-50 u-margin-bottom-30">技能课程</view>
<view class="currency-class"> <view class="currency-class">
<view class="title">技能课程</view> <view class="class1" @click=ccc(courselist[2].id)>
<view <image class="img" :src="courselist[2].pic" mode=""></image>
class="class1"
@click="ccc(courselist[2].id)"
>
<image
class="img"
:src="courselist[2].pic"
mode=""
></image>
<view class="right"> <view class="right">
<view class=""> <view class="u-font-32 font-bold">
{{ courselist[2].title }} {{ courselist[2].title }}
</view> </view>
<view class=""> <view class="u-font-24">
{{ courselist[2].desc }} {{ courselist[2].desc }}
</view> </view>
<view <view class="line-percent" style="display:flex;justify-content: space-between;">
class="" <u-line-progress active-color="#2979ff" :percent="courselist[2].percent"
style=" :show-percent="false">
display: flex;
justify-content: space-between;
"
>
<u-line-progress
active-color="#2979ff"
:percent="courselist[2].percent"
style="width: 54%"
>
</u-line-progress> </u-line-progress>
<text <text class="font-default-color"
v-text="courselist[2].status" :class="{'font-active-color':courselist[2].percent}"
></text> v-text="courselist[2].status"></text>
</view> </view>
</view> </view>
</view> </view>
...@@ -182,91 +105,55 @@ ...@@ -182,91 +105,55 @@
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item> <swiper-item>
<scroll-view <scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onreachBottom">
scroll-y
style="height: 100%; width: 100%"
@scrolltolower="onreachBottom"
>
<view class="lean"> <view class="lean">
<view class="top"> <view class="top">
<view class="title u-margin-top-10 u-margin-bottom-30">通用认证</view>
<view class="currency-class"> <view class="currency-class">
<text class="title">通用认证</text>
<view class="class1" @click="aaa"> <view class="class1" @click="aaa">
<image <image class="img" src="../../static/logo.png" mode=""></image>
class="img"
src="../../static/logo.png"
mode=""
></image>
<view class="right"> <view class="right">
<view class=""> 服务规范 </view> <view class="u-font-32 font-bold">
<view class=""> 服务规范
</view>
<view class="u-font-24">
通过本认证,是接单的前提条件 通过本认证,是接单的前提条件
</view> </view>
<view <view class="" style="display:flex;justify-content: space-between;">
class="" <text style="color: #a69999;">随机20题,及格20题</text>
style="
display: flex;
justify-content: space-between;
"
>
<text style="color: #a69999"
>随机20题,及格20题</text
>
<text>通过</text> <text>通过</text>
</view> </view>
</view> </view>
</view> </view>
<view class="class1" @click="aaa"> <view class="class1 u-margin-top-40" @click="aaa">
<image <image class="img" src="../../static/logo.png" mode=""></image>
class="img"
src="../../static/logo.png"
mode=""
></image>
<view class="right"> <view class="right">
<view class=""> 接单操作 </view> <view class="u-font-32 font-bold">
<view class=""> 接单操作
</view>
<view class="u-font-24">
快速认证,是否具备接单操作能力 快速认证,是否具备接单操作能力
</view> </view>
<view <view class="" style="display:flex;justify-content: space-between;">
class="" <text style="color: #a69999">随机20题,及格16题</text>
style="
display: flex;
justify-content: space-between;
"
>
<text style="color: #a69999"
>随机20题,及格16题</text
>
<text>未通过</text> <text>未通过</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="title u-margin-top-50 u-margin-bottom-30">技能认证</view>
<view class="currency-class"> <view class="currency-class">
<text class="title">技能认证</text>
<view class="class1" @click="aaa"> <view class="class1" @click="aaa">
<image <image class="img" src="../../static/logo.png" mode=""></image>
class="img"
src="../../static/logo.png"
mode=""
></image>
<view class="right"> <view class="right">
<view class=""> <view class="u-font-32 font-bold">
从0-1学习充电桩安装服务 从0-1学习充电桩安装服务
</view> </view>
<view class=""> <view class="u-font-24">
通过本认证后,可接充电桩业务单 通过本认证后,可接充电桩业务单
</view> </view>
<view <view class="" style="display:flex;justify-content: space-between;">
class="" <text style="color: #a69999;">随机30题,及格25题</text>
style="
display: flex;
justify-content: space-between;
"
>
<text style="color: #a69999"
>随机30题,及格25题</text
>
<text>未通过</text> <text>未通过</text>
</view> </view>
</view> </view>
...@@ -281,12 +168,11 @@ ...@@ -281,12 +168,11 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
msg: "赣南吴彦祖", msg: "赣南吴彦祖",
tabs: [ tabs: [{
{
name: "交付规范", name: "交付规范",
}, },
{ {
...@@ -305,31 +191,30 @@ export default { ...@@ -305,31 +191,30 @@ export default {
start: 0, start: 0,
}, },
list: [], list: [],
courselist: [ courselist: [{
{ title: '服务规范',
title: "服务规范", desc: '为用户提供更好服务,自己赚更多钱',
desc: "为用户提供更好服务,自己赚更多钱",
percent: 0, percent: 0,
status: "", status: '',
pic: process.uniEnv.qn_base_url + "guifan1@3x.png", pic: process.uniEnv.qn_base_url + "guifan1@3x.png",
id: 173, id: 173
}, },
{ {
title: "接单操作", title: '接单操作',
desc: "快速学习,使用APP 接单、抢单", desc: '快速学习,使用APP 接单、抢单',
percent: 0, percent: 0,
status: "", status: '',
pic: process.uniEnv.qn_base_url + "guifan2@3x.png", pic: process.uniEnv.qn_base_url + "guifan2@3x.png",
id: 173, id: 173
}, },
{ {
title: "从0-1学习充电桩安装服务", title: '从0-1学习充电桩安装服务',
desc: "让你全面了解充电桩市场及服务规范", desc: '让你全面了解充电桩市场及服务规范',
percent: 0, percent: 0,
status: "", status: '',
pic: process.uniEnv.qn_base_url + "kecehng1@3x.png", pic: process.uniEnv.qn_base_url + "kecehng1@3x.png",
id: 173, id: 173
}, }
], ],
loadStatus: "loading", //加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式 loadStatus: "loading", //加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore: false, //是否加载中 isLoadMore: false, //是否加载中
...@@ -391,11 +276,11 @@ export default { ...@@ -391,11 +276,11 @@ export default {
}, },
getTypeName(percent) { getTypeName(percent) {
if (percent == 0) { if (percent == 0) {
return "未开始"; return '未开始';
} else if (percent == "100") { } else if (percent == '100') {
return "已完成"; return '已完成';
} else { } else {
return "继续"; return '继续';
} }
}, },
//在线学习通用课程信息 //在线学习通用课程信息
...@@ -403,18 +288,16 @@ export default { ...@@ -403,18 +288,16 @@ export default {
let courseLength = this.courselist.length; let courseLength = this.courselist.length;
for (let i = 0; i < courseLength; i++) { for (let i = 0; i < courseLength; i++) {
let param = { let param = {
course_id: this.courselist[i].id, course_id: this.courselist[i].id
}; };
this.$u.api this.$u.api
.CourseList(param) .CourseList(param)
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
if (res.data) { if (res.data) {
this.courselist[i].status = this.getTypeName( res.data.learnedInfo.learnPercent *= 100;
res.data.learnedInfo.learnPercent this.courselist[i].status = this.getTypeName(res.data.learnedInfo.learnPercent);
); this.courselist[i].percent = res.data.learnedInfo.learnPercent;
this.courselist[i].percent =
res.data.learnedInfo.learnPercent;
} }
} }
}) })
...@@ -437,7 +320,7 @@ export default { ...@@ -437,7 +320,7 @@ export default {
break; break;
case 2: case 2:
this.getCourseList(); this.getCourseList();
console.log("重新加载学习进度"); console.log('重新加载学习进度');
break; break;
case 3: case 3:
this.getUserExamInfo(); this.getUserExamInfo();
...@@ -532,12 +415,12 @@ export default { ...@@ -532,12 +415,12 @@ export default {
}); });
let that = this; let that = this;
let token = uni.getStorageSync('lifeData').vuex_token;
uni.request({ uni.request({
url: url: "http://192.168.1.22" +
"http://192.168.1.22" +
"/wxh-worker-rest/rest/exam" + "/wxh-worker-rest/rest/exam" +
"/serviceRule/userExamInfo/" + "/serviceRule/userExamInfo/" +
that.vuex_token + token +
"?examId=" + "?examId=" +
2, 2,
method: "POST", method: "POST",
...@@ -596,115 +479,142 @@ export default { ...@@ -596,115 +479,142 @@ export default {
}); });
}, },
}, },
}; };
</script> </script>
<style> <style>
.study { .study {
height: 100vh; height: 100vh;
background-color: #f4f5f7; background-color: #f4f5f7;
padding: 0rpx 30rpx 0 30rpx; padding: 0rpx 30rpx 0 30rpx;
} }
.title-view { .title-view {
color: #333333; color: #333333;
font-weight: bold; font-weight: bold;
font-size: 40rpx; font-size: 40rpx;
} }
.banner { .banner {
width: 690rpx; width: 690rpx;
height: 240rpx; height: 240rpx;
margin-top: 10rpx; margin-top: 10rpx;
} }
/* //交付规范 */ /* //交付规范 */
.standard { .standard {
width: 656rpx; width: 656rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
border-bottom: 1rpx solid #82848a; border-bottom: 1rpx solid #82848a;
padding: 0 34rpx; padding: 0 34rpx;
margin: 72rpx auto; margin: 72rpx auto;
} }
/* //培训通知 */ /* //培训通知 */
.notice { .notice {
border: #808080 solid 2rpx; border: #808080 solid 2rpx;
width: 100%; width: 100%;
height: 400rpx; height: 400rpx;
margin-top: 36rpx; margin-top: 36rpx;
overflow: hidden; overflow: hidden;
} }
.n-head { .n-head {
text-align: center; text-align: center;
margin: 32rpx 0; margin: 32rpx 0;
} }
.news { .news {}
}
/* //在线学习 */ /* //在线学习 */
.currency-class { .currency-class {
width: 100%; width: 100%;
/* height: 340rpx; */
background: #ffffff; background: #ffffff;
padding: 18rpx; padding: 30rpx;
margin-bottom: 11px; /* margin-bottom: 11px; */
border-radius: 12rpx; border-radius: 12rpx;
} }
.title { .title {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
font-family: PingFang-SC-Bold, PingFang-SC; font-family: PingFang-SC-Bold, PingFang-SC;
} }
.class1 { .class1 {
display: -webkit-box;
display: -webkit-flex;
display: flex; display: flex;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between; justify-content: space-between;
padding-top: 22rpx; }
margin-top: 28rpx;
border-top: 1rpx solid #808080;
}
.img { .img {
width: 201rpx; width: 160rpx;
height: 201rpx; height: 120rpx;
display: block; /* display: block; */
margin-right: 0rpx; /* margin-right: 0rpx; */
} }
.right { .right {
width: 428rpx; width: 434rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
} }
.intro { .intro {
color: #9999a6; color: #9999a6;
} }
.tab { .tab {
background: #fff; background: #fff;
height: 82rpx; height: 82rpx;
margin: 0 0; margin: 0 0;
} }
.text { .text {
margin: 0 40rpx; margin: 0 40rpx;
line-height: 82rpx; line-height: 82rpx;
color: #667eb5; color: #667eb5;
} }
.content { .content {
margin: 5px 0; margin: 5px 0;
height: 485rpx; height: 485rpx;
background: #fff; background: #fff;
} }
swiper { swiper {
height: 691rpx; height: 691rpx;
} }
.line-percent {
display: flex;
justify-content: space-between;
line-height: 24rpx;
font-size: 24rpx;
color: #999999;
}
.u-progress {
width: 280rpx !important;
height: 12rpx !important;
background-color: #ececec;
}
.font-bold {
font-weight: bold;
}
.font-default-color {
color: #999999;
}
.font-active-color {
color: #2272FF;
}
</style> </style>
...@@ -2,69 +2,70 @@ ...@@ -2,69 +2,70 @@
<view> <view>
<view class="u-wrap" v-if="!takeStatus"> <view class="u-wrap" v-if="!takeStatus">
<u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="26" title-color="#fff" :border-bottom="false" title="完工信息"></u-navbar> <u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="26" title-color="#fff" :border-bottom="false" title="完工信息"></u-navbar>
<u-tabs-swiper ref="tabs" :current="tabIndex" :list="list" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="120"></u-tabs-swiper> <u-tabs-swiper ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="120"></u-tabs-swiper>
<view class="u-menu-wrap"> <view class="u-menu-wrap">
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" <scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" :scroll-into-view="itemId" v-if="list[tabIndex].items.length > 1">
:scroll-into-view="itemId"> <view v-for="(item,index) in list[tabIndex].items" :key="index" class="u-tab-item"
<view v-for="(item,index) in groupList" :key="index" class="u-tab-item"
:class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)"> :class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
<text class="u-line-1">{{item.groupName}}</text> <text class="u-line-1">{{item.name}}</text>
</view> </view>
</scroll-view> </scroll-view>
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" <scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll">
@scroll="rightScroll">
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<template v-for="(groupItem,groupIndex) in groupList"> <template v-for="(groupItem, groupIndex) in (list.length>0?list[tabIndex].items:[])">
<view class="class-item" :key="groupIndex"> <view class="class-item" :key="groupIndex">
<view class="title">{{groupItem.groupName}}</view> <view class="title">{{groupItem.name}}</view>
<view class="class-bd"> <view class="class-bd">
<u-form-item v-for="(item,itemIndex) in groupItem.item" :key="itemIndex" <u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex"
label-position="top" :prop="item.fieldsName" :border-bottom="false"> label-position="top" :prop="item.fieldsName" :border-bottom="false">
<view class="label" v-if="item.fieldsType!=='location'"> <view class="label" v-if="typeToComponentType(item.fieldsType)!=='location'">
<!-- <text class="required" v-if="item.required">*</text> -->
<image class="item-image" :src="mixingImage" v-if="item.required"></image> <image class="item-image" :src="mixingImage" v-if="item.required"></image>
{{item.fieldsTitle}} {{item.fieldsTitle}}
</view> </view>
<template v-if="item.fieldsType"> <template v-if="item.fieldsType">
<xh-input v-if="typeToComponentType(item.fieldsType)==='input'" :groupIndex="groupIndex" <xh-input v-if="typeToComponentType(item.fieldsType)==='input'" :groupIndex="groupIndex"
:itemIndex="itemIndex" :item="item" @value-change="fieldValueChange"> :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""' @value-change="fieldValueChange">
</xh-input> </xh-input>
<xh-multi-input v-else-if="typeToComponentType(item.fieldsType)==='multiinput'" <xh-multi-input v-else-if="typeToComponentType(item.fieldsType)==='multiinput'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-multi-input> </xh-multi-input>
<xh-radio v-else-if="typeToComponentType(item.fieldsType)==='radio'" <xh-radio v-else-if="typeToComponentType(item.fieldsType)==='radio'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-radio> </xh-radio>
<xh-checkbox v-else-if="typeToComponentType(item.fieldsType)==='checkbox'" <xh-checkbox v-else-if="typeToComponentType(item.fieldsType)==='checkbox'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-checkbox> </xh-checkbox>
<xh-select v-else-if="typeToComponentType(item.fieldsType)==='select'" <xh-select v-else-if="typeToComponentType(item.fieldsType)==='select'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-select> </xh-select>
<xh-files v-else-if="typeToComponentType(item.fieldsType)==='file'" <xh-files v-else-if="typeToComponentType(item.fieldsType)==='file'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || []'
:files="files[itemIndex.toString()]" :files="files[itemIndex.toString()]"
@value-change="fieldValueChange" @getTakeStatus="getTakeStatus"> @value-change="fieldValueChange" @getTakeStatus="getTakeStatus">
</xh-files> </xh-files>
<xh-location v-else-if="typeToComponentType(item.fieldsType)==='location'" <xh-location v-else-if="typeToComponentType(item.fieldsType)==='location'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-location> </xh-location>
<xh-scan v-else-if="typeToComponentType(item.fieldsType)==='scan'" <xh-scan v-else-if="typeToComponentType(item.fieldsType)==='scan'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-scan> </xh-scan>
<xh-picker v-else-if="typeToComponentType(item.fieldsType)==='picker'" <xh-picker v-else-if="typeToComponentType(item.fieldsType)==='picker'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-picker> </xh-picker>
<xh-service-measure v-else-if="typeToComponentType(item.fieldsType)==='servicemeasure'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :orderId="orderId" :categoryId="categoryId"
:orderServiceType="orderServiceType" :specificationId="form['specificationId'] || 0" :value="form[item.fieldsName]"
@value-change="fieldValueChange">
</xh-service-measure>
<xh-time v-else-if="typeToComponentType(item.fieldsType)==='time'" <xh-time v-else-if="typeToComponentType(item.fieldsType)==='time'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-time> </xh-time>
</template> </template>
...@@ -76,7 +77,7 @@ ...@@ -76,7 +77,7 @@
</scroll-view> </scroll-view>
</view> </view>
<view class="btn-wrap flex-xc"> <view class="btn-wrap flex-xc">
<u-button class="btn-submit" @click="$u.debounce(nextStep, 500)" :custom-style="buttonStyle" <u-button class="btn-submit" @click="nextStep" :custom-style="buttonStyle"
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'"> type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
下一步 下一步
</u-button> </u-button>
...@@ -98,22 +99,16 @@ ...@@ -98,22 +99,16 @@
import XhPicker from '@/components/createCom/XhPicker.vue' import XhPicker from '@/components/createCom/XhPicker.vue'
import XhTime from '@/components/createCom/XhTime.vue' import XhTime from '@/components/createCom/XhTime.vue'
import takePhoto from '@/components/take/index.vue' import takePhoto from '@/components/take/index.vue'
import XhServiceMeasure from '@/components/createCom/XhServiceMeasure.vue'
// import XhRadio from '@/components/createCom/XhRadio.vue' // import XhRadio from '@/components/createCom/XhRadio.vue'
export default { export default {
data() { data() {
return { return {
list: [ orderId:0,
{ categoryId:0,
name: '基础信息' orderServiceType:'',
}, list: [],
{ tabIndex: 0,
name: '勘察信息'
},
{
name: '安装信息'
}
],
tabIndex: 1,
scrollTop: 0, //tab标题的滚动条位置 scrollTop: 0, //tab标题的滚动条位置
oldScrollTop: 0, oldScrollTop: 0,
current: 0, // 预设当前项的值 current: 0, // 预设当前项的值
...@@ -126,8 +121,6 @@ ...@@ -126,8 +121,6 @@
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度 scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
timer: null, // 定时器 timer: null, // 定时器
form: { // 一维表单 form: { // 一维表单
name: 'name',
radio: ''
}, },
rules: { rules: {
name: [{ name: [{
...@@ -172,13 +165,23 @@ ...@@ -172,13 +165,23 @@
XhScan, XhScan,
XhPicker, XhPicker,
XhTime, XhTime,
XhServiceMeasure,
'take-photo': takePhoto 'take-photo': takePhoto
}, },
created() { created() {
// console.log(allComponents,'allComponents') // console.log(allComponents,'allComponents')
}, },
onLoad() { onLoad(option) {
console.log(option)
if (option) {
this.orderId = option.orderId
this.categoryId = option.categoryId
this.orderServiceType = option.orderServiceType
} else {
this.orderId = 9708719
this.categoryId = 88
this.orderServiceType = '安装'
}
}, },
onReady() { onReady() {
this.$refs.uForm.setRules(this.rules); this.$refs.uForm.setRules(this.rules);
...@@ -189,6 +192,18 @@ ...@@ -189,6 +192,18 @@
//console.log(this.form.name, 'form.name') //console.log(this.form.name, 'form.name')
}, },
computed: { computed: {
getCompleteData() {
let self = this
if(self.orderId){
self.$u.api.getCompleteConfigAndData(self.orderId).then((res) => {
if (res.code == 200) {
self.list = res.data.config
} else {
console.log(res.message, "获取订单详情失败!");
}
});
}
},
mixingImage() { mixingImage() {
return process.uniEnv.qn_base_url + 'mixing.png' return process.uniEnv.qn_base_url + 'mixing.png'
}, },
...@@ -216,6 +231,16 @@ ...@@ -216,6 +231,16 @@
this.fileIndex = event.index.toString() this.fileIndex = event.index.toString()
if(!this.files[event.index] || this.files[event.index].length < 1) this.files[event.index] = [] if(!this.files[event.index] || this.files[event.index].length < 1) this.files[event.index] = []
}, },
tabsChange(index){
this.tabIndex = index
this.arr = []
this.scrollRightTop = 0;
this.current = 0;
this.leftMenuStatus(0)
this.$nextTick(function() {
this.getMenuItemTop()
})
},
closeTake(images) { closeTake(images) {
this.takeStatus = false this.takeStatus = false
//const newFile = this.files[this.fileIndex].concat(images) //const newFile = this.files[this.fileIndex].concat(images)
...@@ -223,25 +248,28 @@ ...@@ -223,25 +248,28 @@
}, },
// 字段的值更新 // 字段的值更新
fieldValueChange(data) { fieldValueChange(data) {
// data.groupIndex data.itemIndex值下标 data.value //值 const groupItem = this.list[this.tabIndex].items[data.groupIndex]
console.log(data, 'data')
const groupItem = this.groupList[data.groupIndex]
let innerItem let innerItem
if (groupItem.item) { if (groupItem.items) {
innerItem = groupItem.item[data.itemIndex] innerItem = groupItem.items[data.itemIndex]
} }
console.log(data.value,'data.value',innerItem, 'innerItem')
if(innerItem.fieldsType ==='multiInput'){ if(innerItem.fieldsType ==='multiInput'){
// 多个输入框的值触发 // 多个输入框的值触发
let key = Object.keys(data.value)[0] let key = Object.keys(data.value)[0]
this.form[key] = data.value[key] this.form[key] = data.value[key]
}else{ }else{
this.form[innerItem.fieldsName] = data.value this.$set(this.form,innerItem.fieldsName,data.value)
} }
console.log(this.form, 'this.form') console.log(this.form, 'this.form')
}, },
nextStep(item) { nextStep() {
if (this.tabIndex < 3) this.tabIndex++ if (this.tabIndex < this.list.length) {
this.tabIndex++
this.arr = []
this.$nextTick(function() {
this.getMenuItemTop()
})
}
}, },
typeToComponentType(type) { typeToComponentType(type) {
// 将fieldType类型统一转换为公共组件判定类型 // 将fieldType类型统一转换为公共组件判定类型
...@@ -252,12 +280,15 @@ ...@@ -252,12 +280,15 @@
case 'password': case 'password':
case 'textarea': case 'textarea':
case 'number': case 'number':
case 'decimal':
case 'double':
formType = 'input' formType = 'input'
break break
case 'multiinput': case 'multiinput':
formType = 'multiinput' formType = 'multiinput'
break; break;
case 'select': case 'select':
case 'specifications':
formType = 'select' formType = 'select'
break break
case 'radio': case 'radio':
...@@ -267,6 +298,7 @@ ...@@ -267,6 +298,7 @@
formType = 'checkbox' formType = 'checkbox'
break break
case 'file': case 'file':
case 'photos':
formType = 'file' formType = 'file'
break break
case 'location': case 'location':
...@@ -279,11 +311,14 @@ ...@@ -279,11 +311,14 @@
case 'mutipicker': case 'mutipicker':
formType = 'picker' formType = 'picker'
break break
case 'service_measures':
formType = 'servicemeasure'
break
case 'time': case 'time':
case 'date':
formType = 'time' formType = 'time'
break break
} }
//console.log(formType,'formType')
return formType return formType
}, },
// ------------------------- 以下方法为展示滚动切换 ------------------------- // ------------------------- 以下方法为展示滚动切换 -------------------------
......
...@@ -223,7 +223,6 @@ ...@@ -223,7 +223,6 @@
} else { } else {
// 异常处理 // 异常处理
} }
this.orderId = '8371315'
this.loadOrderDetail() this.loadOrderDetail()
this.loadOrderRecord() this.loadOrderRecord()
this.getLocation() this.getLocation()
...@@ -535,6 +534,8 @@ ...@@ -535,6 +534,8 @@
// 去完工 // 去完工
uni.navigateTo({ uni.navigateTo({
url: 'pages/order/complete?orderId='+this.order.orderId url: 'pages/order/complete?orderId='+this.order.orderId
+ "&categoryId=" + this.order.categoryId
+ "&orderServiceType=" + this.order.orderServiceType
}) })
}, },
rejectOrder() { // 拒单 rejectOrder() { // 拒单
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</template> </template>
<script> <script>
let now = Date.now() let now = new Date(new Date().toLocaleDateString()).getTime()
import appointTime from '@/components/appoint/appoint-time.vue' import appointTime from '@/components/appoint/appoint-time.vue'
export default { export default {
data() { data() {
...@@ -132,7 +132,8 @@ ...@@ -132,7 +132,8 @@
nextTraceDatetime: '', // 下次跟踪时间 nextTraceDatetime: '', // 下次跟踪时间
remark: '', // 备注 remark: '', // 备注
}, },
appointTitle: "预约时间" appointTitle: "预约时间",
num: 0,
}; };
}, },
components:{ components:{
...@@ -162,7 +163,6 @@ ...@@ -162,7 +163,6 @@
}, },
}, },
async onLoad(e) { async onLoad(e) {
// this.$u.vuex('vuex_token', 'RTOKEN7493e6defc2f1a77782f105dc297a9366763fec5');
this.orderId = 1 this.orderId = 1
this.categoryId = 88 this.categoryId = 88
if(e) { if(e) {
...@@ -173,8 +173,6 @@ ...@@ -173,8 +173,6 @@
title: "数据加载中", title: "数据加载中",
mask: true mask: true
}) })
this.loadCalendar()
this.loadTimerange()
await this.initPageData() await this.initPageData()
}, },
methods: { methods: {
...@@ -182,7 +180,8 @@ ...@@ -182,7 +180,8 @@
async initPageData() { async initPageData() {
let self = this let self = this
let params = {categoryId: self.categoryId} let params = {categoryId: self.categoryId}
let res = await self.$u.api.feedbackConfig(params) let pse = await Promise.all([self.$u.api.feedbackConfig(params), self.loadCalendar(), self.loadTimerange()])
let res = pse[0]
if(res && res.code == 200) { if(res && res.code == 200) {
self.config = res.data self.config = res.data
self.initParams() self.initParams()
...@@ -219,7 +218,7 @@ ...@@ -219,7 +218,7 @@
self.appointTitle = '预约时间' self.appointTitle = '预约时间'
if(self.dateList && self.timeList) { if(self.dateList && self.timeList) {
self.timeList.map((item, index) => { self.timeList.map((item, index) => {
if(data.item.timeRange.indexOf(item.pkey) > -1) { if(self.dateList.indexOf(item.pkey) > -1) {
item.disabled = true item.disabled = true
} else { } else {
item.disabled = false item.disabled = false
...@@ -241,7 +240,7 @@ ...@@ -241,7 +240,7 @@
async loadCalendar() { async loadCalendar() {
let self = this let self = this
let params = { let params = {
num: 1 num: this.num
} }
let res = await this.$u.api.workerCalendar(params) let res = await this.$u.api.workerCalendar(params)
if(res && res.code == 200) { if(res && res.code == 200) {
...@@ -283,25 +282,11 @@ ...@@ -283,25 +282,11 @@
if (data && data.time) { if (data && data.time) {
let num = data.num let num = data.num
let time = data.time let time = data.time
this.num = num
if (num == 0) { if (num == 0) {
this.dateList = [ this.loadCalendar()
{day: time, timeRange: []},
{day: time + (1*86400000), timeRange: []},
{day: time + (2*86400000), timeRange: []},
{day: time + (3*86400000), timeRange: []},
{day: time + (4*86400000), timeRange: []},
{day: time + (5*86400000), timeRange: []},
{day: time + (6*86400000), timeRange: []},
]
} else { } else {
this.dateList = [ this.loadCalendar()
{day: time, timeRange: []},
{day: time + (1*86400000), timeRange: []},
{day: time + (2*86400000), timeRange: []},
{day: time + (3*86400000), timeRange: []},
{day: time + (4*86400000), timeRange: []},
{day: time + (5*86400000), timeRange: []},
]
} }
} }
......
...@@ -194,42 +194,6 @@ ...@@ -194,42 +194,6 @@
var self = this; var self = this;
self.$u.api.listOrder(param).then((res) => { self.$u.api.listOrder(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
console.log("getOrderList", res.data)
/*↓↓↓↓↓↓↓↓↓↓测试数据↓↓↓↓↓↓↓↓↓↓*/
res.data.type = self.orderType
if (res.data.list) {
if (res.data.list.length == 0 && res.data.total > 0) {
res.data.total = 15
res.data.list = [{
orderServiceType: '安装', // 服务类型:安装、维修
categoryName: '充电桩', // 品类:充电桩
orderBusinessTypeText: '分配单', // 业务类型:分配单、订单池
orderNumber: 'OR2021041809827', // 工单编号
contactName: '郭小清', // 客户信息
contactPhone: '13631612077', // 联系方式
contactAddress: '湾街道荔枝花园D座125号', // 详细地址
contactAddressLatitud: '116.3896', // 联系人地址经度
contactAddressLongitud: '39.91917', // 联系人地址纬度
orderStatus: 0, // 工单状态
appointmentDatetime: '', // 预约时间
currentWillOverTime: 10000, // 剩余时间
currentOverTime: 0, // 超过时间
auditDatetime: '2021.04.19 12:45:09', // 审核时间
submissionTime: '2021.04.19 16:24:48', // 提交时间
auditResults: {}, // 审核结果
orderBusinessType: 'R', // 业务类型 R 为抢单
orderId: '1100000216'
}]
res.data.list = [...res.data.list, ...res.data.list, ...res.data.list, ...res.data
.list,
...res.data.list, ...res.data.list, ...res.data.list, ...res.data.list, ...
res
.data.list, ...res.data.list
]
}
}
/*↑↑↑↑↑↑↑↑↑↑测试数据↑↑↑↑↑↑↑↑↑↑↑↑↑*/
// 后台需要返回type,防止数据返回延迟期间点击了其他的tab // 后台需要返回type,防止数据返回延迟期间点击了其他的tab
if (res.data.type != self.orderType) return if (res.data.type != self.orderType) return
self.triggered = false; self.triggered = false;
......
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