解决reust.js冲突(都在headers中添加了token)

master
chen 2022-03-31 18:37:25 +08:00
commit f4f2042106
12 changed files with 482 additions and 539 deletions

View File

@ -86,7 +86,7 @@ const request = (method, url, options) => {
}
let params = {};
if(options!=undefined) params = options;
params.token = uni.getStorageSync('token');
// params.token = uni.getStorageSync('token');
return new Promise((resolve, reject) => {
uni.request({
url: `${hostapi}${url}`,

View File

@ -98,6 +98,19 @@
},
data() {
return {
data:{
type_id:1,
title:"",
brand:"",
model:"型号",
width:"",
height:"",
contact_name:"",
contact_phone:"",
appointment_time:'',
addres:"",
pictures:"",
},
typeIndex: 0,
typeData: [{
title: '巡检',
@ -124,6 +137,7 @@
methods: {
typeIndexFun(index) {
this.typeIndex = index
this.data.type_id=this.typeData
}
}
}

View File

@ -135,21 +135,23 @@
},
//
chooseImg() {
console.log( uni.getStorageSync('token'))
console.log( uni.getStorageSync("token"))
uni.chooseImage({
success: (chooseImageRes) => {
const tempFilePaths = chooseImageRes.tempFilePaths;
this.imgSrc = chooseImageRes.tempFilePaths[0]
uni.uploadFile({
url: getApp().globalData.hostapi +
'/universal/api.upload/upload', //
url: getApp().globalData.hostapi+'/universal/api.upload/upload', //
filePath: tempFilePaths[0],
name: 'image',
header:{
token: uni.getStorageSync("token")
},
formData: {
token: uni.getStorageInfoSync("token")
dir:"images"
},
success: (uploadFileRes) => {
console.log(uploadFileRes)
}
});

View File

@ -242,6 +242,7 @@
autoplay: true,
interval: 3000,
index: 1,
projectId:"",
recordState: [{
title: '维修记录',
state: true
@ -257,11 +258,27 @@
]
}
},
onLoad(option) {
this.projectId=option.id
this.getData()
},
methods: {
changeAutoplay(data) {
console.log()
this.index = data.detail.current - 0 + 1
},
getData(){
this.$requst.get('/universal/api.project/project_info', {
id: this.projectId,
}).then(res => {
if (res.code == 1) {
console.log(res.data.data)
} else {
}
})
},
recordNav(index) {
for (var i = 0; i < this.recordState.length; i++) {
this.recordState[i].state = false

View File

@ -32,16 +32,16 @@
</view>
</view>
<view class="project-list">
<view class="li" @click="projectDetailsFun()" v-for="(item,index) in dataList.data" :key="index">
<view class="li" @click="projectDetailsFun(item.id)" v-for="(item,index) in dataList.data" :key="index">
<view class="message">
<image class="img" src="../../static/del/img001.png" mode="aspectFill" lazy-load></image>
<view class="text disjb fc" style="height: 180rpx;">
<view class="clips1 fon24 bold">{{item.title}}</view>
<view class="clips1 fon24 bold">{{item.project_name}}</view>
<view class="disjb fc" style="margin-left: -20rpx;height: 80%;">
<view class="serial-number scal09">项目编号{{item.projectCode}}</view>
<view class="specification scal09">规格型号{{item.model}}</view>
<view class="specification scal09">规格型号{{item.project_number}}</view>
<view class="specification scal09">产品尺寸{{item.size}}</view>
<view class="installation-site scal09">安装位置{{item.installationSite}}
<view class="installation-site scal09">安装位置{{item.installation_location}}
</view>
</view>
</view>
@ -55,7 +55,7 @@
</view>
<view class="date scal09">{{item.date}}</view>
</view>
<view v-if="item.state==1" class="icon iconBera"></view>
<view v-if="item.warranty_time==1" class="icon iconBera"></view>
<view v-else class="icon iconBer">质保到期</view>
</view>
</view>
@ -101,98 +101,7 @@
dataList: {
list_rows: 10,
page: 1,
data: [{
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 0
},
{
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 1
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 1
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 1
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 0
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 0
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 1
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 0
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 0
}, {
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
projectCode: "20220108-1001",
model: "DS-CK25FI/H",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
size: "3.94*2.02",
state: 1
},
data: [
]
}
}
@ -204,21 +113,23 @@
methods: {
getData() {
this.$requst.post('/universal/api.project/project_list', {
this.$requst.get('/universal/api.project/project_list', {
list_rows: this.dataList.list_rows,
page: this.dataList.page,
}).then(res => {
// this.$toolAll.tools.showToast(res.msg);
if (res.code == 0) {
this.dataList = res.data.data
console.log(res.data.data)
if (res.code == 1) {
this.dataList.data = res.data.data
} else {
}
})
},
projectDetailsFun() {
projectDetailsFun(id) {
uni.navigateTo({
url: "/pages/project/details"
url: `/pages/project/details?id=${id}`
})
},
//

View File

@ -17,9 +17,9 @@
</view>
<view class="fault-type-title padding">故障类型</view>
<view class="padding fault-type-content">
<view class="li" @click="repairsTypeFun(index)" :class="item.state?'on':''"
<view class="li" @click="repairsTypeFun(index)" :class="index==indexType?'on':''"
v-for="(item,index) in faultTypeData">
{{item.title}}
{{item.name}}
</view>
</view>
@ -30,9 +30,9 @@
</view>
<image class="sm" src="../../static/iocn/sm.png" mode=""></image>
</view>
<input v-model="data.model" class="devicename" placeholder="请填写设备名称和型号" v-else />
<input v-model="data.device_name" class="devicename" placeholder="请填写设备名称和型号" v-else />
<view class="fault-pictures">
<image class="img" src="../../static/iocn/gz.png" mode="aspectFill"></image>
@ -41,25 +41,27 @@
</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" />
<view class="detailed-address inputCss">
<input type="text" v-model="data.address" value="" placeholder="请输入详细的上门服务地址" placeholder-class="inputCss-input" />
<input type="text" v-model="data.address" value="" placeholder="请输入详细的上门服务地址"
placeholder-class="inputCss-input" />
<image @click="mapFun()" src="../../static/iocn/map.png" class="map" mode="aspectFill"></image>
</view>
<input type="text" class="inputCss" v-model="data.name" placeholder="请填写您的姓名" placeholder-class="inputCss-input"
value="" />
<input type="text" class="inputCss" v-model="data.tel" placeholder="请填写联系电话" placeholder-class="inputCss-input"
value="" />
<picker mode="date">
<input type="text" class="inputCss" v-model="data.date" placeholder="请选择上门时间" placeholder-class="inputCss-input"
value="" />
<input type="text" class="inputCss" v-model="data.username" placeholder="请填写您的姓名"
placeholder-class="inputCss-input" value="" />
<input type="text" class="inputCss" v-model="data.phone" placeholder="请填写联系电话"
placeholder-class="inputCss-input" value="" />
<picker mode="date" @change="dateFun()">
<picker mode="time" @change="timeFun()">
<input type="text" class="inputCss" v-model="data.date" placeholder="请选择上门时间"
placeholder-class="inputCss-input" value="" />
</picker>
</picker>
<button class="submit-button" @click="submitButton()" type="default">提交故障申报</button>
</view>
@ -74,72 +76,48 @@
data() {
return {
single: "2021-04-3",
data:{
model:"",
condition:"",
address:"",
name:"",
tel:"",
date:""
data: {
is_device: 0,
fault_type: "",
device_name: "",
condition: "",
project_number:"",
address: "",
username: "",
phone: "",
date: ""
},
indexType: 0,
navDataState: [{
title: "有设备",
state: false
state: false,
is_device: 1
},
{
title: "无设备",
state: true
},
state: true,
is_device: 0
}
],
faultTypeData: [{
title: "供电不足",
state: false
},
{
title: "参数错误",
state: false
},
{
title: "模组故障",
state: false
},
{
title: "网络故障",
state: false
},
{
title: "外力损坏",
state: false
},
{
title: "软件问题",
state: true
},
{
title: "信号故障",
state: false
},
{
title: "其他问题",
state: false
},
]
faultTypeData: []
}
},
onLoad(){
this.getType()
onLoad() {
this.getType()
},
methods: {
getType(){
//
getType() {
// /universal/api.order/fault_type
this.$requst.post('/universal/api.work_order/fault_type').then(res => {
// this.$toolAll.tools.showToast(res.msg);
if (res.code == 0) {
console.log(res)
if (res.code == 1) {
this.faultTypeData = [...res.data]
} else {
}
})
},
@ -147,6 +125,13 @@
this.single = e;
console.log("-change事件:", e);
},
//
dateFun(data){
},
timeFun(){
},
scanCodeFun() {
uni.scanCode({
success: function(res) {
@ -155,47 +140,84 @@
}
});
},
submitButton(){
// if()
submitButton() {
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)){
this.$toolAll.tools.showToast("请正确填写您的电话");
return
}
return
this.$requst.post('/universal/api.work_order/repair').then(res => {
// this.$toolAll.tools.showToast(res.msg);
if (res.code == 1) {
} else {
}
})
console.log(this.data)
},
mapFun() {
uni.getLocation({
type: 'gcj02', //uni.openLocation
success: function (res) {
const latitude = res.latitude;
const longitude = res.longitude;
console.log(latitude,longitude,78);
uni.chooseLocation({
success: function (res) {
console.log(res,81);
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
}
});
// uni.openLocation({
// latitude: latitude,
// longitude: longitude,
// success: function () {
// console.log('success');
// }
// });
}
});
uni.getLocation({
type: 'gcj02', //uni.openLocation
success: function(res) {
const latitude = res.latitude;
const longitude = res.longitude;
console.log(latitude, longitude, 78);
uni.chooseLocation({
success: function(res) {
console.log(res, 81);
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
}
});
// uni.openLocation({
// latitude: latitude,
// longitude: longitude,
// success: function () {
// console.log('success');
// }
// });
}
});
},
repairsNavFun(index) {
for (var i = 0; i < this.navDataState.length; i++) {
this.navDataState[i].state = false
}
this.navDataState[index].state = true
console.log(this.navDataState[index].is_device)
this.data.is_device = this.navDataState[index].is_device
},
repairsTypeFun(index) {
for (var i = 0; i < this.faultTypeData.length; i++) {
this.faultTypeData[i].state = false
}
this.faultTypeData[index].state = true
this.indexType = index
},
}

View File

@ -1,181 +1,254 @@
<template>
<view class="pad-x180">
<status-nav-slot :backgroudColor="backgroudColor">
<!-- <view slot="leftContent"><i class="icon icon-return fon40" :style="{color:newColor}"></i></view> -->
<view slot="leftContent" style="width: 30rpx;"></view>
<view slot="centerContent"><view :style="{color:newColor}">个人中心</view></view>
<!-- #ifdef APP-PLUS -->
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i></view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i></view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view slot="rightContent" style="width: 30rpx;"></view>
<!-- #endif -->
</status-nav-slot>
<view class="posir" style="background: url(/static/public/icon-my-logo.png) no-repeat;background-size: 100% auto;" :style="{paddingTop: newHeight + 'px'}">
<!-- <image src="/static/public/icon-my-logo.png" class="width100" mode="widthFix" lazy-load></image> -->
<view class="mar-zy40">
<view 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="disac">
<image class="flexs mar-y10" 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="fon34 bold">156****0510</view>
<view class="fon22" style="color: #717171;">未实名认证</view>
</view>
</view>
<image src="/static/public/icon-my-level.png" mode="aspectFill" style="width: 49rpx;height: 76rpx;" lazy-load></image>
</view>
<!-- 信用分项目数量未评价 -->
<view class="disja pad-zy40">
<view v-for="(item,index) in headList" :key="index" class="disjcac fc">
<view style="height: 50rpx;" class="disjcac">
<image :src="item.imgsrc" :style="{width: [49,49,46][index] + 'rpx',height: [50,50,42][index] + 'rpx'}" mode="widthFix" lazy-load></image>
</view>
<view class="fon24 col9 mar-sx10">{{item.title}}</view>
<view class="fon36 bold">{{item.num}}</view>
</view>
</view>
</view>
<!-- 预约及时率上门准时率项目报修率 -->
<view class="disja mar-s20">
<view v-for="(item,index) in percentageList" :key="index" class="disjcac fc col3">
<!-- <cmd-progress type="circle" :percent="item.num" :width="60" :stroke-color="['#00a2e9','#e87c00','#0b56ec'][index]" :circleStrokeColor="['#c6e6f5','#f4dfc6','#c8d7f5'][index]" :strokeShape="'square'"></cmd-progress> -->
<arprogress :percent="item.num"
:inactiveColor="['#c6e6f5','#f4dfc6','#c8d7f5'][index]"
:activeColor="['#00a2e9','#e87c00','#0b56ec'][index]"
:borderWidth="7.8"
:width="120"
:duration="500"
bgColor="transparent"><text :style="{color: ['#00a2e9','#e87c00','#0b56ec'][index]}">{{item.num}}%</text></arprogress>
<view class="fon24 mar-s20">{{item.title}}</view>
</view>
</view>
<!-- 六宫格 -->
<view class="disjbac fw bacf" style="margin: 30rpx -20rpx 0rpx -20rpx;">
<view @tap="chooseGridEv(index)" class="disjcac fc width50 pad-sx40" v-for="(item,index) in gridList" :key="index" :class="[`${(index%2!=0) ? 'bleft' : ''} ${(index < gridList.length-2) ? 'bbot' : ''}`]" style="box-sizing: border-box;">
<image :src="item.imgsrc" mode="widthFix" lazy-load :style="{width: [52,52,46,50,46,52][index] + 'rpx',height: [48,45,52,52,53,52][index] + 'rpx'}"></image>
<view class="fon26 col3 mar-s20">{{item.title}}</view>
</view>
</view>
<!-- 退出登录 -->
<view class="my-exit-btn" @tap="logOutEv">退</view>
</view>
</view>
<!-- 底部tab -->
<foot-tab :current='4'></foot-tab>
</view>
<view class="pad-x180">
<status-nav-slot :backgroudColor="backgroudColor">
<!-- <view slot="leftContent"><i class="icon icon-return fon40" :style="{color:newColor}"></i></view> -->
<view slot="leftContent" style="width: 30rpx;"></view>
<view slot="centerContent">
<view :style="{color:newColor}">个人中心</view>
</view>
<!-- #ifdef APP-PLUS -->
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i>
</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i>
</view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view slot="rightContent" style="width: 30rpx;"></view>
<!-- #endif -->
</status-nav-slot>
<view class="posir"
style="background: url(/static/public/icon-my-logo.png) no-repeat;background-size: 100% auto;"
:style="{paddingTop: newHeight + 'px'}">
<!-- <image src="/static/public/icon-my-logo.png" class="width100" mode="widthFix" lazy-load></image> -->
<view class="mar-zy40">
<view
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="disac">
<image class="flexs mar-y10" v-if="!userInfo.avatar"
src="/static/public/icon-my-headimg.png" mode="aspectFill"
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="fon34 bold">{{tel(userInfo.username)}}</view>
<view class="fon22" style="color: #717171;">未实名认证</view>
</view>
</view>
<image src="/static/public/icon-my-level.png" mode="aspectFill"
style="width: 49rpx;height: 76rpx;" lazy-load></image>
</view>
<!-- 信用分项目数量未评价 -->
<view class="disja pad-zy40">
<view v-for="(item,index) in headList" :key="index" class="disjcac fc">
<view style="height: 50rpx;" class="disjcac">
<image :src="item.imgsrc"
:style="{width: [49,49,46][index] + 'rpx',height: [50,50,42][index] + 'rpx'}"
mode="widthFix" lazy-load></image>
</view>
<view class="fon24 col9 mar-sx10">{{item.title}}</view>
<view class="fon36 bold">{{item.num}}</view>
</view>
</view>
</view>
<!-- 预约及时率上门准时率项目报修率 -->
<view class="disja mar-s20">
<view v-for="(item,index) in percentageList" :key="index" class="disjcac fc col3">
<!-- <cmd-progress type="circle" :percent="item.num" :width="60" :stroke-color="['#00a2e9','#e87c00','#0b56ec'][index]" :circleStrokeColor="['#c6e6f5','#f4dfc6','#c8d7f5'][index]" :strokeShape="'square'"></cmd-progress> -->
<arprogress :percent="item.num" :inactiveColor="['#c6e6f5','#f4dfc6','#c8d7f5'][index]"
:activeColor="['#00a2e9','#e87c00','#0b56ec'][index]" :borderWidth="7.8" :width="120"
:duration="500" bgColor="transparent"><text
:style="{color: ['#00a2e9','#e87c00','#0b56ec'][index]}">{{item.num}}%</text>
</arprogress>
<view class="fon24 mar-s20">{{item.title}}</view>
</view>
</view>
<!-- 六宫格 -->
<view class="disjbac fw bacf" style="margin: 30rpx -20rpx 0rpx -20rpx;">
<view @tap="chooseGridEv(index)" class="disjcac fc width50 pad-sx40"
v-for="(item,index) in gridList" :key="index"
:class="[`${(index%2!=0) ? 'bleft' : ''} ${(index < gridList.length-2) ? 'bbot' : ''}`]"
style="box-sizing: border-box;">
<image :src="item.imgsrc" mode="widthFix" lazy-load
:style="{width: [52,52,46,50,46,52][index] + 'rpx',height: [48,45,52,52,53,52][index] + 'rpx'}">
</image>
<view class="fon26 col3 mar-s20">{{item.title}}</view>
</view>
</view>
<!-- 退出登录 -->
<view class="my-exit-btn" @tap="logOutEv">退</view>
</view>
</view>
<!-- 底部tab -->
<foot-tab :current='4'></foot-tab>
</view>
</template>
<script>
import statusNavSlot from '@/components/status-navs/status-nav-slot.vue';
//
import cmdProgress from '@/components/cmd-progress/cmd-progress.vue';
//
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
import arprogress from '@/components/ar-circle-progress/index.vue'
export default {
components:{statusNavSlot,cmdProgress,'foot-tab' :footTabOne,arprogress},
data() {
return {
newHeight: uni.getSystemInfoSync().statusBarHeight + 50,
backgroudColor:'rgba(255,255,255,0)',
newColor:'rgba(255,255,255,1)',
headList:[
{imgsrc:'/static/public/icon-my-creditScore.png',title:'信用分',num:0},
{imgsrc:'/static/public/icon-my-projectNum.png',title:'项目数量',num:0},
{imgsrc:'/static/public/icon-my-notEvaluated.png',title:'未评价',num:0},
],
percentageList:[
{title:'预约及时率',num:100},
{title:'上门准时率',num:60},
{title:'项目报修率',num:40},
],
gridList:[
{imgsrc:'/static/public/icon-my-information.png',title:'个人信息'},
{imgsrc:'/static/public/icon-my-certificates.png',title:'电子证件'},
{imgsrc:'/static/public/icon-my-service.png',title:'服务范围'},
{imgsrc:'/static/public/icon-my-evaluate.png',title:'我要评价'},
{imgsrc:'/static/public/icon-my-account.png',title:'我的账户'},
{imgsrc:'/static/public/icon-my-set.png',title:'设置'},
],
userInfo:{}
}
},
onShow() {
//
this.checkInfo();
},
onPageScroll(e) {
let navHeight = uni.getSystemInfoSync().statusBarHeight + 50;
this.backgroudColor = `rgba(255,255,255,${e.scrollTop/navHeight})`;
if(e.scrollTop/navHeight < 0.5) {
this.newColor = `#FFFFFF`;
} else {
this.newColor = `#000000`;
}
},
onLoad() {
//
this.$toolAll.tools.disableShareEv();
},
methods: {
// 退
logOutEv(){
this.$requst.post('/universal/api.login/signout').then(res=>{
if(res.code==1) {
this.$toolAll.tools.showToast('退出成功');
//
uni.clearStorageSync();
//
// #ifdef APP-PLUS
uni.setStorageSync('hostapi','http://maintain.7and5.cn');
// #endif
// #ifdef H5
uni.setStorageSync('hostapi','/web');
// #endif
setTimeout(()=>{
uni.reLaunch({
url:'/pages/login/login'
})
},1000)
}
})
},
checkInfo(){
this.$requst.get('/universal/api.user/user_center').then(res=>{
if(res.code==1 && res.data.length!=1) {
this.userInfo = res.data;
}
})
},
//
chooseGridEv(index){
let urls = [
'/pagesB/personal-information/personal-information',
'/pagesB/electronic-certificate/electronic-certificate',
'/pagesB/service-range/service-range',
'/pages/workOrder/workOrderLlsit?status=已完成',
'/pagesB/my-account/my-account?index=0',
'/pagesB/set-up/set-up',
];
uni.navigateTo({
url:urls[index]
})
},
//
goSetUp(){
uni.navigateTo({
url:'/pagesB/set-up/set-up'
})
}
}
}
import statusNavSlot from '@/components/status-navs/status-nav-slot.vue';
//
import cmdProgress from '@/components/cmd-progress/cmd-progress.vue';
//
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
import arprogress from '@/components/ar-circle-progress/index.vue'
export default {
components: {
statusNavSlot,
cmdProgress,
'foot-tab': footTabOne,
arprogress
},
data() {
return {
newHeight: uni.getSystemInfoSync().statusBarHeight + 50,
backgroudColor: 'rgba(255,255,255,0)',
newColor: 'rgba(255,255,255,1)',
headList: [{
imgsrc: '/static/public/icon-my-creditScore.png',
title: '信用分',
num: 0
},
{
imgsrc: '/static/public/icon-my-projectNum.png',
title: '项目数量',
num: 0
},
{
imgsrc: '/static/public/icon-my-notEvaluated.png',
title: '未评价',
num: 0
},
],
percentageList: [{
title: '预约及时率',
num: 100
},
{
title: '上门准时率',
num: 60
},
{
title: '项目报修率',
num: 40
},
],
gridList: [{
imgsrc: '/static/public/icon-my-information.png',
title: '个人信息'
},
{
imgsrc: '/static/public/icon-my-certificates.png',
title: '电子证件'
},
{
imgsrc: '/static/public/icon-my-service.png',
title: '服务范围'
},
{
imgsrc: '/static/public/icon-my-evaluate.png',
title: '我要评价'
},
{
imgsrc: '/static/public/icon-my-account.png',
title: '我的账户'
},
{
imgsrc: '/static/public/icon-my-set.png',
title: '设置'
},
],
userInfo: {}
}
},
onShow() {
//
this.checkInfo();
},
onPageScroll(e) {
let navHeight = uni.getSystemInfoSync().statusBarHeight + 50;
this.backgroudColor = `rgba(255,255,255,${e.scrollTop/navHeight})`;
if (e.scrollTop / navHeight < 0.5) {
this.newColor = `#FFFFFF`;
} else {
this.newColor = `#000000`;
}
},
onLoad() {
//
this.$toolAll.tools.disableShareEv();
},
methods: {
// 退
logOutEv() {
this.$requst.post('/universal/api.login/signout').then(res => {
if (res.code == 1) {
this.$toolAll.tools.showToast('退出成功');
//
uni.clearStorageSync();
//
// #ifdef APP-PLUS
uni.setStorageSync('hostapi', 'http://maintain.7and5.cn');
// #endif
// #ifdef H5
uni.setStorageSync('hostapi', '/web');
// #endif
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/login'
})
}, 1000)
}
})
},
//
tel(tel) {
const telNum = tel.toString();
const reg = /^(\d{3})\d{4}(\d{4})$/;
return telNum.replace(reg, '$1****$2')
},
//
checkInfo() {
this.$requst.get('/universal/api.user/user_center').then(res => {
if (res.code == 1 && res.data.length != 1) {
this.userInfo = res.data;
this.headList[0].num = this.userInfo.credit
this.headList[1].num = this.userInfo.project_number
this.headList[2].num = this.userInfo.evaluate
this.percentageList[0].num= this.userInfo.reserve_rate-0
this.percentageList[1].num= this.userInfo.visit_rate-0
this.percentageList[2].num= this.userInfo.repair_rate-0
}
})
},
//
chooseGridEv(index) {
let urls = [
'/pagesB/personal-information/personal-information',
'/pagesB/electronic-certificate/electronic-certificate',
'/pagesB/service-range/service-range',
'/pages/workOrder/workOrderLlsit?status=已完成',
'/pagesB/my-account/my-account?index=0',
'/pagesB/set-up/set-up',
];
uni.navigateTo({
url: urls[index]
})
},
//
goSetUp() {
uni.navigateTo({
url: '/pagesB/set-up/set-up'
})
}
}
}
</script>
<style>
page {background-color: #f7f7f7;}
page {
background-color: #f7f7f7;
}
</style>

View File

@ -345,9 +345,10 @@
url:url
})
},
//
getIncrementServiceType(){
this.$requst.post('/universal/api.vas/vas_type').then(res=>{
this.$requst.get('/universal/api.vas/vas_type').then(res=>{
if(res.code) {
}

View File

@ -5,16 +5,16 @@
<container-subgroup-two>
<view slot="content" style="margin: -25rpx -25rpx -0rpx;">
<view class="project-list-input" :style="{top:statusBarHeight + 'px'}">
<input type="text" class="int" value="" placeholder="请输入关键字" />
<image class="search" src="../../static/iocn/ss.png" mode=""></image>
<input type="text" @keydown.enter="getDatalist()" class="int" v-model="dataPage.keyword" value="" placeholder="请输入关键字" />
<image @click="getDatalist()" class="search" src="../../static/iocn/ss.png" mode=""></image>
<view class="xian"></view>
</view>
<view class="screen">
<!-- 筛选状态查询日期查询 -->
<picker @change="bindPickerChange" :value="workeOrderStatusIndex" :range="array" :range-key="'title'">
<picker @change="bindPickerChange" :value="workeOrderStatusIndex" :range="array" :range-key="'name'">
<view class="li">
<view class="text" v-if="workeOrderStatus!=''">{{workeOrderStatus}}</view>
<view class="text" v-else>{{array[workeOrderStatusIndex].title}}</view>
<view class="text" v-else>{{array[workeOrderStatusIndex].name}}</view>
<image class="img" src="../../static/iocn/xla.png" mode="aspectFill"></image>
</view>
</picker>
@ -32,24 +32,25 @@
<view class="project-list">
<!-- 列表循环体 -->
<view class="li" @click="projectDetailsFun(item.status,item.id,item.statusText,item.backgroundColor)" v-for="(item,index) in dataList" :key="index">
<view class="work-order-code">工单编号{{item.orderNum}}</view>
<view class="work-order-code">工单编号{{item.order_number}}</view>
<view class="message">
<image class="img" src="../../static/del/img001.png" mode="aspectFill"></image>
<view class="text">
<view class="title">
<view class="text clips1">{{item.title}}</view>
<view class="icon" :style="{backgroundColor: item.backgroundColor}">{{['','待受理','等待派工','待接单','待维修','维修中','待收款','待审批','已完成','待回访','异常单','逾期单','超时单'][item.status]}}</view>
<view class="text clips1">{{item.project_name}}</view>
<view class="icon" :style="{backgroundColor: item.attributes.color}">{{item.attributes.text
}}</view>
</view>
<view class="disjb fc" style="margin-left: -20rpx;height: 70%;">
<view class="serial-number scal09">
<view class="type">{{item.faultType}}</view>
<view class="date">已故障{{item.faultTime}}</view>
<view class="type">#{{item.fault_type}}#</view>
<view class="date">{{item.failure_time}}</view>
</view>
<view class="specification scal09">
紧急程度<view class="text"> {{item.urgentText}}</view>
紧急程度<view class="text"> {{item.principal}}</view>
</view>
<view class="specification scal09">主负责人{{item.name}}</view>
<view class="installation-site scal09">故障描述{{item.describe}}</view>
<view class="installation-site scal09">故障描述{{item.failure_description}}</view>
</view>
</view>
</view>
@ -91,151 +92,18 @@
date: currentDate,
workeOrderStatus:'工单状态',
array: [
{id:1,title:'待受理'},
{id:2,title:'待指派'},
{id:3,title:'待接单'},
{id:4,title:'待维修'},
{id:5,title:'维修中'},
{id:6,title:'待收款'},
{id:7,title:'待审批'},
{id:8,title:'已收款'},
{id:9,title:'待回访'},
{id:10,title:'异常单'},
{id:11,title:'逾期单'},
{id:12,title:'超时单'}
],
workeOrderStatusIndex: 0,
dataPage:{
list_rows:10,
page:1,
order_status:"",
order_times:"",
keyword:""
},
dataList:[
{
id:1,
orderNum:'222226666558',
title:'长沙市望城区xxxxxx项目名称',
status:1,
statusText:'待受理',
backgroundColor:'#ff0000',
faultType:'#网络故障#',
faultTime:'2小时37分',
urgentText:'加急',
name:'陈志远',
describe:'LED显示屏开机后闪屏不显示内容。主控电脑提示网络不通',
address:'湖南省长沙市高新开发区谷园路109号像素大厦1205'
},
{
id:2,
orderNum:'222226666558',
title:'长沙市望城区xxxxxx项目名称',
status:2,
statusText:'待指派',
backgroundColor:'#112233',
faultType:'#网络故障#',
faultTime:'2小时37分',
urgentText:'加急',
name:'陈志远',
describe:'LED显示屏开机后闪屏不显示内容。主控电脑提示网络不通',
address:'湖南省长沙市高新开发区谷园路109号像素大厦1205'
},
{
id:3,
orderNum:'222226666558',
title:'长沙市望城区xxxxxx项目名称',
status:3,
statusText:'待接单',
backgroundColor:'#ff00ff',
faultType:'#网络故障#',
faultTime:'2小时37分',
urgentText:'加急',
name:'陈志远',
describe:'LED显示屏开机后闪屏不显示内容。主控电脑提示网络不通',
address:'湖南省长沙市高新开发区谷园路109号像素大厦1205'
},
{
id:3,
orderNum:'222226666558',
title:'长沙市望城区xxxxxx项目名称',
status:4,
statusText:'待维修',
backgroundColor:'#303545',
faultType:'#网络故障#',
faultTime:'2小时37分',
urgentText:'加急',
name:'陈志远',
describe:'LED显示屏开机后闪屏不显示内容。主控电脑提示网络不通',
address:'湖南省长沙市高新开发区谷园路109号像素大厦1205'
},
{
id:3,
orderNum:'222226666558',
title:'长沙市望城区xxxxxx项目名称',
status:5,
statusText:'维修中',
backgroundColor:'#006677',
faultType:'#网络故障#',
faultTime:'2小时37分',
urgentText:'加急',
name:'陈志远',
describe:'LED显示屏开机后闪屏不显示内容。主控电脑提示网络不通',
address:'湖南省长沙市高新开发区谷园路109号像素大厦1205'
},
{
id:3,
orderNum:'222226666558',
title:'长沙市望城区xxxxxx项目名称',
status:6,
statusText:'待收款',
backgroundColor:'#669955',
faultType:'#网络故障#',
faultTime:'2小时37分',
urgentText:'加急',
name:'陈志远',
describe:'LED显示屏开机后闪屏不显示内容。主控电脑提示网络不通',
address:'湖南省长沙市高新开发区谷园路109号像素大厦1205'
},
{
id:3,
orderNum:'222226666558',
title:'长沙市望城区xxxxxx项目名称',
status:7,
statusText:'待审批',
backgroundColor:'#558899',
faultType:'#网络故障#',
faultTime:'2小时37分',
urgentText:'加急',
name:'陈志远',
describe:'LED显示屏开机后闪屏不显示内容。主控电脑提示网络不通',
address:'湖南省长沙市高新开发区谷园路109号像素大厦1205'
},
{
id:3,
orderNum:'222226666558',
title:'长沙市望城区xxxxxx项目名称',
status:8,
statusText:'已完成',
backgroundColor:'#336655',
faultType:'#网络故障#',
faultTime:'2小时37分',
urgentText:'加急',
name:'陈志远',
describe:'LED显示屏开机后闪屏不显示内容。主控电脑提示网络不通',
address:'湖南省长沙市高新开发区谷园路109号像素大厦1205'
},
{
id:3,
orderNum:'222226666558',
title:'长沙市望城区xxxxxx项目名称',
status:9,
statusText:'待回访',
backgroundColor:'#224455',
faultType:'#网络故障#',
faultTime:'2小时37分',
urgentText:'加急',
name:'陈志远',
describe:'LED显示屏开机后闪屏不显示内容。主控电脑提示网络不通',
address:'湖南省长沙市高新开发区谷园路109号像素大厦1205'
},
]
}
@ -243,7 +111,6 @@
onLoad(op) {
this.workeOrderStatusIndex = this.array.findIndex(item=>item.title==op.status);
if(this.workeOrderStatusIndex!=-1) this.workeOrderStatus = '';
this.getDatalist()
this.getType()
},
@ -256,7 +123,9 @@
}).then(res => {
// this.$toolAll.tools.showToast(res.msg);
if (res.code == 1) {
this.dataList = res.data.data
console.log(res.data,"---aa")
this.array=[...res.data]
console.log( this.array)
} else {
}
@ -264,15 +133,12 @@
},
getDatalist(){
this.$requst.get('/universal/api.order/order_list', {
list_rows: this.dataPage.list_rows,
page: this.dataPage.page,
}).then(res => {
this.$requst.get('/universal/api.order/order_list',this.dataPage).then(res => {
// this.$toolAll.tools.showToast(res.msg);
if (res.code == 1) {
this.dataList = res.data.data
} else {
} else if(res.code == 0){
this.dataList = res.data.data
}
})
},
@ -310,9 +176,17 @@
this.workeOrderStatus = '';
this.workeOrderStatusIndex = data.detail.value;
console.log( data.detail.value)
this.dataPage.order_status=this.array[data.detail.value].id-0
this.getDatalist()
},
bindDateChange(date) {
console.log(date)
this.dataPage.order_times=date.detail.value
this.getDatalist()
},
getDate(type) {
const date = new Date();

View File

@ -47,8 +47,11 @@
this.$requst.get('/universal/api.user/electronic_badge').then(res=>{
if(res.code==1){
// uni.navigateBack({delta:1})
this.userId=res.data.id
this.userName=res.data.name
this.userPhone=res.data.phone
this.userEmail=res.data.email
this.website=res.data.website
}
})

View File

@ -33,7 +33,7 @@
methods: {
//
getMessageList(){
this.$requst.post('/universal/api.message/message_list').then(res=>{
this.$requst.get('/universal/api.message/message_list').then(res=>{
})
}

View File

@ -101,7 +101,32 @@
flag:true
}
},
onLoad() {
this.getData()
},
methods: {
//
getData(){
this.$requst.get('/universal/api.user/user_info').then(res => {
if (res.code == 1 && res.data.length != 1) {
console.log(res.data)
this.nickname=res.data.nickname
this.full_name=res.data.name
if(res.data.sex==0){
this.genderNum=1
}else{
this.genderNum=res.data.sex
}
this.contact_number=res.data.phone
this.e_mail=res.data.email
this.id_card_no=res.data.idcard
}
})
},
//
sumbmitData(){
if(this.checkEmpty()){
@ -132,6 +157,7 @@
}
}
},
//
checkEmpty(){
let result = false;