From 551cba02c861b7f013322cd045ee899a7fa4ce03 Mon Sep 17 00:00:00 2001
From: GULIMMO <2820890765@qq.com>
Date: Fri, 10 Nov 2023 16:04:05 +0800
Subject: [PATCH] 场所维护页面更新
---
static/icon/store.png | 0
subPackage/workbench/views/rental.vue | 52 ++++---
pages/home/index.vue | 4
api/place/place.js | 8 +
pages.json | 2
subPackage/workbench/views/examine.vue | 16 +
static/icon/way.png | 0
subPackage/house/houseNumber/index.vue | 93 ++++++------
subPackage/workbench/views/cscj.vue | 197 ++++++++++++++++++++--------
subPackage/workbench/views/csjl.vue | 8
static/icon/blue_floor.png | 0
subPackage/house/list/index.vue | 26 ++-
12 files changed, 259 insertions(+), 147 deletions(-)
diff --git a/api/place/place.js b/api/place/place.js
index a19803b..8e4228e 100644
--- a/api/place/place.js
+++ b/api/place/place.js
@@ -14,4 +14,12 @@
method: 'GET',
params
})
+}
+
+export const getPlaceDetail = (params) => {
+ return http.request({
+ url: '/blade-place/place/getDetail',
+ method: 'GET',
+ params
+ })
}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 958224e..bdcc155 100644
--- a/pages.json
+++ b/pages.json
@@ -255,7 +255,7 @@
{
"path": "views/reportAudit",
"style": {
- "navigationBarTitleText": "审核",
+ "navigationBarTitleText": "报事报修处理",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 2e7b009..a474c3b 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -575,8 +575,8 @@
let obj = that.getUrlParams(res.result)
console.log(obj)
- let url = "/subPackage/workbench/views/cscj?stdId=" + obj.stdId
- console.log(url)
+ // let url = "/subPackage/workbench/views/cscj?stdId=" + obj.stdId
+ let url = "/subPackage/workbench/views/cscj?houseCode=" + obj.stdId
that.$u.func.globalNavigator(url, "navTo")
diff --git a/static/icon/blue_floor.png b/static/icon/blue_floor.png
new file mode 100755
index 0000000..597b125
--- /dev/null
+++ b/static/icon/blue_floor.png
Binary files differ
diff --git a/static/icon/store.png b/static/icon/store.png
new file mode 100755
index 0000000..71d6f42
--- /dev/null
+++ b/static/icon/store.png
Binary files differ
diff --git a/static/icon/way.png b/static/icon/way.png
new file mode 100755
index 0000000..8dfc254
--- /dev/null
+++ b/static/icon/way.png
Binary files differ
diff --git a/subPackage/house/houseNumber/index.vue b/subPackage/house/houseNumber/index.vue
index 6dc1658..6fff03f 100644
--- a/subPackage/house/houseNumber/index.vue
+++ b/subPackage/house/houseNumber/index.vue
@@ -2,9 +2,9 @@
<view class="container">
<view class="info-box">
<box-title title="门牌号信息"></box-title>
- <line-item :list="houseNumberData"></line-item>
- <view class="map">
- <map style="width: 100%; height: 100%;"></map>
+ <line-item :list="houseNumberData"></line-item>
+ <view class="map">
+ <map style="width: 100%; height: 100%;"></map>
</view>
<view class="box-title">
<box-title title="综治网格">
@@ -18,12 +18,12 @@
</box-title>
</view>
<line-item :list="gridData"></line-item>
- <line-item :list="collectData">
- <template #other="{ sdate }">
- <view style="padding: 20rpx 0;" v-if="sdate.name === 'imageUrls' && sdate.value !== '未完善' ">
- <u--image :src="sdate.value" width="80px" height="80px" @click="imgPreview(sdate.value)"></u--image>
- </view>
- </template>
+ <line-item :list="collectData">
+ <template #other="{ sdate }">
+ <view style="padding: 20rpx 0;" v-if="sdate.name === 'imageUrls' && sdate.value !== '未完善' ">
+ <u--image :src="sdate.value" width="80px" height="80px" @click="imgPreview(sdate.value)"></u--image>
+ </view>
+ </template>
</line-item>
<view class="box-title">
<box-title title="公安网格">
@@ -95,44 +95,44 @@
}
],
gridData: [{
- title: '社区名称',
+ title: '社区名称',
name: 'neiName',
value: '未完善'
},
{
- title: '网格名称',
+ title: '网格名称',
name: '',
value: '未完善'
},
{
- title: '网格员',
+ title: '网格员',
name: '',
value: '未完善'
},
{
- title: '联系电话',
+ title: '联系电话',
name: '',
value: '未完善'
}
],
collectData: [{
- title: '场所照片',
- name: 'imageUrls',
+ title: '场所照片',
+ name: 'imageUrls',
isUseSlot: true,
value: '未完善'
},
{
- title: '场所负责人',
+ title: '场所负责人',
name: 'username',
value: '未完善'
},
{
- title: '采集人',
+ title: '采集人',
name: 'createUser',
value: '未完善'
},
{
- title: '采集时间',
+ title: '采集时间',
name: 'createTime',
value: '未完善'
},
@@ -211,23 +211,23 @@
} else {
item.value = data[item.name] || '未完善'
}
- })
-
- this.gridData.forEach(item => {
- if (!data[item.name]) {
- item.value = data.place[item.name] || '未完善'
- } else {
- item.value = data[item.name] || '未完善'
- }
- })
-
- this.collectData.forEach(item => {
- if (!data[item.name]) {
- item.value = data.place[item.name] || '未完善'
- } else {
- item.value = data[item.name] || '未完善'
- }
- })
+ })
+
+ this.gridData.forEach(item => {
+ if (!data[item.name]) {
+ item.value = data.place[item.name] || '未完善'
+ } else {
+ item.value = data[item.name] || '未完善'
+ }
+ })
+
+ this.collectData.forEach(item => {
+ if (!data[item.name]) {
+ item.value = data.place[item.name] || '未完善'
+ } else {
+ item.value = data[item.name] || '未完善'
+ }
+ })
@@ -235,13 +235,14 @@
item.value = data[item.name] || '未完善'
})
},
- imgPreview(value) {
- uni.previewImage({
- urls: [value],
- })
- },
+ imgPreview(value) {
+ uni.previewImage({
+ urls: [value],
+ })
+ },
cscjClick() {
- this.$u.func.globalNavigator('/subPackage/workbench/views/cscj?stdId=' + this.stdId)
+ // this.$u.func.globalNavigator('/subPackage/workbench/views/cscj?stdId=' + this.stdId)
+ this.$u.func.globalNavigator('/subPackage/workbench/views/cscj?houseCode=' + this.stdId)
},
csjlClick() {
this.$u.func.globalNavigator('/subPackage/workbench/views/csjl?stdId=' + this.stdId)
@@ -258,10 +259,10 @@
height: calc(100% - 110rpx);
padding-bottom: 20rpx;
overflow: auto;
- .map {
- width: 100%;
- height: 240rpx;
- background-color: #fff;
+ .map {
+ width: 100%;
+ height: 240rpx;
+ background-color: #fff;
}
.box-title {
padding: 10px 0;
@@ -278,7 +279,7 @@
padding: 6rpx;
font-size: 25rpx;
text-align: center;
- line-height: 20px;
+ line-height: 20px;
font-weight: 700;
}
diff --git a/subPackage/house/list/index.vue b/subPackage/house/list/index.vue
index c3c0b22..76bb98b 100644
--- a/subPackage/house/list/index.vue
+++ b/subPackage/house/list/index.vue
@@ -1,10 +1,13 @@
<template>
<view class="container">
+ <view class="header">
+ <u-icon name="map" size="32"></u-icon>
+ </view>
<view class="flex f-d-c main">
<view class="flex house-container">
<view class="house-list-box" v-if="isShowAoi" v-for="(item, index) in houseList" @click="pushPage(item)">
<view class="l">
- <u-icon name="home" color="#fff"></u-icon>
+ <u-icon name="/static/icon/blue_floor.png"></u-icon>
</view>
<view class="r">
{{item.title}}栋
@@ -37,7 +40,7 @@
return {
isShowAoi:false,
isShowShop:false,
- currentId: '',
+ currentId: '',
curHouseTitle: '',
houseList: [{
title: '-'
@@ -50,9 +53,9 @@
}
},
onLoad(e) {
- const { id, title } = e
- this.currentId = id
- this.curHouseTitle = title
+ const { id, title } = e
+ this.currentId = id
+ this.curHouseTitle = title
},
onShow() {
@@ -102,7 +105,8 @@
}else{
// 跳转场所页面 addressType == 2
console.log(value,8888)
- let url = `/subPackage/workbench/views/cscj?stdId=${id}`
+ // let url = `/subPackage/workbench/views/cscj?stdId=${id}`
+ let url = `/subPackage/workbench/views/cscj?houseCode=${id}`
this.$u.func.globalNavigator(url, "navTo")
}
}
@@ -111,17 +115,23 @@
</script>
<style lang="scss" scoped>
+ page {
+ background-color: #f6f6f6;
+ }
.container {
width: 100%;
height: 100%;
-
display: flex;
flex-direction: column;
background: #F9F9FA;
font-size: 26rpx;
-
+
+ .header {
+ background-color: #fff;
+ }
.main {
+ border: 1px solid red;
position: relative;
height: 0;
flex: 1;
diff --git a/subPackage/workbench/views/cscj.vue b/subPackage/workbench/views/cscj.vue
index f8f3986..7460a16 100644
--- a/subPackage/workbench/views/cscj.vue
+++ b/subPackage/workbench/views/cscj.vue
@@ -5,7 +5,7 @@
<box-title title="基础信息"></box-title>
</view>
<view class="item">
- <u-form-item v-if="!stdId" @click="showPicker = true" class="form-item" labelWidth="100" label="楼栋:"
+ <u-form-item v-if="!currentId" @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>
@@ -94,8 +94,9 @@
<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 class="image" v-if="scope.value !== ''">
+ <u--image @click="imgPreview(scope.value)" width="200rpx" height="200rpx"
+ :src="scope.value"></u--image>
</view>
</template>
</lineItem>
@@ -127,7 +128,7 @@
<view class="bottom">
<view class="btn">
- <u-button @click="submit" type="primary" text="提交"></u-button>
+ <u-button @click="submit" type="primary" text="提交" v-if="!currentId"></u-button>
</view>
</view>
@@ -159,8 +160,14 @@
getDoorplateAddressList
} from "@/api/doorplateAddress/doorplateAddress";
import {
+ getPlaceDetail
+ } from '@/api/place/place.js'
+ import {
add
} from "@/api/place/place";
+ import {
+ format
+ } from "echarts";
export default {
mixins: [uploadMixin],
components: {
@@ -182,8 +189,8 @@
buildingCode: "",
label: "",
remark: "",
- imageUrls: "",
- placeName: ""
+ imageUrls: "",
+ placeName: "",
},
rules: {
'buildingCode': {
@@ -294,7 +301,6 @@
],
scene: [{
label: "消防照片",
- value: "",
useSlot: "pic",
},
{
@@ -326,8 +332,8 @@
activeIds: [],
showLabelList: [],
-
- stdId: "",
+ houseCode: "",
+ currentId: ""
}
},
watch: {
@@ -340,6 +346,9 @@
handler(newVal) {
console.log(newVal)
}
+ },
+ showLabelList(newVal) {
+ console.log(newVal);
}
},
@@ -354,9 +363,13 @@
styleIsolation: 'shared', // 解除样式隔离
},
onLoad(option) {
- this.stdId = option.stdId
- console.log(this.stdId, "----------")
- if (this.stdId) {
+ const {
+ houseCode,
+ id
+ } = option
+ this.houseCode = houseCode
+ this.currentId = id
+ if (this.currentId || this.houseCode) {
this.getBuildingDetail()
}
@@ -368,48 +381,118 @@
},
methods: {
- getBuildingDetail(params = {}) {
- getDoorplateAddressDetail(Object.assign(params, {
- stdId: this.stdId
- })).then(res => {
- let data = res.data
- this.form.buildingCode = data.buildingCode
+ // 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 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]
+ // }
+ // })
+
+ // this.form.building = arr.join("")
+
+ // 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] || '未完善'
+ // }
+ // })
+ // })
+ // })
+ // },
+
+ getBuildingDetail(params = {}) {
+ let idorCodeParams = {}
+ if (this.houseCode) {
+ idorCodeParams = {
+ houseCode: this.houseCode
+ }
+ }
+ if (this.currentId) {
+ idorCodeParams = {
+ id: this.currentId
+ }
+ }
+ getPlaceDetail({
+ ...params,
+ ...idorCodeParams
+ }).then(({
+ code,
+ data
+ }) => {
+ if (code !== 200) {
+ uni.showToast({
+ title: "数据加载失败",
+ icon: 'error'
+ })
+ return
+ }
+ const dpaEntity = data.doorplateAddressEntity
+ this.form.buildingCode = dpaEntity?.buildingCode
+ let buildingNameArr = [
+ dpaEntity?.townStreetName,
+ dpaEntity?.neiName,
+ dpaEntity?.streetRuName,
+ dpaEntity?.aoiName,
+ dpaEntity?.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]
- }
+ this.form.placeName = data['placeName']
+ Object.keys(this.form).forEach(key => {
+ this.form[key] = data[key] || data.doorplateAddressEntity[key] || '未完善'
+ if (key === "images") {
+ this.form[key] = []
+ }
+ })
+
+ this.form.building = arr.join("")
+
+ Object.keys(this.comprehensiveData).forEach(key => {
+ console.log(key);
+ this.comprehensiveData[key].forEach(item => {
+ item.value = data[item.name] || data.doorplateAddressEntity[item
+ .name] || '未完善'
+ })
+ this.publicData[key].forEach(item => {
+ item.value = data[item.name] || data.doorplateAddressEntity[item
+ .name] || '未完善'
+ })
})
- this.form.building = arr.join("")
-
- 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] || '未完善'
- }
- })
+ console.log(this.labelList);
+ this.showLabelList
+ placePoiLabelVOList.forEach(item => {
+ const label = this.labelList.find(sl => sl.text === item.labelName)
+ console.log(label);
})
+
})
},
@@ -418,7 +501,7 @@
const that = this
this.$refs.form.validate().then(valid => {
if (valid) {
- if (this.form.images.length > 0) {
+ if (this.form?.images?.length > 0) {
let urls = []
this.form.images.forEach(e => {
urls.push(e.name)
@@ -597,11 +680,11 @@
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],
- })
+ },
+ imgPreview(value) {
+ uni.previewImage({
+ urls: [value],
+ })
},
}
}
@@ -666,11 +749,11 @@
background-color: #ffffff;
padding: 40rpx 30rpx;
}
-
- .image {
- padding: 20rpx;
- }
-
+
+ .image {
+ padding: 20rpx;
+ }
+
.bottom {
padding: 20rpx;
background-color: #ffffff;
diff --git a/subPackage/workbench/views/csjl.vue b/subPackage/workbench/views/csjl.vue
index 123572a..0a12603 100644
--- a/subPackage/workbench/views/csjl.vue
+++ b/subPackage/workbench/views/csjl.vue
@@ -118,17 +118,15 @@
this.iptContext = ''
this.searchConfirm()
},
- pushPage({
- houseCode
- }) {
- if (!houseCode) {
+ pushPage({ id }) {
+ if (!id) {
uni.showToast({
title: "关键参数为空",
icon: "error"
})
return
}
- let url = "/subPackage/workbench/views/cscj?stdId=" + houseCode
+ let url = "/subPackage/workbench/views/cscj?id=" + id
this.$u.func.globalNavigator(url)
}
}
diff --git a/subPackage/workbench/views/examine.vue b/subPackage/workbench/views/examine.vue
index 1cb8755..9a89743 100644
--- a/subPackage/workbench/views/examine.vue
+++ b/subPackage/workbench/views/examine.vue
@@ -52,7 +52,7 @@
<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.confirmFlag" disabled disabledColor="#ffffff" placeholder="请选择审核状态"
- border="none"></u--input>
+ border="none" :placeholder="this.defaultPlaceholder"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="备注" class="form-item">
@@ -64,7 +64,7 @@
<view class="bottom-btn">
<u-button type="primary" @click="submit">提交审核</u-button>
</view>
- <u-picker :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker"
+ <u-picker :defaultIndex="[this.defaultColumns]" :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker"
:columns="columns" keyName="name" @cancel="isPickerShow = false" @confirm="handleConfirm"></u-picker>
</view>
</template>
@@ -106,7 +106,7 @@
],
placePersonList: [],
form: {
- confirmFlag: '待审核',
+ confirmFlag: '',
confirmNotion: ''
},
imageObj: {
@@ -132,7 +132,9 @@
currentData: {
placeId: '',
id: ''
- },
+ },
+ defaultColumns: 0,
+ defaultPlaceholder: ''
}
},
onLoad(option) {
@@ -168,7 +170,11 @@
})
this.basicData.forEach(item => {
item.value = data[item.name] || '未完善'
- })
+ })
+ console.log(data);
+ let columns = this.columns[0]
+ this.defaultColumns = columns.findIndex(item => item.status == data.confirmFlag)
+ this.defaultPlaceholder = columns[this.defaultColumns].name
this.placePersonList = data.placePractitioner
},
async checkPlaceExt(data) {
diff --git a/subPackage/workbench/views/rental.vue b/subPackage/workbench/views/rental.vue
index 212b6a4..550e135 100644
--- a/subPackage/workbench/views/rental.vue
+++ b/subPackage/workbench/views/rental.vue
@@ -129,6 +129,7 @@
current: 1,
size: 10
},
+ selectParams: {},
tenantStatus: [{
name: '未到期',
value: 0
@@ -177,22 +178,27 @@
params = {
auditStatus: auditStatus[0].value
}
- }
- if (floor[0].value !== '') {
- params = {
- ...params,
- floor: floor[0].value
- }
}
- this.getRentalHouseInfo(params)
+ if (floor[0].value !== '') {
+ params = {
+ ...params,
+ floor: floor[0].value
+ }
+ }
+ this.selectParams = params
+ this.getRentalHouseInfo()
this.getStatistics(auditStatus[0].value)
+ // 回到顶部,避免触发触底加载
+ uni.pageScrollTo({
+ scrollTop: 0, // 滚动到页面的目标位置(单位px)
+ });
},
- getStatistics(auditStatus = '') {
- let params = {}
- if (auditStatus) {
- params = {
- auditStatus
- }
+ getStatistics(auditStatus = '') {
+ let params = {}
+ if (auditStatus) {
+ params = {
+ auditStatus
+ }
}
getStatistics(params).then(res => {
console.log(res, "+------------")
@@ -215,7 +221,7 @@
} = await getRentalHouseContent({
tenantName: this.keyword,
...this.pagingParams,
- ...params
+ ...this.selectParams
})
if (code !== 200) {
uni.showToast({
@@ -227,12 +233,12 @@
this.tenantList = [...this.tenantList, ...records]
this.loadingStatus = 'nomore'
},
- search() {
+ search() {
this.resetParams()
this.getRentalHouseInfo()
},
clear() {
- this.keyword = ''
+ this.keyword = ''
this.resetParams()
this.search()
},
@@ -241,13 +247,13 @@
id
}) {
this.$u.func.globalNavigator(`/subPackage/bs/views/rentDetail?houseCode=${houseCode}&id=${id}`)
- },
- resetParams() {
- this.tenantList = []
- this.pagingParams = {
- current: 1,
- size: 10
- }
+ },
+ resetParams() {
+ this.tenantList = []
+ this.pagingParams = {
+ current: 1,
+ size: 10
+ }
}
}
}
--
Gitblit v1.9.3