|
@@ -4,29 +4,34 @@
|
|
<view class="cbox" style="padding-bottom: 24rpx;">
|
|
<view class="cbox" style="padding-bottom: 24rpx;">
|
|
<view class="chtop flexc" @click="zhanflag=!zhanflag">
|
|
<view class="chtop flexc" @click="zhanflag=!zhanflag">
|
|
<view class="line"></view>
|
|
<view class="line"></view>
|
|
- <view>常用访客</view>
|
|
|
|
|
|
+ <view class="atit">常用访客</view>
|
|
|
|
+ <view v-if="!delflag" class="btntit" @click.stop="delflag=true">删除</view>
|
|
|
|
+ <view v-else class="btntit bttita" @click.stop="delflag=false">完成</view>
|
|
<view class="flex1"></view>
|
|
<view class="flex1"></view>
|
|
<image :src="upimg" class="upimg" :class="zhanflag?'act':''"></image>
|
|
<image :src="upimg" class="upimg" :class="zhanflag?'act':''"></image>
|
|
</view>
|
|
</view>
|
|
<view class="peobox flexc" v-if="zhanflag">
|
|
<view class="peobox flexc" v-if="zhanflag">
|
|
- <view class="plists flexcc">
|
|
|
|
- <view class="tit overtwo">爷爷奶奶</view>
|
|
|
|
- <view class="addimg flexcc">
|
|
|
|
- <image :src="addimg"></image>
|
|
|
|
|
|
+ <view class="plists flexcc" v-for="(ite,idx) in visitList" :key="idx">
|
|
|
|
+ <view class="tit overtwo">{{ite.name}}</view>
|
|
|
|
+ <view class="addimg flexcc" v-if="delflag" @click.stop="getcyvisDel(ite.frequentlyVisitorManageId,idx)">
|
|
|
|
+ <image :src="delimg" class="imgb"></image>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="addimg flexcc" v-else @click.stop="getcyvisEdit(ite)">
|
|
|
|
+ <image :src="addimg" class="imga"></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="plists flexcc">
|
|
|
|
|
|
+ <!-- <view class="plists flexcc">
|
|
<view class="tit overtwo">王一</view>
|
|
<view class="tit overtwo">王一</view>
|
|
<view class="addimg flexcc">
|
|
<view class="addimg flexcc">
|
|
<image :src="addimg"></image>
|
|
<image :src="addimg"></image>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
|
|
+ </view> -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="cbox">
|
|
<view class="cbox">
|
|
<view class="chtop flexc">
|
|
<view class="chtop flexc">
|
|
<view class="line"></view>
|
|
<view class="line"></view>
|
|
- <view>访客信息</view>
|
|
|
|
|
|
+ <view class="atit">访客信息</view>
|
|
</view>
|
|
</view>
|
|
<view class="chmain">
|
|
<view class="chmain">
|
|
<!-- 选择房屋 -->
|
|
<!-- 选择房屋 -->
|
|
@@ -39,10 +44,11 @@
|
|
<uni-forms-item label="来访人数" name="num">
|
|
<uni-forms-item label="来访人数" name="num">
|
|
<view class="flexc">
|
|
<view class="flexc">
|
|
<!-- <uni-easyinput :disabled="isdisabled" v-model="datainfo.num" type="Number" :inputBorder='false' placeholder="请输入来访人数" /> -->
|
|
<!-- <uni-easyinput :disabled="isdisabled" v-model="datainfo.num" type="Number" :inputBorder='false' placeholder="请输入来访人数" /> -->
|
|
- <view class="flex1"></view>
|
|
|
|
|
|
+ <!-- <view class="flex1"></view> -->
|
|
<view class="libox flexcw rslist">
|
|
<view class="libox flexcw rslist">
|
|
- <view class="sylist flexcc" :class="rsidx==ite.value?'act':''" v-for="(ite,idx) in rslist" :key="idx" @click="getRsFn(ite)">{{ite.label}}</view>
|
|
|
|
|
|
+ <view class="sylist flexcc" :class="datainfo.num==ite.value?'act':''" v-for="(ite,idx) in rslist" :key="idx" @click="getRsFn(ite)">{{ite.label}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <uni-easyinput :disabled="isdisabled" v-model="datainfo.num" type="Number" :inputBorder='false' placeholder="输入" />
|
|
<view class="rimg"><image :src="rimg"></image></view>
|
|
<view class="rimg"><image :src="rimg"></image></view>
|
|
</view>
|
|
</view>
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
@@ -89,7 +95,7 @@
|
|
<view class="cbox">
|
|
<view class="cbox">
|
|
<view class="chtop flexc">
|
|
<view class="chtop flexc">
|
|
<view class="line"></view>
|
|
<view class="line"></view>
|
|
- <view>驾车信息</view>
|
|
|
|
|
|
+ <view class="atit">驾车信息</view>
|
|
</view>
|
|
</view>
|
|
<view class="chmain">
|
|
<view class="chmain">
|
|
<uni-forms-item label="是否驾车" name="isCar">
|
|
<uni-forms-item label="是否驾车" name="isCar">
|
|
@@ -150,7 +156,7 @@
|
|
import config from '@/config'
|
|
import config from '@/config'
|
|
import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
|
|
import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
|
|
import {uploadIdentify,uploadmore,geocodeAddress} from '@/utils/common.js'
|
|
import {uploadIdentify,uploadmore,geocodeAddress} from '@/utils/common.js'
|
|
- import {reservAdd,reservDet,reservPut} from "@/api/work/people.js"
|
|
|
|
|
|
+ import {reservAdd,reservDet,reservPut,cyManageList,cyManageDet,cyManageAdd,cyManagePut,cyManageDel} from "@/api/work/people.js"
|
|
import {getDictionaryFn} from "@/api/system/user.js"
|
|
import {getDictionaryFn} from "@/api/system/user.js"
|
|
import {houseInfolistNoPage} from "@/api/work/work.js"
|
|
import {houseInfolistNoPage} from "@/api/work/work.js"
|
|
import wSelect from "@/work/components/w-select/w-select.vue"
|
|
import wSelect from "@/work/components/w-select/w-select.vue"
|
|
@@ -173,14 +179,16 @@
|
|
aphoto: require('@/work/static/visitor/aphoto.png'),
|
|
aphoto: require('@/work/static/visitor/aphoto.png'),
|
|
upimg: require('@/work/static/manage/up.png'),
|
|
upimg: require('@/work/static/manage/up.png'),
|
|
addimg: require('@/work/static/manage/add.png'),
|
|
addimg: require('@/work/static/manage/add.png'),
|
|
|
|
+ delimg: require('@/mine/static/house/del.png'),
|
|
check: require('@/mine/static/check.png'),
|
|
check: require('@/mine/static/check.png'),
|
|
ncheck: require('@/mine/static/ncheck.png'),
|
|
ncheck: require('@/mine/static/ncheck.png'),
|
|
baseUrl: config.baseUrl,
|
|
baseUrl: config.baseUrl,
|
|
checkflag:true,
|
|
checkflag:true,
|
|
|
|
+ delflag:false,
|
|
datainfo: {
|
|
datainfo: {
|
|
// "visitorManageId":"",//来访主键
|
|
// "visitorManageId":"",//来访主键
|
|
"houseId":"",//门户id
|
|
"houseId":"",//门户id
|
|
- "houseAddress":"",//详细门牌号
|
|
|
|
|
|
+ "houseAddress":"",//门牌号
|
|
"name":"",//访客姓名
|
|
"name":"",//访客姓名
|
|
"num":"",//来访人数
|
|
"num":"",//来访人数
|
|
"reason":"",//来访事由
|
|
"reason":"",//来访事由
|
|
@@ -215,7 +223,7 @@
|
|
syidx:'',
|
|
syidx:'',
|
|
rsidx:'',
|
|
rsidx:'',
|
|
sylist:[],
|
|
sylist:[],
|
|
- rslist:[{label:'1',value:'1'},{label:'2',value:'2'},{label:'3',value:'3'},{label:'4',value:'4'},{label:'5',value:'5'},{label:'6',value:'6'},{label:'7',value:'7'},{label:'8',value:'8'},{label:'9',value:'9'},{label:'10及以上',value:'10'}],
|
|
|
|
|
|
+ rslist:[{label:'1',value:'1'},{label:'2',value:'2'},{label:'3',value:'3'},{label:'4',value:'4'},{label:'5',value:'5'},{label:'6',value:'6'},{label:'7',value:'7'}],
|
|
|
|
|
|
carIndex: -1,
|
|
carIndex: -1,
|
|
carInput: [
|
|
carInput: [
|
|
@@ -231,6 +239,7 @@
|
|
keyType: 0,
|
|
keyType: 0,
|
|
isPower: false, // 新能源
|
|
isPower: false, // 新能源
|
|
addnew:require('@/mine/static/house/add.png'),
|
|
addnew:require('@/mine/static/house/add.png'),
|
|
|
|
+ visitList:[],//常用访客
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad: function(e) {
|
|
onLoad: function(e) {
|
|
@@ -241,6 +250,7 @@
|
|
this.getDetail()
|
|
this.getDetail()
|
|
}
|
|
}
|
|
this.init()
|
|
this.init()
|
|
|
|
+ this.getcyManageList()
|
|
if(this.ptype=='add'){
|
|
if(this.ptype=='add'){
|
|
this.time()
|
|
this.time()
|
|
}
|
|
}
|
|
@@ -253,6 +263,9 @@
|
|
},
|
|
},
|
|
changeLog(){
|
|
changeLog(){
|
|
|
|
|
|
|
|
+ },
|
|
|
|
+ kaType(data, list) {
|
|
|
|
+ return selectDictValue(list, data);
|
|
},
|
|
},
|
|
async getLocation(address) {
|
|
async getLocation(address) {
|
|
var that=this;
|
|
var that=this;
|
|
@@ -281,7 +294,6 @@
|
|
var timeStr = (h < 10 ? ('0' + h) : h) + ':' + (min < 10 ? ('0' + min) : min) + ':' + (s < 10 ? (
|
|
var timeStr = (h < 10 ? ('0' + h) : h) + ':' + (min < 10 ? ('0' + min) : min) + ':' + (s < 10 ? (
|
|
'0' + s) : s);
|
|
'0' + s) : s);
|
|
var kaTime = yearStr + ' ' + timeStr;
|
|
var kaTime = yearStr + ' ' + timeStr;
|
|
- console.log(kaTime)
|
|
|
|
this.datainfo.visitorTime=kaTime
|
|
this.datainfo.visitorTime=kaTime
|
|
},
|
|
},
|
|
getSyFn(e){
|
|
getSyFn(e){
|
|
@@ -292,6 +304,18 @@
|
|
this.rsidx=e.value;
|
|
this.rsidx=e.value;
|
|
this.datainfo.num=e.label;
|
|
this.datainfo.num=e.label;
|
|
},
|
|
},
|
|
|
|
+ getcyManageList(){
|
|
|
|
+ var params={
|
|
|
|
+ userId:this.userId,
|
|
|
|
+ pageSize: 100,
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ }
|
|
|
|
+ cyManageList(params).then(res=>{
|
|
|
|
+ if(res.code==200){
|
|
|
|
+ this.visitList=res.rows
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
init(){
|
|
init(){
|
|
// 自己的房屋
|
|
// 自己的房屋
|
|
var params={
|
|
var params={
|
|
@@ -345,6 +369,43 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 常用访客
|
|
|
|
+ getVisAdd(){
|
|
|
|
+ var params=JSON.parse(JSON.stringify(this.datainfo))
|
|
|
|
+ if(params.frequentlyVisitorManageId){
|
|
|
|
+ cyManagePut(params).then(res=>{
|
|
|
|
+ if(res.code==200){
|
|
|
|
+ this.$toast('操作成功')
|
|
|
|
+ // this.getcyManageList()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ cyManageAdd(params).then(res=>{
|
|
|
|
+ if(res.code==200){
|
|
|
|
+ this.$toast('添加成功')
|
|
|
|
+ this.getcyManageList()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ getcyvisEdit(ite){
|
|
|
|
+ this.datainfo=JSON.parse(JSON.stringify(ite))
|
|
|
|
+ this.syidx=ite.reason
|
|
|
|
+ },
|
|
|
|
+ getcyvisDel(id,idx){
|
|
|
|
+ cyManageDel(id).then(res=>{
|
|
|
|
+ if(res.code==200){
|
|
|
|
+ this.visitList.splice(idx,1)
|
|
|
|
+ if(this.visitList.length<1){
|
|
|
|
+ this.delflag=false;
|
|
|
|
+ }
|
|
|
|
+ var visid=this.datainfo.frequentlyVisitorManageId
|
|
|
|
+ if(id==visid){
|
|
|
|
+ this.datainfo.frequentlyVisitorManageId=''
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
getSubmit(){
|
|
getSubmit(){
|
|
var num=this.toBind()
|
|
var num=this.toBind()
|
|
this.$refs.form.validate().then(res => {
|
|
this.$refs.form.validate().then(res => {
|
|
@@ -635,7 +696,7 @@
|
|
.cbox{background: #FFFFFF;border-radius: 20rpx;flex: 1;margin-bottom: 24rpx;
|
|
.cbox{background: #FFFFFF;border-radius: 20rpx;flex: 1;margin-bottom: 24rpx;
|
|
.chtop{padding-top: 32rpx;margin-bottom: 8rpx;
|
|
.chtop{padding-top: 32rpx;margin-bottom: 8rpx;
|
|
// image{width: 14rpx;height: 48rpx;margin-right: 20rpx;}
|
|
// image{width: 14rpx;height: 48rpx;margin-right: 20rpx;}
|
|
- view{font-weight: bold;font-size: 32rpx;color: #272727;}
|
|
|
|
|
|
+ .atit{font-weight: bold;font-size: 32rpx;color: #272727;}
|
|
.upimg{width: 22rpx;height: 14rpx;margin-right: 36rpx;transform: rotate(180deg);transition: all 0.3s;
|
|
.upimg{width: 22rpx;height: 14rpx;margin-right: 36rpx;transform: rotate(180deg);transition: all 0.3s;
|
|
&.act{transform: rotate(0deg);}
|
|
&.act{transform: rotate(0deg);}
|
|
}
|
|
}
|
|
@@ -660,14 +721,15 @@
|
|
border-radius: 50%;width: 94rpx;height: 94rpx;margin: 0 20rpx 20rpx;padding: 4rpx;box-sizing: border-box;
|
|
border-radius: 50%;width: 94rpx;height: 94rpx;margin: 0 20rpx 20rpx;padding: 4rpx;box-sizing: border-box;
|
|
.tit{font-weight: 500;font-size: 22rpx;color: #0256FD;}
|
|
.tit{font-weight: 500;font-size: 22rpx;color: #0256FD;}
|
|
.addimg{width: 36rpx;height: 36rpx;background: #FFFFFF;box-shadow: 0px 3px 5px 0px rgba(147,147,147,0.35);border-radius: 50%;position: absolute;bottom: -4rpx;right: 4rpx;
|
|
.addimg{width: 36rpx;height: 36rpx;background: #FFFFFF;box-shadow: 0px 3px 5px 0px rgba(147,147,147,0.35);border-radius: 50%;position: absolute;bottom: -4rpx;right: 4rpx;
|
|
- image{width: 18rpx;height: 18rpx;}
|
|
|
|
|
|
+ .imga{width: 18rpx;height: 18rpx;}
|
|
|
|
+ .imgb{width: 26rpx;height: 26rpx;}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.libox{
|
|
.libox{
|
|
&.rslist{
|
|
&.rslist{
|
|
- .sylist{min-width:40rpx;height: 40rpx;margin-left: 14rpx;margin-top: 14rpx;}
|
|
|
|
|
|
+ .sylist{min-width:40rpx;height: 40rpx;margin-left: 14rpx;}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.sylist{background: #F0F0F0;border-radius: 26rpx;border:2rpx solid #DADADA;margin-left: 26rpx;font-weight: 500;min-width:112rpx;height: 54rpx;box-sizing: border-box;
|
|
.sylist{background: #F0F0F0;border-radius: 26rpx;border:2rpx solid #DADADA;margin-left: 26rpx;font-weight: 500;min-width:112rpx;height: 54rpx;box-sizing: border-box;
|
|
@@ -677,4 +739,7 @@ color: #666666;
|
|
}
|
|
}
|
|
.line{width: 14rpx;height: 48rpx;background: #0256FD;border-radius:0 12rpx 12rpx 0;margin-right: 18rpx;}
|
|
.line{width: 14rpx;height: 48rpx;background: #0256FD;border-radius:0 12rpx 12rpx 0;margin-right: 18rpx;}
|
|
.tips{font-weight: 500;font-size: 22rpx;color: #0256FD;padding: 20rpx 0;}
|
|
.tips{font-weight: 500;font-size: 22rpx;color: #0256FD;padding: 20rpx 0;}
|
|
|
|
+.btntit{font-size: 26rpx;color: #FF6969;margin-left: 20rpx;
|
|
|
|
+ &.bttita{color: #0256fd;}
|
|
|
|
+}
|
|
</style>
|
|
</style>
|