Commit 6bcdfaea authored by Damon's avatar Damon
parents 8643bae6 acbc8e28
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": false,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"bundle": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true
},
"compileType": "miniprogram",
"libVersion": "2.16.0",
"appid": "wx402a711597dddbaf",
"projectname": "miniprogram-1",
"debugOptions": {
"hidedInDevtools": []
},
"scripts": {},
"isGameTourist": false,
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"game": {
"list": []
},
"plugin": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": []
}
}
}
<!-- 完工校验弹窗 -->
<template>
<view class="check-wrap">
<u-modal
v-model="show"
<view>
<u-popup
v-model="open"
:mask-close-able="false"
border-radius="12"
width="690"
:cancel-style="{
'margin': '36rpx 15rpx 52rpx 30rpx',
'height': '104rpx',
'border-radius': '52rpx',
'border': '2px solid #2272FF',
'font-size': '32rpx',
'font-weight': '600',
'color': '#2272FF',
}"
:confirm-style="{
'margin': '36rpx 30rpx 52rpx 15rpx',
'height': '104rpx',
'border-radius': '52rpx',
'background': '#2272FF',
'font-size': '32rpx',
'font-weight': '600',
'color': '#FFFFFF',
}"
:confirm-text="confirmText"
@cancel="cancel"
@confirm="confirm" ref="checkModel"
:show-cancel-button="true"
:show-title="false">
ref="checkPopup"
mode="center"
width="690rpx">
<view class="slot-content">
<view class="check-status">
<u-image width="224rpx" height="224rpx" :src="statusImage"></u-image>
......@@ -35,13 +15,13 @@
</view>
<view class="check-list">
<view class="u-flex u-row-between list-title">
<view>验证项</view>
<view class="left-txt">验证项</view>
<view>已提交/需提交</view>
<view>结果</view>
<view class="right-txt">结果</view>
</view>
<view class="u-flex u-row-between list-item"
v-for="(item, index) in listData" :key="index">
<view class="item-txt">
<view class="item-txt left-txt" style="width: 160rpx;text-align: left;">
<u-icon
:name="item.pass ? passIcon : noPassIcon"
:label="item.label"
......@@ -51,23 +31,40 @@
size="32"></u-icon>
</view>
<view class="item-txt">{{item.submitted}}/{{item.required}}</view>
<view :class="['item-txt', item.pass ? 'pass-color' : 'no-pass-color']">
<view
:class="['item-txt', 'right-txt', item.pass ? 'pass-color' : 'no-pass-color']"
style="width: 160rpx;text-align: right;">
{{item.pass ? "通过" : "未通过"}}
</view>
</view>
</view>
<view class="check-bottom">
<view class="button cancel" v-show="!pass" @tap="cancel">取消</view>
<view class="button confirm" @tap="confirm">{{confirmText}}</view>
</view>
</view>
</u-modal>
</u-popup>
</view>
</template>
<script>
/**
* modal 完工校验模态框
* @description 完工校验模态框,用于完工信息检查和提醒
* @property {Boolean} show 是否显示模态框
* @property {Boolean} pass 是否通过校验
* @property {Array} listData 完工信息项
* @event {Function} close 取消按钮被点击
* @event {Function} handle 去处理按钮被点击
* @event {Function} confirm 确认按钮被点击
* @example <u-modal :src="title" :content="content"></u-modal>
*/
export default {
name:"complete-check",
props: {
show: {
type: Boolean,
default: true
default: false
},
pass: {
type: Boolean,
......@@ -86,8 +83,16 @@
},
data() {
return {
open: this.show
};
},
watch: {
// 如果是异步关闭时,外部修改v-model的值为false时,重置内部的loading状态
// 避免下次打开的时候,状态混乱
show(n) {
this.open = n
}
},
computed: {
statusImage() {
if(this.pass) {
......@@ -111,14 +116,12 @@
},
confirm() {
if(this.pass) {
uni.navigateTo({
url: "pages/order/index"
})
this.$emit('confirm')
} else {
let data = this.listData.find((item, index) => {
return item.pass == false;
})
this.$emit('handle-problem', data)
this.$emit('handle', data)
}
}
......@@ -158,6 +161,30 @@
margin-bottom: 40rpx;
}
}
.check-bottom {
display: flex;
justify-content: center;
align-items: center;
.button {
text-align: center;
height: 104rpx;
width: 300rpx;
border-radius: 52rpx;
font-size: 32rpx;
font-weight: 600;
line-height: 104rpx;
}
.cancel {
margin: 36rpx 15rpx 52rpx 30rpx;
border: 2px solid #2272FF;
color: #2272FF;
}
.confirm {
margin: 36rpx 30rpx 52rpx 15rpx;
background: #2272FF;
color: #FFFFFF;
}
}
}
.item-txt {
height: 32rpx;
......@@ -166,15 +193,18 @@
color: #333333;
line-height: 32rpx;
}
.left-txt {
width: 160rpx;
text-align: left;
}
.right-txt {
width: 160rpx;
text-align: right;
}
.pass-color {
color: #2272FF !important;
}
.no-pass-color {
color: #FA5A49 !important;;
}
.u-border-top {
position: unset;
}
</style>
......@@ -2,7 +2,7 @@
<template>
<view>
<u-input :type="type" class="input-item" v-model="dataValue" @input="valueChange" :placeholder="placeholder" :placeholder-style="placeholderStyle"
:custom-style="customStyle" :clearable="false"/>
:custom-style="customStyle" :clearable="false" :border="border"/>
</view>
</template>
......@@ -38,12 +38,23 @@
},
customStyle() {
return {
'background-color': '#F4F5F7',
'background-color': this.backgroundColor,
'border-radius': '12rpx',
'color': '#333333',
'padding-left': '20rpx',
'width': this.width
'padding-left': this.textarea ? '0rpx' : '20rpx',
'width': this.width,
'font-size':'26rpx',
'height': '76rpx'
}
},
border() {
return this.textarea
},
textarea() {
return this.type == 'textarea'
},
backgroundColor() {
return this.textarea ? '#FFFFFF' : '#F4F5F7'
}
},
watch: {},
......
<!-- ******************* 单个下拉选择 ******************* -->
<template>
<view>
<u-input :value="text" readOnly @click="show=true" type="select" />
<u-action-sheet :list="settings" v-model="show" @click="actionSheetCallback"></u-action-sheet>
<view class="xh-select">
<u-input :value="text" readOnly @click="show=true" :placeholder="placeholder" :placeholder-style="placeholderStyle"
:custom-style="customStyle" :clearable="false"></u-input>
<u-action-sheet :list="settings" v-model="show" @click="actionSheetCallback" safe-area-inset-bottom></u-action-sheet>
<u-icon class="input-icon" :name="show ? 'arrow-up' : 'arrow-down'"></u-icon>
</view>
</template>
......@@ -12,7 +15,16 @@
name: 'XhSelect',
components: {},
mixins: [stringMixin],
props: {},
props: {
placeholder: {
type: String,
default: '请选择'
},
width: { // 例如:454rpx
type: String,
default: '100%'
}
},
data() {
return {
show: false
......@@ -32,7 +44,9 @@
result = settings.map(item => {
return {
text: item.label,
id: item.key
id: item.key,
color: '#333333',
fontSize: 26
}
})
return result
......@@ -40,6 +54,21 @@
text(){
let option = this.item.fieldsOptions.find(a=>{return a.key === this.dataValue})
return option?option.label:''
},
placeholderStyle() {
return 'color:#999999;font-size:26rpx'
},
customStyle() {
return {
'background-color': '#F4F5F7',
'border-radius': '12rpx',
'color': '#333333',
'padding-left': '20rpx',
'padding-right': '60rpx',
'width': this.width,
'font-size':'26rpx',
'height': '76rpx'
}
}
},
watch: {},
......@@ -54,5 +83,15 @@
}
</script>
<style>
<style lang="scss" scoped>
.xh-select {
position: relative;
.input-icon {
position: absolute;
right: 20rpx;
top: 26rpx;
color: #2272FF;
}
}
</style>
......@@ -162,7 +162,6 @@
}
},
fail(e) {
debugger
}
})
}
......
......@@ -13,7 +13,7 @@
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height:796rpx;width:100%;" @scrolltolower="onreachBottom">
<view class="currency-class" :style="{'background-image':'url(/static/photo/jianbian@3x.png)'}">
<view class="class1" @click=ccc(courselist[0].id)>
<view class="class1" @click="goToPrint">
<image class="img" :src="rule.pic" mode=""></image>
<view class="right u-margin-left-30 u-padding-top-10 u-padding-bottom-14 width-360">
<view class="u-font-32 font-bold">
......@@ -53,7 +53,7 @@
<view class="top">
<view class="title u-margin-top-10 u-margin-bottom-30">通用课程</view>
<view class="currency-class">
<view class="class1" @click=ccc(courselist[0].id)>
<view class="class1" @click=ccc(courselist[0].sectionId)>
<image class="img" :src="courselist[0].pic" mode=""></image>
<view class="right">
<view class="u-font-32 font-bold">
......@@ -72,7 +72,7 @@
</view>
</view>
</view>
<view class="class1 u-margin-top-40" @click=ccc(courselist[1].id)>
<view class="class1 u-margin-top-40" @click=ccc(courselist[1].sectionId)>
<image class="img" :src="courselist[1].pic" mode=""></image>
<view class="right">
<view class="u-font-32 font-bold">
......@@ -94,7 +94,7 @@
</view>
<view class="title u-margin-top-50 u-margin-bottom-30">技能课程</view>
<view class="currency-class">
<view class="class1" @click=ccc(courselist[2].id)>
<view class="class1" @click=ccc(courselist[2].sectionId)>
<image class="img" :src="courselist[2].pic" mode=""></image>
<view class="right">
<view class="u-font-32 font-bold">
......@@ -221,7 +221,8 @@
percent: 0,
status: '',
pic: process.uniEnv.qn_base_url + "guifan1@3x.png",
id: 173
id: 173,
sectionId: ''
},
{
title: '接单操作',
......@@ -229,7 +230,8 @@
percent: 0,
status: '',
pic: process.uniEnv.qn_base_url + "guifan2@3x.png",
id: 173
id: 173,
sectionId: ''
},
{
title: '从0-1学习充电桩安装服务',
......@@ -237,7 +239,8 @@
percent: 0,
status: '',
pic: process.uniEnv.qn_base_url + "kecehng1@3x.png",
id: 173
id: 173,
sectionId: ''
}
],
examList: [{
......@@ -356,6 +359,7 @@
res.data.learnedInfo.learnPercent *= 100;
this.courselist[i].status = this.getTypeName(res.data.learnedInfo.learnPercent);
this.courselist[i].percent = res.data.learnedInfo.learnPercent;
this.courselist[i].sectionId = res.data.learnedInfo.nextLearnedSectionId;
}
}
})
......@@ -418,7 +422,7 @@
//跳转到课程介绍
ccc(id) {
uni.navigateTo({
url: "./curriculum?course_id=" + id,
url: "./section?section_id=" + 288,
});
},
//跳转到
......
......@@ -8,23 +8,35 @@
<view class="item-content">
<view class="item-st">
<image style="width: 80rpx; height: 36rpx" :src="kcImage"></image>
<text class="item-st-text">{{ courseTitle.split(" ") ? courseTitle.split(" ")[0] : "" }}</text>
<text class="item-st-text">5课时</text>
</view>
<view class="item-title">{{ courseTitle.split(" ") ? courseTitle.split(" ")[1] : "" }}</view>
<view class="item-title">服务规范</view>
</view>
<view>接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。</view>
</view>
<view class="learn-view" v-if="courseId >= 0">
<view class="learn-view-title">视频内容介绍</view>
<!-- <view
class="learn-list"
v-for="(item, key) in courseOutlines[courseId]"
:key="key"
> -->
<!-- <view class="learn-list-item">{{ item }}</view> -->
<view class="u-content">
<u-parse :html="CourseSectionlist.content"></u-parse>
</view>
<view class="learn-view-title">课程讲师</view>
<view class="" style="padding-top: 30rpx;display: flex;padding-left: 30rpx;">
<u-avatar :style="{'width':'100rpx', 'height':'100rpx'}" :src="teacher.avatar" mode="circle"></u-avatar>
<view style="height:120rpx;font-size: 30rpx;padding-left:30rpx;">
<view class="" style="display: flex;font-size: 32rpx;">
<view class="" style="font-size: 32rpx;font-weight: bold;">{{ teacher.name }}</view>
<view class="" style="font-size: 24rpx;margin-left: 30rpx;margin-top: 6rpx;">课程讲师</view>
</view>
<view class="" style="font-size: 24rpx;margin-top: 30rpx;">反正这里就是放老师的简介,只是写啥我也不知道,反正就是写很厉害的简介啦</view>
</view>
</view>
<view class="learn-view-title">目录</view>
<view class="" style="display: flex;overflow: auto;padding-top: 30rpx;padding-bottom: 30rpx;">
<view v-for="(item, index) in list" :key="index">
<view @click="goNext(item.id)" class="list-cell list-default" :class="{'list-default-active': item.isActive}" style="width:280rpx;height:150rpx;margin-left: 20rpx;padding: 20rpx;border-radius: 12rpx;">
<view class="" style="font-size: 24rpx;">{{ item.title }}</view>
<view class="" style="font-size: 26rpx;margin-top: 16rpx;">
{{ item.intro }}
</view>
</view>
</view>
</view>
</view>
</view>
......@@ -53,6 +65,17 @@
section_id: 0,
isShowVideo: false,
CourseSectionlist: {name: '', content: ''}, //节信息
list: [
{'title': '第一节', 'intro': '考核规则1:接单及 时率', 'isActive': true},
{'title': '第二节', 'intro': '考核规则1:接单及 时率', 'isActive': false},
{'title': '第三节', 'intro': '考核规则1:接单及 时率', 'isActive': false},
{'title': '第四节', 'intro': '考核规则1:接单及 时率', 'isActive': false},
{'title': '第五节', 'intro': '考核规则1:接单及 时率', 'isActive':false},
],
teacher: {
name: "",
avatar: ""
},
playerOptions: {
playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
autoplay: true, //如果true,浏览器准备好时开始回放。
......@@ -118,6 +141,11 @@
// #endif
},
methods: {
goNext(id){
uni.navigateTo({
url: "./section?section_id=" + id,
});
},
onPlayerTimeupdate(player) {
console.log('-----onplay----');
console.log(player);
......@@ -165,6 +193,8 @@
this.courseDesc = res.data.content;
this.section_id = res.data.id;
this.section_content = res.data.content;
this.teacher.name = res.data.teachers[0].name;
this.teacher.avatar = res.data.teachers[0].avatar;
if (this.isShowVideo) {
let coureWareList = res.data.courseware;
this.courseSrc = coureWareList[0].src;
......@@ -195,7 +225,7 @@
status: 1,
};
this.$u.api.updateLearnCourses(param).then((res) => {
console.log('--' + this.howTimeToUpdateLearnedStatus + '更新一次观看状态--time:' + nowTime);
// console.log('--' + this.howTimeToUpdateLearnedStatus + '更新一次观看状态--time:' + nowTime);
}).catch((err) => {
console.log('--------updateLearnedStatusForText---------');
console.log(err);
......@@ -326,8 +356,8 @@
.learn-view {
background-color: #ffffff;
border-radius: 12rpx;
padding: 38rpx 30rpx 30rpx 30rpx;
margin-bottom: 20rpx;
// padding: 38rpx 30rpx 30rpx 30rpx;
// margin-bottom: 20rpx;
font-size: 32rpx;
color: #333333;
......@@ -335,6 +365,8 @@
font-size: 32rpx;
font-weight: bold;
margin-bottom: 10rpx;
padding-top: 30rpx;
margin-left: 30rpx;
}
.learn-list {
......@@ -358,4 +390,18 @@
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
}
.list-default {
background-color: #F4F5F7;
border-radius: 12rpx;
color: #333333;
}
.list-default-active {
background-color: #ffffff;
border-radius: 12rpx;
color: #2272FF;
border: 2rpx solid #2272FF;
box-sizing: border-box;
}
</style>
<template>
<view class="com-content">
<complete-check :show="completeCheckStatus" :list-data="completeCheckResult" @close="closeCheckResult" @handle="handerProgrom" @change="confirm"></complete-check>
<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-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>
......@@ -60,8 +61,8 @@
@value-change="fieldValueChange">
</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]"
: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'"
......@@ -161,7 +162,12 @@
submitBtnStatus: false,
takeStatus: false,
fileIndex: null,
files: []
files: [],
completeCheckStatus: false,
completeCheckResult: [],
waitHandlerPanelIndex: 0,
waitHandlerGroupIndex: 0,
waitHandlerEleIndex: 0,
}
},
components: {
......@@ -286,17 +292,79 @@
}
})
},
checkCompleteItem(){
let self = this
let checkResult = []
let pass = true
let first = true
self.list.forEach((panel, panelIndex)=>{
let panelResult = {label: panel.panelName, submitted: 0, required: 0, pass: true}
panel.items.forEach((group, groupIndex) =>{
group.items.forEach((ele, eleIndex)=>{
if(ele.required){
panelResult.required++
let value = self.form[ele.fieldsName]
if(value&&!Array.isArray(value)){
panelResult.submitted++
}else if(value&&Array.isArray(value)&&value.length > 0){
panelResult.submitted++
}else if(first){// 记录第一个 为空 并且需要必填的项 用于定位
first = false
self.waitHandlerPanelIndex = panelIndex
self.waitHandlerGroupIndex = groupIndex
self.waitHandlerEleIndex = eleIndex
}
}
})
})
panelResult.pass = panelResult.required <= panelResult.submitted
pass = pass&&panelResult.pass
checkResult.push(panelResult)
})
console.log(checkResult)
self.completeCheckResult = checkResult
return pass
},
confirm(){// 检查结果窗口 确认回调
uni.navigateTo({
url: 'pages/order/index'
})
},
closeCheckResult(){// 检查结果窗口取消回调
this.completeCheckStatus = false
},
handerProgrom(){// 检查结果窗口 去处理回调 定位到缺失的项
this.completeCheckStatus = false
this.locationCompleteItem(this.waitHandlerPanelIndex,this.waitHandlerGroupIndex,this.waitHandlerEleIndex)
},
locationCompleteItem(panelIndex,groupIndex,eleIndex){ // 页面定位到某一项
this.tabIndex = panelIndex
this.arr = []
this.scrollRightTop = 0;
this.current = 0;
this.$nextTick(function() {
this.swichMenu(groupIndex)
})
},
orderFinish(){
let self = this
if(self.inGuaranteePeriod === 'Y'){
self.$u.api.inOrderFinish(self.orderId).then((res)=>{
console.log(res)
})
}else{
self.$u.api.outOrderFinish({customerPayType:'CASH'}, self.orderId).then((res)=>{
console.log(res)
})
}
let self = this
let pass = this.checkCompleteItem()
if(!pass){
self.completeCheckStatus = true
}else{
console.log("完工");
if(self.inGuaranteePeriod === 'Y'){
self.$u.api.inOrderFinish(self.orderId).then((res)=>{
console.log(res)
self.completeCheckStatus = true
})
}else{
self.$u.api.outOrderFinish({customerPayType:'CASH'}, self.orderId).then((res)=>{
console.log(res)
self.completeCheckStatus = true
})
}
}
},
getTakeStatus(event) {
this.takeStatus = event.status
......@@ -307,7 +375,7 @@
this.tabIndex = index
this.arr = []
this.scrollRightTop = 0;
this.current = 0;
this.current = 0;
this.leftMenuStatus(0)
this.$nextTick(function() {
this.getMenuItemTop()
......@@ -587,7 +655,7 @@
.u-tab-view {
width: 200rpx;
height: 100%;
height: 100%;
border: 4rpx solid #F4F5F7;
}
......@@ -666,11 +734,11 @@
height: 120rpx;
}
/*提交按钮*/
.btn-bottom {
border: 2rpx solid #F4F5F7;
}
/*提交按钮*/
.btn-bottom {
border: 2rpx solid #F4F5F7;
}
.btn-wrap {
width: 100%;
padding: 20rpx 0 44rpx 0;
......@@ -678,7 +746,7 @@
justify-content: center;
align-items: center;
}
.btn-save {
color: #FFFFFF;
background-color: #2272FF;
......
......@@ -160,8 +160,6 @@ export default {
}
},
async onLoad(e) {
this.orderId = 1;
this.categoryId = 88;
if (e) {
this.orderId = e.orderId || null;
this.categoryId = e.categoryId || null;
......@@ -327,7 +325,6 @@ export default {
},
async submitForm() {
let self = this;
self.orderId = 666;
if (!self.orderId) {
uni.showToast({
icon: error,
......
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