From c65169cebf56657dbec38088c870f0084ca08321 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Tue, 26 Dec 2023 18:26:40 +0800
Subject: [PATCH] 优化修复问题
---
pages/user/center.vue | 4
subPackage/workbench/views/patrol.vue | 93 +++++++-
pages/home/index.vue | 43 ++--
subPackage/bs/views/zhsb.vue | 16 +
subPackage/workbench/views/examine.vue | 86 +++++---
components/dateRangeModal/modal.vue | 122 ++++++++++++
subPackage/workbench/views/cscj.vue | 76 ------
common/setting.js | 9
subPackage/house/roomControl/index.vue | 13
subPackage/task/index.vue | 30 +-
subPackage/workbench/views/cshw.vue | 90 ++++++++-
11 files changed, 396 insertions(+), 186 deletions(-)
diff --git a/common/setting.js b/common/setting.js
index 783deec..38de827 100644
--- a/common/setting.js
+++ b/common/setting.js
@@ -9,14 +9,9 @@
// 版本号
version: '2.0.0',
// 开发环境接口Url
- // devUrl: 'https://sk.hubeishuiyi.cn',
- // devUrl: 'http://192.168.1.156:9528',
- // devUrl:'http://192.168.1.50:9528',
- // devUrl: 'http://192.168.0.106:9528',
- // devUrl:'https://srgdjczzxtpt.com:2080/api',
// devUrl:'http://z4042833u6.wicp.vip',
- // devUrl: 'http://192.168.0.103:9528',
- devUrl: 'https://srgdjczzxtpt.com:2080/api',
+ devUrl: 'http://192.168.0.108:9528',
+ // devUrl: 'https://srgdjczzxtpt.com:2080/api',
minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
// minioBaseUrl:"http://192.168.0.103:9528/",
// minioBaseUrl: 'https://srgdjczzxtpt.com:2080/',
diff --git a/components/dateRangeModal/modal.vue b/components/dateRangeModal/modal.vue
new file mode 100644
index 0000000..0e6393d
--- /dev/null
+++ b/components/dateRangeModal/modal.vue
@@ -0,0 +1,122 @@
+<template>
+
+ <view class="">
+ <u-popup :show="isShowPopup" :closeable="true" @close="isShowPopup = false">
+ <view class="popup">
+ <view class="popup-title f-30 fw">
+ 时间筛选
+ </view>
+ <view class="popup-content flex j-c-s-a a-i-c f-28">
+ <view class="select-box" @click="startTimePicker = true">
+ <text v-if="!startTime" class="c-99">开始时间</text>
+ <text v-if="startTime">{{startTime}}</text>
+ </view>
+ <view class="c-99">
+ ——
+ </view>
+ <view class="select-box" @click="endTimePicker = true">
+ <text v-if="!endTime" class="c-99">结束时间</text>
+ <text v-if="endTime">{{endTime}}</text>
+ </view>
+ </view>
+ <view class="popup-btn flex j-c-s-b a-i-c">
+ <button class="popup-btn-item f-30 c-main" @click="restDate">重置</button>
+ <button class="popup-btn-item bgc-main c-ff f-30" @click="comfirmFilterDate">确定</button>
+ </view>
+ </view>
+ </u-popup>
+ <u-datetime-picker :show="startTimePicker" v-model="currentTime" mode="date"
+ @confirm="comfirmStartDate" @cancel="startTimePicker = false"></u-datetime-picker>
+ <u-datetime-picker :show="endTimePicker" v-model="currentTime" mode="date"
+ @confirm="comfirmEndDate" @cancel="endTimePicker = false"></u-datetime-picker>
+ </view>
+
+</template>
+
+<script>
+ export default {
+ name:"dateRangeModal",
+ data(){
+ return {
+ isShowPopup: false,
+ startTime:"",
+ endTime:"",
+ startTimePicker:false,
+ endTimePicker:false,
+ currentTime: Number(new Date()),
+ }
+ },
+ methods:{
+ open(){
+ this.isShowPopup = true;
+ },
+ close(){
+ this.isShowPopup = false;
+ },
+ comfirmStartDate(e){
+ this.startTime = this.$u.timeFormat(e.value, 'yyyy-mm-dd');
+ this.startTimePicker = false;
+ },
+ comfirmEndDate(e){
+ this.endTime = this.$u.timeFormat(e.value, 'yyyy-mm-dd');
+ this.endTimePicker = false;
+ },
+ comfirmFilterDate(){
+ if(!this.startTime) return;
+ if(!this.endTime) return;
+ this.selectDate = [this.startTime,this.endTime]
+ this.$emit("comfirm",[this.startTime,this.endTime])
+ this.isShowPopup = false;
+ },
+ restDate() {
+ this.startTime = "";
+ this.endTime ="";
+ this.$emit("rest");
+ },
+
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .popup-title {
+ padding: 30rpx;
+ text-align: center;
+ }
+
+ .popup-content {
+ padding: 30rpx 20rpx 20rpx;
+
+ .select-box {
+ width: 280rpx;
+ height: 78rpx;
+ border-radius: 35rpx;
+ background-color: #F5F5F5;
+ text-align: center;
+ line-height: 78rpx;
+ }
+ }
+
+ .popup-btn {
+ padding: 30rpx;
+
+ .popup-btn-item {
+ width: 310rpx;
+ height: 78rpx;
+ line-height: 78rpx;
+ border-radius: 10rpx;
+ border: none;
+ margin: 0;
+ }
+
+ .popup-btn-item:first-child {
+ border: 1px solid currentColor;
+ background-color: rgb(236, 244, 255);
+ }
+
+ .popup-btn-item::after {
+ border: none;
+ }
+ }
+
+</style>
\ No newline at end of file
diff --git a/pages/home/index.vue b/pages/home/index.vue
index a928953..26aa3c2 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -549,13 +549,13 @@
if (arr.length) {
let index = this.getLiveMenuItem(arr, 1)
let index2 = this.getLiveMenuItem(arr, 2)
- let index3 = this.getLiveMenuItem(arr, 3)
+ // let index3 = this.getLiveMenuItem(arr, 3)
if (this.curSelectSite.addressType == 1) {
if (index != -1) {
arr.splice(index, 1)
index = this.getLiveMenuItem(arr, 1)
index2 = this.getLiveMenuItem(arr, 2)
- index3 = this.getLiveMenuItem(arr, 3)
+ // index3 = this.getLiveMenuItem(arr, 3)
}
if (index2 == -1 && this.roleType == 2) {
arr.push({
@@ -565,19 +565,18 @@
})
index = this.getLiveMenuItem(arr, 1)
index2 = this.getLiveMenuItem(arr, 2)
- index3 = this.getLiveMenuItem(arr, 3)
+ // index3 = this.getLiveMenuItem(arr, 3)
}
- console.log("index3===>",index3)
- if(index3 == -1){
- arr.push({
- name: "取保候审",
- path: "/subPackage/label/bail",
- pictureImg: "/static/icon/nav-11.png"
- })
- index = this.getLiveMenuItem(arr, 1)
- index2 = this.getLiveMenuItem(arr, 2)
- index3 = this.getLiveMenuItem(arr, 3)
- }
+ // if(index3 == -1){
+ // arr.push({
+ // name: "取保候审",
+ // path: "/subPackage/label/bail",
+ // pictureImg: "/static/icon/nav-11.png"
+ // })
+ // index = this.getLiveMenuItem(arr, 1)
+ // index2 = this.getLiveMenuItem(arr, 2)
+ // index3 = this.getLiveMenuItem(arr, 3)
+ // }
} else {
if (index == -1) {
@@ -588,20 +587,20 @@
})
index = this.getLiveMenuItem(arr, 1)
index2 = this.getLiveMenuItem(arr, 2)
- index3 = this.getLiveMenuItem(arr, 3)
+ // index3 = this.getLiveMenuItem(arr, 3)
}
if (index2 != -1) {
arr.splice(index2, 1)
index = this.getLiveMenuItem(arr, 1)
index2 = this.getLiveMenuItem(arr, 2)
- index3 = this.getLiveMenuItem(arr, 3)
+ // index3 = this.getLiveMenuItem(arr, 3)
}
- if(index3 != -1){
- arr.splice(index3, 1)
- index = this.getLiveMenuItem(arr, 1)
- index2 = this.getLiveMenuItem(arr, 2)
- index3 = this.getLiveMenuItem(arr, 3)
- }
+ // if(index3 != -1){
+ // arr.splice(index3, 1)
+ // index = this.getLiveMenuItem(arr, 1)
+ // index2 = this.getLiveMenuItem(arr, 2)
+ // index3 = this.getLiveMenuItem(arr, 3)
+ // }
}
}
return arr;
diff --git a/pages/user/center.vue b/pages/user/center.vue
index 7315b6a..dfe7fe7 100644
--- a/pages/user/center.vue
+++ b/pages/user/center.vue
@@ -25,7 +25,7 @@
<u-icon name="account" color="#fff" size="28"></u-icon>
<view class="name">我的家人</view>
</navigator>
- <navigator url="/subPackage/house/roomDetails/index" hover-class="none" class="nav-item">
+ <navigator url="/subPackage/house/roomControl/index" hover-class="none" class="nav-item">
<!-- <image src="/static/images/user/n2.png" class="icon" mode=""></image> -->
<u-icon name="home" color="#fff" size="28"></u-icon>
<view class="name">我的房屋</view>
@@ -35,7 +35,7 @@
<u-icon name="map" color="#fff" size="28"></u-icon>
<view class="name">我的小区</view>
</navigator>
- <navigator url="/subPackage/bs/views/zhsb" hover-class="none" class="nav-item">
+ <navigator url="/subPackage/bs/views/zhsb?from=2" hover-class="none" class="nav-item">
<!-- <image src="/static/images/user/n4.png" class="icon" mode=""></image> -->
<u-icon name="file-text" color="#fff" size="28"></u-icon>
<view class="name">出租信息</view>
diff --git a/subPackage/bs/views/zhsb.vue b/subPackage/bs/views/zhsb.vue
index 0fcc79d..7c946f1 100644
--- a/subPackage/bs/views/zhsb.vue
+++ b/subPackage/bs/views/zhsb.vue
@@ -53,14 +53,20 @@
room: "",
num: 0,
//出租列表
- rentList: []
+ rentList: [],
+ from:""
}
},
onLoad(option) {
- const {
- houseCode
- } = option
- this.houseCode = houseCode
+ // const {
+ // houseCode
+ // } = option
+ // this.houseCode = houseCode
+ if(option.from){
+ uni.setNavigationBarTitle({
+ title:"租赁信息"
+ })
+ }
},
onShow() {
this.getHouseRent()
diff --git a/subPackage/house/roomControl/index.vue b/subPackage/house/roomControl/index.vue
index fa54b3c..7241879 100644
--- a/subPackage/house/roomControl/index.vue
+++ b/subPackage/house/roomControl/index.vue
@@ -190,16 +190,19 @@
},
onLoad(option) {
- const {
- code
- } = option
- this.houseCode = code
+ if(option.code){
+ this.houseCode = option.code;
+ }else {
+ this.houseCode = uni.getStorageSync("siteInfo").houseCode;
+ uni.setNavigationBarTitle({
+ title:"我的房屋"
+ })
+ }
let roleName = uni.getStorageSync("activeRole").roleName;
if(roleName == "网格员"){
this.roleType = 2;
}
-
},
onShow() {
// this.getLabelList()
diff --git a/subPackage/task/index.vue b/subPackage/task/index.vue
index 2ceeead..a5209f8 100644
--- a/subPackage/task/index.vue
+++ b/subPackage/task/index.vue
@@ -129,9 +129,9 @@
<view class="nav-item flex j-c-s-b a-i-c" @click="navTo(i.path)" v-for="i in securityList">
<text class="f-28">{{i.name}}</text>
<view class="flex">
- <block v-if="false">
+ <block v-if="bailCount > 0">
<text class="f-28 c-99">待处理</text>
- <view class="dot bgc-main">{{countInfo.comprehensiveTask}}</view>
+ <view class="dot bgc-main">{{bailCount}}</view>
</block>
<u-icon name="arrow-right" color="#999"></u-icon>
</view>
@@ -167,7 +167,8 @@
repairsCount: 0,
countInfo: {},
securityList:[],
- comprehensive:[]
+ comprehensive:[],
+ bailCount:0
}
},
@@ -176,7 +177,7 @@
},
onShow() {
this.getCount();
- this.getRepairsCount();
+ // this.getRepairsCount();
},
methods: {
@@ -196,22 +197,25 @@
}
}
},
-
-
-
-
getCount() {
getCountTypeNumber().then(res => {
if (res.code == 200) {
+ let data = res.data;
this.countInfo = res.data;
for(let i of this.comprehensive){
- if(i.name == "住户审核"){
- i.count = res.data.zhufang;
- }
- if(i.name == "租房管理"){
- i.count = res.data.chuzhu;
+ if(i.name == "场所审核"){
+ i.count = data.cssh;
+ }else if(i.name == "报事报修"){
+ i.count = data.bsbx;
+ }else if(i.name == "住户审核"){
+ i.count = data.zhsh
+ }else if (i.name.trim() == "标签报事"){
+ i.count = data.bqsj
+ }else if (i.name == "租房管理"){
+ i.count = data.czsh
}
}
+ this.bailCount = data.qbhs
}
})
},
diff --git a/subPackage/workbench/views/cscj.vue b/subPackage/workbench/views/cscj.vue
index 4cede31..27f6e3a 100644
--- a/subPackage/workbench/views/cscj.vue
+++ b/subPackage/workbench/views/cscj.vue
@@ -52,11 +52,7 @@
</u-form-item>
- <!-- <u-form-item class="form-item" labelWidth="100" label="经纬度:" prop="location">
- <u--input border="none" disabled disabledColor="#ffffff" v-model="form.jwd" placeholder="请输入">
- </u--input>
- </u-form-item> -->
-
+
<u-form-item label="经纬度:" prop="location" labelWidth="100">
<view class="address-row flex j-c-s-b a-i-c">
@@ -93,6 +89,10 @@
<view class="box-title">
<box-title title="场所照片"></box-title>
</view>
+
+
+
+
<u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
:maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
@@ -156,21 +156,8 @@
</template>
</lineItem>
</view>
-
-
- <!-- <view class="bottom">
- <view class="btn">
- <u-button @click="submit" type="primary" text="提交" v-if="!currentId"></u-button>
- </view>
- </view> -->
</view>
<footer-btn @click="submit" v-if="!currentId" />
-
- <!-- <uni-popup class="citys_win popup_win" ref="uniPopup" type="bottom">
- <wyh-tree-select :items="labelList" title="标签选择" :showNav="true" defaultActiveColor="#4586fe"
- :activeIds="activeIds" @clickItem="labelClick" :showCancel="false" :showConfirm="false">
- </wyh-tree-select>
- </uni-popup> -->
<u-picker :show="showPicker" :defaultIndex="defaultIndex" ref="uPicker" keyName="name" :loading="pickerLoading"
@@ -189,7 +176,6 @@
import uploadMixin from "@/mixin/uploadMixin";
import lineItem from "@/subPackage/workbench/components/lineItem.vue"
import {
- getLabelList,
getLabelCate
} from "@/api/label/categoryLabel.js";
import {
@@ -400,23 +386,8 @@
categoryValue: []
}
},
- // watch: {
- // activeIds: {
- // handler(newVal) {
- // this.form.label = newVal.join(",")
- // }
- // },
- // "form.buildingCode": {
- // handler(newVal) {}
- // },
- // showLabelList(newVal) {}
- // },
-
created() {
this.buildColumn()
- },
- mounted() {
-
},
options: {
styleIsolation: 'shared', // 解除样式隔离
@@ -429,7 +400,7 @@
this.addressType = option.addressType
}
if (option.id) {
- this.currentId = option.id
+ this.currentId = option.id;
}
if (option.houseCode) {
this.houseCode = option.houseCode
@@ -444,12 +415,6 @@
})
}
this.getCategory();
-
- },
-
- onShow() {
- this.getLabel()
- // this.getLocation()
},
watch: {
@@ -611,11 +576,8 @@
return
}
const dpaEntity = data?.doorplateAddressEntity || {}
-
const gridEntity = data?.grid || {}
-
// this.form.buildingCode = dpaEntity?.buildingCode || ''
-
let buildingNameArr = [
dpaEntity?.townStreetName,
dpaEntity?.neiName,
@@ -627,7 +589,6 @@
return e != null || e != ''
})
this.form.placeName = data['placeName'] || ''
-
Object.keys(this.form).forEach(key => {
if (!data[key]) {
// this.form[key] = dpaEntity[key] || '未完善'
@@ -640,6 +601,7 @@
// this.form[key] = data.imageUrls
if (data.imageUrls) {
this.form.images = this.$setImageUrl(data.imageUrls, 2);
+ this.uploadConfig.maxCount = this.form.images.length;
} else {
this.form.images = []
}
@@ -649,14 +611,6 @@
this.form.jwd = `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`
this.form.building = arr.join("")
this.firstId = data.placePoiLabelVOList[0].poiCode;
- // setTimeout(() => {
- // data.placePoiLabelVOList.forEach(item => {
- // let label = this.labelList[0].children.find(sl => sl.text === item
- // .labelName) || {}
- // label['isClose'] = false
- // label?.text && this.showLabelList.push(label)
- // })
- // }, 500)
this.categoryValue = data.placePoiLabelVOList[data.placePoiLabelVOList.length-1].labelName;
uni.$u.sleep(500).then(() => {
data.placePoiLabelVOList.forEach(item=>{
@@ -849,21 +803,7 @@
},
- getLabel() {
- getLabelList({
- size: -1
- }).then(res => {
- let data = res.data.records
- data.sort((a, b) => a.sort - b.sort)
-
- data.forEach(label => {
- this.labelList[0].children.push({
- id: label.categoryNo,
- text: label.categoryName
- })
- })
- })
- },
+
labelClick(item) {
diff --git a/subPackage/workbench/views/cshw.vue b/subPackage/workbench/views/cshw.vue
index 511549a..580c954 100644
--- a/subPackage/workbench/views/cshw.vue
+++ b/subPackage/workbench/views/cshw.vue
@@ -1,15 +1,31 @@
<template>
<view>
<u-sticky>
- <view class="tab">
+ <view class="hander">
<view class="tab">
- <u-tabs :list="tabList" :scrollable="false" :current="tabIndex" @click="changeTab"
- :inactiveStyle="{color:'#999999'}" :activeStyle="{color:'#017BFC'}"></u-tabs>
- <view class="search">
- <u-search placeholder="请输入场所名称" v-model="keyWord" :clearabled="true" :showAction="true"
- :animation="true" @search="searchConfirm" @clear="clearConfirm" @custom="searchConfirm"></u-search>
- </view>
+
+ <u-tabs :list="tabList" :scrollable="true" :current="tabIndex" @click="changeTab"
+ :inactiveStyle="{color:'#999999'}" :activeStyle="{color:'#017BFC'}">
+
+ <view class="tab-filter flex j-c-c a-i-c" slot="right" @click="showDateModal">
+ <text class="f-28">时间筛选</text>
+ <u-icon name="arrow-down"></u-icon>
+ </view>
+ </u-tabs>
+
+
+
+
+
</view>
+
+
+ <view class="search">
+ <u-search placeholder="请输入场所名称" v-model="keyWord" :clearabled="true" :showAction="true"
+ :animation="true" @search="searchConfirm" @clear="clearConfirm"
+ @custom="searchConfirm"></u-search>
+ </view>
+
</view>
</u-sticky>
<view class="list">
@@ -34,6 +50,12 @@
</view>
<u-toast ref="uToast"></u-toast>
<u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
+
+
+
+
+
+ <date-range-modal ref="dateRane" @comfirm="handleComfirmDate" @rest="handleRestDate" />
</view>
</template>
@@ -41,7 +63,13 @@
import {
getSiteMaintenanceData
} from '@/api/placeExp/placeExp.js'
+
+ import dateRangeModal from '@/components/dateRangeModal/modal.vue';
+
export default {
+ components:{
+ dateRangeModal
+ },
data() {
return {
siteList: [],
@@ -50,6 +78,10 @@
size: 10
},
tabList: [{
+ name: "全部",
+ status: "",
+ },
+ {
name: "待审核",
status: 1,
type: 'warning'
@@ -70,7 +102,8 @@
keyWord: '',
loadingStatus: 'nomore',
clickInfo: {},
- currentRole: {}
+ currentRole: {},
+ selectDate:[],
}
},
onShow() {
@@ -82,7 +115,11 @@
this.pagingParams.current++
this.getSiteList()
},
+
+
methods: {
+
+
async getSiteList() {
this.$nextTick(() => {
this.$refs.uToast.show({
@@ -92,10 +129,14 @@
})
this.loadingStatus = 'loadingmore'
})
-
+
const params = {
placeName: this.keyWord,
confirmFlag: this.tabStatus
+ }
+ if(this.selectDate.length){
+ params.startTime = this.selectDate[0],
+ params.endTime = this.selectDate[1]
}
const {
roleName
@@ -139,6 +180,13 @@
this.resetParams()
this.searchConfirm()
},
+
+
+ showDateModal(){
+ this.$refs.dateRane.open();
+ },
+
+
resetParams() {
this.siteList = []
this.pagingParams.current = 1
@@ -157,7 +205,20 @@
return
}
this.$u.func.globalNavigator(`/subPackage/workbench/views/examine?id=${id}&placeId=${placeId}`)
+ },
+
+ handleRestDate(){
+ this.selectDate = [];
+ this.resetParams();
+ this.getSiteList()
+ },
+ handleComfirmDate(val){
+ this.selectDate = val;
+ this.resetParams();
+ this.getSiteList()
}
+
+
}
}
</script>
@@ -167,9 +228,18 @@
background-color: #F5F5F5;
}
- .tab {
+ .hander {
background-color: #fff;
+ .tab {
+ width: 100%;
+ }
+
+ .tab-filter {
+ padding: 0 20rpx;
+ }
+
+
.search {
padding: 20rpx 70rpx;
}
diff --git a/subPackage/workbench/views/examine.vue b/subPackage/workbench/views/examine.vue
index 75f3cb5..cd7d52f 100644
--- a/subPackage/workbench/views/examine.vue
+++ b/subPackage/workbench/views/examine.vue
@@ -6,26 +6,35 @@
<lineItem :dataInfo="basicData"></lineItem>
</view>
</view>
- <view class="licence" v-if="imageObj.imageUrls.length">
+ <view class="licence">
<box-title title="营业执照" class="box-title"></box-title>
<view class="info">
- <view class="images-box" v-for="(i,k) in imageObj.imageUrls" :key="k">
+
+
+ <view class="f-30" v-if="!imageObj.imageUrls.length">未完善</view>
+
+ <view class="images-box" v-for="(i,k) in imageObj.imageUrls" :key="k" v-if="imageObj.imageUrls.length">
<u-image width="80" height="80" :src="i" @click="preViewImg(i,imageObj.imageUrls)"></u-image>
</view>
</view>
</view>
- <view class="planegraph" v-if="imageObj.planImageUrls.length">
+ <view class="planegraph">
<box-title title="场所平面图" class="box-title"></box-title>
<view class="info">
- <view class="images-box" v-for="(i,k) in imageObj.planImageUrls" :key="k">
+ <view class="f-30" v-if="!imageObj.planImageUrls.length">未完善</view>
+ <view class="images-box" v-for="(i,k) in imageObj.planImageUrls" :key="k"
+ v-if="imageObj.planImageUrls.length">
<u-image width="80" height="80" :src="i" @click="preViewImg(i,imageObj.planImageUrls)"></u-image>
</view>
</view>
</view>
- <view class="personnel" v-if="placePersonList.length">
+ <view class="personnel">
<box-title title="从业人员" class="box-title"></box-title>
<view class="info">
- <view class="person-box" v-for="(item, index) in placePersonList" :key="item.id">
+ <view class="f-30" v-if="!placePersonList.length">
+ 未完善
+ </view>
+ <view class="person-box" v-for="(item, index) in placePersonList" :key="item.id">
<view class="title">人员信息-#{{ index + 1 }}</view>
<view class="info-box">
<view class="content">
@@ -44,9 +53,12 @@
</view>
</view>
</view>
- <!-- <view class="examine">
- <box-title title="审核信息" class="box-title"></box-title>
- <view class="info">
+ <view class="examine" v-if="confirmNotion">
+ <box-title title="备注" class="box-title"></box-title>
+ <view class="row f-30">
+ {{confirmNotion}}
+ </view>
+ <!-- <view class="info">
<u-form labelWidth="70" :model="form" ref="form" class="form">
<u-form-item label="审核状态" @click="isPickerShow = true" class="form-item">
<u--input v-model="defaultPlaceholder" disabled disabledColor="#ffffff"
@@ -54,28 +66,23 @@
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="备注" class="form-item">
- <u--input v-model="form.confirmNotion" inputAlign="right" border="none"></u--input>
+ <u--input v-model="confirmNotion" inputAlign="right" border="none"></u--input>
</u-form-item>
</u-form>
- </view>
- </view> -->
+ </view> -->
+ </view>
<!-- <view class="bottom-btn">
<u-button type="primary" @click="submit">提交审核</u-button>
</view> -->
-
-
- <footer-btn @click="submit" v-if="form.confirmFlag == 3" text="通过" />
-
-
-
- <view class="footer flex a-i-c j-c-s-b" v-if="form.confirmFlag == 1">
+ <footer-btn @click="submit" v-if="confirmFlag == 3" text="通过" />
+ <view class="footer flex a-i-c j-c-s-b" v-if="confirmFlag == 1">
<button class="footer-btn" @click="submit(1)">通过</button>
<button class="footer-btn" @click="submit(2)">驳回</button>
</view>
- <u-modal :show="isShowModal" title="备注" :showConfirmButton="false">
+ <u-modal :show="isShowModal" title="备注" :showConfirmButton="false">
<view class="modal-content">
<u-textarea v-model="form.confirmNotion" placeholder="请输入驳回原因"></u-textarea>
<view class="modal-btn flex j-c-s-b a-i-c" slot="confirmButton">
@@ -83,7 +90,6 @@
<button class="modal-btn-item bgc-main f-30 c-ff" @click="rejectSubmit">确定</button>
</view>
</view>
-
</u-modal>
<u-picker :defaultIndex="[this.defaultColumns]" :closeOnClickOverlay="true" @close="isPickerShow = false"
@@ -161,7 +167,9 @@
},
defaultColumns: 0,
defaultPlaceholder: '待审核',
- isShowModal: false
+ isShowModal: false,
+ confirmFlag: 1,
+ confirmNotion: ""
}
},
onLoad(option) {
@@ -197,7 +205,8 @@
// })
this.form.confirmFlag = data.confirmFlag;
-
+ this.confirmFlag = data.confirmFlag;
+ this.confirmNotion = data.confirmNotion;
if (data.imageUrls) {
// let urls = data.imageUrls.split(",");
// this.imageObj.imageUrls = `${minioBaseUrl}${data.imageUrls}`
@@ -274,13 +283,14 @@
},
rejectSubmit() {
- if(!this.form.confirmNotion){
+ if (!this.form.confirmNotion) {
uni.showToast({
- title:"请输入驳回原因",
- icon:"none"
+ title: "请输入驳回原因",
+ icon: "none"
})
return
- }
+ }
+ this.form.confirmFlag = 3
this.checkPlaceExt()
}
@@ -400,7 +410,8 @@
}
.modal-content {
- width:100%;
+ width: 100%;
+
.modal-btn {
width: 100%;
padding: 40rpx 0 0;
@@ -410,19 +421,24 @@
height: 74rpx;
line-height: 74rpx;
border-radius: 35rpx;
- border:none;
- padding:0;
- margin:0;
+ border: none;
+ padding: 0;
+ margin: 0;
}
.modal-btn-item:first-child {
border: 1px solid currentColor;
- background:transparent;
+ background: transparent;
}
-
+
}
}
- /deep/ .u-modal__content{
- padding-bottom:20rpx !important;
+
+ /deep/ .u-modal__content {
+ padding-bottom: 20rpx !important;
+ }
+
+ .row {
+ padding: 20rpx;
}
</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/patrol.vue b/subPackage/workbench/views/patrol.vue
index 4bce0c8..41e6c85 100644
--- a/subPackage/workbench/views/patrol.vue
+++ b/subPackage/workbench/views/patrol.vue
@@ -3,21 +3,36 @@
<view class="content bgc-ff">
<u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90"
:labelStyle="{fontSize:'28rpx'}">
- <u-form-item label="巡查标题" prop="info.name" borderBottom required>
+ <u-form-item label="巡查标题" prop="info.name" borderBottom required>
<u-input v-model="info.name" border="none" placeholder="请输入标题" placeholderClass="f-28 c-99"
inputAlign="right"></u-input>
</u-form-item>
- <u-form-item label="巡查内容" borderBottom prop="context" required>
+
+
+ <!-- <u-form-item label="巡查时间" prop="patrolTime" borderBottom required @click="showSelectDate = true">
+ <u-input v-model="info.patrolTime" disabled disabledColor="#ffffff" border="none"
+ placeholder="请选择时间" placeholderClass="f-28 c-99" inputAlign="right"></u-input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item> -->
+ <u-form-item label="巡查位置" prop="address" :borderBottom="false" required>
+ <view class="address-row flex">
+ <view class="address-content f-28" v-if="info.location">
+ {{info.location}}
+ </view>
+ <view class="address-content f-28" style="color: #c0c4cc" v-if="!info.location">
+ 请选择地址
+ </view>
+ <view class="location-btn c-main f-24" @click="getLocation()">
+ 获取地址
+ </view>
+ </view>
+ </u-form-item>
+ <u-form-item label="巡查内容" borderBottom prop="context" required>
<!-- <u-input type="textarea" v-model="info.context" border="none" placeholderClass="f-28 c-99"
inputAlign="right" placeholder="请输入巡查内容" >
</u-input> -->
- <u--textarea v-model="info.context" inputAlign="right" placeholder="请输入巡查内容" placeholderClass="f-28 c-99"></u--textarea>
- </u-form-item>
-
- <u-form-item label="巡查时间" prop="patrolTime" borderBottom required @click="showSelectDate = true">
- <u-input v-model="info.patrolTime" disabled disabledColor="#ffffff" border="none" placeholder="请选择时间"
- placeholderClass="f-28 c-99" inputAlign="right"></u-input>
- <u-icon slot="right" name="arrow-right"></u-icon>
+ <u--textarea v-model="info.context" inputAlign="right" placeholder="请输入巡查内容"
+ placeholderClass="f-28 c-99"></u--textarea>
</u-form-item>
</u-form>
</view>
@@ -37,12 +52,12 @@
<u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="patrolTime" mode="datetime"
:formatter="formatter" @confirm="confirmDate" @cancel="showSelectDate = false"></u-datetime-picker>
- <!-- <view class="footer">
+ <!-- <view class="footer">
<button class="footer-btn" @click="submitInfo">提交</button>
</view> -->
-
- <footer-btn @click="submitInfo"></footer-btn>
-
+
+ <footer-btn @click="submitInfo"></footer-btn>
+
</view>
@@ -63,7 +78,7 @@
info: {
name: "",
context: "",
- patrolTime:""
+ patrolTime: ""
},
rules: {
'name': {
@@ -78,10 +93,16 @@
message: '请输入巡查内容',
trigger: ['blur', 'change']
},
- 'patrolTime': {
+ // 'patrolTime': {
+ // type: 'string',
+ // required: true,
+ // message: '请选择巡查时间',
+ // trigger: ['blur', 'change']
+ // },
+ 'location': {
type: 'string',
required: true,
- message: '请选择巡查时间',
+ message: '请选择巡查位置',
trigger: ['blur', 'change']
}
},
@@ -93,11 +114,11 @@
patrolTime: Number(new Date())
}
},
-
- onLoad(){
+
+ onLoad() {
this.info.patrolTime = uni.$u.timeFormat(Number(new Date()), 'yyyy-mm-dd hh:MM:ss')
},
-
+
methods: {
confirmDate(e) {
@@ -109,6 +130,17 @@
if (this.form.images.length) {
this.$set(this.info, "url", this.setImages())
}
+ },
+
+
+ getLocation() {
+ uni.chooseLocation({
+ success: (res) => {
+ this.$set(this.info, "location", res.address);
+ this.$set(this.info, "latitude", res.latitude);
+ this.$set(this.info, "longitude", res.longitude)
+ }
+ })
},
setImages() {
@@ -194,4 +226,27 @@
font-size: 32rpx;
}
}
+
+ .address-row {
+ flex: 1;
+ justify-content: flex-end;
+ align-items: center;
+ }
+
+ .address-content {
+ width: calc(100% - 116rpx - 20rpx);
+ margin-right: 20rpx;
+ text-align: right;
+ }
+
+ .location-btn {
+ width: 116rpx;
+ height: 46rpx;
+ line-height: 46rpx;
+ border-radius: 4rpx;
+ border: 1px solid currentColor;
+ padding: 0;
+ background-color: #fff;
+ text-align: center;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.3