master
tangyi 2022-03-28 18:09:23 +08:00
commit 864bf33fef
15 changed files with 858 additions and 267 deletions

View File

@ -8,7 +8,7 @@
}"
>
<!-- 有的不支持canvas-id属性必须用id属性 -->
<canvas
<canvas v-if="canvasId"
class="canvas-bg"
:canvas-id="canvasId"
:id="canvasId"
@ -17,7 +17,7 @@
height: widthPx + 'px'
}"
></canvas>
<canvas
<canvas v-if="elId"
class="canvas"
:canvas-id="elId"
:id="elId"

107
components/city/city.css Normal file
View File

@ -0,0 +1,107 @@
.lotus-address-picker {
font-size: 26rpx;
padding-top: 30rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
line-height: normal;
padding-right: 30rpx;
box-sizing: border-box;
}
.lotus-address-picker-box {
/*display: -webkit-box;
display: -webkit-flex;*/
display: flex;
align-items: center;
justify-content: center;
justify-content: flex-start;
padding-top: 10rpx;
padding-bottom: 10rpx;
}
.lotus-address-picker-box-item {
height: 600upx;
overflow-y: auto;
width: 33.333%;
padding-left: 20rpx;
padding-right: 20rpx;
box-sizing: border-box;
}
.lotus-address-picker2 {
color: #03affb;
position: relative;
}
.lotus-address-picker2:after {
content: '';
position: absolute;
right: 0;
top: 65%;
transform: translateY(-35%) rotate(-45deg);
width: 20rpx;
height: 10rpx;
border-left-width: 4rpx;
border-bottom-width: 4rpx;
border-left-style: solid;
border-bottom-style: solid;
border-left-color: #03affb;
border-bottom-color: #03affb;
}
.lotus-address-mask {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 999;
background: rgba(0, 0, 0, 0.5);
}
.lotus-address-box {
background: #fff;
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: auto;
}
.lotus-address-action {
font-size: 30rpx;
/*display: -webkit-box;
display: -webkit-flex;*/
display: flex;
align-items: center;
justify-content: center;
justify-content: space-between;
padding: 25rpx 30rpx;
position: relative;
}
.lotus-address-action:after {
content: " ";
position: absolute;
left: 0;
top: 0;
right: 0;
height: 1px;
border-top: 1px solid #eee;
color: #eee;
transform-origin: 0 0;
transform: scaleY(0.5);
}
.lotus-address-action:before {
content: " ";
position: absolute;
left: 0;
bottom: 0;
right: 0;
height: 1px;
border-bottom: 1px solid #eee;
color: #eee;
transform-origin: 0 100%;
transform: scaleY(0.5);
}
.lotus-address-action-cancel {
color: #969696;
}
.lotus-address-action-affirm {
color: #03affb;
}

1
components/city/city.js Normal file

File diff suppressed because one or more lines are too long

233
components/city/city.vue Normal file
View File

@ -0,0 +1,233 @@
<template>
<!--地址picker-->
<view :status="checkStatus" v-if="lotusAddressData.visible" class="lotus-address-mask">
<view :class="lotusAddressData.visible?'lotus-address-box':'lotus-address-box lotus-address-box-out'">
<view class="lotus-address-action">
<text @tap="cancelPicker" class="lotus-address-action-cancel">取消</text>
<text @tap="chosedVal" class="lotus-address-action-affirm">确认</text>
</view>
<view class="lotus-address-picker-box">
<!---->
<scroll-view scroll-y :scroll-into-view="'pid'+pChoseIndex" class="lotus-address-picker-box-item">
<view @tap="clickPicker(0,pIndex,pItem);" :id="'pid'+pIndex" :class="pIndex === pChoseIndex?'lotus-address-picker lotus-address-picker2':'lotus-address-picker'" v-for="(pItem,pIndex) in province" :key="pIndex">{{pItem}}</view>
</scroll-view>
<!---->
<scroll-view scroll-y :scroll-into-view="'cid'+cChoseIndex" class="lotus-address-picker-box-item">
<view @tap="clickPicker(1,cIndex,cItem);" :id="'cid'+cIndex" :class="cIndex === cChoseIndex?'lotus-address-picker lotus-address-picker2':'lotus-address-picker'" v-for="(cItem,cIndex) in city" :key="cIndex">{{cItem}}</view>
</scroll-view>
<!---->
<scroll-view scroll-y :scroll-into-view="'tid'+tChoseIndex" class="lotus-address-picker-box-item">
<view @tap="clickPicker(2,tIndex,tItem);" :id="'tid'+tIndex" :class="tIndex === tChoseIndex?'lotus-address-picker lotus-address-picker2':'lotus-address-picker'" v-for="(tItem,tIndex) in town" :key="tIndex">{{tItem}}</view>
</scroll-view>
<!--区END-->
</view>
</view>
</view>
<!--地址picker END-->
</template>
<script>
import {lotusAddressJson} from "./city.js";
export default {
props:['lotusAddressData'],
data() {
return {
visible: false,
province:[],
city:[],
town:[],
provinceName:'',
cityName:'',
townName:'',
type:0,//01
pChoseIndex:-1,
cChoseIndex:-1,
tChoseIndex:-1
};
},
methods:{
//
cancelPicker(){
const provinceCode = this.getTarId(this.provinceName);
const cityCode = this.getTarId(this.cityName);
const townCode = this.getTarId(this.townName);
this.visible = false;
this.$emit("choseVal",{
province:this.provinceName,
provinceCode,
city:this.cityName,
cityCode,
town:this.townName,
townCode,
isChose:0,
visible:false
});
},
//
chosedVal() {
this.type = 1;
const provinceCode = this.getTarId(this.provinceName);
const cityCode = this.getTarId(this.cityName);
const townCode = this.getTarId(this.townName);
this.visible = false;
let isChose = 0;
// isChose = 1
if((this.provinceName&&this.cityName)||(this.provinceName&&this.cityName&&this.townName)){
isChose = 1;
}
this.$emit("choseVal",{
province:this.provinceName,
provinceCode,
city:this.cityName,
cityCode,
town:this.townName,
townCode,
isChose,
visible:false
});
},
//value
getTarId(name,type){
let id = 0;
lotusAddressJson.map((item,index)=>{
if(item.name === name){
id = item.value;
}
});
return id;
},
//
getCityArr(parentId){
let city = [];
lotusAddressJson.map((item,index)=>{
if(item.parent === parentId){
city.push(item.name);
}
});
return city;
},
//
getTownArr(parentId){
let town = [];
lotusAddressJson.map((item,index)=>{
if(index>34&&item.parent === parentId){
town.push(item.name);
}
});
return town;
},
//
initFn(){
if(!this.province.length){
lotusAddressJson.map((item,index)=>{
if(index<=34){
this.province.push(item.name);
}
});
}
//
const p = this._props.lotusAddressData.provinceName;
const c = this._props.lotusAddressData.cityName;
const t = this._props.lotusAddressData.townName;
//
if(p){
this.pChoseIndex = this.getTarIndex(this.province,p);
}
//
if(p&&c){
const pid = this.getTarId(p);
this.city = this.getCityArr(pid);
this.cChoseIndex = this.getTarIndex(this.city,c);
}
//
if(p&&c&&t){
const cid= this.getTarId(c);
this.town = this.getTownArr(cid);
this.tChoseIndex = this.getTarIndex(this.town,t);
}
//
if(!p&&!c&&!t){
this.pChoseIndex = -1;
this.cChoseIndex = -1;
this.tChoseIndex = -1;
this.city = [];
this.town = [];
}
},
//
getChosedData(){
const pid = this.getTarId(this.provinceName,'province');
this.city = this.getCityArr(pid);
const cid= this.getTarId(this.cityName,'city');
this.town = this.getTownArr(cid);
//index
if(this.provinceName){
this.pChoseIndex = this.getTarIndex(this.province,this.provinceName);
}
if(this.cityName){
this.cChoseIndex = this.getTarIndex(this.city,this.cityName);
}
if(this.townName){
this.tChoseIndex = this.getTarIndex(this.town,this.townName);
}
},
//
clickPicker(type,index,name){
//
if(type === 0){
this.pChoseIndex = index;
this.provinceName = name;
this.cChoseIndex = -1;
this.tChoseIndex = -1;
this.cityName = '';
this.townName = '';
}
//
if(type ===1){
this.cChoseIndex = index;
this.cityName = name;
this.tChoseIndex = -1;
this.townName = '';
}
//
if(type === 2){
this.tChoseIndex = index;
this.townName = name;
}
//
this.getChosedData();
},
//index
getTarIndex(arr,tarName){
let cIndex = 0;
arr.map((item,index)=>{
if(item === tarName){
cIndex = index;
}
});
return cIndex;
}
},
computed:{
checkStatus(){
let t = null;
const _this = this;
if(!_this.visible){
_this.visible = _this._props.lotusAddressData.visible;
//
_this.provinceName = _this._props.lotusAddressData.provinceName;
_this.cityName = _this._props.lotusAddressData.cityName;
_this.townName = _this._props.lotusAddressData.townName;
//
_this.initFn();
t = _this.visible;
}
return t;
}
}
}
</script>
<style lang="less">
@import "./city.css";
</style>

View File

@ -356,14 +356,14 @@ moreColor:显示更多的颜色
}
.loopItemBaseShow {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
// height: 100%;
overflow: hidden;
font-size: 28rpx;
text-align: left;
position: absolute;
white-space: nowrap;
align-items: center;
text-overflow: ellipsis;

View File

@ -69,6 +69,16 @@ const tools = {
// return false
return !reg_tel.test(phone);
},
// 电子邮箱验证
isEmail(email){
let reg_email = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
return !reg_email.test(email);
},
// 身份证验证
isIdentity(identity) {
let reg_identity = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
return !reg_identity.test(identity);
},
// 手机号中间四位用"****"带替
hideMPhone(phone){
return `${phone.substr(0, 3)}****${phone.substr(7)}`

View File

@ -105,7 +105,16 @@
]
}
},
onLoad() {
this.checkFeedback();
},
methods: {
//
checkFeedback(){
this.$requst.get('/universal/api.feedback/feedback_type',{page:1,list_rows:20}).then(res=>{
})
},
opinionType(index) {
for (var i = 0; i < this.typeData.length; i++) {
this.typeData[i].state = false

View File

@ -1,66 +1,70 @@
<template>
<view class="content" :style="{paddingTop: statusHeight+25 + 'px'}">
<view class="content" :style="{paddingTop: statusHeight + 'px'}">
<statusNav navBarTitle="项目列表" :ifReturn="false"></statusNav>
<container-subgroup-two>
<view slot="content" style="margin: -100rpx -30rpx 0rpx; ">
<view class="project-list-input" :style="{top: statusHeight + 'px'}">
<input type="text" @keyup.enter="inquireProject()" v-model="inputData" class="int" value="" placeholder="请输入关键字" />
<view class="xian">
</view>
<image @click="" class="search" @click="inquireProject()" src="../../static/iocn/ss.png"
mode="aspectFill" lazy-load></image>
<view slot="content" style="margin: -100rpx -30rpx -0rpx;">
<view class="project-list-input">
<input type="text" class="int" value="" placeholder="请输入关键字" />
<view class="xian"></view>
<image class="search" src="../../static/iocn/ss.png" mode="aspectFill" lazy-load>
</image>
</view>
<view class="screen bbot mar-sx20">
<picker @change="bindPickerChange" :value="index" :range="array" :range-key="array">
<view class="li">
<view class="text">产品类型</view>
<image class="img" src="../../static/iocn/xla.png" mode="aspectFill" lazy-load></image>
</view>
</picker>
<picker mode="date" :value="date" @change="bindDateChange">
<view class="li">
<view class="text">竣工日期</view>
<image class="img" src="../../static/iocn/xla.png" mode="aspectFill" lazy-load></image>
</view>
</picker>
<view class="screen bbot mar-sx20">
<picker @change="bindPickerChange" :value="index" :range="array" :range-key="array">
<view class="li">
<view class="text">筛选</view>
<image class="imgA" src="../../static/iocn/sx.png" mode="aspectFill" lazy-load></image>
<view class="text">产品类型</view>
<image class="img" src="../../static/iocn/xla.png" mode="aspectFill" lazy-load>
</image>
</view>
</picker>
<picker mode="date" :value="date" @change="bindDateChange">
<view class="li">
<view class="text">竣工日期</view>
<image class="img" src="../../static/iocn/xla.png" mode="aspectFill" lazy-load>
</image>
</view>
</picker>
<view class="li">
<view class="text">筛选</view>
<image class="imgA" src="../../static/iocn/sx.png" mode="aspectFill" lazy-load>
</image>
</view>
<view class="project-list">
<view class="li" @click="projectDetailsFun()" 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="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.size}}</view>
<view class="installation-site scal09">安装位置{{item.installationSite}}</view>
</view>
<view class="project-list">
<view class="li" @click="projectDetailsFun()" 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="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.size}}</view>
<view class="installation-site scal09">安装位置{{item.installationSite}}
</view>
</view>
</view>
<view class="project-list-address col6 mar-s20 disjbac">
<view class="address">
<image class="img flexs" src="../../static/iocn/im.png" mode="scaleToFill" lazy-load>
</image>
<view class="text scal09" style="margin-left: -26rpx;">{{item.address}}</view>
</view>
<view class="date scal09">{{item.date}}</view>
</view>
<view v-if="item.state==1" class="icon iconBera"></view>
<view v-else class="icon iconBer">质保到期</view>
</view>
<view class="project-list-address col6 mar-s20 disjbac">
<view class="address">
<image class="img flexs" src="../../static/iocn/im.png" mode="scaleToFill" lazy-load>
</image>
<view class="text scal09" style="margin-left: -26rpx;">{{item.address}}
</view>
</view>
<view class="date scal09">{{item.date}}</view>
</view>
<view v-if="item.state==1" class="icon iconBera"></view>
<view v-else class="icon iconBer">质保到期</view>
</view>
</view>
</container-subgroup-two>
<footTabOne :current="1"></footTabOne>
</view>
</container-subgroup-two>
</container-subgroup-two>
<footTabOne :current="1"></footTabOne>
</view>
</template>
@ -193,11 +197,11 @@
}
},
onLoad() {
this.getData()
// this.getData()
},
methods: {
getData() {
this.$requst.post('/universal/api.project/project_list', {
list_rows: this.dataList.list_rows,
@ -227,7 +231,7 @@
// this.$toolAll.tools.showToast(res.msg);
if (res.code == 0) {
console.log(res.data.data)
this.dataList = res.data.data
// this.dataList = res.data.data
} else {
}
@ -259,6 +263,7 @@
}
</script>
<style scoped>
page {
background-color: #F7F7F7;
@ -269,8 +274,6 @@
height: 114rpx;
position: relative;
padding: 20rpx 16rpx;
position: fixed;
z-index: 2;
box-sizing: border-box;
background-color: #FFFFFF
}
@ -280,6 +283,7 @@
height: 100%;
background-color: #F7F7F7;
padding: 0 25rpx;
padding-right: 100rpx;
box-sizing: border-box;

View File

@ -30,7 +30,7 @@
</view>
<image class="sm" src="../../static/iocn/sm.png" mode=""></image>
</view>
<input class="devicename" placeholder="请填写设备名称和型号" v-else />
<input v-model="data.model" class="devicename" placeholder="请填写设备名称和型号" v-else />
@ -41,27 +41,27 @@
</view>
</view>
<textarea value="" 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" 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" placeholder="请填写您的姓名" placeholder-class="inputCss-input"
<input type="text" class="inputCss" v-model="data.name" placeholder="请填写您的姓名" placeholder-class="inputCss-input"
value="" />
<input type="text" class="inputCss" placeholder="请填写联系电话" placeholder-class="inputCss-input"
<input type="text" class="inputCss" v-model="data.tel" placeholder="请填写联系电话" placeholder-class="inputCss-input"
value="" />
<picker mode="date">
<input type="text" class="inputCss" placeholder="请选择上门时间" placeholder-class="inputCss-input"
<input type="text" class="inputCss" v-model="data.date" placeholder="请选择上门时间" placeholder-class="inputCss-input"
value="" />
</picker>
<button class="submit-button" type="default">提交故障申报</button>
<button class="submit-button" @click="submitButton()" type="default">提交故障申报</button>
</view>
</view>
</container-subgroup>
@ -74,6 +74,15 @@
data() {
return {
single: "2021-04-3",
data:{
model:"",
condition:"",
address:"",
name:"",
tel:"",
date:""
},
navDataState: [{
title: "有设备",
@ -119,7 +128,21 @@
]
}
},
onLoad(){
this.getType()
},
methods: {
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)
} else {
}
})
},
change(e) {
this.single = e;
console.log("-change事件:", e);
@ -132,20 +155,35 @@
}
});
},
submitButton(){
// if()
},
mapFun() {
// uni.getLocation({
// type: 'wgs84',
// geocode: true,
// success: function(res) {
// console.log(res.address);
// }
// });
uni.chooseLocation({
success: function (res) {
console.log(res)
}
});
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++) {

View File

@ -4,7 +4,15 @@
<!-- <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>
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i></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> -->
@ -38,7 +46,7 @@
<arprogress :percent="item.num"
:inactiveColor="['#c6e6f5','#f4dfc6','#c8d7f5'][index]"
:activeColor="['#00a2e9','#e87c00','#0b56ec'][index]"
:borderWidth="7.8"
:borderWidth="7.8"
:width="120"
:duration="500"
bgColor="transparent"><text :style="{color: ['#00a2e9','#e87c00','#0b56ec'][index]}">{{item.num}}%</text></arprogress>

View File

@ -1,5 +1,5 @@
<template>
<view class="pad-x160">
<view class="pad-x50">
<status-nav-slot>
<view slot="leftContent" @tap="goMessage" style="width: 70px;">
<view class="home-message-box posir disac">
@ -10,201 +10,214 @@
<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图 -->
<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 class="clips1 col3 fon24 pad-z20 bleft">2021年11月06日公司团建维修服务暂停一天</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">
<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">
<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>
<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="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="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 class="disjcac fc width25" v-for="(item,index) in projectRepairList" :key="index">
<view class="posir">
<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 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 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 class="disjcac fc width25" v-for="(item,index) in stayWorkOrderList" :key="index">
<view class="posir">
<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 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">
<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">
<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">
<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 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 class="disjcac fc width25" v-for="(item,index) in stayEventList" :key="index">
<view class="posir">
<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 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 class="disjcac fc width25" v-for="(item,index) in projectRepairList" :key="index">
<view class="posir">
<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 class="disjcac fc width25" v-for="(item,index) in stayWorkOrderList" :key="index">
<view class="posir">
<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 class="disjcac fc width25" v-for="(item,index) in stayEventList" :key="index">
<view class="posir">
<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 class="disjcac fc width25" @click="goWorkOrder(index)" v-for="(item,index) in workOrderList" :key="index">
<view class="posir">
<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">
<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 class="disjcac fc width25" v-for="(item,index) in settlementList" :key="index">
<view class="posir">
<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">
<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-fun-box">
<view class="fun-title col3 fon28 disac bold">工单数据</view>
<view class="disac mar-s30">
<view class="disjcac fc width25" @click="goWorkOrder(index)" v-for="(item,index) in workOrderList" :key="index">
<view class="posir">
<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 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>
<view class="fon24 col3 mar-s10">{{item.title}}</view>
</view>
</scroll-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">
<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 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="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 class="disjcac fc width25" v-for="(item,index) in settlementList" :key="index">
<view class="posir">
<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 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>
<!-- 其他 -->
<view class="home-fun-box">
<view class="fun-title col3 fon28 disac bold">其他</view>
<view class="disac mar-s30">
<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>
</container-subgroup-two>
<!-- 底部tab -->
<foot-tab></foot-tab>
</view>
@ -217,12 +230,14 @@
//
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';
export default {
components:{
pitera,
statusNavSlot,
lwNotice,
'foot-tab' :footTabOne
'foot-tab' :footTabOne,
containerSubgroupTwo
},
data() {
return {

View File

@ -6,17 +6,17 @@
<view class="mar-s20 mar-zy10" style="box-shadow: 0rpx 0rpx 20rpx rgba(0,0,0,.3);">
<view class="bacf" style="padding: 4rpx;border-radius: 30rpx;">
<view class="electronic-head disjcac fc">
<image src="/static/public/icon-electronic-logo.png" mode="widthFix" lazy-load style="width: 347rpx;height: 85rpx;"></image>
<view class="colf fon52 mar-sx30" style="letter-spacing: 6rpx;">IDCW-0000</view>
<image :src="userImg" mode="widthFix" lazy-load style="width: 347rpx;height: 85rpx;"></image>
<view class="colf fon52 mar-sx30" style="letter-spacing: 6rpx;">ID{{userId}}</view>
<image class="mar-s20" src="/static/deleteImg/flying-img06.png" mode="aspectFill" style="width: 258rpx;height: 258rpx;border-radius: 100%;margin-bottom: -130rpx;border: 6rpx solid #edf1ff;background-color: #edf1ff;"></image>
</view>
<view class="pad-s140 mar-s30 disjcac fc">
<view class="col3 fon68">姓名</view>
<view class="fon32 col6 mar-sx30">市场部门 | 技术支持</view>
<view class="col3 fon68">{{userName}}</view>
<view class="fon32 col6 mar-sx30">{{userContent}}</view>
<view class="fon22 col3 tcenter line-h36" style="margin: 60rpx 0 60rpx 0;">
<view>+86 123 4567 8910</view>
<view>12345678910qwer@890.com</view>
<view>WWW.12345678910.com</view>
<view>+86 {{userPhone}}</view>
<view>{{userEmail}}</view>
<view>{{website}}</view>
</view>
</view>
</view>
@ -30,7 +30,13 @@
export default {
data() {
return {
userImg:'/static/public/icon-electronic-logo.png',
userId:'CW-0000',
userName:'姓名',
userContent:'市场部门 | 技术支持',
userPhone:'123 4567 8910',
userEmail:'12345678910qwer@890.com',
website:'WWW.12345678910.com'
}
},
methods: {

View File

@ -76,7 +76,7 @@
</view>
</view>
</view>
<view class="person-btn">提交保</view>
<view class="person-btn" @tap="sumbmitData"></view>
</view>
</container-subgroup-two>
</view>
@ -98,9 +98,69 @@
e_mail:'', //
id_card_no:'', //
imgList:[],
flag:true
}
},
methods: {
//
sumbmitData(){
if(this.checkEmpty()){
if(this.flag) {
this.flag = false;
let params = {
a:this.nickname,
b:this.full_name,
c:this.genderNum,
d:this.contact_number,
e:this.e_mail,
f:this.id_card_no,
g:this.imgList[0] || '',
h:this.imgList[1] || '',
i:this.imgList[2] || '',
k:this.imgList[3] || ''
}
console.log(params,119);
// this.$requst.post('',params).then(res=>{
// if(res.code){
uni.navigateBack({delta:1})
// }
// })
} else {
this.$toolAll.tools.showToast('请勿重复提交');
}
}
},
//
checkEmpty(){
let result = false;
if(uni.getStorageSync('type_id')==4) {
//
if(!this.nickname) {
this.$toolAll.tools.showToast('请输入我的昵称');
} else if(!this.full_name) {
this.$toolAll.tools.showToast('请输入姓名');
} else if(this.$toolAll.tools.isPhone(this.contact_number)) {
this.$toolAll.tools.showToast('请正确输入联系电话');
} else if(this.$toolAll.tools.isEmail(this.e_mail)) {
this.$toolAll.tools.showToast('请正确输入电子邮箱');
} else if(this.$toolAll.tools.isIdentity(this.id_card_no)) {
this.$toolAll.tools.showToast('请正确输入身份证号码');
} else if(!this.imgList[0]) {
this.$toolAll.tools.showToast('请上传身份证正反面');
} else if(!this.imgList[1]) {
this.$toolAll.tools.showToast('请上传意外险材料');
} else if(!this.imgList[2]) {
this.$toolAll.tools.showToast('请上传合作协议');
} else if(!this.imgList[3]) {
this.$toolAll.tools.showToast('请上传技能证书');
} else {
result = true;
}
} else {
result = true;
}
return result;
},
//
chooseGender(index){
this.genderNum = index;
@ -119,12 +179,12 @@
from:tempImg[0]
}
console.log(params,104);
// uploadImg(params).then(res=>{
// console.log(res);
// })
uploadImg(params).then(res=>{
console.log(res);
})
// this.$requst.upload('file/upload/image',{file:tempImg[i]}).then(res=>{
// if(this.imgArr.length!=9){
// this.imgArr.push(this.$http + res.data.src);
// // this.imgArr.push(this.$http + res.data.src);
// }
// if(num==tempImg.length){
// this.$toolAll.tools.showToast('(*^^*)')

View File

@ -17,15 +17,16 @@
</view>
<view class="bbot disac pad-sx30 pad-zy30">
<view class="mar-y30 flexs disjbac" :style="{width: eareWidth + 'px'}"> <view><text style="color: red;">*</text></view></view>
<view class="disjbac width100" @tap="chooseRegion">
<view>湖南省株洲市芦淞区</view>
<!-- <view class="disjbac width100" @tap="chooseRegion"> -->
<view class="disjbac width100" @tap="openPicker">
<view>{{region}}</view>
<i class="icon icon-next col9" style="font-size: 30rpx;"></i>
</view>
</view>
<view class="bbot disac pad-sx30 pad-zy30">
<view class="mar-y30 flexs">详细地址 <text style="color: red;">*</text></view>
<view class="disac">
<input class="fon28" type="text" placeholder="请输入详细地址" placeholder-style="font-size:28rpx;"/>
<input class="fon28" type="text" v-model="detailed_address" placeholder="请输入详细地址" placeholder-style="font-size:28rpx;"/>
</view>
</view>
<view class="bbot disac pad-sx30 pad-zy30">
@ -43,12 +44,18 @@
</view>
</container-subgroup>
<!-- 提交保存 -->
<view class="person-btn" style="margin-top: -60rpx;">提交保存</view>
<view class="person-btn" @tap="submitData" style="margin-top: -60rpx;">提交保存</view>
<city @choseVal="choseValue" :lotusAddressData="lotusAddressData"></city>
</view>
</template>
<script>
import city from '@/components/city/city.vue';
// import city from '@/components/city/city.js';
export default {
components:{
city
},
data() {
return {
personnelStatus:['工作状态','休息状态'],
@ -57,8 +64,20 @@
hoursNum:0,
serviceRange:['30KM','80KM','1500KM','其他','其他','其他','其他'],
rangeNum:0,
lotusAddressData:{
visible:false,
provinceName:'',
cityName:'',
townName:'',
},
region:'湖南省株洲市芦淞区',
newProvice:'',
newCity:'',
newDistrict:'',
detailed_address:'',
remarkText:'',
eareWidth:''
eareWidth:'',
flag:true
}
},
onReady() {
@ -68,6 +87,40 @@
}).exec()
},
methods: {
//
submitData(){
if(this.checkEmpty()) {
if(this.flag) {
this.flag = false;
let params = {
a:this.personnelStatus[this.statusNum],
b:this.workingHours[this.hoursNum],
c:this.region,
d:this.detailed_address,
f:this.serviceRange[this.rangeNum],
g:this.remarkText
}
console.log(params,87);
// this.$requst.post().then(res=>{
// if(res.code) {
// uni.navigateBack({delta:1})
// }
// })
}
}
},
//
checkEmpty(){
let result = false;
if(!this.region) {
this.$toolAll.tools.showToast('请选择地区');
} else if(!this.detailed_address){
this.$toolAll.tools.showToast('请输入详细地址');
} else {
result = true;
}
return result;
},
//
chooseRegion(){
uni.getLocation({
@ -95,6 +148,53 @@
}
});
},
getDistrict() {
let ya = this
uni.getLocation({
success:(res)=> {
uni.request({
url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=B2ABZ-SIDKS-WD2O3-6CJ2U-CDZOT-U3FKF`,
header: {
'Content-Type':'application/json'
},
success:function(res) {
// console.log('',res)
ya.newProvice = res.data.result.address_component.province
ya.newCity = res.data.result.address_component.city
ya.newDistrict = res.data.result.address_component.district
}
})
},
})
},
//picker
openPicker() {
this.lotusAddressData.visible = true;
this.lotusAddressData.provinceName = this.newProvice;
this.lotusAddressData.cityName = this.newCity;
this.lotusAddressData.townName = this.newDistrict;
},
//
choseValue(res){
//rescode
// console.log(res);
this.lotusAddressData.visible = res.visible;//visibletruefalse
//res.isChose = 1 res.isChose = 0;
if(res.isChose){
this.lotusAddressData.provinceName = res.province;//
this.lotusAddressData.cityName = res.city;//
this.lotusAddressData.townName = res.town;//
this.region = `${res.province}${res.city}${res.town}`; //region
this.regionObj = {
province:res.province,
provinceCode:res.provinceCode,
city:res.city,
cityCode:res.cityCode,
town:res.town,
townCode:res.townCode
}
}
},
//
chooseStatus(index,num){
switch (num){

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 94 KiB