From 13cee53e7b48f4edb3dfdd0d19f0927a34b07082 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Wed, 08 Nov 2023 18:25:24 +0800
Subject: [PATCH] merge
---
pages.json | 20
subPackage/bs/views/rentDetail.vue | 156 ++-
subPackage/workbench/views/examine.vue | 188 ++++
subPackage/workbench/views/audit.vue | 1
subPackage/workbench/views/rental.vue | 245 +++--
pages/home/index.vue | 5
api/placeExp/placeExp.js | 27
subPackage/workbench/views/cscj.vue | 1356 +++++++++++++++++----------------
subPackage/bs/views/repair.vue | 4
subPackage/workbench/views/csjl.vue | 133 +-
subPackage/bs/views/addRepair.vue | 6
subPackage/workbench/views/cshw.vue | 168 ++++
subPackage/workbench/components/lineItem.vue | 19
13 files changed, 1,428 insertions(+), 900 deletions(-)
diff --git a/api/placeExp/placeExp.js b/api/placeExp/placeExp.js
new file mode 100644
index 0000000..3e032fc
--- /dev/null
+++ b/api/placeExp/placeExp.js
@@ -0,0 +1,27 @@
+import http from '@/http/api.js'
+
+export const getSiteMaintenanceData = (params) => {
+ return http.request({
+ url: 'blade-placeExt/placeExt/page',
+ method: 'GET',
+ params
+ })
+}
+
+
+
+export const getCheckPlaceExtData = (params) => {
+ return http.request({
+ url: 'blade-placeExt/placeExt/checkPlaceExt',
+ method: 'POST',
+ params
+ })
+}
+
+export const updatePlaceExtData = (data) => {
+ return http.request({
+ url: 'blade-placeExt/placeExt/updatePlaceExt',
+ method: 'POST',
+ data
+ })
+}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 1a8acce..8bc86f9 100644
--- a/pages.json
+++ b/pages.json
@@ -172,6 +172,7 @@
{
"path": "views/rental",
"style": {
+ "onReachBottomDistance": 10,
"navigationBarTitleText": "出租房管理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#fff",
@@ -186,6 +187,25 @@
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
+ },
+ {
+ "path": "views/cshw",
+ "style": {
+ "onReachBottomDistance": 10,
+ "navigationBarTitleText": "网格任务审核",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black"
+ }
+ },
+ {
+ "path": "views/examine",
+ "style": {
+ "navigationBarTitleText": "审核",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black"
+ }
}
]
},
diff --git a/pages/home/index.vue b/pages/home/index.vue
index c8be8eb..8b80954 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -249,7 +249,7 @@
style: {
background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
},
- path: "/subPackage/workbench/views/cscj"
+ path:"/subPackage/workbench/views/cshw"
},
{
icon: "/static/icon/menu-06.png",
@@ -396,7 +396,8 @@
} else {
this.curSelectSite = dataList[0];
}
- this.curHouseCode = this.curSelectSite.id
+ this.curHouseCode = this.curSelectSite.id
+ uni.setStorageSync('curSelectSite', this.curSelectSite)
}
},
diff --git a/subPackage/bs/views/addRepair.vue b/subPackage/bs/views/addRepair.vue
index ebbec7f..88bc6d4 100644
--- a/subPackage/bs/views/addRepair.vue
+++ b/subPackage/bs/views/addRepair.vue
@@ -6,7 +6,7 @@
<text class="f-28 c-aa ml-20">当前小区:</text>
</view>
- <text class="address f-28">万达华府26栋1903室 万达华府26栋1903室</text>
+ <text class="address f-28">{{ curSelectSite.name }}</text>
</view>
<view class="content bgc-ff">
<u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90"
@@ -75,6 +75,7 @@
},
desc: "",
title: "",
+ curSelectSite: {}
}
},
onLoad(option) {
@@ -84,6 +85,9 @@
})
this.info.type = option.type
},
+ onShow() {
+ this.curSelectSite = uni.getStorageSync('curSelectSite')
+ },
methods: {
sumitInfo() {
const that = this
diff --git a/subPackage/bs/views/rentDetail.vue b/subPackage/bs/views/rentDetail.vue
index 3bfd4cc..a2a3cec 100644
--- a/subPackage/bs/views/rentDetail.vue
+++ b/subPackage/bs/views/rentDetail.vue
@@ -61,15 +61,23 @@
:popupTitle="selectBusTitle" :dataLists="selectBusList" @cancel="typeShow = false" @submit="typeSelect">
</select-bus>
<!--出租时间选择-->
- <u-datetime-picker v-model="currentTime" v-if="rentTimeShow" :closeOnClickOverlay="true" @close="rentTimeShow = false" :show="rentTimeShow" mode="date" @confirm="rentTimeConfirm"
+ <u-datetime-picker v-model="currentTime" v-if="rentTimeShow" :closeOnClickOverlay="true"
+ @close="rentTimeShow = false" :show="rentTimeShow" mode="date" @confirm="rentTimeConfirm"
@cancel="rentTimeShow = false"></u-datetime-picker>
- <u-datetime-picker v-model="currentTime" v-if="dueTimeShow" :closeOnClickOverlay="true" @close="dueTimeShow = false" :show="dueTimeShow" mode="date" @confirm="dueTimeConfirm"
+ <u-datetime-picker v-model="currentTime" v-if="dueTimeShow" :closeOnClickOverlay="true"
+ @close="dueTimeShow = false" :show="dueTimeShow" mode="date" @confirm="dueTimeConfirm"
@cancel="dueTimeShow = false"></u-datetime-picker>
<view class="bottom-tools">
- <u-button class="btn-item" @click="addRentForm">再加一人</u-button>
- <u-button class="btn-item" @click="saveOrUpdate">{{ rentId === '' ? "保存" : "确认修改" }}</u-button>
- </view>
+ <u-button class="btn-item" color="#2CD5C0" @click="addRentForm">再加一人</u-button>
+ <u-button class="btn-item" type="error" @click="isModelShow = true" v-if="rentId !== ''">删除</u-button>
+ <u-button class="btn-item" type="warning" @click=""
+ v-if="auditStatus == '0' && currentRole === 'admin'">审核</u-button>
+ <u-button class="btn-item" color="linear-gradient(to right, #06B0FD, #027BFE)"
+ @click="saveOrUpdate">{{ rentId === '' ? "保存" : "确认修改" }}</u-button>
+ </view>
+ <u-modal :show="isModelShow" width="auto" :showCancelButton="true" title="提示" content="请确认是否删除当前租户信息"
+ @cancel="isModelShow = false" @confirm="deleteRent"></u-modal>
</view>
</template>
@@ -83,7 +91,8 @@
} from "@/api/doorplateAddress/doorplateAddress";
import {
addHouseRental,
- updateRetalInfo
+ updateRetalInfo,
+ deleteRentalInfo
} from '@/api/houseRental/houseRental.js'
import {
data
@@ -105,12 +114,12 @@
currentRole: '',
form: {
relation: "",
- rentTime: "",
- houseTypeName: "",
+ rentTime: "",
+ houseTypeName: "",
rentalUseName: "",
dueTime: "",
- fileUrls:"",
- images:[]
+ fileUrls: "",
+ images: []
},
imagesList: [],
rules: {
@@ -184,8 +193,11 @@
selectBusKey: '',
typeShow: false,
houseCode: '',
- rentId: '',
- currentTime: Number(new Date())
+ rentId: '',
+ auditStatus: null,
+ currentTime: Number(new Date()),
+ isModelShow: false,
+
}
},
onLoad(option) {
@@ -216,19 +228,19 @@
this[this.selectBusModel] = item.name
this.form[this.selectBusKey] = item.value
this.typeShow = !this.typeShow
- },
- rentTimeClick() {
- this.currentTime = Number(new Date(this.form.rentTime)) || Number(new Date())
- this.rentTimeShow = true
+ },
+ rentTimeClick() {
+ this.currentTime = Number(new Date(this.form.rentTime)) || Number(new Date())
+ this.rentTimeShow = true
},
rentTimeConfirm(e) {
const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
this.form.rentTime = time
this.rentTimeShow = false
- },
- dueTimeClick() {
- this.currentTime = Number(new Date(this.form.dueTime)) || Number(new Date())
- this.dueTimeShow = true
+ },
+ dueTimeClick() {
+ this.currentTime = Number(new Date(this.form.dueTime)) || Number(new Date())
+ this.dueTimeShow = true
},
dueTimeConfirm(e) {
const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
@@ -239,30 +251,30 @@
this.rentFormNum++
},
decRentForm(i) {
- try{
- let formData = []
- this.$refs.rentform.forEach(vc => {
- formData.push(vc.form)
- })
- formData.splice(i, 1)
- formData.forEach((sform, i) => {
- this.$refs.rentform[i].form = sform
- })
- this.rentFormNum > 1 && this.rentFormNum--
- uni.showToast({
- title: "删除成功",
- icon: "success",
- duration: 1500
- })
- }catch(e){
- uni.showToast({
- title: "删除失败",
- icon: "error",
- duration: 1500
- })
+ try {
+ let formData = []
+ this.$refs.rentform.forEach(vc => {
+ formData.push(vc.form)
+ })
+ formData.splice(i, 1)
+ formData.forEach((sform, i) => {
+ this.$refs.rentform[i].form = sform
+ })
+ this.rentFormNum > 1 && this.rentFormNum--
+ uni.showToast({
+ title: "删除成功",
+ icon: "success",
+ duration: 1500
+ })
+ } catch (e) {
+ uni.showToast({
+ title: "删除失败",
+ icon: "error",
+ duration: 1500
+ })
}
},
- saveOrUpdate() {
+ saveOrUpdate() {
this.$refs.form.validate().then(res => {
let rentFormValidGroup = []
this.$refs.rentform.forEach(item => {
@@ -301,7 +313,7 @@
dueTime: this.form.dueTime,
houseStatus: this.dataList.houseType[statusIndex].value,
rentalUse: this.dataList.rentalUse[rentalIndex].value,
- fileUrls:this.form.fileUrls,
+ fileUrls: this.form.fileUrls,
houseTenantVOList
}
const {
@@ -351,7 +363,7 @@
dueTime: this.form.dueTime,
houseStatus: this.dataList.houseType[statusIndex].value,
rentalUse: this.dataList.rentalUse[rentalIndex].value,
- fileUrls:this.form.fileUrls,
+ fileUrls: this.form.fileUrls,
houseTenantVOList
}
const res = await updateRetalInfo(data)
@@ -388,6 +400,7 @@
houseRentalList
}
} = await getHouseRentInfo(this.houseCode)
+ this.auditStatus = houseRentalList.auditStatus
const images = []
const {
houseStatus,
@@ -399,12 +412,12 @@
fileUrls
} = houseRentalList.find(item => item.id === this.rentId)
// 合同展示处理
- if(fileUrls!=null && fileUrls.length>0){
+ if (fileUrls != null && fileUrls.length > 0) {
const urls = fileUrls.split(',')
// 遍历
- urls.forEach(e=>{
+ urls.forEach(e => {
images.push({
- url:minioBaseUrl + e,
+ url: minioBaseUrl + e,
name: e
})
})
@@ -412,10 +425,10 @@
this.form = {
relation: tenantRelationship,
rentTime: rentalTime,
- dueTime: dueTime,
- houseTypeName: houseStatus,
+ dueTime: dueTime,
+ houseTypeName: houseStatus,
rentalUseName: rentalUse,
- images:images
+ images: images
}
this.rentalUseName = this.findObjValue(rentalUse, this.dataList.rentalUse)
this.relationName = this.findObjValue(tenantRelationship, this.dataList.relation)
@@ -426,7 +439,32 @@
this.$refs.rentform[index].form = item
})
})
- }
+ },
+ async deleteRent() {
+ const {
+ code,
+ data
+ } = await deleteRentalInfo(this.rentId)
+ if (code !== 200) {
+ uni.showToast({
+ title: "删除失败",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
+ this.isModelShow = false
+ uni.showToast({
+ title: '删除成功',
+ icon: 'success',
+ duration: 1000,
+ complete: () => {
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 1000)
+ }
+ })
+ },
}
}
</script>
@@ -512,20 +550,16 @@
z-index: 999;
.btn-item {
- margin: 40rpx;
+ // margin: 40rpx;
+ // margin: 30rpx;
color: #ffffff;
font-weight: 700;
border: 0;
+ margin: 30rpx;
+ margin-left: 0;
- &:nth-child(1) {
- flex: 1;
- background-color: #2CD5C0;
- }
-
- &:nth-child(2) {
- flex: 3;
- background: linear-gradient(to right, #06B0FD, #027BFE);
- margin-left: 0rpx;
+ &:first-child {
+ margin-left: 30rpx;
}
}
}
diff --git a/subPackage/bs/views/repair.vue b/subPackage/bs/views/repair.vue
index 488e59e..22fe06a 100644
--- a/subPackage/bs/views/repair.vue
+++ b/subPackage/bs/views/repair.vue
@@ -37,7 +37,7 @@
<text class="f-28 c-aa ml-20">当前小区:</text>
</view>
- <text class="address f-28">万达华府26栋1903室 万达华府26栋1903室</text>
+ <text class="address f-28">{{ curSelectSite.name }}</text>
</view>
<view class="nav flex flex-wrap j-c-s-b">
@@ -69,6 +69,7 @@
total: 0,
handle: 0,
},
+ curSelectSite: {},
navList: [{
title: "公共维修",
type: 1,
@@ -113,6 +114,7 @@
},
onShow() {
this.getStatistics()
+ this.curSelectSite = uni.getStorageSync('curSelectSite')
},
methods: {
diff --git a/subPackage/workbench/components/lineItem.vue b/subPackage/workbench/components/lineItem.vue
index e2e6b98..0710482 100644
--- a/subPackage/workbench/components/lineItem.vue
+++ b/subPackage/workbench/components/lineItem.vue
@@ -2,14 +2,16 @@
<view class="line-item-container" style="margin-bottom: 20rpx;">
<view v-for="(item, index) in dataInfo" :key="index" class="line-item">
- <view class="l">
- {{item.label}}
- </view>
- <view class="r" v-if="!item.useSlot">
- {{item.value}}
+ <view class="text">
+ <view class="l">
+ {{item.label}}
+ </view>
+ <view class="r" v-if="!item.useSlot">
+ {{item.value}}
+ </view>
</view>
- <view class="r" v-else>
+ <view class="r" v-if="item.useSlot">
<!-- #ifdef H5-->
<slot :name="item.useSlot" :scope="item"></slot>
<!-- #endif -->
@@ -55,7 +57,7 @@
<style scoped lang="scss">
.line-item-container {
- .line-item {
+ .text {
background-color: #ffffff;
display: flex;
justify-content: space-between;
@@ -69,6 +71,9 @@
color: #969799;
}
}
+ .r {
+ background-color: #ffffff;
+ }
}
view {
diff --git a/subPackage/workbench/views/audit.vue b/subPackage/workbench/views/audit.vue
index 4eccd8c..8ac0619 100644
--- a/subPackage/workbench/views/audit.vue
+++ b/subPackage/workbench/views/audit.vue
@@ -1,3 +1,4 @@
+
<template>
<view>
<view class="tab">
diff --git a/subPackage/workbench/views/cscj.vue b/subPackage/workbench/views/cscj.vue
index 3d414ee..308bb75 100644
--- a/subPackage/workbench/views/cscj.vue
+++ b/subPackage/workbench/views/cscj.vue
@@ -1,666 +1,706 @@
-<template>
- <view class="container">
- <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
- <view class="box-title">
- <box-title title="基础信息"></box-title>
- </view>
- <view class="item">
- <u-form-item @click="showPicker = true" class="form-item" labelWidth="100" label="楼栋:"
- :required="isRequired" :disabled="isDisabled"
- prop="buildingCode">
- <u--input border="none" disabledColor="#ffffff" v-model="form.building" placeholder="请选择">
- </u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
-
- <u-form-item class="form-item" labelWidth="100" label="场所名称:"
- :required="isRequiredPlace" :disabled="isDisabled" prop="placeName">
- <u--input border="none" v-model="form.placeName" placeholder="请输入">
- </u--input>
- </u-form-item>
-
- <u-form-item @click="popup" class="form-item" labelWidth="100" label="标签:"
- :required="isRequired" :disabled="isDisabled" prop="label">
- <u--input border="none" disabled disabledColor="#ffffff" placeholder="请选择">
- </u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
- <view v-if="showLabelList.length>0" class="label">
- <view v-for="(item,index) in showLabelList" :key="index" class="activeLabel">
- <u-tag closable :show="!item.isClose" size="mini" @close="delTag(item)"
- :text="item.text"></u-tag>
- </view>
- </view>
-
- <u-form-item class="form-item" labelWidth="100" label="备注:" prop="remark">
- <u--input border="none" v-model="form.remark" placeholder="请输入">
- </u--input>
- </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>
- </view>
-
- <view class="box-title">
- <box-title title="负责人信息"></box-title>
- </view>
-
- <view class="item">
- <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
- label="场所负责人:" prop="username">
- <u--input border="none" v-model="form.username" placeholder="请输入">
- </u--input>
- </u-form-item>
- <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
- label="手机号:" prop="phone">
- <u--input border="none" v-model="form.phone" placeholder="请输入">
- </u--input>
- </u-form-item>
- </view>
-
-
- <view class="box-title">
- <box-title title="场所照片"></box-title>
- </view>
-
- <view class="item pic">
- <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
- :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
- </u-upload>
- </view>
-
-
-
-
- </u-form>
-
- <view class="box-title">
- <box-title title="综治网格">
- <template slot="titleMore">
- <view class="title-more">
- <view class="red item"></view>
- <view class="orange item">85.9</view>
- <view class="green item"></view>
- </view>
- </template>
- </box-title>
- </view>
-
- <view class="item">
- <lineItem :dataInfo="comprehensiveData.basic">
- </lineItem>
-
- <lineItem :dataInfo="comprehensiveData.scene">
- <template v-slot:pic="{scope}">
- {{scope.value}}
- </template>
- </lineItem>
- </view>
-
- <view class="box-title">
- <box-title title="公安网格">
- <template slot="titleMore">
- <view class="title-more">
- <view class="red item"></view>
- <view class="orange item">85.9</view>
- <view class="green item"></view>
- </view>
- </template>
- </box-title>
- </view>
-
- <view class="item">
- <lineItem :dataInfo="comprehensiveData.basic">
- </lineItem>
-
- <lineItem :dataInfo="comprehensiveData.scene">
- <template v-slot:pic="{scope}">
- {{scope.value}}
- </template>
- </lineItem>
- </view>
-
-
- <view class="bottom">
- <view class="btn">
- <u-button @click="submit" type="primary" text="提交"></u-button>
- </view>
- </view>
-
-
-
- <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"
- :columns="pickColumns" @change="changeHandler" @confirm="confirmPicker"
- @cancel="showPicker = false"></u-picker>
-
-
- </view>
-</template>
-
-<script>
- import uploadMixin from "@/mixin/uploadMixin";
- import lineItem from "@/subPackage/workbench/components/lineItem.vue"
- import {
- getLabelList
- } from "@/api/label/categoryLabel.js";
- import {
- getDoorplateAddressDetail,
- getDoorplateAddressList
- } from "@/api/doorplateAddress/doorplateAddress";
- import {
- add
- } from "@/api/place/place";
- export default {
- mixins: [uploadMixin],
- components: {
- lineItem
- },
- data() {
- return {
- isRequired:false,
- isRequiredPlace:true,
- isDisabled:true,
- showPicker: false,
- pickerLoading: false,
- pickColumns: [],
- defaultIndex: [0, 0, 0, 0, 0],
-
- selectValue: [],
-
- form: {
- buildingCode: "",
- label: "",
- remark: "",
+<template>
+ <view class="container">
+ <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
+ <view class="box-title">
+ <box-title title="基础信息"></box-title>
+ </view>
+ <view class="item">
+ <u-form-item @click="showPicker = true" class="form-item" labelWidth="100" label="楼栋:"
+ :required="isRequired" :disabled="isDisabled" prop="buildingCode">
+ <u--input border="none" disabledColor="#ffffff" v-model="form.building" placeholder="请选择">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+ <u-form-item class="form-item" labelWidth="100" label="场所名称:" :required="isRequiredPlace"
+ :disabled="isDisabled" prop="placeName">
+ <u--input border="none" v-model="form.placeName" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+
+ <u-form-item @click="popup" class="form-item" labelWidth="100" label="标签:" :required="isRequired"
+ :disabled="isDisabled" prop="label">
+ <u--input border="none" disabled disabledColor="#ffffff" placeholder="请选择">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <view v-if="showLabelList.length>0" class="label">
+ <view v-for="(item,index) in showLabelList" :key="index" class="activeLabel">
+ <u-tag closable :show="!item.isClose" size="mini" @close="delTag(item)"
+ :text="item.text"></u-tag>
+ </view>
+ </view>
+
+ <u-form-item class="form-item" labelWidth="100" label="备注:" prop="remark">
+ <u--input border="none" v-model="form.remark" placeholder="请输入">
+ </u--input>
+ </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>
+ </view>
+
+ <view class="box-title">
+ <box-title title="负责人信息"></box-title>
+ </view>
+
+ <view class="item">
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="场所负责人:" prop="username">
+ <u--input border="none" v-model="form.username" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="手机号:" prop="phone">
+ <u--input border="none" v-model="form.phone" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ </view>
+
+
+ <view class="box-title">
+ <box-title title="场所照片"></box-title>
+ </view>
+
+ <view class="item pic">
+ <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
+ :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
+ </u-upload>
+ </view>
+
+
+
+
+ </u-form>
+
+ <view class="box-title">
+ <box-title title="综治网格">
+ <template slot="titleMore">
+ <view class="title-more">
+ <view class="red item"></view>
+ <view class="orange item">85.9</view>
+ <view class="green item"></view>
+ </view>
+ </template>
+ </box-title>
+ </view>
+
+ <view class="item">
+ <lineItem :dataInfo="comprehensiveData.basic">
+ </lineItem>
+
+ <lineItem :dataInfo="comprehensiveData.scene">
+ <template v-slot:pic="{scope}">
+ <view class="image" v-if="scope.value !== ''">
+ <u--image @click="imgPreview(scope.value)" width="200rpx" height="200rpx" :src="scope.value"></u--image>
+ </view>
+ </template>
+ </lineItem>
+ </view>
+
+ <view class="box-title">
+ <box-title title="公安网格">
+ <template slot="titleMore">
+ <view class="title-more">
+ <view class="red item"></view>
+ <view class="orange item">85.9</view>
+ <view class="green item"></view>
+ </view>
+ </template>
+ </box-title>
+ </view>
+
+ <view class="item">
+ <lineItem :dataInfo="publicData.basic">
+ </lineItem>
+
+ <lineItem :dataInfo="publicData.scene">
+ <template v-slot:pic="{scope}">
+ {{scope.value}}
+ </template>
+ </lineItem>
+ </view>
+
+
+ <view class="bottom">
+ <view class="btn">
+ <u-button @click="submit" type="primary" text="提交"></u-button>
+ </view>
+ </view>
+
+
+
+ <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"
+ :columns="pickColumns" @change="changeHandler" @confirm="confirmPicker"
+ @cancel="showPicker = false"></u-picker>
+
+
+ </view>
+</template>
+
+<script>
+ import uploadMixin from "@/mixin/uploadMixin";
+ import lineItem from "@/subPackage/workbench/components/lineItem.vue"
+ import {
+ getLabelList
+ } from "@/api/label/categoryLabel.js";
+ import {
+ getDoorplateAddressDetail,
+ getDoorplateAddressList
+ } from "@/api/doorplateAddress/doorplateAddress";
+ import {
+ add
+ } from "@/api/place/place";
+ export default {
+ mixins: [uploadMixin],
+ components: {
+ lineItem
+ },
+ data() {
+ return {
+ isRequired: false,
+ isRequiredPlace: true,
+ isDisabled: true,
+ showPicker: false,
+ pickerLoading: false,
+ pickColumns: [],
+ defaultIndex: [0, 0, 0, 0, 0],
+
+ selectValue: [],
+
+ form: {
+ buildingCode: "",
+ label: "",
+ remark: "",
imageUrls: "",
- },
- rules: {
- 'buildingCode': {
- type: 'string',
- required: true,
- message: '请选择楼栋',
- trigger: ['blur', 'change']
- },
- 'placeName': {
- type: 'string',
- required: true,
- message: '请输入场所名称',
- trigger: ['blur', 'change']
- },
- 'label': {
- type: 'string',
- required: true,
- message: '请选择标签',
- trigger: ['blur', 'change'],
- },
- 'username': {
- type: 'string',
- required: true,
- message: '请输入场所负责人',
- trigger: ['blur', 'change'],
- },
- 'phone': {
- type: 'string',
- required: true,
- message: '请输入手机号',
- trigger: ['blur', 'change'],
- },
- },
-
- labelList: [{
- text: '全部标签',
- children: [],
- dot: false
- }, ],
-
- comprehensiveData: {
- basic: [{
- label: "社区名称",
- value: "暂无数据"
- },
- {
- label: "网格名称",
- value: "暂无数据"
- },
- {
- label: "网格员",
- value: "暂无数据"
- },
- {
- label: "联系电话",
- value: "暂无数据"
+ placeName: ""
+ },
+ rules: {
+ 'buildingCode': {
+ type: 'string',
+ required: true,
+ message: '请选择楼栋',
+ trigger: ['blur', 'change']
+ },
+ 'placeName': {
+ type: 'string',
+ required: true,
+ message: '请输入场所名称',
+ trigger: ['blur', 'change']
+ },
+ 'label': {
+ type: 'string',
+ required: true,
+ message: '请选择标签',
+ trigger: ['blur', 'change'],
+ },
+ 'username': {
+ type: 'string',
+ required: true,
+ message: '请输入场所负责人',
+ trigger: ['blur', 'change'],
+ },
+ 'phone': {
+ type: 'string',
+ required: true,
+ message: '请输入手机号',
+ trigger: ['blur', 'change'],
+ },
+ },
+
+ labelList: [{
+ text: '全部标签',
+ children: [],
+ dot: false
+ }, ],
+
+ comprehensiveData: {
+ basic: [{
+ label: "社区名称",
+ name: 'neiName',
+ value: "暂无数据"
+ },
+ {
+ label: "网格名称",
+ value: "暂无数据"
+ },
+ {
+ label: "网格员",
+ value: "暂无数据"
+ },
+ {
+ label: "联系电话",
+ value: "暂无数据"
+ }
+ ],
+ scene: [{
+ label: "场所照片",
+ name: 'imageUrls',
+ value: "",
+ useSlot: "pic",
+ },
+ {
+ label: "场所负责人",
+ name: 'username',
+ value: "未完善",
+ },
+ {
+ label: "采集人",
+ name: 'createUser',
+ value: "未完善"
+ },
+ {
+ label: "采集时间",
+ name: 'createTime',
+ value: "未完善"
+ },
+ {
+ label: "历史事件",
+ value: "未完善",
+ }
+ ],
+ },
+ publicData: {
+ basic: [{
+ label: "公安局",
+ name: 'branchName',
+ value: "暂无数据"
+ },
+ {
+ label: "派出所",
+ name: 'localPoliceStationName',
+ value: "暂无数据"
+ },
+ {
+ label: "辖区民警",
+ name: 'policeman',
+ value: "暂无数据"
+ },
+ {
+ label: "联系电话",
+ name: 'policemanPhone',
+ value: "暂无数据"
+ }
+ ],
+ scene: [{
+ label: "消防照片",
+ value: "",
+ useSlot: "pic",
+ },
+ {
+ label: "采集人",
+ value: "未完善"
+ },
+ {
+ label: "采集时间",
+ value: "未完善"
+ },
+ {
+ label: "消防负责人",
+ value: "未完善",
+ },
+ {
+ label: "采集人",
+ value: "未完善"
+ },
+ {
+ label: "采集时间",
+ value: "未完善",
+ },
+ {
+ label: "历史事件",
+ value: "未完善",
+ }
+ ],
+ },
+
+ activeIds: [],
+ showLabelList: [],
+
+ stdId: "",
+ }
+ },
+ watch: {
+ activeIds: {
+ handler(newVal) {
+ this.form.label = newVal.join(",")
+ }
+ },
+ "form.buildingCode": {
+ handler(newVal) {
+ console.log(newVal)
+ }
+ }
+
+ },
+
+ created() {
+ this.buildColumn()
+ },
+ mounted() {
+
+ },
+ options: {
+ styleIsolation: 'shared', // 解除样式隔离
+ },
+ onLoad(option) {
+ this.stdId = option.stdId
+ console.log(this.stdId, "----------")
+ if (this.stdId) {
+ this.getBuildingDetail()
+ }
+
+
+ },
+ onShow() {
+ this.getLabel()
+ this.getLocation()
+ },
+ methods: {
+
+ getBuildingDetail(params = {}) {
+ getDoorplateAddressDetail(Object.assign(params, {
+ stdId: this.stdId
+ })).then(res => {
+ let data = res.data
+ this.form.buildingCode = data.buildingCode
+
+ let buildingNameArr = [data.townStreetName, data.neiName, data.streetRuName, data.aoiName,
+ data.buildingName
+ ]
+ let arr = buildingNameArr.filter(e => {
+ return e != null || e != ''
+ })
+
+ // 赋值
+ // this.form.placeName = data['placeName']
+ Object.keys(this.form).forEach(key => {
+ if (!data[key]) {
+ this.form[key] = data.place[key]
+ } else {
+ this.form[key] = data[key]
}
- ],
- scene: [{
- label: "场所照片",
- value: "",
- useSlot: "pic",
- },
- {
- label: "采集人",
- value: "未完善"
- },
- {
- label: "采集时间",
- value: "未完善"
- },
- {
- label: "场所负责人",
- value: "未完善",
- },
- {
- label: "采集人",
- value: "未完善"
- },
- {
- label: "采集时间",
- value: "未完善",
- },
- {
- label: "历史事件",
- value: "未完善",
- }
- ],
- },
- publicData: {
- basic: [{
- label: "公安局",
- value: "暂无数据"
- },
- {
- label: "派出所",
- value: "暂无数据"
- },
- {
- label: "辖区民警",
- value: "暂无数据"
- },
- {
- label: "联系电话",
- value: "暂无数据"
- }
- ],
- scene: [{
- label: "消防照片",
- value: "",
- useSlot: "pic",
- },
- {
- label: "采集人",
- value: "未完善"
- },
- {
- label: "采集时间",
- value: "未完善"
- },
- {
- label: "消防负责人",
- value: "未完善",
- },
- {
- label: "采集人",
- value: "未完善"
- },
- {
- label: "采集时间",
- value: "未完善",
- },
- {
- label: "历史事件",
- value: "未完善",
- }
- ],
- },
-
- activeIds: [],
- showLabelList: [],
-
- stdId: "",
- }
- },
- watch: {
- activeIds: {
- handler(newVal) {
- this.form.label = newVal.join(",")
- }
- },
- "form.buildingCode": {
- handler(newVal) {
- console.log(newVal)
- }
- }
-
- },
-
- created() {
- this.buildColumn()
- },
- mounted() {
-
- },
- options: {
- styleIsolation: 'shared', // 解除样式隔离
- },
- onLoad(option) {
- this.stdId = option.stdId
- console.log(this.stdId, "----------")
- if (this.stdId) {
- this.getBuildingDetail()
- }
-
-
- },
- onShow() {
- this.getLabel()
- this.getLocation()
- },
- methods: {
-
- getBuildingDetail(params = {}) {
- getDoorplateAddressDetail(Object.assign(params, {
- stdId: this.stdId
- })).then(res => {
- let data = res.data
- this.form.buildingCode = data.buildingCode
-
- let buildingNameArr = [data.townStreetName, data.neiName, data.streetRuName, data.aoiName,
- data.buildingName
- ]
- let arr = buildingNameArr.filter(e => {
- return e != null || e != ''
})
+
this.form.building = arr.join("")
- })
- },
-
- //表单提交
- submit() {
- const that = this
- this.$refs.form.validate().then(valid => {
- if (valid) {
- if (this.form.images.length > 0) {
- let urls = []
- this.form.images.forEach(e => {
- urls.push(e.name)
- })
- this.form.imageUrls = urls.join(",")
- }
- add(this.form).then(res => {
- uni.showToast({
- icon: 'success',
- title: '提交成功',
- success() {
- setTimeout(() => {
- that.$u.func.globalNavigator(
- "/pages/home/index", "switchTab")
- }, 1000)
- }
- })
+
+ Object.keys(this.comprehensiveData).forEach(key => {
+ this.comprehensiveData[key].forEach(item => {
+ if (!data[item.name]) {
+ item.value = data.place[item.name] || '未完善'
+ } else {
+ item.value = data[item.name] || '未完善'
+ }
})
- }
+ this.publicData[key].forEach(item => {
+ if (!data[item.name]) {
+ item.value = data.place[item.name] || '未完善'
+ } else {
+ item.value = data[item.name] || '未完善'
+ }
+ })
+ })
+ })
+ },
+
+ //表单提交
+ submit() {
+ const that = this
+ this.$refs.form.validate().then(valid => {
+ if (valid) {
+ if (this.form.images.length > 0) {
+ let urls = []
+ this.form.images.forEach(e => {
+ urls.push(e.name)
+ })
+ this.form.imageUrls = urls.join(",")
+ }
+ add(this.form).then(res => {
+ uni.showToast({
+ icon: 'success',
+ title: '提交成功',
+ success() {
+ setTimeout(() => {
+ that.$u.func.globalNavigator(
+ "/pages/home/index", "switchTab")
+ }, 1000)
+ }
+ })
+ })
+ }
+ })
+
+ },
+
+ async buildColumn() {
+
+ //设置街道
+ const townStreet = await this.getDoorplateAddressList(null, "townStreet")
+ this.setColumn(townStreet, 0)
+ //设置社区
+ const nei = await this.getDoorplateAddressList(townStreet[0].code, "nei")
+ this.setColumn(nei, 1)
+ //设置路
+ const streetRu = await this.getDoorplateAddressList(nei[0].code, "streetRu")
+ this.setColumn(streetRu, 2)
+ //设置地区
+ const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
+ this.setColumn(district, 3)
+ //设置楼栋
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
+ this.setColumn(building, 4)
+ },
+
+ setColumn(data, index) {
+ this.$set(this.pickColumns, index, data)
+ },
+
+ getLocation() {
+ const that = this
+ uni.getLocation({
+ type: 'wgs84', // 坐标系类型
+ success: function(res) {
+ var latitude = res.latitude; // 维度
+ var longitude = res.longitude; // 经度
+
+ that.form.lng = longitude
+ that.form.lat = latitude
+
+ that.form.jwd = longitude + "," + latitude
+ },
+ fail: function(res) {
+ console.log('获取定位失败:' + res.errMsg);
+ }
+ });
+ },
+
+ async getDoorplateAddressList(code, type) {
+ const res = await getDoorplateAddressList(code, type)
+ return res.data
+ },
+
+ confirmPicker(e) {
+
+ if (e.value[4]) {
+ this.selectValue = e.value
+
+ let arr = this.selectValue.map(e => e.name)
+ this.form.building = arr.join("")
+
+ this.form.buildingCode = e.value[4].code
+ }
+ this.showPicker = false
+ },
+
+ async changeHandler(e) {
+ const {
+ columnIndex,
+ index,
+ // 微信小程序无法将picker实例传出来,只能通过ref操作
+ picker = this.$refs.uPicker
+ } = e
+ let item = e.values[columnIndex][index]
+ //街道
+ if (columnIndex === 0) {
+ //获取社区列表
+ const nei = await this.getDoorplateAddressList(item.code, "nei")
+ picker.setColumnValues(1, nei)
+
+ const streetRu = await this.getDoorplateAddressList(nei[0].code, "streetRu")
+ picker.setColumnValues(2, streetRu)
+
+ const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
+ picker.setColumnValues(3, district)
+
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
+ picker.setColumnValues(4, building)
+ }
+
+ if (columnIndex === 1) {
+ const streetRu = await this.getDoorplateAddressList(item.code, "streetRu")
+ picker.setColumnValues(2, streetRu)
+
+ const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
+ picker.setColumnValues(3, district)
+
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
+ picker.setColumnValues(4, building)
+ }
+
+ if (columnIndex === 2) {
+
+ const district = await this.getDoorplateAddressList(item.code, "district")
+ picker.setColumnValues(3, district)
+
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
+ picker.setColumnValues(4, building)
+ }
+
+ if (columnIndex === 3) {
+ const building = await this.getDoorplateAddressList(item.code, "building")
+ picker.setColumnValues(4, building)
+ }
+
+ },
+
+ //弹出层打开
+ popup() {
+ this.$refs.uniPopup.open()
+ },
+
+ 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) {
+
+ //判断label是否已在
+ const label = this.showLabelList.find(e => e.id == item.id)
+ if (label) {
+ //在,去掉
+ this.showLabelList = this.showLabelList.filter(e => e.id != label.id)
+ this.activeIds = this.activeIds.filter(e => e != label.id)
+ } else {
+ //不在,添加
+ item.isClose = false
+ this.showLabelList.push(item)
+ this.activeIds.push(item.id)
+ }
+
+ this.showLabelList.sort((a, b) => a.sort - b.sort)
+
+ },
+ delTag(label) {
+ label.isClose = true
+ this.showLabelList = this.showLabelList.filter(e => e.id != label.id)
+ this.activeIds = this.activeIds.filter(e => e != label.id)
+
+ },
+ imgPreview(value) {
+ uni.previewImage({
+ urls: [value],
})
-
- },
-
- async buildColumn() {
-
- //设置街道
- const townStreet = await this.getDoorplateAddressList(null, "townStreet")
- this.setColumn(townStreet, 0)
- //设置社区
- const nei = await this.getDoorplateAddressList(townStreet[0].code, "nei")
- this.setColumn(nei, 1)
- //设置路
- const streetRu = await this.getDoorplateAddressList(nei[0].code, "streetRu")
- this.setColumn(streetRu, 2)
- //设置地区
- const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
- this.setColumn(district, 3)
- //设置楼栋
- const building = await this.getDoorplateAddressList(district[0].code, "building")
- this.setColumn(building, 4)
- },
-
- setColumn(data, index) {
- this.$set(this.pickColumns, index, data)
- },
-
- getLocation() {
- const that = this
- uni.getLocation({
- type: 'wgs84', // 坐标系类型
- success: function(res) {
- var latitude = res.latitude; // 维度
- var longitude = res.longitude; // 经度
-
- that.form.lng = longitude
- that.form.lat = latitude
-
- that.form.jwd = longitude + "," + latitude
- },
- fail: function(res) {
- console.log('获取定位失败:' + res.errMsg);
- }
- });
- },
-
- async getDoorplateAddressList(code, type) {
- const res = await getDoorplateAddressList(code, type)
- return res.data
- },
-
- confirmPicker(e) {
-
- if (e.value[4]) {
- this.selectValue = e.value
-
- let arr = this.selectValue.map(e => e.name)
- this.form.building = arr.join("")
-
- this.form.buildingCode = e.value[4].code
- }
- this.showPicker = false
- },
-
- async changeHandler(e) {
- const {
- columnIndex,
- index,
- // 微信小程序无法将picker实例传出来,只能通过ref操作
- picker = this.$refs.uPicker
- } = e
- let item = e.values[columnIndex][index]
- //街道
- if (columnIndex === 0) {
- //获取社区列表
- const nei = await this.getDoorplateAddressList(item.code, "nei")
- picker.setColumnValues(1, nei)
-
- const streetRu = await this.getDoorplateAddressList(nei[0].code, "streetRu")
- picker.setColumnValues(2, streetRu)
-
- const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
- picker.setColumnValues(3, district)
-
- const building = await this.getDoorplateAddressList(district[0].code, "building")
- picker.setColumnValues(4, building)
- }
-
- if (columnIndex === 1) {
- const streetRu = await this.getDoorplateAddressList(item.code, "streetRu")
- picker.setColumnValues(2, streetRu)
-
- const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
- picker.setColumnValues(3, district)
-
- const building = await this.getDoorplateAddressList(district[0].code, "building")
- picker.setColumnValues(4, building)
- }
-
- if (columnIndex === 2) {
-
- const district = await this.getDoorplateAddressList(item.code, "district")
- picker.setColumnValues(3, district)
-
- const building = await this.getDoorplateAddressList(district[0].code, "building")
- picker.setColumnValues(4, building)
- }
-
- if (columnIndex === 3) {
- const building = await this.getDoorplateAddressList(item.code, "building")
- picker.setColumnValues(4, building)
- }
-
- },
-
- //弹出层打开
- popup() {
- this.$refs.uniPopup.open()
- },
-
- 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) {
-
- //判断label是否已在
- const label = this.showLabelList.find(e => e.id == item.id)
- if (label) {
- //在,去掉
- this.showLabelList = this.showLabelList.filter(e => e.id != label.id)
- this.activeIds = this.activeIds.filter(e => e != label.id)
- } else {
- //不在,添加
- item.isClose = false
- this.showLabelList.push(item)
- this.activeIds.push(item.id)
- }
-
- this.showLabelList.sort((a, b) => a.sort - b.sort)
-
- },
- delTag(label) {
- label.isClose = true
- this.showLabelList = this.showLabelList.filter(e => e.id != label.id)
- this.activeIds = this.activeIds.filter(e => e != label.id)
-
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
- position: relative;
- width: 100%;
- // height: 100%;
- display: flex;
- flex-direction: column;
- background: #F9F9FA;
-
- .box-title {
- padding: 10px 0;
-
- .title-more {
- display: flex;
- align-items: center;
- height: 100%;
-
- .item {
- width: 50rpx;
- height: 40rpx;
- color: #ffffff;
- padding: 6rpx;
- font-size: 2rpx;
- text-align: center;
- line-height: 20px;
- }
-
- }
- }
-
- .item {
-
- .form-item {
- background-color: #ffffff;
- padding: 2rpx 10px;
- border-bottom: 0.1px solid #eff1f3;
- }
-
- .label {
- padding: 10rpx 30rpx;
- display: flex;
- background-color: #ffffff;
- flex-wrap: wrap;
-
- .activeLabel {
- // width: 80rpx;
- margin-left: 10rpx;
- margin-top: 10rpx
- }
- }
-
-
-
- }
-
- .pic {
- background-color: #ffffff;
- padding: 40rpx 30rpx;
- }
-
- .bottom {
+ },
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+ .container {
+ position: relative;
+ width: 100%;
+ // height: 100%;
+ display: flex;
+ flex-direction: column;
+ background: #F9F9FA;
+
+ .box-title {
+ padding: 10px 0;
+
+ .title-more {
+ display: flex;
+ align-items: center;
+ height: 100%;
+
+ .item {
+ width: 50rpx;
+ height: 40rpx;
+ color: #ffffff;
+ padding: 6rpx;
+ font-size: 2rpx;
+ text-align: center;
+ line-height: 20px;
+ }
+
+ }
+ }
+
+ .item {
+
+ .form-item {
+ background-color: #ffffff;
+ padding: 2rpx 10px;
+ border-bottom: 0.1px solid #eff1f3;
+ }
+
+ .label {
+ padding: 10rpx 30rpx;
+ display: flex;
+ background-color: #ffffff;
+ flex-wrap: wrap;
+
+ .activeLabel {
+ // width: 80rpx;
+ margin-left: 10rpx;
+ margin-top: 10rpx
+ }
+ }
+
+
+
+ }
+
+ .pic {
+ background-color: #ffffff;
+ padding: 40rpx 30rpx;
+ }
+
+ .image {
padding: 20rpx;
- background-color: #ffffff;
- display: flex;
- justify-content: center;
- align-items: center;
-
- .btn {
- width: calc(100% - 40rpx);
- }
}
- }
-
- /deep/ .u-form-item {
- background-color: #ffffff;
- padding: 2rpx 10px;
- border-bottom: 1px solid #eff1f3;
- }
-
- .red {
- background-color: red;
- border-radius: 10rpx 0rpx 0rpx 10rpx;
- }
-
- .orange {
- background-color: orange;
- }
-
- .green {
- background-color: green;
- border-radius: 0rpx 10rpx 10rpx 0rpx;
- }
-</style>
+
+ .bottom {
+ padding: 20rpx;
+ background-color: #ffffff;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .btn {
+ width: calc(100% - 40rpx);
+ }
+ }
+ }
+
+ /deep/ .u-form-item {
+ background-color: #ffffff;
+ padding: 2rpx 10px;
+ border-bottom: 1px solid #eff1f3;
+ }
+
+ .red {
+ background-color: red;
+ border-radius: 10rpx 0rpx 0rpx 10rpx;
+ }
+
+ .orange {
+ background-color: orange;
+ }
+
+ .green {
+ background-color: green;
+ border-radius: 0rpx 10rpx 10rpx 0rpx;
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/cshw.vue b/subPackage/workbench/views/cshw.vue
new file mode 100644
index 0000000..67f5b2a
--- /dev/null
+++ b/subPackage/workbench/views/cshw.vue
@@ -0,0 +1,168 @@
+<template>
+ <view>
+ <u-sticky>
+ <view class="tab">
+ <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"></u-search>
+ </view>
+ </view>
+ </view>
+ </u-sticky>
+ <view class="list">
+ <view class="list-item bgc-ff mb-20" v-for="item in siteList" :key="item.id" @click="pushPage(item.id)">
+ <view class="item-title flex a-i-c j-c-s-b mb-20">
+ <text class="f-32 fw">{{ item.placeName ? item.placeName : '场所信息未完善' }}</text>
+ <!-- <u-tag text="待审批" type="warning" plain plainFill></u-tag> -->
+ <u-tag class="u_tag" size="mini" :text="findObjValue(item.confirmFlag, tabList).name" :type="findObjValue(item.confirmFlag, tabList).type" plain plainFill></u-tag>
+ <!-- <u-tag text="审核拒绝" type="error" plain plainFill></u-tag> -->
+ </view>
+ <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">地址</text>
+ <text class="address f-28 c-66">{{ item.localtion }}</text>
+ </view>
+ <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">法人信息</text>
+ <text class="f-28 c-66">{{ item.legalPerson }}</text>
+ </view>
+ </view>
+ </view>
+ <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
+ </view>
+</template>
+
+<script>
+ import {
+ getSiteMaintenanceData
+ } from '@/api/placeExp/placeExp.js'
+ export default {
+ data() {
+ return {
+ siteList: [],
+ pagingParams: {
+ current: 1,
+ size: 10
+ },
+ tabList: [{
+ name: "待审核",
+ status: 1,
+ type: 'warning'
+ },
+ {
+ name: "审核通过",
+ status: 2,
+ type: 'success'
+ },
+ {
+ name: "审核不通过",
+ status: 3,
+ type: 'error'
+ },
+ ],
+ tabIndex: 0,
+ tabStatus: 1,
+ keyWord: '',
+ loadingStatus: 'nomore'
+ }
+ },
+ onShow() {
+ this.siteList = []
+ this.getSiteList()
+ },
+ onReachBottom() {
+ this.pagingParams.current++
+ this.getSiteList()
+ },
+ methods: {
+ async getSiteList() {
+ this.loadingStatus = 'loadingmore'
+ const params = {
+ placeName: this.keyWord,
+ confirmFlag: this.tabStatus
+ }
+ const res = await getSiteMaintenanceData({
+ ...params,
+ ...this.pagingParams
+ })
+ const {
+ code,
+ data: {
+ records
+ }
+ } = res
+ if (code !== 200) {
+ uni.showToast({
+ title: '数据请求失败'
+ })
+ return
+ }
+ this.siteList = [...this.siteList, ...records]
+ this.loadingStatus = 'nomore'
+ },
+ changeTab(e) {
+ this.tabStatus = e.status;
+ this.resetParams()
+ this.getSiteList()
+ },
+ searchConfirm() {
+ this.resetParams()
+ this.getSiteList()
+ },
+ clearConfirm() {
+ this.keyWord = ''
+ },
+ resetParams() {
+ this.siteList = []
+ this.pagingParams.current = 1
+ },
+ findObjValue(value, obj) {
+ const res = obj.find(item => {
+ return item.status == value
+ })
+ return res
+ },
+ pushPage(id) {
+ this.$u.func.globalNavigator('/subPackage/workbench/views/examine?id='+id)
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #F5F5F5;
+ }
+
+ .tab {
+ background-color: #fff;
+
+ .search {
+ padding: 20rpx 70rpx;
+ }
+ }
+
+ .list {
+ margin: 20rpx 30rpx 0;
+ }
+
+ .list-item {
+ padding: 0 30rpx 20rpx;
+ border-radius: 8rpx;
+
+ .item-title {
+ padding: 30rpx 0;
+ border-bottom: 1px solid #F5F5F5;
+ }
+
+ .item-row {
+ padding: 10rpx 0;
+
+ .address {
+ width: 65%;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/csjl.vue b/subPackage/workbench/views/csjl.vue
index 1c8fc91..8f9455b 100644
--- a/subPackage/workbench/views/csjl.vue
+++ b/subPackage/workbench/views/csjl.vue
@@ -1,14 +1,16 @@
<template>
<view class="container">
- <view class="tabsAndSearch">
- <view class="tabs">
- <u-tabs :list="tabsList" @click="tabClick" :scrollable="false"></u-tabs>
+ <u-sticky>
+ <view class="tabsAndSearch">
+ <view class="tabs">
+ <u-tabs :list="tabsList" @click="tabClick" :scrollable="false"></u-tabs>
+ </view>
+ <view class="search">
+ <u-search placeholder="请输入场所名称" v-model="iptContext" :clearabled="true" :showAction="true"
+ :animation="true" @search="searchConfirm" @clear="clearConfirm"></u-search>
+ </view>
</view>
- <view class="search">
- <u-search placeholder="请输入场所名称" v-model="iptContext" :clearabled="true" :showAction="true" :animation="true"
- @search="searchConfirm" @clear="clearConfirm"></u-search>
- </view>
- </view>
+ </u-sticky>
<view class="info-box">
<view class="records-card" v-for="(records, index) in recordsData" :key="records.id"
@click="pushPage(records)">
@@ -28,7 +30,7 @@
</view>
</view>
</view>
- <u-loadmore :status="status" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="数据加载完成" line />
+ <u-loadmore :status="status" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
</view>
</template>
@@ -62,7 +64,8 @@
status: 'nomore'
}
},
- onShow() {
+ onShow() {
+ this.recordsData = []
this.getrRecordList()
},
onReachBottom() {
@@ -110,10 +113,10 @@
size: 10
}
this.getrRecordList(this.iptContext, this.tabsType)
- },
- clearConfirm() {
- this.iptContext = ''
- this.searchConfirm()
+ },
+ clearConfirm() {
+ this.iptContext = ''
+ this.searchConfirm()
},
pushPage({
houseCode
@@ -133,68 +136,66 @@
</script>
<style lang="scss" scoped>
- .container {
- min-height: 100%;
- overflow-y: auto;
+ page {
background-color: #f6f6f6;
+ }
- .tabsAndSearch {
+ .tabsAndSearch {
+ background-color: #fff;
+
+ .tabs {}
+
+ .search {
+ padding: 20rpx 70rpx;
+
+ .search-ipt {
+ border: 0;
+ border-radius: 9999rpx;
+ background-color: #f6f6f6;
+ }
+ }
+
+ }
+
+ .info-box {
+ .records-card {
+ margin: 20rpx 30rpx 0 30rpx;
background-color: #fff;
+ padding: 30rpx;
+ border-radius: 10rpx;
- .tabs {}
+ .title {
+ line-height: 70rpx;
+ display: flex;
+ font-size: 35rpx;
+ display: flex;
+ justify-content: space-between;
+ border-bottom: 1rpx solid #f6f6f6;
- .search {
- padding: 20rpx 70rpx;
+ text {
+ &:nth-child(1) {
+ font-weight: 700;
+ }
- .search-ipt {
- border: 0;
- border-radius: 9999rpx;
- background-color: #f6f6f6;
+ &:nth-child(2) {
+ font-size: 27rpx;
+ color: #999999;
+ }
}
}
- }
+ .charge-man,
+ .phone {
+ display: flex;
+ justify-content: space-between;
+ font-weight: 30rpx;
+ color: #717171;
+ margin-top: 25rpx;
+ font-size: 30rpx;
+ }
- .info-box {
- .records-card {
- margin: 20rpx 30rpx 0 30rpx;
- background-color: #fff;
- padding: 30rpx;
- border-radius: 10rpx;
-
- .title {
- line-height: 70rpx;
- display: flex;
- font-size: 35rpx;
- display: flex;
- justify-content: space-between;
- border-bottom: 1rpx solid #f6f6f6;
-
- text {
- &:nth-child(1) {
- font-weight: 700;
- }
-
- &:nth-child(2) {
- font-size: 27rpx;
- color: #999999;
- }
- }
- }
-
- .charge-man,
- .phone {
- display: flex;
- justify-content: space-between;
- font-weight: 30rpx;
- color: #717171;
- margin-top: 25rpx;
- font-size: 30rpx;
- }
-
- &:last-child {
- margin-bottom: 20rpx;
- }
+ &:last-child {
+ margin-bottom: 20rpx;
}
}
}
diff --git a/subPackage/workbench/views/examine.vue b/subPackage/workbench/views/examine.vue
new file mode 100644
index 0000000..aacc524
--- /dev/null
+++ b/subPackage/workbench/views/examine.vue
@@ -0,0 +1,188 @@
+<template>
+ <view class="container">
+ <view class="basic">
+ <box-title title="基本信息" class="box-title"></box-title>
+ <view class="info">
+ <lineItem :dataInfo="basicData"></lineItem>
+ </view>
+ </view>
+ <view class="licence">
+ <box-title title="营业执照" class="box-title"></box-title>
+ <view class="info">
+ <view class="images-box"></view>
+ </view>
+ </view>
+ <view class="planegraph">
+ <box-title title="场所平面图" class="box-title"></box-title>
+ <view class="info">
+ <view class="images-box"></view>
+ </view>
+ </view>
+ <view class="personnel">
+ <box-title title="从业人员" class="box-title"></box-title>
+ <view class="info">
+ <view class="person-box" v-for="(item, index) in personnelData" :key="index">
+ <view class="title">人员信息-#{{ index + 1 }}</view>
+ <line-item :data-info="item"></line-item>
+ </view>
+ </view>
+ </view>
+ <view class="examine">
+ <box-title title="审核信息" class="box-title"></box-title>
+ <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="form.status" disabled disabledColor="#ffffff" placeholder="请选择审核状态"
+ border="none"></u-input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item label="备注" class="form-item">
+ <u-input v-model="form.remark" border="none"></u-input>
+ </u-form-item>
+ </u-form>
+ </view>
+ </view>
+ <view class="bottom-btn">
+ <u-button type="primary" @click="submit">提交审核</u-button>
+ </view>
+ <u-picker :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker"
+ :columns="columns" keyName="name" @cancel="isPickerShow = false" @confirm="handleConfirm"></u-picker>
+ </view>
+</template>
+
+<script>
+ import boxTitle from '@/components/boxTitle/index.vue'
+ import lineItem from '../components/lineItem.vue'
+ export default {
+ components: {
+ boxTitle,
+ lineItem
+ },
+ data() {
+ return {
+ basicData: [{
+ label: '场所名称',
+ value: '未完善'
+ },
+ {
+ label: '法人信息',
+ value: '未完善'
+ },
+ {
+ label: '法人电话',
+ value: '未完善'
+ },
+ {
+ label: '场所位置',
+ value: '未完善'
+ },
+ ],
+ personnelData: [
+ [{
+ label: '姓名',
+ value: '未完善',
+ },
+ {
+ label: '电话号码',
+ value: '未完善',
+ },
+ {
+ label: '暂住地',
+ value: '未完善',
+ }
+ ],
+ [{
+ label: '姓名',
+ value: '未完善',
+ },
+ {
+ label: '电话号码',
+ value: '未完善',
+ },
+ {
+ label: '暂住地',
+ value: '未完善',
+ }
+ ]
+ ],
+ form: {
+ status: '未审批',
+ remark: ''
+ },
+ isPickerShow: false,
+ columns: [
+ [{
+ name: '通过',
+ type: 1
+ }, {
+ name: '不通过',
+ type: 2
+ }]
+ ]
+ }
+ },
+ methods: {
+ handleConfirm(e) {
+ this.form.status = e.value[0].name
+ this.isPickerShow = false
+ },
+ submit() {
+
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ page {
+ background-color: #f6f6f6;
+ }
+
+ .container {
+ padding-bottom: 130rpx;
+
+ .box-title {
+ margin-bottom: 15rpx;
+ }
+
+ .info {
+
+
+ .title {
+ font-size: 30rpx;
+ padding-left: 10rpx;
+ }
+
+ .images-box {
+ padding: 20rpx;
+ min-height: 100rpx;
+ background-color: #fff;
+ }
+ }
+
+ .form {
+ background-color: #fff;
+ .form-item {
+ padding: 0 20rpx;
+
+ &:first-child {
+ border: 1rpx solid #f6f6ff;
+ }
+ }
+ }
+
+ .bottom-btn {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ padding: 20rpx;
+ width: calc(100% - 40rpx);
+ background-color: #fff;
+ }
+ }
+
+ /deep/ .u-form-item__body__left__content__label,
+ /deep/ .uni-input-input {
+ font-size: 30rpx;
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/rental.vue b/subPackage/workbench/views/rental.vue
index ab46c52..6d31cdb 100644
--- a/subPackage/workbench/views/rental.vue
+++ b/subPackage/workbench/views/rental.vue
@@ -3,7 +3,7 @@
<view class="header bgc-ff">
<view class="filter-box">
<chenchuang-CCDropDownFilter :filterData='filterData' :defaultIndex='defaultIndex'
- @ed='handleSelect'></chenchuang-CCDropDownFilter>
+ @onSelected='handleSelect'></chenchuang-CCDropDownFilter>
</view>
<view class="search-box">
<u-search placeholder="请输入租户名" v-model="keyword" :clearabled="true" :showAction="true" :animation="true"
@@ -60,6 +60,7 @@
</view>
</view>
+ <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="已经到底了" line />
</view>
</template>
@@ -79,19 +80,27 @@
},
{
name: '待审核',
+ value: '0'
+ },
+ {
+ name: '审核通过',
value: '1'
},
{
- name: '未到期',
+ name: '审核不通过',
value: '2'
},
{
+ name: '未到期',
+ value: '10'
+ },
+ {
name: '即将到期',
- value: '3'
+ value: '20'
},
{
name: '已到期',
- value: '3'
+ value: '30'
}
],
[{
@@ -113,10 +122,15 @@
]
],
defaultIndex: [0, 0],
- keyword: "",
+ keyword: "",
statistics: [],
tenantList: [],
- status: [{
+ loadingStatus: 'nomore',
+ pagingParams: {
+ current: 1,
+ size: 10
+ },
+ tenantStatus: [{
name: '未到期',
value: 0
},
@@ -144,16 +158,34 @@
})
}
},
- // onLoad() {
- // this.getStatistics()
- // this.getList()
- // },
- // onShow() {
- // this.getRentalHouseInfo()
- // },
+ onLoad() {
+ this.getStatistics()
+ this.getList()
+ },
+ onShow() {
+ this.tenantList = []
+ this.getRentalHouseInfo()
+ },
+ onReachBottom() {
+ this.pagingParams.current++
+ this.getRentalHouseInfo()
+ },
methods: {
handleSelect(res) {
- console.log('选择res = ' + JSON.stringify(res));
+ const [auditStatus, floor] = res
+ console.log(auditStatus, floor);
+ this.pagingParams = {
+ current: 1,
+ size: 10
+ }
+ this.tenantList = []
+ let params = {}
+ if (auditStatus[0].value !== '') {
+ params = {
+ auditStatus: auditStatus[0].value
+ }
+ }
+ this.getRentalHouseInfo(params)
},
getStatistics() {
getStatistics().then(res => {
@@ -172,14 +204,17 @@
})
return res.name
},
- async getRentalHouseInfo() {
+ async getRentalHouseInfo(params = {}) {
+ this.loadingStatus = 'loadmore'
const {
code,
data: {
records
}
} = await getRentalHouseContent({
- tenantName: this.keyword
+ tenantName: this.keyword,
+ ...this.pagingParams,
+ ...params
})
if (code !== 200) {
uni.showToast({
@@ -188,7 +223,8 @@
})
return
}
- this.tenantList = records
+ this.tenantList = [...this.tenantList, ...records]
+ this.loadingStatus = 'nomore'
},
search() {
this.getRentalHouseInfo()
@@ -206,96 +242,97 @@
}
}
</script>
-<style lang="scss">
- page {
- background-color: #F5F5F5;
- }
-
- .header {
- width: 100%;
- position: fixed;
+
+<style lang="scss">
+ page {
+ background-color: #F5F5F5;
+ }
+
+ .header {
+ width: 100%;
+ position: fixed;
/*#ifdef H5*/
- top:88rpx;
+ top: 88rpx;
/*#endif*/
/*#ifdef MP-WEIXIN*/
- top:0;
- /*#endif*/
- left: 0;
- z-index: 10;
- }
-
- .filter-box {
- width: 100%;
+ top: 0;
+ /*#endif*/
+ left: 0;
+ z-index: 10;
+ }
+
+ .filter-box {
+ width: 100%;
height: 100rpx;
-
- }
-
- .search-box {
- padding: 20rpx 24rpx 30rpx;
- }
-
- .content {
- width: 100%;
- margin-top: 220rpx;
- padding: 0 30rpx;
- box-sizing: border-box;
-
- .row {
- width: 100%;
- padding: 20rpx 0;
- }
-
- .row-item {
- width: calc(100% / 3);
- height: 46rpx;
- border-radius: 30rpx;
- padding: 0 20rpx;
- box-sizing: border-box;
- }
-
- .dot {
- width: 10rpx;
- height: 10rpx;
- border-radius: 50%;
- margin-right: 18rpx;
- }
-
- .bgc-green {
- background-color: #30D17C;
- }
-
- .bgc-orange {
- background-color: #FFAC3D;
- }
-
- .list {
- width: 100%;
- padding: 30rpx 30rpx 0;
- box-sizing: border-box;
- margin-bottom: 20rpx;
-
- .list-address {
- padding: 30rpx 0;
- }
-
- .list-action {
- padding: 22rpx 0 30rpx;
- border-top: 1px solid #F5F5F5;
- }
-
- .action-item {
- display: flex;
- flex: 1;
- justify-content: center;
- }
-
- .action-item:first-child {
- border-right: 1px solid #DBDBDB;
- }
-
- .mr-50 {
- margin-right: 50rpx;
- }
- }
+
+ }
+
+ .search-box {
+ padding: 20rpx 24rpx 30rpx;
+ }
+
+ .content {
+ width: 100%;
+ margin-top: 220rpx;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+
+ .row {
+ width: 100%;
+ padding: 20rpx 0;
+ }
+
+ .row-item {
+ width: calc(100% / 3);
+ height: 46rpx;
+ border-radius: 30rpx;
+ padding: 0 20rpx;
+ box-sizing: border-box;
+ }
+
+ .dot {
+ width: 10rpx;
+ height: 10rpx;
+ border-radius: 50%;
+ margin-right: 18rpx;
+ }
+
+ .bgc-green {
+ background-color: #30D17C;
+ }
+
+ .bgc-orange {
+ background-color: #FFAC3D;
+ }
+
+ .list {
+ width: 100%;
+ padding: 30rpx 30rpx 0;
+ box-sizing: border-box;
+ margin-bottom: 20rpx;
+
+ .list-address {
+ padding: 30rpx 0;
+ }
+
+ .list-action {
+ padding: 22rpx 0 30rpx;
+ border-top: 1px solid #F5F5F5;
+ }
+
+ .action-item {
+ display: flex;
+ flex: 1;
+ justify-content: center;
+ }
+
+ .action-item:first-child {
+ border-right: 1px solid #DBDBDB;
+ }
+
+ .mr-50 {
+ margin-right: 50rpx;
+ }
+ }
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3