解决reust.js冲突(都在headers中添加了token)
commit
f4f2042106
|
@ -86,7 +86,7 @@ const request = (method, url, options) => {
|
||||||
}
|
}
|
||||||
let params = {};
|
let params = {};
|
||||||
if(options!=undefined) params = options;
|
if(options!=undefined) params = options;
|
||||||
params.token = uni.getStorageSync('token');
|
// params.token = uni.getStorageSync('token');
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.request({
|
uni.request({
|
||||||
url: `${hostapi}${url}`,
|
url: `${hostapi}${url}`,
|
||||||
|
|
|
@ -98,6 +98,19 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
data:{
|
||||||
|
type_id:1,
|
||||||
|
title:"",
|
||||||
|
brand:"",
|
||||||
|
model:"型号",
|
||||||
|
width:"",
|
||||||
|
height:"",
|
||||||
|
contact_name:"",
|
||||||
|
contact_phone:"",
|
||||||
|
appointment_time:'',
|
||||||
|
addres:"",
|
||||||
|
pictures:"",
|
||||||
|
},
|
||||||
typeIndex: 0,
|
typeIndex: 0,
|
||||||
typeData: [{
|
typeData: [{
|
||||||
title: '巡检',
|
title: '巡检',
|
||||||
|
@ -124,6 +137,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
typeIndexFun(index) {
|
typeIndexFun(index) {
|
||||||
this.typeIndex = index
|
this.typeIndex = index
|
||||||
|
this.data.type_id=this.typeData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,21 +135,23 @@
|
||||||
},
|
},
|
||||||
// 图片选择事件
|
// 图片选择事件
|
||||||
chooseImg() {
|
chooseImg() {
|
||||||
console.log( uni.getStorageSync('token'))
|
console.log( uni.getStorageSync("token"))
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
success: (chooseImageRes) => {
|
success: (chooseImageRes) => {
|
||||||
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 +
|
url: getApp().globalData.hostapi+'/universal/api.upload/upload', //仅为示例,非真实的接口地址
|
||||||
'/universal/api.upload/upload', //仅为示例,非真实的接口地址
|
|
||||||
filePath: tempFilePaths[0],
|
filePath: tempFilePaths[0],
|
||||||
name: 'image',
|
name: 'image',
|
||||||
|
header:{
|
||||||
|
token: uni.getStorageSync("token")
|
||||||
|
},
|
||||||
formData: {
|
formData: {
|
||||||
token: uni.getStorageInfoSync("token")
|
dir:"images"
|
||||||
},
|
},
|
||||||
success: (uploadFileRes) => {
|
success: (uploadFileRes) => {
|
||||||
|
console.log(uploadFileRes)
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -242,6 +242,7 @@
|
||||||
autoplay: true,
|
autoplay: true,
|
||||||
interval: 3000,
|
interval: 3000,
|
||||||
index: 1,
|
index: 1,
|
||||||
|
projectId:"",
|
||||||
recordState: [{
|
recordState: [{
|
||||||
title: '维修记录',
|
title: '维修记录',
|
||||||
state: true
|
state: true
|
||||||
|
@ -257,11 +258,27 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.projectId=option.id
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
changeAutoplay(data) {
|
changeAutoplay(data) {
|
||||||
console.log()
|
console.log()
|
||||||
this.index = data.detail.current - 0 + 1
|
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) {
|
recordNav(index) {
|
||||||
for (var i = 0; i < this.recordState.length; i++) {
|
for (var i = 0; i < this.recordState.length; i++) {
|
||||||
this.recordState[i].state = false
|
this.recordState[i].state = false
|
||||||
|
|
|
@ -32,16 +32,16 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="project-list">
|
<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">
|
<view class="message">
|
||||||
<image class="img" src="../../static/del/img001.png" mode="aspectFill" lazy-load></image>
|
<image class="img" src="../../static/del/img001.png" mode="aspectFill" lazy-load></image>
|
||||||
<view class="text disjb fc" style="height: 180rpx;">
|
<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="disjb fc" style="margin-left: -20rpx;height: 80%;">
|
||||||
<view class="serial-number scal09">项目编号:{{item.projectCode}}</view>
|
<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="specification scal09">产品尺寸:{{item.size}}</view>
|
||||||
<view class="installation-site scal09">安装位置:{{item.installationSite}}
|
<view class="installation-site scal09">安装位置:{{item.installation_location}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="date scal09">{{item.date}}</view>
|
<view class="date scal09">{{item.date}}</view>
|
||||||
</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 v-else class="icon iconBer">质保到期</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -101,98 +101,7 @@
|
||||||
dataList: {
|
dataList: {
|
||||||
list_rows: 10,
|
list_rows: 10,
|
||||||
page: 1,
|
page: 1,
|
||||||
data: [{
|
data: [
|
||||||
title: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
|
|
||||||
projectCode: "20220108-1001",
|
|
||||||
model: "DS-CK25FI/H",
|
|
||||||
installationSite: "xxx综合楼2楼会议室",
|
|
||||||
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
|
|
||||||
date: "2022/01/08",
|
|
||||||
size: "3.94m*2.02m",
|
|
||||||
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.94m*2.02m",
|
|
||||||
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.94m*2.02m",
|
|
||||||
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.94m*2.02m",
|
|
||||||
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.94m*2.02m",
|
|
||||||
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.94m*2.02m",
|
|
||||||
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.94m*2.02m",
|
|
||||||
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.94m*2.02m",
|
|
||||||
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.94m*2.02m",
|
|
||||||
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.94m*2.02m",
|
|
||||||
state: 1
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,21 +113,23 @@
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
getData() {
|
getData() {
|
||||||
this.$requst.post('/universal/api.project/project_list', {
|
this.$requst.get('/universal/api.project/project_list', {
|
||||||
list_rows: this.dataList.list_rows,
|
list_rows: this.dataList.list_rows,
|
||||||
page: this.dataList.page,
|
page: this.dataList.page,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
// this.$toolAll.tools.showToast(res.msg);
|
// this.$toolAll.tools.showToast(res.msg);
|
||||||
if (res.code == 0) {
|
console.log(res.data.data)
|
||||||
this.dataList = res.data.data
|
if (res.code == 1) {
|
||||||
|
this.dataList.data = res.data.data
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
projectDetailsFun() {
|
projectDetailsFun(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/project/details"
|
url: `/pages/project/details?id=${id}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 查询
|
// 查询
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="fault-type-title padding">故障类型:</view>
|
<view class="fault-type-title padding">故障类型:</view>
|
||||||
<view class="padding fault-type-content">
|
<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">
|
v-for="(item,index) in faultTypeData">
|
||||||
{{item.title}}
|
{{item.name}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -30,9 +30,9 @@
|
||||||
</view>
|
</view>
|
||||||
<image class="sm" src="../../static/iocn/sm.png" mode=""></image>
|
<image class="sm" src="../../static/iocn/sm.png" mode=""></image>
|
||||||
</view>
|
</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">
|
<view class="fault-pictures">
|
||||||
<image class="img" src="../../static/iocn/gz.png" mode="aspectFill"></image>
|
<image class="img" src="../../static/iocn/gz.png" mode="aspectFill"></image>
|
||||||
|
@ -41,25 +41,27 @@
|
||||||
</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" 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>
|
<image @click="mapFun()" src="../../static/iocn/map.png" class="map" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<input type="text" class="inputCss" v-model="data.name" placeholder="请填写您的姓名" placeholder-class="inputCss-input"
|
<input type="text" class="inputCss" v-model="data.username" placeholder="请填写您的姓名"
|
||||||
value="" />
|
placeholder-class="inputCss-input" value="" />
|
||||||
<input type="text" class="inputCss" v-model="data.tel" placeholder="请填写联系电话" placeholder-class="inputCss-input"
|
<input type="text" class="inputCss" v-model="data.phone" placeholder="请填写联系电话"
|
||||||
value="" />
|
placeholder-class="inputCss-input" value="" />
|
||||||
<picker mode="date">
|
<picker mode="date" @change="dateFun()">
|
||||||
<input type="text" class="inputCss" v-model="data.date" placeholder="请选择上门时间" placeholder-class="inputCss-input"
|
<picker mode="time" @change="timeFun()">
|
||||||
value="" />
|
<input type="text" class="inputCss" v-model="data.date" placeholder="请选择上门时间"
|
||||||
|
placeholder-class="inputCss-input" value="" />
|
||||||
</picker>
|
</picker>
|
||||||
|
</picker>
|
||||||
|
|
||||||
<button class="submit-button" @click="submitButton()" type="default">提交故障申报</button>
|
<button class="submit-button" @click="submitButton()" type="default">提交故障申报</button>
|
||||||
</view>
|
</view>
|
||||||
|
@ -74,72 +76,48 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
single: "2021-04-3",
|
single: "2021-04-3",
|
||||||
|
data: {
|
||||||
data:{
|
is_device: 0,
|
||||||
model:"",
|
fault_type: "",
|
||||||
condition:"",
|
device_name: "",
|
||||||
address:"",
|
condition: "",
|
||||||
name:"",
|
project_number:"",
|
||||||
tel:"",
|
address: "",
|
||||||
date:""
|
username: "",
|
||||||
|
phone: "",
|
||||||
|
date: ""
|
||||||
},
|
},
|
||||||
|
indexType: 0,
|
||||||
navDataState: [{
|
navDataState: [{
|
||||||
title: "有设备",
|
title: "有设备",
|
||||||
state: false
|
state: false,
|
||||||
|
is_device: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "无设备",
|
title: "无设备",
|
||||||
state: true
|
state: true,
|
||||||
},
|
is_device: 0
|
||||||
|
}
|
||||||
],
|
],
|
||||||
faultTypeData: [{
|
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
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad() {
|
||||||
this.getType()
|
this.getType()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getType(){
|
// 获取故障类型
|
||||||
|
getType() {
|
||||||
// /universal/api.order/fault_type
|
// /universal/api.order/fault_type
|
||||||
this.$requst.post('/universal/api.work_order/fault_type').then(res => {
|
this.$requst.post('/universal/api.work_order/fault_type').then(res => {
|
||||||
// this.$toolAll.tools.showToast(res.msg);
|
// this.$toolAll.tools.showToast(res.msg);
|
||||||
if (res.code == 0) {
|
if (res.code == 1) {
|
||||||
console.log(res)
|
|
||||||
|
|
||||||
|
this.faultTypeData = [...res.data]
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -147,6 +125,13 @@
|
||||||
this.single = e;
|
this.single = e;
|
||||||
console.log("-change事件:", e);
|
console.log("-change事件:", e);
|
||||||
},
|
},
|
||||||
|
// 获取日期
|
||||||
|
dateFun(data){
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
timeFun(){
|
||||||
|
},
|
||||||
scanCodeFun() {
|
scanCodeFun() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
|
@ -155,47 +140,84 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitButton(){
|
submitButton() {
|
||||||
// if()
|
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() {
|
mapFun() {
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'gcj02', //返回可以用于uni.openLocation的经纬度
|
type: 'gcj02', //返回可以用于uni.openLocation的经纬度
|
||||||
success: function (res) {
|
success: function(res) {
|
||||||
const latitude = res.latitude;
|
const latitude = res.latitude;
|
||||||
const longitude = res.longitude;
|
const longitude = res.longitude;
|
||||||
console.log(latitude,longitude,78);
|
console.log(latitude, longitude, 78);
|
||||||
uni.chooseLocation({
|
uni.chooseLocation({
|
||||||
success: function (res) {
|
success: function(res) {
|
||||||
console.log(res,81);
|
console.log(res, 81);
|
||||||
console.log('位置名称:' + res.name);
|
console.log('位置名称:' + res.name);
|
||||||
console.log('详细地址:' + res.address);
|
console.log('详细地址:' + res.address);
|
||||||
console.log('纬度:' + res.latitude);
|
console.log('纬度:' + res.latitude);
|
||||||
console.log('经度:' + res.longitude);
|
console.log('经度:' + res.longitude);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// uni.openLocation({
|
// uni.openLocation({
|
||||||
// latitude: latitude,
|
// latitude: latitude,
|
||||||
// longitude: longitude,
|
// longitude: longitude,
|
||||||
// success: function () {
|
// success: function () {
|
||||||
// console.log('success');
|
// console.log('success');
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
repairsNavFun(index) {
|
repairsNavFun(index) {
|
||||||
for (var i = 0; i < this.navDataState.length; i++) {
|
for (var i = 0; i < this.navDataState.length; i++) {
|
||||||
this.navDataState[i].state = false
|
this.navDataState[i].state = false
|
||||||
}
|
}
|
||||||
this.navDataState[index].state = true
|
this.navDataState[index].state = true
|
||||||
|
console.log(this.navDataState[index].is_device)
|
||||||
|
this.data.is_device = this.navDataState[index].is_device
|
||||||
},
|
},
|
||||||
repairsTypeFun(index) {
|
repairsTypeFun(index) {
|
||||||
for (var i = 0; i < this.faultTypeData.length; i++) {
|
this.indexType = index
|
||||||
this.faultTypeData[i].state = false
|
|
||||||
}
|
|
||||||
this.faultTypeData[index].state = true
|
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,181 +1,254 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="pad-x180">
|
<view class="pad-x180">
|
||||||
<status-nav-slot :backgroudColor="backgroudColor">
|
<status-nav-slot :backgroudColor="backgroudColor">
|
||||||
<!-- <view slot="leftContent"><i class="icon icon-return fon40" :style="{color:newColor}"></i></view> -->
|
<!-- <view slot="leftContent"><i class="icon icon-return fon40" :style="{color:newColor}"></i></view> -->
|
||||||
<view slot="leftContent" style="width: 30rpx;"></view>
|
<view slot="leftContent" style="width: 30rpx;"></view>
|
||||||
<view slot="centerContent"><view :style="{color:newColor}">个人中心</view></view>
|
<view slot="centerContent">
|
||||||
<!-- #ifdef APP-PLUS -->
|
<view :style="{color:newColor}">个人中心</view>
|
||||||
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i></view>
|
</view>
|
||||||
<!-- #endif -->
|
<!-- #ifdef APP-PLUS -->
|
||||||
<!-- #ifdef H5 -->
|
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i>
|
||||||
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i></view>
|
</view>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef H5 -->
|
||||||
<view slot="rightContent" style="width: 30rpx;"></view>
|
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i>
|
||||||
<!-- #endif -->
|
</view>
|
||||||
</status-nav-slot>
|
<!-- #endif -->
|
||||||
<view class="posir" style="background: url(/static/public/icon-my-logo.png) no-repeat;background-size: 100% auto;" :style="{paddingTop: newHeight + 'px'}">
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<!-- <image src="/static/public/icon-my-logo.png" class="width100" mode="widthFix" lazy-load></image> -->
|
<view slot="rightContent" style="width: 30rpx;"></view>
|
||||||
<view class="mar-zy40">
|
<!-- #endif -->
|
||||||
<view style="background: url(../../../static/public/icon-my-head.png) no-repeat;height: 400rpx;background-size: 100% 100%;">
|
</status-nav-slot>
|
||||||
<view class="disjbac" style="padding: 60rpx 80rpx 60rpx 60rpx;">
|
<view class="posir"
|
||||||
<view class="disac">
|
style="background: url(/static/public/icon-my-logo.png) no-repeat;background-size: 100% auto;"
|
||||||
<image class="flexs mar-y10" src="/static/public/icon-my-headimg.png" mode="aspectFill" style="width: 91rpx;height: 91rpx;" lazy-load></image>
|
:style="{paddingTop: newHeight + 'px'}">
|
||||||
<view class="disjb fc" style="height: 91rpx;">
|
<!-- <image src="/static/public/icon-my-logo.png" class="width100" mode="widthFix" lazy-load></image> -->
|
||||||
<view class="fon34 bold">156****0510</view>
|
<view class="mar-zy40">
|
||||||
<view class="fon22" style="color: #717171;">未实名认证</view>
|
<view
|
||||||
</view>
|
style="background: url(../../../static/public/icon-my-head.png) no-repeat;height: 400rpx;background-size: 100% 100%;">
|
||||||
</view>
|
<view class="disjbac" style="padding: 60rpx 80rpx 60rpx 60rpx;">
|
||||||
<image src="/static/public/icon-my-level.png" mode="aspectFill" style="width: 49rpx;height: 76rpx;" lazy-load></image>
|
<view class="disac">
|
||||||
</view>
|
<image class="flexs mar-y10" v-if="!userInfo.avatar"
|
||||||
<!-- 信用分、项目数量、未评价 -->
|
src="/static/public/icon-my-headimg.png" mode="aspectFill"
|
||||||
<view class="disja pad-zy40">
|
style="width: 91rpx;height: 91rpx;" lazy-load></image>
|
||||||
<view v-for="(item,index) in headList" :key="index" class="disjcac fc">
|
<image class="flexs mar-y10" v-else src="/static/public/icon-my-headimg.png"
|
||||||
<view style="height: 50rpx;" class="disjcac">
|
mode="aspectFill" style="width: 91rpx;height: 91rpx;" lazy-load></image>
|
||||||
<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="disjb fc" style="height: 91rpx;">
|
||||||
<view class="fon24 col9 mar-sx10">{{item.title}}</view>
|
<view class="fon34 bold">{{tel(userInfo.username)}}</view>
|
||||||
<view class="fon36 bold">{{item.num}}</view>
|
<view class="fon22" style="color: #717171;">未实名认证</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<image src="/static/public/icon-my-level.png" mode="aspectFill"
|
||||||
<!-- 预约及时率、上门准时率、项目报修率 -->
|
style="width: 49rpx;height: 76rpx;" lazy-load></image>
|
||||||
<view class="disja mar-s20">
|
</view>
|
||||||
<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> -->
|
<view class="disja pad-zy40">
|
||||||
<arprogress :percent="item.num"
|
<view v-for="(item,index) in headList" :key="index" class="disjcac fc">
|
||||||
:inactiveColor="['#c6e6f5','#f4dfc6','#c8d7f5'][index]"
|
<view style="height: 50rpx;" class="disjcac">
|
||||||
:activeColor="['#00a2e9','#e87c00','#0b56ec'][index]"
|
<image :src="item.imgsrc"
|
||||||
:borderWidth="7.8"
|
:style="{width: [49,49,46][index] + 'rpx',height: [50,50,42][index] + 'rpx'}"
|
||||||
:width="120"
|
mode="widthFix" lazy-load></image>
|
||||||
:duration="500"
|
</view>
|
||||||
bgColor="transparent"><text :style="{color: ['#00a2e9','#e87c00','#0b56ec'][index]}">{{item.num}}%</text></arprogress>
|
<view class="fon24 col9 mar-sx10">{{item.title}}</view>
|
||||||
<view class="fon24 mar-s20">{{item.title}}</view>
|
<view class="fon36 bold">{{item.num}}</view>
|
||||||
</view>
|
</view>
|
||||||
</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;">
|
<view class="disja mar-s20">
|
||||||
<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 v-for="(item,index) in percentageList" :key="index" class="disjcac fc col3">
|
||||||
<view class="fon26 col3 mar-s20">{{item.title}}</view>
|
<!-- <cmd-progress type="circle" :percent="item.num" :width="60" :stroke-color="['#00a2e9','#e87c00','#0b56ec'][index]" :circleStrokeColor="['#c6e6f5','#f4dfc6','#c8d7f5'][index]" :strokeShape="'square'"></cmd-progress> -->
|
||||||
</view>
|
<arprogress :percent="item.num" :inactiveColor="['#c6e6f5','#f4dfc6','#c8d7f5'][index]"
|
||||||
</view>
|
:activeColor="['#00a2e9','#e87c00','#0b56ec'][index]" :borderWidth="7.8" :width="120"
|
||||||
<!-- 退出登录 -->
|
:duration="500" bgColor="transparent"><text
|
||||||
<view class="my-exit-btn" @tap="logOutEv">退出登录</view>
|
:style="{color: ['#00a2e9','#e87c00','#0b56ec'][index]}">{{item.num}}%</text>
|
||||||
</view>
|
</arprogress>
|
||||||
</view>
|
<view class="fon24 mar-s20">{{item.title}}</view>
|
||||||
<!-- 底部tab -->
|
</view>
|
||||||
<foot-tab :current='4'></foot-tab>
|
</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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import statusNavSlot from '@/components/status-navs/status-nav-slot.vue';
|
import statusNavSlot from '@/components/status-navs/status-nav-slot.vue';
|
||||||
// 进度条
|
// 进度条
|
||||||
import cmdProgress from '@/components/cmd-progress/cmd-progress.vue';
|
import cmdProgress from '@/components/cmd-progress/cmd-progress.vue';
|
||||||
// 底部组件
|
// 底部组件
|
||||||
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
|
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
|
||||||
import arprogress from '@/components/ar-circle-progress/index.vue'
|
import arprogress from '@/components/ar-circle-progress/index.vue'
|
||||||
export default {
|
export default {
|
||||||
components:{statusNavSlot,cmdProgress,'foot-tab' :footTabOne,arprogress},
|
components: {
|
||||||
data() {
|
statusNavSlot,
|
||||||
return {
|
cmdProgress,
|
||||||
newHeight: uni.getSystemInfoSync().statusBarHeight + 50,
|
'foot-tab': footTabOne,
|
||||||
backgroudColor:'rgba(255,255,255,0)',
|
arprogress
|
||||||
newColor:'rgba(255,255,255,1)',
|
},
|
||||||
headList:[
|
data() {
|
||||||
{imgsrc:'/static/public/icon-my-creditScore.png',title:'信用分',num:0},
|
return {
|
||||||
{imgsrc:'/static/public/icon-my-projectNum.png',title:'项目数量',num:0},
|
newHeight: uni.getSystemInfoSync().statusBarHeight + 50,
|
||||||
{imgsrc:'/static/public/icon-my-notEvaluated.png',title:'未评价',num:0},
|
backgroudColor: 'rgba(255,255,255,0)',
|
||||||
],
|
newColor: 'rgba(255,255,255,1)',
|
||||||
percentageList:[
|
headList: [{
|
||||||
{title:'预约及时率',num:100},
|
imgsrc: '/static/public/icon-my-creditScore.png',
|
||||||
{title:'上门准时率',num:60},
|
title: '信用分',
|
||||||
{title:'项目报修率',num:40},
|
num: 0
|
||||||
],
|
},
|
||||||
gridList:[
|
{
|
||||||
{imgsrc:'/static/public/icon-my-information.png',title:'个人信息'},
|
imgsrc: '/static/public/icon-my-projectNum.png',
|
||||||
{imgsrc:'/static/public/icon-my-certificates.png',title:'电子证件'},
|
title: '项目数量',
|
||||||
{imgsrc:'/static/public/icon-my-service.png',title:'服务范围'},
|
num: 0
|
||||||
{imgsrc:'/static/public/icon-my-evaluate.png',title:'我要评价'},
|
},
|
||||||
{imgsrc:'/static/public/icon-my-account.png',title:'我的账户'},
|
{
|
||||||
{imgsrc:'/static/public/icon-my-set.png',title:'设置'},
|
imgsrc: '/static/public/icon-my-notEvaluated.png',
|
||||||
],
|
title: '未评价',
|
||||||
userInfo:{}
|
num: 0
|
||||||
}
|
},
|
||||||
},
|
],
|
||||||
onShow() {
|
percentageList: [{
|
||||||
// 查询用户信息
|
title: '预约及时率',
|
||||||
this.checkInfo();
|
num: 100
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
{
|
||||||
let navHeight = uni.getSystemInfoSync().statusBarHeight + 50;
|
title: '上门准时率',
|
||||||
this.backgroudColor = `rgba(255,255,255,${e.scrollTop/navHeight})`;
|
num: 60
|
||||||
if(e.scrollTop/navHeight < 0.5) {
|
},
|
||||||
this.newColor = `#FFFFFF`;
|
{
|
||||||
} else {
|
title: '项目报修率',
|
||||||
this.newColor = `#000000`;
|
num: 40
|
||||||
}
|
},
|
||||||
},
|
],
|
||||||
onLoad() {
|
gridList: [{
|
||||||
// 禁止分享
|
imgsrc: '/static/public/icon-my-information.png',
|
||||||
this.$toolAll.tools.disableShareEv();
|
title: '个人信息'
|
||||||
},
|
},
|
||||||
methods: {
|
{
|
||||||
// 退出登录
|
imgsrc: '/static/public/icon-my-certificates.png',
|
||||||
logOutEv(){
|
title: '电子证件'
|
||||||
this.$requst.post('/universal/api.login/signout').then(res=>{
|
},
|
||||||
if(res.code==1) {
|
{
|
||||||
this.$toolAll.tools.showToast('退出成功');
|
imgsrc: '/static/public/icon-my-service.png',
|
||||||
// 清除所有缓存
|
title: '服务范围'
|
||||||
uni.clearStorageSync();
|
},
|
||||||
// 配置全局域名
|
{
|
||||||
// #ifdef APP-PLUS
|
imgsrc: '/static/public/icon-my-evaluate.png',
|
||||||
uni.setStorageSync('hostapi','http://maintain.7and5.cn');
|
title: '我要评价'
|
||||||
// #endif
|
},
|
||||||
// #ifdef H5
|
{
|
||||||
uni.setStorageSync('hostapi','/web');
|
imgsrc: '/static/public/icon-my-account.png',
|
||||||
// #endif
|
title: '我的账户'
|
||||||
setTimeout(()=>{
|
},
|
||||||
uni.reLaunch({
|
{
|
||||||
url:'/pages/login/login'
|
imgsrc: '/static/public/icon-my-set.png',
|
||||||
})
|
title: '设置'
|
||||||
},1000)
|
},
|
||||||
}
|
],
|
||||||
})
|
userInfo: {}
|
||||||
},
|
}
|
||||||
checkInfo(){
|
},
|
||||||
this.$requst.get('/universal/api.user/user_center').then(res=>{
|
onShow() {
|
||||||
if(res.code==1 && res.data.length!=1) {
|
// 查询用户信息
|
||||||
this.userInfo = res.data;
|
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) {
|
||||||
chooseGridEv(index){
|
this.newColor = `#FFFFFF`;
|
||||||
let urls = [
|
} else {
|
||||||
'/pagesB/personal-information/personal-information',
|
this.newColor = `#000000`;
|
||||||
'/pagesB/electronic-certificate/electronic-certificate',
|
}
|
||||||
'/pagesB/service-range/service-range',
|
},
|
||||||
'/pages/workOrder/workOrderLlsit?status=已完成',
|
onLoad() {
|
||||||
'/pagesB/my-account/my-account?index=0',
|
// 禁止分享
|
||||||
'/pagesB/set-up/set-up',
|
this.$toolAll.tools.disableShareEv();
|
||||||
];
|
},
|
||||||
uni.navigateTo({
|
methods: {
|
||||||
url:urls[index]
|
// 退出登录
|
||||||
})
|
logOutEv() {
|
||||||
},
|
this.$requst.post('/universal/api.login/signout').then(res => {
|
||||||
// 前往设置页面
|
if (res.code == 1) {
|
||||||
goSetUp(){
|
this.$toolAll.tools.showToast('退出成功');
|
||||||
uni.navigateTo({
|
// 清除所有缓存
|
||||||
url:'/pagesB/set-up/set-up'
|
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>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
page {background-color: #f7f7f7;}
|
page {
|
||||||
|
background-color: #f7f7f7;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -345,9 +345,10 @@
|
||||||
url:url
|
url:url
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询增值服务类型
|
// 查询增值服务类型
|
||||||
getIncrementServiceType(){
|
getIncrementServiceType(){
|
||||||
this.$requst.post('/universal/api.vas/vas_type').then(res=>{
|
this.$requst.get('/universal/api.vas/vas_type').then(res=>{
|
||||||
if(res.code) {
|
if(res.code) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,16 +5,16 @@
|
||||||
<container-subgroup-two>
|
<container-subgroup-two>
|
||||||
<view slot="content" style="margin: -25rpx -25rpx -0rpx;">
|
<view slot="content" style="margin: -25rpx -25rpx -0rpx;">
|
||||||
<view class="project-list-input" :style="{top:statusBarHeight + 'px'}">
|
<view class="project-list-input" :style="{top:statusBarHeight + 'px'}">
|
||||||
<input type="text" class="int" value="" placeholder="请输入关键字" />
|
<input type="text" @keydown.enter="getDatalist()" class="int" v-model="dataPage.keyword" value="" placeholder="请输入关键字" />
|
||||||
<image class="search" src="../../static/iocn/ss.png" mode=""></image>
|
<image @click="getDatalist()" class="search" src="../../static/iocn/ss.png" mode=""></image>
|
||||||
<view class="xian"></view>
|
<view class="xian"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="screen">
|
<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="li">
|
||||||
<view class="text" v-if="workeOrderStatus!=''">{{workeOrderStatus}}</view>
|
<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>
|
<image class="img" src="../../static/iocn/xla.png" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</picker>
|
</picker>
|
||||||
|
@ -32,24 +32,25 @@
|
||||||
<view class="project-list">
|
<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="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">
|
<view class="message">
|
||||||
<image class="img" src="../../static/del/img001.png" mode="aspectFill"></image>
|
<image class="img" src="../../static/del/img001.png" mode="aspectFill"></image>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view class="text clips1">{{item.title}}</view>
|
<view class="text clips1">{{item.project_name}}</view>
|
||||||
<view class="icon" :style="{backgroundColor: item.backgroundColor}">{{['','待受理','等待派工','待接单','待维修','维修中','待收款','待审批','已完成','待回访','异常单','逾期单','超时单'][item.status]}}</view>
|
<view class="icon" :style="{backgroundColor: item.attributes.color}">{{item.attributes.text
|
||||||
|
}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="disjb fc" style="margin-left: -20rpx;height: 70%;">
|
<view class="disjb fc" style="margin-left: -20rpx;height: 70%;">
|
||||||
<view class="serial-number scal09">
|
<view class="serial-number scal09">
|
||||||
<view class="type">{{item.faultType}}</view>
|
<view class="type">#{{item.fault_type}}#</view>
|
||||||
<view class="date">已故障{{item.faultTime}}</view>
|
<view class="date">{{item.failure_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="specification scal09">
|
<view class="specification scal09">
|
||||||
紧急程度:<view class="text"> {{item.urgentText}}</view>
|
紧急程度:<view class="text"> {{item.principal}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="specification scal09">主负责人:{{item.name}}</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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -91,151 +92,18 @@
|
||||||
date: currentDate,
|
date: currentDate,
|
||||||
workeOrderStatus:'工单状态',
|
workeOrderStatus:'工单状态',
|
||||||
array: [
|
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,
|
workeOrderStatusIndex: 0,
|
||||||
dataPage:{
|
dataPage:{
|
||||||
list_rows:10,
|
list_rows:10,
|
||||||
page:1,
|
page:1,
|
||||||
|
order_status:"",
|
||||||
|
order_times:"",
|
||||||
|
keyword:""
|
||||||
},
|
},
|
||||||
dataList:[
|
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) {
|
onLoad(op) {
|
||||||
this.workeOrderStatusIndex = this.array.findIndex(item=>item.title==op.status);
|
this.workeOrderStatusIndex = this.array.findIndex(item=>item.title==op.status);
|
||||||
if(this.workeOrderStatusIndex!=-1) this.workeOrderStatus = '';
|
if(this.workeOrderStatusIndex!=-1) this.workeOrderStatus = '';
|
||||||
|
|
||||||
this.getDatalist()
|
this.getDatalist()
|
||||||
this.getType()
|
this.getType()
|
||||||
},
|
},
|
||||||
|
@ -256,7 +123,9 @@
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
// this.$toolAll.tools.showToast(res.msg);
|
// this.$toolAll.tools.showToast(res.msg);
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
this.dataList = res.data.data
|
console.log(res.data,"---aa")
|
||||||
|
this.array=[...res.data]
|
||||||
|
console.log( this.array)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -264,15 +133,12 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
getDatalist(){
|
getDatalist(){
|
||||||
this.$requst.get('/universal/api.order/order_list', {
|
this.$requst.get('/universal/api.order/order_list',this.dataPage).then(res => {
|
||||||
list_rows: this.dataPage.list_rows,
|
|
||||||
page: this.dataPage.page,
|
|
||||||
}).then(res => {
|
|
||||||
// this.$toolAll.tools.showToast(res.msg);
|
// this.$toolAll.tools.showToast(res.msg);
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
this.dataList = res.data.data
|
this.dataList = res.data.data
|
||||||
} else {
|
} else if(res.code == 0){
|
||||||
|
this.dataList = res.data.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -310,9 +176,17 @@
|
||||||
|
|
||||||
this.workeOrderStatus = '';
|
this.workeOrderStatus = '';
|
||||||
this.workeOrderStatusIndex = data.detail.value;
|
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) {
|
bindDateChange(date) {
|
||||||
console.log(date)
|
this.dataPage.order_times=date.detail.value
|
||||||
|
|
||||||
|
this.getDatalist()
|
||||||
|
|
||||||
},
|
},
|
||||||
getDate(type) {
|
getDate(type) {
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
|
|
|
@ -47,8 +47,11 @@
|
||||||
|
|
||||||
this.$requst.get('/universal/api.user/electronic_badge').then(res=>{
|
this.$requst.get('/universal/api.user/electronic_badge').then(res=>{
|
||||||
if(res.code==1){
|
if(res.code==1){
|
||||||
|
this.userId=res.data.id
|
||||||
// uni.navigateBack({delta:1})
|
this.userName=res.data.name
|
||||||
|
this.userPhone=res.data.phone
|
||||||
|
this.userEmail=res.data.email
|
||||||
|
this.website=res.data.website
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
// 查询消息列表
|
// 查询消息列表
|
||||||
getMessageList(){
|
getMessageList(){
|
||||||
this.$requst.post('/universal/api.message/message_list').then(res=>{
|
this.$requst.get('/universal/api.message/message_list').then(res=>{
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,32 @@
|
||||||
flag:true
|
flag:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
methods: {
|
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(){
|
sumbmitData(){
|
||||||
if(this.checkEmpty()){
|
if(this.checkEmpty()){
|
||||||
|
@ -132,6 +157,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 判断是否为空
|
// 判断是否为空
|
||||||
checkEmpty(){
|
checkEmpty(){
|
||||||
let result = false;
|
let result = false;
|
||||||
|
|
Loading…
Reference in New Issue