From f31d84d27d9212bb30a14fdd876996510c1df240 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 06 Nov 2023 10:33:50 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_app
---
api/house/householdLabel.js | 21
static/icon/list-01.png | 0
subPackage/bs/views/rentDetail.vue | 54 +
static/img/repair-bg.png | 0
uni_modules/chenchuang-CCDropDownFilter/readme.md | 222 +++++
static/icon/nav-bg-09.png | 0
uni_modules/chenchuang-CCDropDownFilter/components/chenchuang-CCDropDownFilter/chenchuang-CCDropDownFilter.vue | 242 ++++++
static/icon/nav-10.png | 0
pages/home/index.vue | 27
subPackage/bs/views/repair.vue | 194 ++++
api/system/dict.js | 2
static/icon/nav-bg-06.png | 0
api/house/household.js | 30
static/icon/nav-09.png | 0
api/house/houseLabel.js | 9
pages/login/login-account.vue | 78 +
api/doorplateAddress/doorplateAddress.js | 15
pages.json | 29
subPackage/house/member/index.vue | 411 ++++++----
static/base.css | 3
subPackage/house/roomControl/index.vue | 159 ++-
static/icon/login-title.png | 0
uni_modules/chenchuang-CCDropDownFilter/changelog.md | 8
static/icon/nav-bg-07.png | 0
subPackage/workbench/views/rental.vue | 188 ++++
static/icon/list-02.png | 0
subPackage/house/roomDetails/index.vue | 69 +
subPackage/workbench/views/cscj.vue | 121 +--
subPackage/house/family/index.vue | 9
uni_modules/chenchuang-CCDropDownFilter/package.json | 84 ++
subPackage/house/member/householdLabel.vue | 333 ++++++++
subPackage/house/list/index.vue | 4
static/icon/nav-bg-08.png | 0
33 files changed, 1,959 insertions(+), 353 deletions(-)
diff --git a/api/doorplateAddress/doorplateAddress.js b/api/doorplateAddress/doorplateAddress.js
index 67dfda1..1a2d90f 100644
--- a/api/doorplateAddress/doorplateAddress.js
+++ b/api/doorplateAddress/doorplateAddress.js
@@ -73,4 +73,17 @@
...params
}
})
-}
\ No newline at end of file
+}
+
+// 获取门牌地址详情(简单单表)
+export const getDetail = (params) => {
+ return http.request({
+ url: 'blade-doorplateAddress/doorplateAddress/detail',
+ method: 'GET',
+ params: {
+ ...params
+ }
+ })
+}
+
+
diff --git a/api/house/houseLabel.js b/api/house/houseLabel.js
index 7875b97..f0da74a 100644
--- a/api/house/houseLabel.js
+++ b/api/house/houseLabel.js
@@ -1,5 +1,6 @@
import http from '@/http/api.js'
+
// 获取房屋详细信息
export const getHouseDetail = (houseCode) => {
return http.request({
@@ -21,12 +22,10 @@
}
// 房屋标签撤销
-export const removeHouseLabel = (ids) => {
+export const removeHouseLabel = (data) => {
return http.request({
- url: 'blade-houseLabel/houseLabel/remove',
+ url: 'blade-houseLabel/houseLabel/removeHouseLabel',
method: 'POST',
- params: {
- ids
- }
+ data
})
}
\ No newline at end of file
diff --git a/api/house/household.js b/api/house/household.js
new file mode 100644
index 0000000..f83e411
--- /dev/null
+++ b/api/house/household.js
@@ -0,0 +1,30 @@
+import http from '@/http/api.js'
+
+// 住户信息查询
+export const getHouseholdDetail = (param) => {
+ return http.request({
+ url: 'blade-household/household/getDetail',
+ method: 'GET',
+ params: param
+ })
+}
+
+// 住户新增修改
+export const saveOrUpdateHousehold = (data) => {
+ return http.request({
+ url: 'blade-household/household/saveOrUpdateHousehold',
+ method: 'POST',
+ data
+ })
+}
+
+// 住户删除
+export const removeHousehold = (ids) => {
+ return http.request({
+ url: 'blade-household/household/remove',
+ method: 'POST',
+ params: {
+ ids
+ }
+ })
+}
diff --git a/api/house/householdLabel.js b/api/house/householdLabel.js
new file mode 100644
index 0000000..f7bf8e6
--- /dev/null
+++ b/api/house/householdLabel.js
@@ -0,0 +1,21 @@
+import http from '@/http/api.js'
+
+
+
+// 住户标签修改
+export const saveOrUpdateHouseholdLabel = (data) => {
+ return http.request({
+ url: 'blade-householdLabel/householdLabel/saveOrUpdateHouseholdLabel',
+ method: 'POST',
+ data
+ })
+}
+
+// 住户标签撤销
+export const removeHouseholdLabel = (data) => {
+ return http.request({
+ url: 'blade-householdLabel/householdLabel/removeHouseholdLabel',
+ method: 'POST',
+ data
+ })
+}
\ No newline at end of file
diff --git a/api/system/dict.js b/api/system/dict.js
index a017433..9460dc5 100644
--- a/api/system/dict.js
+++ b/api/system/dict.js
@@ -11,7 +11,7 @@
export const bizDictionary = (params) => {
return http.request({
- url: '/api/blade-system/dict-biz/dictionary',
+ url: '/blade-system/dict-biz/dictionary',
method: 'GET',
params
})
diff --git a/pages.json b/pages.json
index 8cf16d0..f2927da 100644
--- a/pages.json
+++ b/pages.json
@@ -69,6 +69,15 @@
"navigationBarBackgroundColor": "#4586fe",
"navigationBarTextStyle": "white"
}
+ },
+ {
+ "path":"views/rental",
+ "style": {
+ "navigationBarTitleText": "出租房管理",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black"
+ }
}
@@ -120,8 +129,17 @@
"navigationBarTextStyle": "black",
"enablePullDownRefresh": false
}
+ },
+ {
+ "path": "views/repair",
+ "style": {
+ "navigationBarTitleText": "报事报修",
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
}
-
]
},
@@ -166,6 +184,15 @@
}
},
{
+ "path": "member/householdLabel",
+ "style": {
+ "navigationBarTitleText": "标签管理",
+ "navigationBarBackgroundColor": "#5887f9",
+ "navigationBarTextStyle": "white",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
"path": "roomControl/index",
"style": {
"navigationBarTitleText": "房屋管理",
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 55318eb..f21b649 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -184,7 +184,7 @@
{
icon: "/static/icon/nav-02.png",
text: "报事报修",
- path: ''
+ path: '/subPackage/bs/views/repair'
},
{
icon: "/static/icon/nav-03.png",
@@ -216,42 +216,48 @@
text: "场所记录",
style: {
background: 'linear-gradient(133deg, #FFFCF9 0%, rgba(255,252,249,0) 100%)',
- }
+ },
+ path:""
},
{
icon: "/static/icon/menu-02.png",
text: "场所采集",
style: {
background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
- }
+ },
+ path:"/subPackage/workbench/views/cscj"
},
{
icon: "/static/icon/menu-03.png",
text: "出租房管理",
style: {
background: 'linear-gradient(131deg, #FCF8FF 0%, rgba(252,248,255,0) 100%)',
- }
+ },
+ path:"/subPackage/workbench/views/rental"
},
{
icon: "/static/icon/menu-04.png",
text: "标签事件",
style: {
background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
- }
+ },
+ path:""
},
{
icon: "/static/icon/menu-05.png",
text: "场所维护",
style: {
background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
- }
+ },
+ path:"/subPackage/workbench/views/cscj"
},
{
icon: "/static/icon/menu-06.png",
text: "报事审核",
style: {
background: 'linear-gradient(137deg, #FFF4F3 0%, rgba(255,244,243,0) 100%)',
- }
+ },
+ path:""
},
// {
// icon: "/static/icon/menu-07.png",
@@ -535,9 +541,10 @@
this.$u.func.globalNavigator(`/subPackage/bs/views/zhsb?houseCode=${this.curHouseCode}`, "navTo")
},
- navigatorPage() {
- let url = "/subPackage/workbench/views/cscj"
- this.$u.func.globalNavigator(url, "navTo")
+ navigatorPage(item) {
+ if(item.path){
+ this.$u.func.globalNavigator(item.path, "navTo")
+ }
},
scan() {
diff --git a/pages/login/login-account.vue b/pages/login/login-account.vue
index 6f4573c..2c0ae82 100644
--- a/pages/login/login-account.vue
+++ b/pages/login/login-account.vue
@@ -5,13 +5,39 @@
style="width: 100rpx;height: 100rpx;"></image>
<view class="title">基层智治</view>
</view>-->
-
-
- <image class="bg" src="/static/img/login-bg.png" :style="{height:screenHeight}" mode="aspectFill"></image>
-
-
+
+
+ <image class="bg" src="/static/img/login-bg.png" :style="{height:screenHeight}" mode="aspectFill"></image>
+
+
<view class="content">
- <view class="top">
+
+ <image class="title-img" src="/static/icon/login-title.png" mode="aspectFill"></image>
+
+ <view class="">
+ <u-form labelPosition="top" labelWidth="60" :model="form" :rules="rules" ref="form">
+ <u-form-item borderBottom ref="phone">
+ <u-input placeholder="请输入用户名" prefixIcon="account"
+ prefixIconStyle="font-size: 28px;color: #017BFC"
+ placeholderStyle="font-size:28rpx;color:#ABABAB;"
+ customStyle="background:#fff;width:634rpx;height:120rpx;" v-model="form.phone"></u-input>
+ </u-form-item>
+ <u-form-item prop="password" borderBottom ref="password">
+
+ <u-input placeholder="请输入密码" prefixIcon="lock" prefixIconStyle="font-size: 28px;color: #017BFC"
+ placeholderStyle="font-size:28rpx;color:#ABABAB;"
+ customStyle="background:#fff;width:634rpx;height:120rpx;" :type="passwordProps.passwordType" v-model="form.password">
+ <template slot="suffix">
+ <u-icon @click="showPassword" :name="passwordProps.passwordIcon" size="24" color="#9FA5C0"></u-icon>
+ </template>
+ </u-input>
+ </u-form-item>
+ </u-form>
+ <button class="submit-btn" @click="submit" :disabled="disabled">登录</button>
+ </view>
+
+
+ <view class="top" v-if="false">
<u--form labelPosition="top" labelWidth="60" :model="form" :rules="rules" ref="form">
<view class="cell">
<u-form-item label="账号:" borderBottom ref="phone">
@@ -104,14 +130,14 @@
passwordIcon: "eye-off",
passwordType: "password"
},
- screenHeight:""
+ screenHeight: ""
}
},
-
- onLoad(){
+
+ onLoad() {
this.screenHeight = `${uni.getSystemInfoSync().screenHeight}px`;
},
-
+
methods: {
submit() {
const that = this
@@ -142,12 +168,11 @@
</script>
<style lang="scss">
-
- .bg{
- width:100%;
+ .bg {
+ width: 100%;
display: block;
}
-
+
.privacy-policy {
width: 100%;
padding: 40rpx 40rpx 0 80rpx;
@@ -184,7 +209,16 @@
margin-top: 40rpx;
font-weight: 700;
font-size: 32rpx;
+
+
}
+ }
+
+ .title-img {
+ width: 650rpx;
+ height: 49rpx;
+ display: block;
+ margin: 320rpx 0 120rpx;
}
.content {
@@ -192,9 +226,9 @@
flex-direction: column;
justify-content: space-around;
align-items: center;
- position: absolute;
- top:0;
- left:0;
+ position: absolute;
+ top: 0;
+ left: 0;
// height: 90vh;
width: 100%;
@@ -370,4 +404,14 @@
justify-content: space-evenly;
}
}
+ .submit-btn{
+ width:634rpx;
+ height:94rpx;
+ line-height: 94rpx;
+ background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
+ border-radius: 8rpx 8rpx 8rpx 8rpx;
+ color:#fff;
+ font-size:36rpx;
+ margin-top:190rpx;
+ }
</style>
\ No newline at end of file
diff --git a/static/base.css b/static/base.css
index 0e8594d..109713e 100644
--- a/static/base.css
+++ b/static/base.css
@@ -97,4 +97,7 @@
}
.bgc-main{
background-color:#017BFC;
+}
+.bgc-ff{
+ background-color: #fff;
}
\ No newline at end of file
diff --git a/static/icon/list-01.png b/static/icon/list-01.png
new file mode 100644
index 0000000..8c80e11
--- /dev/null
+++ b/static/icon/list-01.png
Binary files differ
diff --git a/static/icon/list-02.png b/static/icon/list-02.png
new file mode 100644
index 0000000..d208cdd
--- /dev/null
+++ b/static/icon/list-02.png
Binary files differ
diff --git a/static/icon/login-title.png b/static/icon/login-title.png
new file mode 100644
index 0000000..8e44a62
--- /dev/null
+++ b/static/icon/login-title.png
Binary files differ
diff --git a/static/icon/nav-09.png b/static/icon/nav-09.png
new file mode 100644
index 0000000..72be478
--- /dev/null
+++ b/static/icon/nav-09.png
Binary files differ
diff --git a/static/icon/nav-10.png b/static/icon/nav-10.png
new file mode 100644
index 0000000..44a2abc
--- /dev/null
+++ b/static/icon/nav-10.png
Binary files differ
diff --git a/static/icon/nav-bg-06.png b/static/icon/nav-bg-06.png
new file mode 100644
index 0000000..bc3a8bd
--- /dev/null
+++ b/static/icon/nav-bg-06.png
Binary files differ
diff --git a/static/icon/nav-bg-07.png b/static/icon/nav-bg-07.png
new file mode 100644
index 0000000..65fdcb0
--- /dev/null
+++ b/static/icon/nav-bg-07.png
Binary files differ
diff --git a/static/icon/nav-bg-08.png b/static/icon/nav-bg-08.png
new file mode 100644
index 0000000..2b73ec4
--- /dev/null
+++ b/static/icon/nav-bg-08.png
Binary files differ
diff --git a/static/icon/nav-bg-09.png b/static/icon/nav-bg-09.png
new file mode 100644
index 0000000..4fa63c4
--- /dev/null
+++ b/static/icon/nav-bg-09.png
Binary files differ
diff --git a/static/img/repair-bg.png b/static/img/repair-bg.png
new file mode 100644
index 0000000..de0b11d
--- /dev/null
+++ b/static/img/repair-bg.png
Binary files differ
diff --git a/subPackage/bs/views/rentDetail.vue b/subPackage/bs/views/rentDetail.vue
index eb43227..c49e031 100644
--- a/subPackage/bs/views/rentDetail.vue
+++ b/subPackage/bs/views/rentDetail.vue
@@ -34,7 +34,7 @@
</u-form-item>
<view class="pic">
<view class="title">合同上传</view>
- <u-upload :fileList="imagesList" :previewFullImage="uploadConfig.previewFullImage"
+ <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
:maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
@delete="deletePic">
@@ -55,11 +55,7 @@
<rentForm ref="rentform" />
</view>
</view>
-
-
</u-form>
-
-
<!-- 事件类型下拉框 -->
<select-bus v-if="typeShow" :show="typeShow" v-model="form[selectBusModel]" type="radio"
:popupTitle="selectBusTitle" :dataLists="selectBusList" @cancel="typeShow = false" @submit="typeSelect">
@@ -95,6 +91,9 @@
import {
update
} from "../../../api/system/role";
+ import {
+ minioBaseUrl
+ } from '@/common/setting'
export default {
mixins: [uploadMixin],
components: {
@@ -110,6 +109,8 @@
houseTypeName: "",
rentalUseName: "",
dueTime: "",
+ fileUrls:"",
+ images:[]
},
imagesList: [],
rules: {
@@ -197,7 +198,6 @@
this.rentId = id
this.getCurrentRentInfo()
}
-
},
mounted() {
this.currentRole = uni.getStorageSync("activeRole")
@@ -225,10 +225,6 @@
const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
this.form.dueTime = time
this.dueTimeShow = false
- },
- async afterReadImg(e) {
- console.log(this.$store);
-
},
addRentForm() {
this.rentFormNum++
@@ -258,7 +254,6 @@
}
},
saveOrUpdate() {
- console.log(this.rentalUseName, this.houseTypeName);
this.$refs.form.validate().then(res => {
let rentFormValidGroup = []
this.$refs.rentform.forEach(item => {
@@ -273,11 +268,19 @@
})
})
},
+ // 新增操作
async save() {
let houseTenantVOList = []
this.$refs.rentform.forEach(item => {
houseTenantVOList.push(item.form)
})
+ if (this.form.images.length > 0) {
+ let urls = []
+ this.form.images.forEach(e => {
+ urls.push(e.name)
+ })
+ this.form.fileUrls = urls.join(",")
+ }
const relationIndex = this.dataList.relation.findIndex(item => item.name === this.relationName)
const statusIndex = this.dataList.houseType.findIndex(item => item.name === this.houseTypeName)
const rentalIndex = this.dataList.rentalUse.findIndex(item => item.name === this.rentalUseName)
@@ -289,6 +292,7 @@
dueTime: this.form.dueTime,
houseStatus: this.dataList.houseType[statusIndex].value,
rentalUse: this.dataList.rentalUse[rentalIndex].value,
+ fileUrls:this.form.fileUrls,
houseTenantVOList
}
const {
@@ -314,11 +318,19 @@
}
})
},
+ // 更新操作
async update() {
let houseTenantVOList = []
this.$refs.rentform.forEach(item => {
houseTenantVOList.push(item.form)
})
+ if (this.form.images.length > 0) {
+ let urls = []
+ this.form.images.forEach(e => {
+ urls.push(e.name)
+ })
+ this.form.fileUrls = urls.join(",")
+ }
const relationIndex = this.dataList.relation.findIndex(item => item.name === this.relationName)
const statusIndex = this.dataList.houseType.findIndex(item => item.name === this.houseTypeName)
const rentalIndex = this.dataList.rentalUse.findIndex(item => item.name === this.rentalUseName)
@@ -330,6 +342,7 @@
dueTime: this.form.dueTime,
houseStatus: this.dataList.houseType[statusIndex].value,
rentalUse: this.dataList.rentalUse[rentalIndex].value,
+ fileUrls:this.form.fileUrls,
houseTenantVOList
}
const res = await updateRetalInfo(data)
@@ -358,6 +371,7 @@
})
return res.name
},
+ // 获取租赁相关信息
async getCurrentRentInfo() {
const {
code,
@@ -365,20 +379,34 @@
houseRentalList
}
} = await getHouseRentInfo(this.houseCode)
+ const images = []
const {
houseStatus,
tenantRelationship,
rentalUse,
rentalTime,
dueTime,
- houseTenantVOList
+ houseTenantVOList,
+ fileUrls
} = houseRentalList.find(item => item.id === this.rentId)
+ // 合同展示处理
+ if(fileUrls!=null && fileUrls.length>0){
+ const urls = fileUrls.split(',')
+ // 遍历
+ urls.forEach(e=>{
+ images.push({
+ url:minioBaseUrl + e,
+ name: e
+ })
+ })
+ }
this.form = {
relation: tenantRelationship,
rentTime: rentalTime,
dueTime: dueTime,
houseTypeName: houseStatus,
- rentalUseName: rentalUse
+ rentalUseName: rentalUse,
+ images:images
}
this.rentalUseName = this.findObjValue(rentalUse, this.dataList.rentalUse)
this.relationName = this.findObjValue(tenantRelationship, this.dataList.relation)
diff --git a/subPackage/bs/views/repair.vue b/subPackage/bs/views/repair.vue
new file mode 100644
index 0000000..ab75a59
--- /dev/null
+++ b/subPackage/bs/views/repair.vue
@@ -0,0 +1,194 @@
+<template>
+ <view class="">
+ <u-navbar height="48" safeAreaInsetTop placeholder bgColor="transparent" leftIconColor="#fff">
+ </u-navbar>
+ <view class="top">
+ <image class="top-img" src="/static/img/repair-bg.png" mode="aspectFill"></image>
+ </view>
+
+ <view class="container">
+ <view class="c-ff f-36">请选择您需要的服务</view>
+ <view class="serve-box bgc-ff mb-20 flex j-c-s-b a-i-c">
+ <view class="flex a-i-c">
+ <u-icon name="/static/icon/nav-09.png" width="91rpx" height="70rpx"></u-icon>
+ <view class="flex f-d-c ml-40">
+ <text class="f-36">总申请</text>
+ <view class="flex a-i-c">
+ <text class="f-48 c-blue fw mr-6">50</text>
+ <text class="f-24 c-99">件</text>
+ </view>
+ </view>
+ </view>
+ <view class="flex a-i-c">
+ <u-icon name="/static/icon/nav-10.png" width="91rpx" height="70rpx"></u-icon>
+ <view class="flex f-d-c ml-40">
+ <text class="f-36">已处理</text>
+ <view class="flex a-i-c">
+ <text class="f-48 c-green fw mr-6">50</text>
+ <text class="f-24 c-99">件</text>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <view class="site-box bgc-ff flex">
+ <view class="flex a-i-c">
+ <u-icon name="map-fill" color="#AAAAAA"></u-icon>
+ <text class="f-28 c-aa ml-20">当前小区:</text>
+ </view>
+
+ <text class="address f-28">万达华府26栋1903室 万达华府26栋1903室</text>
+ </view>
+
+ <view class="nav flex flex-wrap j-c-s-b">
+
+ <view class="nav-item" v-for="(i,k) in navList" :key="k">
+ <image class="nav-item-bg" :src="i.bgImg" mode="aspectFill"></image>
+ <view class="nav-item-inner flex f-d-c">
+ <text class="f-32 mb-30">{{i.title}}</text>
+ <button class="item-btn" :style="{backgroundColor:i.background}" @click="navTo(i.path)">立即上报</button>
+ </view>
+ </view>
+
+
+ </view>
+ </view>
+
+ </view>
+
+</template>
+
+<script>
+ export default {
+ data(){
+ return {
+ navList:[
+ {
+ title:"公共维修",
+ bgImg:"/static/icon/nav-bg-06.png",
+ path:"",
+ background:"#63C875"
+ },
+ {
+ title:"居家维修",
+ bgImg:"/static/icon/nav-bg-07.png",
+ path:"",
+ background:"#4D98E2"
+ },
+ {
+ title:"矛盾纠纷",
+ bgImg:"/static/icon/nav-bg-08.png",
+ path:"",
+ background:"#EC7E51"
+ },
+ {
+ title:"投诉举报",
+ bgImg:"/static/icon/nav-bg-09.png",
+ path:"",
+ background:"#F4B862"
+ },
+
+ ]
+ }
+ },
+ methods:{
+ navTo(path){
+ if(path){
+ this.$u.func.globalNavigator(path, "navTo")
+ }
+
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ page{
+ width:100%;
+ height:100%;
+ }
+ .top{
+ width:100%;
+ height:659rpx;
+ background: linear-gradient(180deg, #017BFC 0%, rgba(1,123,252,0) 100%);
+ position: fixed;
+ top:0;
+ left:0;
+ .top-img{
+ width:100%;
+ height:659rpx;
+ }
+ }
+ .container{
+ width:100%;
+ padding: 0 30rpx;
+ position: fixed;
+ box-sizing: border-box;
+ top:130rpx;
+ left:0;
+ z-index: 100;
+ .serve-box{
+ width:100%;
+ height:213rpx;
+ border-radius: 8rpx;
+ margin-top:30rpx;
+ padding: 0 60rpx 0 40rpx;
+ box-sizing: border-box;
+ }
+ .f-48{
+ font-size:48rpx;
+ }
+ .c-blue{
+ color:#677CF8;
+
+ }
+ .c-green{
+ color:#30D17C;
+ }
+ .ml-40{
+ margin-left:40rpx;
+ }
+ .site-box{
+ width:100%;
+ padding:30rpx;
+ box-sizing: border-box;
+ border-radius: 4rpx;
+ .c-aa{
+ color:#aaa;
+ }
+ .address{
+ width:60%;
+ margin-left:25rpx;
+ }
+ }
+ .nav{
+ width:100%;
+ .nav-item,.nav-item-bg,.nav-item-inner{
+ width:330rpx;
+ height:167rpx;
+ }
+ .nav-item{
+ position: relative;
+ margin-top:30rpx;
+ }
+ .nav-item-inner{
+ padding:30rpx 30rpx 0;
+ position: absolute;
+ top:0;
+ left:0;
+
+ }
+ .item-btn{
+ width:125rpx;
+ height:42rpx;
+ line-height: 42rpx;
+ border-radius: 20rpx;
+ color:#fff;
+ font-size:22rpx;
+ padding:0;
+ margin:0;
+ }
+ }
+
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/house/family/index.vue b/subPackage/house/family/index.vue
index ff570b8..87abf69 100644
--- a/subPackage/house/family/index.vue
+++ b/subPackage/house/family/index.vue
@@ -25,7 +25,7 @@
<u-icon name="photo"></u-icon>
</view>
- <view v-show="!!scItem.roleType === '业主'">
+ <view v-show="!!scItem.roleType == 1">
<u-icon name="photo"></u-icon>
</view>
</view>
@@ -130,9 +130,10 @@
},
// 跳转到商铺页面
pushShopPage(e){
- const { addressCode } = value
- // let url = `?id=${addressCode}`
- // this.$u.func.globalNavigator(url, "navTo")
+ console.log(e,8888)
+ const { addressCode } = e
+ let url = `/subPackage/workbench/views/cscj?stdId=${addressCode}`
+ this.$u.func.globalNavigator(url, "navTo")
}
}
}
diff --git a/subPackage/house/list/index.vue b/subPackage/house/list/index.vue
index 4c2e089..c3c0b22 100644
--- a/subPackage/house/list/index.vue
+++ b/subPackage/house/list/index.vue
@@ -101,7 +101,9 @@
}
}else{
// 跳转场所页面 addressType == 2
-
+ console.log(value,8888)
+ let url = `/subPackage/workbench/views/cscj?stdId=${id}`
+ this.$u.func.globalNavigator(url, "navTo")
}
}
}
diff --git a/subPackage/house/member/householdLabel.vue b/subPackage/house/member/householdLabel.vue
new file mode 100644
index 0000000..bdfa03e
--- /dev/null
+++ b/subPackage/house/member/householdLabel.vue
@@ -0,0 +1,333 @@
+<template>
+ <view class="container">
+ <view class="main">
+ <view class="content">
+ <view class="base b-c-w">
+ <u-icon name="photo"></u-icon> {{ houseAddress}}
+ </view>
+ <view class="l flex-1 flex">
+ <view class="flex_base">
+ <view class="head-img flex_base">
+ <u--image shape="circle" :showLoading="true" src="/static/icon/user-01.png" width="120rpx"
+ height="120rpx"></u--image>
+ </view>
+ </view>
+ <view class="info">
+ <view>姓名:{{householdInfo.name}}</view>
+ <view class="flex">
+ 手机:{{householdInfo.phoneNumber}} <u-icon name="phone-fill" color="#4586FE"></u-icon>
+ </view>
+ </view>
+ </view>
+ <view v-for="(item, index) in labelBtnList" :key="index">
+ <box-title :title="item.name"></box-title>
+ <view class="mt-20 flex label-btn-box b-c-w">
+ <view v-for="(item, index) in item.children" :key="index">
+ <u-button color="#000" size="mini" type="primary"
+ :style="{background: item.color}"
+ :plain="true" :text="item.name"
+ @click="showLabelPopup(item)"></u-button>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <u-modal style="flex: none;" :show="popupShow" :closeOnClickOverlay="true" showCancelButton
+ @cancel="popupShow = false" @confirm="popupConfirm">
+ <view class="slot-content">
+ <view class="flex_base">
+ {{ labelModelInfo.title }}
+ </view>
+
+ <u-radio-group class="mt-40" v-model="labelValue" placement="row">
+ <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in labelList" :key="index"
+ :label="item.name" :name="item.name" :activeColor="item.color" @change="radioChange(item)">
+ </u-radio>
+ </u-radio-group>
+
+ <u--textarea class="mt-40" v-model="remark" placeholder="请输入内容"></u--textarea>
+ </view>
+ </u-modal>
+ </view>
+</template>
+
+<script>
+ import uploadMixin from "@/mixin/uploadMixin";
+
+ import {
+ getLabelListByParentId
+ } from "@/api/label/label.js";
+ import {
+ getDetail
+ } from "@/api/doorplateAddress/doorplateAddress.js";
+ import {saveOrUpdateHouseholdLabel,removeHouseholdLabel} from "@/api/house/householdLabel.js"
+ import { getHouseholdDetail } from "@/api/house/household.js"
+
+ export default {
+ mixins: [uploadMixin],
+ data() {
+ return {
+ houseAddress:"",
+ houseInfo:{},
+ householdInfo:{},
+ houseCode:"",
+ popupShow: false,
+ labelBtnList: [],
+ // 安置房弹框中
+ labelList: [{
+ name: '撤销',
+ disabled: false,
+ color: '#EBEDF0'
+ },
+ {
+ name: '绿',
+ disabled: false,
+ color: '#07C160'
+ },
+ {
+ name: '黄',
+ disabled: false,
+ color: '#FF976A'
+ }, {
+ name: '红',
+ disabled: false,
+ color: '#EE0A24'
+ }
+ ],
+ currentLabelInfo: {},
+ currentColorInfo: {},
+ labelModelInfo: {
+ title: '',
+ selectedColor: ''
+ },
+ labelValue: '',
+ remark: '',
+ // 标记
+ number:0
+ }
+ },
+ created() {
+ },
+ mounted() {
+ },
+ onLoad(option) {
+ const data = JSON.parse(option.data);
+ this.householdInfo = data;
+ this.houseCode = data.houseCode
+ this.getDoorPlateAddressDetail()
+ },
+ onShow() {
+ this.getLabelList()
+ },
+ methods: {
+ // 获取房屋详情
+ async getDoorPlateAddressDetail() {
+ const param = {
+ addressCode : this.houseCode
+ }
+ const res = await getDetail(param)
+ this.houseInfo = res.data
+ const aoiName = ( this.houseInfo.aoiName || this.houseInfo.subAoi)
+ const unitName = this.houseInfo.unitName == null ?"":this.houseInfo.unitName
+ this.houseAddress = aoiName +
+ this.houseInfo.buildingName + unitName + this.houseInfo.houseName + "室"
+
+ },
+ // 获取房屋标签信息
+ async getLabelList() {
+ const param = {
+ id : this.householdInfo.id
+ }
+ const res = await getHouseholdDetail(param)
+ this.householdInfo = res.data
+ const householdLabelList = this.householdInfo.householdLabelList
+ // 房屋标签处理
+ const labelParam = {
+ parentId:1000
+ }
+ const resLabel = await getLabelListByParentId(labelParam)
+ this.labelBtnList = resLabel.data
+ const labelChildAll = []
+ // 将细类放到一起
+ this.labelBtnList.forEach(e=>{
+ e.children.forEach(f=>{
+ labelChildAll.push(f)
+ })
+ })
+ if(householdLabelList.length>0){
+ labelChildAll.forEach(e=>{
+ householdLabelList.forEach(f=>{
+ if(Number(e.id) == f.labelId){
+ e['color'] = f.color
+ e['remark'] = f.remark
+ }
+ })
+ })
+ }
+ },
+ // 房屋弹窗
+ showLabelPopup(item) {
+ // 先清空
+ this.number = 0
+ this.labelValue = ""
+ this.remark = ""
+ this.popupShow = true
+ this.labelModelInfo.title = item.name
+ this.currentLabelInfo = item
+ // 遍历标签集合
+ this.labelList.forEach(e=>{
+ if(e.color == item.color){
+ this.labelValue = e.name
+ this.remark = item.remark
+ this.number = 1
+ }
+ })
+ },
+ popupConfirm() {
+ this.popupShow = false
+ },
+ radioChange(item) {
+ this.currentColorInfo = item
+ },
+ // 更新房屋标签
+ async popupConfirm() {
+ const {
+ id
+ } = this.currentLabelInfo
+ const {
+ color,
+ name
+ } = this.currentColorInfo
+ let res = null
+ if (name === '撤销') {
+ if(this.number==1){
+ const data = {
+ labelId:id,
+ householdId: this.householdInfo.id
+ }
+ res = await removeHouseholdLabel(data)
+ }else{
+ uni.showToast({
+ title: "无可撤销项",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
+ } else {
+ res = await saveOrUpdateHouseholdLabel({
+ householdId: this.householdInfo.id,
+ labelId: id,
+ remark:this.remark,
+ color
+ })
+ }
+ if (res.code !== 200) {
+ uni.showToast({
+ title: "修改失败",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
+ // 刷新页面
+ this.getLabelList()
+ this.popupShow = false
+ },
+
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+ .container {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ background: #F9F9FA;
+
+ .main {
+ position: relative;
+ height: 0;
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+
+ .content {
+ height: 0;
+ flex: 1;
+ overflow-y: auto;
+
+ .base{
+ padding-left: 20rpx;
+ background-color:#ffffff;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ height: 90rpx;
+ font-size: 32rpx;
+ letter-spacing: 3rpx;
+ border-bottom: 1rpx solid #EBEDF0;
+ }
+
+ .l {
+ height: 170rpx;
+ background-color: #ffffff;
+ align-items: center;
+
+ .head-img {
+ margin-left: 20rpx;
+ width: 124rpx;
+ height: 124rpx;
+ background: #EBEDF0;
+ border-radius: 50%;
+ }
+
+ .info {
+ margin-left: 20rpx;
+ font-size: 24rpx;
+
+ &>view {
+ height: 56rpx;
+ line-height: 56rpx;
+ }
+ }
+ }
+
+ .basic-info {
+ .form-item {
+ background-color: #ffffff;
+ padding: 5rpx 20rpx;
+ }
+ }
+
+ .pic {
+ background-color: #ffffff;
+ padding: 40rpx 30rpx;
+ }
+
+ .label-btn-box {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ padding: 10rpx 0;
+
+
+ &>view {
+ margin: 10rpx 10rpx;
+
+ .u-button {
+ padding: 6rpx 8rpx;
+ border-width: 0 !important;
+ background-color: #EFEFF0;
+ }
+ }
+ }
+
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/house/member/index.vue b/subPackage/house/member/index.vue
index 08e58ee..f69a9c2 100644
--- a/subPackage/house/member/index.vue
+++ b/subPackage/house/member/index.vue
@@ -7,139 +7,141 @@
<box-title title="基础信息"></box-title>
</view>
<view class="event-info">
- <u-form-item @click="showSelectBus(roleList, '角色', 'roleName')" class="form-item"
- labelWidth="100" label="角色" required prop="type">
- <u--input border="none" v-model="roleName" disabled disabledColor="#ffffff"
+ <u-form-item @click="showSelectBus(dataList.roleList, '角色', 'roleTypeName','roleType')" class="form-item"
+ labelWidth="100" label="角色" required prop="roleType">
+ <u--input border="none" v-model="roleTypeName" disabled disabledColor="#ffffff"
placeholder="请选择">
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
- <u-form-item @click="showSelectBus(relationList, '角色关系', 'relationName')"
- class="form-item" labelWidth="100" label="角色关系" required prop="type">
- <u--input border="none" v-model="relationName" disabled disabledColor="#ffffff"
+ <u-form-item @click="showSelectBus(dataList.relationshipList, '角色关系', 'relationshipName','relationship')"
+ class="form-item" labelWidth="100" label="角色关系" required prop="relationship">
+ <u--input border="none" v-model="relationshipName" disabled disabledColor="#ffffff"
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 prop="location">
- <u--input border="none" v-model="form.location" placeholder="请输入">
+ <u-form-item class="form-item" labelWidth="100" label="姓名" required prop="name">
+ <u--input border="none" v-model="form.name" placeholder="请输入">
</u--input>
</u-form-item>
- <u-form-item class="form-item" labelWidth="100" label="身份证" required prop="location">
- <u--input border="none" v-model="form.location" placeholder="请输入">
+ <u-form-item class="form-item" labelWidth="100" label="身份证" prop="idCard">
+ <u--input border="none" v-model="form.idCard" placeholder="请输入">
</u--input>
</u-form-item>
- <u-form-item @click="typeShow = true" class="form-item" labelWidth="100" label="性别" required
- prop="type">
- <u--input border="none" v-model="roleName" disabled disabledColor="#ffffff"
+ <u-form-item @click="showSelectBus(dataList.genderList, '性别', 'genderName','gender')"
+ class="form-item" labelWidth="100" label="性别" prop="gender">
+ <u--input border="none" v-model="genderName" disabled disabledColor="#ffffff"
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 prop="location">
- <u--input border="none" v-model="form.location" placeholder="请输入">
+ <u-form-item class="form-item" labelWidth="100" label="手机号码" prop="phoneNumber">
+ <u--input border="none" v-model="form.phoneNumber" placeholder="请输入">
</u--input>
</u-form-item>
- <u-form-item class="form-item" labelWidth="100" label="其他联系方式" required prop="location">
- <u--input border="none" v-model="form.location" placeholder="请输入">
+ <u-form-item class="form-item" labelWidth="100" label="其他联系方式" prop="otherContact">
+ <u--input border="none" v-model="form.otherContact" placeholder="请输入">
</u--input>
</u-form-item>
- <u-form-item @click="typeShow = true" class="form-item" labelWidth="100" label="是否主要联系人"
- required prop="type">
- <u--input border="none" v-model="roleName" disabled disabledColor="#ffffff"
+ <u-form-item @click="showSelectBus(dataList.isPrimaryContactList, '是否主要联系人', 'isPrimaryContactName','isPrimaryContact')"
+ class="form-item" labelWidth="110" label="是否主要联系人"
+ prop="isPrimaryContact">
+ <u--input border="none" v-model="isPrimaryContactName" disabled disabledColor="#ffffff"
placeholder="请选择">
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
- <u-form-item @click="typeShow = true" class="form-item" labelWidth="100" label="居住情况" required
- prop="type">
- <u--input border="none" v-model="roleName" disabled disabledColor="#ffffff"
+ <u-form-item @click="showSelectBus(dataList.residentialStatusList, '居住情况', 'residentialStatusName','residentialStatus')"
+ class="form-item" labelWidth="100" label="居住情况"
+ prop="residentialStatus">
+ <u--input border="none" v-model="residentialStatusName" disabled disabledColor="#ffffff"
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 prop="location">
- <u--input border="none" v-model="form.location" placeholder="请输入">
+ <u-form-item class="form-item" labelWidth="100" label="港澳台通行证" prop="hkmtPass">
+ <u--input border="none" v-model="form.hkmtPass" placeholder="请输入">
</u--input>
</u-form-item>
- <u-form-item class="form-item" labelWidth="100" label="护照" required prop="location">
- <u--input border="none" v-model="form.location" placeholder="请输入">
+ <u-form-item class="form-item" labelWidth="100" label="护照" prop="passport">
+ <u--input border="none" v-model="form.passport" placeholder="请输入">
</u--input>
</u-form-item>
- <u-form-item class="form-item" labelWidth="100" label="现居住地" required prop="location">
- <u--input border="none" v-model="form.location" placeholder="请输入">
+ <u-form-item class="form-item" labelWidth="100" label="现居住地" prop="currentAddress">
+ <u--input border="none" v-model="form.currentAddress" placeholder="请输入">
</u--input>
</u-form-item>
- <u-form-item @click="typeShow = true" class="form-item" labelWidth="100" label="民族" required
- prop="type">
- <u--input border="none" v-model="roleName" disabled disabledColor="#ffffff"
+ <u-form-item @click="showSelectBus(dataList.ethnicityList, '民族', 'ethnicityName','ethnicity')"
+ class="form-item" labelWidth="100" label="民族" prop="ethnicity">
+ <u--input border="none" v-model="ethnicityName" disabled disabledColor="#ffffff"
placeholder="请选择">
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
- <u-form-item @click="typeShow = true" class="form-item" labelWidth="100" label="学历" required
- prop="type">
- <u--input border="none" v-model="roleName" disabled disabledColor="#ffffff"
+ <u-form-item @click="showSelectBus(dataList.educationList, '学历', 'educationName','education')"
+ class="form-item" labelWidth="100" label="学历" prop="education">
+ <u--input border="none" v-model="educationName" disabled disabledColor="#ffffff"
placeholder="请选择">
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
- <u-form-item @click="typeShow = true" class="form-item" labelWidth="100" label="是否党员" required
- prop="type">
- <u--input border="none" v-model="roleName" disabled disabledColor="#ffffff"
+ <u-form-item @click="showSelectBus(dataList.partyEmberList, '是否党员', 'partyEmberName','partyEmber')"
+ class="form-item" labelWidth="100" label="是否党员" prop="partyEmber">
+ <u--input border="none" v-model="partyEmberName" disabled disabledColor="#ffffff"
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 prop="location">
- <u--input border="none" v-model="form.location" placeholder="请输入">
+ <u-form-item class="form-item" labelWidth="100" label="工作单位" prop="employer">
+ <u--input border="none" v-model="form.employer" placeholder="请输入">
</u--input>
</u-form-item>
- <u-form-item @click="typeShow = true" class="form-item" labelWidth="100" label="工作状态" required
- prop="type">
- <u--input border="none" v-model="roleName" disabled disabledColor="#ffffff"
+ <u-form-item @click="showSelectBus(dataList.workStatusList, '工作状态', 'workStatusName','workStatus')"
+ class="form-item" labelWidth="100" label="工作状态" prop="workStatus">
+ <u--input border="none" v-model="workStatusName" disabled disabledColor="#ffffff"
placeholder="请选择">
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
- <u-form-item @click="typeShow = true" class="form-item" labelWidth="100" label="婚姻状态" required
- prop="type">
- <u--input border="none" v-model="roleName" disabled disabledColor="#ffffff"
+ <u-form-item @click="showSelectBus(dataList.maritalStatusList, '婚姻状态', 'maritalStatusName','maritalStatus')"
+ class="form-item" labelWidth="100" label="婚姻状态" prop="maritalStatus">
+ <u--input border="none" v-model="maritalStatusName" disabled disabledColor="#ffffff"
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 prop="location">
- <u--input border="none" v-model="form.location" placeholder="请输入">
+ <u-form-item class="form-item" labelWidth="100" label="户籍登记地" prop="hukouRegistration">
+ <u--input border="none" v-model="form.hukouRegistration" placeholder="请输入">
</u--input>
</u-form-item>
- <u-form-item class="form-item" labelWidth="100" label="车牌号" required prop="location">
- <u--input border="none" v-model="form.location" placeholder="多个用中划线(-)隔开">
+ <u-form-item class="form-item" labelWidth="100" label="车牌号" prop="cardNumber">
+ <u--input border="none" v-model="form.cardNumber" placeholder="多个用中划线(-)隔开">
</u--input>
</u-form-item>
- <u-form-item class="form-item" labelWidth="100" label="备注" required prop="location">
- <u--input border="none" v-model="form.location" placeholder="补充说明">
+ <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>
</view>
@@ -148,14 +150,13 @@
<view class="btn-group b-c-w">
<view>
- <u-button @click="submit" type="primary" text="添加"></u-button>
+ <u-button @click="submit" type="primary" :text="addOrUpdateTitle" width="120px"></u-button>
</view>
<view>
<u-button @click="navigator" type="primary" :plain="true" text="返回首页"></u-button>
</view>
</view>
</view>
-
<!-- 事件类型下拉框 -->
<select-bus v-if="typeShow" :show="typeShow" v-model="form[selectBusModel]" type="radio"
@@ -167,6 +168,12 @@
<script>
import selectBus from "@/components/my-components/selectBus.vue"
import uploadMixin from "@/mixin/uploadMixin";
+ import {
+ saveOrUpdateHousehold,removeHousehold
+ } from '@/api/house/household.js'
+ import {
+ bizDictionary
+ } from '@/api/system/dict.js'
export default {
components: {
selectBus
@@ -174,109 +181,99 @@
mixins: [uploadMixin],
data() {
return {
-
+ addOrUpdateTitle:"添加",
+ houseCode:"",
form: {
roleName: "",
relationName: '',
location: "",
title: "",
+ roleType:null,
description: "",
},
- rules: {},
-
+ rules: {
+ // roleType: [{
+ // required: true,
+ // message: '请选择角色'
+ // }],
+ name: [{
+ required: true,
+ message: '请填写姓名'
+ }],
+ },
typeShow: false,
-
roleName: "",
- roleList: [{
- value: 1,
- name: '业主',
- },
- {
- value: 2,
- name: '出租户',
- },
- {
- value: 3,
- name: '空挂户',
- },
- ],
-
- relationName: '',
- relationList: [{
- value: 1,
- name: '业主',
- },
- {
- value: 2,
- name: '妻子',
- },
- {
- value: 3,
- name: '丈夫',
- },
- {
- value: 4,
- name: '女儿',
- },
- {
- value: 5,
- name: '儿子',
- },
- {
- value: 6,
- name: '母亲',
- },
- {
- value: 7,
- name: '父亲',
- },
- {
- value: 8,
- name: '爷爷',
- },
- {
- value: 9,
- name: '女婿',
- },
- {
- value: 10,
- name: '孙子',
- },
- {
- value: 11,
- name: '孙女',
- },
- {
- value: 12,
- name: '外公',
- },
- {
- value: 13,
- name: '外婆',
- },
- {
- value: 14,
- name: '外孙女',
- },
- {
- value: 15,
- name: '外孙',
- },
- {
- value: 16,
- name: '儿媳',
- },
- {
- value: 17,
- name: '租户',
- },
- {
- value: 18,
- name: '其他',
- },
- ],
-
-
+ dataList: {
+ roleList: [],
+ relationshipList: [],
+ genderList:[
+ {
+ value: 1,
+ name: '男',
+ },
+ {
+ value: 0,
+ name: '女',
+ },
+ {
+ value: 2,
+ name: '未知',
+ }
+ ],
+ isPrimaryContactList:[
+ {
+ value: 1,
+ name: '是',
+ },
+ {
+ value: 0,
+ name: '否',
+ }
+ ],
+ residentialStatusList:[
+ {
+ value: 1,
+ name: '是',
+ },
+ {
+ value: 0,
+ name: '否',
+ }
+ ],
+ ethnicityList:[
+
+ ],
+ educationList:[
+
+ ],
+ partyEmberList:[
+ {
+ value: 1,
+ name: '是',
+ },
+ {
+ value: 2,
+ name: '否',
+ }
+ ],
+ workStatusList:[
+
+ ],
+ maritalStatusList:[
+
+ ]
+ },
+ roleTypeName: '',
+ relationshipName: '',
+ genderName: '',
+ residentialStatusName:"",
+ isPrimaryContactName: '',
+ ethnicityName: '',
+ educationName: '',
+ partyEmberName: '',
+ workStatusName: '',
+ maritalStatusName: '',
+ // 下拉变量
selectBusList: [],
selectBusVal: '',
selectBusTitle: '',
@@ -287,36 +284,134 @@
this.getHeader()
},
mounted() {
-
},
onLoad(option) {
-
+ const data = JSON.parse(option.data)
+ this.houseCode = data.houseCode
+ if(data.type == 2){
+ this.addOrUpdateTitle = "保存"
+ }
+ if(data.type == 2){
+ this.addOrUpdateTitle = "修改"
+ this.getHouseholdInfo(data)
+ }
},
onShow() {
},
methods: {
+ // 获取业务字典
+ async getBizDict(code,list){
+ const param = {
+ code: code
+ }
+ const res = await bizDictionary(param)
+ res.data.forEach(e=>{
+ list.push({
+ name:e.dictValue,
+ value:Number(e.dictKey)
+ })
+ })
+ },
+ // 获取住户信息
+ async getHouseholdInfo(data){
+ // 获取角色关系字典
+ await this.getBizDict('roleRelation',this.dataList.relationshipList)
+ // 获取角色字典
+ await this.getBizDict('roleType',this.dataList.roleList)
+ // 获取民族字典
+ await this.getBizDict('nationType',this.dataList.ethnicityList)
+ // 获取学历字典
+ await this.getBizDict('educationType',this.dataList.educationList)
+ // 获取工作状态字典
+ await this.getBizDict('workStatusType',this.dataList.workStatusList)
+ // 获取婚姻状态字典
+ await this.getBizDict('marriageStatusType',this.dataList.maritalStatusList)
+ this.form = data
+ this.roleTypeName = this.findObjValue(data.roleType, this.dataList.roleList)
+ this.relationshipName = this.findObjValue(data.relationship, this.dataList.relationshipList)
+ this.genderName = this.findObjValue(data.gender, this.dataList.genderList)
+ this.isPrimaryContactName = this.findObjValue(data.isPrimaryContact, this.dataList.isPrimaryContactList)
+ this.ethnicityName = this.findObjValue(data.ethnicity, this.dataList.ethnicityList)
+ this.educationName = this.findObjValue(data.education, this.dataList.educationList)
+ this.partyEmberName = this.findObjValue(data.partyEmber, this.dataList.partyEmberList)
+ this.workStatusName = this.findObjValue(data.workStatus, this.dataList.workStatusList)
+ this.maritalStatusName = this.findObjValue(data.maritalStatus, this.dataList.maritalStatusList)
+ },
// 显示选择弹框
- showSelectBus(data, title, model) {
+ showSelectBus(data, title, model, key) {
this.selectBusList = data
this.selectBusTitle = title
this.selectBusModel = model
+ this.selectBusKey = key
this.typeShow = true
},
-
//类型选择确认
typeSelect(item) {
this[this.selectBusModel] = item.name
this.form[this.selectBusModel] = item.value
this.typeShow = !this.typeShow
},
-
//表单提交
submit() {
-
+ this.$refs.form.validate().then(res => {
+ this.saveOrUpdate();
+ })
},
+ // 新增更新操作
+ async saveOrUpdate() {
+ this.form['houseCode'] = this.houseCode
+ // 字典解析
+ const roleTypeIndex = this.dataList.roleList.findIndex(item => item.name === this.roleTypeName)
+ const relationshipIndex = this.dataList.relationshipList.findIndex(item => item.name === this.relationshipName)
+ const genderIndex = this.dataList.genderList.findIndex(item => item.name === this.genderName)
+ const isPrimaryContactIndex = this.dataList.isPrimaryContactList.findIndex(item => item.name === this.isPrimaryContactName)
+ const ethnicityIndex = this.dataList.ethnicityList.findIndex(item => item.name === this.ethnicityName)
+ const educationIndex = this.dataList.educationList.findIndex(item => item.name === this.educationName)
+ const partyEmberIndex = this.dataList.partyEmberList.findIndex(item => item.name === this.partyEmberName)
+ const workStatusIndex = this.dataList.workStatusList.findIndex(item => item.name === this.workStatusName)
+ const maritalStatusIndex = this.dataList.maritalStatusList.findIndex(item => item.name === this.maritalStatusName)
+
+ this.form['roleType'] = roleTypeIndex >0 ? this.dataList.roleList[roleTypeIndex].value : ""
+ this.form['relationship'] = relationshipIndex >0 ? this.dataList.relationshipList[relationshipIndex].value: ""
+ this.form['gender'] = genderIndex >0 ?this.dataList.genderList[genderIndex].value: ""
+ this.form['isPrimaryContact'] = isPrimaryContactIndex >0 ?this.dataList.isPrimaryContactList[isPrimaryContactIndex].value: ""
+ this.form['ethnicity'] = ethnicityIndex >0 ?this.dataList.ethnicityList[ethnicityIndex].value: ""
+ this.form['education'] = educationIndex >0 ?this.dataList.educationList[educationIndex].value: ""
+ this.form['partyEmber'] = partyEmberIndex >0 ?this.dataList.partyEmberList[partyEmberIndex].value:""
+ this.form['workStatus'] = workStatusIndex >0 ?this.dataList.workStatusList[workStatusIndex].value:""
+ this.form['maritalStatus'] = maritalStatusIndex >0 ?this.dataList.maritalStatusList[maritalStatusIndex].value:""
- //跳转到报事列表
+ const res = await saveOrUpdateHousehold(this.form)
+ if (res.code !== 200) {
+ uni.showToast({
+ title: "保存失败",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
+ uni.showToast({
+ title: "保存成功",
+ icon: "success",
+ duration: 1500,
+ success: () => {
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 1500)
+ }
+ })
+ },
+ findObjValue(value, obj) {
+ if(value){
+ const res = obj.find(item => {
+ return item.value == value
+ })
+ return res.name
+ }
+ return ""
+ },
+ // 跳转到首页
navigator() {
this.$u.func.globalNavigator("/subPackage/bs/views/bsList")
},
@@ -357,14 +452,16 @@
}
.box-title {
- padding: 10px 0;
+ padding: 10px 10px;
}
.event-info {
+ // background-color: #ffffff;
+ padding: 20rpx;
.form-item {
background-color: #ffffff;
- padding: 5px 10px;
+ padding: 5px 20px;
border-bottom: 1px solid #eff1f3;
}
diff --git a/subPackage/house/roomControl/index.vue b/subPackage/house/roomControl/index.vue
index efc2f4a..6d207c4 100644
--- a/subPackage/house/roomControl/index.vue
+++ b/subPackage/house/roomControl/index.vue
@@ -38,7 +38,9 @@
<box-title title="房屋标签"></box-title>
<view class="mt-20 flex label-btn-box b-c-w">
<view v-for="(item, index) in labelBtnList" :key="index">
- <u-button color="#000" size="mini" type="primary" :plain="true" :text="item.name"
+ <u-button color="#000" size="mini" type="primary"
+ :style="{background: item.color}"
+ :plain="true" :text="item.name"
@click="showLabelPopup(item)"></u-button>
</view>
</view>
@@ -63,7 +65,7 @@
</u-radio>
</u-radio-group>
- <u--textarea class="mt-40" v-model="value1" placeholder="请输入内容"></u--textarea>
+ <u--textarea class="mt-40" v-model="remark" placeholder="请输入内容"></u--textarea>
</view>
</u-modal>
@@ -86,13 +88,14 @@
import {
updateHouseLabel,
removeHouseLabel
- } from "@/api/houseRental/houseRental.js";
+ } from "@/api/house/houseLabel.js";
import {
getHouseDetail,saveOrUpdateHouse
} from "@/api/house/house.js";
import {
minioBaseUrl
} from '@/common/setting'
+import { number } from "echarts";
export default {
mixins: [uploadMixin],
data() {
@@ -146,8 +149,10 @@
title: '',
selectedColor: ''
},
- labelValue: '苹果',
- value1: ''
+ labelValue: '',
+ remark: '',
+ // 标记
+ number:0
}
},
created() {
@@ -163,10 +168,72 @@
this.houseCode = code
},
onShow() {
- this.getLabelList()
+ // this.getLabelList()
this.getHouseDetailInfo()
},
methods: {
+ // 获取房屋详情
+ async getHouseDetailInfo() {
+ var that = this;
+ const param = {
+ houseCode : this.houseCode
+ }
+ const res = await getHouseDetail(param)
+ // 房屋标签处理
+ const paramLabel = {
+ parentId:1001
+ }
+ const resLabel = await getLabelListByParentId(paramLabel)
+ this.labelBtnList = resLabel.data
+ if(null != res.data){
+ const images = []
+ const {
+ phone,
+ address,
+ propertyPrice,
+ serviceDue,
+ imageUrls,
+ houseLabelVOList
+ } = res.data
+ if(imageUrls.length>0){
+ const urls = imageUrls.split(',')
+ // 遍历
+ urls.forEach(e=>{
+ images.push({
+ url:minioBaseUrl + e,
+ name: e
+ })
+ })
+ }
+
+ if(houseLabelVOList.length>0){
+ that.labelBtnList.forEach(e=>{
+ houseLabelVOList.forEach(f=>{
+ if(Number(e.id) == f.labelId){
+ e['color'] = f.color
+ e['remark'] = f.remark
+ }
+ })
+ })
+ }
+ this.form = {
+ phone,
+ address,
+ propertyPrice,
+ serviceDue,
+ imageUrls,
+ images
+ }
+ }
+ },
+ // 获取房屋标签信息
+ async getLabelList() {
+ const param = {
+ parentId:1001
+ }
+ const res = await getLabelListByParentId(param)
+ this.labelBtnList = res.data
+ },
// 更新房屋数据
async updateHouseInfo(){
this.form['houseCode'] = this.houseCode
@@ -195,15 +262,28 @@
duration: 1500,
success: () => {
setTimeout(() => {
- uni.navigateBack()
+ // uni.navigateBack()
}, 1500)
}
})
},
+ // 房屋弹窗
showLabelPopup(item) {
+ // 先清空
+ this.number = 0
+ this.labelValue = ""
+ this.remark = ""
this.popupShow = true
this.labelModelInfo.title = item.name
this.currentLabelInfo = item
+ // 遍历标签集合
+ this.labelList.forEach(e=>{
+ if(e.color == item.color){
+ this.labelValue = e.name
+ this.remark = item.remark
+ this.number = 1
+ }
+ })
},
popupConfirm() {
@@ -213,6 +293,7 @@
radioChange(item) {
this.currentColorInfo = item
},
+ // 更新房屋标签
async popupConfirm() {
const {
id
@@ -223,11 +304,25 @@
} = this.currentColorInfo
let res = null
if (name === '撤销') {
- res = await removeHouseLabel(id)
+ if(this.number==1){
+ const data = {
+ labelId:id,
+ houseCode: this.houseCode
+ }
+ res = await removeHouseLabel(data)
+ }else{
+ uni.showToast({
+ title: "无可撤销项",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
} else {
res = await updateHouseLabel({
houseCode: this.houseCode,
labelId: id,
+ remark:this.remark,
color
})
}
@@ -239,53 +334,11 @@
})
return
}
- this.getLabelList()
+ // 刷新页面
+ this.getHouseDetailInfo()
this.popupShow = false
},
- // 获取房屋详情
- async getHouseDetailInfo() {
- const param = {
- houseCode : this.houseCode
- }
- const res = await getHouseDetail(param)
- if(null != res.data){
- const images = []
- const {
- phone,
- address,
- propertyPrice,
- serviceDue,
- imageUrls
- } = res.data
- if(imageUrls.length>0){
- const urls = imageUrls.split(',')
- // 遍历
- urls.forEach(e=>{
- images.push({
- url:minioBaseUrl + e,
- name: e
- })
- })
-
- }
- this.form = {
- phone,
- address,
- propertyPrice,
- serviceDue,
- imageUrls,
- images
- }
- }
- },
- // 获取房屋标签信息
- async getLabelList() {
- const param = {
- parentId:1001
- }
- const res = await getLabelListByParentId(param)
- this.labelBtnList = res.data
- },
+
}
}
</script>
diff --git a/subPackage/house/roomDetails/index.vue b/subPackage/house/roomDetails/index.vue
index 3f51dee..db8fa8a 100644
--- a/subPackage/house/roomDetails/index.vue
+++ b/subPackage/house/roomDetails/index.vue
@@ -34,18 +34,20 @@
<view class="flex">
关系:
<view class="flex a-i-c">
- <u-tag :text="item.relationship" size="mini"
- :bgColor="item.residentialStatus == 1 ? '#07C160' : '#1989FA'"></u-tag>
+ <u-tag :text="item.roleRelationName" size="mini"
+ :bgColor="item.relationship == 1 ? '#07C160' : '#1989FA'"></u-tag>
</view>
</view>
</view>
</view>
<view class="r flex f-d-c j-c-s-a">
<view>
- <u-button size='small' type="primary" :plain="true" text="资料管理"></u-button>
+ <u-button size='small' type="primary" :plain="true" text="资料管理"
+ @click="addOrupdateMember(2,item)"></u-button>
</view>
<view>
- <u-button size='small' type="primary" :plain="true" text="标签管理"></u-button>
+ <u-button size='small' type="primary" :plain="true" text="标签管理"
+ @click="goToHouseholdLabel(item)"></u-button>
</view>
</view>
</view>
@@ -55,10 +57,13 @@
<u-icon name="photo"></u-icon>
</view>
<view class="r">
- <u-icon name="trash-fill" color="red"></u-icon>
+ <u-icon name="trash-fill" color="red" @click="removeHouseholdSub(item)"></u-icon>
</view>
</view>
+
</view>
+ <u-modal :show="isHouseholdModelShow" width="auto" :showCancelButton="true" title="提示" content="请确认是否删除当前住户信息"
+ @cancel="isHouseholdModelShow = false" @confirm="deleteHousehold()"></u-modal>
<view class="mt-20 rent-out-box">
<box-title :title="'出租管理'"></box-title>
@@ -101,7 +106,7 @@
<view class="edit-btn">
<view>
- <u-button type="primary" text="添加成员" @click="addMember"></u-button>
+ <u-button type="primary" text="添加成员" @click="addOrupdateMember(1,{})"></u-button>
</view>
<view>
@@ -121,11 +126,16 @@
deleteRentalInfo,
updateDueTime
} from "@/api/houseRental/houseRental.js";
+ import {
+ removeHousehold
+ } from '@/api/house/household.js'
export default {
components: {},
data() {
return {
+ householdId:'',
+ isHouseholdModelShow:false,
currentId: '',
houseCode: '',
houseInfo: {
@@ -155,10 +165,9 @@
name: '已终止',
value: 2
},
- ]
+ ],
}
},
-
onLoad(e) {
const {
id
@@ -168,8 +177,35 @@
onShow() {
this.getHouseRentInfoList()
},
-
methods: {
+ // 跳转住户标签管理页面
+ goToHouseholdLabel(data){
+ data['houseCode'] = this.houseCode
+ var navData = JSON.stringify(data);
+ this.$u.func.globalNavigator(`/subPackage/house/member/householdLabel?data=${navData}`)
+ },
+ // 删除住户弹出
+ removeHouseholdSub(data){
+ this.householdId = data.id
+ this.isHouseholdModelShow = true
+ },
+ // 删除住户信息
+ deleteHousehold(){
+ removeHousehold(this.householdId).then(res=>{
+ const {code,data} = res
+ if (code !== 200) {
+ uni.showToast({
+ title: "删除失败",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
+ this.isHouseholdModelShow = false
+ this.getHouseRentInfoList()
+ })
+ },
+ // 获取租户信息
async getHouseRentInfoList() {
const res = await getHouseRentInfo(this.currentId)
if (res.code !== 200) {
@@ -217,9 +253,18 @@
addRental() {
const url = `/subPackage/bs/views/rentDetail?houseCode=${this.houseCode}`
this.$u.func.globalNavigator(url, "navTo")
- },
- addMember() {
- this.$u.func.globalNavigator('/subPackage/house/member/index')
+ },
+ // 用户资料管理页面跳转 1:新增 2:修改
+ addOrupdateMember(type,data={}) {
+ if(type==1){
+ data['type'] = 1
+ data['houseCode'] = this.houseCode
+ }
+ if(type==2){
+ data['type'] = 2
+ }
+ var navData = JSON.stringify(data);
+ this.$u.func.globalNavigator(`/subPackage/house/member/index?data=${navData}`)
},
editRent(item) {
const { houseCode, id } = item
diff --git a/subPackage/workbench/views/cscj.vue b/subPackage/workbench/views/cscj.vue
index 9619b36..c989ac6 100644
--- a/subPackage/workbench/views/cscj.vue
+++ b/subPackage/workbench/views/cscj.vue
@@ -5,20 +5,22 @@
<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 prop="placeName">
+ <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 prop="label">
+ <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>
@@ -46,11 +48,13 @@
</view>
<view class="item">
- <u-form-item class="form-item" labelWidth="100" required label="场所负责人:" prop="username">
+ <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 label="手机号:" prop="phone">
+ <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>
@@ -109,10 +113,10 @@
</view>
<view class="item">
- <lineItem :dataInfo="publicData.basic">
+ <lineItem :dataInfo="comprehensiveData.basic">
</lineItem>
- <lineItem :dataInfo="publicData.scene">
+ <lineItem :dataInfo="comprehensiveData.scene">
<template v-slot:pic="{scope}">
{{scope.value}}
</template>
@@ -163,7 +167,9 @@
},
data() {
return {
-
+ isRequired:false,
+ isRequiredPlace:true,
+ isDisabled:true,
showPicker: false,
pickerLoading: false,
pickColumns: [],
@@ -178,12 +184,12 @@
imageUrls: "",
},
rules: {
- // 'buildingCode': {
- // type: 'string',
- // required: true,
- // message: '请选择楼栋',
- // trigger: ['blur', 'change']
- // },
+ 'buildingCode': {
+ type: 'string',
+ required: true,
+ message: '请选择楼栋',
+ trigger: ['blur', 'change']
+ },
'placeName': {
type: 'string',
required: true,
@@ -319,7 +325,6 @@
showLabelList: [],
stdId: "",
- buildingData: {},
}
},
watch: {
@@ -331,11 +336,6 @@
"form.buildingCode": {
handler(newVal) {
console.log(newVal)
-
- this.getBuildingDetail({
- buildingCode: newVal
- })
-
}
}
@@ -350,21 +350,11 @@
options: {
styleIsolation: 'shared', // 解除样式隔离
},
- async onLoad(option) {
+ onLoad(option) {
this.stdId = option.stdId
console.log(this.stdId, "----------")
if (this.stdId) {
- const data = await this.getBuildingDetail()
- console.log(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("")
+ this.getBuildingDetail()
}
@@ -375,40 +365,21 @@
},
methods: {
- buildDataInfo() {
- let basic = [{
- label: "公安局",
- value: this.buildingData.branchName
- },
- {
- label: "派出所",
- value: this.buildingData.localPoliceStationName
- },
- {
- label: "辖区民警",
- value: this.buildingData.policeman
- },
- {
- label: "联系电话",
- value: this.buildingData.policemanPhone
- }
- ]
- this.publicData.basic = basic
- console.log(this.publicData)
-
- },
-
- async getBuildingDetail(params = {}) {
-
- const res = await getDoorplateAddressDetail(Object.assign(params, {
+ getBuildingDetail(params = {}) {
+ getDoorplateAddressDetail(Object.assign(params, {
stdId: this.stdId
- }))
+ })).then(res => {
+ let data = res.data
+ this.form.buildingCode = data.buildingCode
- let data = res.data
- this.buildingData = data
- this.buildDataInfo()
- return data
-
+ 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("")
+ })
},
//表单提交
@@ -430,8 +401,7 @@
success() {
setTimeout(() => {
that.$u.func.globalNavigator(
- "/pages/home/index",
- "switchTab")
+ "/pages/home/index", "switchTab")
}, 1000)
}
})
@@ -518,12 +488,10 @@
const streetRu = await this.getDoorplateAddressList(nei[0].code, "streetRu")
picker.setColumnValues(2, streetRu)
- const district = await this.getDoorplateAddressList(streetRu[0].code,
- "district")
+ const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
picker.setColumnValues(3, district)
- const building = await this.getDoorplateAddressList(district[0].code,
- "building")
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
picker.setColumnValues(4, building)
}
@@ -531,12 +499,10 @@
const streetRu = await this.getDoorplateAddressList(item.code, "streetRu")
picker.setColumnValues(2, streetRu)
- const district = await this.getDoorplateAddressList(streetRu[0].code,
- "district")
+ const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
picker.setColumnValues(3, district)
- const building = await this.getDoorplateAddressList(district[0].code,
- "building")
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
picker.setColumnValues(4, building)
}
@@ -545,8 +511,7 @@
const district = await this.getDoorplateAddressList(item.code, "district")
picker.setColumnValues(3, district)
- const building = await this.getDoorplateAddressList(district[0].code,
- "building")
+ const building = await this.getDoorplateAddressList(district[0].code, "building")
picker.setColumnValues(4, building)
}
@@ -641,7 +606,7 @@
.form-item {
background-color: #ffffff;
padding: 2rpx 10px;
- border-bottom: 1px solid #eff1f3;
+ border-bottom: 0.1px solid #eff1f3;
}
.label {
@@ -698,4 +663,4 @@
background-color: green;
border-radius: 0rpx 10rpx 10rpx 0rpx;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/subPackage/workbench/views/rental.vue b/subPackage/workbench/views/rental.vue
new file mode 100644
index 0000000..0b614df
--- /dev/null
+++ b/subPackage/workbench/views/rental.vue
@@ -0,0 +1,188 @@
+<template>
+ <view class="">
+ <view class="header bgc-ff">
+ <view class="filter-box">
+ <chenchuang-CCDropDownFilter :filterData='filterData' :defaultIndex='defaultIndex'
+ @ed='handleSelect'></chenchuang-CCDropDownFilter>
+ </view>
+ <view class="search-box">
+ <u-search placeholder="请输入租户名" v-model="keyword" :clearabled="true" :showAction="true" :animation="true"></u-search>
+ </view>
+ </view>
+
+ <view class="content">
+ <view class="row flex j-c-s-b a-i-c">
+ <view class="row-item bgc-ff flex a-i-c">
+ <view class="dot bgc-green"></view>
+ <text class="f-24">长期3户 (3)人</text>
+ </view>
+ <view class="row-item bgc-ff flex a-i-c">
+ <view class="dot bgc-main"></view>
+ <text class="f-24">长期3户 (3)人</text>
+ </view>
+ <view class="row-item bgc-ff flex a-i-c">
+ <view class="dot bgc-orange"></view>
+ <text class="f-24">长期3户 (3)人</text>
+ </view>
+ </view>
+
+ <view class="list bgc-ff" v-for="i in 3">
+ <view class="flex j-c-s-b a-i-c">
+ <view class="flex a-i-c">
+ <text class="f-32 mr-50">黄莺</text>
+ <view class="flex a-i-c">
+ <u-icon name="phone-fill" color="#017BFC"></u-icon>
+ <text class="f-28 ml-10">15180114174</text>
+ </view>
+ </view>
+ <u-tag text="未到期" type="success" plain plainFill></u-tag>
+ </view>
+ <view class="list-address f-28 c-99">
+ 江西省上饶市信州区西市街道万达社区居民委员会滨江西路66号万达晶座11栋303室
+ </view>
+ <view class="list-action flex ">
+ <view class="action-item">
+ <u-icon name="/static/icon/list-02.png" width="40rpx" height="40rpx"></u-icon>
+ <text class="f-28 c-main ml-10">租客管理</text>
+ </view>
+ <view class="action-item">
+ <u-icon name="/static/icon/list-01.png" width="40rpx" height="40rpx"></u-icon>
+ <text class="f-28 c-main ml-10">租客管理</text>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ filterData: [
+ [
+ {
+ name: '全部',
+ value: ''
+ },
+ {
+ name: '待审核',
+ value: '1'
+ },
+ {
+ name: '未到期',
+ value: '2'
+ },
+ {
+ name: '即将到期',
+ value: '3'
+ },
+ {
+ name: '已到期',
+ value: '3'
+ }
+ ],
+ [
+ {
+ name: '楼层',
+ value: ''
+ },
+ {
+ name: '1楼',
+ value: '1'
+ },
+ {
+ name: '2楼',
+ value: '2'
+ },
+ {
+ name: '3楼',
+ value: '3'
+ }
+ ]
+ ],
+ defaultIndex: [0, 0],
+ keyword:""
+ }
+ },
+
+ methods: {
+ handleSelect(res) {
+ console.log('选择res = ' + JSON.stringify(res));
+ },
+ }
+ }
+</script>
+<style lang="scss">
+ page {
+ background-color: #F5F5F5;
+ }
+ .header{
+ width:100%;
+ position: fixed;
+ top:0;
+ 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:220rpx;
+ 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
diff --git a/uni_modules/chenchuang-CCDropDownFilter/changelog.md b/uni_modules/chenchuang-CCDropDownFilter/changelog.md
new file mode 100644
index 0000000..a66d4ac
--- /dev/null
+++ b/uni_modules/chenchuang-CCDropDownFilter/changelog.md
@@ -0,0 +1,8 @@
+## 3.0.0(2023-09-29)
+修复vue3.0运行报错
+## 2.0.2(2023-08-13)
+修复微信小程序地区筛选不生效问题
+## 2.0.1(2023-07-17)
+组件优化 更改text字段为name
+## 2.0.0(2023-06-20)
+组件优化 发布uni_modules 版本
diff --git a/uni_modules/chenchuang-CCDropDownFilter/components/chenchuang-CCDropDownFilter/chenchuang-CCDropDownFilter.vue b/uni_modules/chenchuang-CCDropDownFilter/components/chenchuang-CCDropDownFilter/chenchuang-CCDropDownFilter.vue
new file mode 100644
index 0000000..6a2081f
--- /dev/null
+++ b/uni_modules/chenchuang-CCDropDownFilter/components/chenchuang-CCDropDownFilter/chenchuang-CCDropDownFilter.vue
@@ -0,0 +1,242 @@
+<template>
+ <view class="filter-wrapper" :style="{ height: height + 'rpx', top: top,'border-top':border?'1rpx solid #f2f2f2':'none' }" @touchmove.stop.prevent="discard">
+ <view class="inner-wrapper">
+ <view class="mask" :class="showMask ? 'show' : 'hide'" @tap="tapMask"></view>
+ <view class="navs">
+ <view class="c-flex-align" :class="{ 'c-flex-center': index > 0,'right c-flex-aligin': index == (navData.length-1), actNav: index === actNav }" v-for="(item, index) in navData" :key="index" @click="navClick(index)">
+ <!-- v-if改v-show -->
+ <view v-for="(child, childx) in item" :key="childx" v-show="child.select">{{ child.name }}</view>
+ <image src="https://i.loli.net/2020/07/15/QsHxlr1gbSImvWt.png" mode="" class="icon-triangle" v-if="index === actNav"></image>
+ <image src="https://i.loli.net/2020/07/15/xjVSvzWcH9NO7al.png" mode="" class="icon-triangle" v-else></image>
+ </view>
+
+
+ </view>
+ <scroll-view scroll-y="true" class="popup" :class="popupShow ? 'popupShow' : ''">
+ <view class="item-opt c-flex-align" :class="item.select ? 'actOpt' : ''" v-for="(item, index) in navData[actNav]" :key="index" @click="handleOpt(index)">
+ {{ item.name }}
+ </view>
+ </scroll-view>
+ </view>
+ </view>
+</template>
+
+<script>
+// import { getCurDateTime } from '@/libs/utils.js';
+export default {
+ props: {
+ height: {
+ type: Number,
+ default: 108
+ },
+ top: {
+ type: String,
+ default: 'calc(var(--window-statsu-bar) + 44px)'
+ },
+ border: {
+ type: Boolean,
+ default: false
+ },
+ filterData: {
+ //必填
+ type: Array,
+ default: () => {
+ return [];
+ }
+
+ },
+ defaultIndex: {
+ //默认选中条件索引,超出一类时必填
+ type: Array,
+ default: () => {
+ return [0];
+ }
+ }
+ },
+ data() {
+ return {
+ navData: [],
+ popupShow: false,
+ showMask: false,
+ actNav: null,
+ selDate: '选择日期',
+ selIndex: [] //选中条件索引
+ };
+ },
+ created() {
+ let that = this;
+ // 修复微信小程序选项设置问题
+ setTimeout(function() {
+
+ that.navData = that.filterData;
+ that.selIndex = that.defaultIndex;
+ that.keepStatus();
+ }, 200);
+
+ },
+ mounted() {
+
+
+ // this.selDate = getCurDateTime().formatDate;
+ },
+ methods: {
+ keepStatus() {
+ this.navData.forEach(itemnavData => {
+ itemnavData.map(child => {
+ child.select = false;
+ });
+ return itemnavData;
+ });
+ for (let i = 0; i < this.selIndex.length; i++) {
+ let selindex = this.selIndex[i];
+ this.navData[i][selindex].select = true;
+ }
+ },
+ navClick(index) {
+ if (index === this.actNav) {
+ this.tapMask();
+ return;
+ }
+ this.popupShow = true;
+ this.showMask = true;
+ this.actNav = index;
+ },
+ handleOpt(index) {
+ this.selIndex[this.actNav] = index;
+ this.keepStatus();
+ setTimeout(() => {
+ this.tapMask();
+ }, 100);
+ let data = [];
+ let res = this.navData.forEach(item => {
+ let sel = item.filter(child => child.select);
+ data.push(sel);
+ });
+ console.log(data);
+ this.$emit('onSelected', data);
+ },
+ dateClick() {
+ this.tapMask();
+ },
+ tapMask() {
+ this.showMask = false;
+ this.popupShow = false;
+ this.actNav = null;
+ },
+ handleDate(e) {
+ let d = e.detail.value;
+ this.selDate = d;
+ this.$emit('dateChange', d);
+ },
+ discard() {}
+ }
+};
+</script>
+
+<style lang="scss" scoped>
+page {
+ font-size: 28rpx;
+}
+.c-flex-align {
+ display: flex;
+ align-items: center;
+}
+.c-flex-center {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+}
+.filter-wrapper {
+ position: fixed;
+ left: 0;
+ width: 100%;
+ z-index: 999;
+ .inner-wrapper {
+ // position: relative;
+ .navs {
+ position: relative;
+ height: 90rpx;
+ padding: 0 40rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background-color: #fff;
+ // border-bottom: 2rpx solid #f5f6f9;
+ color: #8b9aae;
+ z-index: 999;
+ box-sizing: border-box;
+ & > view {
+ flex: 1;
+ height: 100%;
+ flex-direction: row;
+ z-index: 999;
+ justify-content: center;
+ }
+ .right {
+ // justify-content: flex-end;
+ }
+ .actNav {
+ color: #4d7df9;
+ font-weight: bold;
+ }
+ }
+ .mask {
+ z-index: 666;
+ position: fixed;
+ top: calc(var(--status-bar-height) + 44px);
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background-color: rgba(0, 0, 0, 0);
+ transition: background-color 0.15s linear;
+ &.show {
+ background-color: rgba(0, 0, 0, 0.01);
+ }
+ &.hide {
+ display: none;
+ }
+ }
+ .popup {
+ position: relative;
+ max-height: 500rpx;
+ background-color: #fff;
+ border-bottom-left-radius: 20rpx;
+ border-bottom-right-radius: 20rpx;
+ overflow: scroll;
+ z-index: 999;
+ transition: all 1s linear;
+ opacity: 0;
+ display: none;
+ .item-opt {
+ height: 80rpx;
+ padding: 0 40rpx;
+ color: #8b9aae;
+ border-bottom: 2rpx solid #f5f6f9;
+ }
+ .actOpt {
+ color: #4d7df9;
+ font-weight: bold;
+ position: relative;
+ &::after {
+ content: '✓';
+ font-weight: bold;
+ font-size: 36rpx;
+ position: absolute;
+ right: 40rpx;
+ }
+ }
+ }
+ .popupShow {
+ display: block;
+ opacity: 1;
+ }
+ }
+
+ .icon-triangle {
+ width: 16rpx;
+ height: 16rpx;
+ margin-left: 10rpx;
+ }
+}
+</style>
diff --git a/uni_modules/chenchuang-CCDropDownFilter/package.json b/uni_modules/chenchuang-CCDropDownFilter/package.json
new file mode 100644
index 0000000..985ab8a
--- /dev/null
+++ b/uni_modules/chenchuang-CCDropDownFilter/package.json
@@ -0,0 +1,84 @@
+{
+ "id": "chenchuang-CCDropDownFilter",
+ "displayName": "CCDropDownFilter下拉框 筛选框 仿美团下拉筛选框 下拉菜单",
+ "version": "3.0.0",
+ "description": "下拉框 筛选框 仿美团下拉筛选框 下拉菜单",
+ "keywords": [
+ "下拉框",
+ "筛选框",
+ "仿美团下拉筛选",
+ "下拉菜单"
+],
+ "repository": "",
+ "engines": {
+ "HBuilderX": "^3.7.0"
+ },
+ "dcloudext": {
+ "type": "component-vue",
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": ""
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ },
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y",
+ "钉钉": "y",
+ "快手": "y",
+ "飞书": "y",
+ "京东": "y"
+ },
+ "快应用": {
+ "华为": "y",
+ "联盟": "y"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/chenchuang-CCDropDownFilter/readme.md b/uni_modules/chenchuang-CCDropDownFilter/readme.md
new file mode 100644
index 0000000..b03ffaf
--- /dev/null
+++ b/uni_modules/chenchuang-CCDropDownFilter/readme.md
@@ -0,0 +1,222 @@
+# chenchuang-CCDropDownFilter
+
+#### 使用方法
+```使用方法
+<view style="width: 100vw; height: 40px; background-color: white;">
+
+ <!-- filterData:筛选数据 defaultIndex: 默认选择序列 @onSelected:选择事件 返回选择的值-->
+<chenchuang-CCDropDownFilter :filterData='filterData' :defaultIndex='defaultIndex'
+ @onSelected='onSelected'></chenchuang-CCDropDownFilter>
+
+</view>
+
+```
+
+#### HTML代码实现部分
+```html
+<template>
+ <view class="content">
+
+ <view style="margin-top: 16px;">
+
+ <view style="width: 100vw; height: 40px; background-color: white;">
+ <!-- filterData:筛选数据 defaultIndex: 默认选择序列 @onSelected:选择事件 返回选择的值-->
+ <chenchuang-CCDropDownFilter :filterData='filterData' :defaultIndex='defaultIndex'
+ @onSelected='onSelected'></chenchuang-CCDropDownFilter>
+ </view>
+
+ </view>
+
+ </view>
+</template>
+
+<script>
+ export default {
+ components: {
+
+
+
+ },
+ data() {
+ return {
+
+ filterData: [
+ [{
+ name: '全省',
+ value: ''
+ }],
+
+
+ [{
+ name: '美食',
+ value: ''
+ },
+ {
+ name: '湘菜',
+ value: '1'
+ },
+ {
+ name: '川菜',
+ value: '2'
+ },
+ {
+ name: '火锅',
+ value: '3'
+ }
+ ],
+
+ [{
+ name: '排序',
+ value: ''
+ },
+ {
+ name: '好评优先',
+ value: '1'
+ },
+ {
+ name: '销量优先',
+ value: '2'
+ },
+ {
+ name: '低价优先',
+ value: '3'
+ }
+ ],
+
+ [{
+ name: '筛选',
+ value: ''
+ },
+ {
+ name: '筛选1',
+ value: '1'
+ },
+ {
+ name: '筛选2',
+ value: '2'
+ }
+ ],
+ ],
+ defaultIndex: [0, 0, 0, 0]
+
+
+
+
+
+
+
+ }
+ },
+
+ mounted() {
+
+ let cityArr = ['广州市', '深圳市', '佛山市', '东莞市', '中山市', '珠海市', '江门市', '肇庆市', '惠州市', '汕头市', '潮州市', '揭阳市', '汕尾市',
+ '湛江市', '茂名市', '阳江市', '云浮市', '韶关市', '清远市', '梅州市', '河源市'
+ ]
+ let tmpArr = this.filterData;
+ for (let s of cityArr) {
+
+ tmpArr[0].push({
+ name: s,
+ value: s
+ });
+ console.log("s = ", s);
+ }
+ console.log("filterData = " + JSON.stringify(this.filterData));
+
+ this.filterData = tmpArr;
+
+
+
+
+ },
+ methods: {
+
+ onSelected(res) {
+
+ console.log('选择res = ' + JSON.stringify(res));
+ uni.showModal({
+ title: '下拉筛选选择数据',
+ content: '所选择数据 = ' + JSON.stringify(res)
+ })
+ },
+
+
+ }
+ }
+</script>
+
+<style scoped>
+ page {
+
+ background-color: '#F6F7FA';
+ }
+
+ .content {
+ display: flex;
+ flex-direction: column;
+ /* background-color: white; */
+
+
+ }
+
+ .mui-content-padded {
+ margin: 6px 14px;
+ /* background-color: #ffffff; */
+ }
+
+ .lineV {
+
+ margin-top: 0px;
+ margin-left: 15px;
+ width: calc(100vw - 30px);
+ height: 1px;
+ background-color: #F5F5F5;
+
+ }
+
+ .hotSearchTitV {
+ margin-left: 14px;
+ margin-top: 4px;
+ width: 170px;
+ height: 22px;
+ font-size: 14px;
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 500;
+ color: #161616;
+ line-height: 22px;
+ }
+
+ .upView {
+ display: flex;
+ flex-direction: row;
+ height: 26px;
+ margin-left: 0px;
+ }
+
+ .cellView {
+ margin-top: 4px;
+ margin-left: 5.8px;
+ height: 18px;
+ line-height: 18px;
+ text-align: center;
+ border-radius: 2px;
+ padding: 0px 4px !important;
+ font-size: 10px;
+
+ background-color: #f5f5f5;
+ color: #818183;
+ }
+
+ .moreBtn {
+
+ height: 30px;
+ /* background-color: #F5F5F5; */
+ text-align: center;
+ font-size: 12px;
+ line-height: 30px;
+ color: #888888;
+ }
+</style>
+
+```
--
Gitblit v1.9.3