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-id属性必须用id属性 -->
<canvas <canvas v-if="canvasId"
class="canvas-bg" class="canvas-bg"
:canvas-id="canvasId" :canvas-id="canvasId"
:id="canvasId" :id="canvasId"
@ -17,7 +17,7 @@
height: widthPx + 'px' height: widthPx + 'px'
}" }"
></canvas> ></canvas>
<canvas <canvas v-if="elId"
class="canvas" class="canvas"
:canvas-id="elId" :canvas-id="elId"
: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 { .loopItemBaseShow {
position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; // height: 100%;
overflow: hidden; overflow: hidden;
font-size: 28rpx; font-size: 28rpx;
text-align: left; text-align: left;
position: absolute;
white-space: nowrap; white-space: nowrap;
align-items: center; align-items: center;
text-overflow: ellipsis; text-overflow: ellipsis;

View File

@ -69,6 +69,16 @@ const tools = {
// return false // return false
return !reg_tel.test(phone); 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){ hideMPhone(phone){
return `${phone.substr(0, 3)}****${phone.substr(7)}` return `${phone.substr(0, 3)}****${phone.substr(7)}`

View File

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

View File

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

View File

@ -30,7 +30,7 @@
</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 class="devicename" placeholder="请填写设备名称和型号" v-else /> <input v-model="data.model" class="devicename" placeholder="请填写设备名称和型号" v-else />
@ -41,27 +41,27 @@
</view> </view>
</view> </view>
<textarea value="" 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" 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" placeholder="请填写您的姓名" placeholder-class="inputCss-input" <input type="text" class="inputCss" v-model="data.name" placeholder="请填写您的姓名" placeholder-class="inputCss-input"
value="" /> 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="" /> value="" />
<picker mode="date"> <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="" /> value="" />
</picker> </picker>
<button class="submit-button" type="default">提交故障申报</button> <button class="submit-button" @click="submitButton()" type="default">提交故障申报</button>
</view> </view>
</view> </view>
</container-subgroup> </container-subgroup>
@ -75,6 +75,15 @@
return { return {
single: "2021-04-3", single: "2021-04-3",
data:{
model:"",
condition:"",
address:"",
name:"",
tel:"",
date:""
},
navDataState: [{ navDataState: [{
title: "有设备", title: "有设备",
state: false state: false
@ -119,7 +128,21 @@
] ]
} }
}, },
onLoad(){
this.getType()
},
methods: { 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) { change(e) {
this.single = e; this.single = e;
console.log("-change事件:", e); console.log("-change事件:", e);
@ -132,18 +155,33 @@
} }
}); });
}, },
submitButton(){
// if()
},
mapFun() { mapFun() {
// uni.getLocation({ uni.getLocation({
// type: 'wgs84', type: 'gcj02', //uni.openLocation
// geocode: true, success: function (res) {
// success: function(res) { const latitude = res.latitude;
// console.log(res.address); const longitude = res.longitude;
// } console.log(latitude,longitude,78);
// });
uni.chooseLocation({ uni.chooseLocation({
success: function (res) { success: function (res) {
console.log(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');
// }
// });
} }
}); });
}, },

View File

@ -4,7 +4,15 @@
<!-- <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"><view :style="{color:newColor}">个人中心</view></view>
<!-- #ifdef APP-PLUS -->
<view slot="rightContent" @tap="goSetUp"><i class="icon icon-sandian fon40" :style="{color:newColor}"></i></view> <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> </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'}"> <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> --> <!-- <image src="/static/public/icon-my-logo.png" class="width100" mode="widthFix" lazy-load></image> -->

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="pad-x160"> <view class="pad-x50">
<status-nav-slot> <status-nav-slot>
<view slot="leftContent" @tap="goMessage" style="width: 70px;"> <view slot="leftContent" @tap="goMessage" style="width: 70px;">
<view class="home-message-box posir disac"> <view class="home-message-box posir disac">
@ -10,13 +10,26 @@
<view slot="centerContent" class="disjcac"> <view slot="centerContent" class="disjcac">
<image style="width: 156rpx;height: 38rpx;" src="/static/public/icom-home-logo.png" mode="widthFix"></image> <image style="width: 156rpx;height: 38rpx;" src="/static/public/icom-home-logo.png" mode="widthFix"></image>
</view> </view>
<!-- #ifdef APP-PLUS -->
<view slot="rightContent" class="disac" @tap="callEv"> <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> <image class="mar-y10" style="width: 26rpx;height: 26rpx;" src="/static/public/icon-home-phone.png" mode=""></image>
<view class="fon26 col3">拨打电话</view> <view class="fon26 col3">拨打电话</view>
</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> </status-nav-slot>
<!-- <view :style="{paddingTop: statusHeight +'px'}"> --> <!-- <view :style="{paddingTop: statusHeight +'px'}"> -->
<!-- banner图 --> <!-- banner图 -->
<container-subgroup-two>
<view slot="content" style="margin: 0 -30rpx;">
<image class="width100" src="/static/public/icon-home-banner.png" mode="widthFix"></image> <image class="width100" src="/static/public/icon-home-banner.png" mode="widthFix"></image>
<view class="pad-zy20"> <view class="pad-zy20">
<!-- 项目总数实时故障公告 --> <!-- 项目总数实时故障公告 -->
@ -37,7 +50,6 @@
<view class="fon24 color6 mar-y20 width100 bleft pad-z20"> <view class="fon24 color6 mar-y20 width100 bleft pad-z20">
<lwNotice @dangGao="goNoticeDetail" :list="noticeList" :backgroundColor="'#FFFFFF'"></lwNotice> <lwNotice @dangGao="goNoticeDetail" :list="noticeList" :backgroundColor="'#FFFFFF'"></lwNotice>
</view> </view>
<!-- <view class="clips1 col3 fon24 pad-z20 bleft">2021年11月06日公司团建维修服务暂停一天</view> -->
</view> </view>
</view> </view>
<!-- 客户可见 --> <!-- 客户可见 -->
@ -204,7 +216,8 @@
<image class="flexs mar-z20" :src="item.imgsrc" style="width: 280rpx;height: 160rpx;" mode="aspectFill" lazy-load></image> <image class="flexs mar-z20" :src="item.imgsrc" style="width: 280rpx;height: 160rpx;" mode="aspectFill" lazy-load></image>
</view> </view>
</view> </view>
</view>
</container-subgroup-two>
<!-- 底部tab --> <!-- 底部tab -->
<foot-tab></foot-tab> <foot-tab></foot-tab>
</view> </view>
@ -217,12 +230,14 @@
// //
import lwNotice from '@/components/lw-notice/lw-notice.vue'; import lwNotice from '@/components/lw-notice/lw-notice.vue';
import footTabOne from '@/components/foot-tabs/foot-tab-one.vue'; import footTabOne from '@/components/foot-tabs/foot-tab-one.vue';
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
export default { export default {
components:{ components:{
pitera, pitera,
statusNavSlot, statusNavSlot,
lwNotice, lwNotice,
'foot-tab' :footTabOne 'foot-tab' :footTabOne,
containerSubgroupTwo
}, },
data() { data() {
return { 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="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="bacf" style="padding: 4rpx;border-radius: 30rpx;">
<view class="electronic-head disjcac fc"> <view class="electronic-head disjcac fc">
<image src="/static/public/icon-electronic-logo.png" mode="widthFix" lazy-load style="width: 347rpx;height: 85rpx;"></image> <image :src="userImg" mode="widthFix" lazy-load style="width: 347rpx;height: 85rpx;"></image>
<view class="colf fon52 mar-sx30" style="letter-spacing: 6rpx;">IDCW-0000</view> <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> <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>
<view class="pad-s140 mar-s30 disjcac fc"> <view class="pad-s140 mar-s30 disjcac fc">
<view class="col3 fon68">姓名</view> <view class="col3 fon68">{{userName}}</view>
<view class="fon32 col6 mar-sx30">市场部门 | 技术支持</view> <view class="fon32 col6 mar-sx30">{{userContent}}</view>
<view class="fon22 col3 tcenter line-h36" style="margin: 60rpx 0 60rpx 0;"> <view class="fon22 col3 tcenter line-h36" style="margin: 60rpx 0 60rpx 0;">
<view>+86 123 4567 8910</view> <view>+86 {{userPhone}}</view>
<view>12345678910qwer@890.com</view> <view>{{userEmail}}</view>
<view>WWW.12345678910.com</view> <view>{{website}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -30,7 +30,13 @@
export default { export default {
data() { data() {
return { 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: { methods: {

View File

@ -76,7 +76,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="person-btn">提交保</view> <view class="person-btn" @tap="sumbmitData"></view>
</view> </view>
</container-subgroup-two> </container-subgroup-two>
</view> </view>
@ -98,9 +98,69 @@
e_mail:'', // e_mail:'', //
id_card_no:'', // id_card_no:'', //
imgList:[], imgList:[],
flag:true
} }
}, },
methods: { 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){ chooseGender(index){
this.genderNum = index; this.genderNum = index;
@ -119,12 +179,12 @@
from:tempImg[0] from:tempImg[0]
} }
console.log(params,104); console.log(params,104);
// uploadImg(params).then(res=>{ uploadImg(params).then(res=>{
// console.log(res); console.log(res);
// }) })
// this.$requst.upload('file/upload/image',{file:tempImg[i]}).then(res=>{ // this.$requst.upload('file/upload/image',{file:tempImg[i]}).then(res=>{
// if(this.imgArr.length!=9){ // 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){ // if(num==tempImg.length){
// this.$toolAll.tools.showToast('(*^^*)') // this.$toolAll.tools.showToast('(*^^*)')

View File

@ -17,15 +17,16 @@
</view> </view>
<view class="bbot disac pad-sx30 pad-zy30"> <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="mar-y30 flexs disjbac" :style="{width: eareWidth + 'px'}"> <view><text style="color: red;">*</text></view></view>
<view class="disjbac width100" @tap="chooseRegion"> <!-- <view class="disjbac width100" @tap="chooseRegion"> -->
<view>湖南省株洲市芦淞区</view> <view class="disjbac width100" @tap="openPicker">
<view>{{region}}</view>
<i class="icon icon-next col9" style="font-size: 30rpx;"></i> <i class="icon icon-next col9" style="font-size: 30rpx;"></i>
</view> </view>
</view> </view>
<view class="bbot disac pad-sx30 pad-zy30"> <view class="bbot disac pad-sx30 pad-zy30">
<view class="mar-y30 flexs">详细地址 <text style="color: red;">*</text></view> <view class="mar-y30 flexs">详细地址 <text style="color: red;">*</text></view>
<view class="disac"> <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> </view>
<view class="bbot disac pad-sx30 pad-zy30"> <view class="bbot disac pad-sx30 pad-zy30">
@ -43,12 +44,18 @@
</view> </view>
</container-subgroup> </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> </view>
</template> </template>
<script> <script>
import city from '@/components/city/city.vue';
// import city from '@/components/city/city.js';
export default { export default {
components:{
city
},
data() { data() {
return { return {
personnelStatus:['工作状态','休息状态'], personnelStatus:['工作状态','休息状态'],
@ -57,8 +64,20 @@
hoursNum:0, hoursNum:0,
serviceRange:['30KM','80KM','1500KM','其他','其他','其他','其他'], serviceRange:['30KM','80KM','1500KM','其他','其他','其他','其他'],
rangeNum:0, rangeNum:0,
lotusAddressData:{
visible:false,
provinceName:'',
cityName:'',
townName:'',
},
region:'湖南省株洲市芦淞区',
newProvice:'',
newCity:'',
newDistrict:'',
detailed_address:'',
remarkText:'', remarkText:'',
eareWidth:'' eareWidth:'',
flag:true
} }
}, },
onReady() { onReady() {
@ -68,6 +87,40 @@
}).exec() }).exec()
}, },
methods: { 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(){ chooseRegion(){
uni.getLocation({ 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){ chooseStatus(index,num){
switch (num){ switch (num){

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 94 KiB