master
commit
454bb48dbc
2
App.vue
2
App.vue
|
@ -15,7 +15,7 @@
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
// uni.setStorageSync('hostapi','http://maintain.7and5.cn');
|
// uni.setStorageSync('hostapi','http://maintain.7and5.cn');
|
||||||
getApp().globalData.hostapi = 'http://maintain.7and5.cn';
|
this.globalData.hostapi = 'http://maintain.7and5.cn';
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// uni.setStorageSync('hostapi','/web');
|
// uni.setStorageSync('hostapi','/web');
|
||||||
|
|
|
@ -214,6 +214,8 @@ button:after{content: none!important;}
|
||||||
.radius35{border-radius: 35rpx;}
|
.radius35{border-radius: 35rpx;}
|
||||||
.radius40{border-radius: 40rpx;}
|
.radius40{border-radius: 40rpx;}
|
||||||
.radius45{border-radius: 45rpx;}
|
.radius45{border-radius: 45rpx;}
|
||||||
|
.radius_50{border-radius: 50%;}
|
||||||
|
.radius_100{border-radius: 100%;}
|
||||||
|
|
||||||
/* 上下左右---外边距 */
|
/* 上下左右---外边距 */
|
||||||
.mar10{margin: 10rpx;}
|
.mar10{margin: 10rpx;}
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
if(index==0){
|
if(index==0){
|
||||||
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
|
uni.reLaunch({url:'/pages/tabbar/pagehome/pagehome'})
|
||||||
} else {
|
} else {
|
||||||
// if(!this.$toolAll.tools.judgeAuth()) {
|
if(this.$toolAll.tools.judgeAuth()) {
|
||||||
// 已授权
|
// 已授权
|
||||||
switch (index){
|
switch (index){
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -144,12 +144,7 @@
|
||||||
uni.reLaunch({url:'/pages/tabbar/my/my'})
|
uni.reLaunch({url:'/pages/tabbar/my/my'})
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// } else {
|
}
|
||||||
// // 未授权
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url:'/pages/login/login'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scanCode() {
|
scanCode() {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
const app = getApp();
|
||||||
const tools = {
|
const tools = {
|
||||||
timer:'',
|
timer:'',
|
||||||
timerNot:'',
|
timerNot:'',
|
||||||
|
@ -498,7 +499,7 @@ const tools = {
|
||||||
if (res.code) {
|
if (res.code) {
|
||||||
var params = {code:res.code}
|
var params = {code:res.code}
|
||||||
uni.request({
|
uni.request({
|
||||||
url: `${getApp().globalData.hostapi}/api/user/login`,
|
url: `${app.globalData.hostapi}/api/user/login`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params,
|
data: params,
|
||||||
header: {
|
header: {
|
||||||
|
@ -523,16 +524,17 @@ const tools = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 判断是否授权,没授权,前往登录页面授权
|
// 判断是否授权,没授权,前往登录页面授权
|
||||||
|
authTimer:null,
|
||||||
judgeAuth(){
|
judgeAuth(){
|
||||||
let auth = true;
|
let auth = false;
|
||||||
switch (uni.getStorageSync('phone_active')*1){
|
clearTimeout(this.authTimer);
|
||||||
case 0: // 未注册
|
if(!uni.getStorageSync('token')) {
|
||||||
uni.navigateTo({url:'/pages/login/login'});
|
this.showToast('请登录');
|
||||||
auth = false
|
this.authTimer = setTimeout(()=>{
|
||||||
break;
|
uni.navigateTo({url:'/pages/login/login'});
|
||||||
case 1: // 已注册
|
},2000)
|
||||||
auth = true
|
} else {
|
||||||
break;
|
auth = true;
|
||||||
}
|
}
|
||||||
return auth;
|
return auth;
|
||||||
},
|
},
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
/* 快应用特有相关 */
|
/* 快应用特有相关 */
|
||||||
"mp-weixin" : {
|
"mp-weixin" : {
|
||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"appid" : "wx705dfb975654e53a",
|
"appid" : "wx372ffc194d87c693",
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : true,
|
"urlCheck" : true,
|
||||||
"es6" : true
|
"es6" : true
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
import statusNav from '../../components/status-nav.vue';
|
import statusNav from '../../components/status-nav.vue';
|
||||||
import footTabOne from "../../components/foot-tabs/foot-tab-one.vue"
|
import footTabOne from "../../components/foot-tabs/foot-tab-one.vue"
|
||||||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||||
|
const app = getApp();
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
footTabOne,
|
footTabOne,
|
||||||
|
@ -141,7 +142,7 @@
|
||||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||||
this.imgSrc = chooseImageRes.tempFilePaths[0]
|
this.imgSrc = chooseImageRes.tempFilePaths[0]
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: getApp().globalData.hostapi+'/universal/api.upload/upload', //仅为示例,非真实的接口地址
|
url: app.globalData.hostapi+'/universal/api.upload/upload', //仅为示例,非真实的接口地址
|
||||||
filePath: tempFilePaths[0],
|
filePath: tempFilePaths[0],
|
||||||
name: 'image',
|
name: 'image',
|
||||||
header:{
|
header:{
|
||||||
|
@ -204,6 +205,7 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 68rpx;
|
line-height: 68rpx;
|
||||||
color: #9f9898;
|
color: #9f9898;
|
||||||
|
font-size:30rpx;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<view class="content" :style="{paddingTop: statusHeight + 'px'}">
|
<view class="content" >
|
||||||
<statusNav navBarTitle="项目列表" :ifReturn="false"></statusNav>
|
<statusNav navBarTitle="项目列表" :ifReturn="false"></statusNav>
|
||||||
<container-subgroup-two>
|
<container-subgroup-two>
|
||||||
<view slot="content" style="margin: -100rpx -30rpx -0rpx;">
|
<view slot="content" style="margin: -0rpx -30rpx -0rpx;">
|
||||||
<view class="project-list-input">
|
<view class="project-list-input">
|
||||||
<input type="text" class="int" value="" placeholder="请输入关键字" />
|
<input type="text" class="int" value="" placeholder="请输入关键字" />
|
||||||
<view class="xian"></view>
|
<view class="xian"></view>
|
||||||
|
@ -62,7 +62,6 @@
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</container-subgroup-two>
|
|
||||||
</container-subgroup-two>
|
</container-subgroup-two>
|
||||||
<footTabOne :current="1"></footTabOne>
|
<footTabOne :current="1"></footTabOne>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<container-subgroup>
|
<container-subgroup>
|
||||||
<view slot="content" style="margin: 0 -30rpx;">
|
<view slot="content" style="margin: 0 -30rpx;">
|
||||||
<view class="repairs-nav" style="margin-top: -30rpx;">
|
<view class="repairs-nav" style="margin-top: -30rpx;">
|
||||||
<view class="li" @click="repairsNavFun(index)" :class="item.state?'on':''"
|
<view :key="index" class="li" @click="repairsNavFun(index)" :class="item.state?'on':''"
|
||||||
v-for="(item,index) in navDataState">
|
v-for="(item,index) in navDataState">
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
|
@ -28,27 +28,28 @@
|
||||||
<view class="">
|
<view class="">
|
||||||
请填写设备名称和型号或扫描二维码
|
请填写设备名称和型号或扫描二维码
|
||||||
</view>
|
</view>
|
||||||
<image class="sm" src="../../static/iocn/sm.png" mode=""></image>
|
<image class="sm" src="../../static/iocn/sm.png" lazy-load mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<input v-model="data.device_name" class="devicename" placeholder="请填写设备名称和型号" v-else />
|
<input v-model="data.device_name" class="devicename" placeholder="请填写设备名称和型号" v-else />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="fault-pictures">
|
<view class="fault-pictures" @click="chooseImg">
|
||||||
<image class="img" src="../../static/iocn/gz.png" mode="aspectFill"></image>
|
<image class="fault-pictures-img" v-if="imgsrcArr.length>=1" :src="imgsrcArr[0]" mode="aspectFill"></image>
|
||||||
<view class="text">
|
<view class="fault-pictures-con" v-else>
|
||||||
添加故障图片
|
<image class="img" src="../../static/iocn/gz.png" lazy-load mode="aspectFill"></image>
|
||||||
</view>
|
<view class="text">
|
||||||
|
添加故障图片
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<textarea value="" v-model="data.condition" class="fault-description" placeholder="故障情况描述"
|
<textarea value="" v-model="data.condition" class="fault-description" placeholder="故障情况描述"
|
||||||
placeholder-class="fault-description-text" />
|
placeholder-class="fault-description-text" />
|
||||||
|
|
||||||
<view class="detailed-address inputCss">
|
<view class="detailed-address inputCss">
|
||||||
|
<input type="text" v-model="data.address" class="address_input" value=""
|
||||||
<input type="text" v-model="data.address" value="" placeholder="请输入详细的上门服务地址"
|
placeholder="请输入详细的上门服务地址" placeholder-class="inputCss-input" />
|
||||||
placeholder-class="inputCss-input" />
|
|
||||||
|
|
||||||
<image @click="mapFun()" src="../../static/iocn/map.png" class="map" mode="aspectFill"></image>
|
<image @click="mapFun()" src="../../static/iocn/map.png" class="map" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -56,23 +57,27 @@
|
||||||
placeholder-class="inputCss-input" value="" />
|
placeholder-class="inputCss-input" value="" />
|
||||||
<input type="text" class="inputCss" v-model="data.phone" placeholder="请填写联系电话"
|
<input type="text" class="inputCss" v-model="data.phone" placeholder="请填写联系电话"
|
||||||
placeholder-class="inputCss-input" value="" />
|
placeholder-class="inputCss-input" value="" />
|
||||||
<picker mode="date" @change="dateFun()">
|
|
||||||
<picker mode="time" @change="timeFun()">
|
<input type="text" class="inputCss" @tap="openDatetimePicker" disabled v-model="data.visit_time"
|
||||||
<input type="text" class="inputCss" v-model="data.date" placeholder="请选择上门时间"
|
placeholder="请选择上门时间" placeholder-class="inputCss-input" value="" />
|
||||||
placeholder-class="inputCss-input" value="" />
|
<yy-mm-dd-hh-ss ref="myPicker" @submit="handleSubmit" :start-year="2022" :end-year="2122">
|
||||||
</picker>
|
</yy-mm-dd-hh-ss>
|
||||||
</picker>
|
|
||||||
|
|
||||||
<button class="submit-button" @click="submitButton()" type="default">提交故障申报</button>
|
<button class="submit-button" @click="submitButton()" type="default">提交故障申报</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</container-subgroup>
|
</container-subgroup>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import yyMmDdHhSs from '@/components/dates/yy-mm-dd-hh-ss.vue';
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
yyMmDdHhSs
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
single: "2021-04-3",
|
single: "2021-04-3",
|
||||||
|
@ -81,12 +86,14 @@
|
||||||
fault_type: "",
|
fault_type: "",
|
||||||
device_name: "",
|
device_name: "",
|
||||||
condition: "",
|
condition: "",
|
||||||
project_number:"",
|
project_number: "",
|
||||||
address: "",
|
address: "",
|
||||||
username: "",
|
username: "",
|
||||||
|
images:"",
|
||||||
phone: "",
|
phone: "",
|
||||||
date: ""
|
visit_time: ""
|
||||||
},
|
},
|
||||||
|
imgsrcArr:[],
|
||||||
indexType: 0,
|
indexType: 0,
|
||||||
navDataState: [{
|
navDataState: [{
|
||||||
title: "有设备",
|
title: "有设备",
|
||||||
|
@ -115,23 +122,48 @@
|
||||||
|
|
||||||
|
|
||||||
this.faultTypeData = [...res.data]
|
this.faultTypeData = [...res.data]
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
openDatetimePicker() {
|
||||||
|
this.$refs.myPicker.show();
|
||||||
|
},
|
||||||
|
handleSubmit(e) {
|
||||||
|
// {year: "2019", month: "07", day: "17", hour: "15", minute: "21"}
|
||||||
|
console.log(e)
|
||||||
|
|
||||||
|
this.data.visit_time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`;
|
||||||
|
|
||||||
|
},
|
||||||
change(e) {
|
change(e) {
|
||||||
this.single = e;
|
this.single = e;
|
||||||
console.log("-change事件:", e);
|
console.log("-change事件:", e);
|
||||||
},
|
},
|
||||||
|
// 获取图片
|
||||||
|
chooseImg() {
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 1,
|
||||||
|
sourceType: ['album', 'camera'],
|
||||||
|
success: (res) => {
|
||||||
|
this.imgsrcArr=[]
|
||||||
|
let imgsrc = res.tempFilePaths;
|
||||||
|
imgsrc.forEach(item => {
|
||||||
|
this.data.images=item
|
||||||
|
this.imgsrcArr.push(item);
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log( this.imgsrcArr)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 获取日期
|
// 获取日期
|
||||||
dateFun(data){
|
dateFun(data) {
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
timeFun(){
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
timeFun() {},
|
||||||
scanCodeFun() {
|
scanCodeFun() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
|
@ -142,44 +174,44 @@
|
||||||
},
|
},
|
||||||
submitButton() {
|
submitButton() {
|
||||||
this.data.fault_type = this.faultTypeData[this.indexType].id
|
this.data.fault_type = this.faultTypeData[this.indexType].id
|
||||||
|
|
||||||
if (this.data.is_device == 0){
|
|
||||||
if (!this.data.device_name) {
|
|
||||||
this.$toolAll.tools.showToast("请填写设备名称或型号");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
if (!this.data.project_number) {
|
|
||||||
this.$toolAll.tools.showToast("请扫描设备二维码");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!this.data.username){
|
|
||||||
this.$toolAll.tools.showToast("请填写您的姓名");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
var reg_tel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; //11位手机号码正则
|
|
||||||
|
|
||||||
if(!reg_tel.test(this.data.phone)){
|
if (this.data.is_device == 0) {
|
||||||
this.$toolAll.tools.showToast("请正确填写您的电话");
|
if (!this.data.device_name) {
|
||||||
return
|
this.$toolAll.tools.showToast("请填写设备名称或型号");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!this.data.project_number) {
|
||||||
|
this.$toolAll.tools.showToast("请扫描设备二维码");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return
|
|
||||||
this.$requst.post('/universal/api.work_order/repair').then(res => {
|
if (!this.data.username) {
|
||||||
// this.$toolAll.tools.showToast(res.msg);
|
this.$toolAll.tools.showToast("请填写您的姓名");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var reg_tel =
|
||||||
|
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; //11位手机号码正则
|
||||||
|
|
||||||
|
if (!reg_tel.test(this.data.phone)) {
|
||||||
|
this.$toolAll.tools.showToast("请正确填写您的电话");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$requst.post('/universal/api.work_order/repair',this.data).then(res => {
|
||||||
|
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
|
|
||||||
|
console.log(res)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(this.data)
|
console.log(this.data)
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
mapFun() {
|
mapFun() {
|
||||||
|
@ -347,7 +379,11 @@
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
.fault-pictures-con{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
.fault-pictures .img {
|
.fault-pictures .img {
|
||||||
width: 87rpx;
|
width: 87rpx;
|
||||||
margin-bottom: 27rpx;
|
margin-bottom: 27rpx;
|
||||||
|
@ -396,6 +432,7 @@
|
||||||
.inputCss-input-input {
|
.inputCss-input-input {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #9f9898;
|
color: #9f9898;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.detailed-address .map {
|
.detailed-address .map {
|
||||||
|
@ -426,4 +463,9 @@
|
||||||
width: 42rpx;
|
width: 42rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
}
|
}
|
||||||
|
.fault-pictures-img{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -27,17 +27,16 @@
|
||||||
style="background: url(../../../static/public/icon-my-head.png) no-repeat;height: 400rpx;background-size: 100% 100%;">
|
style="background: url(../../../static/public/icon-my-head.png) no-repeat;height: 400rpx;background-size: 100% 100%;">
|
||||||
<view class="disjbac" style="padding: 60rpx 80rpx 60rpx 60rpx;">
|
<view class="disjbac" style="padding: 60rpx 80rpx 60rpx 60rpx;">
|
||||||
<view class="disac">
|
<view class="disac">
|
||||||
<image class="flexs mar-y10" v-if="!userInfo.avatar"
|
<!-- 用户头像 -->
|
||||||
src="/static/public/icon-my-headimg.png" mode="aspectFill"
|
<image class="flexs mar-y10 radius_100" @tap="replaceImg" :src="userInfo.avatar || '/static/public/icon-my-headimg.png'" mode="aspectFill" style="width: 91rpx;height: 91rpx;" lazy-load></image>
|
||||||
style="width: 91rpx;height: 91rpx;" lazy-load></image>
|
|
||||||
<image class="flexs mar-y10" v-else src="/static/public/icon-my-headimg.png"
|
|
||||||
mode="aspectFill" style="width: 91rpx;height: 91rpx;" lazy-load></image>
|
|
||||||
|
|
||||||
<view class="disjb fc" style="height: 91rpx;">
|
<view class="disjb fc" style="height: 91rpx;">
|
||||||
|
<!-- 用户手机号 -->
|
||||||
<view class="fon34 bold">{{tel(userInfo.username)}}</view>
|
<view class="fon34 bold">{{tel(userInfo.username)}}</view>
|
||||||
|
<!-- 是否实名认证 -->
|
||||||
<view class="fon22" style="color: #717171;">未实名认证</view>
|
<view class="fon22" style="color: #717171;">未实名认证</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 等级图标 -->
|
||||||
<image src="/static/public/icon-my-level.png" mode="aspectFill"
|
<image src="/static/public/icon-my-level.png" mode="aspectFill"
|
||||||
style="width: 49rpx;height: 76rpx;" lazy-load></image>
|
style="width: 49rpx;height: 76rpx;" lazy-load></image>
|
||||||
</view>
|
</view>
|
||||||
|
@ -181,6 +180,16 @@
|
||||||
this.$toolAll.tools.disableShareEv();
|
this.$toolAll.tools.disableShareEv();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 更换头像
|
||||||
|
replaceImg(){
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 1,
|
||||||
|
sourceType:['album','camera'],
|
||||||
|
success: (res) => {
|
||||||
|
this.userInfo.avatar = res.tempFilePaths[0];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 退出登录
|
// 退出登录
|
||||||
logOutEv() {
|
logOutEv() {
|
||||||
this.$requst.post('/universal/api.login/signout').then(res => {
|
this.$requst.post('/universal/api.login/signout').then(res => {
|
||||||
|
@ -205,9 +214,8 @@
|
||||||
},
|
},
|
||||||
// 手机加星号
|
// 手机加星号
|
||||||
tel(tel) {
|
tel(tel) {
|
||||||
const telNum = tel.toString();
|
|
||||||
const reg = /^(\d{3})\d{4}(\d{4})$/;
|
const reg = /^(\d{3})\d{4}(\d{4})$/;
|
||||||
return telNum.replace(reg, '$1****$2')
|
return tel.replace(reg, '$1****$2')
|
||||||
},
|
},
|
||||||
//用户中心信息
|
//用户中心信息
|
||||||
checkInfo() {
|
checkInfo() {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<<<<<<< HEAD
|
||||||
<template>
|
<template>
|
||||||
<view class="pad-x50">
|
<view class="pad-x50">
|
||||||
<status-nav-slot>
|
<status-nav-slot>
|
||||||
|
@ -466,3 +467,455 @@
|
||||||
<style>
|
<style>
|
||||||
page{background-color: #f7f7f7;}
|
page{background-color: #f7f7f7;}
|
||||||
</style>
|
</style>
|
||||||
|
=======
|
||||||
|
<template>
|
||||||
|
<view class="pad-x50">
|
||||||
|
<status-nav-slot>
|
||||||
|
<view slot="leftContent" @tap="goMessage" style="width: 70px;">
|
||||||
|
<view class="home-message-box posir disac">
|
||||||
|
<image src="/static/public/icon-home-message.png" mode=""></image>
|
||||||
|
<view v-if="messageNumber!=0">{{messageNumber}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view slot="centerContent" class="disjcac">
|
||||||
|
<image style="width: 156rpx;height: 38rpx;" src="/static/public/icom-home-logo.png" mode="widthFix"></image>
|
||||||
|
</view>
|
||||||
|
<!-- #ifdef APP-PLUS -->
|
||||||
|
<view slot="rightContent" class="disac" @tap="callEv">
|
||||||
|
<image class="mar-y10" style="width: 26rpx;height: 26rpx;" src="/static/public/icon-home-phone.png" mode=""></image>
|
||||||
|
<view class="fon26 col3">拨打电话</view>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<view slot="rightContent" class="disac" @tap="callEv">
|
||||||
|
<image class="mar-y10" style="width: 26rpx;height: 26rpx;" src="/static/public/icon-home-phone.png" mode=""></image>
|
||||||
|
<view class="fon26 col3">拨打电话</view>
|
||||||
|
</view>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
|
<view slot="rightContent" @tap="goMessage" style="width: 70px;"></view>
|
||||||
|
<!-- #endif -->
|
||||||
|
</status-nav-slot>
|
||||||
|
<!-- <view :style="{paddingTop: statusHeight +'px'}"> -->
|
||||||
|
<!-- banner图 -->
|
||||||
|
<container-subgroup-two>
|
||||||
|
<view slot="content" style="margin: 0 -30rpx;">
|
||||||
|
<image class="width100" src="/static/public/icon-home-banner.png" mode="widthFix"></image>
|
||||||
|
<view class="pad-zy20">
|
||||||
|
<!-- 项目总数、实时故障、公告 -->
|
||||||
|
<view class="project-notice-box">
|
||||||
|
<view class="disjcac pad-sx20 bbot">
|
||||||
|
<view class="disjcac fc width50">
|
||||||
|
<view class="fon26 col9">项目总数</view>
|
||||||
|
<view class="fon60 bold">126</view>
|
||||||
|
</view>
|
||||||
|
<view class="bleft" style="height: 90rpx;"></view>
|
||||||
|
<view class="disjcac fc width50">
|
||||||
|
<view class="fon26 col9">实时故障</view>
|
||||||
|
<view class="fon60 bold">116</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="disac pad-s30 pad-x10">
|
||||||
|
<image class="mar-zy20" style="width: 64rpx;height: 27rpx;" src="/static/public/icon-home-notice.png" mode=""></image>
|
||||||
|
<view class="fon24 color6 mar-y20 width100 bleft pad-z20">
|
||||||
|
<lwNotice @dangGao="goNoticeDetail" :list="noticeList" :backgroundColor="'#FFFFFF'"></lwNotice>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 客户可见 -->
|
||||||
|
<view v-if="role==2 || role==1">
|
||||||
|
<!-- 故障报修 -->
|
||||||
|
<view class="home-fun-box">
|
||||||
|
<view class="fun-title col3 fon28 disac bold">故障报修</view>
|
||||||
|
<view class="disac mar-s30" style="height: 58rpx;">
|
||||||
|
<view @tap="goFaultRepair(index)" class="disjcac fc width25" v-for="(item,index) in repairList" :key="index">
|
||||||
|
<image :style="{width: [58,58,50][index]+'rpx',height:[53,56,58][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
|
||||||
|
<view class="fon24 col3 mar-s10">{{item.title}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 数据查询 -->
|
||||||
|
<view class="home-fun-box" v-if="role==1">
|
||||||
|
<view class="fun-title col3 fon28 disac bold">数据查询</view>
|
||||||
|
<view class="disac mar-s30">
|
||||||
|
<view @tap="dataQueryEv(index)" class="disjcac fc width25" v-for="(item,index) in dataQueryList" :key="index">
|
||||||
|
<view class="posir" style="height: 56rpx;">
|
||||||
|
<image :style="{width: [58,58,58][index]+'rpx',height:[46,56,50][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
|
||||||
|
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="fon24 col3 mar-s10">{{item.title}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 增值服务 -->
|
||||||
|
<view class="home-fun-box">
|
||||||
|
<view class="fun-title col3 fon28 disac bold">增值服务</view>
|
||||||
|
<view class="disac mar-s30" style="height: 56rpx;">
|
||||||
|
<view @tap="goIncrement(index)" class="disjcac fc width25" v-for="(item,index) in incrementList" :key="index">
|
||||||
|
<image :style="{width: [57,52,58,51][index]+'rpx',height:[56,56,50,56][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
|
||||||
|
<view class="fon24 col3 mar-s10">{{item.title}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 工程师可见 -->
|
||||||
|
<view v-if="role==4 || role==3">
|
||||||
|
<!-- 项目维修 -->
|
||||||
|
<view class="home-fun-box" v-if="role==4">
|
||||||
|
<view class="fun-title col3 fon28 disac bold">项目维修</view>
|
||||||
|
<view class="disac mar-s30">
|
||||||
|
<view @tap="stayEv(item.title)" class="disjcac fc width25" v-for="(item,index) in projectRepairList" :key="index">
|
||||||
|
<view class="posir" style="height: 58rpx;">
|
||||||
|
<image :style="{width: [53,52,51][index]+'rpx',height:[58,58,58][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
|
||||||
|
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="fon24 col3 mar-s10">{{item.title}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="role==3">
|
||||||
|
<!-- 待办工单 -->
|
||||||
|
<view class="home-fun-box">
|
||||||
|
<view class="fun-title col3 fon28 disac bold">待办工单</view>
|
||||||
|
<view class="disac mar-s30">
|
||||||
|
<view @tap="stayEv(item.title)" class="disjcac fc width25" v-for="(item,index) in stayWorkOrderList" :key="index">
|
||||||
|
<view class="posir" style="height: 58rpx;">
|
||||||
|
<image :style="{width: [53,48,51,58][index]+'rpx',height:[58,58,58,53][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
|
||||||
|
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="fon24 col3 mar-s10">{{item.title}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 待办事件 -->
|
||||||
|
<view class="home-fun-box">
|
||||||
|
<view class="fun-title col3 fon28 disac bold">待办事件</view>
|
||||||
|
<view class="disac mar-s30">
|
||||||
|
<view @tap="stayEv(item.title)" class="disjcac fc width25" v-for="(item,index) in stayEventList" :key="index">
|
||||||
|
<view class="posir" style="height: 58rpx;">
|
||||||
|
<image :style="{width: [58,58,50][index]+'rpx',height:[58,54,58][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
|
||||||
|
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="fon24 col3 mar-s10">{{item.title}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 工单数据 -->
|
||||||
|
<view class="home-fun-box">
|
||||||
|
<view class="fun-title col3 fon28 disac bold">工单数据</view>
|
||||||
|
<view class="disac mar-s30">
|
||||||
|
<view @tap="stayEv(item.title)" class="disjcac fc width25" v-for="(item,index) in workOrderList" :key="index">
|
||||||
|
<view class="posir" style="height: 60rpx;">
|
||||||
|
<image :style="{width: [59,56,58,58][index]+'rpx',height:[49,58,58,60][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
|
||||||
|
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="fon24 col3 mar-s10">{{item.title}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 数据查询 -->
|
||||||
|
<view class="home-fun-box" v-if="role==3">
|
||||||
|
<view class="fun-title col3 fon28 disac bold">数据查询</view>
|
||||||
|
<view class="disac mar-s30">
|
||||||
|
<view @tap="dataQueryEv(index)" class="disjcac fc width25" v-for="(item,index) in dataQueryList" :key="index">
|
||||||
|
<view class="posir" style="height: 56rpx;">
|
||||||
|
<image :style="{width: [58,58,58][index]+'rpx',height:[46,56,50][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
|
||||||
|
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="fon24 col3 mar-s10">{{item.title}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 结算情况 -->
|
||||||
|
<view class="home-fun-box" v-if="role==4">
|
||||||
|
<view class="fun-title col3 fon28 disac bold">结算情况</view>
|
||||||
|
<view class="disac mar-s30">
|
||||||
|
<view @tap="stayEv(item.title)" class="disjcac fc width25" v-for="(item,index) in settlementList" :key="index">
|
||||||
|
<view class="posir" style="height: 58rpx;">
|
||||||
|
<image :style="{width: [58,50,58][index]+'rpx',height:[54,58,58][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
|
||||||
|
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="fon24 col3 mar-s10">{{item.title}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 其他 -->
|
||||||
|
<view class="home-fun-box">
|
||||||
|
<view class="fun-title col3 fon28 disac bold">其他</view>
|
||||||
|
<view class="disac mar-s30" style="height: 58rpx;">
|
||||||
|
<view @tap="otherEv(index)" class="disjcac fc width25" v-for="(item,index) in otherList" :key="index">
|
||||||
|
<image :style="{width: [58,49,58][index]+'rpx',height:[51,58,55][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
|
||||||
|
<view class="fon24 col3 mar-s10">{{item.title}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 解决方案 -->
|
||||||
|
<view class="home-solution mar-x20 pad30">
|
||||||
|
<view class="disjbac" @tap="goPlant(0)">
|
||||||
|
<view>
|
||||||
|
<view class="fon30 bold" style="color: #00a2e9;">畅想智能-场景化设计</view>
|
||||||
|
<view class="fon34 bold col3 mar-s10">解决方案<text class="col9 mar-z10">Solution</text></view>
|
||||||
|
</view>
|
||||||
|
<image style="width: 50rpx;height: 50rpx;" src="/static/public/icon-home-solution.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
<view class="mar-s30">
|
||||||
|
<scroll-view scroll-x>
|
||||||
|
<view :class="solutionList.length == 4 ? 'disjbac' : 'disac'">
|
||||||
|
<view @tap="goDetail(0,item.id)" class="posir flexs" v-for="(item,index) in solutionList" :key="index" style="width: 23%;height: 214rpx;" :style="{marginRight: solutionList.length != 4 ? '20rpx' : ''}">
|
||||||
|
<image style="width: 100%;height: 214rpx;" class="radius10 " :src="item.imgsrc" mode="widthFix"></image>
|
||||||
|
<view class="posia solution-title clips1">{{item.title}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 常见故障 -->
|
||||||
|
<view class="bacf mar-zy20 pad-sx30 pad-zy10 radius10">
|
||||||
|
<view class="fon34 bold col3" @tap="goPlant(1)">常见故障<text class="col9 mar-z10">Common faults</text></view>
|
||||||
|
<view @tap="goDetail(1,item.id)" class="pad-sx20 bbot disjb" v-for="(item,index) in faultsList" :key="index">
|
||||||
|
<view class="fon28 line-h38 disjb fc" style="min-height: 160rpx;">
|
||||||
|
<view>
|
||||||
|
<view class="col3 clips1">{{item.title}}</view>
|
||||||
|
<view class="fon22 col6 clips3 mar-sx10">{{item.content}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="col9">{{item.views}}人看过</view>
|
||||||
|
</view>
|
||||||
|
<image class="flexs mar-z20" :src="item.imgsrc" style="width: 280rpx;height: 160rpx;" mode="aspectFill" lazy-load></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</container-subgroup-two>
|
||||||
|
<!-- 底部tab -->
|
||||||
|
<foot-tab></foot-tab>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import statusNavSlot from '@/components/status-navs/status-nav-slot.vue';
|
||||||
|
// 暂无更多组件
|
||||||
|
import pitera from '@/components/nothing/pitera.vue';
|
||||||
|
// 公告
|
||||||
|
import lwNotice from '@/components/lw-notice/lw-notice.vue';
|
||||||
|
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
|
||||||
|
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||||
|
const app = getApp();
|
||||||
|
export default {
|
||||||
|
components:{
|
||||||
|
pitera,
|
||||||
|
statusNavSlot,
|
||||||
|
lwNotice,
|
||||||
|
'foot-tab' :footTabOne,
|
||||||
|
containerSubgroupTwo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
role: 1, // 1:业务员 2:表示客户 3:表示客服 4:表示工程师
|
||||||
|
statusHeight: uni.getSystemInfoSync().statusBarHeight + 50,
|
||||||
|
messageNumber: 16 ,// 消息数量
|
||||||
|
noticeList:['2021年11月06日公司团建,维修服务暂停一天服务暂停一天服务暂停一天。','51akslfj;dkpiojasdjf;j1ij'],//公告
|
||||||
|
// 故障报修
|
||||||
|
repairList:[
|
||||||
|
{imgsrc:'/static/public/icon-home-repair.png',title:'报修'},
|
||||||
|
{imgsrc:'/static/public/icon-home-dealt.png',title:'待办'},
|
||||||
|
{imgsrc:'/static/public/icon-home-urge.png',title:'催一催'},
|
||||||
|
],
|
||||||
|
// 增值服务
|
||||||
|
incrementList:[
|
||||||
|
{imgsrc:'/static/public/icon-home-patrol.png',title:'巡检'},
|
||||||
|
{imgsrc:'/static/public/icon-home-maintain.png',title:'保养'},
|
||||||
|
{imgsrc:'/static/public/icon-home-movingScreen.png',title:'移屏'},
|
||||||
|
{imgsrc:'/static/public/icon-home-screeRemoval.png',title:'拆屏'},
|
||||||
|
],
|
||||||
|
// 其他
|
||||||
|
otherList:[
|
||||||
|
{imgsrc:'/static/public/icon-home-largeScreen.png',title:'故障统计'},
|
||||||
|
{imgsrc:'/static/public/icon-home-reportForm.png',title:'数据看板'},
|
||||||
|
{imgsrc:'/static/public/icon-home-product.png',title:'新产品'},
|
||||||
|
],
|
||||||
|
// 解决方案
|
||||||
|
solutionList:[
|
||||||
|
{imgsrc:'/static/deleteImg/flying-img01.png',title:'控制室解决方案'},
|
||||||
|
{imgsrc:'/static/deleteImg/flying-img02.png',title:'户外屏解决方案'},
|
||||||
|
{imgsrc:'/static/deleteImg/flying-img03.png',title:'会议室解决方案'},
|
||||||
|
{imgsrc:'/static/deleteImg/flying-img04.png',title:'实体店解决方案'},
|
||||||
|
],
|
||||||
|
// 项目维修
|
||||||
|
projectRepairList:[
|
||||||
|
{imgsrc:'/static/public/icon-home-staySingle.png',title:'待接单',num:0},
|
||||||
|
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待执行',num:99},
|
||||||
|
{imgsrc:'/static/public/icon-home-repairIng.png',title:'维修中',num:6},
|
||||||
|
],
|
||||||
|
// 工单数据
|
||||||
|
workOrderList:[
|
||||||
|
{imgsrc:'/static/public/icon-home-abnormalSingle.png',title:'异常单',num:0},
|
||||||
|
{imgsrc:'/static/public/icon-home-overdueSingle.png',title:'逾期单',num:0},
|
||||||
|
{imgsrc:'/static/public/icon-home-overtime.png',title:'超时单 ',num:0},
|
||||||
|
{imgsrc:'/static/public/icon-home-workOrderPool.png',title:'工单池',num:6,},
|
||||||
|
],
|
||||||
|
// 结算情况
|
||||||
|
settlementList:[
|
||||||
|
{imgsrc:'/static/public/icon-home-stayCollection.png',title:'待收款',num:0},
|
||||||
|
{imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:6},
|
||||||
|
{imgsrc:'/static/public/icon-home-commission.png',title:'佣金',num:0},
|
||||||
|
],
|
||||||
|
// 待办工单
|
||||||
|
stayWorkOrderList:[
|
||||||
|
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待受理',num:0},
|
||||||
|
{imgsrc:'/static/public/icon-home-stayAssign.png',title:'待指派',num:6},
|
||||||
|
{imgsrc:'/static/public/icon-home-stayRepair.png',title:'待维修',num:6},
|
||||||
|
{imgsrc:'/static/public/icon-home-returnVisit.png',title:'待回访',num:0},
|
||||||
|
],
|
||||||
|
// 待办事件
|
||||||
|
stayEventList:[
|
||||||
|
{imgsrc:'/static/public/icon-home-stayBatch.png',title:'待审批',num:0},
|
||||||
|
{imgsrc:'/static/public/icon-home-stayCollection.png',title:'待收款',num:0},
|
||||||
|
{imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:0},
|
||||||
|
],
|
||||||
|
// 数据查询
|
||||||
|
dataQueryList:[
|
||||||
|
{imgsrc:'/static/public/icon-home-checkCustomer.png',title:'查客户',num:0},
|
||||||
|
{imgsrc:'/static/public/icon-home-checkProject.png',title:'查项目',num:0},
|
||||||
|
{imgsrc:'/static/public/icon-home-checkSparePart.png',title:'查备件',num:0},
|
||||||
|
],
|
||||||
|
// 常见故障
|
||||||
|
faultsList:[],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
// 获取当前页面url
|
||||||
|
this.$toolAll.tools.obtainUrl();
|
||||||
|
// 调用解决方案类型事件
|
||||||
|
this.getPlanType();
|
||||||
|
// 调用增值服务类型
|
||||||
|
this.getIncrementServiceType();
|
||||||
|
// 调用获取常见故障列表事件
|
||||||
|
this.getFaultsList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goNoticeDetail(e){
|
||||||
|
console.log(e);
|
||||||
|
},
|
||||||
|
// 前往增值服务页面
|
||||||
|
goIncrement(index) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/appreciationServe/appreciationServe?index=${index}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 待办事件
|
||||||
|
stayEv(title) {
|
||||||
|
let url = '';
|
||||||
|
if(title=='佣金') {
|
||||||
|
url = `/pagesB/my-account/my-account?index=1`
|
||||||
|
} else {
|
||||||
|
url = `/pages/workOrder/workOrderLlsit?status=${title}`
|
||||||
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url:url
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询增值服务类型
|
||||||
|
getIncrementServiceType(){
|
||||||
|
this.$requst.get('/universal/api.vas/vas_type').then(res=>{
|
||||||
|
if(res.code) {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 数据查询事件
|
||||||
|
dataQueryEv(index){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/dataQuery/queryFunction?index=${index}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询解决方案类型
|
||||||
|
getPlanType(){
|
||||||
|
this.$requst.post('/universal/api.solution/solution_type').then(res=>{
|
||||||
|
if(res.code) {
|
||||||
|
res.data.forEach(item=>{
|
||||||
|
let obj = {
|
||||||
|
id:item.id,
|
||||||
|
title:item.name,
|
||||||
|
imgsrc: app.globalData.hostapi + '/' + item.cover_img,
|
||||||
|
}
|
||||||
|
this.solutionList.push(obj);
|
||||||
|
})
|
||||||
|
console.log(this.solutionList,340);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 故障报修分类下的点击事件
|
||||||
|
goFaultRepair(index){
|
||||||
|
if(index!=2) {
|
||||||
|
let faultRepairUrls = [
|
||||||
|
'/pages/repairsPage/repairsPage',
|
||||||
|
'/pages/workOrder/workOrderLlsit',
|
||||||
|
];
|
||||||
|
uni.navigateTo({
|
||||||
|
url:faultRepairUrls[index]
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$toolAll.tools.showToast('已催单成功')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取常见故障推荐列表
|
||||||
|
getFaultsList(){
|
||||||
|
this.$requst.post('/universal/api.question/question').then(res=>{
|
||||||
|
if(res.code) {
|
||||||
|
res.data.forEach(item=>{
|
||||||
|
let obj = {
|
||||||
|
id:item.id,
|
||||||
|
title:item.title,
|
||||||
|
imgsrc: app.globalData.hostapi + '/' + item.cover_img,
|
||||||
|
content:item.summary,
|
||||||
|
views:item.reading
|
||||||
|
}
|
||||||
|
this.faultsList.push(obj);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 其他分类下的点击事件
|
||||||
|
otherEv(index) {
|
||||||
|
let otherUrls = [
|
||||||
|
'/pages/faultStatistics/faultStatistics',
|
||||||
|
'/pages/faultStatistics/projectOverview',
|
||||||
|
'/pagesB/new-product/new-product',
|
||||||
|
];
|
||||||
|
uni.navigateTo({
|
||||||
|
url:otherUrls[index]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 前往解决方案、常见故障列表
|
||||||
|
goPlant(index){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pagesB/plan-fault/plan-fault?index=${index}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 前往解决方案详情、常见故障详情
|
||||||
|
goDetail(index,id) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pagesB/plan-fault-product-detail/detail?index=${index}&id=${id}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 前往消息列表页面
|
||||||
|
goMessage(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pagesB/message-center/message-center`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 拨打电话事件
|
||||||
|
callEv(){
|
||||||
|
this.$toolAll.tools.countCustomer('15616330510');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
page{background-color: #f7f7f7;}
|
||||||
|
</style>
|
||||||
|
>>>>>>> 6ceeddde3522c33ced86c4a63a2e9d96e5c2e383
|
||||||
|
|
|
@ -218,9 +218,9 @@
|
||||||
},
|
},
|
||||||
goWorkorderTwo(){
|
goWorkorderTwo(){
|
||||||
console.log(this.targetObj);
|
console.log(this.targetObj);
|
||||||
// uni.navigateTo({
|
uni.navigateTo({
|
||||||
// url: "/pages/workOrder/workOrderThree"
|
url: "/pages/workOrder/workOrderThree"
|
||||||
// })
|
})
|
||||||
},
|
},
|
||||||
addMountingsList() {
|
addMountingsList() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -238,6 +238,7 @@
|
||||||
},
|
},
|
||||||
handleSubmit(e) {
|
handleSubmit(e) {
|
||||||
// {year: "2019", month: "07", day: "17", hour: "15", minute: "21"}
|
// {year: "2019", month: "07", day: "17", hour: "15", minute: "21"}
|
||||||
|
|
||||||
this.targetObj.endTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`;
|
this.targetObj.endTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`;
|
||||||
this.targetObj.maintenanceTime = this.$toolAll.tools.returnTimeFormat(this.targetObj.startTime,this.targetObj.endTime);
|
this.targetObj.maintenanceTime = this.$toolAll.tools.returnTimeFormat(this.targetObj.startTime,this.targetObj.endTime);
|
||||||
this.targetObj.waitingTime = this.$toolAll.tools.returnTimeFormat(this.targetObj.declarationTime,this.targetObj.endTime);
|
this.targetObj.waitingTime = this.$toolAll.tools.returnTimeFormat(this.targetObj.declarationTime,this.targetObj.endTime);
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
const app = getApp();
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -54,7 +55,7 @@
|
||||||
// 日期转换
|
// 日期转换
|
||||||
this.dataObj.create_time = this.$toolAll.tools.timestampToTime(this.dataObj.create_time);
|
this.dataObj.create_time = this.$toolAll.tools.timestampToTime(this.dataObj.create_time);
|
||||||
// 封面图
|
// 封面图
|
||||||
this.dataObj.cover_img = getApp().globalData.hostapi + '/' + this.dataObj.cover_img,
|
this.dataObj.cover_img = app.globalData.hostapi + '/' + this.dataObj.cover_img,
|
||||||
this.rich_text = this.$toolAll.tools.escape2Html(this.dataObj.content);
|
this.rich_text = this.$toolAll.tools.escape2Html(this.dataObj.content);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import rate from '@/components/rate.vue';
|
import rate from '@/components/rate.vue';
|
||||||
|
const app = getApp();
|
||||||
export default {
|
export default {
|
||||||
components:{
|
components:{
|
||||||
rate
|
rate
|
||||||
|
@ -80,7 +81,7 @@
|
||||||
res.data.data.forEach(item=>{
|
res.data.data.forEach(item=>{
|
||||||
let obj = {
|
let obj = {
|
||||||
id:item.id,
|
id:item.id,
|
||||||
cover_img: getApp().globalData.hostapi + '/' + item.cover_img,
|
cover_img: app.globalData.hostapi + '/' + item.cover_img,
|
||||||
title:item.title,//标题
|
title:item.title,//标题
|
||||||
summary:item.summary,//描述
|
summary:item.summary,//描述
|
||||||
hot:item.hot,//热度
|
hot:item.hot,//热度
|
||||||
|
|
Loading…
Reference in New Issue