From fdef23064b801a06bbf369785dbbc14db14b707f Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 22 Mar 2024 17:15:53 +0800
Subject: [PATCH] 回滚代码至2月28日
---
pages/circle/index.vue | 33
static/icon/menu-20.png | 0
subPackage/police/policeSituationDetail.vue | 440 ++
static/img/center-bg-2.png | 0
subPackage/police/people.vue | 278 +
subPackage/workbench/views/editExamine.vue | 351 +
subPackage/workbench/components/rentForm.vue | 170
static/icon/nav-bg-15.png | 0
pages/home/index.vue | 839 ++-
subPackage/reside/record.vue | 109
static/icon/menu-19.png | 0
static/img/tabbar-06.png | 0
components/tabBar/tabBar.vue | 84
static/img/block-bg.png | 0
static/img/tabbar-04-selected.png | 0
subPackage/house/member/add.vue | 1247 ++++++
static/icon/menu-22.png | 0
subPackage/bs/components/form/rentForm.vue | 124
subPackage/workbench/components/cateSelector.vue | 19
subPackage/reside/list.vue | 287 +
static/icon/menu-17.png | 0
mixin/uploadMixinPicCheck.js | 158
api/place/place.js | 9
subPackage/label/bail.vue | 8
api/user.js | 1
subPackage/statistics/index.vue | 81
static/img/tabbar-04.png | 0
pages/circle/publish.vue | 71
subPackage/article/signature.vue | 149
static/icon/menu-24.png | 0
api/reside/reside.js | 66
subPackage/house/houseNumber/index.vue | 48
static/icon/nav-bg-18.png | 0
store/index.js | 3
subPackage/article/detail.vue | 146
static/icon/menu-15.png | 0
mixin/uploadMixin.js | 27
subPackage/reside/edit.vue | 258 +
subPackage/workbench/views/reformList.vue | 8
static/img/tabbar-05-selected.png | 0
pages/home/index.scss | 262 +
static/icon/nav-bg-16.png | 0
subPackage/house/roomControl/myHouse.vue | 562 ++
static/img/tabbar-07.png | 0
static/img/tabbar-07-selected.png | 0
subPackage/house/member/index.vue | 320
components/btn/actionBtn.vue | 118
subPackage/workbench/views/editCscj.vue | 441 +
subPackage/workbench/views/rental.vue | 15
static/icon/menu-26.png | 0
static/icon/menu-13.png | 0
subPackage/user/commentList/evaluateList.vue | 2
api/houseRental/houseRental.js | 26
static/icon/nav-15.png | 0
subPackage/police/peopleDetail.vue | 85
subPackage/reside/detail.vue | 149
static/icon/menu-11.png | 0
subPackage/bs/views/rentDetail.vue | 52
subPackage/police/onLine.vue | 197
static/img/tabbar-05.png | 0
pages/home/selectSite.vue | 49
static/icon/menu-28.png | 0
api/reporting/reporting.js | 2
static/icon/nav-17.png | 0
api/placeExp/placeExp.js | 9
static/icon/menu-center-06.png | 0
subPackage/user/about/about.vue | 8
subPackage/task/index.vue | 63
pages.json | 158
api/police/police.js | 46
static/icon/menu-18.png | 0
subPackage/house/roomControl/index.vue | 142
pages/user/center.vue | 71
subPackage/workbench/components/formItem.vue | 191
subPackage/workbench/components/formItem.vue.bak | 48
subPackage/workbench/views/tradingList.vue | 330 +
subPackage/workbench/views/cscj.vue | 454 +
pages/home/index4.vue | 113
static/icon/menu-21.png | 0
api/statistics/statistics.js | 9
static/icon/menu-16.png | 0
api/house/householdLabel.js | 9
subPackage/workbench/views/examine.vue | 223 +
subPackage/police/policeSituation.vue | 252 +
static/icon/menu-23.png | 0
pages/statistics/index.vue | 648 +++
static/icon/login-title-ys.png | 0
subPackage/bs/views/repairList.vue | 5
subPackage/workbench/views/cshw.vue | 13
pages/login/login-account.vue | 842 ++--
static/img/tabbar-06-selected.png | 0
static/icon/menu-27.png | 0
mixin/uploadMixinPlace.js | 2
static/icon/menu-14.png | 0
components/caption/caption.vue | 49
subPackage/label/form.vue | 47
subPackage/workbench/views/audit.vue | 35
common/common.js | 109
static/icon/nav-bg-17.png | 0
static/icon/menu-12.png | 0
static/icon/menu-center-05.png | 0
api/house/house.js | 15
manifest.json | 4
subPackage/workbench/views/auditSite.vue | 319 +
static/icon/menu-25.png | 0
static/icon/nav-16.png | 0
common/setting.js | 73
subPackage/house/family/index.vue | 51
subPackage/workbench/views/auditRental.vue | 712 +++
109 files changed, 10,783 insertions(+), 1,561 deletions(-)
diff --git a/api/house/house.js b/api/house/house.js
index e4e059a..18e9992 100644
--- a/api/house/house.js
+++ b/api/house/house.js
@@ -19,7 +19,7 @@
}
//获取小区详情
-export const getDistrictDetail=(param)=>{
+export const getDistrictDetail = (param) => {
return http.request({
url: 'blade-district/district/getDetail',
method: 'GET',
@@ -28,10 +28,21 @@
}
//获取社区概况数据统计 (数据驾驶舱)
-export const getHouseStatistics =(param)=>{
+export const getHouseStatistics = (param) => {
return http.request({
url: 'blade-house/house/getHouseStatistics',
method: 'GET',
params: param
})
+}
+
+
+
+//获取房屋数据
+export const getHouseList = (param) => {
+ return http.request({
+ url: 'blade-house/house/page',
+ method: 'GET',
+ params: param
+ })
}
\ No newline at end of file
diff --git a/api/house/householdLabel.js b/api/house/householdLabel.js
index f7bf8e6..051c04b 100644
--- a/api/house/householdLabel.js
+++ b/api/house/householdLabel.js
@@ -18,4 +18,13 @@
method: 'POST',
data
})
+}
+
+//设置房屋标签
+export const setHouseLabel = (data) => {
+ return http.request({
+ url: 'blade-householdLabel/householdLabel/saveOrUpdateHouseLabel',
+ method: 'POST',
+ data
+ })
}
\ No newline at end of file
diff --git a/api/houseRental/houseRental.js b/api/houseRental/houseRental.js
index ebb3ff4..85776b1 100644
--- a/api/houseRental/houseRental.js
+++ b/api/houseRental/houseRental.js
@@ -75,12 +75,22 @@
method: 'GET',
params
})
-}
-
-export const confirmHouseRental = (data) => {
- return http.request({
- url: 'blade-houseRental/houseRental/confirmHouseRental',
- method: 'POST',
- data
- })
+}
+
+//出租房审核
+export const confirmHouseRental = (data) => {
+ return http.request({
+ url: 'blade-houseRental/houseRental/confirmHouseRental',
+ method: 'POST',
+ data
+ })
+}
+
+//出租房审核
+export const getRentalDetail = (params) => {
+ return http.request({
+ url: 'blade-houseTenant/houseTenant/detail',
+ method: 'GET',
+ params
+ })
}
\ No newline at end of file
diff --git a/api/place/place.js b/api/place/place.js
index 5017384..976bb18 100644
--- a/api/place/place.js
+++ b/api/place/place.js
@@ -95,4 +95,13 @@
method: 'POST',
data: data
})
+}
+
+
+export const getPlaceList = (params) => {
+ return http.request({
+ url: '/blade-doorplateAddress/doorplateAddress/getPlaceList',
+ method: 'GET',
+ params
+ })
}
\ No newline at end of file
diff --git a/api/placeExp/placeExp.js b/api/placeExp/placeExp.js
index 0b6f1d1..777c3b6 100644
--- a/api/placeExp/placeExp.js
+++ b/api/placeExp/placeExp.js
@@ -33,4 +33,13 @@
method: 'GET',
params
})
+}
+
+//审核场所从业人员
+export const auditPlacePeople = (data) => {
+ return http.request({
+ url: '/blade-placePractitioner/placePractitioner/auditing',
+ method: 'POST',
+ data
+ })
}
\ No newline at end of file
diff --git a/api/police/police.js b/api/police/police.js
new file mode 100644
index 0000000..02bd849
--- /dev/null
+++ b/api/police/police.js
@@ -0,0 +1,46 @@
+import http from '@/http/api.js'
+
+// 查询警情处理记录
+export const getPoliceAlarmRecords = (params) => {
+ return http.request({
+ url: '/blade-policeAlarmRecords/policeAlarmRecords/page',
+ method: 'get',
+ params: params
+ })
+}
+
+// 查询警情处理记录
+export const getPoliceDetail = (params) => {
+ return http.request({
+ url: '/blade-policeAlarmRecords/policeAlarmRecords/detail',
+ method: 'get',
+ params: params
+ })
+}
+
+// 查询警情处理记录
+export const updateInfo = (data) => {
+ return http.request({
+ url: '/blade-policeAlarmRecords/policeAlarmRecords/update',
+ method: 'post',
+ data: data
+ })
+}
+
+// 重点人员记录
+export const gethouseholdPage = (params) => {
+ return http.request({
+ url: '/blade-household/household/page',
+ method: 'get',
+ params: params
+ })
+}
+
+// 重点人员详情
+export const gethouseholdDetail = (params) => {
+ return http.request({
+ url: '/blade-household/household/getDetail',
+ method: 'get',
+ params: params
+ })
+}
\ No newline at end of file
diff --git a/api/reporting/reporting.js b/api/reporting/reporting.js
index f5ab196..ae5a86e 100644
--- a/api/reporting/reporting.js
+++ b/api/reporting/reporting.js
@@ -106,7 +106,7 @@
//获取打金店、二手车交易、二手手机维修详情
export const getLabelReportingDetail = (params) => {
return http.request({
- url: '/blade-taskLabelReportingEvent/taskLabelReportingEvent/detail',
+ url: '/blade-taskLabelReportingEvent/taskLabelReportingEvent/getDetail',
method: 'get',
params: {
...params
diff --git a/api/reside/reside.js b/api/reside/reside.js
new file mode 100644
index 0000000..55af82a
--- /dev/null
+++ b/api/reside/reside.js
@@ -0,0 +1,66 @@
+import http from '@/http/api.js'
+
+//获取居住证申请列表
+export const getResideApplyList = (params) => {
+ return http.request({
+ url: '/blade-taskResidencePermitApply/taskResidencePermitApply/page',
+ method: 'get',
+ params: {
+ ...params
+ }
+ })
+}
+
+//添加居住证申请
+export const saveResideApply = (data) => {
+ return http.request({
+ url: '/blade-taskResidencePermitApply/taskResidencePermitApply/save',
+ method: 'POST',
+ data: data
+ })
+}
+
+//编辑居住证申请
+export const updateResideApply = (data) => {
+ return http.request({
+ url: '/blade-taskResidencePermitApply/taskResidencePermitApply/update',
+ method: 'POST',
+ data: data
+ })
+}
+
+
+
+
+//获取居住证申请详情
+export const getResideApplyDetail = (params) => {
+ return http.request({
+ url: '/blade-taskResidencePermitApply/taskResidencePermitApply/detail',
+ method: 'get',
+ params: {
+ ...params
+ }
+ })
+}
+
+
+//审核居住证申请
+export const auditResideApply = (data) => {
+ return http.request({
+ url: '/blade-taskResidencePermitApply/taskResidencePermitApply/auditing',
+ method: 'POST',
+ data: data
+ })
+}
+
+
+//获取居住证申请提交记录列表
+export const getResideApplyRecord = (params) => {
+ return http.request({
+ url: '/blade-taskResidencePermitApply/taskResidencePermitApply/list',
+ method: 'get',
+ params: {
+ ...params
+ }
+ })
+}
\ No newline at end of file
diff --git a/api/statistics/statistics.js b/api/statistics/statistics.js
index 3d11e8e..d00bf2d 100644
--- a/api/statistics/statistics.js
+++ b/api/statistics/statistics.js
@@ -20,6 +20,15 @@
})
}
+//获取社区概况数据统计 (数据驾驶舱)
+export const getHouseLabelStatistic =(param)=>{
+ return http.request({
+ url: 'blade-house/house/getHouseLabelStatistic',
+ method: 'GET',
+ params: param
+ })
+}
+
// 获取住户数据统计 (数据驾驶舱)
export const getHouseholdStatistics = (params) => {
return http.request({
diff --git a/api/user.js b/api/user.js
index 5b1991c..41ff5d4 100644
--- a/api/user.js
+++ b/api/user.js
@@ -97,6 +97,7 @@
// 获取用户信息
export const getUser = (id) => {
+ console.log('************************', id)
return http.request({
url: '/blade-system/user/detail',
method: 'GET',
diff --git a/common/common.js b/common/common.js
index 0ad6457..31ff8a2 100644
--- a/common/common.js
+++ b/common/common.js
@@ -69,11 +69,16 @@
// 文件路径转字符串
export const formattingUrls = (urls) => {
- let arr = [];
- for (let i of urls) {
- arr.push(i.name);
+ if (!urls.length) {
+ return ""
+ } else {
+ let arr = [];
+ for (let i of urls) {
+ arr.push(i.name);
+ }
+ return arr.join(",")
}
- return arr.join(",")
+
}
//转换标签颜色
@@ -88,4 +93,100 @@
return obj[i]
}
}
+}
+
+
+export const getTabbarList = (roleType = 1) => {
+ if (roleType == 1) { //居民
+ return [{
+ name: '首页',
+ iconPathSelected: '/static/img/tabbar-01-selected.png',
+ iconPath: '/static/img/tabbar-01.png',
+ url: '/pages/home/index'
+ },
+ // {
+ // name: '圈子',
+ // iconPathSelected: '/static/img/tabbar-02-selected.png',
+ // iconPath: '/static/img/tabbar-02.png',
+ // url: '/pages/circle/index'
+ // },
+ {
+ name: '我的',
+ iconPathSelected: '/static/img/tabbar-03-selected.png',
+ iconPath: '/static/img/tabbar-03.png',
+ url: '/pages/user/center'
+ }
+ ]
+ } else if (roleType == 2) { //民警
+ return [{
+ name: '首页',
+ iconPathSelected: '/static/img/tabbar-04-selected.png',
+ iconPath: '/static/img/tabbar-04.png',
+ url: '/pages/home/index'
+ },
+
+ {
+ name: '驾驶舱',
+ iconPathSelected: '/static/img/tabbar-05-selected.png',
+ iconPath: '/static/img/tabbar-05.png',
+ url: '/pages/statistics/index'
+ },
+
+
+ {
+ name: '我的',
+ iconPathSelected: '/static/img/tabbar-06-selected.png',
+ iconPath: '/static/img/tabbar-06.png',
+ url: '/pages/user/center'
+ }
+ ]
+ } else if (roleType == 3) { // 网格员
+ return [{
+ name: '首页',
+ iconPathSelected: '/static/img/tabbar-01-selected.png',
+ iconPath: '/static/img/tabbar-01.png',
+ url: '/pages/home/index'
+ },
+
+ // {
+ // name: '圈子',
+ // iconPathSelected: '/static/img/tabbar-02-selected.png',
+ // iconPath: '/static/img/tabbar-02.png',
+ // url: '/pages/circle/index'
+ // },
+ {
+ name: '驾驶舱',
+ iconPathSelected: '/static/img/tabbar-07-selected.png',
+ iconPath: '/static/img/tabbar-07.png',
+ url: '/pages/statistics/index'
+ },
+
+ {
+ name: '我的',
+ iconPathSelected: '/static/img/tabbar-03-selected.png',
+ iconPath: '/static/img/tabbar-03.png',
+ url: '/pages/user/center'
+ }
+ ]
+ } else if (roleType == 4) { //系统管理员
+ return [{
+ name: '首页',
+ iconPathSelected: '/static/img/tabbar-01-selected.png',
+ iconPath: '/static/img/tabbar-01.png',
+ url: '/pages/home/index'
+ },
+ {
+ name: '驾驶舱',
+ iconPathSelected: '/static/img/tabbar-07-selected.png',
+ iconPath: '/static/img/tabbar-07.png',
+ url: '/pages/statistics/index'
+ },
+ {
+ name: '我的',
+ iconPathSelected: '/static/img/tabbar-03-selected.png',
+ iconPath: '/static/img/tabbar-03.png',
+ url: '/pages/user/center'
+ }
+ ]
+ }
}
\ No newline at end of file
diff --git a/common/setting.js b/common/setting.js
index 3833aec..69c2027 100644
--- a/common/setting.js
+++ b/common/setting.js
@@ -2,38 +2,41 @@
* 全局变量配置
*/
module.exports = {
- // 应用名,
- name: '饶城格格通',
- // 应用logo,支持本地路径和网络路径
- logo: '/static/images/base.ico',
- // 版本号
- version: '2.0.0',
- // 开发环境接口Url
- // devUrl: 'http://z4042833u6.wicp.vip',
- // devUrl: 'http://192.168.2.140:9528',
- devUrl: 'https://srgdjczzxtpt.com:2080/api',
- // devUrl: 'https://kt39592615.goho.co',
- minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
- // minioBaseUrl: "http://192.168.0.101:9528/",
- // 数据中台接口url
- dataCenterUrl: 'https://sk.hubeishuiyi.cn/services',
- //洪水预报接口url
- hsybUrl: "https://sk.hubeishuiyi.cn/hsybApi/api/fh-admin",
- // 线上环境接口Url
- prodUrl: 'https://srgdjczzxtpt.com:2080/api',
- // 后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8
- contentType: 'application/json;charset=UTF-8',
- // 后端返回状态码
- codeName: 'code',
- // 操作正常code
- successCode: 200,
- // 登录失效code
- invalidCode: 401,
- // 客户端ID
- clientId: 'rider',
- // 客户端密钥
- clientSecret: 'rider_secret',
- // token过期时间(秒)
- // 30天 30*24*60*60
- tokenTime: 2592000,
-}
\ No newline at end of file
+ // 应用名,
+ name: "社区网格治理",
+ // 应用logo,支持本地路径和网络路径
+ logo: "/static/images/base.ico",
+ // 版本号
+ version: "2.0.0",
+ // 开发环境接口Url
+ // devUrl: 'http://z4042833u6.wicp.vip',
+ devUrl: 'https://srgdjczzxtpt.com:2080/api',
+ // devUrl: "http://192.168.2.140:9528",
+ // devUrl: 'https://kt39592615.goho.co',
+ minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
+ // minioBaseUrl: "http://192.168.0.101:9528/",
+ // 数据中台接口url
+ dataCenterUrl: "https://sk.hubeishuiyi.cn/services",
+ //洪水预报接口url
+ hsybUrl: "https://sk.hubeishuiyi.cn/hsybApi/api/fh-admin",
+ // 线上环境接口Url
+ prodUrl: "https://srgdjczzxtpt.com:2080/api",
+
+ // prodUrl: 'http://192.168.2.140:9528',
+
+ // 后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8
+ contentType: "application/json;charset=UTF-8",
+ // 后端返回状态码
+ codeName: "code",
+ // 操作正常code
+ successCode: 200,
+ // 登录失效code
+ invalidCode: 401,
+ // 客户端ID
+ clientId: "rider",
+ // 客户端密钥
+ clientSecret: "rider_secret",
+ // token过期时间(秒)
+ // 30天 30*24*60*60
+ tokenTime: 2592000,
+};
diff --git a/components/btn/actionBtn.vue b/components/btn/actionBtn.vue
new file mode 100644
index 0000000..d1a7c78
--- /dev/null
+++ b/components/btn/actionBtn.vue
@@ -0,0 +1,118 @@
+<template>
+ <view class="">
+ <view class="footer flex a-i-c j-c-s-b">
+ <button class="footer-btn" @click="submit(2)">通过</button>
+ <button class="footer-btn" @click="open()">驳回</button>
+ </view>
+ <u-modal :show="isShowModal" title="备注" :showConfirmButton="false">
+ <view class="modal-content">
+ <u-textarea v-model="remark" placeholder="请输入驳回原因"></u-textarea>
+ <view class="modal-btn flex j-c-s-b a-i-c" slot="confirmButton">
+ <button class="modal-btn-item c-main f-30" @click="isShowModal = false">取消</button>
+ <button class="modal-btn-item bgc-main f-30 c-ff" @click="submit(3)">确定</button>
+ </view>
+ </view>
+ </u-modal>
+ </view>
+</template>
+
+<script>
+ export default {
+ name: "auditAction",
+ data() {
+ return {
+ isShowModal: false,
+ remark: ""
+ }
+ },
+ methods: {
+ open() {
+ this.isShowModal = true;
+ },
+ close() {
+ this.isShowModal = false;
+ },
+
+ submit(type) {
+ let data = {
+ type,
+ remark: this.remark
+ }
+
+ if (type == 3 && !this.remark) {
+ uni.showToast({
+ title: "请输入驳回原因",
+ icon: "none"
+ })
+ return
+ }
+
+ this.$emit("handle", data)
+ if (type == 3) {
+ this.close()
+ }
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .footer {
+ width: 100%;
+ padding: 20rpx 30rpx;
+ box-sizing: border-box;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ background-color: #fff;
+ z-index: 10;
+ padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
+ z-index: 999;
+ background-color: #fff;
+ box-shadow: 0rpx 0rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
+
+ .footer-btn {
+ width: 300rpx;
+ height: 78rpx;
+ border-radius: 8rpx;
+ font-size: 32rpx;
+ color: #fff;
+ border: none;
+ background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
+ }
+
+ .footer-btn:after {
+ border: none;
+ }
+
+ }
+
+ .modal-content {
+ width: 100%;
+
+ .modal-btn {
+ width: 100%;
+ padding: 40rpx 0 0;
+
+ .modal-btn-item {
+ width: 240rpx;
+ height: 74rpx;
+ line-height: 74rpx;
+ border-radius: 35rpx;
+ border: none;
+ padding: 0;
+ margin: 0;
+ }
+
+ .modal-btn-item:first-child {
+ border: 1px solid currentColor;
+ background: transparent;
+ }
+
+ }
+ }
+
+ /deep/ .u-modal__content {
+ padding-bottom: 20rpx !important;
+ }
+</style>
\ No newline at end of file
diff --git a/components/caption/caption.vue b/components/caption/caption.vue
index 2fec3fd..6aceefa 100644
--- a/components/caption/caption.vue
+++ b/components/caption/caption.vue
@@ -1,51 +1,60 @@
<template>
<view class="caption flex a-i-c j-c-s-b">
<view class="flex a-i-c">
- <view class="line"></view>
- <text class="f-32 fw">{{title}}</text>
+ <view class="line" :style="{backgroundColor:bgColor}"></view>
+ <text class=" fw" :style="{fontSize:fontSize}">{{title}}</text>
</view>
- <view class="caption-right" v-if="isLink" @click="navTo()">
+ <view class="caption-right" v-if="isLink" @click="navTo()">
<text class="f-26 c-99">更多</text>
- <u-icon name="arrow-right" color="#999" size="14" ></u-icon>
+ <u-icon name="arrow-right" color="#999" size="14"></u-icon>
</view>
-
+
</view>
</template>
<script>
export default {
- name:"captionRow",
- props:{
- title:String, //左侧标题
- isLink:{ //是否展示右侧箭头并开启点击反馈
- type:Boolean,
- default:false
+ name: "captionRow",
+ props: {
+ title: String, //左侧标题
+ isLink: { //是否展示右侧箭头并开启点击反馈
+ type: Boolean,
+ default: false
},
- url:String //点击后跳转的URL地址
+ url: String, //点击后跳转的URL地址
+ fontSize: {
+ type: String,
+ value: '32rpx'
+ },
+ bgColor: {
+ type: String,
+ value: '#017BFC'
+ }
},
- methods:{
- navTo(){
+ methods: {
+ navTo() {
uni.navigateTo({
- url:this.url
+ url: this.url
})
}
}
}
</script>
-<style lang="scss" scoped>
+<style lang="scss" scoped>
.caption {
width: 100%;
padding: 30rpx 0 0;
-
+
.line {
width: 6rpx;
height: 28rpx;
- background-color: #017BFC;
+ // background-color: #017BFC;
margin-right: 14rpx;
}
- .caption-right{
- width:120rpx;
+
+ .caption-right {
+ width: 120rpx;
display: flex;
justify-content: flex-end;
align-items: center;
diff --git a/components/tabBar/tabBar.vue b/components/tabBar/tabBar.vue
index e047ef0..d8e8d2e 100644
--- a/components/tabBar/tabBar.vue
+++ b/components/tabBar/tabBar.vue
@@ -1,8 +1,11 @@
<template>
<view>
- <u-tabbar class="custom-tabbar" zIndex="100" :value="currentTab" :fixed="true" :active-color="activeColor"
- :inactive-color="inactiveColor" @change='change'>
- <u-tabbar-item v-for="(item,index) in curTabList" :icon="item.icon" :key="index" :text="item.name">
+ <u-tabbar class="custom-tabbar" zIndex="9999" :value="current" :fixed="true" :active-color="activeColor"
+ :inactive-color="inactiveColor">
+ <u-tabbar-item :text="item.name" @click="changeTabbar(item.url,index,item.name)"
+ v-for="(item,index) in tabbarList" :key="index">
+ <image class="tabbar-icon" slot="active-icon" :src="item.iconPathSelected"></image>
+ <image class="tabbar-icon" slot="inactive-icon" :src="item.iconPath"></image>
</u-tabbar-item>
</u-tabbar>
</view>
@@ -11,67 +14,58 @@
<script>
export default {
props: {
- currentTab: {},
+ current: Number,
+ list: {
+ type: Array,
+ default: () => []
+ }
},
data() {
return {
- inactiveColor: '#909399',
- activeColor: '#328CFA',
-
-
- curTabList: [{
- name: '首页',
- iconPathSelected: '',
- iconPath: '',
- icon: "home",
- url: '/pages/home/index'
- },
- {
- name: '个人中心',
- iconPathSelected: '',
- iconPath: '',
- icon: "account-fill",
- url: '/pages/user/center'
- }
- ]
+ tabbarList: [],
+ inactiveColor: '#C7CED7',
+ activeColor: '#017BFC',
+ // activeColor: '#003399'
}
},
watch: {
- tabList: {
+ list: {
handler(newVal) {
if (newVal && newVal.length > 0) {
- this.tabList = newVal
+ this.tabbarList = newVal;
+ if (uni.getStorageSync("activeRole").roleName == "民警") {
+ this.inactiveColor = "#AFB8C3";
+ this.activeColor = "#003399";
+ } else {
+ this.inactiveColor = "#C7CED7"
+ this.activeColor = "#017BFC";
+ }
}
},
deep: true,
immediate: true
- },
- currentTab: {
- handler(newVal) {
- this.currentTab = newVal
- },
- deep: true,
- immediate: true
- },
+ }
},
- mounted() {
- // this.getMessage()
- },
- destroyed() {
- },
methods: {
- change(e) {
- this.$emit("change", this.curTabList[e].url)
- },
-
+ changeTabbar(url, index) {
+ if (this.current == index) return
+ uni.switchTab({
+ url
+ })
+ this.$emit("change", index)
+ }
}
}
</script>
<style lang="scss" scoped>
- .u-page_item_slot_icon {
- width: 40rpx;
- height: 40rpx;
+ .tabbar-icon {
+ width: 56rpx;
+ height: 56rpx;
+ }
+
+ /deep/.u-tabbar {
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(107, 134, 159, 0.2);
}
</style>
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index 399d6eb..5ea198f 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,6 @@
{
"name" : "饶城格格通",
- "appid" : "__UNI__EE88272",
+ "appid" : "__UNI__A3B9E26",
"description" : "",
"versionName" : "1.0.10",
"versionCode" : 104,
@@ -142,7 +142,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
- "appid" : "wx41aa8a5d2e565a05",
+ "appid" : "wxc92dcfb4afc3e34b",
"setting" : {
"urlCheck" : false,
"minified" : true,
diff --git a/mixin/uploadMixin.js b/mixin/uploadMixin.js
index a0d38e4..d031c93 100644
--- a/mixin/uploadMixin.js
+++ b/mixin/uploadMixin.js
@@ -64,14 +64,14 @@
},
//上传成功后对返回数据进行处理
- async afterReadImg(event,key="images") {
+ async afterReadImg(event, key = "images") {
// console.log(key)
// console.log(this.form[key]);
this.showLoading()
var that = this;
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
let lists = [].concat(event.file)
-
+
let fileListLen = this.form[key].length
lists.map((item) => {
this.form[key].push({
@@ -84,11 +84,11 @@
const result = await this.uploadFilePromise(lists[i].url)
that.form[key].splice(fileListLen, 1, Object.assign({}, {
url: result.data.link,
- name:result.data.name
+ name: result.data.name
}))
fileListLen++
}
-
+
// let fileListLen = this.form.images.length
// lists.map((item) => {
// this.form.images.push({
@@ -105,22 +105,25 @@
// }))
// fileListLen++
// }
-
-
+
+
this.loadingClose()
},
-
+
//删除图片
- deletePic(event,key="images") {
+ deletePic(event, key = "images") {
+
+ console.log(111)
+
this.form[key].splice(event.index, 1)
},
-
- deletePics(event,key) {
- console.log(event,key);
+
+ deletePics(event, key) {
+ console.log(event, key);
this[key].splice(event.index, 1)
},
-
+
showLoading() {
uni.showLoading({
mask: true,
diff --git a/mixin/uploadMixinPicCheck.js b/mixin/uploadMixinPicCheck.js
new file mode 100644
index 0000000..9d89848
--- /dev/null
+++ b/mixin/uploadMixinPicCheck.js
@@ -0,0 +1,158 @@
+import {
+ devUrl,
+ prodUrl,
+ clientId,
+ clientSecret
+} from '@/common/setting'
+
+import {
+ Base64
+} from '@/utils/base64.js';
+export default {
+ data() {
+ return {
+ form: {
+ images: []
+ },
+
+ uploadConfig: {
+ acceptImg: "image",
+ acceptVideo: 'video',
+ capture: ['album', 'camera'],
+ multiple: true,
+ maxCount: "5",
+ previewFullImage: true,
+ uploadText: "上传中",
+ url: prodUrl + "/blade-resource/oss/endpoint/put-file-attach-by-prefix-path"
+ },
+ }
+ },
+
+ created() {
+ this.getHeader()
+ },
+
+ methods: {
+ //获取头部
+ getHeader() {
+ let accessToken = uni.getStorageSync('accessToken');
+ let myHeader = {}
+ if (accessToken) {
+ myHeader['Blade-Auth'] = 'bearer ' + accessToken;
+ }
+ // 客户端认证参数
+ myHeader['Authorization'] = 'Basic ' + Base64.encode(clientId + ':' + clientSecret);
+ this.uploadConfig.header = myHeader
+ },
+
+ //上传方法
+ uploadFilePromise(url) {
+ return new Promise((resolve, reject) => {
+ let a = uni.uploadFile({
+ url: this.uploadConfig.url, //接口地址
+ filePath: url,
+ name: 'file',
+ header: this.uploadConfig.header,
+ formData: {
+ prefixPath: "",
+ isCheck: 1
+ },
+ success: (res) => {
+ let data = JSON.parse(res.data)
+ if (data.code == 200) {
+ //校验没有违法违规进行自己业务代码处理
+ setTimeout(() => {
+ resolve(data)
+ }, 1000)
+ } else {
+ // if (checkResult.errcode == '87014') {
+ uni.hideLoading();
+ if (data.code == 201) {
+ uni.showModal({
+ title: '提示!',
+ content: '存在敏感内容,请更换图片',
+ showCancel: false,
+ confirmText: '明白了'
+ })
+ resolve(data)
+ } else {
+ this.$showTips(data.msg)
+ }
+
+ }
+ }
+ });
+ })
+ },
+
+ //上传成功后对返回数据进行处理
+ async afterReadImg(event, key = "images") {
+ this.showLoading()
+ var that = this;
+ // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
+ let lists = [].concat(event.file)
+ let fileListLen = this.form[key].length
+ lists.map((item) => {
+ this.form[key].push({
+ ...item,
+ status: 'uploading',
+ message: '上传中'
+ })
+ })
+ for (let i = 0; i < lists.length; i++) {
+ const result = await this.uploadFilePromise(lists[i].url)
+ console.log("result", result);
+ if (result.code != 200) { //移除上传失败的图片
+ that.form[key].splice(i, 1)
+ return
+ };
+ that.form[key].splice(fileListLen, 1, Object.assign({}, {
+ url: result.data.link,
+ name: result.data.name
+ }))
+ fileListLen++
+ }
+
+ // let fileListLen = this.form.images.length
+ // lists.map((item) => {
+ // this.form.images.push({
+ // ...item,
+ // status: 'uploading',
+ // message: '上传中'
+ // })
+ // })
+ // for (let i = 0; i < lists.length; i++) {
+ // const result = await this.uploadFilePromise(lists[i].url)
+ // that.form.images.splice(fileListLen, 1, Object.assign({}, {
+ // url: result.data.link,
+ // name:result.data.name
+ // }))
+ // fileListLen++
+ // }
+
+
+ this.loadingClose()
+ },
+
+
+ //删除图片
+ deletePic(event, key = "images") {
+ this.form[key].splice(event.index, 1)
+ },
+
+ deletePics(event, key) {
+ console.log(event, key);
+ this[key].splice(event.index, 1)
+ },
+
+ showLoading() {
+ uni.showLoading({
+ mask: true,
+ title: '上传中'
+ })
+ },
+ loadingClose() {
+ uni.hideLoading()
+ },
+ }
+}
\ No newline at end of file
diff --git a/mixin/uploadMixinPlace.js b/mixin/uploadMixinPlace.js
index d245761..6a78b6a 100644
--- a/mixin/uploadMixinPlace.js
+++ b/mixin/uploadMixinPlace.js
@@ -73,7 +73,7 @@
var that = this;
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
let lists = [].concat(event.file)
-
+ console.log("form====>", this.form);
let fileListLen = this.form[key].length
lists.map((item) => {
this.form[key].push({
diff --git a/pages.json b/pages.json
index 4000c69..6fa59e7 100644
--- a/pages.json
+++ b/pages.json
@@ -12,6 +12,15 @@
"navigationStyle": "custom"
}
},
+
+ {
+ "path": "pages/statistics/index",
+ "style": {
+ "navigationBarTitleText": "驾驶舱",
+ "enablePullDownRefresh": true
+ }
+ },
+
{
"path": "pages/user/center",
"style": {
@@ -251,7 +260,6 @@
"navigationBarTextStyle": "black"
}
}
-
]
},
//便民热线
@@ -378,7 +386,7 @@
"pages": [{
"path": "index",
"style": {
- "navigationBarTitleText": "我的任务",
+ "navigationBarTitleText": "待办事项",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
@@ -457,7 +465,7 @@
{
"path": "views/audit",
"style": {
- "navigationBarTitleText": "标签事件",
+ "navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
@@ -472,6 +480,17 @@
"navigationBarTextStyle": "black"
}
},
+
+ {
+ "path": "views/auditSite",
+ "style": {
+ "navigationBarTitleText": "场所任务",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black"
+ }
+ },
+
{
"path": "views/cshw",
"style": {
@@ -634,6 +653,24 @@
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
+ },
+ {
+ "path": "views/tradingList",
+ "style": {
+ "navigationBarTitleText": "二手交易",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black"
+ }
+ },
+ {
+ "path": "views/auditRental",
+ "style": {
+ "navigationBarTitleText": "出租屋详情",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black"
+ }
}
]
},
@@ -789,9 +826,27 @@
}
},
{
+ "path": "member/add",
+ "style": {
+ "navigationBarTitleText": "人口采集",
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
"path": "roomControl/index",
"style": {
"navigationBarTitleText": "房屋管理",
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
+ "path": "roomControl/myHouse",
+ "style": {
+ "navigationBarTitleText": "我的房屋",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black",
"enablePullDownRefresh": false
@@ -824,6 +879,7 @@
"navigationBarTextStyle": "black"
}
},
+
{
"path": "houseNumber/siteInspect",
"style": {
@@ -874,16 +930,102 @@
}
}
]
+ },
+
+ //居住证
+ {
+ "root": "subPackage/reside",
+ "pages": [{
+ "path": "list",
+ "style": {
+ "navigationBarTitleText": "居住证管理",
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
+ "path": "edit",
+ "style": {
+ "navigationBarTitleText": "居住证申请",
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black",
+ "enablePullDownRefresh": false
+ }
+ },
+
+ {
+ "path": "detail",
+ "style": {
+ "navigationBarTitleText": "居住证详情",
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
+ "path": "record",
+ "style": {
+ "navigationBarTitleText": "居住证列表",
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black",
+ "enablePullDownRefresh": false
+ }
+ }
+ ]
+ },
+
+ {
+ "root": "subPackage/police",
+ "pages": [{
+ "path": "policeSituation",
+ "style": {
+ "navigationBarTitleText": "警情处置",
+ // "enablePullDownRefresh": false
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black"
+ }
+
+ }, {
+ "path": "policeSituationDetail",
+ "style": {
+ "navigationBarTitleText": "警情处置",
+ "enablePullDownRefresh": false
+ }
+
+ }, {
+ "path": "onLine",
+ "style": {
+ "navigationBarTitleText": "巡逻打卡",
+ "enablePullDownRefresh": false
+ }
+
+ }, {
+ "path": "people",
+ "style": {
+ "navigationBarTitleText": "重点人员管理",
+ "enablePullDownRefresh": false
+ }
+
+ },
+ {
+ "path": "peopleDetail",
+ "style": {
+ "navigationBarTitleText": "重点人员",
+ "enablePullDownRefresh": false
+ }
+ }
+ ]
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
- "navigationBarTitleText": "饶城格格通",
+ "navigationBarTitleText": "社区网格治理",
"navigationBarBackgroundColor": "#fff",
"backgroundColor": "#4586FE"
},
"tabBar": {
- // "custom": true,
+ "custom": true,
"color": "#AFB8C3",
"selectedColor": "#5086FA",
"borderStyle": "white",
@@ -901,6 +1043,12 @@
// "text": "圈子"
// },
{
+ "pagePath": "pages/statistics/index",
+ "iconPath": "static/img/tabbar-02.png",
+ "selectedIconPath": "static/img/tabbar-02-selected.png",
+ "text": "驾驶舱"
+ },
+ {
"pagePath": "pages/user/center",
"iconPath": "static/img/tabbar-03.png",
"selectedIconPath": "static/img/tabbar-03-selected.png",
diff --git a/pages/circle/index.vue b/pages/circle/index.vue
index 21fb455..e1980f5 100644
--- a/pages/circle/index.vue
+++ b/pages/circle/index.vue
@@ -81,11 +81,15 @@
</view>
</view>
</z-paging>
+
+ <tabBar :current="1" :list="tabList" />
+
</view>
</template>
<script>
+ import tabBar from "@/components/tabBar/tabBar.vue"
import {
getList,
handleLike,
@@ -95,7 +99,13 @@
import {
minioBaseUrl
} from "@/common/setting.js"
+ import {
+ getTabbarList
+ } from "@/common/common.js"
export default {
+ components: {
+ tabBar
+ },
data() {
return {
keyword: "",
@@ -110,15 +120,22 @@
page: 1,
isSearch: false,
commentList: [],
- envVersion:""
+ envVersion: "",
+ tabList: []
}
},
onLoad() {
+
+
let role = uni.getStorageSync('activeRole')
- if (role.roleAlias == "inhabitant") {
+ if (role.roleName == "居民") {
+ this.tabList = getTabbarList(1);
this.roleType = 0
} else {
+ if (role.roleName == '网格员') {
+ this.tabList = getTabbarList(3);
+ }
this.roleType = 1;
}
// this.getCircleList()
@@ -127,9 +144,9 @@
this.$refs.paging.reload();
})
},
-
-
- onShow(){
+
+
+ onShow() {
let accountInfo = wx.getAccountInfoSync();
this.envVersion = accountInfo.miniProgram.envVersion;
},
@@ -142,9 +159,9 @@
// },
methods: {
-
-
- showAvatar(src){
+
+
+ showAvatar(src) {
return `${minioBaseUrl}${src}`
},
diff --git a/pages/circle/publish.vue b/pages/circle/publish.vue
index b5930b7..53b1a56 100644
--- a/pages/circle/publish.vue
+++ b/pages/circle/publish.vue
@@ -21,8 +21,10 @@
</template>
<script>
- import uploadMixin from "@/mixin/uploadMixin";
- import { handlePublish } from "@/api/circle/circle.js"
+ import uploadMixin from "@/mixin/uploadMixinPicCheck";
+ import {
+ handlePublish
+ } from "@/api/circle/circle.js"
export default {
mixins: [uploadMixin],
data() {
@@ -30,50 +32,55 @@
form: {
images: []
},
- content:"",
- roleType:0
+ content: "",
+ roleType: 0
}
},
-
- onLoad(){
- let role = uni.getStorageSync('activeRole')
- if(role.roleAlias == "inhabitant"){
+
+ onLoad() {
+ let role = uni.getStorageSync('activeRole')
+ if (role.roleAlias == "inhabitant") {
this.roleType = 0
- }else {
+ } else {
this.roleType = 1;
}
},
-
+
methods: {
-
- getImagesUrl(){
- if(this.form.images.length){
+
+ getImagesUrl() {
+ if (this.form.images.length) {
let arr = [];
- for(let i of this.form.images){
+ for (let i of this.form.images) {
arr.push(i.name)
}
return arr.join(",")
- }else {
+ } else {
return ""
- }
+ }
},
-
+
submitInfo() {
- handlePublish({
- circleText:this.content,
- circleImages:this.getImagesUrl(),
- circleType:this.roleType
- }).then(res=>{
- if(res.code == 200){
- uni.showToast({
- title:res.msg
- })
- setTimeout(()=>{
- uni.navigateBack();
- uni.$emit("refreshList")
- },1000)
- }
- })
+ let param = {
+ circleText: this.content,
+ circleImages: this.getImagesUrl(),
+ circleType: this.roleType,
+ }
+ let role = uni.getStorageSync('activeRole')
+ if (role.roleAlias == "inhabitant") {
+ param.houseCode = uni.getStorageSync("siteInfo").houseCode
+ }
+ handlePublish(param).then(res => {
+ if (res.code == 200) {
+ uni.showToast({
+ title: res.msg
+ })
+ setTimeout(() => {
+ uni.navigateBack();
+ uni.$emit("refreshList")
+ }, 1000)
+ }
+ })
}
}
}
diff --git a/pages/home/index.scss b/pages/home/index.scss
new file mode 100644
index 0000000..d0bbc7d
--- /dev/null
+++ b/pages/home/index.scss
@@ -0,0 +1,262 @@
+page {
+ color: #333;
+ width: 100%;
+ height: 100%;
+ // background-color: #f5f5f5;
+ background-color:#fff;
+ }
+
+ .layout {
+ width: 100%;
+ height: 100%;
+ }
+
+ .top {
+ width: 530rpx;
+ .top-text {
+ max-width: 85%;
+ margin-right: 20rpx;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+
+ .swiper {
+ width: 100%;
+ height: 400rpx;
+ // background: linear-gradient(180deg, #017BFC 0%, rgba(1, 123, 252, 0) 100%);
+ padding: 0 30rpx;
+ box-sizing: border-box;
+ }
+
+ .content {
+ padding: 20rpx 30rpx 0;
+ border-radius: 50rpx 50rpx 0 0;
+ position:relative;
+ top:-52rpx;
+ }
+
+ // .grid {
+ // margin-top: 20rpx;
+ // margin-bottom: 10rpx;
+ // }
+ .nav {
+ padding: 10rpx 0;
+ margin-bottom: 20rpx;
+ border-radius: 0 0 10rpx 10rpx;
+
+ .nav-item {
+ padding: 10rpx 0;
+ }
+
+ .nav-item-text {
+ font-family: PingFang SC;
+ font-weight: 500;
+ color: #585b61;
+ }
+ }
+
+
+ .section {
+ .section-item {
+ width: 216rpx;
+ height: 120rpx;
+ position: relative;
+ }
+
+ .section-item-bg {
+ width: 216rpx;
+ height: 120rpx;
+ }
+
+ .item-box {
+ width: 216rpx;
+ height: 120rpx;
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding: 20rpx 20rpx 0;
+ box-sizing: border-box;
+ }
+ }
+
+
+
+ .block {
+ .block-item,.module-item {
+ position: relative;
+
+ }
+
+ .block-item,
+ .block-item-bg,
+ .block-item-box {
+ width: 220rpx;
+ height: 150rpx;
+ border-radius: 10rpx;
+ }
+
+ .block-item-box {
+ padding: 0 12rpx;
+ box-sizing: border-box;
+ position: absolute;
+ top: 0;
+ left: 0;
+
+ }
+
+
+ .module-item,
+ .module-item-bg,
+ .module-item-box {
+ width: 330rpx;
+ height: 160rpx;
+ border-radius: 20rpx;
+ }
+
+ .module-item-box {
+ padding: 0 12rpx;
+ box-sizing: border-box;
+ position: absolute;
+ top: 0;
+ left: 0;
+ border-radius: 20rpx;
+
+ }
+
+
+ .badge{
+ position:absolute;
+ top:10rpx;
+ right:20rpx
+ }
+
+ .item-text {
+ height: 70rpx;
+ margin-left: 20rpx;
+ color: #fff;
+ }
+ .module-text{
+ height:90rpx;
+ margin-left:20rpx;
+ color: #fff;
+ }
+
+ .opacity {
+ opacity: .6;
+ }
+ }
+
+ .cell {
+ padding: 0 16rpx;
+ height: 64rpx;
+ border-radius: 8rpx;
+ margin-right: 20rpx;
+ margin-top: 30rpx;
+
+ .cell-text {
+ margin-left: 16rpx;
+ }
+ }
+
+ .grid-item {
+ // width: 153rpx;
+ // height: 153rpx;
+ // border-radius: 16rpx 16rpx 16rpx 16rpx;
+ // justify-content: center;
+ // background:linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)
+
+ }
+ .grid-icon{
+ width:100rpx;
+ height:100rpx;
+ border-radius: 24rpx;
+ background: linear-gradient( 180deg, #FFFFFF 6%, #E3EFF9 99%);
+ }
+
+ .row {
+ width: 100%;
+ margin: 30rpx 0;
+
+ .row-item {
+ width: 330rpx;
+ height: 134rpx;
+ box-shadow: 0rpx 10rpx 10rpx 0rpx rgba(0, 0, 0, 0.02);
+ border-radius: 16rpx 16rpx 16rpx 16rpx;
+ }
+ }
+
+ .p-20 {
+ padding:20rpx;
+ border-radius: 10rpx;
+ }
+
+ .pb-20 {
+ padding-bottom: 20rpx;
+ }
+
+ .tabs {
+
+ border-radius: 10rpx;
+ // border-radius: 10rpx 10rpx 0 0;
+ // margin-bottom: 4rpx;
+ background-color: rgb(236, 244, 255);
+ margin-bottom:30rpx;
+ padding:5rpx;
+
+ .tabs-item {
+ // padding: 12rpx 24rpx;
+ height:70rpx;
+ line-height: 70rpx;
+ flex: 1;
+ text-align: center;
+ font-size:32rpx;
+ color:#333;
+ }
+
+ .tabs-active {
+ border-radius:4rpx ;
+ // border-radius: 10rpx 10rpx 0 0;
+ // background-color: rgb(236, 244, 255);
+ // color: #017BFC;
+ // color: rgb(236, 244, 255);
+ // background-color: #017BFC;
+ background-color: #fff;
+ font-weight: bold;
+ }
+ }
+ .house-nav{
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(107,134,159,0.2);
+ margin-bottom:30rpx;
+ }
+
+ .menu-tabs {
+ padding: 20rpx 0;
+ }
+
+ .menu {
+ border-radius: 0 0 10rpx 10rpx;
+ box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(107,134,159,0.2);
+ }
+
+ /deep/.u-cell__title-text {
+ font-size: 32rpx !important;
+ font-weight: bold;
+ color: #000;
+ position: relative;
+
+ }
+ /deep/.u-cell__title-text::before{
+ content: '';
+ width: 6rpx;
+ height: 28rpx;
+ background-color: #003399;
+ // background-color: #017BFC;
+ // margin-right: 14rpx;
+ position:absolute;
+ left:-20rpx;
+ top:6rpx;
+ display: inline-block;
+ }
+
\ No newline at end of file
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 0843bea..4c638c0 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -1,27 +1,17 @@
<template>
<view class="layout">
- <!-- <u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder @leftClick="selectBoxShow = !selectBoxShow"
- bgColor="#017BFC">
- <view slot="left" class="top flex">
- <view class="top-text f-30 fw c-ff">{{curSelectSite.name?curSelectSite.name:'暂无绑定' +roleTypeName+'信息'}}
- </view>
- <u-icon name="arrow-down" color="#fff"></u-icon>
- </view>
- </u-navbar> -->
-
<u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder @leftClick="navToSelectSite()"
- bgColor="#017BFC">
+ :bgColor="background.top">
<view slot="left" class="top flex">
<view class="top-text f-30 fw c-ff">{{curSelectSite.name?curSelectSite.name:'暂无绑定' +roleTypeName+'信息'}}
</view>
<u-icon name="arrow-right" color="#fff"></u-icon>
</view>
</u-navbar>
-
- <view class="swiper">
+ <view class="swiper" :style="{background:background.banner}">
<u-swiper :list="bannerList" height="320rpx" radius="10"></u-swiper>
</view>
- <view class="content">
+ <view class="content bgc-ff">
<view class="">
<view class="section flex j-c-s-a a-i-c mb-20" v-if="isShowContact && curSelectSite.addressType == 1">
<view class="section-item" v-for="(i,k) in contactList" :key="k" v-if="i.name"
@@ -30,48 +20,79 @@
<view class="item-box">
<view class="f-28">{{i.title}}</view>
<view class="flex j-c-s-b">
- <text class="f-22">{{i.name}}</text>
+ <text class="f-26 fw">{{i.name}}</text>
<u-icon :name="i.icon" @click.stop="callPhone(i.phone)"></u-icon>
</view>
</view>
</view>
</view>
- <view class="block flex a-i-c j-c-s-b mb-20" v-if="roleType == 1 || roleType == 3">
- <view @click="scan" class="block-item">
- <image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
- <view class="block-item-box flex a-i-c ">
- <u-icon name="/static/icon/nav-05.png" width="65rpx" height="65rpx"></u-icon>
- <view class="item-text flex f-d-c j-c-s-b">
- <text class="f-24 fw">扫一扫</text>
- <text class="f-22 opacity">场所采集</text>
+ <view class="block flex a-i-c j-c-s-b mb-20" v-if="roleType == 1">
+ <view @click="scan" class="module-item">
+ <image class="module-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
+ <view class="module-item-box flex a-i-c ">
+ <u-icon name="/static/icon/nav-05.png" width="90rpx" height="90rpx"></u-icon>
+ <view class="module-text flex f-d-c j-c-s-b">
+ <text class="f-28 fw">扫一扫</text>
+ <text class="f-24 opacity">场所采集</text>
</view>
</view>
</view>
- <view class="block-item" @click="navigatorPage('/subPackage/user/clockIn/index')">
- <image class="block-item-bg" src="/static/icon/nav-bg-05.png" mode="aspectFill" />
- <view class="block-item-box flex a-i-c">
- <u-icon name="/static/icon/nav-06.png" width="65rpx" height="65rpx"></u-icon>
- <view class="item-text flex f-d-c j-c-s-b">
- <text class="f-24 fw">打卡登记</text>
- <text class="f-22 opacity">在线打卡</text>
+ <view class="module-item" @click="navigatorPage('/subPackage/user/clockIn/index')">
+ <image class="module-item-bg" src="/static/icon/nav-bg-05.png" mode="aspectFill" />
+ <view class="module-item-box flex a-i-c">
+ <u-icon name="/static/icon/nav-06.png" width="90rpx" height="90rpx"></u-icon>
+ <view class="module-text flex f-d-c j-c-s-b">
+ <text class="f-28 fw">打卡登记</text>
+ <text class="f-24 opacity">在线打卡</text>
</view>
</view>
</view>
- <view class="block-item" @click="navigatorPage('/subPackage/statistics/index')">
+ <!-- <view class="block-item" @click="navigatorPage('/subPackage/statistics/index')">
<image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
<view class="block-item-box flex a-i-c">
- <u-icon name="/static/icon/nav-12.png" width="65rpx" height="65rpx"></u-icon>
+ <u-icon name="/static/icon/nav-12.png" width="70rpx" height="70rpx"></u-icon>
<view class="item-text flex f-d-c j-c-s-b">
- <text class="f-24 fw">驾驶舱</text>
- <text class="f-22 opacity">数据统计</text>
+ <text class="f-28 fw">驾驶舱</text>
+ <text class="f-24 opacity">数据统计</text>
+ </view>
+ </view>
+ </view> -->
+
+
+ </view>
+
+
+
+ <view class="block flex a-i-c j-c-s-b mb-20" v-if="roleType == 3">
+ <view @click="scan" class="module-item">
+ <image class="module-item-bg" src="/static/img/block-bg.png" mode="aspectFill" />
+
+ <view class="module-item-box flex a-i-c j-c-c ">
+ <u-icon name="/static/icon/nav-16.png" width="90rpx" height="90rpx"></u-icon>
+ <view class="module-text flex f-d-c j-c-s-b" style="margin-left: 20rpx;">
+ <text class="f-32 fw">扫一扫</text>
+ <text class="f-26 opacity">场所采集</text>
+ </view>
+ </view>
+ </view>
+
+ <view class="module-item" @click="navigatorPage('/subPackage/task/index')">
+ <image class="module-item-bg" src="/static/img/block-bg.png" mode="aspectFill" />
+ <view class="module-item-box flex a-i-c j-c-c">
+ <u-icon name="/static/icon/nav-17.png" width="90rpx" height="90rpx"></u-icon>
+ <view class="module-text flex f-d-c j-c-s-b" style="margin-left: 20rpx;">
+ <text class="f-32 fw">待办事项</text>
+ <text class="f-26 opacity">我的任务</text>
+ </view>
+ <view class="badge" v-if="taskCount > 0">
+ <u-badge type="error" max="99" :value="taskCount"></u-badge>
</view>
</view>
</view>
</view>
- <view class="nav bgc-ff" v-if="liveList.length || roleType == 2">
- <!-- <caption-row title="生活" /> -->
+ <!-- <view class="nav bgc-ff" v-if="liveList.length || roleType == 2">
<u-grid :border="false" col="4">
<block v-if="liveList.length">
<u-grid-item @click.native="navigatorPage(i.path)" v-for="(i,k) in liveList" :key="k">
@@ -90,21 +111,119 @@
</u-grid-item>
</block>
</u-grid>
- </view>
- </view>
+ </view> -->
- <view class="bgc-ff p-20 mb-20 pb-20" v-if="isShowHouse">
- <caption-row title="楼盘表" />
- <view class="flex flex-wrap">
- <view class="cell bgc-main flex a-i-c" v-for="(item, index) in houseDataList.slice(0, 6)"
- @click.native="pushPage(item)" :key="index">
- <u-icon name="/static/icon/floor.png" width="32rpx" height="32rpx"></u-icon>
- <text class="cell-text f-26 c-ff">{{item.title}}</text>
+
+ <view class="" v-if="roleType == 2 && curSelectSite.addressType == 1">
+ <view class="tabs flex">
+ <view class="tabs-item" :class="k == tabIndex?'tabs-active':''" v-for="(i,k) in tabs"
+ @click="changeTabs(k)">
+ {{i.name}}
+ </view>
+ </view>
+
+ <view class="nav bgc-ff">
+ <u-grid :border="false" col="4">
+ <u-grid-item @click="navigatorPage(i.path)" v-for="(i,k) in tabs[tabIndex].list" :key="k">
+ <view class="nav-item flex f-d-c a-i-c">
+ <u-icon :name="i.icon" width="80rpx" height="80rpx"></u-icon>
+ <text class="nav-item-text f-26 mt-10">{{i.text}}</text>
+ </view>
+ </u-grid-item>
+ </u-grid>
</view>
</view>
+
+ <view v-if="roleType == 2 && curSelectSite.addressType == 2">
+ <view class="tabs flex">
+ <view class="tabs-item" :class="k == tabIndex?'tabs-active':''" v-for="(i,k) in tabs2"
+ @click="changeTabs(k)">
+ {{i.name}}
+ </view>
+ </view>
+ <view class="nav bgc-ff">
+ <u-grid :border="false" col="4">
+ <u-grid-item @click="navigatorPage(i.path)" v-for="(i,k) in tabs2[tabIndex].list" :key="k">
+ <view class="nav-item flex f-d-c a-i-c">
+ <u-icon :name="i.icon" width="80rpx" height="80rpx"></u-icon>
+ <text class="nav-item-text f-26 mt-10">{{i.text}}</text>
+ </view>
+ </u-grid-item>
+ <block v-if="tabIndex == 1">
+ <u-grid-item @click="navigatorPage('/subPackage/label/form')"
+ v-if="curSelectSite.isFront == 1">
+ <view class="nav-item flex f-d-c a-i-c">
+ <u-icon name="/static/icon/nav-11.png" width="80rpx" height="80rpx"></u-icon>
+ <text class="nav-item-text f-26 mt-10">二手交易</text>
+ </view>
+ </u-grid-item>
+ <u-grid-item @click="navigatorPage('/subPackage/label/check')"
+ v-if="curSelectSite.isNine == 1">
+ <view class="nav-item flex f-d-c a-i-c">
+ <u-icon name="/static/icon/nav-11.png" width="80rpx" height="80rpx"></u-icon>
+ <text class="nav-item-text f-26 mt-10">消防自查</text>
+ </view>
+ </u-grid-item>
+ </block>
+ <block v-if="tabIndex == 2">
+ <u-grid-item @click="navToSiteList()">
+ <view class="nav-item flex f-d-c a-i-c">
+ <u-icon name="/static/icon/nav-11.png" width="80rpx" height="80rpx"></u-icon>
+ <text class="nav-item-text f-26 mt-10">场所任务</text>
+ </view>
+ </u-grid-item>
+ </block>
+ </u-grid>
+ </view>
+
+ </view>
+
</view>
- <view class="bgc-ff mb-20 p-20 pb-20" v-if="jobList.length">
+
+ <view class="house-nav bgc-ff p-20 mb-20" v-if="isShowHouse">
+ <u-collapse accordion :border="false" ref="myCollapse">
+ <u-collapse-item name="1" title="楼盘表"></uni-title>
+ <view class="flex flex-wrap">
+ <view class="cell bgc-main flex a-i-c" v-for="(item, index) in houseDataList.slice(0, 6)"
+ @click.native="pushPage(item)" :key="index">
+ <u-icon name="/static/icon/floor.png" width="32rpx" height="32rpx"></u-icon>
+ <text class="cell-text f-26 fw c-ff">{{item.title}}</text>
+ </view>
+ </view>
+ </u-collapse-item>
+ </u-collapse>
+ </view>
+
+ <view class=" mb-20 " v-if="sectionList.length">
+ <view class="tabs flex">
+ <view class="tabs-item" :class="k == menuTabIndex?'tabs-active':''" v-for="(i,k) in sectionList"
+ @click="changeMenuTabs(k)">
+ {{i.name}}
+ </view>
+ </view>
+ <view class="menu bgc-ff p-20 pb-20">
+ <u-grid :border="false" col="4">
+ <u-grid-item @click="navigatorPage(item.path)"
+ v-for="(item, index) in sectionList[menuTabIndex].children" :index="index" :key="index"
+ :customStyle="{paddingTop:20+'rpx'}">
+ <view class="grid-item flex f-d-c a-i-c">
+ <view class="grid-icon flex a-ic j-c-c" :style="{background:item.background}">
+ <u-icon :name="item.pictureImg" width="64rpx" height="64rpx"></u-icon>
+ </view>
+
+
+
+
+ <text class="grid-text f-24 fw mt-10">{{item.name}}</text>
+ </view>
+ </u-grid-item>
+ </u-grid>
+ </view>
+ </view>
+
+
+ <!-- <view class="bgc-ff mb-20 p-20 pb-20" v-if="jobList.length">
<caption-row title="工作台" />
<u-grid :border="false" col="4">
<u-grid-item @click="navigatorPage(item.path)" v-for="(item, index) in jobList" :index="index"
@@ -114,18 +233,10 @@
<text class="grid-text f-24 fw mt-10">{{item.name}}</text>
</view>
</u-grid-item>
- <!-- <u-grid-item @click="navigatorPage('/subPackage/house/houseNumber/siteInspect')"
- :customStyle="{paddingTop:20+'rpx'}">
- <view class="grid-item flex f-d-c a-i-c"
- style="background:linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)">
- <u-icon name="/static/icon/menu-02.png" width="60rpx" height="60rpx"></u-icon>
- <text class="grid-text f-24 fw mt-10">场所检查</text>
- </view>
- </u-grid-item> -->
</u-grid>
- </view>
+ </view> -->
- <view class="bgc-ff mb-20 p-20 pb-20" v-if="(roleType == 2) && (curSelectSite.addressType == 2)">
+ <!-- <view class="bgc-ff mb-20 p-20 pb-20" v-if="(roleType == 2) && (curSelectSite.addressType == 2)">
<caption-row title="工作台" />
<u-grid :border="false" col="4">
<u-grid-item @click="navigatorPage('/subPackage/workbench/views/editExamine')"
@@ -144,9 +255,10 @@
</view>
</u-grid-item>
</u-grid>
- </view>
+ </view> -->
+
<view class="p-20 bgc-ff mb-20" v-if="isShowNotice">
- <caption-row title="通知公告" :is-link="true" url="/subPackage/article/list" />
+ <caption-row title="通知公告" font="34rpx" :is-link="true" url="/subPackage/article/list" />
<notice-list :data="notice" />
</view>
@@ -154,7 +266,7 @@
@close="selectBoxShow = false" :show="selectBoxShow" keyName="name" ref="uPicker" :columns="siteColumns"
@confirm="confirmSite" @change="changeSite" @cancel="selectBoxShow = false"></u-picker>
</view>
-
+ <tabBar :current="0" :list="tabList" />
</view>
</template>
@@ -163,7 +275,10 @@
getFuncList,
getHouseList
} from "@/api/doorplateAddress/doorplateAddress";
-
+ import {
+ getUser,
+ updateUserInfo
+ } from "@/api/user.js"
import {
getPage
} from "@/api/article/article";
@@ -181,15 +296,26 @@
import {
getPublicSecurityDetail
} from "@/api/grid/grid.js"
+ import {
+ getCountTypeNumber
+ } from "@/api/task/task.js"
+ import tabBar from "@/components/tabBar/tabBar.vue"
+ import {
+ getTabbarList
+ } from "@/common/common.js"
export default {
components: {
noticeList,
- captionRow
+ captionRow,
+ tabBar
},
data() {
return {
jobList: [],
+ time: 0,
+ userGPS: false,
+ location: {},
roleType: 2, // 1网格员/系统管理员 、 2居民 3民警
roleTypeName: "街道社区网格",
selectBoxShow: false,
@@ -252,12 +378,167 @@
path: "/subPackage/article/list?type=1"
}
- ]
+ ],
+
+ tabs: [{
+ name: '公众服务',
+ list: [
+ // {
+ // icon: "/static/icon/nav-02.png",
+ // text: "公共报事",
+ // path: '/subPackage/bs/views/repair'
+ // },
+ {
+ icon: "/static/icon/nav-02.png",
+ text: "公共维修",
+ path: "/subPackage/bs/views/addRepair?title=公共维修&type=1"
+ },
+ {
+ icon: "/static/icon/nav-02.png",
+ text: "居家维修",
+ path: "/subPackage/bs/views/addRepair?title=居家维修&type=2"
+ },
+ {
+ icon: "/static/icon/nav-04.png",
+ text: "矛盾纠纷",
+ path: "/subPackage/bs/views/addRepair?title=矛盾纠纷&type=3"
+ },
+ {
+ icon: "/static/icon/nav-11.png",
+ text: "投诉举报",
+ path: "/subPackage/bs/views/addRepair?title=投诉举报&type=4"
+ },
+ {
+ icon: "/static/icon/nav-03.png",
+ text: "便民热线",
+ path: '/subPackage/hotLine/index'
+ },
+ ]
+ },
+ {
+ name: '生活服务',
+ list: [{
+ text: "租客上报",
+ path: "/subPackage/bs/views/zhsb",
+ icon: "/static/icon/nav-04.png"
+ },
+ {
+ text: "居住证申请",
+ path: "/subPackage/reside/edit",
+ icon: "/static/icon/nav-13.png"
+ }
+ ]
+ },
+ {
+ name: '社区服务',
+ list: [{
+ text: "选举调查",
+ icon: "/static/icon/nav-14.png",
+ path: "/subPackage/article/communityList?type=1"
+
+ },
+ {
+ text: "公益报名",
+ icon: "/static/icon/nav-13.png",
+ path: "/subPackage/article/signUpList?type=0"
+
+ },
+ {
+ text: "公共收益",
+ icon: "/static/icon/nav-15.png",
+ path: "/subPackage/article/list?type=1"
+
+ }
+ ]
+ }
+ ],
+
+ tabs2: [{
+ name: '公众服务',
+ list: [{
+ icon: "/static/icon/nav-02.png",
+ text: "公共维修",
+ path: "/subPackage/bs/views/addRepair?title=公共维修&type=1"
+ },
+ {
+ icon: "/static/icon/nav-02.png",
+ text: "居家维修",
+ path: "/subPackage/bs/views/addRepair?title=居家维修&type=2"
+ },
+ {
+ icon: "/static/icon/nav-04.png",
+ text: "矛盾纠纷",
+ path: "/subPackage/bs/views/addRepair?title=矛盾纠纷&type=3"
+ },
+ {
+ icon: "/static/icon/nav-11.png",
+ text: "投诉举报",
+ path: "/subPackage/bs/views/addRepair?title=投诉举报&type=4"
+ },
+ {
+ icon: "/static/icon/nav-03.png",
+ text: "便民热线",
+ path: '/subPackage/hotLine/index'
+ },
+ ]
+ }, {
+ name: '警务服务',
+ list: []
+ },
+ {
+ name: '企业服务',
+ list: [{
+ text: "场所维护",
+ icon: "/static/icon/nav-02.png",
+ path: "/subPackage/workbench/views/editExamine"
+ },
+ {
+ icon: "/static/icon/nav-02.png",
+ text: "企业商户上报",
+ path: "/subPackage/bs/views/addRepair?title=企业商户上报&type=5"
+ }
+ ]
+ },
+ {
+ name: '社区服务',
+ list: [{
+ text: "选举调查",
+ icon: "/static/icon/nav-14.png",
+ path: "/subPackage/article/communityList?type=1"
+
+ },
+ {
+ text: "公益报名",
+ icon: "/static/icon/nav-13.png",
+ path: "/subPackage/article/signUpList?type=0"
+
+ },
+ {
+ text: "公共收益",
+ icon: "/static/icon/nav-15.png",
+ path: "/subPackage/article/list?type=1"
+
+ }
+ ]
+ }
+ ],
+
+ tabIndex: 0,
+ isBailer: false, //是否取保候审人员
+ sectionList: [],
+ menuTabIndex: 0,
+ taskCount: 0,
+ background: {
+ top: "#017BFC",
+ banner: "linear-gradient(180deg, #017BFC 0%, rgba(1, 123, 252, 0) 100%)"
+ },
+ tabList: []
+
}
},
onLoad() {
- this.getBanner();
+
this.init()
uni.$on('refresh', () => {
this.selectSiteIndex = [0, 0]
@@ -268,12 +549,20 @@
})
//选择位置刷新楼盘表
uni.$on('refreshPage', (val) => {
- console.log("refreshPage=>", val);
+ // console.log("refreshPage=>", val);
this.curSelectSite = val
this.getHouseDataList(val.id)
this.curHouseCode = this.curSelectSite.houseCode
uni.setStorageSync("curHouseCode", this.curSelectSite.houseCode)
})
+ },
+ onShow() {
+ if (uni.getStorageSync('activeRole').roleAlias === 'mj' &&
+ uni.getStorageSync("userInfo").status &&
+ uni.getStorageSync("userInfo").status == 2) {
+ console.log("*******status*****", uni.getStorageSync("userInfo").status)
+ this.getRealTimeLocaltion()
+ }
},
onShareAppMessage() {
@@ -298,6 +587,9 @@
handler(newVal, oldVal) {
if (newVal) {
this.$store.commit("setSiteInfo", this.curSelectSite)
+ if (this.roleType == 3) {
+ this.getTaskCount()
+ }
}
},
deep: true,
@@ -311,10 +603,31 @@
this.getMenuList()
});
}
+
+
},
deep: true,
// immediate: true
+ },
+
+ isBailer(newVal, oldVal) {
+
+ if (newVal) {
+ this.tabs.splice(1, 0, {
+ name: '警务服务',
+ list: [{
+ icon: "/static/icon/nav-11.png",
+ text: "取保候审",
+ path: '/subPackage/label/bail'
+ }]
+ })
+
+ }
+
+ immediate: true
}
+
+
},
// onPullDownRefresh() {
// this.$store.dispatch("getMenuList").then(res => {
@@ -327,12 +640,51 @@
methods: {
+ // handleOpenChange() {
+ // this.$nextTick(() => {
+ // this.$refs.myCollapse.init();
+ // });
+ // },
+
+ //获取待办事项数量
+ getTaskCount() {
+ if (uni.getStorageSync('activeRole').roleAlias === 'wgy') {
+ roleType = 1
+ }
+ getCountTypeNumber({
+ neiCode: this.curSelectSite.id,
+ roleType: this.selectRole.roleName == "网格员" ? 1 : 0
+ }).then(res => {
+ // console.log(res);
+ let data = res.data;
+ let count = 0;
+ count += Number(data.bqsj) + Number(data.xfzc) + Number(data.xfyhzg) + Number(data.qbhs) +
+ Number(data.cssh) + Number(data.czsh) + Number(data.jzzsq);
+ this.taskCount = count
+ })
+ },
+
+
+ changeTabs(e) {
+ // console.log(item);
+ this.tabIndex = e
+ },
+
+
+ changeMenuTabs(e) {
+ this.menuTabIndex = e;
+ },
+
+
+
//初始化
init() {
this.selectRole = uni.getStorageSync("activeRole")
this.getMenuList()
+ this.getBanner();
this.getSiteList()
this.getNoticeList()
+ // this.getTaskCount();
},
getBanner() {
@@ -404,20 +756,50 @@
let type = null
let roleName = this.selectRole.roleName
if (roleName == '网格员' || roleName == '系统管理员') {
+ if (roleName == '网格员') {
+ this.tabList = getTabbarList(3);
+ } else {
+ this.tabList = getTabbarList(4);
+ }
type = 1
this.roleType = 1;
this.roleTypeName = "街道社区网格"
+ this.$set(this.background, "top", "#017BFC");
+ this.$set(this.background, "banner",
+ "linear-gradient(180deg, #017BFC 0%, rgba(1, 123, 252, 0) 100%)");
+
} else if (roleName == '居民') {
+ this.tabList = getTabbarList(1);
type = 2
this.roleType = 2
this.roleTypeName = "居民"
+ this.$set(this.background, "top", "#017BFC");
+ this.$set(this.background, "banner",
+ "linear-gradient(180deg, #017BFC 0%, rgba(1, 123, 252, 0) 99%)");
+
} else if (roleName == '民警') {
+ this.tabList = getTabbarList(2);
type = 1
this.roleType = 3
this.roleTypeName = "街道社区"
+ this.$set(this.background, "top", "#0D3C9B");
+ // this.$set(this.background, "top", "#0d257E");
+ // this.$set(this.background, "banner",
+ // "linear-gradient( 180deg, #00176C 0%, rgba(1,97,203,0) 99%)");
+ this.$set(this.background, "banner",
+ "linear-gradient( 180deg, #0A3A9A 70%,#0940A3 30%, rgba(1,97,203,0) 99%)");
+
+ // this.$set(this.background, "banner",
+ // "background: linear-gradient( 180deg, #0A3A9A 0%, rgba(10,58,154,0) 100%);")
+ } else {
+ this.tabList = getTabbarList(1);
}
const res = await getFuncList(type, roleName)
this.columnData = res.data;
+ if (res.data.length) {
+ uni.setStorageSync("curStreet", res.data[0].name);
+ }
+
let data = res.data
this.siteColumns = []
this.buildSiteColumn(data, 0)
@@ -437,7 +819,6 @@
uni.setStorageSync("curHouseCode", this.curSelectSite.id)
}
},
-
// 获取楼盘
async getHouseDataList(code) {
@@ -477,14 +858,15 @@
},
// 回调参数为包含columnIndex、value、values
confirmSite(e) {
- console.log('confirm', e)
+ // console.log('confirm', e)
this.selectSiteIndex = e.indexs;
this.curSelectSite = e.value[e.value.length - 1]
this.selectBoxShow = false
this.getHouseDataList(e.value[1]?.id)
this.curHouseCode = e.value[0].id
- console.log("curSite=>", this.curSelectSite);
+ // console.log("curSite=>", this.curSelectSite);
},
+
getMenu(menuName) {
let list = [];
for (let i of this.menuList) {
@@ -503,23 +885,53 @@
this.menuList = uni.getStorageSync("menu")
this.liveList = this.setLiveMenu(this.hasMenu('生活'));
this.jobList = this.hasMenu('工作台')
+ this.sectionList = this.hasMenu('首页菜单')
+ let taskMenuList = this.hasMenu('待办事项菜单')
if (this.menuList.length) {
this.getContactMenu();
this.getHouseMenu();
this.getNoticeMenu();
}
setTimeout(() => {
- if (this.jobList.length) {
- let taskList = this.jobList.filter(item => item.name == "我的任务")
- if (taskList.length) {
- uni.setStorageSync("taskMenu", taskList[0].children);
+ // if (this.jobList.length) {
+ // let taskList = this.jobList.filter(item => item.name == "我的任务")
+ // if (taskList.length) {
+ // uni.setStorageSync("taskMenu", taskList[0].children);
+ // } else {
+ // uni.setStorageSync("taskMenu", []);
+ // }
+ // } else {
+ // uni.setStorageSync("taskMenu", []);
+ // }
+
+ if (this.roleType == 1) {
+ if (this.sectionList.length) {
+ let list = this.sectionList.filter(item => item.name == "日常办公");
+ let taskList = list[0].children.filter(item => item.name == "待办事项");
+ // console.log("taskList===>", taskList)
+ if (taskList.length) {
+ uni.setStorageSync("taskMenu", taskList[0].children);
+ } else {
+ uni.setStorageSync("taskMenu", []);
+ }
} else {
uni.setStorageSync("taskMenu", []);
}
- } else {
- uni.setStorageSync("taskMenu", []);
+ }
+
+ if (this.roleType == 3) {
+ // console.log("taskMenuList==>", taskMenuList);
+ if (taskMenuList.length) {
+ uni.setStorageSync("taskMenu", taskMenuList);
+ } else {
+ uni.setStorageSync("taskMenu", []);
+ }
}
}, 200)
+
+
+
+
},
getContactMenu() {
@@ -548,6 +960,23 @@
setLiveMenu(arr) {
if (arr.length) {
+
+ let index3 = arr.findIndex(item => item.name.trim() == "取保候审")
+ if (index != -1) {
+ this.isBailer = true;
+
+ // this.tabs.splice(1, 0, {
+ // name: '警务服务',
+ // list: [{
+ // icon: "/static/icon/nav-11.png",
+ // text: "取保候审",
+ // path: '/subPackage/label/bail'
+ // }]
+ // })
+
+ }
+ return;
+
let index = this.getLiveMenuItem(arr, 1)
let index2 = this.getLiveMenuItem(arr, 2)
if (this.curSelectSite.addressType == 1) {
@@ -604,7 +1033,10 @@
} = item;
if (id !== void 0) {
let url = `/subPackage/house/list/index?id=${id}&title=${title}&addressType=${addressType}`
- this.$u.func.globalNavigator(url, "navTo")
+ // this.$u.func.globalNavigator(url, "navTo")
+ uni.redirectTo({
+ url: `/subPackage/house/list/index?id=${id}&title=${title}&addressType=${addressType}`
+ })
}
},
@@ -620,7 +1052,7 @@
},
navigatorPage(path) {
- if (path) {
+ if (path.trim()) {
if ((path == '/subPackage/bs/views/zhsb' || path == '/subPackage/bs/views/repair') && this
.curHouseCode === '') {
uni.showToast({
@@ -649,17 +1081,16 @@
const that = this
uni.scanCode({
success: function(res) {
- console.log("扫码结果", res)
+ // console.log("扫码结果", res)
let eventType = 0;
let obj = that.getUrlParams(res.result)
- console.log(obj)
+ // console.log(obj)
if (!that.isLogin) {
let data = res.data;
that.$u.func.globalNavigator(
`/subPackage/bs/views/danger?id=${obj.stdId}`, "navTo")
return
}
-
if (obj.stdId == "3C77B40EFC5F4C899AA74BEE747D9DF1") {
eventType = 1;
that.$u.func.globalNavigator(
@@ -768,167 +1199,107 @@
houseCode
} = uni.getStorageSync("siteInfo")
uni.navigateTo({
- url: `/subPackage/workbench/views/audit?code=${houseCode}&from=index`
+ url: `/subPackage/workbench/views/auditSite?code=${houseCode}&from=index`
})
- }
+ },
+ getRealTimeLocaltion() {
+ this.getDeviceGPS() //获取本机GPS状态
+ wx.startLocationUpdateBackground({
+ type: 'wgs84',
+ success: (res) => {
+ console.log('res***************', res)
+ this.getBackgroundLocation();
+ },
+ fail: (err) => {
+ //授权失败后引导用户打开定位信息
+ uni.getSetting({
+ success: (res) => {
+ var statu = res.authSetting;
+ if (!statu["scope.userLocationBackground"]) {
+ uni.showModal({
+ title: "是否授权在使用期间和离开后!",
+ content: "需要获取您当前的位置信息,请在位置信息中选择",
+ success: (tip) => {
+ if (tip.confirm) {
+ uni.openSetting({
+ success: (data) => {
+ if (data
+ .authSetting[
+ "scope.userLocationBackground"
+ ] == true
+ ) {
+ this
+ .getBackgroundLocation();
+ }
+ }
+ });
+ } else {
+ console.log('用户拒绝打开设置界面')
+ }
+ }
+ });
+ }
+ }
+ });
+ }
+ });
+ },
+ // 获取本机设备的GPS信息
+ getDeviceGPS() {
+ let system = uni.getSystemInfoSync();
+ //如果设备的GPS未开启,locationEnabled这里会返回false,以此判断
+ if (system.locationEnabled == false) {
+ //GPS未开启,返回false
+ this.userGPS = false
+ return uni.showModal({
+ content: '请在系统设置中开启GPS定位权限',
+ showCancel: false,
+ confirmText: '确认',
+ success: (res) => {
+ console.log('res:', res)
+ },
+ })
+ } else {
+ //已开启,返回true
+ this.userGPS = true
+ }
+ },
+ getBackgroundLocation() {
+ //判断是否也开通了wx.onLocationChange接口且检测本机GPS功能是否开启,GPS不开启不会间接获取
+ if (wx.onLocationChange && this.userGPS != false) {
+ wx.onLocationChange((data) => {
+ console.log('onLocationChange***************', data)
+
+ //微信开发工具上面只能触发一次,真机上面是循环获取
+ //设置一个公共时间,原因是时间间隔太短,自己设置时间,然后去操作相应的逻辑
+ if (this.time == 11) {
+ // 调取实时位置
+ this.reportLocation(this.location);
+ this.time = 0;
+ }
+ this.time++;
+ this.location = data;
+ });
+ }
+ },
+ //调取位置后的操作逻辑
+ reportLocation(location) {
+ // 更新民警位置
+ let param = {
+ id: uni.getStorageSync("userInfo").user_id,
+ deptId: uni.getStorageSync("userInfo").dept_id,
+ lng: location.longitude,
+ lat: location.latitude,
+ }
+ updateUserInfo(param).then(res => {
+ console.log(res)
+ })
+ console.log('********************location****************************************', location)
+ },
}
}
</script>
<style lang="scss">
- page {
- color: #333;
- width: 100%;
- height: 100%;
- background-color: #f5f5f5;
- }
-
- .layout {
- width: 100%;
- height: 100%;
- }
-
- .top {
- width: 530rpx;
-
- .top-text {
- max-width: 85%;
- margin-right: 20rpx;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
-
- .swiper {
- width: 100%;
- height: 340rpx;
- background: linear-gradient(180deg, #017BFC 0%, rgba(1, 123, 252, 0) 100%);
- padding: 0 30rpx;
- box-sizing: border-box;
- }
-
- .content {
- padding: 0 30rpx;
- }
-
- // .grid {
- // margin-top: 20rpx;
- // margin-bottom: 10rpx;
- // }
- .nav {
- padding: 10rpx 0;
- margin-bottom: 20rpx;
- border-radius: 10rpx;
-
- .nav-item {
- padding: 10rpx 0;
- }
-
- .nav-item-text {
- font-family: PingFang SC;
- font-weight: 500;
- color: #585b61;
- }
- }
-
-
- .section {
- .section-item {
- width: 216rpx;
- height: 120rpx;
- position: relative;
- }
-
- .section-item-bg {
- width: 216rpx;
- height: 120rpx;
- }
-
- .item-box {
- width: 216rpx;
- height: 120rpx;
- position: absolute;
- top: 0;
- left: 0;
- padding: 20rpx 20rpx 0;
- box-sizing: border-box;
- }
- }
-
-
-
- .block {
- .block-item {
- position: relative;
-
- }
-
- .block-item,
- .block-item-bg,
- .block-item-box {
- width: 220rpx;
- height: 150rpx;
- border-radius: 10rpx;
- }
-
- .block-item-box {
- padding: 0 12rpx;
- box-sizing: border-box;
- position: absolute;
- top: 0;
- left: 0;
-
- }
-
- .item-text {
- height: 65rpx;
- margin-left: 20rpx;
- color: #fff;
- }
-
- .opacity {
- opacity: .4;
- }
- }
-
- .cell {
- padding: 0 16rpx;
- height: 64rpx;
- border-radius: 8rpx;
- margin-right: 20rpx;
- margin-top: 30rpx;
-
- .cell-text {
- margin-left: 16rpx;
- }
- }
-
- .grid-item {
- width: 153rpx;
- height: 153rpx;
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- justify-content: center;
- }
-
- .row {
- width: 100%;
- margin: 30rpx 0;
-
- .row-item {
- width: 330rpx;
- height: 134rpx;
- box-shadow: 0rpx 10rpx 10rpx 0rpx rgba(0, 0, 0, 0.02);
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- }
- }
-
- .p-20 {
- padding: 0 20rpx;
- border-radius: 10rpx;
- }
-
- .pb-20 {
- padding-bottom: 20rpx;
- }
+ @import "./index.scss";
</style>
\ No newline at end of file
diff --git a/pages/home/index5.vue b/pages/home/index4.vue
similarity index 92%
rename from pages/home/index5.vue
rename to pages/home/index4.vue
index 5a3978f..75dcf96 100644
--- a/pages/home/index5.vue
+++ b/pages/home/index4.vue
@@ -70,7 +70,8 @@
</view>
</view>
- <!-- <view class="nav bgc-ff" v-if="liveList.length || roleType == 2">
+ <view class="nav bgc-ff" v-if="liveList.length || roleType == 2">
+ <!-- <caption-row title="生活" /> -->
<u-grid :border="false" col="4">
<block v-if="liveList.length">
<u-grid-item @click.native="navigatorPage(i.path)" v-for="(i,k) in liveList" :key="k">
@@ -89,24 +90,8 @@
</u-grid-item>
</block>
</u-grid>
- </view> -->
-
- <view class="nav bgc-ff">
- <u-tabs :list="tabs" @click="changeTabs"></u-tabs>
- <!-- <u-grid-item @click="navigatorPage(i.path)" v-for="(i,k) in communityList" :key="k">
- <view class="nav-item flex f-d-c a-i-c">
- <u-icon :name="i.icon" width="80rpx" height="80rpx"></u-icon>
- <text class="nav-item-text f-26 mt-10">{{i.title}}</text>
- </view>
- </u-grid-item> -->
</view>
-
-
</view>
-
-
-
-
<view class="bgc-ff p-20 mb-20 pb-20" v-if="isShowHouse">
<caption-row title="楼盘表" />
@@ -129,10 +114,18 @@
<text class="grid-text f-24 fw mt-10">{{item.name}}</text>
</view>
</u-grid-item>
+ <!-- <u-grid-item @click="navigatorPage('/subPackage/house/houseNumber/siteInspect')"
+ :customStyle="{paddingTop:20+'rpx'}">
+ <view class="grid-item flex f-d-c a-i-c"
+ style="background:linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)">
+ <u-icon name="/static/icon/menu-02.png" width="60rpx" height="60rpx"></u-icon>
+ <text class="grid-text f-24 fw mt-10">场所检查</text>
+ </view>
+ </u-grid-item> -->
</u-grid>
</view>
- <!-- <view class="bgc-ff mb-20 p-20 pb-20" v-if="(roleType == 2) && (curSelectSite.addressType == 2)">
+ <view class="bgc-ff mb-20 p-20 pb-20" v-if="(roleType == 2) && (curSelectSite.addressType == 2)">
<caption-row title="工作台" />
<u-grid :border="false" col="4">
<u-grid-item @click="navigatorPage('/subPackage/workbench/views/editExamine')"
@@ -151,8 +144,7 @@
</view>
</u-grid-item>
</u-grid>
- </view> -->
-
+ </view>
<view class="p-20 bgc-ff mb-20" v-if="isShowNotice">
<caption-row title="通知公告" :is-link="true" url="/subPackage/article/list" />
<notice-list :data="notice" />
@@ -260,79 +252,7 @@
path: "/subPackage/article/list?type=1"
}
- ],
-
- tabs: [{
- name: '公众服务',
- list: [{
- name: "公共报事"
- },
- {
- name: "便民服务"
- },
- ]
- }, {
- name: '警务服务',
- hasPlaceMenu: true,
- list: [{
- name: "取保候审"
- },
- {
- name: "二手交易"
- },
- {
- name: "消防自查"
- }
-
- ]
- }, {
- name: '生活服务',
- list: [{
- name: "物业缴费"
- },
- {
- name: "租客上报"
- }
- ]
- }, {
- name: '企业服务',
- list: [{
- name: "场所维护"
- },
- {
- name: "企业商户上报"
- },
- {
- name: "场所任务"
- }
-
- ]
- },
- {
- name: '社区服务',
- list: [{
- title: "选举调查",
- icon: "/static/icon/nav-14.png",
- path: "/subPackage/article/communityList?type=1"
-
- },
- {
- title: "公益报名",
- icon: "/static/icon/nav-13.png",
- path: "/subPackage/article/signUpList?type=0"
-
- },
- {
- title: "公共收益",
- icon: "/static/icon/nav-15.png",
- path: "/subPackage/article/list?type=1"
-
- }
-
- ]
- }
]
-
}
},
@@ -406,15 +326,6 @@
// },
methods: {
-
-
- changeTabs(item) {
- console.log(item);
- // let list = item.list;
- // for (let i of list) {
-
- // }
- },
//初始化
init() {
diff --git a/pages/home/selectSite.vue b/pages/home/selectSite.vue
index bb0a4b8..76c5ca2 100644
--- a/pages/home/selectSite.vue
+++ b/pages/home/selectSite.vue
@@ -17,11 +17,11 @@
</block>
</view>
<view class="">
-
- <view class="nomore f-30" v-if="!list[selectIndex].children.length" >
- 暂无{{selectIndex == 0?"房屋":"场所"}}信息
+
+ <view class="nomore f-30" v-if="!list[selectIndex].children.length">
+ 暂无{{selectIndex == 0?"房屋":"场所"}}信息
</view>
-
+
<view class="site-list f-30 flex j-c-s-b a-i-c" v-for="(i,k) in list[selectIndex].children"
@click="selectChilren(i,k)">
<text>{{i.name}}</text>
@@ -41,12 +41,12 @@
</view>
<view class="">
-
+
<view class="nomore f-30" v-if="!list[selectIndex].children.length">
- 暂无社区信息
+ 暂无社区信息
</view>
-
-
+
+
<view class="site-list f-30 flex j-c-s-b a-i-c" v-for="(i,k) in list[selectIndex].children"
@click="selectChilren(i,k)">
<text>{{i.name}}</text>
@@ -57,8 +57,8 @@
</view>
<u-picker :show="isShow" :columns="[list]" :defaultIndex=[selectIndex] title="选择街道" keyName="name"
- @confirm="confirmSelect" @cancel="isShow = false" @close="isShow = false"></u-picker>
- <u-toast ref="uToast"></u-toast>
+ @confirm="confirmSelect" @cancel="isShow = false" @close="isShow = false"></u-picker>
+ <u-toast ref="uToast"></u-toast>
</view>
</template>
@@ -78,7 +78,7 @@
roleType: 1,
cateName: "",
isShow: false,
- rolesType:1
+ rolesType: 1
}
},
@@ -86,7 +86,7 @@
let {
roleName
} = uni.getStorageSync("activeRole");
-
+
if (roleName == '网格员' || roleName == '系统管理员') {
this.rolesType = 1;
} else if (roleName == '居民') {
@@ -109,9 +109,9 @@
this.chilrenIndex = index;
console.log(item)
uni.navigateBack({
- success:()=> {
- this.$store.commit("setSiteInfo",item)
- uni.$emit("refreshPage",item)
+ success: () => {
+ this.$store.commit("setSiteInfo", item)
+ uni.$emit("refreshPage", item)
}
})
},
@@ -129,7 +129,7 @@
console.log(res);
this.list = res.data;
this.$nextTick(() => {
- if(this.list.length){
+ if (this.list.length) {
this.getSelectIndex()
}
this.$refs.uToast.isShow = false
@@ -145,16 +145,18 @@
this.selectIndex = e.indexs[0];
this.cateName = e.value[0].name;
this.isShow = false;
+ uni.setStorageSync("curStreet", e.value[0].name);
},
-
- getSelectIndex(){
+
+ getSelectIndex() {
let data = uni.getStorageSync("siteInfo");
this.currentSite = data;
- for(let i = 0,ii = this.list.length;i<ii;i++){
- for(let k= 0,kk = this.list[i].children.length;k<kk;k++){
- if(this.list[i].children[k].name == data.name){
+ for (let i = 0, ii = this.list.length; i < ii; i++) {
+ for (let k = 0, kk = this.list[i].children.length; k < kk; k++) {
+ if (this.list[i].children[k].name == data.name) {
this.selectIndex = i;
this.cateName = this.list[i].name;
+ uni.setStorageSync("curStreet", this.list[i].name);
this.chilrenId = this.list[i].children[k].id;
this.chilrenIndex = k
}
@@ -196,7 +198,8 @@
border-radius: 30rpx;
}
}
- .nomore{
- padding:30rpx;
+
+ .nomore {
+ padding: 30rpx;
}
</style>
\ No newline at end of file
diff --git a/pages/login/login-account.vue b/pages/login/login-account.vue
index e1c8e31..d8fb0b7 100644
--- a/pages/login/login-account.vue
+++ b/pages/login/login-account.vue
@@ -1,494 +1,494 @@
<template>
- <view class="container">
- <!-- <view class="logo">
+ <view class="container">
+ <!-- <view class="logo">
<image src="https://sk.hubeishuiyi.cn/business/xcxImg/wxlogo.png" lazy-load show-menu-by-longpress
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" v-if="!loginType">
- <image class="title-img" src="/static/icon/login-title.png" mode="aspectFill"></image>
- <view class="flex f-d-c a-i-c" style="margin-bottom:60rpx;">
- <view class="f-28">登录后即可展示自己</view>
- <view class="fw" style="font-size:56rpx;margin:40rpx 0 38rpx;">185****1647</view>
- <view class="f-22">认证服务由中国移动提供</view>
- </view>
+ <view class="content" v-if="!loginType">
+ <image class="title-img" src="/static/icon/login-title-ys.png" mode="aspectFill"></image>
+ <view class="flex f-d-c a-i-c" style="margin-bottom:60rpx;">
+ <view class="f-28">登录后即可展示自己</view>
+ <view class="fw" style="font-size:56rpx;margin:40rpx 0 38rpx;">185****1647</view>
+ <view class="f-22">认证服务由中国移动提供</view>
+ </view>
- <button class="submit-btn f-28">本机号码一键登录</button>
- <button class="btn bgc-ff f-28 mt-30" @click="accountLogin()">账号登录</button>
- <view class="agreement flex">
- <u-checkbox-group v-model="isAgreement">
- <u-checkbox shape="circle" size="16"></u-checkbox>
- </u-checkbox-group>
+ <button class="submit-btn f-28">本机号码一键登录</button>
+ <button class="btn bgc-ff f-28 mt-30" @click="accountLogin()">账号登录</button>
+ <view class="agreement flex">
+ <u-checkbox-group v-model="isAgreement">
+ <u-checkbox shape="circle" size="16"></u-checkbox>
+ </u-checkbox-group>
- <view class="f-22">我已阅读并同意<text class="c-main">用户协议</text>和<text class="c-main">隐私政策</text>以及 <text
- class="c-main">《中国移动认证服务条款》</text>·同时登录并使用基层智治综合协同平台</view>
- </view>
- </view>
+ <view class="f-22">我已阅读并同意<text class="c-main">用户协议</text>和<text class="c-main">隐私政策</text>以及 <text
+ class="c-main">《中国移动认证服务条款》</text>·同时登录并使用社区网格治理平台</view>
+ </view>
+ </view>
- <view class="content" v-if="loginType == 1">
+ <view class="content" v-if="loginType == 1">
- <image class="title-img" src="/static/icon/login-title.png" mode="aspectFill"></image>
+ <image class="title-img" src="/static/icon/login-title-ys.png" mode="aspectFill"></image>
- <view class="">
- <u-form labelPosition="top" labelWidth="60" :model="form" :rules="rules" ref="form">
- <u-form-item :borderBottom="false" ref="phone">
- <u-input placeholder="请输入用户名" prefixIcon="account"
- prefixIconStyle="font-size: 28px;color: #017BFC"
- placeholderStyle="font-size:28rpx;color:#ABABAB;"
- customStyle="background:#fff;width:634rpx;" type="number" v-model="form.phone"></u-input>
- </u-form-item>
- <u-form-item prop="password" :borderBottom="false" ref="password">
- <u-input v-if="passwordProps.passwordType == 'password'" placeholder="请输入密码" prefixIcon="lock"
- prefixIconStyle="font-size: 28px;color: #017BFC"
- placeholderStyle="font-size:28rpx;color:#ABABAB;"
- customStyle="background:#fff;width:634rpx;" type="password" v-model="form.password">
- <template slot="suffix">
- <u-icon @click="showPassword" :name="passwordProps.passwordIcon" size="24"
- color="#9FA5C0"></u-icon>
- </template>
- </u-input>
+ <view class="">
+ <u-form labelPosition="top" labelWidth="60" :model="form" :rules="rules" ref="form">
+ <u-form-item :borderBottom="false" ref="phone">
+ <u-input placeholder="请输入用户名" prefixIcon="account"
+ prefixIconStyle="font-size: 28px;color: #017BFC"
+ placeholderStyle="font-size:28rpx;color:#ABABAB;"
+ customStyle="background:#fff;width:634rpx;" type="number" v-model="form.phone"></u-input>
+ </u-form-item>
+ <u-form-item prop="password" :borderBottom="false" ref="password">
+ <u-input v-if="passwordProps.passwordType == 'password'" placeholder="请输入密码" prefixIcon="lock"
+ prefixIconStyle="font-size: 28px;color: #017BFC"
+ placeholderStyle="font-size:28rpx;color:#ABABAB;"
+ customStyle="background:#fff;width:634rpx;" type="password" v-model="form.password">
+ <template slot="suffix">
+ <u-icon @click="showPassword" :name="passwordProps.passwordIcon" size="24"
+ color="#9FA5C0"></u-icon>
+ </template>
+ </u-input>
- <u-input v-if="passwordProps.passwordType == 'text'" placeholder="请输入密码" prefixIcon="lock"
- prefixIconStyle="font-size: 28px;color: #017BFC"
- placeholderStyle="font-size:28rpx;color:#ABABAB;"
- customStyle="background:#fff;width:634rpx;" type="text" 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 f-30 mt-190" @click="submit" :disabled="disabled">登录</button>
- </view>
+ <u-input v-if="passwordProps.passwordType == 'text'" placeholder="请输入密码" prefixIcon="lock"
+ prefixIconStyle="font-size: 28px;color: #017BFC"
+ placeholderStyle="font-size:28rpx;color:#ABABAB;"
+ customStyle="background:#fff;width:634rpx;" type="text" 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 f-30 mt-190" @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">
- <u-input v-model="form.phone" border="none" placeholder="请输入登录账号"></u-input>
- </u-form-item>
- </view>
- <view class="cell">
- <u-form-item label="密码:" prop="password" borderBottom ref="password">
- <view style="display: flex; width: 100%;">
- <!-- #ifdef MP-WEIXIN -->
- <u-input v-if="passwordProps.passwordType == 'password'" type="password"
- v-model="form.password" border="none" placeholder="请输入密码">
- </u-input>
- <u-input v-else type="text" v-model="form.password" border="none" placeholder="请输入密码">
- </u-input>
- <u-icon @click="showPassword" :name="passwordProps.passwordIcon" color="#000000"
- size="25"></u-icon>
- <!-- #endif -->
- <!-- #ifdef APP-PLUS-->
- <u-input :type="passwordProps.passwordType" v-model="form.password" border="none"
- placeholder="请输入密码"></u-input>
- <u-icon @click="showPassword" :name="passwordProps.passwordIcon" color="#000000"
- size="25"></u-icon>
- <!-- #endif -->
- <!-- #ifdef H5-->
- <u-input v-if="passwordProps.passwordType == 'password'" type="password"
- v-model="form.password" border="none" placeholder="请输入密码">
- </u-input>
- <u-input v-else type="text" v-model="form.password" border="none" placeholder="请输入密码">
- </u-input>
- <u-icon @click="showPassword" :name="passwordProps.passwordIcon" color="#000000"
- size="25"></u-icon>
- <!-- #endif -->
- </view>
- </u-form-item>
- </view>
- </u--form>
+ <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">
+ <u-input v-model="form.phone" border="none" placeholder="请输入登录账号"></u-input>
+ </u-form-item>
+ </view>
+ <view class="cell">
+ <u-form-item label="密码:" prop="password" borderBottom ref="password">
+ <view style="display: flex; width: 100%;">
+ <!-- #ifdef MP-WEIXIN -->
+ <u-input v-if="passwordProps.passwordType == 'password'" type="password"
+ v-model="form.password" border="none" placeholder="请输入密码">
+ </u-input>
+ <u-input v-else type="text" v-model="form.password" border="none" placeholder="请输入密码">
+ </u-input>
+ <u-icon @click="showPassword" :name="passwordProps.passwordIcon" color="#000000"
+ size="25"></u-icon>
+ <!-- #endif -->
+ <!-- #ifdef APP-PLUS-->
+ <u-input :type="passwordProps.passwordType" v-model="form.password" border="none"
+ placeholder="请输入密码"></u-input>
+ <u-icon @click="showPassword" :name="passwordProps.passwordIcon" color="#000000"
+ size="25"></u-icon>
+ <!-- #endif -->
+ <!-- #ifdef H5-->
+ <u-input v-if="passwordProps.passwordType == 'password'" type="password"
+ v-model="form.password" border="none" placeholder="请输入密码">
+ </u-input>
+ <u-input v-else type="text" v-model="form.password" border="none" placeholder="请输入密码">
+ </u-input>
+ <u-icon @click="showPassword" :name="passwordProps.passwordIcon" color="#000000"
+ size="25"></u-icon>
+ <!-- #endif -->
+ </view>
+ </u-form-item>
+ </view>
+ </u--form>
- <button class="submit" @click="submit" :disabled="disabled">登录</button>
- <view class="page-change">
- </view>
- </view>
- </view>
- </view>
+ <button class="submit" @click="submit" :disabled="disabled">登录</button>
+ <view class="page-change">
+ </view>
+ </view>
+ </view>
+ </view>
</template>
<script>
- import md5 from '@/utils/md5.js'
- import loginMixin from '@/mixin/loginMixin'
- import {
- fetchUserInfo
- } from "@/api/user.js"
- export default {
- onLoad(option) {
- const {
- redirect
- } = option
- if (redirect) this.redirect = redirect
- },
- mixins: [loginMixin],
- data() {
- return {
- tenantId: '000000',
- form: {
- phone: "",
- password: "",
+import md5 from '@/utils/md5.js'
+import loginMixin from '@/mixin/loginMixin'
+import {
+ fetchUserInfo
+} from "@/api/user.js"
+export default {
+ onLoad (option) {
+ const {
+ redirect
+ } = option
+ if (redirect) this.redirect = redirect
+ },
+ mixins: [loginMixin],
+ data () {
+ return {
+ tenantId: '000000',
+ form: {
+ phone: "",
+ password: "",
- },
- rules: {
- 'phone': [{
- type: 'string',
- required: true,
- message: '请填写手机号',
- trigger: ['blur', 'change']
- },
- {
- validator: (rule, value, callback) => {
- return uni.$u.test.mobile(value);
- },
- message: '手机号码不正确',
- trigger: ['change', 'blur'],
- }
- ],
- 'password': {
- type: 'string',
- required: true,
- message: '请输入密码',
- trigger: ['blur', 'change']
- }
- },
- disabled: false,
- redirect: '',
- passwordProps: {
- passwordIcon: "eye-off",
- passwordType: "password"
- },
- screenHeight: "",
- loginType: 1, //登录类型 1账号密码 2 一键登录
- isAgreement: true
- }
- },
+ },
+ rules: {
+ 'phone': [{
+ type: 'string',
+ required: true,
+ message: '请填写手机号',
+ trigger: ['blur', 'change']
+ },
+ {
+ validator: (rule, value, callback) => {
+ return uni.$u.test.mobile(value)
+ },
+ message: '手机号码不正确',
+ trigger: ['change', 'blur'],
+ }
+ ],
+ 'password': {
+ type: 'string',
+ required: true,
+ message: '请输入密码',
+ trigger: ['blur', 'change']
+ }
+ },
+ disabled: false,
+ redirect: '',
+ passwordProps: {
+ passwordIcon: "eye-off",
+ passwordType: "password"
+ },
+ screenHeight: "",
+ loginType: 1, //登录类型 1账号密码 2 一键登录
+ isAgreement: true
+ }
+ },
- onLoad() {
- this.screenHeight = `${uni.getSystemInfoSync().screenHeight}px`;
- this.form.phone = uni.getStorageSync("phoneNmber");
- },
+ onLoad () {
+ this.screenHeight = `${uni.getSystemInfoSync().screenHeight}px`
+ this.form.phone = uni.getStorageSync("phoneNmber")
+ },
- methods: {
+ methods: {
- accountLogin() {
- // if(!this.isAgreement){
+ accountLogin () {
+ // if(!this.isAgreement){
- // }
- console.log(111);
- this.loginType = 1;
- },
+ // }
+ console.log(111)
+ this.loginType = 1
+ },
- submit() {
- const that = this
- this.$refs.form.validate().then(res => {
- this.$u.api
- .token(this.tenantId, this.form.phone, md5(this.form.password))
- .then(data => {
- uni.setStorageSync("phoneNmber", this.form.phone)
- // this.getUserInfo(data);
- this.$u.func.login(data)
- })
- .catch(err => {
- this.$u.func.showToast({
- title: err.data.error_description || "服务器错误"
- })
- })
- })
- },
- handleInputCheck() {
- this.disabled = false
- },
- showPassword() {
- this.passwordProps.passwordIcon == "eye-off" ? this.$set(this.passwordProps, "passwordIcon", "eye-fill") :
- this.$set(this.passwordProps, "passwordIcon", "eye-off")
- this.passwordProps.passwordType == "password" ? this.$set(this.passwordProps, "passwordType", "text") :
- this.$set(this.passwordProps, "passwordType", "password")
- },
+ submit () {
+ const that = this
+ this.$refs.form.validate().then(res => {
+ this.$u.api
+ .token(this.tenantId, this.form.phone, md5(this.form.password))
+ .then(data => {
+ uni.setStorageSync("phoneNmber", this.form.phone)
+ // this.getUserInfo(data);
+ this.$u.func.login(data)
+ })
+ .catch(err => {
+ this.$u.func.showToast({
+ title: err.data.error_description || "服务器错误"
+ })
+ })
+ })
+ },
+ handleInputCheck () {
+ this.disabled = false
+ },
+ showPassword () {
+ this.passwordProps.passwordIcon == "eye-off" ? this.$set(this.passwordProps, "passwordIcon", "eye-fill") :
+ this.$set(this.passwordProps, "passwordIcon", "eye-off")
+ this.passwordProps.passwordType == "password" ? this.$set(this.passwordProps, "passwordType", "text") :
+ this.$set(this.passwordProps, "passwordType", "password")
+ },
- getUserInfo(data) {
- fetchUserInfo(data.user_id).then(res => {
- console.log(res)
- if (res.code == 200) {
- this.$u.vuex('userInfo', JSON.parse(res.data))
- }
- })
- },
+ getUserInfo (data) {
+ fetchUserInfo(data.user_id).then(res => {
+ console.log(res)
+ if (res.code == 200) {
+ this.$u.vuex('userInfo', JSON.parse(res.data))
+ }
+ })
+ },
- }
- }
+ }
+}
</script>
<style lang="scss">
- .bg {
- width: 100%;
- display: block;
- }
+.bg {
+ width: 100%;
+ display: block;
+}
- .privacy-policy {
- width: 100%;
- padding: 40rpx 40rpx 0 80rpx;
- font-size: 28rpx;
- }
+.privacy-policy {
+ width: 100%;
+ padding: 40rpx 40rpx 0 80rpx;
+ font-size: 28rpx;
+}
- .container {
- min-height: 100vh;
- overflow: hidden;
- // background: url("https://sk.hubeishuiyi.cn/business/xcxImg/reservoirImg/default.jpg") no-repeat;
- // background-size: 100% 100%;
- position: relative;
+.container {
+ min-height: 100vh;
+ overflow: hidden;
+ // background: url("https://sk.hubeishuiyi.cn/business/xcxImg/reservoirImg/default.jpg") no-repeat;
+ // background-size: 100% 100%;
+ position: relative;
- .set-icon {
- vertical-align: middle;
- width: 41rpx;
- height: auto;
- margin-right: 35rpx;
- }
- }
+ .set-icon {
+ vertical-align: middle;
+ width: 41rpx;
+ height: auto;
+ margin-right: 35rpx;
+ }
+}
- .logo {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 200rpx 0;
+.logo {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 200rpx 0;
- image {
- box-shadow: 4rpx 4rpx 20rpx #fafafa;
- }
+ image {
+ box-shadow: 4rpx 4rpx 20rpx #fafafa;
+ }
- .title {
- margin-top: 40rpx;
- font-weight: 700;
- font-size: 32rpx;
+ .title {
+ margin-top: 40rpx;
+ font-weight: 700;
+ font-size: 32rpx;
- }
- }
+ }
+}
- .title-img {
- width: 650rpx;
- height: 49rpx;
- display: block;
- margin: 320rpx 0 120rpx;
- }
+.title-img {
+ width: 650rpx;
+ height: 49rpx;
+ display: block;
+ margin: 320rpx 0 120rpx;
+}
- .content {
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- align-items: center;
- position: absolute;
- top: 0;
- left: 0;
- // height: 90vh;
- width: 100%;
+.content {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+ position: absolute;
+ top: 0;
+ left: 0;
+ // height: 90vh;
+ width: 100%;
- .top {
- width: 100%;
- width: 100%;
- // background: #fff;
- padding: 20px 0;
- position: fixed;
- bottom: 0px;
- }
+ .top {
+ width: 100%;
+ width: 100%;
+ // background: #fff;
+ padding: 20px 0;
+ position: fixed;
+ bottom: 0px;
+ }
- .logo {
- display: block;
- width: 281rpx;
- height: auto;
- margin: 0 auto 120rpx;
- }
+ .logo {
+ display: block;
+ width: 281rpx;
+ height: auto;
+ margin: 0 auto 120rpx;
+ }
- .cell {
- width: 100%;
- padding: 0 85rpx;
- box-sizing: border-box;
- margin-top: 36rpx;
+ .cell {
+ width: 100%;
+ padding: 0 85rpx;
+ box-sizing: border-box;
+ margin-top: 36rpx;
- .name {
- font-size: 22rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #3e4a59;
- line-height: 30rpx;
- opacity: 0.72;
- }
+ .name {
+ font-size: 22rpx;
+ font-family: Source Han Sans CN;
+ font-weight: 400;
+ color: #3e4a59;
+ line-height: 30rpx;
+ opacity: 0.72;
+ }
- .input-box {
- padding: 30rpx 0;
- border-bottom: 2rpx solid #f6f6f6;
- display: flex;
- align-items: center;
+ .input-box {
+ padding: 30rpx 0;
+ border-bottom: 2rpx solid #f6f6f6;
+ display: flex;
+ align-items: center;
- .code {
- font-size: 22rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #0d0d0d;
- line-height: 30rpx;
+ .code {
+ font-size: 22rpx;
+ font-family: Source Han Sans CN;
+ font-weight: 400;
+ color: #0d0d0d;
+ line-height: 30rpx;
- text {
- color: #5f88ff;
- }
- }
+ text {
+ color: #5f88ff;
+ }
+ }
- .ipt {
- flex: 1;
- font-size: 24rpx;
- }
+ .ipt {
+ flex: 1;
+ font-size: 24rpx;
+ }
- .hold {
- font-size: 26rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #3e4a59;
- line-height: 30px;
- opacity: 0.45;
- }
- }
- }
+ .hold {
+ font-size: 26rpx;
+ font-family: Source Han Sans CN;
+ font-weight: 400;
+ color: #3e4a59;
+ line-height: 30px;
+ opacity: 0.45;
+ }
+ }
+ }
- .agree {
- margin: 27rpx 95rpx 0;
- font-size: 22rpx;
- font-family: Adobe Heiti Std;
- font-weight: normal;
- color: #cacaca;
- line-height: 34rpx;
+ .agree {
+ margin: 27rpx 95rpx 0;
+ font-size: 22rpx;
+ font-family: Adobe Heiti Std;
+ font-weight: normal;
+ color: #cacaca;
+ line-height: 34rpx;
- .a {
- color: #000000;
- }
- }
+ .a {
+ color: #000000;
+ }
+ }
- .submit {
- margin: 60rpx 90rpx 0;
- border: none;
- width: 572rpx;
- height: 86rpx;
- line-height: 86rpx;
- box-sizing: border-box;
- border-radius: 15rpx;
- background-color: #5f88ff;
- color: #ffffff;
+ .submit {
+ margin: 60rpx 90rpx 0;
+ border: none;
+ width: 572rpx;
+ height: 86rpx;
+ line-height: 86rpx;
+ box-sizing: border-box;
+ border-radius: 15rpx;
+ background-color: #5f88ff;
+ color: #ffffff;
- &::after {
- content: none;
- }
+ &::after {
+ content: none;
+ }
- &::before {
- content: none;
- }
+ &::before {
+ content: none;
+ }
- &[disabled='true'] {
- background: #e4e4e4;
- font-size: 36rpx;
- font-family: Source Han Sans CN;
- font-weight: 500;
- color: #ffffff;
- }
- }
+ &[disabled='true'] {
+ background: #e4e4e4;
+ font-size: 36rpx;
+ font-family: Source Han Sans CN;
+ font-weight: 500;
+ color: #ffffff;
+ }
+ }
- .tip {
- margin-top: 30rpx;
- text-align: center;
- font-size: 22rpx;
- font-family: Adobe Heiti Std;
- font-weight: normal;
- color: #cacaca;
- line-height: 34rpx;
- }
+ .tip {
+ margin-top: 30rpx;
+ text-align: center;
+ font-size: 22rpx;
+ font-family: Adobe Heiti Std;
+ font-weight: normal;
+ color: #cacaca;
+ line-height: 34rpx;
+ }
- .change {
- margin-top: 20rpx;
- text-align: center;
- font-size: 22rpx;
- font-family: Adobe Heiti Std;
- font-weight: normal;
- color: #5f88ff;
- line-height: 34rpx;
- }
+ .change {
+ margin-top: 20rpx;
+ text-align: center;
+ font-size: 22rpx;
+ font-family: Adobe Heiti Std;
+ font-weight: normal;
+ color: #5f88ff;
+ line-height: 34rpx;
+ }
- .tag {
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 22rpx;
- font-family: Adobe Heiti Std;
- font-weight: normal;
- color: #9f9f9f;
- line-height: 34rpx;
+ .tag {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 22rpx;
+ font-family: Adobe Heiti Std;
+ font-weight: normal;
+ color: #9f9f9f;
+ line-height: 34rpx;
- &::before {
- content: '';
- display: block;
- width: 160rpx;
- height: 1px;
- background: #d8d8d8;
- opacity: 0.86;
- }
+ &::before {
+ content: '';
+ display: block;
+ width: 160rpx;
+ height: 1px;
+ background: #d8d8d8;
+ opacity: 0.86;
+ }
- &::after {
- content: '';
- display: block;
- width: 160rpx;
- height: 1px;
- background: #d8d8d8;
- opacity: 0.86;
- }
- }
+ &::after {
+ content: '';
+ display: block;
+ width: 160rpx;
+ height: 1px;
+ background: #d8d8d8;
+ opacity: 0.86;
+ }
+ }
- .chat-arr {
- margin-top: 50rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
+ .chat-arr {
+ margin-top: 50rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
- .icon {
- width: 73rpx;
- height: 73rpx;
- }
- }
+ .icon {
+ width: 73rpx;
+ height: 73rpx;
+ }
+ }
- .page-change {
- display: flex;
- justify-content: space-evenly;
- }
- }
+ .page-change {
+ display: flex;
+ 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;
- }
+.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;
+}
- .mt-190 {
- margin-top: 190rpx;
- }
+.mt-190 {
+ margin-top: 190rpx;
+}
- .btn {
- width: 634rpx;
- height: 94rpx;
- line-height: 94rpx;
- margin-top: 30rpx;
+.btn {
+ width: 634rpx;
+ height: 94rpx;
+ line-height: 94rpx;
+ margin-top: 30rpx;
- }
+}
- .agreement {
- width: 634rpx;
- margin: 37rpx auto 0;
- }
+.agreement {
+ width: 634rpx;
+ margin: 37rpx auto 0;
+}
</style>
\ No newline at end of file
diff --git a/pages/statistics/index.vue b/pages/statistics/index.vue
new file mode 100644
index 0000000..a6da97f
--- /dev/null
+++ b/pages/statistics/index.vue
@@ -0,0 +1,648 @@
+<template>
+ <view class="container">
+ <view class="section">
+ <caption-row title="社区概况" bgColor="#003399"></caption-row>
+ <view class="cell flex j-c-s-b flex-wrap ">
+ <view class="cell-item">
+ <image class="cell-bg" src="/static/icon/nav-bg-15.png" mode="aspectFill"></image>
+ <view class="cell-item-inner flex f-d-c">
+ <text class="f-28 mb-20 c-99">楼栋数(幢)</text>
+ <text class="f-36 fw c-green">{{houseData.result1}}</text>
+ </view>
+
+ <!-- <image class="cell-item-icon" src="/static/icon/statistics-nav-01.png" mode="aspectFill"></image> -->
+ </view>
+ <view class="cell-item">
+ <image class="cell-bg" src="/static/icon/nav-bg-16.png" mode="aspectFill"></image>
+ <view class="cell-item-inner flex f-d-c">
+ <text class="f-28 mb-20 c-99">房屋数(套)</text>
+ <text class="f-36 fw c-blue">{{houseData.result2}}</text>
+ </view>
+
+ <!-- <image class="cell-item-icon" src="/static/icon/statistics-nav-02.png" mode="aspectFill"></image> -->
+ </view>
+ <view class="cell-item">
+ <image class="cell-bg" src="/static/icon/nav-bg-17.png" mode="aspectFill"></image>
+ <view class="cell-item-inner flex f-d-c">
+ <text class="f-28 mb-20 c-99">住户数(人)</text>
+ <text class="f-36 fw c-orange">{{houseData.result3}}</text>
+ </view>
+
+ <!-- <image class="cell-item-icon" src="/static/icon/statistics-nav-03.png" mode="aspectFill"></image> -->
+ </view>
+ <view class="cell-item">
+ <image class="cell-bg" src="/static/icon/nav-bg-18.png" mode="aspectFill"></image>
+ <view class="cell-item-inner flex f-d-c">
+ <text class="f-28 mb-20 c-99">单元数</text>
+ <text class="f-36 fw c-cyan">{{houseData.result4}}</text>
+ </view>
+
+ <!-- <image class="cell-item-icon" src="/static/icon/statistics-nav-01.png" mode="aspectFill"></image> -->
+ </view>
+ </view>
+ </view>
+
+ <!-- 房屋画像 -->
+ <view class="">
+ <caption-row title="房屋画像" bgColor="#003399"></caption-row>
+ <view class="pie-charts-house flex bgc-ff">
+ <view class="pie-charts-box flex j-c-c a-i-c">
+ <qiun-data-charts type="pie" :opts="housePieOpts" :chartData="houseLabelChartData" />
+ </view>
+ <view class="pie-charts-explain-house flex f-d-c j-c-c" v-if="houseLabelData.length">
+ <!-- <view class="f-32 fw mb-20">标签</view> -->
+ <view class="flex a-i-c mb-20" v-for="i in houseLabelData">
+ <text class="f-30 fw">{{i.labelName}}</text>
+ <text class="f-26">({{i.numbers}})</text>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <view class="">
+ <caption-row title="共治力量" bgColor="#003399"></caption-row>
+ <view class="menu bgc-ff flex flex-wrap">
+ <view class="menu-item flex f-d-c a-i-c">
+ <text class="menu-item-text f-32 fw mb-20">0</text>
+ <text class="f-28">党员</text>
+ </view>
+ <view class="menu-item flex f-d-c a-i-c">
+ <text class="menu-item-text f-32 fw mb-20">0</text>
+ <text class="f-28">党组织</text>
+ </view>
+ <view class="menu-item flex f-d-c a-i-c">
+ <text class="menu-item-text f-32 fw mb-20">{{gridData.gridStatistics}}</text>
+ <text class="f-28">网格员</text>
+ </view>
+ <!-- <view class="menu-item flex f-d-c a-i-c">
+ <text class="menu-item-text f-32 fw mb-20">0</text>
+ <text class="f-28">社工</text>
+ </view> -->
+ <view class="menu-item flex f-d-c a-i-c">
+ <text class="menu-item-text f-32 fw mb-20">{{gridData.companyStatistics}}</text>
+ <text class="f-28">物业人员</text>
+ </view>
+ <view class="menu-item flex f-d-c a-i-c">
+ <text class="menu-item-text f-32 fw mb-20">{{gridData.ownersStatistics}}</text>
+ <text class="f-28">业委会</text>
+ </view>
+ <!-- <view class="menu-item flex f-d-c a-i-c">
+ <text class="menu-item-text f-32 fw mb-20">0</text>
+ <text class="f-28">群团组织</text>
+ </view> -->
+ </view>
+ </view>
+
+ <view class="">
+ <caption-row title="人员画像" bgColor="#003399"></caption-row>
+ <view class="bar-charts bgc-ff">
+ <qiun-data-charts type="bar" :opts="opts" :chartData="chartData" />
+ </view>
+ <view class="pie-charts flex bgc-ff">
+ <view class="pie-charts-box flex j-c-c a-i-c">
+ <qiun-data-charts type="pie" :opts="pieOpts" :chartData="sexChartData" />
+ </view>
+ <view class="pie-charts-explain flex f-d-c j-c-c" v-if="sexData.length">
+ <!-- <view class="f-32 fw mb-20">性别</view> -->
+ <view class="flex a-i-c mb-20" v-for="i in sexData">
+ <text class="f-30 fw">{{i.gender}}</text>
+ <text class="f-26">({{i.numbers}})</text>
+ </view>
+ </view>
+ </view>
+
+
+ </view>
+ <view class="event">
+ <caption-row title="社区事件" bgColor="#003399"></caption-row>
+ <view class="block bgc-ff mt-20 mb-20">
+ <view class="block-caption f-28 fw">
+ 总体统计
+ </view>
+ <view class="grid">
+ <u-grid :border="true">
+ <u-grid-item bgColor="#fff">
+ <view class="grid-item flex f-d-c a-i-c">
+ <text class="f-32 fw c-main mb-20">{{reportData.result}}</text>
+ <text class="f-28">事件总数</text>
+ </view>
+ </u-grid-item>
+ <u-grid-item bgColor="#fff">
+ <view class="grid-item flex f-d-c a-i-c">
+ <text class="f-32 fw c-main mb-20">{{reportData.result1}}</text>
+ <text class="f-28">办理数</text>
+ </view>
+ </u-grid-item>
+ <u-grid-item bgColor="#fff">
+ <view class="grid-item flex f-d-c a-i-c">
+ <text class="f-32 fw c-main mb-20">{{ setNumber(reportData.result2)}}%</text>
+ <text class="f-28">办结比例</text>
+ </view>
+ </u-grid-item>
+ </u-grid>
+ </view>
+ </view>
+ <view class="block bgc-ff">
+ <view class="block-caption f-28 fw">
+ 事件分类
+ </view>
+ <view class="flex j-c-s-b a-i-c flex-wrap">
+ <view class="report-item">
+ <image class="report-item-bg" src="/static/icon/nav-bg-08.png" mode="aspectFill"></image>
+ <view class="report-item-inner flex f-d-c j-c-c ">
+ <text class="f-30 mb-20">{{reportData.result5}}</text>
+ <text class="f-28 ">矛盾纠纷</text>
+ </view>
+ </view>
+ <view class="report-item">
+ <image class="report-item-bg" src="/static/icon/nav-bg-06.png" mode="aspectFill"></image>
+ <view class="report-item-inner flex f-d-c j-c-c ">
+ <text class="f-30 mb-20">{{reportData.result3}}</text>
+ <text class="f-28 ">公共维护</text>
+ </view>
+ </view>
+ <view class="report-item">
+ <image class="report-item-bg" src="/static/icon/nav-bg-07.png" mode="aspectFill"></image>
+ <view class="report-item-inner flex f-d-c j-c-c ">
+ <text class="f-30 mb-20">{{reportData.result4}}</text>
+ <text class="f-28 ">居家维修</text>
+ </view>
+ </view>
+ <view class="report-item">
+ <image class="report-item-bg" src="/static/icon/nav-bg-09.png" mode="aspectFill"></image>
+ <view class="report-item-inner flex f-d-c j-c-c ">
+ <text class="f-30 mb-20">{{reportData.result6}}</text>
+ <text class="f-28 ">投诉举报</text>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ </view>
+ <tabBar :current="tabbarIndex" :list="tabList" />
+ </view>
+</template>
+
+<script>
+ import captionRow from "@/components/caption/caption.vue"
+ import * as statisticsModal from "@/api/statistics/statistics.js"
+ import tabBar from "@/components/tabBar/tabBar.vue"
+ import {
+ getTabbarList
+ } from "@/common/common.js"
+ export default {
+ components: {
+ captionRow,
+ tabBar
+ },
+ data() {
+ return {
+ reportData: {},
+ houseData: {},
+ chartData: {},
+ opts: {
+ fontSize: 10,
+ color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
+ "#ea7ccc"
+ ],
+ padding: [15, 30, 0, 5],
+ enableScroll: false,
+ legend: {},
+ xAxis: {
+ // boundaryGap: "justify",
+ disableGrid: false,
+ min: 0,
+ axisLine: false,
+ // max: 70,
+ fontSize: 10,
+
+ },
+ yAxis: {},
+ extra: {
+ bar: {
+ type: "stack",
+ width: 14,
+ meterBorde: 1,
+ meterFillColor: "#FFFFFF",
+ activeBgColor: "#000000",
+ activeBgOpacity: 0.08,
+ categoryGap: 2
+ }
+ }
+ },
+ sexChartData: {},
+ pieOpts: {
+ color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
+ "#ea7ccc"
+ ],
+ padding: [5, 5, 5, 5],
+ enableScroll: false,
+ extra: {
+ pie: {
+ customRadius: 60,
+ activeOpacity: 0.5,
+ activeRadius: 10,
+ offsetAngle: 0,
+ labelWidth: 6,
+ border: false,
+ borderWidth: 3,
+ borderColor: "#FFFFFF"
+ }
+ }
+ },
+ houseLabelChartData: {},
+ housePieOpts: {
+ // color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
+ // "#ea7ccc"
+ // ],
+ padding: [5, 5, 5, 5],
+ enableScroll: false,
+ // rotate: false,
+ // rotateLock: false,
+ // dataLabel: true,
+ extra: {
+ pie: {
+ centerColor: "#fff",
+ customRadius: 55,
+ activeOpacity: 0.5,
+ activeRadius: 10,
+ offsetAngle: 0,
+ labelWidth: 6,
+ border: false,
+ borderWidth: 3,
+ borderColor: "#FFFFFF"
+ }
+ // ring: {
+ // ringWidth: 60,
+ // activeOpacity: 0.5,
+ // activeRadius: 10,
+ // offsetAngle: 0,
+ // labelWidth: 15,
+ // border: false,
+ // borderWidth: 3,
+ // borderColor: "#FFFFFF"
+ // }
+ }
+ },
+ gridData: {},
+ houseLabelData: [],
+ sexData: [],
+ tabList: [],
+ tabbarIndex: 1
+ }
+ },
+
+ // onTabItemTap(e) {
+ // // tab 点击时执行,此处直接接收单击事件
+ // console.log(e)
+ // this.refreshData();
+ // },
+ onShow() {
+ let {
+ roleName
+ } = uni.getStorageSync("activeRole");
+ if (roleName == "网格员") {
+ this.tabList = getTabbarList(3);
+ this.tabbarIndex = 1;
+ }
+ if (roleName == "民警") {
+ this.tabList = getTabbarList(2);
+ this.tabbarIndex = 1;
+ }
+
+ if (roleName == "系统管理员") {
+ this.tabList = getTabbarList(4);
+ this.tabbarIndex = 1;
+ }
+
+ this.refreshData();
+ },
+
+ //下拉刷新
+ onPullDownRefresh() {
+ this.refreshData();
+ setTimeout(() => {
+ uni.stopPullDownRefresh();
+ }, 300)
+ },
+
+
+
+ methods: {
+ changeTabbar(e) {
+ console.log("==>", e)
+ // this.refreshData();
+ },
+
+ refreshData() {
+ this.getHouseHoldData();
+ this.getHouseData();
+ this.getHouseLabelData();
+ this.getReportData();
+ this.getGridData();
+ },
+ getRoleType() {
+ let roleName = uni.getStorageSync("activeRole").roleName;
+ if (roleName == "网格员") {
+ return 1;
+ } else if (roleName == "系统管理员") {
+ return 2
+ } else if (roleName == "民警") {
+ return 3;
+ }
+ },
+
+ setNumber(num) {
+ if (num) {
+ let n = Number(this.reportData.result2) * 100
+ return n.toFixed(2)
+ } else {
+ return num
+ }
+
+ },
+
+
+ getHouseHoldData() {
+ statisticsModal.getHouseholdStatistics({
+ code: this.siteInfo.id,
+ roleType: this.getRoleType()
+ }).then(res => {
+ // this.houseHoldData = res.data;
+ let data = res.data;
+ this.sexData = data.gender;
+ this.setPersonData(data.age)
+ this.setSexData(data.gender)
+ })
+ },
+
+ getHouseLabelData() {
+ statisticsModal.getHouseLabelStatistic().then(res => {
+ let data = res.data;
+ this.houseLabelData = data;
+ this.setHouseLabelData(data)
+ })
+ },
+ // 设置房屋标签
+ setHouseLabelData(data) {
+ let res = {
+ series: [{
+ data: []
+ }]
+ }
+ for (let i of data) {
+ res.series[0].data.push({
+ name: i.labelName,
+ value: i.numbers
+ })
+ }
+ this.houseLabelChartData = JSON.parse(JSON.stringify(res));
+ },
+ setPersonData(data) {
+ let res = {
+ categories: [],
+ series: [{
+ name: "人数",
+ data: []
+ }]
+ }
+ for (let i of data) {
+ res.categories.push(i.age);
+ res.series[0].data.push(i.number)
+ }
+ this.chartData = JSON.parse(JSON.stringify(res));
+ },
+
+ setSexData(data) {
+ let res = {
+ series: [{
+ data: []
+ }]
+ }
+ for (let i of data) {
+ res.series[0].data.push({
+ name: i.gender,
+ value: i.numbers
+ })
+ }
+ this.sexChartData = JSON.parse(JSON.stringify(res));
+ },
+
+ //获取社区概况数据
+ getHouseData() {
+ statisticsModal.getHouseStatistics({
+ code: this.siteInfo.id,
+ roleType: this.getRoleType()
+ }).then(res => {
+ this.houseData = res.data;
+ })
+ },
+
+ //获取社区事件数据
+ getReportData() {
+ statisticsModal.getReportStatistics({
+ code: this.siteInfo.id,
+ roleType: this.getRoleType()
+ }).then(res => {
+ console.log(res);
+ this.reportData = res.data;
+ })
+ },
+
+ //获取网格物业人员
+ getGridData() {
+ statisticsModal.getGridStatistics({
+ code: this.siteInfo.id,
+ roleType: this.getRoleType()
+ }).then(res => {
+ console.log(res);
+ this.gridData = res.data;
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #f5f5f5;
+ }
+
+ .container {
+ padding: 0 30rpx;
+ }
+
+ // .section {
+ // padding: 0 20rpx;
+ // }
+
+ .cell {
+ padding: 30rpx 30rpx 0;
+ background-color: #fff;
+ margin-top: 30rpx;
+ border-radius: 16rpx;
+
+ .cell-item {
+ // width: 220rpx;
+ // width: calc(50% - 20rpx);
+ width: 300rpx;
+ height: 167rpx;
+ border-radius: 10rpx;
+ margin-bottom: 30rpx;
+ // display: flex;
+ // flex-direction: column;
+ // justify-content: center;
+ // background-color: #fff;
+ position: relative;
+ // box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.1);
+ }
+
+ .cell-item-icon {
+ width: 64rpx;
+ height: 64rpx;
+ position: absolute;
+ right: 20rpx;
+ top: 20rpx;
+ }
+
+ .c-green {
+ color: #0FA429;
+ }
+
+ .c-blue {
+ color: #1B76D6;
+ }
+
+ .c-orange {
+ color: #FF9905;
+ }
+
+ .c-cyan {
+ color: #13C6C7;
+ }
+
+ .cell-bg {
+ width: 300rpx;
+ height: 167rpx;
+
+
+ }
+
+ .cell-item-inner {
+ width: 300rpx;
+ height: 167rpx;
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding: 30rpx 30rpx 0;
+ box-sizing: border-box;
+ }
+ }
+
+ .menu {
+ // padding: 20rpx 0;
+ margin-top: 20rpx;
+
+ .menu-item {
+ width: 33%;
+ padding: 20rpx 0;
+ // border-right: 1px solid #dadbde;
+ }
+
+ .menu-item-text {
+ color: #003399;
+ }
+
+ .menu-item:nth-child(3n) {
+ border-right: none;
+ }
+
+ // .menu-item:nth-child(-n + 3) {
+ // border-bottom: 1px solid #dadbde;
+ // }
+ }
+
+ .event {
+ padding: 0 0 20rpx;
+ }
+
+ .block {
+ padding: 20rpx;
+ border-radius: 10rpx;
+
+ .block-caption {
+ padding: 20rpx 0;
+ }
+
+ .grid {
+ box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.1);
+ }
+
+ .grid-item {
+ padding: 20px 0;
+ }
+ }
+
+ .report-item {
+ position: relative;
+ margin-bottom: 10rpx;
+ }
+
+ .report-item,
+ .report-item-bg,
+ .report-item-inner {
+ width: 300rpx;
+ height: 167rpx;
+ border-radius: 10rpx;
+ }
+
+ .report-item-inner {
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding: 0 20rpx;
+ box-sizing: border-box;
+ // background-color:#fff;
+ }
+
+ .bar-charts,
+ .pie-charts {
+ width: 100%;
+ height: 300px;
+ border-radius: 10rpx;
+ padding: 0 20rpx;
+ box-sizing: border-box;
+ }
+
+ .pie-charts-house {
+ width: 100%;
+ height: 250px;
+ margin-top: 10px;
+ border-radius: 10rpx;
+ padding: 0 20rpx;
+ box-sizing: border-box;
+ }
+
+ .bar-charts {
+ margin: 20rpx 0;
+ }
+
+ // .pie-charts-box,.pie-charts-explain{
+ // width:50%;
+ // }
+ .pie-charts-box {
+ width: 70%;
+ }
+
+ .pie-charts-explain {
+ width: 30%;
+ padding-left: 40rpx;
+ box-sizing: border-box;
+ }
+
+ .pie-charts-explain-house {
+ width: 40%;
+ padding-left: 40rpx;
+ box-sizing: border-box;
+ }
+</style>
\ No newline at end of file
diff --git a/pages/user/center.vue b/pages/user/center.vue
index c445455..327115e 100644
--- a/pages/user/center.vue
+++ b/pages/user/center.vue
@@ -1,7 +1,8 @@
<template>
<view class="container">
<view class="head">
- <image src="/static/img/center-bg.png" class="head-bg" />
+ <image src="/static/img/center-bg.png" class="head-bg" v-if="roleType == 1" />
+ <image src="/static/img/center-bg-2.png" class="head-bg" v-if="roleType == 2" />
<!-- 用户信息 -->
<view class="user-box">
<view class="left">
@@ -22,7 +23,7 @@
<u-icon name="account" color="#fff" size="28"></u-icon>
<view class="name">我的家人</view>
</navigator>
- <navigator url="/subPackage/house/roomControl/index" hover-class="none" class="nav-item">
+ <navigator url="/subPackage/house/roomControl/myHouse" hover-class="none" class="nav-item">
<u-icon name="home" color="#fff" size="28"></u-icon>
<view class="name">我的房屋</view>
</navigator>
@@ -38,10 +39,14 @@
</view>
<view class="cell-box" v-if="isLogin">
<u-cell-group :border="false" icon="star" :customStyle="{fontSize:'26rpx',color:'#585b61'}">
- <u-cell title="切换角色" isLink url="/subPackage/user/role/index">
+ <u-cell v-if="roleType == 1" title="切换角色" isLink url="/subPackage/user/role/index">
<image slot="icon" src="/static/icon/menu-center-02.png" class="icon" mode=""></image>
</u-cell>
- <u-cell v-if="siteInfo.addressType == 1" title="我的事件" isLink url="/subPackage/bs/views/repairList">
+ <u-cell v-if="roleType == 2" title="切换角色" isLink url="/subPackage/user/role/index">
+ <image slot="icon" src="/static/icon/menu-center-05.png" class="icon" mode=""></image>
+ </u-cell>
+ <u-cell v-if="siteInfo.addressType == 1" title="我的事件" isLink
+ url="/subPackage/bs/views/repairList?from=center">
<image slot="icon" src="/static/icon/menu-center-01.png" class="icon" mode=""></image>
</u-cell>
<u-cell v-if="siteInfo.addressType == 2" title="我的事件" isLink url="/subPackage/user/event/event">
@@ -53,19 +58,29 @@
<u-cell v-if="roleType == 1" title="我的评论" isLink url="/subPackage/user/commentList/commentList">
<image slot="icon" src="/static/icon/menu-center-01.png" class="icon" mode=""></image>
</u-cell>
- <u-cell title="修改密码" :border="false" isLink url="/subPackage/user/password/index">
+ <u-cell v-if="roleType == 1" title="修改密码" :border="false" isLink url="/subPackage/user/password/index">
<image slot="icon" src="/static/icon/menu-center-03.png" class="icon" mode=""></image>
+ </u-cell>
+ <u-cell v-if="roleType == 2" title="修改密码" :border="false" isLink url="/subPackage/user/password/index">
+ <image slot="icon" src="/static/icon/menu-center-06.png" class="icon" mode=""></image>
</u-cell>
</u-cell-group>
</view>
- <view class="cell-box" v-if="isLogin">
+ <!-- <view class="cell-box" v-if="isLogin">
<u-cell-group :border="false">
<u-cell title="退出登录" :border="false" @click="logOut" isLink>
<image slot="icon" src="/static/icon/menu-center-04.png" class="icon" mode=""></image>
</u-cell>
</u-cell-group>
+ </view> -->
+
+ <view class="exit-btn" @click="logOut" :style="{color:color}">
+ 退出登录
</view>
+
+
+ <tabBar :current="tabbarIndex" :list="tabbarList" />
</view>
</template>
@@ -76,7 +91,14 @@
import {
minioBaseUrl
} from "@/common/setting.js"
+ import tabBar from "@/components/tabBar/tabBar.vue"
+ import {
+ getTabbarList
+ } from "@/common/common.js";
export default {
+ components: {
+ tabBar
+ },
data() {
return {
headHeight: 582,
@@ -93,17 +115,36 @@
],
roleType: 1,
addressType: 1,
- user_info: {}
+ user_info: {},
+ color: "#017BFC",
+ tabbarList: [],
+ tabbarIndex: 2
};
},
onShow() {
// this.getUserInfo();
let role = uni.getStorageSync('activeRole')
- if (role.roleAlias == "inhabitant") {
+ if (role.roleName == "居民") {
+ this.tabbarList = getTabbarList(1)
this.roleType = 1
- } else {
+ this.color = "#017BFC"
+ this.tabbarIndex = 1;
+ } else if (role.roleName == "民警") {
+ this.tabbarList = getTabbarList(2)
this.roleType = 2;
+ this.color = "#003399"
+ this.tabbarIndex = 2;
+ } else if (role.roleName == "系统管理员") {
+ this.tabbarList = getTabbarList(4)
+ this.roleType = 1
+ this.color = "#017BFC";
+ this.tabbarIndex = 2;
+ } else if (role.roleName == "网格员") {
+ this.tabbarList = getTabbarList(3)
+ this.roleType = 1
+ this.color = "#017BFC";
+ this.tabbarIndex = 2;
}
this.addressType = uni.getStorageSync("siteInfo").addressType;
},
@@ -338,4 +379,16 @@
font-weight: 500;
color: #585b61;
}
+
+ .exit-btn {
+ width: 690rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ border-radius: 16rpx;
+ border: 1px solid currentColor;
+ text-align: center;
+ position: fixed;
+ bottom: 150rpx;
+ left: calc((100% - 690rpx)/2);
+ }
</style>
\ No newline at end of file
diff --git a/static/icon/login-title-ys.png b/static/icon/login-title-ys.png
new file mode 100644
index 0000000..0835e12
--- /dev/null
+++ b/static/icon/login-title-ys.png
Binary files differ
diff --git a/static/icon/menu-11.png b/static/icon/menu-11.png
new file mode 100644
index 0000000..9b931a0
--- /dev/null
+++ b/static/icon/menu-11.png
Binary files differ
diff --git a/static/icon/menu-12.png b/static/icon/menu-12.png
new file mode 100644
index 0000000..1117ef3
--- /dev/null
+++ b/static/icon/menu-12.png
Binary files differ
diff --git a/static/icon/menu-13.png b/static/icon/menu-13.png
new file mode 100644
index 0000000..2868a99
--- /dev/null
+++ b/static/icon/menu-13.png
Binary files differ
diff --git a/static/icon/menu-14.png b/static/icon/menu-14.png
new file mode 100644
index 0000000..4548f63
--- /dev/null
+++ b/static/icon/menu-14.png
Binary files differ
diff --git a/static/icon/menu-15.png b/static/icon/menu-15.png
new file mode 100644
index 0000000..9292659
--- /dev/null
+++ b/static/icon/menu-15.png
Binary files differ
diff --git a/static/icon/menu-16.png b/static/icon/menu-16.png
new file mode 100644
index 0000000..9c801d4
--- /dev/null
+++ b/static/icon/menu-16.png
Binary files differ
diff --git a/static/icon/menu-17.png b/static/icon/menu-17.png
new file mode 100644
index 0000000..16f3464
--- /dev/null
+++ b/static/icon/menu-17.png
Binary files differ
diff --git a/static/icon/menu-18.png b/static/icon/menu-18.png
new file mode 100644
index 0000000..0ed8976
--- /dev/null
+++ b/static/icon/menu-18.png
Binary files differ
diff --git a/static/icon/menu-19.png b/static/icon/menu-19.png
new file mode 100644
index 0000000..9baf483
--- /dev/null
+++ b/static/icon/menu-19.png
Binary files differ
diff --git a/static/icon/menu-20.png b/static/icon/menu-20.png
new file mode 100644
index 0000000..763db34
--- /dev/null
+++ b/static/icon/menu-20.png
Binary files differ
diff --git a/static/icon/menu-21.png b/static/icon/menu-21.png
new file mode 100644
index 0000000..bfd4e87
--- /dev/null
+++ b/static/icon/menu-21.png
Binary files differ
diff --git a/static/icon/menu-22.png b/static/icon/menu-22.png
new file mode 100644
index 0000000..aa093ca
--- /dev/null
+++ b/static/icon/menu-22.png
Binary files differ
diff --git a/static/icon/menu-23.png b/static/icon/menu-23.png
new file mode 100644
index 0000000..0a44441
--- /dev/null
+++ b/static/icon/menu-23.png
Binary files differ
diff --git a/static/icon/menu-24.png b/static/icon/menu-24.png
new file mode 100644
index 0000000..9ad6b0c
--- /dev/null
+++ b/static/icon/menu-24.png
Binary files differ
diff --git a/static/icon/menu-25.png b/static/icon/menu-25.png
new file mode 100644
index 0000000..943763d
--- /dev/null
+++ b/static/icon/menu-25.png
Binary files differ
diff --git a/static/icon/menu-26.png b/static/icon/menu-26.png
new file mode 100644
index 0000000..ee31fe3
--- /dev/null
+++ b/static/icon/menu-26.png
Binary files differ
diff --git a/static/icon/menu-27.png b/static/icon/menu-27.png
new file mode 100644
index 0000000..9cd58f6
--- /dev/null
+++ b/static/icon/menu-27.png
Binary files differ
diff --git a/static/icon/menu-28.png b/static/icon/menu-28.png
new file mode 100644
index 0000000..df87162
--- /dev/null
+++ b/static/icon/menu-28.png
Binary files differ
diff --git a/static/icon/menu-center-05.png b/static/icon/menu-center-05.png
new file mode 100644
index 0000000..5cfb014
--- /dev/null
+++ b/static/icon/menu-center-05.png
Binary files differ
diff --git a/static/icon/menu-center-06.png b/static/icon/menu-center-06.png
new file mode 100644
index 0000000..d663b72
--- /dev/null
+++ b/static/icon/menu-center-06.png
Binary files differ
diff --git a/static/icon/nav-15.png b/static/icon/nav-15.png
index 164a698..9074c4e 100644
--- a/static/icon/nav-15.png
+++ b/static/icon/nav-15.png
Binary files differ
diff --git a/static/icon/nav-16.png b/static/icon/nav-16.png
new file mode 100644
index 0000000..40c4aa0
--- /dev/null
+++ b/static/icon/nav-16.png
Binary files differ
diff --git a/static/icon/nav-17.png b/static/icon/nav-17.png
new file mode 100644
index 0000000..351624c
--- /dev/null
+++ b/static/icon/nav-17.png
Binary files differ
diff --git a/static/icon/nav-bg-15.png b/static/icon/nav-bg-15.png
new file mode 100644
index 0000000..57cce46
--- /dev/null
+++ b/static/icon/nav-bg-15.png
Binary files differ
diff --git a/static/icon/nav-bg-16.png b/static/icon/nav-bg-16.png
new file mode 100644
index 0000000..780ec7e
--- /dev/null
+++ b/static/icon/nav-bg-16.png
Binary files differ
diff --git a/static/icon/nav-bg-17.png b/static/icon/nav-bg-17.png
new file mode 100644
index 0000000..0cb8de2
--- /dev/null
+++ b/static/icon/nav-bg-17.png
Binary files differ
diff --git a/static/icon/nav-bg-18.png b/static/icon/nav-bg-18.png
new file mode 100644
index 0000000..d877dc2
--- /dev/null
+++ b/static/icon/nav-bg-18.png
Binary files differ
diff --git a/static/img/block-bg.png b/static/img/block-bg.png
new file mode 100644
index 0000000..c987b2d
--- /dev/null
+++ b/static/img/block-bg.png
Binary files differ
diff --git a/static/img/center-bg-2.png b/static/img/center-bg-2.png
new file mode 100644
index 0000000..e336739
--- /dev/null
+++ b/static/img/center-bg-2.png
Binary files differ
diff --git a/static/img/tabbar-04-selected.png b/static/img/tabbar-04-selected.png
new file mode 100644
index 0000000..8f830e3
--- /dev/null
+++ b/static/img/tabbar-04-selected.png
Binary files differ
diff --git a/static/img/tabbar-04.png b/static/img/tabbar-04.png
new file mode 100644
index 0000000..988d68d
--- /dev/null
+++ b/static/img/tabbar-04.png
Binary files differ
diff --git a/static/img/tabbar-05-selected.png b/static/img/tabbar-05-selected.png
new file mode 100644
index 0000000..d8a7c0e
--- /dev/null
+++ b/static/img/tabbar-05-selected.png
Binary files differ
diff --git a/static/img/tabbar-05.png b/static/img/tabbar-05.png
new file mode 100644
index 0000000..8ca8d2a
--- /dev/null
+++ b/static/img/tabbar-05.png
Binary files differ
diff --git a/static/img/tabbar-06-selected.png b/static/img/tabbar-06-selected.png
new file mode 100644
index 0000000..8b7dc43
--- /dev/null
+++ b/static/img/tabbar-06-selected.png
Binary files differ
diff --git a/static/img/tabbar-06.png b/static/img/tabbar-06.png
new file mode 100644
index 0000000..c1fe7ca
--- /dev/null
+++ b/static/img/tabbar-06.png
Binary files differ
diff --git a/static/img/tabbar-07-selected.png b/static/img/tabbar-07-selected.png
new file mode 100644
index 0000000..99b9474
--- /dev/null
+++ b/static/img/tabbar-07-selected.png
Binary files differ
diff --git a/static/img/tabbar-07.png b/static/img/tabbar-07.png
new file mode 100644
index 0000000..8957470
--- /dev/null
+++ b/static/img/tabbar-07.png
Binary files differ
diff --git a/store/index.js b/store/index.js
index 41fe799..b666364 100644
--- a/store/index.js
+++ b/store/index.js
@@ -97,6 +97,7 @@
// },
//设置当前激活的角色
setActiveRole(state, role) {
+ console.log("role===>", role);
state.activeRole = role
uni.setStorageSync('activeRole', role)
},
@@ -132,6 +133,8 @@
},
actions: {
+
+
getMenuList({
commit
}) {
diff --git a/subPackage/article/detail.vue b/subPackage/article/detail.vue
index 94e48fc..e16f614 100644
--- a/subPackage/article/detail.vue
+++ b/subPackage/article/detail.vue
@@ -67,7 +67,7 @@
<view class="vote bgc-ff">
<view class="mb-20" v-for="(item,index) in voteTopicList" :key="index">
<view class="vote-title">
- <!-- <text class="f-30 fw">{{item.discussContent}}</text> -->
+ <text class="f-30 fw">{{item.discussContent}}</text>
<text class="f-26 ml-10">{{item.optionRange == 0?"(单选)":"(多选)"}}</text>
</view>
<view class="" v-if="item.optionRange == 0">
@@ -153,6 +153,27 @@
<u-icon name="thumb-up-fill" size="22" color="#fff"></u-icon>
</view>
</view> -->
+
+
+ <u-popup :show="isShowPopup" @close="isShowPopup = false" mode="center" :round="10" :closeable="true">
+ <view class='login-mode'>
+ <view class="f-30 fw">
+ 安全验证
+ </view>
+ <view class="f-30 mt-30">
+ {{phone}}
+ </view>
+ <view class='flex a-i-c login-input'>
+ <input class='f-30 c-33' type='number' placeholder='请输入验证码' v-model="validationCode"
+ placeholder-class='c-aa f-28'></input>
+ <button class='login-input-btn f-24 c-33' @click='getValidationCode'>{{text}}</button>
+ </view>
+ <!-- <button class='login-btn c-ff f-30' :class='validationCode?"bgc-main":""'
+ :disabled="validationCode?false:true">确定</button> -->
+ <button class='login-btn c-ff f-30 bgc-main' @click="confirmValidationCode()">确定</button>
+ </view>
+ </u-popup>
+
</view>
</template>
@@ -188,7 +209,11 @@
isComplete: false, // 是否完成全部投票
UParseStyle: {
img: 'width: 100%; float: left;'
- }
+ },
+ isShowPopup: false,
+ validationCode: "",
+ phone: "",
+ text: "获取验证码"
}
},
onLoad(option) {
@@ -205,6 +230,10 @@
uni.$on('refreshComment', () => {
this.getAritcleComment()
})
+ let {
+ phone
+ } = uni.getStorageSync("userInfo")
+ this.phone = `${phone.substr(0,4)}****${phone.substr(8)}`
},
computed: {
@@ -387,6 +416,12 @@
return arr;
},
+
+
+ confirmValidationCode() {
+ this.voteRequest()
+ },
+
//提交投票
submitVote() {
if (this.applyInfo.signatureFlag == 1) {
@@ -394,7 +429,8 @@
url: `signature?type=2`
})
} else {
- this.voteRequest()
+ this.isShowPopup = true;
+ // this.voteRequest()
}
@@ -425,6 +461,7 @@
uni.showToast({
title: "操作成功"
})
+ this.isShowPopup = false;
this.$nextTick(() => {
this.getApplyDetail();
this.getVoteList();
@@ -438,7 +475,34 @@
uni.navigateTo({
url: `comment?id=${this.params.id}`
})
- }
+ },
+
+
+ getValidationCode() {
+ // let phone_reg = /^1(3|4|5|6|7|8|9)\d{9}$/;
+ // if (!phone_reg.test(this.phone)) {
+ // this.$showTips("手机号码有误~");
+ // return false;
+ // }
+ // this.sendValidationCode();
+ let second = 60;
+ let time = setInterval(() => {
+ second--
+ this.text = `${second}秒后获取`
+ if (second == 0 || this.data.isLogin) {
+ clearInterval(time);
+ this.text = "获取验证码";
+ }
+ }, 1000)
+ },
+
+
+
+ sendValidationCode() {
+
+ },
+
+
}
}
</script>
@@ -599,4 +663,78 @@
.mb-30 {
margin-bottom: 30rpx;
}
+
+ .login-mode {
+ padding: 20rpx;
+ }
+
+ .login-input {
+ height: 90rpx;
+ border-radius: 45rpx;
+ background-color: #f0f0f0;
+ padding: 0 30rpx 0 40rpx;
+ margin-top: 20rpx;
+ width: 550rpx;
+ box-sizing: border-box;
+ }
+
+ .login-input text {
+ flex: 1;
+ }
+
+ .login-input input {
+ height: 90rpx;
+ width: 100%;
+ // flex: 3
+ }
+
+ .login-input-btn {
+ width: 200rpx;
+ height: 60rpx;
+ line-height: 60rpx;
+ border-radius: 30rpx;
+ padding: 0;
+ margin: 0;
+ transition: all ease-out .3s;
+ border: none;
+ }
+
+ .login-input-btn::after {
+ border: none;
+ }
+
+ .login-input-btn[disabled] {
+ background-color: #fff !important;
+ color: #aaa !important;
+ }
+
+ .login-explain {
+ margin-top: 10rpx;
+ }
+
+ .login-btn {
+ width: 550rpx;
+ height: 90rpx;
+ line-height: 90rpx;
+ border-radius: 45rpx;
+ margin-top: 50rpx;
+ transition: all ease-out .3s;
+ }
+
+ .login-btn[disabled] {
+ background-color: #9DB9F7 !important;
+ color: #fff !important;
+ }
+
+ .c-aa {
+ color: #aaa;
+ }
+
+ .c-33 {
+ color: #333;
+ }
+
+ .mt-30 {
+ margin-top: 30rpx;
+ }
</style>
\ No newline at end of file
diff --git a/subPackage/article/signature.vue b/subPackage/article/signature.vue
index 7443bd3..677216f 100644
--- a/subPackage/article/signature.vue
+++ b/subPackage/article/signature.vue
@@ -7,6 +7,30 @@
<image :src="imgUrl" mode="" style="width: 100%;"></image>
</view>
</view> -->
+
+
+
+ <u-popup :show="isShowPopup" @close="isShowPopup = false" mode="center" :round="10" :closeable="true">
+ <view class='login-mode'>
+ <view class="f-30 fw">
+ 安全验证
+ </view>
+ <view class="f-30 mt-30">
+ {{phone}}
+ </view>
+ <view class='flex a-i-c login-input'>
+ <input class='f-30 c-33' type='number' placeholder='请输入验证码' v-model="validationCode"
+ placeholder-class='c-aa f-28'></input>
+ <button class='login-input-btn f-24 bgc-ff c-33' @click='getValidationCode'>{{text}}</button>
+ </view>
+ <!-- <button class='login-btn c-ff f-30' :class='validationCode?"bgc-main":""'
+ :disabled="validationCode?false:true">确定</button> -->
+ <button class='login-btn c-ff f-30 bgc-main' @click="confirmValidationCode()">确定</button>
+ </view>
+ </u-popup>
+
+
+
</view>
</template>
@@ -29,18 +53,27 @@
lineWidth: 3, //签名时线宽
textColor: '#007AFF' //签名文字颜色
},
- imgUrl: '',
+ imgUrl: '', //签名临时路径
header: {},
uploadConfig: {
url: prodUrl + "/blade-resource/oss/endpoint/put-file",
header: {},
},
+ isShowPopup: false,
+ validationCode: "",
+ phone: "",
+ text: "获取验证码",
+ imgSrc: ""
}
},
onLoad(option) {
this.type = option.type;
this.getHeader()
+ let {
+ phone
+ } = uni.getStorageSync("userInfo")
+ this.phone = `${phone.substr(0,4)}****${phone.substr(8)}`
},
methods: {
@@ -83,12 +116,48 @@
if (this.type == 1) {
prePage.$vm.applyRequest(src);
} else {
- prePage.$vm.voteRequest(src);
+ this.isShowPopup = true;
+ this.imgSrc = src;
+
+ // prePage.$vm.voteRequest(src);
}
+ // uni.navigateBack({
+ // delta: 2
+ // })
+ },
+
+ confirmValidationCode() {
+ let pages = getCurrentPages();
+ let prePage = pages[pages.length - 2];
+ prePage.$vm.voteRequest(this.imgSrc);
+ this.isShowPopup = false;
uni.navigateBack({
delta: 2
})
- }
+ },
+
+
+
+ getValidationCode() {
+ // let phone_reg = /^1(3|4|5|6|7|8|9)\d{9}$/;
+ // if (!phone_reg.test(this.phone)) {
+ // this.$showTips("手机号码有误~");
+ // return false;
+ // }
+ // this.sendValidationCode();
+ let second = 60;
+ let time = setInterval(() => {
+ second--
+ this.text = `${second}秒后获取`
+ if (second == 0 || this.data.isLogin) {
+ clearInterval(time);
+ this.text = "获取验证码";
+ }
+ }, 1000)
+ },
+
+
+
}
}
</script>
@@ -104,4 +173,78 @@
margin: 20rpx;
color: #aaaaaa;
}
+
+ .login-mode {
+ padding: 20rpx;
+ }
+
+ .login-input {
+ height: 90rpx;
+ border-radius: 45rpx;
+ background-color: #f0f0f0;
+ padding: 0 30rpx 0 40rpx;
+ margin-top: 20rpx;
+ width: 550rpx;
+ box-sizing: border-box;
+ }
+
+ .login-input text {
+ flex: 1;
+ }
+
+ .login-input input {
+ height: 90rpx;
+ width: 100%;
+ // flex: 3
+ }
+
+ .login-input-btn {
+ width: 200rpx;
+ height: 60rpx;
+ line-height: 60rpx;
+ border-radius: 30rpx;
+ padding: 0;
+ margin: 0;
+ transition: all ease-out .3s;
+ border: none;
+ }
+
+ .login-input-btn::after {
+ border: none;
+ }
+
+ .login-input-btn[disabled] {
+ background-color: #fff !important;
+ color: #aaa !important;
+ }
+
+ .login-explain {
+ margin-top: 10rpx;
+ }
+
+ .login-btn {
+ width: 550rpx;
+ height: 90rpx;
+ line-height: 90rpx;
+ border-radius: 45rpx;
+ margin-top: 50rpx;
+ transition: all ease-out .3s;
+ }
+
+ .login-btn[disabled] {
+ background-color: #9DB9F7 !important;
+ color: #fff !important;
+ }
+
+ .c-aa {
+ color: #aaa;
+ }
+
+ .c-33 {
+ color: #333;
+ }
+
+ .mt-30 {
+ margin-top: 30rpx;
+ }
</style>
\ No newline at end of file
diff --git a/subPackage/bs/components/form/rentForm.vue b/subPackage/bs/components/form/rentForm.vue
index f3e3f0f..3b34567 100644
--- a/subPackage/bs/components/form/rentForm.vue
+++ b/subPackage/bs/components/form/rentForm.vue
@@ -1,24 +1,49 @@
<template>
- <u-form :model="form" class="form-box" :rules="rules" ref="refForm">
- <u-form-item class="form-item" label="姓名" required prop="name" labelWidth="80">
- <u-input v-model="form.name" border="none" placeholder="姓名" />
- </u-form-item>
- <u-form-item class="form-item" label="联系方式" labelWidth="80">
- <u-input type="number" v-model="form.phoneNumber" border="none" placeholder="联系方式" />
- </u-form-item>
- <u-form-item class="form-item" label="身份证号码" required prop="idCard" labelWidth="80">
- <u-input type="idcard" v-model="form.idCard" border="none" placeholder="身份证号码" />
- </u-form-item>
- <u-form-item class="form-item" label="户籍地址" labelWidth="80">
- <u-input v-model="form.hukouRegistration" border="none" placeholder="选填" />
- </u-form-item>
- <u-form-item class="form-item" label="工作单位" labelWidth="80">
- <u-input v-model="form.employer" border="none" placeholder="选填" />
- </u-form-item>
- </u-form>
+ <view class="">
+ <u-form :model="form" class="form-box" :rules="rules" ref="refForm">
+ <u-form-item class="form-item" label="姓名" required prop="name" labelWidth="100">
+ <u-input v-model="form.name" border="none" placeholder="姓名" />
+ </u-form-item>
+ <u-form-item class="form-item" label="联系方式" required prop="phoneNumber" labelWidth="100">
+ <u-input type="number" v-model="form.phoneNumber" border="none" placeholder="联系方式" />
+ </u-form-item>
+ <u-form-item class="form-item" label="身份证号码" required prop="idCard" labelWidth="100">
+ <u-input type="idcard" v-model="form.idCard" border="none" placeholder="身份证号码" />
+ </u-form-item>
+ <u-form-item @click="showGenderPicker = true" class="form-item" label="性别" prop="legalGender"
+ labelWidth="100">
+ <u--input border="none" v-model="genderValue" disabled disabledColor="#ffffff" placeholder="请选择性别">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item @click="showNationPicker = true" class="form-item" label="民族" prop="ethnicity"
+ labelWidth="100">
+ <u--input border="none" v-model="nationValue" disabled disabledColor="#ffffff" placeholder="请选择民族">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item class="form-item" label="户籍地址" labelWidth="100">
+ <u-input v-model="form.hukouRegistration" border="none" placeholder="选填" />
+ </u-form-item>
+ <u-form-item class="form-item" label="工作单位" labelWidth="100">
+ <u-input v-model="form.employer" border="none" placeholder="选填" />
+ </u-form-item>
+ </u-form>
+ <u-picker :defaultIndex="nationTypeListIndex" :closeOnClickOverlay="true" :show="showNationPicker"
+ :columns="[nationTypeList]" @close="showNationPicker = false" @cancel="showNationPicker = false"
+ keyName="name" @confirm="confirmNation"></u-picker>
+
+ <u-picker :defaultIndex="genderIndex" :closeOnClickOverlay="true" :show="showGenderPicker" :columns="[gender]"
+ @close="showGenderPicker = false" @cancel="showGenderPicker = false" keyName="name"
+ @confirm="confirmGender"></u-picker>
+ </view>
+
</template>
<script>
+ import {
+ bizDictionary
+ } from '@/api/system/dict.js'
export default {
data() {
return {
@@ -27,7 +52,9 @@
phoneNumber: '',
idCard: '',
hukouRegistration: '',
- employer: ''
+ employer: '',
+ ethnicity: '',
+ gender: ''
},
rules: {
name: [{
@@ -36,9 +63,10 @@
// 可以单个或者同时写两个触发验证方式
trigger: ['change', 'blur'],
}],
- "phoneNumber": [{
+ phoneNumber: [{
required: true,
message: '请输入联系方式',
+ // 可以单个或者同时写两个触发验证方式
trigger: ['change', 'blur'],
},
{
@@ -67,8 +95,64 @@
message: '请输入正确的身份证号',
// 触发器可以同时用blur和change
trigger: ['change', 'blur'],
- }]
+ }],
+ },
+ nationTypeList: [], //民族
+ nationTypeIndex: [0],
+ nationValue: "",
+ gender: [{ //性别
+ value: 1,
+ name: '男',
+ },
+ {
+ value: 0,
+ name: '女',
+ }
+ ],
+ genderIndex: [0],
+ genderValue: "",
+ showNationPicker: false,
+ showGenderPicker: false,
+
+ }
+ },
+ created() {
+ this.getAllBizDict()
+ },
+ methods: {
+ async getAllBizDict() {
+ // 获取民族
+ await this.getBizDict('nationType', this.nationTypeList);
+ },
+
+ // 获取业务字典
+ 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)
+ })
+ })
+ },
+
+ //选择民族
+ confirmNation(e) {
+ this.nationIndex = e.indexs;
+ this.nationValue = e.value[0].name;
+ this.form.ethnicity = e.value[0].value;
+ this.showNationPicker = false;
+ },
+
+ //选择性别
+ confirmGender(e) {
+ this.genderIndex = e.indexs;
+ this.genderValue = e.value[0].name;
+ this.form.gender = e.value[0].value;
+ this.showGenderPicker = false;
}
}
}
diff --git a/subPackage/bs/views/rentDetail.vue b/subPackage/bs/views/rentDetail.vue
index d65ee14..b4e307a 100644
--- a/subPackage/bs/views/rentDetail.vue
+++ b/subPackage/bs/views/rentDetail.vue
@@ -79,7 +79,7 @@
<u-button class="btn-item" color="#2CD5C0" plain style="width: 300rpx;" @click="addRentForm">再加一人</u-button>
<u-button class="btn-item" type="error" @click="isModelShow = true" v-if="btnControls.deleteBtn">删除
</u-button>
- <u-button class="btn-item" type="success" @click="verify" v-if="btnControls.verifyBtn">确认</u-button>
+ <u-button class="btn-item" type="success" @click="verifyConfirm" v-if="btnControls.verifyBtn">确认</u-button>
<u-button class="btn-item" color="linear-gradient(to right, #06B0FD, #027BFE)" @click="saveOrUpdate">
{{ rentId === '' ? "保存" : "确认修改" }}</u-button>
</view>
@@ -376,31 +376,44 @@
verify() {
this.isAuditShow = true
},
- verifyConfirm(e) {
- const auditStatus = e.value[0].status
+ verifyConfirm() {
+ // const auditStatus = e.value[0].status
+
+
+
+ uni.showModal({
+ title: "提示",
+ content: "是否确认该租户?",
+ success: (res) => {
+ if (res.confirm) {
+ this.confirmRequest();
+ }
+ }
+ })
+
+
+ },
+
+ confirmRequest() {
confirmHouseRental({
id: this.rentId,
- auditStatus
+ auditStatus: 1
}).then(res => {
const {
code,
data
} = res
if (code !== 200) {
- uni.showToast({
- title: "确认失败",
- icon: 'error'
- })
+ this.$showTips("确认失败", 'error')
return
}
- uni.showToast({
- title: "确认成功",
- icon: 'success'
- })
- this.isAuditShow = false
+ this.$showTips("确认成功", 'success')
+ // this.isAuditShow = false
this.getCurrentRentInfo()
})
},
+
+
// 更新操作
async update() {
let householdVOList = []
@@ -521,6 +534,19 @@
this.rentFormNum = householdVOList.length
this.$nextTick(() => {
householdVOList.forEach((item, index) => {
+ if (item.ethnicity) {
+ let obj = this.$getIndex(this.$refs.rentform[0].nationTypeList, item
+ .ethnicity,
+ "value", "name")
+ this.$refs.rentform[index].nationValue = obj.name;
+ this.$refs.rentform[index].nationTypeIndex = obj.index;
+ }
+ if (typeof(item.gender) == 'number') {
+ let obj = this.$getIndex(this.$refs.rentform[index]
+ .gender, item.gender, "value", "name")
+ this.$refs.rentform[index].genderValue = obj.name;
+ this.$refs.rentform[index].genderIndex = obj.index;
+ }
this.$refs.rentform[index].form = item
})
})
diff --git a/subPackage/bs/views/repairList.vue b/subPackage/bs/views/repairList.vue
index 11e8559..af8d29e 100644
--- a/subPackage/bs/views/repairList.vue
+++ b/subPackage/bs/views/repairList.vue
@@ -128,6 +128,11 @@
})
this.repairType = option.type;
}
+ if (option.from) {
+ uni.setNavigationBarTitle({
+ title: "我的事件"
+ })
+ }
// this.getList()
},
diff --git a/subPackage/house/family/index.vue b/subPackage/house/family/index.vue
index 85ad4b1..0f6023f 100644
--- a/subPackage/house/family/index.vue
+++ b/subPackage/house/family/index.vue
@@ -93,9 +93,17 @@
<text class="proprietor-box">
{{scItem.realName || ""}}
</text>
- <text class="r floor-box">
- {{scItem.houseNo}}
- </text>
+ <view>
+ <!-- <view class="label-tag mr-10"
+ :style="{backgroundColor:showHouseColor(scItem.houseColor,'showColor')}">
+ {{showHouseColor(scItem.houseColor,'name')}}
+ </view> -->
+ <text class="r floor-box"
+ :style="{color:showHouseColor(scItem.houseColor,'showColor')}">
+ {{scItem.houseNo}}
+ </text>
+ </view>
+
</view>
<!-- <view style="margin-top:10rpx;" v-if="scItem.householdLabelList.length">
<block v-for="i in scItem.householdLabelList">
@@ -173,7 +181,26 @@
unitName: "", //单元名称
houseData: {},
shopType: "", //商铺类型 1 自建房商铺 2 企业商铺
- startTime: ""
+ startTime: "",
+ labelItemList: [{
+ name: "闲置",
+ showColor: '#30D17C',
+ color: "green"
+ },
+
+ {
+
+
+ name: "出租",
+ showColor: '#FFCC00',
+ color: "yellow"
+ },
+ {
+ name: "自住",
+ showColor: '#0099FF',
+ color: "blue"
+ },
+ ]
}
},
onLoad(e) {
@@ -220,6 +247,17 @@
this.getBuildingList()
},
methods: {
+
+
+ showHouseColor(color, key) {
+ for (let i of this.labelItemList) {
+ if (i.color == color) {
+
+ return i[key]
+ }
+ }
+ },
+
async getBuildingList() {
uni.showLoading({
title: "正在加载"
@@ -340,8 +378,9 @@
}
.floor-box {
- color: #017BFC;
- font-weight: 700;
+ // color: #017BFC;
+ color: #333;
+ // font-weight: 700;
}
}
diff --git a/subPackage/house/houseNumber/index.vue b/subPackage/house/houseNumber/index.vue
index 197f395..b11f335 100644
--- a/subPackage/house/houseNumber/index.vue
+++ b/subPackage/house/houseNumber/index.vue
@@ -67,7 +67,7 @@
</view>
</view>
<u-toast ref="uToast"></u-toast>
- <view class="btn-box">
+ <view class="btn-box" v-if="info.source != 3">
<view class="sl-box" @click="csjlClick">
<u-icon name="/static/icon/menu-01.png" size="30"></u-icon>
<text>场所记录</text>
@@ -82,7 +82,7 @@
</view>
</view>
- <!-- <footer-btn v-if="isPolice" text="场所检查" @click="showPopup = true"></footer-btn> -->
+ <footer-btn v-if="info.source == 3" text="场所采集" @click="cscjClick"></footer-btn>
<u-popup :show="showPopup" mode="bottom" round="10" :closeable="true" @close="showPopup=false">
<view class="">
@@ -188,7 +188,11 @@
name: 'frontType',
value: '未完善'
},
-
+ {
+ title: '三级消防单位',
+ name: 'threeFireProtection',
+ value: '未完善'
+ },
{
title: '场所负责人',
name: 'principal',
@@ -476,6 +480,10 @@
item.value = data.isFront == 1 ? "是" : "否"
}
+ if (item.name == 'threeFireProtection') {
+ item.value = data.threeFireProtection == 1 ? "否" : "是"
+
+ }
if (data.isFront == 1 && item.name == "frontType") {
this.getBizDict('frontType', (list) => {
item.value = this.$getIndex(list, data.frontType, 'dictKey',
@@ -537,8 +545,15 @@
},
cscjClick() {
// this.$u.func.globalNavigator('/subPackage/workbench/views/cscj?stdId=' + this.stdId)
- this.$u.func.globalNavigator(
- `/subPackage/workbench/views/cscj?houseCode=${this.stdId}&addressType=${this.addressType}`)
+ if (this.info.source == 3) {
+ this.$u.func.globalNavigator(
+ `/subPackage/workbench/views/cscj?houseCode=${this.info.houseCode}&addressType=${this.addressType}`
+ )
+ } else {
+ this.$u.func.globalNavigator(
+ `/subPackage/workbench/views/cscj?houseCode=${this.stdId}&addressType=${this.addressType}`)
+ }
+
},
csjlClick() {
let url = `/subPackage/workbench/views/csjl?stdId=${this.stdId}&name=${this.placeName}&from=place`
@@ -615,31 +630,10 @@
},
navToInspect() {
- if (!this.info.principa) {
+ if (this.info.status == 1) {
this.$showTips("请先完善场所信息")
return
}
- if (!this.info.principal_phone) {
- this.$showTips("请先完善场所信息")
- return
- }
- if (!this.info.place_name) {
- this.$showTips("请先完善场所信息")
- return
- }
- if (!this.info.image_urls) {
- this.$showTips("请先完善场所信息")
- return
- }
- if (!this.info.location) {
- this.$showTips("请先完善场所信息")
- return
- }
- if (!this.info.principal_id_card) {
- this.$showTips("请先完善场所信息")
- return
- }
-
uni.navigateTo({
url: `/subPackage/house/houseNumber/siteInspect?code=${this.stdId}&name=${this.placeName}`
})
diff --git a/subPackage/house/member/add.vue b/subPackage/house/member/add.vue
new file mode 100644
index 0000000..d5f8ab5
--- /dev/null
+++ b/subPackage/house/member/add.vue
@@ -0,0 +1,1247 @@
+<template>
+ <view class="container">
+ <view class="main">
+ <view class="content">
+ <view style="padding:0 20rpx;">
+ <view class="top flex j-c-s-b a-i-c bgc-ff" @click="onScan()" v-if="!currentId">
+ <view class="flex a-i-c">
+ <u-icon name="/static/icon/nav-05.png" width="90rpx" height="90rpx"></u-icon>
+ <text class="f-28 ml-10">扫码获取信息</text>
+ </view>
+ <u-icon name="arrow-right" size="20"></u-icon>
+ </view>
+ </view>
+
+ <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
+ <view class="event-info">
+
+ <view class="box-title">
+ <box-title title="基础信息"></box-title>
+ </view>
+ <u-form-item class="form-item" labelWidth="120" label="房屋" required prop="currentAddress"
+ @click="isShowPopup = true">
+ <u--input v-if="!form.currentAddress" border="none" disabled disabledColor="#ffffff"
+ placeholder="请选择房屋">
+ </u--input>
+ <u-textarea v-if="form.currentAddress" border="none" :disabled="true"
+ disabledColor="#ffffff" v-model="form.currentAddress" placeholder="请选择房屋">
+ </u-textarea>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+ <u-form-item v-if="form.currentAddress" @click="navToHouseTag" class="form-item"
+ labelWidth="110" label="房屋标签" prop="gender">
+ <u--input border="none" v-model="houseTag" 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="110" label="姓名" required prop="name">
+ <u--input border="none" v-model="form.name" placeholder="请输入姓名">
+ </u--input>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('性别','gender')" class="form-item" labelWidth="110" label="性别"
+ prop="gender">
+ <u--input border="none" v-model="selectDefaultName.gender" disabled disabledColor="#ffffff"
+ placeholder="请选择性别">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('证件类型','cardType')" class="form-item" labelWidth="110"
+ label="证件类型" prop="gender">
+ <u--input border="none" v-model="selectDefaultName.cardType" disabled
+ disabledColor="#ffffff" placeholder="请选择证件类型">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item v-if="form.cardType == 111" class="form-item" labelWidth="110" label="身份证号码"
+ prop="idCard">
+ <u--input border="none" type="idcard " v-model="form.idCard" placeholder="请输入身份证号码">
+ </u--input>
+ </u-form-item>
+ <u-form-item v-if="form.cardType && form.cardType != 111" class="form-item" labelWidth="110"
+ label="证件号码" prop="cardNo">
+ <u--input border="none" v-model="form.cardNo" placeholder="请输入证件号码">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="110" label="手机号码" prop="phoneNumber" required>
+ <u--input border="none" type="number" v-model="form.phoneNumber" placeholder="请输入手机号码">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="110" label="户籍地区" prop="residentAdcode">
+ <view class="region">
+ <picker mode="region" :value="residentadDefault" @change="changeHouseholdRegion">
+ <view class="region-picker c-c0" v-if="!residentad">
+ 请选择户籍地区
+ </view>
+ <view class="region-picker c-30" v-if="residentad">
+ {{residentad}}
+ </view>
+ </picker>
+ </view>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('民族','ethnicity')" class="form-item" labelWidth="110"
+ label="民族" prop="ethnicity">
+ <u--input border="none" v-model="selectDefaultName.ethnicity" disabled
+ disabledColor="#ffffff" placeholder="请选择民族">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('是否党员','partyEmber')" class="form-item" labelWidth="110"
+ label="是否党员" prop="partyEmber">
+ <u--input border="none" v-model="selectDefaultName.partyEmber" 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="110" label="职业类别" prop="occupation ">
+ <u--input border="none" v-model="form.occupation " placeholder="请输入职业类别">
+ </u--input>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('婚姻状态','maritalStatus')" class="form-item" labelWidth="110"
+ label="婚姻状态" prop="maritalStatus">
+ <u--input border="none" v-model="selectDefaultName.maritalStatus" 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="110" label="标签" @click="navTo">
+ <view class="">
+ <text style="color: #c0c4cc;"
+ v-if="!form.householdLabelList || !form.householdLabelList.length">请选择标签</text>
+ <text class="f-28" v-else>{{showLabel()}}</text>
+ </view>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+
+ <u-form-item class="form-item" @click="showVolunteerOrg = true" labelWidth="120" label="志愿者组织"
+ prop="volunteerOrg">
+ <u--input border="none" v-model="volunteerOrg" disabled disabledColor="#ffffff"
+ placeholder="请选择志愿者组织">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+ <u-form-item v-if="volunteerOrg == '其他'" required class="form-item" labelWidth="120" label="其他志愿者组织"
+ prop="volunteerOrg">
+ <u--input border="none" v-model="form.volunteerOrg" placeholder="请输入其他志愿者组织">
+ </u--input>
+ </u-form-item>
+
+
+ <u-form-item @click="showSelectBus('与业主关系','relationship')" class="form-item" labelWidth="120"
+ label="与业主关系" required prop="relationship">
+ <u--input border="none" v-model="selectDefaultName.relationship" disabled
+ disabledColor="#ffffff" placeholder="请选择与业主关系">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+ <u-form-item v-if="form.cardType && form.cardType != 111" class="form-item" labelWidth="120"
+ label="出生日期" prop="birthday" @click="showSelectBirthday = true">
+ <u--input border="none" v-model="form.birthday" 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="110" label="其它联系方式" prop="otherContact">
+ <u--input border="none" v-model="form.otherContact" placeholder="请输入其它联系方式">
+ </u--input>
+ </u-form-item>
+
+ <u-form-item @click="showSelectBus('是否主要联系人','isPrimaryContact')" class="form-item"
+ labelWidth="110" label="是否主要联系人" prop="isPrimaryContact">
+ <u--input border="none" v-model="selectDefaultName.isPrimaryContact" disabled
+ disabledColor="#ffffff" placeholder="请选择是否主要联系人">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+ <u-form-item @click="showSelectBus('居住情况','residentialStatus')" class="form-item"
+ labelWidth="100" label="居住情况" prop="residentialStatus">
+ <u--input border="none" v-model="selectDefaultName.residentialStatus" 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="110" label="港澳台通行证" prop="hkmtPass">
+ <u--input border="none" v-model="form.hkmtPass" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+
+ <u-form-item class="form-item" labelWidth="110" label="护照" prop="passport">
+ <u--input border="none" v-model="form.passport" placeholder="请输入">
+ </u--input>
+ </u-form-item> -->
+
+
+ <u-form-item class="form-item" labelWidth="110" label="居住地区" prop="homeAdcode"
+ @click="showRegion = true">
+ <u--input border="none" v-model="homeRegion" disabled disabledColor="#ffffff"
+ placeholder="请选择居住地区">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <!-- <u-form-item class="form-item address-row" labelWidth="110" label="现居住地" prop="currentAddress">
+ <u-textarea border="none" :disabled="form.source ==1?true:false" disabledColor="#ffffff"
+ v-model="form.currentAddress" placeholder="请输入现居住地">
+ </u-textarea>
+ </u-form-item> -->
+ <u-form-item class="form-item" labelWidth="110" label="籍贯地区" prop="nativePlaceAdcode">
+ <view class="region">
+ <picker mode="region" :value="navtivePlaceDefault" @change="changeNativeRegion">
+ <view class="region-picker c-c0" v-if="!nativePlace">
+ 请选择籍贯地区
+ </view>
+ <view class="region-picker c-30" v-if="nativePlace">
+ {{nativePlace}}
+ </view>
+ </picker>
+ </view>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+ <u-form-item @click="showSelectBus('户籍类型','residentType')" class="form-item" labelWidth="110"
+ label="户籍类型" prop="residentType">
+ <u--input border="none" v-model="selectDefaultName.residentType" 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="110" label="户籍地址" prop="hukouRegistration">
+ <u-textarea border="none" v-model="form.hukouRegistration" placeholder="请输入户籍地址">
+ </u-textarea>
+ </u-form-item>
+
+ <u-form-item @click="showSelectBus('学历','education')" class="form-item" labelWidth="110"
+ label="学历" prop="education">
+ <u--input border="none" v-model="selectDefaultName.education" 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="110" label="工作单位" prop="employer">
+ <u--input border="none" v-model="form.employer" placeholder="请输入工作单位">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="110" label="工作单位地址" prop="cmpyRegAddr">
+ <u-textarea border="none" v-model="form.cmpyRegAddr" placeholder="请输入工作单位地址">
+ </u-textarea>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('工作状态','workStatus')" class="form-item" labelWidth="110"
+ label="工作状态" prop="workStatus">
+ <u--input border="none" v-model="selectDefaultName.workStatus" 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="110" label="宗教信仰" prop="religiousBelief ">
+ <u--input border="none" v-model="form.religiousBelief" placeholder="请输入宗教信仰">
+ </u--input>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('健康状态','healthStatus')" class="form-item" labelWidth="110"
+ label="健康状态" prop="healthStatus">
+ <u--input border="none" v-model="selectDefaultName.healthStatus" disabled
+ disabledColor="#ffffff" placeholder="请选择健康状态">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item v-if="selectDefaultIndex.healthStatus == 2" class="form-item" labelWidth="110"
+ label="疾病名称" prop="diseaseName">
+ <u--input border="none" v-model="form.diseaseName" placeholder="请输入疾病名称">
+ </u--input>
+ </u-form-item>
+
+ <u-form-item class="form-item" labelWidth="110" label="外出详址" prop="goOutAddr">
+ <u-textarea border="none" v-model="form.goOutAddr" placeholder="请输入外出详址">
+ </u-textarea>
+ </u-form-item>
+
+ <u-form-item class="form-item" labelWidth="110" label="外出原因" prop="goOutReason ">
+ <u--input border="none" v-model="form.goOutReason" placeholder="请输入外出原因">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="110" label="外出时间" prop="goOutTime"
+ @click="showSelectDate = true">
+ <u--input border="none" v-model="form.goOutTime " 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="110" label="外出去向" prop="goOutWhere">
+ <u--input border="none" v-model="form.goOutWhere" placeholder="请输入外出去向">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="110" label="车牌号" prop="cardNumber">
+ <u--input border="none" v-model="form.cardNumber" placeholder="多个用中划线(-)隔开">
+ </u--input>
+ </u-form-item>
+
+ <u-form-item class="form-item" labelWidth="110" label="备注" prop="remark">
+ <u--input border="none" v-model="form.remark" placeholder="补充说明">
+ </u--input>
+ </u-form-item>
+ </view>
+ </u-form>
+ </view>
+
+
+ <view class="footer flex j-c-s-b a-i-c bgc-ff" v-if="type == 2 && from == 'family'">
+ <button class="del-btn footer-btn" @click="delAction">删除</button>
+ <button class="save-btn footer-btn" @click="submit">保存</button>
+ </view>
+
+ <footer-btn v-if="(type == 1 && from == 'family') || !from" :text="addOrUpdateTitle" @click="submit" />
+ </view>
+
+ <!-- 事件类型下拉框 -->
+ <!-- <select-bus v-if="typeShow" :show="typeShow" v-model="form[selectBusModel]" type="radio"
+ :popupTitle="selectBusTitle" :dataLists="selectBusList" @cancel="typeShow = false" @submit="typeSelect">
+ </select-bus> -->
+ <u-picker :defaultIndex="[selectDefaultIndex[selectBusKey]]" :closeOnClickOverlay="true" v-if="typeShow"
+ :show="typeShow" :columns="[selectBusList]" @close="typeShow = false" @cancel="typeShow = false"
+ keyName="name" @confirm="typeSelect"></u-picker>
+
+ <u-datetime-picker :show="showSelectDate" v-model="currentTime" mode="date" :formatter="formatter"
+ @confirm="confirmDate" @cancel="showSelectDate = false" :minDate="goOutMinDate"></u-datetime-picker>
+
+ <u-datetime-picker :show="showSelectBirthday" v-model="currentTime" mode="date" @confirm="confirmBirthday"
+ @cancel="showSelectBirthday = false" :minDate="minDate"></u-datetime-picker>
+
+ <u-picker :defaultIndex="[homeIndex]" :closeOnClickOverlay="true" :show="showRegion" :columns="[regionList]"
+ @close="showRegion = false" @cancel="showRegion = false" keyName="name" @confirm="regionSelect"></u-picker>
+
+ <u-picker :defaultIndex="[volunteerOrgTypeIndex]" :closeOnClickOverlay="true" :show="showVolunteerOrg"
+ :columns="[volunteerOrgTypeList]" @close="showRegion = false" @cancel="showVolunteerOrg = false"
+ @confirm="confirmVolunteerOrg"></u-picker>
+
+ <u-popup :show="isShowPopup" mode="bottom" :round="12" closeable="true" @close="isShowPopup = false">
+ <view class="popup-content">
+ <z-paging ref="paging" v-model="houseList" @query="queryHouseList" @onRefresh="refreshList"
+ :fixed="false">
+ <view class="" slot="top">
+ <view class="popup-title f-30">选择房屋</view>
+ <u-search placeholder="请输入房屋地址" :showAction="true" actionText="搜索" :animation="true"
+ v-model="addressName" @search="searchAddress" @custom="searchAddress"
+ @clear="clearKeyword"></u-search>
+ </view>
+ <view class="popup-list">
+ <view class="popup-list-item" v-for="(i,k) in houseList" :key="k" @click="selectHouse(i)">
+ <view class="address-name f-28">
+ {{i.address}}
+ </view>
+ <view class="check-icon" v-if="i.houseCode == form.houseCode">
+ <u-icon name="checkbox-mark" color="#017BFC" size="30"></u-icon>
+ </view>
+ </view>
+ </view>
+ </z-paging>
+ </view>
+
+ </u-popup>
+
+ </view>
+</template>
+
+<script>
+ import {
+ getQrCodeDetail
+ } from "@/api/system/index"
+ import selectBus from "@/components/my-components/selectBus.vue"
+ import uploadMixin from "@/mixin/uploadMixin";
+ import {
+ getHouseholdDetail,
+ saveOrUpdateHousehold,
+ removeHousehold
+ } from '@/api/house/household.js'
+ import {
+ bizDictionary
+ } from '@/api/system/dict.js'
+
+ import {
+ select
+ } from "@/api/system/region.js"
+
+
+ import {
+ getHouseList
+ } from "@/api/house/house.js"
+
+ import boxTitle from '../components/boxTitle/index2.vue'
+ export default {
+ components: {
+ selectBus,
+ boxTitle
+ },
+ mixins: [uploadMixin],
+ data() {
+ return {
+ addOrUpdateTitle: "添加",
+ houseCode: "",
+ form: {
+ // roleName: "",
+ // relationName: '',
+ // location: "",
+ // title: "",
+ // roleType:null,
+ // description: "",
+ },
+ rules: {
+ 'selectDefaultName.relationship': {
+ required: true,
+ message: '请选择与业主关系',
+ trigger: ['change', 'blur'],
+ },
+ 'name': {
+ type: 'string',
+ required: true,
+ message: '请填写姓名',
+ trigger: ['change', 'blur'],
+ },
+ 'volunteerOrgTemp': {
+ type: 'string',
+ required: true,
+ message: '请输入其他志愿者组织',
+ trigger: ['change', 'blur'],
+ },
+ // 'idCard': [{
+ // type: 'string',
+ // required: false,
+ // message: '请输入身份证号码',
+ // trigger: ['change', 'blur']
+ // },
+ // {
+ // validator: (rule, value, callback) => {
+ // const idCardRegex =
+ // /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
+ // return idCardRegex.test(value)
+ // },
+
+ // message: '身份证号码有误',
+ // trigger: ['change', 'blur']
+ // }
+ // ],
+ 'phoneNumber': [{
+ required: true,
+ message: '请输入手机号码',
+ trigger: ['change', 'blur']
+ },
+ {
+
+ validator: (rule, value, callback) => {
+ return uni.$u.test.mobile(value);
+ },
+ message: '手机号码不正确',
+ trigger: ['change', 'blur']
+
+ }
+ ]
+ },
+ typeShow: false,
+ roleName: "",
+ dataList: {
+ roleType: [],
+ relationship: [],
+ gender: [{
+ value: 1,
+ name: '男',
+ },
+ {
+ value: 0,
+ name: '女',
+ },
+ {
+ value: 2,
+ name: '未知',
+ }
+ ],
+ isPrimaryContact: [{
+ value: 1,
+ name: '是',
+ },
+ {
+ value: 0,
+ name: '否',
+ }
+ ],
+ residentialStatus: [{
+ value: 1,
+ name: '是',
+ },
+ {
+ value: 0,
+ name: '否',
+ }
+ ],
+ ethnicity: [],
+ education: [],
+ partyEmber: [{
+ value: 1,
+ name: '是',
+ },
+ {
+ value: 2,
+ name: '否',
+ }
+ ],
+ workStatus: [],
+ maritalStatus: [],
+ residentType: [],
+ healthStatus: [],
+ cardType: []
+ },
+ // 下拉变量
+ selectBusList: [],
+ selectBusVal: '',
+ selectBusTitle: '',
+ selectBusModel: '',
+ selectBusKey: "",
+ selectDefaultIndex: {
+ roleType: 0,
+ relationship: 0,
+ gender: 0,
+ isPrimaryContact: 0,
+ ethnicity: 0,
+ education: 0,
+ partyEmber: 0,
+ workStatus: 0,
+ maritalStatus: 0,
+ cardType: 0,
+ healthStatus: 0,
+ residentType: 0,
+ residentialStatus: 0
+ },
+ selectDefaultName: {
+ roleType: "",
+ relationship: "",
+ gender: "",
+ isPrimaryContact: "",
+ ethnicity: "",
+ education: "",
+ partyEmber: "",
+ workStatus: "",
+ maritalStatus: "",
+ cardType: "",
+ healthStatus: "",
+ residentType: "",
+ residentialStatus: ""
+ },
+ showSelectDate: false,
+ regionList: [],
+ nativePlace: "", //籍贯
+ residentad: "", //户籍
+ homeRegion: "", //居住地
+ homeIndex: 0,
+ showRegion: false,
+ navtivePlaceDefault: [],
+ residentadDefault: [],
+ isEdit: false,
+ from: "",
+ type: "",
+ id: "",
+ showSelectBirthday: false,
+ currentTime: Number(new Date()),
+ minDate: "",
+ goOutMinDate: "",
+ isShowPopup: false,
+ addressName: "",
+ houseList: [],
+ volunteerOrgTypeList: ["信州义警", "蓝天救援", "其他"],
+ volunteerOrgTypeIndex: [0],
+ volunteerOrg: "",
+ showVolunteerOrg: false,
+ houseTag: "" //房屋标签
+ }
+ },
+ created() {
+ this.getHeader()
+ },
+ onReady() {
+ this.$refs.form.setRules(this.rules)
+ },
+ async onLoad(option) {
+ this.minDate = Number(new Date('1900-01-01')); //设置出生日期选择器最小值
+ this.goOutMinDate = Number(new Date('1970-01-01')); //设置外出时间选择器最小值
+ // const data = JSON.parse(option.data)
+ // this.houseCode = data.houseCode;
+ await this.getRegionList()
+ await this.getAllBizDict()
+ this.setCardTypeDefault()
+ this.homeRegion = uni.getStorageSync("curStreet")
+ this.form.homeAdcode = this.getHouseRegion(uni.getStorageSync("curStreet")).code;
+ this.homeIndex = this.getHouseRegion(uni.getStorageSync("curStreet")).index;
+ // this.getHouseDetail();
+ // this.type = data.type;
+ // if (data.id) {
+ // this.id = data.id;
+ // }
+ // if (data.type == 1) {
+ // uni.setNavigationBarTitle({
+ // title: "添加成员"
+ // })
+ // this.isEdit = false;
+ // this.addOrUpdateTitle = "保存"
+ // await this.getAllBizDict()
+ // this.setCardTypeDefault()
+ // this.getHouseDetail();
+ // }
+ // if (data.type == 2) {
+ // this.isEdit = true;
+ // this.addOrUpdateTitle = "修改"
+ // uni.setNavigationBarTitle({
+ // title: "编辑成员资料"
+ // })
+ // this.getHouseholdInfo(data)
+ // }
+ if (option.from) {
+ this.from = option.from;
+ if (data.type == 1) {
+ this.houseCode = uni.getStorageSync("siteInfo").houseCode
+ }
+ }
+ this.form.roleName = uni.getStorageSync("activeRole").roleName;
+ },
+
+ onShow() {
+ console.log(this.form);
+ if (this.id) {
+ // this.getHouseholdInfo()
+ this.getHoldLabel();
+ }
+ },
+
+ methods: {
+
+ getHouseDetail(code) {
+ getQrCodeDetail({
+ roleName: uni.getStorageSync("activeRole").roleName,
+ addressCode: code || uni.getStorageSync("siteInfo").houseCode,
+ }).then(res => {
+ console.log(res);
+ this.houseCode = code;
+ this.homeRegion = res.data.townStreetName;
+ this.form.currentAddress = res.data.addressName;
+ console.log("===>", this.getHouseRegion(res.data.townStreetName));
+ this.form.homeAdcode = this.getHouseRegion(res.data.townStreetName).code;
+ this.homeIndex = this.getHouseRegion(res.data.townStreetName).index;
+ if (res.data.userHouseLabelVOList.length) {
+ this.houseTag = res.data.userHouseLabelVOList[0].labelName
+ }
+ })
+ },
+
+ setRegionDefault() {
+ getQrCodeDetail({
+ roleName: uni.getStorageSync("activeRole").roleName,
+ addressCode: this.houseCode || uni.getStorageSync("siteInfo").houseCode,
+ }).then(res => {
+ this.homeRegion = res.townStreetName;
+ this.form.homeAdcode = this.getHouseRegion(res.townStreetName).code;
+ this.homeIndex = this.getHouseRegion(res.townStreetName).index;
+
+ })
+ },
+
+
+
+ getHouseRegion(name) {
+ for (let i = 0, ii = this.regionList.length; i < ii; i++) {
+ if (this.regionList[i].name == name) {
+ return {
+ index: i,
+ code: this.regionList[i].code
+ }
+ }
+ }
+ },
+
+
+ showLabel() {
+ let arr = []
+ for (let i of this.form.householdLabelList) {
+ arr.push(i.labelName)
+ }
+ return arr.join(",")
+ },
+
+
+ //选择籍贯
+ changeNativeRegion(e) {
+ let {
+ code,
+ value
+ } = e.detail;
+ this.nativePlace = `${value[0]}-${value[1]}-${value[2]}`
+ this.form.nativePlaceAdcode = code[2];
+
+ },
+
+ //选择户籍
+ changeHouseholdRegion(e) {
+ let {
+ code,
+ value
+ } = e.detail;
+ this.residentad = `${value[0]}-${value[1]}-${value[2]}`
+ this.form.residentAdcode = code[2];
+ },
+
+
+ getRegionList() {
+ select(361102).then(res => {
+ console.log(res);
+ if (res.code == 200) {
+ this.regionList = res.data;
+ }
+
+ })
+ },
+
+ regionSelect(e) {
+ console.log(e);
+ const [result] = e.value;
+ this.homeIndex = e.indexs[0];
+ this.homeRegion = result.name;
+ this.form.homeAdcode = result.code;
+ this.showRegion = false;
+ },
+
+ //选择志愿者类型
+ confirmVolunteerOrg(e) {
+ this.form.volunteerOrg = ''
+ const [result] = e.value;
+ this.volunteerOrgTypeIndex = e.indexs[0];
+ this.volunteerOrg = result;
+ if (result != "其他") {
+ this.form.volunteerOrg = result;
+ } else {
+ this.form.volunteerOrg = "";
+ }
+
+ this.showVolunteerOrg = false;
+ },
+
+
+ setCardTypeDefault() {
+ this.$set(this.form, "cardType", 111)
+ this.$set(this.selectDefaultIndex, "cardType", 0)
+ this.$set(this.selectDefaultName, "cardType", "居民身份证")
+ },
+
+ //获取身份证中的出生日期
+ getBirthday(idCard) {
+ // 提取出生年月日的部分
+ let birthday = idCard.substring(6, 14);
+
+ // 将八位数字转换为年月日格式
+ let year = birthday.substring(0, 4);
+ let month = birthday.substring(4, 6);
+ let day = birthday.substring(6);
+
+ // 返回出生日期
+ return `${year}-${month}-${day}`;
+ },
+
+ async getAllBizDict() {
+ // 获取角色关系字典
+ await this.getBizDict('roleRelation', this.dataList.relationship)
+ // 获取角色字典
+ await this.getBizDict('roleType', this.dataList.roleType)
+ // 获取民族字典
+ await this.getBizDict('nationType', this.dataList.ethnicity)
+ // 获取学历字典
+ await this.getBizDict('educationType', this.dataList.education)
+ // 获取工作状态字典
+ await this.getBizDict('workStatusType', this.dataList.workStatus)
+ // 获取婚姻状态字典
+ await this.getBizDict('marriageStatusType', this.dataList.maritalStatus)
+ // 户籍类别的字典
+ await this.getBizDict('residentType', this.dataList.residentType)
+ // 健康状况的字典
+ await this.getBizDict('healthStatus', this.dataList.healthStatus)
+ //证件类型字典
+ await this.getBizDict('cardType', this.dataList.cardType)
+
+ },
+ // 获取业务字典
+ 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() {
+ // 获取所有字典
+ await this.getAllBizDict()
+ // this.form = data
+ getHouseholdDetail({
+ id: this.id
+ }).then(res => {
+ if (res.code == 200) {
+ this.form = res.data;
+ let data = res.data;
+ for (let i in this.selectDefaultIndex) {
+ let {
+ index,
+ name
+ } = this.findObjValue(data[i], this.dataList[i])
+ this.selectDefaultIndex[i] = index || 0;
+ this.selectDefaultName[i] = name;
+ }
+
+ if ((data.idCard && !data.cardType) || (!data.idCard && !data.cardType)) {
+ this.setCardTypeDefault()
+ }
+
+ if (data.idCard && !data.birthday) {
+ this.form.birthday = this.getBirthday(data.idCard)
+ }
+ if (data.nativePlaceAdName) {
+ this.nativePlace =
+ `${data.nativePlaceProvinceAdName}-${data.nativePlaceCityAdName}-${data.nativePlaceAdName}`
+ this.navtivePlaceDefault = [data.nativePlaceProvinceAdName, data
+ .nativePlaceCityAdName, data.nativePlaceAdName
+ ]
+ }
+ if (data.residentAdName) {
+ this.residentad =
+ `${data.residentProvinceAdName}-${data.residentCityAdName}-${data.residentAdName}`
+ this.residentadDefault = [data.residentProvinceAdName, data
+ .residentCityAdName,
+ data.residentAdName
+ ]
+ }
+
+ if (data.homeAdcode) {
+ let {
+ index,
+ name
+ } = this.findObjValue(data.homeAdcode, this.regionList, "code")
+ this.homeIndex = index;
+ this.homeRegion = name;
+ } else {
+ this.setRegionDefault();
+ }
+ }
+ })
+ },
+
+ getHoldLabel() {
+ getHouseholdDetail({
+ id: this.id
+ }).then(res => {
+ if (res.code == 200) {
+ this.$set(this.form, "householdLabelList", res.data.householdLabelList)
+ }
+ })
+ },
+
+ // 显示选择弹框
+ showSelectBus(title, key) {
+ this.selectBusList = this.dataList[key]
+ this.selectBusTitle = title
+ // this.selectBusModel = model
+ this.selectBusKey = key
+ this.typeShow = true
+ },
+ //类型选择确认
+ typeSelect(item) {
+ const [result] = item.value
+ // this[this.selectBusModel] = result.name
+ this.form[this.selectBusKey] = result.value
+ this.selectDefaultName[this.selectBusKey] = result.name;
+ this.selectDefaultIndex[this.selectBusKey] = item.indexs[0];
+ this.typeShow = !this.typeShow
+ },
+ //表单提交
+ submit() {
+ this.$refs.form.validate().then(res => {
+ this.saveOrUpdate();
+ })
+ },
+ // 新增更新操作
+ async saveOrUpdate() {
+ this.form['houseCode'] = this.houseCode
+ this.form.roleName = uni.getStorageSync("activeRole").roleName;
+ if (this.form.cardType) {
+ if (this.form.cardType == 111) {
+ if (!this.form.idCard) {
+ // uni.showToast({
+ // title: "请输入身份证号",
+ // icon: "none"
+ // })
+ // return;
+ } else {
+
+ if (this.form.cardNo) {
+ this.form.cardNo = "";
+ }
+
+ const idCardRegex =
+ /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
+
+ if (!idCardRegex.test(this.form.idCard)) {
+ this.$showTips("身份证号有误")
+ return
+ }
+ }
+ if (this.form.idCard && !this.form.birthday) {
+ this.form.birthday = this.getBirthday(this.form.idCard)
+ }
+ } else {
+ if (!this.form.cardNo) {
+ uni.showToast({
+ title: "请输入证件号",
+ icon: "none"
+ })
+ return;
+ } else {
+ if (this.form.idCard) {
+ this.form.idCard = "";
+ }
+ }
+ }
+ }
+ // 重新赋值
+ if(this.form.volunteerOrgTemp){
+ this.form.volunteerOrg = this.form.volunteerOrgTemp
+ }
+
+ 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)
+ }
+ })
+ },
+
+ confirmDate(e) {
+ this.form.goOutTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
+ this.showSelectDate = false;
+ },
+
+ confirmBirthday(e) {
+ this.form.birthday = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
+ this.showSelectBirthday = false;
+ },
+
+ findObjValue(value, obj, key = "value") {
+ let data = {
+ index: "",
+ name: ""
+ }
+ for (let i = 0, ii = obj.length; i < ii; i++) {
+ if (value == obj[i][key]) {
+ data.index = i;
+ data.name = obj[i].name;
+ }
+ }
+ return data;
+ },
+
+ navTo() {
+ let data = JSON.parse(JSON.stringify(this.form));
+ // this.$u.func.globalNavigator(
+ // `householdLabel?data=${JSON.stringify(data)}&from=add`)
+ if (!this.isEdit) {
+ this.$u.func.globalNavigator(
+ `householdLabel?data=${JSON.stringify(data)}&from=add`)
+ } else {
+ this.$u.func.globalNavigator(
+ `householdLabel?data=${JSON.stringify(data)}`)
+ }
+ },
+
+ delAction() {
+ uni.showModal({
+ title: "提示!",
+ content: "是否要删除该家人信息?",
+ success: (res) => {
+ if (res.confirm) {
+ this.ddelActionRequest()
+ }
+ }
+ })
+ },
+ ddelActionRequest() {
+ removeHousehold(this.form.id).then(res => {
+ if (res.code == 200) {
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 1000)
+ } else {
+ uni.showToast({
+ title: "删除失败",
+ icon: "error",
+ duration: 1500
+ })
+ }
+ })
+ },
+
+ queryHouseList(pageNo, pageSize) {
+ getHouseList({
+ current: pageNo,
+ size: pageSize,
+ // townStreetName: uni.getStorageSync("curStreet"),
+ address: this.addressName
+ }).then(res => {
+ this.$refs.paging.complete(res.data.records);
+ })
+ },
+
+ refreshList() {
+ this.$refs.paging.reload();
+ },
+
+ searchAddress() {
+ this.$refs.paging.reload();
+ },
+
+ clearKeyword() {
+ this.addressName = ""
+ this.$refs.paging.reload();
+ },
+
+ //选择房屋
+ selectHouse(i) {
+ this.houseCode = i.houseCode;
+ this.form.houseCode = i.houseCode;
+ this.form.currentAddress = i.address;
+ if (i.userHouseLabelVOList.length) {
+ this.houseTag = i.userHouseLabelVOList[0].labelName;
+ }
+ this.isShowPopup = false;
+ },
+
+
+ onScan() {
+ uni.scanCode({
+ success: (res) => {
+ let obj = this.getUrlParams(res.result);
+ this.getHouseDetail(obj.stdId);
+ }
+ })
+ },
+
+ getUrlParams(url) {
+ let urlStr = url.split('?')[1]
+ let obj = {};
+ let paramsArr = urlStr.split('&')
+ for (let i = 0, len = paramsArr.length; i < len; i++) {
+ let arr = paramsArr[i].split('=')
+ obj[arr[0]] = arr[1];
+ }
+ return obj
+ },
+
+ navToHouseTag() {
+ uni.navigateTo({
+ url: `/subPackage/house/roomControl/index?code=${this.houseCode}&from=home`
+ })
+ }
+
+ }
+ }
+</script>
+
+<style scoped lang="scss">
+ .container {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ background: #F5F5F5;
+
+
+ .main {
+ // position: relative;
+ // flex: 1;
+ display: flex;
+ flex-direction: column;
+
+ .content {
+ // height: 0;
+ // flex: 1;
+ // overflow-y: auto;
+ padding: 20rpx 0 0;
+ padding-bottom: 160rpx;
+ // padding-bottom: 36rpx;
+ }
+
+
+ .btn-group {
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ height: 116rpx;
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ }
+ }
+
+ // .box-title {
+ // padding: 10rpx 10rpx;
+ // }
+
+ .event-info {
+ background-color: #ffffff;
+ margin: 20rpx 30rpx;
+ padding: 30rpx;
+ border-radius: 8rpx;
+
+ /deep/ .u-form-item {
+ background-color: #ffffff;
+ padding: 5px 20px;
+ border-bottom: 1rpx solid #eff1f3;
+ }
+
+ /deep/ .u-input__content__field-wrapper__field {
+ height: auto;
+ white-space: pre-wrap;
+ }
+
+ }
+
+
+
+ .event-pic {
+ background-color: #ffffff;
+ padding: 40rpx 30rpx;
+ }
+
+ }
+
+ .region {
+ width: 100%;
+ height: 100%;
+
+ .region-picker {
+ width: 100%;
+ heght: 100%;
+ }
+
+ .c-c0 {
+ color: #c0c4cc
+ }
+
+ .c-30 {
+ color: #303133;
+ }
+ }
+
+ .footer {
+ width: 100%;
+ padding: 20rpx 30rpx;
+ box-sizing: border-box;
+ z-index: 999;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ backgroun-color: #fff;
+ padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
+ box-shadow: 0rpx 0rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
+
+ .footer-btn {
+ width: 48%;
+ height: 78rpx;
+ line-height: 78rpx;
+ border-radius: 8rpx 8rpx 8rpx 8rpx;
+ font-size: 32rpx;
+ color: #fff;
+ }
+
+ .add-btn {
+ width: 100%;
+ background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
+ }
+
+ .del-btn {
+ background: linear-gradient(163deg, #FE6C5C 0%, #EA1F1F 99%);
+
+ }
+
+ .save-btn {
+ background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
+ }
+ }
+
+
+ .popup-content {
+ width: 100%;
+ padding: 0 30rpx 30rpx;
+ box-sizing: border-box;
+ background-color: #fff;
+ height: 800rpx;
+
+ .popup-title {
+ padding: 30rpx 0;
+ text-align: center;
+ font-weight: bold;
+ }
+
+ .popup-list {
+ // height: 500rpx;
+ margin-top: 20rpx;
+ }
+
+ .popup-list-item {
+ padding: 20rpx 0;
+ border-bottom: 1px solid #f1f1f1;
+ position: relative;
+ }
+
+ .address-name {
+ width: 90%;
+ }
+
+ .check-icon {
+ position: absolute;
+ right: 20rpx;
+ top: 20rpx;
+ }
+ }
+
+ .top {
+ padding: 20rpx;
+ marign: 20rpx 30rpx;
+ border-radius: 8rpx;
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/house/member/index.vue b/subPackage/house/member/index.vue
index d607b52..92fd515 100644
--- a/subPackage/house/member/index.vue
+++ b/subPackage/house/member/index.vue
@@ -7,64 +7,141 @@
<view class="box-title">
<box-title title="基础信息"></box-title>
</view>
- <!-- <u-form-item @click="showSelectBus('角色','roleType')" class="form-item" labelWidth="100"
+ <!-- <u-form-item @click="showSelectBus('角色','roleType')" class="form-item" labelWidth="110"
label="角色" required prop="roleType">
<u--input border="none" v-model="selectDefaultName.roleType" disabled
disabledColor="#ffffff" placeholder="请选择">
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> -->
- <u-form-item @click="showSelectBus('与业主关系','relationship')" class="form-item" labelWidth="100"
- label="与业主关系" required prop="relationship">
- <u--input border="none" v-model="selectDefaultName.relationship" 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="name">
+ <u-form-item class="form-item" labelWidth="110" label="姓名" required prop="name">
<u--input border="none" v-model="form.name" placeholder="请输入姓名">
</u--input>
</u-form-item>
- <u-form-item @click="showSelectBus('证件类型','cardType')" class="form-item" labelWidth="100"
- label="证件类型" prop="gender">
- <u--input border="none" v-model="selectDefaultName.cardType" disabled
- disabledColor="#ffffff" placeholder="请选择证件类型">
- </u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
- <u-form-item v-if="form.cardType == 111" class="form-item" labelWidth="100" label="身份证号码"
- prop="idCard">
- <u--input border="none" type="idcard " v-model="form.idCard" placeholder="请输入身份证号码">
- </u--input>
- </u-form-item>
-
- <u-form-item v-if="form.cardType && form.cardType != 111" class="form-item" labelWidth="100"
- label="证件号码" prop="cardNo">
- <u--input border="none" v-model="form.cardNo" placeholder="请输入证件号码">
- </u--input>
- </u-form-item>
-
- <u-form-item v-if="form.cardType && form.cardType != 111" class="form-item" labelWidth="100"
- label="出生日期" prop="birthday" @click="showSelectBirthday = true">
- <u--input border="none" v-model="form.birthday" disabled disabledColor="#ffffff"
- placeholder="请选择出生日期">
- </u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
- <u-form-item @click="showSelectBus('性别','gender')" class="form-item" labelWidth="100" label="性别"
+ <u-form-item @click="showSelectBus('性别','gender')" class="form-item" labelWidth="110" label="性别"
prop="gender">
<u--input border="none" v-model="selectDefaultName.gender" 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="手机号码" prop="phoneNumber" required>
+ <u-form-item @click="showSelectBus('证件类型','cardType')" class="form-item" labelWidth="110"
+ label="证件类型" prop="gender">
+ <u--input border="none" v-model="selectDefaultName.cardType" disabled
+ disabledColor="#ffffff" placeholder="请选择证件类型">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item v-if="form.cardType == 111" class="form-item" labelWidth="110" label="身份证号码"
+ prop="idCard">
+ <u--input border="none" type="idcard " v-model="form.idCard" placeholder="请输入身份证号码">
+ </u--input>
+ </u-form-item>
+ <u-form-item v-if="form.cardType && form.cardType != 111" class="form-item" labelWidth="110"
+ label="证件号码" prop="cardNo">
+ <u--input border="none" v-model="form.cardNo" placeholder="请输入证件号码">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="110" label="手机号码" prop="phoneNumber" required>
<u--input border="none" type="number" v-model="form.phoneNumber" placeholder="请输入手机号码">
</u--input>
</u-form-item>
+ <u-form-item class="form-item" labelWidth="110" label="户籍地区" prop="residentAdcode">
+ <view class="region">
+ <picker mode="region" :value="residentadDefault" @change="changeHouseholdRegion">
+ <view class="region-picker c-c0" v-if="!residentad">
+ 请选择户籍地区
+ </view>
+ <view class="region-picker c-30" v-if="residentad">
+ {{residentad}}
+ </view>
+ </picker>
+ </view>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('民族','ethnicity')" class="form-item" labelWidth="110"
+ label="民族" prop="ethnicity">
+ <u--input border="none" v-model="selectDefaultName.ethnicity" disabled
+ disabledColor="#ffffff" placeholder="请选择民族">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('是否党员','partyEmber')" class="form-item" labelWidth="110"
+ label="是否党员" prop="partyEmber">
+ <u--input border="none" v-model="selectDefaultName.partyEmber" 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="110" label="职业类别" prop="occupation ">
+ <u--input border="none" v-model="form.occupation " placeholder="请输入职业类别">
+ </u--input>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('婚姻状态','maritalStatus')" class="form-item" labelWidth="110"
+ label="婚姻状态" prop="maritalStatus">
+ <u--input border="none" v-model="selectDefaultName.maritalStatus" 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="其它联系方式" prop="otherContact">
+ <u-form-item class="form-item" labelWidth="110" label="标签" @click="navTo">
+ <view class="">
+ <text style="color: #c0c4cc;"
+ v-if="!form.householdLabelList || !form.householdLabelList.length">请选择标签</text>
+ <text class="f-28" v-else>{{showLabel()}}</text>
+ </view>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+ <u-form-item v-if="form.currentAddress" @click="navToHouseTag" class="form-item"
+ labelWidth="110" label="房屋标签" prop="gender">
+
+ <view class="">
+ <text style="color: #c0c4cc;"
+ v-if="!form.userHouseLabelVOList || !form.userHouseLabelVOList.length">请选择标签</text>
+ <text class="f-28" v-else>{{showLabel()}}</text>
+ </view>
+
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+
+ <u-form-item class="form-item" @click="showVolunteerOrg = true" labelWidth="120" label="志愿者组织"
+ prop="volunteerOrg">
+ <u--input border="none" v-model="volunteerOrg" disabled disabledColor="#ffffff"
+ placeholder="请选择志愿者组织">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+ <u-form-item v-if="volunteerOrg == '其他'" required class="form-item" labelWidth="120" label="其他志愿者组织"
+ prop="volunteerOrgTemp">
+ <u--input border="none" v-model="form.volunteerOrgTemp" placeholder="请输入其他志愿者组织">
+ </u--input>
+ </u-form-item>
+
+
+ <u-form-item @click="showSelectBus('与业主关系','relationship')" class="form-item" labelWidth="120"
+ label="与业主关系" required prop="relationship">
+ <u--input border="none" v-model="selectDefaultName.relationship" disabled
+ disabledColor="#ffffff" placeholder="请选择与业主关系">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+ <u-form-item v-if="form.cardType && form.cardType != 111" class="form-item" labelWidth="120"
+ label="出生日期" prop="birthday" @click="showSelectBirthday = true">
+ <u--input border="none" v-model="form.birthday" 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="110" label="其它联系方式" prop="otherContact">
<u--input border="none" v-model="form.otherContact" placeholder="请输入其它联系方式">
</u--input>
</u-form-item>
@@ -85,30 +162,30 @@
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
- <!-- <u-form-item class="form-item" labelWidth="100" label="港澳台通行证" prop="hkmtPass">
+ <!-- <u-form-item class="form-item" labelWidth="110" 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="护照" prop="passport">
+
+ <u-form-item class="form-item" labelWidth="110" 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="居住地区" prop="homeAdcode"
+ <u-form-item class="form-item" labelWidth="110" label="居住地区" prop="homeAdcode"
@click="showRegion = true">
<u--input border="none" v-model="homeRegion" disabled disabledColor="#ffffff"
placeholder="请选择居住地区">
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
- <u-form-item class="form-item address-row" labelWidth="100" label="现居住地" prop="currentAddress">
+ <!-- <u-form-item class="form-item address-row" labelWidth="110" label="现居住地" prop="currentAddress">
<u-textarea border="none" :disabled="form.source ==1?true:false" disabledColor="#ffffff"
v-model="form.currentAddress" placeholder="请输入现居住地">
</u-textarea>
- </u-form-item>
- <u-form-item class="form-item" labelWidth="100" label="籍贯地区" prop="nativePlaceAdcode">
+ </u-form-item> -->
+ <u-form-item class="form-item" labelWidth="110" label="籍贯地区" prop="nativePlaceAdcode">
<view class="region">
<picker mode="region" :value="navtivePlaceDefault" @change="changeNativeRegion">
<view class="region-picker c-c0" v-if="!nativePlace">
@@ -122,56 +199,19 @@
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
-
- <u-form-item class="form-item" labelWidth="100" label="户籍地区" prop="residentAdcode">
- <view class="region">
- <picker mode="region" :value="residentadDefault" @change="changeHouseholdRegion">
- <view class="region-picker c-c0" v-if="!residentad">
- 请选择户籍地区
- </view>
- <view class="region-picker c-30" v-if="residentad">
- {{residentad}}
- </view>
- </picker>
- </view>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
-
-
-
- <u-form-item @click="showSelectBus('户籍类型','residentType')" class="form-item" labelWidth="100"
+ <u-form-item @click="showSelectBus('户籍类型','residentType')" class="form-item" labelWidth="110"
label="户籍类型" prop="residentType">
<u--input border="none" v-model="selectDefaultName.residentType" 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="户籍地址" prop="hukouRegistration">
+ <u-form-item class="form-item" labelWidth="110" label="户籍地址" prop="hukouRegistration">
<u-textarea border="none" v-model="form.hukouRegistration" placeholder="请输入户籍地址">
</u-textarea>
</u-form-item>
-
- <u-form-item v-if="from != 'family'" class="form-item" labelWidth="100" label="标签"
- @click="navTo">
- <view class="">
- <text style="color: #c0c4cc;"
- v-if="!form.householdLabelList || !form.householdLabelList.length">请选择标签</text>
- <text class="f-28" v-else>{{showLabel()}}</text>
- </view>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
-
-
- <u-form-item @click="showSelectBus('民族','ethnicity')" class="form-item" labelWidth="100"
- label="民族" prop="ethnicity">
- <u--input border="none" v-model="selectDefaultName.ethnicity" disabled
- disabledColor="#ffffff" placeholder="请选择民族">
- </u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
-
- <u-form-item @click="showSelectBus('学历','education')" class="form-item" labelWidth="100"
+ <u-form-item @click="showSelectBus('学历','education')" class="form-item" labelWidth="110"
label="学历" prop="education">
<u--input border="none" v-model="selectDefaultName.education" disabled
disabledColor="#ffffff" placeholder="请选择学历">
@@ -179,26 +219,17 @@
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
- <u-form-item @click="showSelectBus('是否党员','partyEmber')" class="form-item" labelWidth="100"
- label="是否党员" prop="partyEmber">
- <u--input border="none" v-model="selectDefaultName.partyEmber" 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="职业类别" prop="occupation ">
- <u--input border="none" v-model="form.occupation " placeholder="请输入职业类别">
- </u--input>
- </u-form-item>
- <u-form-item class="form-item" labelWidth="100" label="工作单位" prop="employer">
+
+
+ <u-form-item class="form-item" labelWidth="110" label="工作单位" prop="employer">
<u--input border="none" v-model="form.employer" placeholder="请输入工作单位">
</u--input>
</u-form-item>
- <u-form-item class="form-item" labelWidth="100" label="工作单位地址" prop="cmpyRegAddr">
+ <u-form-item class="form-item" labelWidth="110" label="工作单位地址" prop="cmpyRegAddr">
<u-textarea border="none" v-model="form.cmpyRegAddr" placeholder="请输入工作单位地址">
</u-textarea>
</u-form-item>
- <u-form-item @click="showSelectBus('工作状态','workStatus')" class="form-item" labelWidth="100"
+ <u-form-item @click="showSelectBus('工作状态','workStatus')" class="form-item" labelWidth="110"
label="工作状态" prop="workStatus">
<u--input border="none" v-model="selectDefaultName.workStatus" disabled
disabledColor="#ffffff" placeholder="请选择工作状态">
@@ -206,56 +237,50 @@
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
- <u-form-item @click="showSelectBus('婚姻状态','maritalStatus')" class="form-item" labelWidth="100"
- label="婚姻状态" prop="maritalStatus">
- <u--input border="none" v-model="selectDefaultName.maritalStatus" 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="宗教信仰" prop="religiousBelief ">
+
+ <u-form-item class="form-item" labelWidth="110" label="宗教信仰" prop="religiousBelief ">
<u--input border="none" v-model="form.religiousBelief" placeholder="请输入宗教信仰">
</u--input>
</u-form-item>
- <u-form-item @click="showSelectBus('健康状态','healthStatus')" class="form-item" labelWidth="100"
+ <u-form-item @click="showSelectBus('健康状态','healthStatus')" class="form-item" labelWidth="110"
label="健康状态" prop="healthStatus">
<u--input border="none" v-model="selectDefaultName.healthStatus" disabled
disabledColor="#ffffff" placeholder="请选择健康状态">
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
- <u-form-item v-if="selectDefaultIndex.healthStatus == 2" class="form-item" labelWidth="100"
+ <u-form-item v-if="selectDefaultIndex.healthStatus == 2" class="form-item" labelWidth="110"
label="疾病名称" prop="diseaseName">
<u--input border="none" v-model="form.diseaseName" placeholder="请输入疾病名称">
</u--input>
</u-form-item>
- <u-form-item class="form-item" labelWidth="100" label="外出详址" prop="goOutAddr">
+ <u-form-item class="form-item" labelWidth="110" label="外出详址" prop="goOutAddr">
<u-textarea border="none" v-model="form.goOutAddr" placeholder="请输入外出详址">
</u-textarea>
</u-form-item>
- <u-form-item class="form-item" labelWidth="100" label="外出原因" prop="goOutReason ">
+ <u-form-item class="form-item" labelWidth="110" label="外出原因" prop="goOutReason ">
<u--input border="none" v-model="form.goOutReason" placeholder="请输入外出原因">
</u--input>
</u-form-item>
- <u-form-item class="form-item" labelWidth="100" label="外出时间" prop="goOutTime"
+ <u-form-item class="form-item" labelWidth="110" label="外出时间" prop="goOutTime"
@click="showSelectDate = true">
<u--input border="none" v-model="form.goOutTime " 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="外出去向" prop="goOutWhere">
+ <u-form-item class="form-item" labelWidth="110" label="外出去向" prop="goOutWhere">
<u--input border="none" v-model="form.goOutWhere" placeholder="请输入外出去向">
</u--input>
</u-form-item>
- <u-form-item class="form-item" labelWidth="100" label="车牌号" prop="cardNumber">
+ <u-form-item class="form-item" labelWidth="110" 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="备注" prop="remark">
+ <u-form-item class="form-item" labelWidth="110" label="备注" prop="remark">
<u--input border="none" v-model="form.remark" placeholder="补充说明">
</u--input>
</u-form-item>
@@ -293,7 +318,9 @@
<u-datetime-picker :show="showSelectBirthday" v-model="currentTime" mode="date" @confirm="confirmBirthday"
@cancel="showSelectBirthday = false" :minDate="minDate"></u-datetime-picker>
-
+ <u-picker :defaultIndex="[volunteerOrgTypeIndex]" :closeOnClickOverlay="true" :show="showVolunteerOrg"
+ :columns="[volunteerOrgTypeList]" @close="showRegion = false" @cancel="showVolunteerOrg = false"
+ @confirm="confirmVolunteerOrg"></u-picker>
<u-picker :defaultIndex="[homeIndex]" :closeOnClickOverlay="true" :show="showRegion" :columns="[regionList]"
@close="showRegion = false" @cancel="showRegion = false" keyName="name" @confirm="regionSelect"></u-picker>
@@ -349,6 +376,12 @@
type: 'string',
required: true,
message: '请填写姓名',
+ trigger: ['change', 'blur'],
+ },
+ 'volunteerOrgTemp': {
+ type: 'string',
+ required: true,
+ message: '请输入其他志愿者组织',
trigger: ['change', 'blur'],
},
// 'idCard': [{
@@ -489,7 +522,13 @@
showSelectBirthday: false,
currentTime: Number(new Date()),
minDate: "",
- goOutMinDate: ""
+ goOutMinDate: "",
+ volunteerOrgTypeList: ["信州义警", "蓝天救援", "其他"],
+ volunteerOrgTypeIndex: [0],
+ volunteerOrg: "",
+ volunteerOrgTemp:"",
+ showVolunteerOrg: false,
+ houseTag: ""
}
},
created() {
@@ -557,6 +596,9 @@
console.log("===>", this.getHouseRegion(res.data.townStreetName));
this.form.homeAdcode = this.getHouseRegion(res.data.townStreetName).code;
this.homeIndex = this.getHouseRegion(res.data.townStreetName).index;
+ if (res.data.userHouseLabelVOList.length) {
+ this.houseTag = res.data.userHouseLabelVOList[0].labelName
+ }
})
},
@@ -635,6 +677,21 @@
this.homeRegion = result.name;
this.form.homeAdcode = result.code;
this.showRegion = false;
+ },
+
+ //选择志愿者类型
+ confirmVolunteerOrg(e) {
+ this.form.volunteerOrgTemp = "";
+ const [result] = e.value;
+ this.volunteerOrgTypeIndex = e.indexs[0];
+ this.volunteerOrg = result;
+ if (result != "其他") {
+ this.form.volunteerOrg = result;
+ } else {
+ this.form.volunteerOrg = "";
+ }
+
+ this.showVolunteerOrg = false;
},
setCardTypeDefault() {
@@ -725,6 +782,18 @@
.nativePlaceCityAdName, data.nativePlaceAdName
]
}
+ if(data.volunteerOrg){
+ // 信州义警", "蓝天救援", "其他
+ if(data.volunteerOrg !='信州义警' && data.volunteerOrg !='蓝天救援'){
+ this.form.volunteerOrgTemp = data.volunteerOrg;
+ this.form.volunteerOrg = '其他'
+ this.volunteerOrg = '其他'
+ }else{
+ this.form.volunteerOrg = data.volunteerOrg
+ this.volunteerOrg = data.volunteerOrg
+ }
+ }
+
if (data.residentAdName) {
this.residentad =
`${data.residentProvinceAdName}-${data.residentCityAdName}-${data.residentAdName}`
@@ -824,6 +893,14 @@
}
}
}
+
+ // 重新赋值
+ if(this.form.volunteerOrgTemp){
+ this.form.volunteerOrg = this.form.volunteerOrgTemp
+ }
+
+ delete this.form.userHouseLabelVOList;
+
const res = await saveOrUpdateHousehold(this.form)
if (res.code !== 200) {
uni.showToast({
@@ -911,8 +988,15 @@
})
}
})
+ },
+
+ navToHouseTag() {
+ uni.navigateTo({
+ url: `/subPackage/house/roomControl/index?code=${this.houseCode}&from=house`
+ })
}
+
}
}
</script>
diff --git a/subPackage/house/roomControl/index.vue b/subPackage/house/roomControl/index.vue
index 232fa5e..66702dc 100644
--- a/subPackage/house/roomControl/index.vue
+++ b/subPackage/house/roomControl/index.vue
@@ -38,14 +38,31 @@
@delete="deletePic" uploadIcon="/static/icon/upload.png">
</u-upload>
</view>
+
+
+ <view class="pic" v-if="roleType == 1">
+ <newBoxTitle title="房产证照片"></newBoxTitle>
+ <u-upload :fileList="form.propertyCertificateImg"
+ :previewFullImage="uploadConfig.previewFullImage" :accept="uploadConfig.acceptImg"
+ :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
+ :capture="uploadConfig.capture" @afterRead="afterReadImg($event,'propertyCertificateImg')"
+ @delete="deletePic($event,'propertyCertificateImg')" uploadIcon="/static/icon/upload.png">
+ </u-upload>
+ </view>
+
<view class=" flex label-btn-box b-c-w" v-if="roleType == 2">
<newBoxTitle title="房屋标签"></newBoxTitle>
<view class="list">
- <view v-for="(item, index) in labelBtnList" :key="index">
- <u-button size="mini" type="primary" :color="$setLabelColor(item.color)"
+ <block v-for="(item, index) in labelBtnList" :key="index">
+ <view @click="handleLabel(index,item)" class="label-item"
+ :class="index == labelIndex?'c-ff':'c-66'"
+ :style="{backgroundColor:(index == labelIndex?item.showColor:'#F5F5F5')}">
+ {{item.name}}
+ <!-- <u-button size="mini" type="primary" :color="$setLabelColor(item.color)"
:style="{color: $setLabelColor(item.color) && '#fff'}" :text="item.name"
- @click="showLabelPopup(item)"></u-button>
- </view>
+ @click="showLabelPopup(item)"></u-button> -->
+ </view>
+ </block>
</view>
</view>
</u-form>
@@ -96,7 +113,8 @@
} from "@/api/label/label.js";
import {
saveOrUpdateHouseholdLabel,
- removeHouseholdLabel
+ removeHouseholdLabel,
+ setHouseLabel
} from "@/api/house/householdLabel.js";
import {
getHouseDetail,
@@ -119,6 +137,7 @@
propertyPrice: "",
serviceDue: "",
imageUrls: "",
+ propertyCertificateImg: []
},
// rules: {
// phone: [{
@@ -199,7 +218,27 @@
roleType: 1,
showSelectDate: false,
serveTime: Number(new Date()),
+ labelIndex: null,
+ labelItemList: [{
+ name: "闲置",
+ showColor: '#30D17C',
+ color: "green"
+ },
+ {
+
+
+ name: "出租",
+ showColor: '#FFCC00',
+ color: "yellow"
+ },
+ {
+ name: "自住",
+ showColor: '#0099FF',
+ color: "blue"
+ },
+ ],
+ from: ""
}
},
created() {
@@ -221,6 +260,9 @@
let roleName = uni.getStorageSync("activeRole").roleName;
if (roleName != "居民") {
this.roleType = 2;
+ }
+ if (option.from) {
+ this.from = option.from;
}
},
onShow() {
@@ -256,7 +298,16 @@
parentId: 1001
}
const resLabel = await getLabelListByParentId(paramLabel)
- this.labelBtnList = resLabel.data
+ let labelItem = resLabel.data;
+ for (let i = 0, ii = labelItem.length; i < ii; i++) {
+ for (let k = 0, kk = this.labelItemList.length; k < kk; k++) {
+ if (labelItem[i].name == this.labelItemList[k].name) {
+ labelItem[i].showColor = this.labelItemList[k].showColor;
+ labelItem[i].color = this.labelItemList[k].color;
+ }
+ }
+ }
+ this.labelBtnList = labelItem;
if (null != res.data) {
const images = []
const {
@@ -277,24 +328,36 @@
})
})
}
+ let propertyCertificateImg = this.$setImageUrl(res.data.propertyCertificateImg, 2)
- if (userHouseLabelVOList.length > 0) {
- that.labelBtnList.forEach(e => {
- userHouseLabelVOList.forEach(f => {
- if (Number(e.id) == f.labelId) {
- e['color'] = f.color
- e['remark'] = f.remark
- }
- })
- })
+
+
+
+
+ // if (userHouseLabelVOList.length > 0) {
+ // that.labelBtnList.forEach(e => {
+ // userHouseLabelVOList.forEach(f => {
+ // if (Number(e.id) == f.labelId) {
+ // e['color'] = f.color
+ // e['remark'] = f.remark
+ // }
+ // })
+ // })
+ // }
+
+ if (userHouseLabelVOList.length) {
+ this.labelIndex = this.labelBtnList.findIndex(item => item.id == userHouseLabelVOList[0]
+ .labelId)
}
+
this.form = {
phone,
address,
propertyPrice,
serviceDue,
imageUrls,
- images
+ images,
+ propertyCertificateImg
}
}
},
@@ -316,6 +379,15 @@
})
this.form.imageUrls = urls.join(",")
}
+
+ if (this.form.propertyCertificateImg.length) {
+ let urls = []
+ this.form.propertyCertificateImg.forEach(e => {
+ urls.push(e.name)
+ })
+ this.form.propertyCertificateImg = urls.join(",")
+ }
+ this.form.propertyCertificateImg = JSON.stringify(this.form.propertyCertificateImg)
const {
code,
data
@@ -417,6 +489,35 @@
this.popupShow = false
},
+ //选择标签
+ handleLabel(index, item) {
+ this.labelIndex = index;
+ let data = {
+ labelId: item.id,
+ color: item.color,
+ lableType: 2,
+ houseCode: this.houseCode
+ }
+ this.setLabelRequest(data, item.name)
+ },
+
+ setLabelRequest(data, name) {
+ setHouseLabel(data).then(res => {
+ if (res.code == 200) {
+ this.$showTips("操作成功", "success")
+ if (this.from) {
+ this.updatePrePageData(name)
+ }
+ }
+ })
+ },
+
+ //更新上个页面标签数据
+ updatePrePageData(text) {
+ let pages = getCurrentPages();
+ let prePage = pages[pages.length - 2];
+ prePage.$vm.houseTag = text;
+ }
}
}
</script>
@@ -527,4 +628,13 @@
}
}
}
+
+
+ .label-item {
+ padding: 12rpx;
+ border-radius: 8rpx;
+ font-size: 26rpx;
+ margin-right: 30rpx;
+ text-align: center;
+ }
</style>
\ No newline at end of file
diff --git a/subPackage/house/roomControl/myHouse.vue b/subPackage/house/roomControl/myHouse.vue
new file mode 100644
index 0000000..92b0917
--- /dev/null
+++ b/subPackage/house/roomControl/myHouse.vue
@@ -0,0 +1,562 @@
+<template>
+ <view class="container">
+ <view class="main">
+ <view class="content">
+ <u-form labelWidth="70" :model="form" ref="form" :rules="rules">
+ <view class="basic-info">
+ <!-- <u-form-item class="form-item" labelWidth="100" label="绑定手机" borderBottom prop="phone">
+ <u--input border="none" v-model="form.phone" :disabled="roleType == 2?true:false"
+ :placeholder="setPlaceholder(1)">
+ </u--input>
+ </u-form-item> -->
+
+ <u-form-item class="form-item" labelWidth="100" label="地址" borderBottom>
+ <u--input border="none" :placeholder="setPlaceholder(1)" v-model="form.address"
+ :disabled="true" disabled-color="#fff">
+ </u--input>
+ </u-form-item>
+
+ <u-form-item class="form-item" labelWidth="100" label="物业月费" borderBottom>
+ <u--input border="none" :placeholder="setPlaceholder(1)" v-model="form.propertyPrice"
+ :disabled="true" disabled-color="#fff">
+ </u--input>
+ </u-form-item>
+
+ <u-form-item class="form-item" labelWidth="100" label="到期时间" borderBottom>
+ <u--input border="none" :placeholder="setPlaceholder(2)" v-model="form.serviceDue" disabled
+ disabledColor="#ffffff">
+ </u--input>
+ <!-- <u-icon slot="right" name="arrow-right" v-show="roleType != 2"></u-icon> -->
+ </u-form-item>
+ </view>
+
+ <view class="pic">
+ <newBoxTitle title="房屋外观"></newBoxTitle>
+ <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
+ :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
+ @delete="deletePic" uploadIcon="/static/icon/upload.png">
+ </u-upload>
+ </view>
+
+
+ <view class="pic" v-if="roleType == 1">
+ <newBoxTitle title="产权证明"></newBoxTitle>
+ <u-upload :fileList="form.propertyCertificateImg"
+ :previewFullImage="uploadConfig.previewFullImage" :accept="uploadConfig.acceptImg"
+ :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
+ :capture="uploadConfig.capture" @afterRead="afterReadImg($event,'propertyCertificateImg')"
+ @delete="deletePic($event,'propertyCertificateImg')" uploadIcon="/static/icon/upload.png">
+ </u-upload>
+ </view>
+
+ <view class=" flex label-btn-box b-c-w" v-if="roleType == 2">
+ <newBoxTitle title="房屋标签"></newBoxTitle>
+ <view class="list">
+ <view v-for="(item, index) in labelBtnList" :key="index">
+ <u-button size="mini" type="primary" :color="$setLabelColor(item.color)"
+ :style="{color: $setLabelColor(item.color) && '#fff'}" :text="item.name"
+ @click="showLabelPopup(item)"></u-button>
+ </view>
+ </view>
+ </view>
+ </u-form>
+ </view>
+
+ <view class="edit-btn">
+ <u-button type="primary" color="linear-gradient(163deg, #01BDFC 0%, #017BFC 100%)" text="修改数据"
+ @click="updateHouseInfo(item)"></u-button>
+ </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 v-model="" class="mt-40" v-model="labelValue" placement="row">
+ <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in labelList" :key="index"
+ :label="item.name" :labelColor="item.showColor" :name="item.name" :activeColor="item.showColor"
+ @change="radioChange(item)">
+ </u-radio>
+ </u-radio-group>
+
+ <u--textarea class="mt-40" v-model="remark" placeholder="请输入内容"></u--textarea>
+ </view>
+ </u-modal>
+
+
+ <!-- 租客关系下拉框 -->
+ <my-select v-if="showList.relation" :show="showList.relation" v-model="form.relation" type="radio"
+ popupTitle="请选择租客关系" :dataLists="dataList.relation" @cancel="showList.relation = false">
+ </my-select>
+
+
+ <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="serveTime" mode="datetime"
+ :formatter="formatter" @confirm="confirmDate" @cancel="showSelectDate = false"></u-datetime-picker>
+
+ </view>
+</template>
+
+<script>
+ import uploadMixin from "@/mixin/uploadMixin";
+ import newBoxTitle from '@/subPackage/house/components/boxTitle/index2.vue'
+ import {
+ getLabelListByParentId
+ } from "@/api/label/label.js";
+ import {
+ saveOrUpdateHouseholdLabel,
+ removeHouseholdLabel
+ } from "@/api/house/householdLabel.js";
+ import {
+ getHouseDetail,
+ saveOrUpdateHouse
+ } from "@/api/house/house.js";
+ import {
+ minioBaseUrl
+ } from '@/common/setting'
+ export default {
+ mixins: [uploadMixin],
+ components: {
+ newBoxTitle
+ },
+ data() {
+ return {
+ houseCode: '',
+ form: {
+ phone: "",
+ address: "",
+ propertyPrice: "",
+ serviceDue: "",
+ imageUrls: "",
+ propertyCertificateImg: []
+ },
+ // rules: {
+ // phone: [{
+ // required: true,
+ // message: '请输入手机号',
+ // // 可以单个或者同时写两个触发验证方式
+ // trigger: ['change', 'blur'],
+ // },
+ // {
+ // // 自定义验证函数,见上说明
+ // validator: (rule, value, callback) => {
+ // const reg =
+ // /^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[1589]))\d{8}$/
+ // if (reg.test(value)) {
+ // return true
+ // }
+ // return false
+ // },
+ // message: '请输入正确的手机号',
+ // // 触发器可以同时用blur和change
+ // trigger: ['change', 'blur'],
+ // }
+ // ]
+ // },
+ showList: {
+ relation: false
+ },
+ nameList: {
+ relation: ""
+ },
+ dataList: {
+ relation: []
+ },
+
+ popupShow: false,
+
+ labelBtnList: [],
+
+ // 安置房弹框中
+ labelList: [{
+ name: '撤销',
+ disabled: false,
+ // color: '#EBEDF0'
+ showColor: '#999',
+ color: '#999'
+ },
+ {
+ name: '绿',
+ disabled: false,
+ // color: '#30D17C'
+ showColor: '#30D17C',
+ color: 'green'
+ },
+ {
+ name: '黄',
+ disabled: false,
+ // color: '#FFB42B'
+ showColor: '#FFB42B',
+ color: 'yellow'
+ }, {
+ name: '红',
+ disabled: false,
+ // color: '#EA1F1F'
+ showColor: '#EA1F1F',
+ color: 'red'
+ }
+ ],
+ currentLabelInfo: {},
+ currentColorInfo: {},
+ labelModelInfo: {
+ title: '',
+ selectedColor: ''
+ },
+ labelValue: "",
+ remark: '',
+ // 标记
+ number: 0,
+ roleType: 1,
+ showSelectDate: false,
+ serveTime: Number(new Date()),
+ }
+ },
+ created() {
+
+ },
+ mounted() {
+
+ },
+ onLoad(option) {
+ if (option.code) {
+ this.houseCode = option.code;
+ } else {
+ this.houseCode = uni.getStorageSync("siteInfo").houseCode;
+ uni.setNavigationBarTitle({
+ title: "我的房屋"
+ })
+ }
+
+ let roleName = uni.getStorageSync("activeRole").roleName;
+ if (roleName != "居民") {
+ this.roleType = 2;
+ }
+
+
+ this.getHouseDetailInfo()
+
+ },
+ methods: {
+
+ confirmDate(e) {
+ if (this.roleType == 2) return;
+ this.showSelectDate = false;
+ this.form.serviceDue = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
+ },
+
+ setPlaceholder(type) {
+ if (this.roleType == 2) {
+ return "未完善"
+ } else {
+ return type == 1 ? "请输入" : "请选择"
+ }
+ },
+
+
+ // 获取房屋详情
+ 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,
+ userHouseLabelVOList
+ } = res.data
+ if (imageUrls && imageUrls.length > 0) {
+ const urls = imageUrls.split(',')
+ // 遍历
+ urls.forEach(e => {
+ images.push({
+ url: minioBaseUrl + e,
+ name: e
+ })
+ })
+ }
+ let propertyCertificateImg = this.$setImageUrl(res.data.propertyCertificateImg, 2)
+
+
+
+
+
+ if (userHouseLabelVOList.length > 0) {
+ that.labelBtnList.forEach(e => {
+ userHouseLabelVOList.forEach(f => {
+ if (Number(e.id) == f.labelId) {
+ e['color'] = f.color
+ e['remark'] = f.remark
+ }
+ })
+ })
+ }
+ this.form = {
+ phone,
+ address,
+ propertyPrice,
+ serviceDue,
+ imageUrls,
+ images,
+ propertyCertificateImg
+ }
+ }
+ },
+ // 获取房屋标签信息
+ async getLabelList() {
+ const param = {
+ parentId: 1001
+ }
+ const res = await getLabelListByParentId(param)
+ this.labelBtnList = res.data
+ },
+ // 更新房屋数据
+ async updateHouseInfo() {
+ this.form['houseCode'] = this.houseCode
+ if (this.form.images.length > 0) {
+ let urls = []
+ this.form.images.forEach(e => {
+ urls.push(e.name)
+ })
+ this.form.imageUrls = urls.join(",")
+ }else{
+ this.form.imageUrls = '';
+ }
+
+ if (this.form.propertyCertificateImg.length) {
+ let urls = []
+ this.form.propertyCertificateImg.forEach(e => {
+ urls.push(e.name)
+ })
+ this.form.propertyCertificateImg = urls.join(",")
+ }else{
+ this.form.propertyCertificateImg = '';
+ }
+
+
+ const {
+ code,
+ data
+ } = await saveOrUpdateHouse(this.form)
+ if (code !== 200) {
+ uni.showToast({
+ title: "房屋信息修改失败",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
+ uni.showToast({
+ title: "房屋信息修改成功",
+ icon: "success",
+ duration: 1500,
+ success: () => {
+ setTimeout(() => {
+ 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 => {
+ console.log(e.color, item.color);
+ if (e.color == item.color) {
+ this.labelValue = e.name
+ console.log(e);
+ 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,
+ houseCode: this.houseCode
+ }
+ res = await removeHouseholdLabel(data)
+ } else {
+ uni.showToast({
+ title: "无可撤销项",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
+ } else {
+ res = await saveOrUpdateHouseholdLabel({
+ houseCode: this.houseCode,
+ labelId: id,
+ remark: this.remark,
+ lableType: 2,
+ color
+ })
+ }
+ if (res.code !== 200) {
+ uni.showToast({
+ title: "修改失败",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
+ // 刷新页面 (直接刷新页面上传但没提交的图片会直接没了)
+ // this.getHouseDetailInfo()
+ const labelIndex = this.labelBtnList.findIndex(item => item.id === id)
+ console.log(id);
+ this.labelBtnList[labelIndex].color = color
+ this.popupShow = false
+ },
+
+ }
+ }
+</script>
+
+<style>
+ page {
+ background: #F5F5F5;
+ }
+</style>
+
+<style scoped lang="scss">
+ .container {
+ // position: relative;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ background: #F5F5F5;
+ font-size: 30rpx;
+
+ .main {
+ // position: relative;
+ // height: 0;
+ // flex: 1;
+ // display: flex;
+ // flex-direction: column;
+
+ .content {
+ // height: 0;
+ // flex: 1;
+ overflow-y: auto;
+ padding: 20rpx 30rpx;
+
+ .basic-info {
+ background-color: #fff;
+ padding: 30rpx;
+
+ .form-item {
+ background-color: #ffffff;
+ padding: 5rpx 20rpx;
+ border-bottom: 1px solid #eff1f3;
+
+ &:first-child {
+ padding-top: 0;
+ }
+
+ &:last-child {
+ padding-bottom: 0;
+ }
+ }
+
+ }
+
+ .pic {
+ background-color: #ffffff;
+ padding: 30rpx;
+ margin-top: 20rpx;
+
+ /deep/ .u-upload__button {
+ border: 1rpx solid #EEEEEE;
+ background-color: #fff;
+ }
+ }
+
+ .label-btn-box {
+ padding: 30rpx;
+ margin-top: 20rpx;
+ display: flex;
+ flex-direction: column;
+
+ .list {
+ display: flex;
+ flex-wrap: wrap;
+
+ &>view {
+ width: calc((100% - 80rpx) / 5);
+ margin: 0 20rpx 20rpx 0;
+
+ &:nth-child(5n) {
+ margin-right: 0;
+ }
+
+ /deep/ .u-button {
+ padding: 6rpx 8rpx;
+ border-width: 0 !important;
+ background-color: #F5F5F5;
+ color: #999999;
+ }
+ }
+ }
+
+ }
+
+ }
+
+ .edit-btn {
+ width: calc(100% - 40rpx);
+ padding: 0 20rpx;
+ height: 116rpx;
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ background: #fff;
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/label/bail.vue b/subPackage/label/bail.vue
index ebd1acb..168ae6d 100644
--- a/subPackage/label/bail.vue
+++ b/subPackage/label/bail.vue
@@ -5,12 +5,12 @@
:labelStyle="{fontSize:'28rpx'}">
<view class="content">
<u-form-item label="姓名" prop="checkUserName" borderBottom required>
- <u-input v-model="info.checkUserName" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
- inputAlign="right"></u-input>
+ <u-input v-model="info.checkUserName" border="none" disabled disabledColor="#fff" placeholder="请输入"
+ placeholderClass="f-28 c-99" inputAlign="right"></u-input>
</u-form-item>
<u-form-item label="手机" prop="checkTelephone" borderBottom required>
- <u-input v-model="info.checkTelephone" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
- inputAlign="right"></u-input>
+ <u-input v-model="info.checkTelephone" border="none" disabled disabledColor="#fff" placeholder="请输入"
+ placeholderClass="f-28 c-99" inputAlign="right"></u-input>
</u-form-item>
<u-form-item label="申请事由" prop="applyName" borderBottom required>
<u-input v-model="info.applyName" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
diff --git a/subPackage/label/form.vue b/subPackage/label/form.vue
index dd9a29e..c9e4f1c 100644
--- a/subPackage/label/form.vue
+++ b/subPackage/label/form.vue
@@ -96,6 +96,9 @@
getLabelReportingDetail,
setLabelReporting
} from "@/api/reporting/reporting";
+ import {
+ getPlaceDetail
+ } from "@/api/place/place"
export default {
mixins: [uploadMixin],
data() {
@@ -116,22 +119,30 @@
reportType: ""
},
rules: {
- 'info.districtName': {
+ districtName: {
required: true,
message: '请输入场所名称',
trigger: ['blur', 'change']
},
- 'info.transactionObject': {
+ transactionObject: {
required: true,
message: '请输入物品名称',
trigger: ['blur', 'change']
},
- 'info.owner': {
+ owner: {
required: true,
message: '请输入交易人姓名',
trigger: ['blur', 'change']
},
- 'info.phoneNumber': [{
+ goodsNums:[
+ {
+ type: 'number',
+ required: true,
+ message: '请输入物品数量',
+ trigger: ['blur', 'change']
+ }
+ ],
+ phoneNumber: [{
type: 'number',
required: true,
message: '请输入交易人手机号',
@@ -145,7 +156,7 @@
trigger: ['change', 'blur']
}
],
- 'info.idCard': [{
+ idCard: [{
type: 'string',
required: false,
message: '请输入身份证号码',
@@ -163,18 +174,18 @@
}
],
- 'info.transactionMoney': {
+ transactionMoney: {
required: true,
message: '请输入交易金额',
trigger: ['blur', 'change']
},
- 'info.localtion': {
+ localtion: {
type: 'string',
required: true,
message: '请输入交易位置',
trigger: ['blur', 'change']
},
- 'info.transactionProcess': {
+ transactionProcess: {
type: 'string',
required: false,
message: '请输入交易过程',
@@ -190,7 +201,8 @@
}
},
onLoad(option) {
- console.log(option);
+ console.log(option,99999);
+ const {houseCode} = option;
if (option.id) {
this.isEdit = true;
this.id = option.id;
@@ -217,10 +229,23 @@
this.$set(this.info, "districtName", siteInfo.name);
this.$set(this.info, "userId", userInfo.user_id);
}
-
+
+ if(houseCode){
+ // 获取地址
+ this.getPlaceDetail(houseCode)
+ }
},
methods: {
-
+ getPlaceDetail(houseCode){
+ getPlaceDetail({
+ houseCode: houseCode
+ }).then(res => {
+ if (res.code == 200) {
+ let data = res.data;
+ this.info.localtion = data.location;
+ }
+ })
+ },
getDetail(id) {
getLabelReportingDetail({
taskId: id
diff --git a/subPackage/police/onLine.vue b/subPackage/police/onLine.vue
new file mode 100644
index 0000000..0732afa
--- /dev/null
+++ b/subPackage/police/onLine.vue
@@ -0,0 +1,197 @@
+<template>
+ <view class="container">
+
+ <view class="row bgc-ff mt-20 flex f-d-c a-i-c j-c-c">
+
+
+ <!-- <u-row customStyle="margin-bottom: 10px">
+ <u-col span="6">
+ <view class="demo-layout bg-purple-light">
+ 离线/在线:
+ </view>
+ </u-col>
+ <u-col span="6">
+ <u-switch v-model="onLine" asyncChange @change="asyncChange"></u-switch>
+ </u-col>
+ </u-row> -->
+
+ <view class="f-32 mb-20">
+ 当前状态 {{onLine?"在线 ":"离线"}}
+ </view>
+ <view class="round" :class="onLine?'bgc-main':' bgc-gray '" @click="asyncChange(!onLine)">
+ {{onLine?"在线 ":"离线"}}
+ </view>
+
+
+ </view>
+ <!-- <view> -->
+ <!-- <role-list :roleData="roleData" :current-id="selectRole.id" @select="select"></role-list> -->
+ <!-- <u-switch v-model="value13" asyncChange @change="asyncChange"></u-switch> -->
+ <!-- </view> -->
+
+ <!-- <footer-btn v-if="roleData.length" text="确定" @click="submit" /> -->
+
+ <u-loading-page :loading="loading"></u-loading-page>
+ </view>
+</template>
+
+<script>
+ import {
+ getUser,
+ updateUserInfo
+ } from "@/api/user.js"
+ // import roleList from "@/subPackage/user/components/roleList.vue"
+ // import {
+ // dynamicMenu,
+ // getRoleListByIds,
+ // } from "@/api/system/role.js"
+ export default {
+ components: {
+ // roleList
+ },
+
+ data() {
+ return {
+ onLine: false,
+ userInfo: {},
+ loading: false,
+ }
+ },
+ created() {
+ // this.selectRole = uni.getStorageSync("activeRole")
+
+ },
+ onShow() {
+ this.getUserInfo()
+ },
+
+ methods: {
+
+ asyncChange(e) {
+ uni.showModal({
+ content: e ? '确定是否上线?' : '确定是否下线?',
+ success: (res) => {
+ if (res.confirm) {
+ this.onLine = e
+ if (e) {
+ this.userInfo.status = 2
+ } else {
+ this.userInfo.status = 1
+ }
+ updateUserInfo(this.userInfo).then(res => {
+ console.log(res)
+ })
+ }
+ }
+ })
+ },
+ //获取当前角色的所有权限列表
+ getUserInfo() {
+ this.loading = !this.loading
+ getUser(
+ uni.getStorageSync("userInfo").user_id
+ ).then(res => {
+ this.userInfo = res.data
+ if (res.data.status && res.data.status == 2) {
+ this.onLine = true
+ } else {
+ this.onLine = false
+ }
+ // console.log(data)
+ });
+
+ // data.forEach((item, index) => {
+ // if (item.roleName == "居民") {
+ // item.icon = "/static/icon/user-01.png"
+ // }
+ // })
+
+ // this.roleData = data;
+ this.loading = !this.loading
+ },
+
+ select(item) {
+ this.selectRole = item
+ console.log("当前选中角色", this.selectRole)
+ },
+
+ async submit() {
+ //保存当前激活的角色
+ this.$store.commit("setActiveRole", this.selectRole)
+ // const res = await dynamicMenu(this.selectRole.id)
+ // let data = res.data
+ // const appMenu = data.filter(e => e.name == 'app')[0].children
+ // console.log("菜单:", appMenu)
+ // store.commit("SET_MENU", appMenu)
+ this.$store.dispatch("getMenuList").then(res => {
+ uni.showToast({
+ title: "切换身份成功",
+ icon: "success",
+ duration: 1500,
+ success: () => {
+ uni.$emit("refresh")
+ setTimeout(() => {
+ this.$u.func.globalNavigator(
+ "/pages/home/index",
+ "switchTab")
+ }, 500)
+ }
+ })
+ });
+
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ backgrond-color: #f5f5f5;
+ }
+
+ .row {
+ // padding: 20rpx;
+ // margin: 0 20rpx;
+ // border-radius: 4rpx;
+ padding-top: 200rpx;
+ }
+
+ .container {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ // background-color: #fff;
+ // background: #F9F9FA;
+
+
+ }
+
+ .cur-btn {
+ width: 100%;
+ padding: 20rpx;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ box-sizing: border-box;
+ z-index: 10;
+
+ }
+
+ .round {
+ width: 200rpx;
+ height: 200rpx;
+ line-height: 200rpx;
+ border-radius: 50%;
+
+ text-align: center;
+ color: #fff;
+ font-weight: bold;
+
+ }
+
+ .bgc-gray {
+ background: #949494;
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/police/people.vue b/subPackage/police/people.vue
new file mode 100644
index 0000000..47a6059
--- /dev/null
+++ b/subPackage/police/people.vue
@@ -0,0 +1,278 @@
+<template>
+ <view>
+ <u-sticky>
+ <view class="bgc-ff">
+ <view class="tab">
+ <!-- <u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}"
+ :activeStyle="{color:'#017BFC'}">
+ </u-tabs> -->
+ <view class="search flex j-c-s-b a-i-c">
+ <!-- <view class="tab-filter flex j-c-c a-i-c" @click="showDateModal">
+ <text class="f-28">时间筛选</text>
+ <u-icon name="arrow-down"></u-icon>
+ </view> -->
+ <u-search placeholder="请输入需要查询信息的名称" v-model="keyword" :clearabled="true" :showAction="true"
+ :animation="true" @search="searchConfirm" @clear="clearConfirm"></u-search>
+ </view>
+ </view>
+ </view>
+ </u-sticky>
+
+ <view class="list">
+ <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i.id,i.status)">
+ <view class="item-title flex a-i-c j-c-s-b mb-20">
+ <text class="f-32 fw">{{i.name}}</text>
+ <!-- <text class="f-32 fw">{{i.aoiName==null?'':i.aoiName}}</text> -->
+ <!-- <u-tag v-if="i.status == 1" text="待处置" type="warning" plain plainFill></u-tag> -->
+ <!-- <u-tag v-if="i.status == 2" text="已处置" type="success" plain plainFill></u-tag> -->
+ </view>
+ <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">手机号:</text>
+ <text class="f-28 c-66">{{i.phoneNumber}}</text>
+ </view>
+
+ <!-- <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">标签:</text>
+ <view v-for="(item,index) in i.householdLabelList" :key="index">
+ <text class="f-28 c-66">{{item.labelName}}</text>
+ </view>
+
+ </view> -->
+ <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">地址:</text>
+ <text class="address f-28 c-66">{{i.currentAddress || ""}}</text>
+ </view>
+ </view>
+ </view>
+ <u-toast ref="uToast"></u-toast>
+ <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
+ <date-range-modal ref="dateRane" @comfirm="handleComfirmDate" @rest="handleRestDate" />
+ </view>
+</template>
+
+<script>
+ import {
+ gethouseholdPage
+ } from "@/api/police/police"
+ import dateRangeModal from '@/components/dateRangeModal/modal.vue';
+ export default {
+ components: {
+ dateRangeModal
+ },
+ data() {
+ return {
+ tabList: [{
+ name: "全部",
+ status: "",
+ },
+ {
+ name: "待处置",
+ status: 1,
+ },
+ {
+ name: "已处置",
+ status: 2
+ }
+ ],
+ tabIndex: 0,
+ currentStatus: "",
+ list: [],
+ loadingStatus: 'nomore',
+ currentPage: 1,
+ frequency: '',
+ reportType: "",
+ selectDate: [],
+ houseCode: "",
+ keyword: "",
+ labelType: ''
+ }
+ },
+
+ onLoad(option) {
+ console.log(option);
+ if (option.type == 1) {
+ this.labelType = option.type
+ uni.setNavigationBarTitle({
+ title: '重点人员管理'
+ })
+ } else {
+ this.labelType = option.type
+ uni.setNavigationBarTitle({
+ title: '关注人群'
+ })
+ }
+ // this.getList()
+ },
+
+ onShow() {
+ this.resetParams();
+ this.getList()
+ },
+
+ onReachBottom() {
+ this.currentPage++
+ this.getList()
+ },
+
+ methods: {
+ searchConfirm() {
+ this.resetParams()
+ this.getList()
+ },
+ clearConfirm() {
+ this.keyword = ''
+ this.searchConfirm()
+ },
+ changeTab(e) {
+ this.tabIndex = e.index;
+ this.currentStatus = e.status;
+ this.resetParams();
+ this.getList();
+ },
+ resetParams() {
+ this.list = [];
+ this.currentPage = 1;
+ },
+ getList() {
+
+ this.$nextTick(() => {
+ this.loadingStatus = 'loadingmore'
+ this.$refs.uToast.show({
+ type: 'loading',
+ message: '正在加载',
+ duration: 9999999
+ })
+ })
+ let params = {
+ current: this.currentPage,
+ size: 20,
+ status: this.currentStatus,
+ searchKey: this.keyword
+ }
+
+ if (this.selectDate.length) {
+ params.startTime = this.selectDate[0],
+ params.endTime = this.selectDate[1]
+ }
+ params.labelType = this.labelType
+
+ gethouseholdPage(params).then(res => {
+ if (res.code != 200) {
+ uni.showToast({
+ title: '数据请求失败',
+ icon: 'error'
+ })
+ return
+ }
+ let records = res.data.records;
+ this.list = [...this.list, ...records]
+ this.$nextTick(() => {
+ this.$refs.uToast.isShow = false
+ })
+ this.loadingStatus = 'nomore'
+ })
+ },
+ navTo(id, status) {
+
+ uni.navigateTo({
+ url: `peopleDetail?id=${id}`
+ })
+
+ // uni.navigateTo({
+ // url: `./policeSituationDetail?id=${id}`,
+ // complete: (res) => {
+ // console.log(res)
+ // }
+ // })
+ // this.navToDetail(reportType, id)
+ },
+
+ navToEdit(reportType, id, type) {
+ if (reportType == 1) {
+ this.$u.func.globalNavigator(`/subPackage/label/bail?id=${id}`)
+ } else if (reportType == 2) {
+ this.$u.func.globalNavigator(`/subPackage/label/check?id=${id}`)
+ } else if (reportType == 5) {
+ this.$u.func.globalNavigator(`/subPackage/label/form?id=${id}`)
+ }
+ },
+
+ navToDetail(reportType, id, type) {
+ if (reportType == 1) {
+ this.$u.func.globalNavigator(`bailReportDetail?id=${id}`)
+ } else if (reportType == 7) {
+ this.$u.func.globalNavigator(`selfCheckDetail?id=${id}`)
+ } else if (reportType == 5) {
+ this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
+ } else {
+ this.$u.func.globalNavigator(`checkReform?id=${id}`)
+ }
+
+
+ },
+
+ showDateModal() {
+ this.$refs.dateRane.open();
+ },
+
+ handleRestDate() {
+ this.selectDate = [];
+ this.resetParams();
+ this.getList()
+ },
+ handleComfirmDate(val) {
+ this.selectDate = val;
+ this.resetParams();
+ this.getList()
+ }
+
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #F5F5F5;
+ }
+
+
+
+ .tab {
+ // width: 100%;
+
+ }
+
+ .search {
+ padding: 20rpx 20rpx;
+ }
+
+ // .tab /deep/.u-tabs__wrapper__nav__item {
+ // flex: 1;
+ // }
+ .tab-filter {
+ padding: 0 20rpx;
+ }
+
+ .list {
+ margin: 20rpx 30rpx 0;
+ }
+
+ .list-item {
+ padding: 0 30rpx 20rpx;
+ border-radius: 8rpx;
+
+ .item-title {
+ padding: 30rpx 0;
+ border-bottom: 1px solid #F5F5F5;
+ }
+
+ .item-row {
+ padding: 10rpx 0;
+
+ .address {
+ width: 65%;
+ text-align: right;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/police/peopleDetail.vue b/subPackage/police/peopleDetail.vue
new file mode 100644
index 0000000..e2f3311
--- /dev/null
+++ b/subPackage/police/peopleDetail.vue
@@ -0,0 +1,85 @@
+<template>
+ <view class="">
+
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>姓名</text>
+ <text>{{info.name}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>电话号码</text>
+ <text>{{info.phoneNumber}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>地址</text>
+ <text class="item-content">{{info.currentAddress}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>标签</text>
+ <text class="item-content">{{label}}</text>
+ </view>
+ </view>
+
+</template>
+
+<script>
+ import {
+ gethouseholdDetail
+ } from "@/api/police/police.js"
+ export default {
+ data() {
+ return {
+ info: {},
+ roleType: 1,
+ label: ""
+ }
+ },
+
+ onLoad(option) {
+
+ this.getDetail(option.id)
+ },
+
+ methods: {
+ getDetail(id) {
+ gethouseholdDetail({
+ id
+ }).then(res => {
+ this.info = res.data;
+ if (res.data.householdLabelList.length) {
+ let lebelList = res.data.householdLabelList;
+ let label = []
+ for (let i of lebelList) {
+ label.push(i.labelName);
+ }
+ this.label = label.join("、")
+ }
+
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #f5f5f5;
+ }
+
+ .item-row {
+ width: 100%;
+ padding: 30rpx;
+ box-sizing: border-box;
+ border-bottom: 1px solid #f5f5f5;
+ font-size: 28rpx;
+ background-color: #fff;
+
+ .item-content {
+ width: 70%;
+ text-align: right;
+ }
+
+ .item-left {
+ width: 70%;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/police/policeSituation.vue b/subPackage/police/policeSituation.vue
new file mode 100644
index 0000000..488d9ad
--- /dev/null
+++ b/subPackage/police/policeSituation.vue
@@ -0,0 +1,252 @@
+<template>
+ <view>
+ <u-sticky>
+ <view class="bgc-ff">
+ <view class="tab">
+ <u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}"
+ :activeStyle="{color:'#017BFC'}">
+ </u-tabs>
+ <view class="search flex j-c-s-b a-i-c">
+ <view class="tab-filter flex j-c-c a-i-c" @click="showDateModal">
+ <text class="f-28">时间筛选</text>
+ <u-icon name="arrow-down"></u-icon>
+ </view>
+ <u-search placeholder="请输入需要查询信息的名称" v-model="keyword" :clearabled="true" :showAction="true"
+ :animation="true" @search="searchConfirm" @clear="clearConfirm"></u-search>
+ </view>
+ </view>
+ </view>
+ </u-sticky>
+
+ <view class="list">
+ <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i.id,i.status)">
+ <view class="item-title flex a-i-c j-c-s-b mb-20">
+ <text class="f-32 fw">{{i.alarmTypeName==null?'':i.alarmTypeName}}</text>
+ <u-tag v-if="i.status == 1" text="待处置" type="warning" plain plainFill></u-tag>
+ <u-tag v-if="i.status == 2" text="已处置" type="success" plain plainFill></u-tag>
+ </view>
+ <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">报警时间</text>
+ <text class="f-28 c-66">{{i.createTime}}</text>
+ </view>
+ <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">报警地址</text>
+ <text class="address f-28 c-66">{{i.address || ""}}</text>
+ </view>
+ </view>
+ </view>
+ <u-toast ref="uToast"></u-toast>
+ <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
+ <date-range-modal ref="dateRane" @comfirm="handleComfirmDate" @rest="handleRestDate" />
+ </view>
+</template>
+
+<script>
+ import {
+ getPoliceAlarmRecords
+ } from "@/api/police/police"
+ import dateRangeModal from '@/components/dateRangeModal/modal.vue';
+ export default {
+ components: {
+ dateRangeModal
+ },
+ data() {
+ return {
+ tabList: [
+ {
+ name: "全部",
+ status: "",
+ },
+ {
+ name: "待处置",
+ status: 1,
+ },
+ {
+ name: "已处置",
+ status: 2
+ }
+ ],
+ tabIndex: 0,
+ currentStatus: "",
+ list: [],
+ loadingStatus: 'nomore',
+ currentPage: 1,
+ frequency: '',
+ reportType: "",
+ selectDate: [],
+ houseCode: "",
+ keyword: ""
+ }
+ },
+
+ onLoad(option) {
+ console.log(option);
+ // this.getList()
+ },
+
+ onShow() {
+ this.resetParams();
+ this.getList()
+ },
+
+ onReachBottom() {
+ this.currentPage++
+ this.getList()
+ },
+
+ methods: {
+ searchConfirm() {
+ this.resetParams()
+ this.getList()
+ },
+ clearConfirm() {
+ this.keyword = ''
+ this.searchConfirm()
+ },
+ changeTab(e) {
+ this.tabIndex = e.index;
+ this.currentStatus = e.status;
+ this.resetParams();
+ this.getList();
+ },
+ resetParams() {
+ this.list = [];
+ this.currentPage = 1;
+ },
+ getList() {
+
+ this.$nextTick(() => {
+ this.loadingStatus = 'loadingmore'
+ this.$refs.uToast.show({
+ type: 'loading',
+ message: '正在加载',
+ duration: 9999999
+ })
+ })
+ let params = {
+ current: this.currentPage,
+ size: 20,
+ status: this.currentStatus,
+ searchKey: this.keyword
+ }
+
+ if (this.selectDate.length) {
+ params.startTime = this.selectDate[0],
+ params.endTime = this.selectDate[1]
+ }
+
+ getPoliceAlarmRecords(params).then(res => {
+ if (res.code != 200) {
+ uni.showToast({
+ title: '数据请求失败',
+ icon: 'error'
+ })
+ return
+ }
+ let records = res.data.records;
+ this.list = [...this.list, ...records]
+ this.$nextTick(() => {
+ this.$refs.uToast.isShow = false
+ })
+ this.loadingStatus = 'nomore'
+ })
+ },
+ navTo(id, status) {
+ uni.navigateTo({
+ url: `./policeSituationDetail?id=${id}`,
+ complete: (res) => {
+ console.log(res)
+ }
+ })
+ // this.navToDetail(reportType, id)
+ },
+
+ navToEdit(reportType, id, type) {
+ if (reportType == 1) {
+ this.$u.func.globalNavigator(`/subPackage/label/bail?id=${id}`)
+ } else if (reportType == 2) {
+ this.$u.func.globalNavigator(`/subPackage/label/check?id=${id}`)
+ } else if (reportType == 5) {
+ this.$u.func.globalNavigator(`/subPackage/label/form?id=${id}`)
+ }
+ },
+
+ navToDetail(reportType, id, type) {
+ if (reportType == 1) {
+ this.$u.func.globalNavigator(`bailReportDetail?id=${id}`)
+ } else if (reportType == 7) {
+ this.$u.func.globalNavigator(`selfCheckDetail?id=${id}`)
+ } else if (reportType == 5) {
+ this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
+ } else {
+ this.$u.func.globalNavigator(`checkReform?id=${id}`)
+ }
+
+
+ },
+
+ showDateModal() {
+ this.$refs.dateRane.open();
+ },
+
+ handleRestDate() {
+ this.selectDate = [];
+ this.resetParams();
+ this.getList()
+ },
+ handleComfirmDate(val) {
+ this.selectDate = val;
+ this.resetParams();
+ this.getList()
+ }
+
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #F5F5F5;
+ }
+
+
+
+ .tab {
+ // width: 100%;
+
+ }
+
+ .search {
+ padding: 20rpx 20rpx;
+ }
+
+ // .tab /deep/.u-tabs__wrapper__nav__item {
+ // flex: 1;
+ // }
+ .tab-filter {
+ padding: 0 20rpx;
+ }
+
+ .list {
+ margin: 20rpx 30rpx 0;
+ }
+
+ .list-item {
+ padding: 0 30rpx 20rpx;
+ border-radius: 8rpx;
+
+ .item-title {
+ padding: 30rpx 0;
+ border-bottom: 1px solid #F5F5F5;
+ }
+
+ .item-row {
+ padding: 10rpx 0;
+
+ .address {
+ width: 65%;
+ text-align: right;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/police/policeSituationDetail.vue b/subPackage/police/policeSituationDetail.vue
new file mode 100644
index 0000000..dd3c44f
--- /dev/null
+++ b/subPackage/police/policeSituationDetail.vue
@@ -0,0 +1,440 @@
+<template>
+ <view>
+ <view class="content bgc-ff">
+ <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90"
+ :labelStyle="{fontSize:'28rpx'}">
+ <u-form-item label="报警人时间" prop="createTime" :borderBottom="false">
+ <u-input v-model="info.createTime" disabled disabledColor="#ffffff" border="none" placeholder="请选择"
+ placeholderClass="f-28 c-99" inputAlign="right"></u-input>
+ </u-form-item>
+ <u-form-item label="报警地址" borderBottom required prop="address" :borderBottom="false">
+ <u-input type="textarea" v-model="info.address" border="none" placeholderClass="f-28 c-99"
+ inputAlign="right" placeholder="请输入报警地址">
+ </u-input>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('报警类型','alarmType')" label="报警类型" prop="alarmType" :borderBottom="false" required >
+ <u-input v-model="selectDefaultName.alarmType" disabled disabledColor="#fff" border="none" placeholder="请选择"
+ placeholderClass="f-28 c-99" inputAlign="right"></u-input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item label="报警人姓名" prop="name" :borderBottom="false" required>
+ <u--input border="none" v-model="info.name"
+ placeholder="请输入报警人姓名" inputAlign="right" placeholderClass="f-28 c-99"></u--input>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('性别','gender')" class="form-item" labelWidth="110" label="报警人性别"
+ prop="gender">
+ <u--input border="none" v-model="selectDefaultName.gender" disabled disabledColor="#ffffff"
+ placeholder="请选择报警人性别" inputAlign="right">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item label="报警人电话" prop="phone" :borderBottom="false" required>
+ <u--input border="none" type="number" v-model="info.phone"
+ placeholder="请输入报警人电话" inputAlign="right" placeholderClass="f-28 c-99"></u--input>
+ </u-form-item>
+ <u-form-item label="报警内容" borderBottom required prop="alarmDescribe" :borderBottom="false">
+ <u-input type="textarea" v-model="info.alarmDescribe" border="none" placeholderClass="f-28 c-99"
+ inputAlign="right" placeholder="请输入报警内容">
+ </u-input>
+ </u-form-item>
+ <u-form-item label="接警人姓名" prop="policeName" :borderBottom="false" required>
+ <u-input v-model="info.policeName" disabled disabledColor="#fff" border="none"
+ placeholder="请输入接警人姓名" placeholderClass="f-28 c-99" inputAlign="right"></u-input>
+ </u-form-item>
+ <u-form-item label="接警人电话" prop="policePhone" :borderBottom="false" required>
+ <u--input border="none" type="number" v-model="info.policePhone"
+ placeholder="请输入接警人电话" inputAlign="right"></u--input>
+ </u-form-item>
+ <u-form-item label="接警时间" prop="alarmResponseTime" :borderBottom="false" required @click="showSelectDate = true">
+ <u-input v-model="info.alarmResponseTime" disabled disabledColor="#ffffff" border="none" placeholder="请选择"
+ placeholderClass="f-28 c-99" inputAlign="right"></u-input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('是否有人受伤','injuryFlag')" label="是否有人受伤" prop="injuryFlag" :borderBottom="false" required>
+ <u--input border="none" v-model="selectDefaultName.injuryFlag" disabled
+ disabledColor="#ffffff" placeholder="请选择是否有人受伤" inputAlign="right">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item @click="showSelectBus('公安事件','publicIncidents')" label="公安事件" prop="publicIncidents" :borderBottom="false" required>
+ <u--input border="none" v-model="selectDefaultName.publicIncidents" disabled
+ disabledColor="#ffffff" placeholder="请选择公安事件" inputAlign="right">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ </u-form>
+ </view>
+
+ <u-picker :defaultIndex="[selectDefaultIndex[selectBusKey]]" :closeOnClickOverlay="true" v-if="typeShow"
+ :show="typeShow" :columns="[selectBusList]" @close="typeShow = false" @cancel="typeShow = false"
+ keyName="name" @confirm="typeSelect"></u-picker>
+ <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="workTime" mode="datetime"
+ :formatter="formatter" @confirm="confirmDate" @cancel="showSelectDate = false"></u-datetime-picker>
+ <footer-btn @click="submitInfo" text="保存" />
+
+ </view>
+
+</template>
+
+<script>
+ import {
+ getPoliceDetail,updateInfo
+ } from "@/api/police/police"
+ import uploadMixin from "@/mixin/uploadMixin";
+ import {
+ bizDictionary,
+ update
+ } from '@/api/system/dict.js'
+
+ export default {
+ mixins: [uploadMixin],
+ data() {
+ return {
+ typeShow:false,
+ form: {},
+ // formatter:"",
+ info: {
+ name: "",
+ phone: "",
+ alarmType: "",
+ gender: "",
+ policeName: "",
+ policePhone: "",
+ createTime: "",
+ injuryFlag:"",
+ publicIncidents:""
+ },
+ rules: {
+ 'selectDefaultName.alarmType': [{
+ required: true,
+ message: '请选择报警类型',
+ trigger: ['blur', 'change']
+ }],
+ name: [{
+ type: 'string',
+ required: true,
+ message: '请输入报警人姓名',
+ trigger: ['blur', 'change']
+ }],
+ 'selectDefaultName.gender': [{
+ type: 'string',
+ required: true,
+ message: '请选择报警人性别',
+ trigger: ['blur', 'change']
+ }],
+ phone: [{
+ type: 'number',
+ required: true,
+ message: '请输入报警人电话',
+ trigger: ['blur', 'change']
+ }],
+ alarmDescribe: [{
+ type: 'string',
+ required: true,
+ message: '请输入报警内容',
+ trigger: ['blur', 'change']
+ }],
+ policeName: [{
+ type: 'string',
+ required: true,
+ message: '请输入接警人姓名',
+ trigger: ['blur', 'change']
+ }],
+ policePhone: [{
+ type: 'number',
+ required: true,
+ message: '请输入接警人电话',
+ trigger: ['blur', 'change']
+ }],
+ alarmResponseTime: [{
+ type: 'string',
+ required: true,
+ message: '请选择接警时间',
+ trigger: ['blur', 'change']
+ }],
+ 'selectDefaultName.injuryFlag': [{
+ type: 'string',
+ required: true,
+ message: '请选择是否有人受伤',
+ trigger: ['blur', 'change']
+ }],
+ 'selectDefaultName.publicIncidents': [{
+ type: 'string',
+ required: true,
+ message: '请选择公安事件',
+ trigger: ['blur', 'change']
+ }],
+ },
+ dataList: {
+ alarmType:[],
+ gender: [{
+ value: 1,
+ name: '男',
+ },
+ {
+ value: 2,
+ name: '女',
+ }
+ ],
+ publicIncidents: [
+ {
+ value: 2,
+ name: '是',
+ },{
+ value: 1,
+ name: '否',
+ }
+ ],
+ injuryFlag: [{
+ value: 1,
+ name: '是',
+ },
+ {
+ value: 0,
+ name: '否',
+ }
+ ],
+ },
+ // 下拉变量
+ selectBusList: [],
+ selectBusVal: '',
+ selectBusTitle: '',
+ selectBusModel: '',
+ selectBusKey: "",
+ selectDefaultIndex: {
+ gender: 0,
+ injuryFlag: 0,
+ publicIncidents: 0,
+ alarmType:0
+ },
+ selectDefaultName: {
+ alermType:"",
+ gender: "",
+ injuryFlag: "",
+ publicIncidents: "",
+ },
+ showSelectDate: false,
+ workTime: Number(new Date()),
+ isShowPicker: false,
+ houseIndex: [0],
+ isShowTypePicker: false,
+ isShowLabelPicker: false,
+ keyword: "",
+ isShowPopup: false,
+ isEdit: false,
+ id: ""
+ }
+ },
+ async onLoad(option) {
+ if (option.id) {
+ this.isEdit = true;
+ this.id = option.id;
+ setTimeout(() => {
+ this.getDetail(option.id)
+ }, 200)
+ }
+ },
+
+ onReady() {
+ //onReady 为uni-app支持的生命周期之一
+ this.$refs.form.setRules(this.rules)
+ },
+
+ methods: {
+ async getAllBizDict() {
+ //报警类型字典
+ await this.getBizDict('applyAlarmType', this.dataList.alarmType)
+ },
+ // 获取业务字典
+ 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)
+ })
+ })
+ },
+ //类型选择确认
+ typeSelect(item) {
+ const [result] = item.value
+ // this[this.selectBusModel] = result.name
+ this.info[this.selectBusKey] = result.value
+ this.selectDefaultName[this.selectBusKey] = result.name;
+ this.selectDefaultIndex[this.selectBusKey] = item.indexs[0];
+ this.typeShow = !this.typeShow
+ },
+ // 显示选择弹框
+ showSelectBus(title, key) {
+ this.selectBusList = this.dataList[key]
+ this.selectBusTitle = title
+ // this.selectBusModel = model
+ this.selectBusKey = key
+ this.typeShow = true
+ },
+ // 字典值匹配
+ findObjValue(value, obj, key = "value") {
+ let data = {
+ index: "",
+ name: ""
+ }
+ for (let i = 0, ii = obj.length; i < ii; i++) {
+ if (value == obj[i][key]) {
+ data.index = i;
+ data.name = obj[i].name;
+ }
+ }
+ return data;
+ },
+ async getDetail(id) {
+ // 获取所有字典
+ await this.getAllBizDict();
+ getPoliceDetail({
+ id
+ }).then(res => {
+ console.log(res);
+ if (res.code == 200) {
+ this.info = res.data;
+ if(this.info.alarmResponseTime){
+ this.info.alarmResponseTime = this.info.alarmResponseTime.substring(0,16)
+ }
+ let data = res.data;
+ for (let i in this.selectDefaultIndex) {
+ let {
+ index,
+ name
+ } = this.findObjValue(data[i], this.dataList[i])
+ this.selectDefaultIndex[i] = index || 0;
+ this.selectDefaultName[i] = name;
+ }
+ }
+ })
+ },
+ confirmDate(e) {
+ this.showSelectDate = false;
+ this.info.alarmResponseTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM')
+ },
+ submitInfo() {
+ this.$refs.form.validate().then(valid => {
+ this.info.status = 2;
+ if(this.info.alarmResponseTime){
+ this.info.alarmResponseTime = this.info.alarmResponseTime + ":00"
+ }
+ updateInfo(this.info).then(res => {
+ uni.showToast({
+ icon: 'success',
+ title: '保存成功',
+ })
+ setTimeout(() => {
+ this.reLoadPrePage()
+ }, 300)
+ })
+ })
+ },
+ //刷新上一页数据后返回
+ reLoadPrePage() {
+ let pages = getCurrentPages();
+ let prePage = pages[pages.length - 2];
+ prePage.$vm.resetParams();
+ prePage.$vm.list= [];
+ uni.navigateBack();
+ },
+
+ }
+ }
+</script>
+
+<style lang="less">
+ page {
+ background-color: #F5F5F5;
+ }
+
+ .content {
+ margin: 20rpx 30rpx;
+ padding: 0 30rpx;
+ }
+
+ .row {
+ padding: 20rpx 0;
+ border-bottom: 1px solid
+ }
+
+ .location-btn {
+ width: 116rpx;
+ height: 46rpx;
+ line-height: 46rpx;
+ border-radius: 4rpx;
+ border: 1px solid currentColor;
+ padding: 0;
+ background-color: #fff;
+ }
+
+ .upload {
+ margin: 0 30rpx;
+ padding: 30rpx;
+
+ .upload-item {
+ width: 140rpx;
+ height: 140rpx;
+ border: 1px solid #EEEEEE;
+ }
+ }
+
+ .footer {
+ width: 100%;
+ padding: 30rpx;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ z-index: 10;
+ box-sizing: border-box;
+
+ .footer-btn {
+ width: 100%;
+ height: 78rpx;
+ line-height: 78rpx;
+ background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
+ border-radius: 8rpx;
+ color: #fff;
+ font-size: 32rpx;
+ }
+ }
+
+ .popup-content {
+ width: 100%;
+ padding: 0 30rpx 30rpx;
+ box-sizing: border-box;
+
+ .popup-title {
+ padding: 30rpx 0;
+ text-align: center;
+ font-weight: bold;
+ }
+
+ .popup-list {
+ height: 650rpx;
+ }
+
+ .popup-list-item {
+ padding: 20rpx 0;
+ border-bottom: 1px solid #f1f1f1;
+ position: relative;
+ }
+
+ .check-icon {
+ position: absolute;
+ right: 20rpx;
+ top: 20rpx;
+ }
+ }
+
+ .address-content {
+ flex: 1;
+ background-color: #F5F5F5;
+ font-size: 28rpx;
+ padding: 2rpx 10rpx;
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/reside/detail.vue b/subPackage/reside/detail.vue
new file mode 100644
index 0000000..38bcefd
--- /dev/null
+++ b/subPackage/reside/detail.vue
@@ -0,0 +1,149 @@
+<template>
+ <view class="">
+
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>姓名</text>
+ <text>{{info.name}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>电话号码</text>
+ <text>{{info.phone}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>身份证号码</text>
+ <text>{{info.idCard}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>地址</text>
+ <text class="item-content">{{info.address}}</text>
+ </view>
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>申请事由</text>
+ <text class="item-content">{{info.remak}}</text>
+ </view>
+
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>审核状态</text>
+ <text class="item-content" v-if="info.confirmFlag == 1">待审核</text>
+ <text class="item-content" v-if="info.confirmFlag == 3">审核通过</text>
+ <text class="item-content" v-if="info.confirmFlag == 4">审核驳回</text>
+ </view>
+
+ <view class="item-row flex j-c-s-b a-i-c" v-if="info.confirmFlag == 4">
+ <text>驳回原因</text>
+ <text>{{info.confirmNotion}}</text>
+ </view>
+
+ <view class="item-row flex j-c-s-b a-i-c">
+ <text>申请时间</text>
+ <text>{{info.createTime}}</text>
+ </view>
+
+
+ <audit-action @handle="submit" v-if="roleType == 2 && info.confirmFlag == 1"></audit-action>
+ <footer-btn v-if="roleType == 1 && info.confirmFlag == 4" text="编辑" @click="navToEdit" />
+
+
+ </view>
+
+
+</template>
+
+<script>
+ import auditAction from '@/components/btn/actionBtn.vue'
+ import {
+ getResideApplyDetail,
+ auditResideApply
+ } from "@/api/reside/reside.js"
+ export default {
+ components: {
+ auditAction
+ },
+ data() {
+ return {
+ info: {},
+ roleType: 1,
+ id: ""
+ }
+ },
+
+
+ onLoad(option) {
+ if (uni.getStorageSync("activeRole").roleName == "民警") {
+ this.roleType = 2;
+ }
+
+ if (uni.getStorageSync("activeRole").roleName == "居民") {
+ this.roleType == 1;
+ }
+
+ this.id = option.id;
+ },
+
+
+ onShow() {
+ this.getDetail(this.id)
+ },
+
+
+ methods: {
+ getDetail(id) {
+ getResideApplyDetail({
+ id
+ }).then(res => {
+ this.info = res.data;
+ })
+ },
+
+ submit(val) {
+ let data = {
+ id: this.info.id,
+ confirmFlag: val.type == 2 ? 3 : 4,
+ }
+ if (val.type == 3) {
+ data.confirmNotion = val.remark;
+ }
+ auditResideApply(data).then(res => {
+ if (res.code == 200) {
+ this.$showTips("操作成功", "success");
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 300)
+ }
+ })
+ },
+
+ navToEdit() {
+ uni.navigateTo({
+ url: `edit?id=${this.info.id}`
+ })
+ },
+
+
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #f5f5f5;
+ }
+
+ .item-row {
+ width: 100%;
+ padding: 30rpx;
+ box-sizing: border-box;
+ border-bottom: 1px solid #f5f5f5;
+ font-size: 28rpx;
+ background-color: #fff;
+
+ .item-content {
+ width: 70%;
+ text-align: right;
+ }
+
+ .item-left {
+ width: 70%;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/reside/edit.vue b/subPackage/reside/edit.vue
new file mode 100644
index 0000000..51421e1
--- /dev/null
+++ b/subPackage/reside/edit.vue
@@ -0,0 +1,258 @@
+<template>
+ <view>
+ <view class="content bgc-ff">
+ <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90"
+ :labelStyle="{fontSize:'28rpx'}">
+ <u-form-item label="姓名" prop="name" borderBottom required>
+ <u-input v-model="info.name" border="none" placeholder="请输入姓名" placeholderClass="f-28 c-99"
+ inputAlign="right"></u-input>
+ </u-form-item>
+
+ <u-form-item label="电话" prop="phone" borderBottom required>
+ <u-input v-model="info.phone" type="number" border="none" placeholder="请输入电话"
+ placeholderClass="f-28 c-99" inputAlign="right"></u-input>
+ </u-form-item>
+
+ <u-form-item label="身份证号码" prop="idCard" borderBottom required>
+ <u-input v-model="info.idCard" type="idcard" border="none" placeholder="请输入身份证号码"
+ placeholderClass="f-28 c-99" inputAlign="right"></u-input>
+ </u-form-item>
+
+ <u-form-item label="地址" prop="address" borderBottom required>
+ <u-textarea v-model="info.address" border="none" placeholder="请输入地址" placeholderClass="f-28 c-99"
+ inputAlign="right"></u-textarea>
+ </u-form-item>
+
+ <u-form-item label="申请事由" prop="remak" :borderBottom="false">
+ <u-textarea v-model="info.remak" border="none" placeholder="请输入申请事由" placeholderClass="f-28 c-99"
+ inputAlign="right"></u-textarea>
+ </u-form-item>
+ </u-form>
+ </view>
+
+
+
+ <button class="submit-btn" @click="sumitInfo">提交</button>
+ <button class="list-btn" @click="navigatorPage">我申请的记录</button>
+
+
+ </view>
+
+</template>
+
+<script>
+ import {
+ saveResideApply,
+ getResideApplyDetail,
+ updateResideApply
+ } from "@/api/reside/reside.js"
+ export default {
+ data() {
+ return {
+ info: {
+ name: "",
+ phone: "",
+ idCard: "",
+ address: "",
+ remak: "",
+ houseCode: ""
+ },
+ rules: {
+ name: [{
+ type: 'string',
+ required: true,
+ message: '请输入姓名',
+ trigger: ['blur', 'change']
+ }],
+ phone: [{
+ type: 'string',
+ required: true,
+ message: '请输入手机号',
+ trigger: ['blur', 'change']
+ },
+ {
+ validator: (rule, value, callback) => {
+ return uni.$u.test.mobile(value);
+ },
+ message: '手机号码不正确',
+ trigger: ['change', 'blur']
+ }
+ ],
+ idCard: [{
+ type: 'string',
+ required: false,
+ message: '请输入身份证号码',
+ trigger: ['change', 'blur']
+ },
+ {
+ validator: (rule, value, callback) => {
+ const idCardRegex =
+ /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
+ return idCardRegex.test(value)
+ },
+
+ message: '身份证号码有误',
+ trigger: ['change', 'blur']
+ }
+ ],
+ address: [{
+ type: 'string',
+ required: true,
+ message: '请选择地址',
+ trigger: ['blur', 'change']
+ }],
+ },
+ isEdit: false
+ }
+ },
+
+ onLoad(option) {
+ if (option.id) {
+ this.isEdit = true;
+ this.getDetail(option.id)
+ } else {
+ this.$set(this.info, "houseCode", uni.getStorageSync("siteInfo").houseCode)
+ }
+ },
+
+ onReady() {
+ //onReady 为uni-app支持的生命周期之一
+ this.$refs.form.setRules(this.rules)
+ },
+
+ methods: {
+ getDetail(id) {
+ getResideApplyDetail({
+ id
+ }).then(res => {
+ if (res.code == 200) {
+ for (let i in this.info) {
+ this.info[i] = res.data[i];
+ }
+ }
+ })
+ },
+
+ sumitInfo() {
+ this.$refs.form.validate().then(valid => {
+ if (this.id) {
+ this.updateInfoRequest();
+ } else {
+ this.addInfoRequst();
+ }
+ })
+ },
+
+ addInfoRequst() {
+ saveResideApply(this.info).then(res => {
+ if (res.code == 200) {
+ this.$showTips("提交成功", "success")
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 300)
+ }
+ })
+ },
+
+ updateInfoRequest() {
+ updateResideApply(this.info).then(res => {
+ if (res.code == 200) {
+ this.$showTips("提交成功", "success")
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 300)
+ }
+ })
+ },
+
+ navigatorPage() {
+ uni.navigateTo({
+ url: "record"
+ })
+ }
+
+ }
+ }
+</script>
+
+<style lang="less">
+ page {
+ background-color: #F5F5F5;
+ }
+
+ .content {
+ margin: 20rpx 30rpx;
+ padding: 0 30rpx;
+ }
+
+ .row {
+ padding: 20rpx 0;
+ border-bottom: 1px solid
+ }
+
+ .location-btn {
+ width: 116rpx;
+ height: 46rpx;
+ line-height: 46rpx;
+ border-radius: 4rpx;
+ border: 1px solid currentColor;
+ padding: 0;
+ background-color: #fff;
+ }
+
+ .upload {
+ margin: 0 30rpx;
+ padding: 30rpx;
+
+ .upload-item {
+ width: 140rpx;
+ height: 140rpx;
+ border: 1px solid #EEEEEE;
+ }
+ }
+
+ .address-row {
+ flex: 1;
+ justify-content: flex-end;
+ align-items: center;
+ }
+
+ .address-content {
+ width: calc(100% - 116rpx - 20rpx);
+ margin-right: 20rpx;
+ text-align: right;
+ }
+
+ .location-btn {
+ width: 116rpx;
+ height: 46rpx;
+ line-height: 46rpx;
+ border-radius: 4rpx;
+ border: 1px solid currentColor;
+ padding: 0;
+ background-color: #fff;
+ text-align: center;
+ }
+
+ .submit-btn {
+ width: 690rpx;
+ height: 78rpx;
+ line-height: 78rpx;
+ background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
+ border-radius: 8rpx 8rpx 8rpx 8rpx;
+ font-size: 32rpx;
+ color: #fff;
+ margin-top: 50rpx;
+ }
+
+ .list-btn {
+ width: 690rpx;
+ height: 78rpx;
+ line-height: 78rpx;
+ background: linear-gradient(163deg, #c7d7dc 0%, #c3cdd8 100%);
+ border-radius: 8rpx 8rpx 8rpx 8rpx;
+ font-size: 32rpx;
+ color: #fff;
+ margin-top: 50rpx;
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/reside/list.vue b/subPackage/reside/list.vue
new file mode 100644
index 0000000..fa6d049
--- /dev/null
+++ b/subPackage/reside/list.vue
@@ -0,0 +1,287 @@
+<template>
+ <view>
+ <u-sticky>
+ <view class="hander">
+ <view class="tab">
+ <u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}"
+ :activeStyle="{color:'#017BFC'}" :scrollable="false">
+ </u-tabs>
+ </view>
+
+ <view class="search flex j-c-s-b a-i-c">
+ <view class="tab-filter flex j-c-c a-i-c" slot="right" @click="showDateModal">
+ <text class="f-28">时间筛选</text>
+ <u-icon name="arrow-down"></u-icon>
+ </view>
+ <u-search placeholder="请输入姓名" v-model="keyWord" :clearabled="true" :showAction="true"
+ :animation="true" @search="searchConfirm" @clear="clearConfirm"
+ @custom="searchConfirm"></u-search>
+ </view>
+
+ </view>
+ </u-sticky>
+ <view class="list">
+ <view class="list-item bgc-ff mb-20" v-for="item in siteList" :key="item.id" @click="pushPage(item.id)">
+ <view class="item-title flex a-i-c j-c-s-b mb-20">
+ <text class="f-32 fw">{{ item.name}}</text>
+ <!-- <u-tag text="待审批" type="warning" plain plainFill></u-tag> -->
+ <u-tag class="u_tag" size="mini" :text="findObjValue(item.confirmFlag, tabList).name"
+ :type="findObjValue(item.confirmFlag, tabList).type" plain plainFill></u-tag>
+ <!-- <u-tag text="审核拒绝" type="error" plain plainFill></u-tag> -->
+ </view>
+
+ <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">电话号码</text>
+ <text class="address f-28 c-66">{{ item.phone}}</text>
+ </view>
+
+ <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">地址</text>
+ <text class="address f-28 c-66">{{ item.address}}</text>
+ </view>
+ <!-- <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">法人信息</text>
+ <text class="f-28 c-66">{{ item.legalPerson ? item.legalPerson : '未完善'}}</text>
+ </view> -->
+ <view class="item-row flex a-i-c j-c-s-b f-28">
+ <text>时间</text>
+ <text class="c-66">{{item.createTime}}</text>
+ </view>
+ </view>
+ </view>
+ <u-toast ref="uToast"></u-toast>
+ <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
+
+
+
+
+
+ <date-range-modal ref="dateRane" @comfirm="handleComfirmDate" @rest="handleRestDate" />
+ </view>
+</template>
+
+<script>
+ import dateRangeModal from '@/components/dateRangeModal/modal.vue';
+ import {
+ getResideApplyList
+ } from '@/api/reside/reside.js'
+ export default {
+ components: {
+ dateRangeModal
+ },
+ data() {
+ return {
+ siteList: [],
+ pagingParams: {
+ current: 1,
+ size: 10
+ },
+ tabList: [{
+ name: "全部",
+ status: "",
+ },
+ {
+ name: "待审核",
+ status: 1,
+ type: 'warning'
+ },
+ {
+ name: "审核通过",
+ status: 3,
+ type: 'success'
+ },
+ {
+ name: "已拒绝",
+ status: 4,
+ type: 'error'
+ },
+ ],
+ tabIndex: 0,
+ tabStatus: "",
+ keyWord: '',
+ loadingStatus: 'nomore',
+ clickInfo: {},
+ currentRole: {},
+ selectDate: [],
+ }
+ },
+
+
+ onLoad(option) {
+ if (option.from) {
+ this.tabIndex = 1;
+ this.tabStatus = 1;
+ }
+ if (option.placeId) {
+ this.pagingParams.placeId = option.placeId
+ }
+ },
+
+ onShow() {
+ this.currentRole = uni.getStorageSync("activeRole")
+ this.resetParams()
+ this.getSiteList()
+ },
+ onReachBottom() {
+ this.pagingParams.current++
+ this.getSiteList()
+ },
+
+
+ methods: {
+
+
+ async getSiteList() {
+ this.$nextTick(() => {
+ this.$refs.uToast.show({
+ type: 'loading',
+ message: '正在加载',
+ duration: 9999999
+ })
+ this.loadingStatus = 'loadingmore'
+ })
+
+ const params = {
+ name: this.keyWord,
+ confirmFlag: this.tabStatus
+ }
+ if (this.selectDate.length) {
+ params.startTime = this.selectDate[0],
+ params.endTime = this.selectDate[1]
+ }
+ const {
+ roleName
+ } = this.currentRole
+
+ const res = await getResideApplyList({
+ ...params,
+ roleName,
+ ...this.pagingParams
+ })
+ console.log(res);
+ const {
+ code,
+ data: {
+ records
+ }
+ } = res
+ if (code !== 200) {
+ uni.showToast({
+ title: '数据请求失败',
+ icon: 'error'
+ })
+ return
+ }
+ this.siteList = [...this.siteList, ...records]
+ this.$nextTick(() => {
+ this.$refs.uToast.isShow = false
+ })
+ this.loadingStatus = 'nomore'
+ },
+ changeTab(e) {
+ this.tabStatus = e.status;
+ this.resetParams()
+ this.getSiteList()
+ },
+ searchConfirm() {
+ this.resetParams()
+ this.getSiteList()
+ },
+ clearConfirm() {
+ this.keyWord = ''
+ this.resetParams()
+ this.searchConfirm()
+ },
+
+
+ showDateModal() {
+ this.$refs.dateRane.open();
+ },
+
+
+ resetParams() {
+ this.siteList = []
+ this.pagingParams.current = 1
+ },
+ findObjValue(value, obj) {
+ const res = obj.find(item => {
+ return item.status == value
+ })
+ return res
+ },
+ pushPage(id) {
+ const {
+ roleAlias
+ } = this.currentRole
+ if (roleAlias === "inhabitant") {
+ return
+ }
+ uni.navigateTo({
+ url: `detail?id=${id}`
+ })
+
+
+ // this.$u.func.globalNavigator(`/subPackage/workbench/views/examine?id=${id}&placeId=${placeId}`)
+ },
+
+ handleRestDate() {
+ this.selectDate = [];
+ this.resetParams();
+ this.getSiteList()
+ },
+ handleComfirmDate(val) {
+ this.selectDate = val;
+ this.resetParams();
+ this.getSiteList()
+ }
+
+
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #F5F5F5;
+ }
+
+ .hander {
+ background-color: #fff;
+
+ .tab {
+ width: 100%;
+ }
+
+ .tab-filter {
+ padding: 0 20rpx;
+ }
+
+
+ .search {
+ padding: 20rpx 30rpx;
+ }
+ }
+
+ .list {
+ margin: 20rpx 30rpx 0;
+ }
+
+ .list-item {
+ padding: 0 30rpx 20rpx;
+ border-radius: 8rpx;
+
+ .item-title {
+ padding: 30rpx 0;
+ border-bottom: 1px solid #F5F5F5;
+ }
+
+ .item-row {
+ padding: 10rpx 0;
+
+ .address {
+ width: 65%;
+ text-align: right;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/reside/record.vue b/subPackage/reside/record.vue
new file mode 100644
index 0000000..e0eae4f
--- /dev/null
+++ b/subPackage/reside/record.vue
@@ -0,0 +1,109 @@
+<template>
+ <view class="">
+ <view class="list">
+ <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i.id)">
+ <view class="item-title flex a-i-c j-c-s-b mb-20">
+ <!-- <text class="f-32 fw" v-if="i.type == 7">消防检查</text> -->
+ <text class="f-32 fw">{{i.name}}</text>
+ <u-tag v-if="i.confirmFlag == 1" text="待审批" type="warning" plain plainFill></u-tag>
+ <u-tag v-if="i.confirmFlag == 3" text="审核通过" type="success" plain plainFill></u-tag>
+ <u-tag v-if="i.confirmFlag == 4" text="审核拒绝" type="error" plain plainFill></u-tag>
+ </view>
+ <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">时间</text>
+ <text class="f-28 c-66">{{i.createTime}}</text>
+ </view>
+ </view>
+ </view>
+ <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
+ <u-toast ref="uToast"></u-toast>
+ </view>
+</template>
+
+<script>
+ import {
+ getResideApplyRecord
+ } from "@/api/reside/reside.js"
+ export default {
+ data() {
+ return {
+ list: [],
+ currentPage: 1,
+ loadingStatus: 'nomore',
+ }
+ },
+
+ onLoad() {
+ this.getList()
+ },
+ onReachBottom() {
+ this.currentPage++
+ this.getList()
+ },
+
+ methods: {
+ getList() {
+ this.$nextTick(() => {
+ this.loadingStatus = 'loadmore'
+ this.$refs.uToast.show({
+ type: 'loading',
+ message: '正在加载',
+ duration: 9999999
+ })
+ })
+ getResideApplyRecord({
+ // checkUserId: uni.getStorageSync("userInfo").user_id,
+ page: this.currentPage,
+ size: 10
+ }).then(res => {
+ if (res.code != 200) {
+ uni.showToast({
+ title: '数据请求失败',
+ icon: 'error'
+ })
+ return
+ }
+ let records = res.data.records;
+ this.list = [...this.list, ...records]
+ this.$nextTick(() => {
+ this.$refs.uToast.isShow = false
+ })
+ this.loadingStatus = 'nomore'
+ })
+ },
+ navTo(id) {
+ uni.navigateTo({
+ url: `detail?id=${id}`
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #F5F5F5;
+ }
+
+ .list {
+ margin: 20rpx 30rpx 0;
+ }
+
+ .list-item {
+ padding: 0 30rpx 20rpx;
+ border-radius: 8rpx;
+
+ .item-title {
+ padding: 30rpx 0;
+ border-bottom: 1px solid #F5F5F5;
+ }
+
+ .item-row {
+ padding: 10rpx 0;
+
+ .address {
+ width: 65%;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/statistics/index.vue b/subPackage/statistics/index.vue
index e22ec56..5901b2c 100644
--- a/subPackage/statistics/index.vue
+++ b/subPackage/statistics/index.vue
@@ -25,6 +25,23 @@
</view>
</view>
</view>
+
+ <!-- 房屋画像 -->
+ <view class="">
+ <caption-row title="房屋画像"></caption-row>
+ <view class="pie-charts-house flex bgc-ff">
+ <view class="pie-charts-box flex j-c-c a-i-c">
+ <qiun-data-charts type="pie" :opts="housePieOpts" :chartData="houseLabelChartData" />
+ </view>
+ <view class="pie-charts-explain-house flex f-d-c j-c-c" v-if="houseLabelData.length">
+ <!-- <view class="f-32 fw mb-20">标签</view> -->
+ <view class="flex a-i-c mb-20" v-for="i in houseLabelData">
+ <text class="f-30 fw">{{i.labelName}}</text>
+ <text class="f-26">({{i.numbers}})</text>
+ </view>
+ </view>
+ </view>
+ </view>
<view class="">
<caption-row title="共治力量"></caption-row>
@@ -70,7 +87,7 @@
<qiun-data-charts type="pie" :opts="pieOpts" :chartData="sexChartData" />
</view>
<view class="pie-charts-explain flex f-d-c j-c-c" v-if="sexData.length">
- <view class="f-32 fw mb-20">性别</view>
+ <!-- <view class="f-32 fw mb-20">性别</view> -->
<view class="flex a-i-c mb-20" v-for="i in sexData">
<text class="f-30 fw">{{i.gender}}</text>
<text class="f-26">({{i.numbers}})</text>
@@ -212,7 +229,28 @@
}
}
},
+ houseLabelChartData: {},
+ housePieOpts: {
+ color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
+ "#ea7ccc"
+ ],
+ padding: [5, 5, 5, 5],
+ enableScroll: false,
+ extra: {
+ pie: {
+ customRadius: 55,
+ activeOpacity: 0.5,
+ activeRadius: 10,
+ offsetAngle: 0,
+ labelWidth: 6,
+ border: false,
+ borderWidth: 3,
+ borderColor: "#FFFFFF"
+ }
+ }
+ },
gridData: {},
+ houseLabelData: [],
sexData: []
}
},
@@ -220,6 +258,7 @@
onLoad() {
this.getHouseHoldData();
this.getHouseData();
+ this.getHouseLabelData();
this.getReportData();
this.getGridData();
},
@@ -260,8 +299,29 @@
this.setSexData(data.gender)
})
},
-
-
+
+ getHouseLabelData(){
+ statisticsModal.getHouseLabelStatistic().then(res => {
+ let data = res.data;
+ this.houseLabelData = data;
+ this.setHouseLabelData(data)
+ })
+ },
+ // 设置房屋标签
+ setHouseLabelData(data){
+ let res = {
+ series: [{
+ data: []
+ }]
+ }
+ for (let i of data) {
+ res.series[0].data.push({
+ name: i.labelName,
+ value: i.numbers
+ })
+ }
+ this.houseLabelChartData = JSON.parse(JSON.stringify(res));
+ },
setPersonData(data) {
let res = {
categories: [],
@@ -438,6 +498,15 @@
padding: 0 20rpx;
box-sizing: border-box;
}
+
+ .pie-charts-house {
+ width: 100%;
+ height: 250px;
+ margin-top: 10px;
+ border-radius: 10rpx;
+ padding: 0 20rpx;
+ box-sizing: border-box;
+ }
.bar-charts {
margin: 20rpx 0;
@@ -455,4 +524,10 @@
padding-left: 40rpx;
box-sizing: border-box;
}
+
+ .pie-charts-explain-house {
+ width: 40%;
+ padding-left: 40rpx;
+ box-sizing: border-box;
+ }
</style>
\ No newline at end of file
diff --git a/subPackage/task/index.vue b/subPackage/task/index.vue
index 268b282..0718a15 100644
--- a/subPackage/task/index.vue
+++ b/subPackage/task/index.vue
@@ -22,13 +22,13 @@
</view>
</view>
</view> -->
- <view class="nav bgc-ff mb-20 mt-20" v-if="comprehensive.length">
- <view class="caption">
+ <view class="nav bgc-ff mt-20" v-if="comprehensive.length">
+ <!-- <view class="caption">
<view class="flex a-i-c">
<view class="line"></view>
<text class="f-32 fw">综治任务</text>
</view>
- </view>
+ </view> -->
<view class="nav-item flex j-c-s-b a-i-c" @click="navTo(i.path)" v-for="i in comprehensive">
<text class="f-28">{{i.name}}</text>
@@ -118,23 +118,30 @@
</view>
</view>
</view> -->
- <view class="nav bgc-ff mb-20" v-if="securityList.length">
- <view class="caption">
+ <view class="nav bgc-ff mb-20 mt-20" v-if="securityList.length">
+ <!-- <view class="caption">
<view class="flex a-i-c">
<view class="line"></view>
<text class="f-32 fw">公安任务</text>
</view>
- </view>
+ </view> -->
<view class="nav-item flex j-c-s-b a-i-c" @click="navTo(`${i.path}&from=task`)" v-for="i in securityList">
<text class="f-28">{{i.name}}</text>
<view class="flex">
+ <block v-if="i.count > 0">
+ <text class="f-28 c-99">待处理</text>
+ <view class="dot bgc-main">{{i.count}}</view>
+ </block>
+ <u-icon name="arrow-right" color="#999"></u-icon>
+ </view>
+ <!-- <view class="flex">
<block v-if="bailCount > 0">
<text class="f-28 c-99">待处理</text>
<view class="dot bgc-main">{{bailCount}}</view>
</block>
<u-icon name="arrow-right" color="#999"></u-icon>
- </view>
+ </view> -->
</view>
</view>
</view>
@@ -199,21 +206,37 @@
let data = res.data;
this.countInfo = res.data;
for (let i of this.comprehensive) {
- if (i.name == "场所审核") {
+ if (i.name.trim() == "场所审核") {
i.count = data.cssh;
- } else if (i.name == "报事报修") {
+ } else if (i.name.trim() == "报事报修") {
i.count = data.bsbx;
- } else if (i.name == "住户审核") {
+ } else if (i.name.trim() == "住户审核") {
i.count = data.zhsh
- } else if (i.name.trim() == "标签报事") {
- i.count = data.bqsj
- } else if (i.name == "租房管理") {
+ } else if (i.name.trim() == "租户确认") {
i.count = data.czsh
- } else if (i.name == "走访任务") {
+ } else if (i.name.trim() == "走访任务") {
+ i.count = data.zfrw;
+ } else if (i.name.trim() == "走访任务") {
i.count = data.zfrw;
}
}
- this.bailCount = data.qbhs
+ // this.bailCount = data.qbhs
+
+ for (let i of this.securityList) {
+ if (i.name.trim() == "二手交易") {
+ i.count = data.bqsj
+ } else if (i.name.trim() == "消防自查") {
+ i.count = data.xfzc;
+ } else if (i.name.trim() == "消防隐患整改") {
+ i.count = data.xfyhzg;
+ } else if (i.name.trim() == "居住证申请") {
+ i.count = data.jzzsq;
+ } else if (i.name.trim() == "从业人员审核") {
+ i.count = data.cssh;
+ } else {
+ i.count = data.qbhs;
+ }
+ }
}
})
},
@@ -229,14 +252,20 @@
navTo(url) {
-
if (!url || url == "暂无") {
uni.showToast({
title: "功能开发中~",
icon: "none"
})
} else {
- this.$u.func.globalNavigator(`${url}?from=task`)
+ console.log("url===>", url)
+ uni.navigateTo({
+ url: `${url}?from=task`,
+ complete: (res) => {
+ console.log("errr=>", res)
+ }
+ })
+ // this.$u.func.globalNavigator(`${url}?from=task`)
}
}
}
diff --git a/subPackage/user/about/about.vue b/subPackage/user/about/about.vue
new file mode 100644
index 0000000..02409e3
--- /dev/null
+++ b/subPackage/user/about/about.vue
@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>
\ No newline at end of file
diff --git a/subPackage/user/commentList/evaluateList.vue b/subPackage/user/commentList/evaluateList.vue
index fcf9d14..55dbb6b 100644
--- a/subPackage/user/commentList/evaluateList.vue
+++ b/subPackage/user/commentList/evaluateList.vue
@@ -4,7 +4,7 @@
loading-more-no-more-text="没有更多了">
- <view class="list" v-for="(i,k) in list">
+ <view class="list" v-for="(i,k) in list" v-if="i.content">
<view class="f-24 c-99 mb-20">
{{i.createTime}}
</view>
diff --git a/subPackage/workbench/components/cateSelector.vue b/subPackage/workbench/components/cateSelector.vue
index 6faaf56..79d7442 100644
--- a/subPackage/workbench/components/cateSelector.vue
+++ b/subPackage/workbench/components/cateSelector.vue
@@ -77,8 +77,8 @@
parentName: "",
childrenName: ""
},
- index: "",
- tempIndex: ""
+ index: null,
+ tempIndex: null
}
},
@@ -131,13 +131,16 @@
this.$set(this.selectedTemp, "parentName", this.selectedItem.parentName);
this.$set(this.selectedTemp, "childrenId", this.selectedItem.childrenId);
this.$set(this.selectedTemp, "childrenName", this.selectedItem.childrenName);
- this.tempIndex = this.index;
- if (this.index != "" && this.categoryList[this.index].hasChildren) {
- this.childList = this.categoryList[this.index].children;
+ if (this.index != null) {
+ this.tempIndex = this.index;
+ if ((this.index != "" || this.index != null) && this.categoryList[this.index].hasChildren) {
+ this.childList = this.categoryList[this.index].children;
+ }
+ if (this.index == "" || this.index == null) {
+ this.childList = [];
+ }
}
- if (this.index == "") {
- this.childList = [];
- }
+
}
this.isShow = false;
},
diff --git a/subPackage/workbench/components/formItem.vue b/subPackage/workbench/components/formItem.vue
index f1e9d66..063ce18 100644
--- a/subPackage/workbench/components/formItem.vue
+++ b/subPackage/workbench/components/formItem.vue
@@ -4,23 +4,104 @@
<u-form-item label="姓名" required prop="name" class="form-item">
<u--input v-model="form.name" border="none" placeholder="请填写姓名"></u--input>
</u-form-item>
+ <u-form-item @click="showGenderPicker = true" class="form-item" label="性别" prop="legalGender">
+ <u--input border="none" v-model="genderValue" disabled disabledColor="#ffffff" placeholder="请选择性别">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item @click="showNationPicker = true" class="form-item" label="民族" prop="ethnicity">
+ <u--input border="none" v-model="nationValue" disabled disabledColor="#ffffff" placeholder="请选择民族">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item label="身份证号" class="form-item">
+ <u--input v-model="form.idCard" type="idcard" border="none" placeholder="请填写身份证号"></u--input>
+ </u-form-item>
<u-form-item label="电话号码" class="form-item">
<u--input v-model="form.telephone" border="none" placeholder="请填写电话号码"></u--input>
</u-form-item>
- <u-form-item label="暂住地" class="form-item">
- <u--input v-model="form.tempAddress" border="none" placeholder="请填写地址"></u--input>
+ <u-form-item label="现居住地" class="form-item">
+ <u--input v-model="form.tempAddress" border="none" placeholder="请填写现居住地"></u--input>
+ </u-form-item>
+
+ <!-- <u-form-item label="微信号" class="form-item">
+ <u--input v-model="form.wxAccount" border="none" placeholder="请填写微信号"></u--input>
+ </u-form-item> -->
+
+
+
+ <u-form-item label="岗位" class="form-item">
+ <u--input v-model="form.jobNature" border="none" placeholder="请填写岗位"></u--input>
+ </u-form-item>
+ <u-form-item v-if="addressType == 2" @click="showEmploymentTime = true" class="form-item" label="入职时间"
+ prop="ethnicity">
+ <u--input border="none" v-model="form.employmentTime" disabled disabledColor="#ffffff"
+ placeholder="请选择入职时间">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item v-if="addressType == 2" @click="showResignationTime = true" class="form-item" label="离职时间"
+ prop="ethnicity">
+ <u--input border="none" v-model="form.resignationTime" disabled disabledColor="#ffffff"
+ placeholder="请选择离职时间">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+
+ <!-- <u-form-item label="户籍地址" class="form-item">
+ <u--input v-model="form.registeredAddress" border="none" placeholder="请填写户籍地址"></u--input>
+ </u-form-item> -->
+
+ <u-form-item label="从业人员照片" class="form-item" labelPosition="top" labelWidth="100">
+ <view style="padding:20rpx 0 0;">
+ <u-upload :fileList="form.employerImg" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
+ :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
+ uploadIcon="/static/icon/upload.png" @afterRead="afterReadImgs" @delete="deleteImages">
+ </u-upload>
+ </view>
</u-form-item>
</u-form>
+
+ <u-datetime-picker ref="datetimePicker" :show="showEmploymentTime" v-model="workTime" mode="date"
+ :formatter="formatter" @confirm="confirmEmploymentTime"
+ @cancel="showEmploymentTime = false"></u-datetime-picker>
+
+ <u-datetime-picker ref="datetimePicker" :show="showResignationTime" v-model="workTime" mode="date"
+ :formatter="formatter" @confirm="confirmResignationTime"
+ @cancel="showResignationTime = false"></u-datetime-picker>
+
+ <u-picker :defaultIndex="nationTypeListIndex" :closeOnClickOverlay="true" :show="showNationPicker"
+ :columns="[nationTypeList]" @close="showNationPicker = false" @cancel="showNationPicker = false"
+ keyName="name" @confirm="confirmNation"></u-picker>
+
+ <u-picker :defaultIndex="genderIndex" :closeOnClickOverlay="true" :show="showGenderPicker" :columns="[gender]"
+ @close="showGenderPicker = false" @cancel="showGenderPicker = false" keyName="name"
+ @confirm="confirmGender"></u-picker>
</view>
</template>
<script>
+ import {
+ bizDictionary
+ } from '@/api/system/dict.js'
+ import uploadMixin from "@/mixin/uploadMixinPlace";
export default {
+ mixins: [uploadMixin],
data() {
return {
form: {
name: '',
telephone: '',
- tempAddress: ''
+ tempAddress: '',
+ idCard: '',
+ gender: "",
+ ethnicity: "",
+ registeredAddress: "",
+ jobNature: "",
+ wxAccount: "",
+ employer: "",
+ jobNature: "",
+ employerImg: []
},
rules: {
name: {
@@ -29,8 +110,110 @@
message: '请填写姓名',
trigger: ['blur', 'change']
}
- }
+ },
+ nationTypeList: [], //民族
+ nationTypeIndex: [0],
+ nationValue: "",
+ gender: [{ //性别
+ value: 1,
+ name: '男',
+ },
+ {
+ value: 0,
+ name: '女',
+ }
+ ],
+ genderIndex: [0],
+ genderValue: "",
+ showNationPicker: false,
+ showGenderPicker: false,
+ showEmploymentTime: false,
+ showResignationTime: false,
+ workTime: Number(new Date()),
+ addressType: ""
}
+ },
+
+ created() {
+ this.addressType = uni.getStorageSync("siteInfo").addressType;
+ this.getAllBizDict()
+ },
+
+ methods: {
+ async getAllBizDict() {
+ // 获取民族
+ await this.getBizDict('nationType', this.nationTypeList);
+ },
+
+ // 获取业务字典
+ 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)
+ })
+ })
+ },
+
+ //选择民族
+ confirmNation(e) {
+ this.nationIndex = e.indexs;
+ this.nationValue = e.value[0].name;
+ this.form.ethnicity = e.value[0].value;
+ this.showNationPicker = false;
+ },
+
+ //选择性别
+ confirmGender(e) {
+ this.genderIndex = e.indexs;
+ this.genderValue = e.value[0].name;
+ this.form.gender = e.value[0].value;
+ this.showGenderPicker = false;
+ },
+
+
+ //上传成功后对返回数据进行处理
+ async afterReadImgs(event) {
+ this.showLoading()
+ let lists = [].concat(event.file)
+ let fileListLen = this.form.employerImg.length
+ lists.map((item) => {
+ this.form.employerImg.push({
+ ...item,
+ status: 'uploading',
+ message: '上传中'
+ })
+ })
+ for (let i = 0; i < lists.length; i++) {
+ const result = await this.uploadFilePromise(lists[i].url)
+ this.form.employerImg.splice(fileListLen, 1, Object.assign({}, {
+ url: result.data.link,
+ name: result.data.name
+ }))
+ fileListLen++
+ }
+ this.loadingClose()
+ },
+
+ deleteImages(event) {
+ this.form.employerImg.splice(event.index, 1)
+ },
+
+ confirmResignationTime(e) {
+ this.form.resignationTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
+ this.showResignationTime = false;
+ },
+
+ confirmEmploymentTime(e) {
+ this.form.employmentTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
+ this.showEmploymentTime = false;
+ },
+
+
}
}
</script>
diff --git a/subPackage/workbench/components/formItem.vue.bak b/subPackage/workbench/components/formItem.vue.bak
new file mode 100644
index 0000000..62d1ae1
--- /dev/null
+++ b/subPackage/workbench/components/formItem.vue.bak
@@ -0,0 +1,48 @@
+<template>
+ <view class="form-box">
+ <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
+ <u-form-item label="姓名" required prop="name" class="form-item">
+ <u--input v-model="form.name" border="none" placeholder="请填写姓名"></u--input>
+ </u-form-item>
+ <u-form-item label="电话号码" class="form-item">
+ <u--input v-model="form.telephone" border="none" placeholder="请填写电话号码"></u--input>
+ </u-form-item>
+ <u-form-item label="暂住地" class="form-item">
+ <u--input v-model="form.tempAddress" border="none" placeholder="请填写地址"></u--input>
+ </u-form-item>
+ </u-form>
+ </view>
+</template>
+<script>
+ export default {
+ data() {
+ return {
+ form: {
+ name: '',
+ telephone: '',
+ tempAddress: ''
+ },
+ rules: {
+ name: {
+ type: 'string',
+ required: true,
+ message: '请填写姓名',
+ trigger: ['blur', 'change']
+ }
+ }
+ }
+ }
+ }
+</script>
+<style lang="scss" scoped>
+ .form-box {
+ background-color: #fff;
+ padding: 0 30rpx;
+
+ .form-item {
+ border-bottom: 1rpx solid #f6f6f6;
+ padding: 0 20rpx;
+ background-color: #fff;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/workbench/components/rentForm.vue b/subPackage/workbench/components/rentForm.vue
new file mode 100644
index 0000000..5ade597
--- /dev/null
+++ b/subPackage/workbench/components/rentForm.vue
@@ -0,0 +1,170 @@
+<template>
+ <view class="">
+ <u-form :model="form" class="form-box" :rules="rules" ref="refForm">
+ <u-form-item class="form-item" label="姓名" required prop="name" labelWidth="100">
+ <u-input v-model="form.name" border="none" placeholder="姓名" />
+ </u-form-item>
+ <u-form-item class="form-item" label="联系方式" required prop="phoneNumber" labelWidth="100">
+ <u-input type="number" v-model="form.phoneNumber" border="none" placeholder="联系方式" />
+ </u-form-item>
+ <u-form-item class="form-item" label="身份证号码" required prop="idCard" labelWidth="100">
+ <u-input type="idcard" v-model="form.idCard" border="none" placeholder="身份证号码" />
+ </u-form-item>
+ <u-form-item @click="showGenderPicker = true" class="form-item" label="性别" prop="legalGender"
+ labelWidth="100">
+ <u--input border="none" v-model="genderValue" disabled disabledColor="#ffffff" placeholder="请选择性别">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item @click="showNationPicker = true" class="form-item" label="民族" prop="ethnicity"
+ labelWidth="100">
+ <u--input border="none" v-model="nationValue" disabled disabledColor="#ffffff" placeholder="请选择民族">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item class="form-item" label="户籍地址" labelWidth="100">
+ <u-input v-model="form.hukouRegistration" border="none" placeholder="选填" />
+ </u-form-item>
+ <u-form-item class="form-item" label="工作单位" labelWidth="100">
+ <u-input v-model="form.employer" border="none" placeholder="选填" />
+ </u-form-item>
+ </u-form>
+ <u-picker :defaultIndex="nationTypeListIndex" :closeOnClickOverlay="true" :show="showNationPicker"
+ :columns="[nationTypeList]" @close="showNationPicker = false" @cancel="showNationPicker = false"
+ keyName="name" @confirm="confirmNation"></u-picker>
+
+ <u-picker :defaultIndex="genderIndex" :closeOnClickOverlay="true" :show="showGenderPicker" :columns="[gender]"
+ @close="showGenderPicker = false" @cancel="showGenderPicker = false" keyName="name"
+ @confirm="confirmGender"></u-picker>
+ </view>
+
+</template>
+
+<script>
+ import {
+ bizDictionary
+ } from '@/api/system/dict.js'
+ export default {
+ data() {
+ return {
+ form: {
+ name: '',
+ phoneNumber: '',
+ idCard: '',
+ hukouRegistration: '',
+ employer: '',
+ ethnicity: '',
+ gender: ''
+ },
+ rules: {
+ name: [{
+ required: true,
+ message: '请输入姓名',
+ // 可以单个或者同时写两个触发验证方式
+ trigger: ['change', 'blur'],
+ }],
+ phoneNumber: [{
+ required: true,
+ message: '请输入联系方式',
+ // 可以单个或者同时写两个触发验证方式
+ trigger: ['change', 'blur'],
+ },
+ {
+ validator: (rule, value, callback) => {
+ return uni.$u.test.mobile(value);
+ },
+ message: '手机号码不正确',
+ trigger: ['change', 'blur']
+ }
+ ],
+ idCard: [{
+ required: true,
+ message: '请输入身份证号',
+ // 可以单个或者同时写两个触发验证方式
+ trigger: ['change', 'blur'],
+ }, {
+ // 自定义验证函数,见上说明
+ validator: (rule, value, callback) => {
+ const reg =
+ /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/
+ if (reg.test(value)) {
+ return true
+ }
+ return false
+ },
+ message: '请输入正确的身份证号',
+ // 触发器可以同时用blur和change
+ trigger: ['change', 'blur'],
+ }],
+ },
+ nationTypeList: [], //民族
+ nationTypeIndex: [0],
+ nationValue: "",
+ gender: [{ //性别
+ value: 1,
+ name: '男',
+ },
+ {
+ value: 0,
+ name: '女',
+ }
+ ],
+ genderIndex: [0],
+ genderValue: "",
+ showNationPicker: false,
+ showGenderPicker: false,
+
+ }
+ },
+ created() {
+ this.getAllBizDict()
+ },
+ methods: {
+ async getAllBizDict() {
+ // 获取民族
+ await this.getBizDict('nationType', this.nationTypeList);
+ },
+
+ // 获取业务字典
+ 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)
+ })
+ })
+ },
+
+
+ //选择民族
+ confirmNation(e) {
+ this.nationIndex = e.indexs;
+ this.nationValue = e.value[0].name;
+ this.form.ethnicity = e.value[0].value;
+ this.showNationPicker = false;
+ },
+
+ //选择性别
+ confirmGender(e) {
+ this.genderIndex = e.indexs;
+ this.genderValue = e.value[0].name;
+ this.form.gender = e.value[0].value;
+ this.showGenderPicker = false;
+ },
+
+
+
+
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .form-box {
+ background: #fff;
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/audit.vue b/subPackage/workbench/views/audit.vue
index aa0318b..28a1be1 100644
--- a/subPackage/workbench/views/audit.vue
+++ b/subPackage/workbench/views/audit.vue
@@ -11,7 +11,7 @@
<text class="f-28">时间筛选</text>
<u-icon name="arrow-down"></u-icon>
</view>
- <u-search placeholder="请输入需要查询信息的名称" v-model="keyWord" :clearabled="true" :showAction="true"
+ <u-search placeholder="请输入需要查询信息的名称" v-model="keyword" :clearabled="true" :showAction="true"
:animation="true" @search="searchConfirm" @clear="clearConfirm"></u-search>
</view>
</view>
@@ -96,19 +96,34 @@
console.log(option);
if (option.reportType) {
this.reportType = option.reportType;
- uni.setNavigationBarTitle({
- title: "取保候审"
- })
+ if (option.from == "task") {
+ this.tabIndex = 2;
+ this.currentStatus = 1;
+ }
+ if (option.reportType == 1) {
+ uni.setNavigationBarTitle({
+ title: "取保候审"
+ })
+ } else if (option.reportType == 7) {
+ uni.setNavigationBarTitle({
+ title: "消防自查"
+ })
+ } else if (option.reportType == 5) {
+ uni.setNavigationBarTitle({
+ title: "二手交易"
+ })
+ // 去掉已完成状态
+ this.tabList.splice(1, 1);
+ this.tabIndex = 1;
+ }
}
+
if (option.from == "index") {
uni.setNavigationBarTitle({
title: "场所任务"
})
}
- if (option.from == "task") {
- this.tabIndex = 1;
- this.currentStatus = 1;
- }
+
if (option.code) {
this.houseCode = option.code;
}
@@ -131,7 +146,7 @@
this.getList()
},
clearConfirm() {
- this.keyWord = ''
+ this.keyword = ''
this.searchConfirm()
},
changeTab(e) {
@@ -241,7 +256,7 @@
if (reportType == 1) {
this.$u.func.globalNavigator(`bailReportDetail?id=${id}`)
- } else if (reportType == 2) {
+ } else if (reportType == 7) {
this.$u.func.globalNavigator(`selfCheckDetail?id=${id}`)
} else if (reportType == 5) {
this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
diff --git a/subPackage/workbench/views/auditRental.vue b/subPackage/workbench/views/auditRental.vue
new file mode 100644
index 0000000..a9c649f
--- /dev/null
+++ b/subPackage/workbench/views/auditRental.vue
@@ -0,0 +1,712 @@
+<template>
+ <view class="container">
+ <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
+ <view class="basic-info">
+ <u-form-item class="form-item" labelWidth="100" label="租客关系" required prop="relation">
+ <u--input border="none" v-model="relationName" 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="houseTypeName">
+ <u--input border="none" v-model="houseTypeName" 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="rentalUseName">
+ <u--input border="none" v-model="rentalUseName" 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="rentTime">
+ <u--input border="none" v-model="form.rentTime" 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="dueTime">
+ <u--input border="none" v-model="form.dueTime" disabled disabledColor="#ffffff" placeholder="请选择">
+ </u--input>
+ <!-- <u-icon slot="right" name="arrow-right"></u-icon> -->
+ </u-form-item>
+ <view class="pic">
+ <view class="title">合同上传</view>
+ <!-- <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
+ :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
+ uploadIcon="/static/icon/upload.png" :maxCount="uploadConfig.maxCount"
+ :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
+ </u-upload> -->
+ <view class="f-28" style="pading:20rpx 0;" v-if="!form.images.length">
+ 未完善
+ </view>
+ <view class="flex flex-wrap" v-if="form.images.length">
+ <view class="" v-for="i in form.images" style="margin:0 20rpx 20rpx 0;">
+ <u-image :src="i.link" width="160" height="160"></u-image>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="rent-info">
+ <view v-for="(item, index) in rentFormNum" :key="item" class="rent-box">
+ <view class="box-title">
+ <view class="l">
+ <view class="line"></view>
+ <view class="title">{{ '租客信息-#' + (index + 1) }}</view>
+ </view>
+ <!-- <view class="r" v-if="(index+1) > 1">
+ <u-icon name="trash-fill" color="#ff0000" size="20" @click="decRentForm(index)"></u-icon>
+ </view> -->
+ </view>
+ <rentForm ref="rentform" />
+ </view>
+ <!-- <view class="addPerson-box">
+ <u-button class="btn-item" color="#2CD5C0" plain style="width: 300rpx;"
+ @click="addRentForm">再加一人</u-button>
+ </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">
+ </select-bus> -->
+ <u-picker :defaultIndex="[selectDefaultIndex[selectBusKey]]" :closeOnClickOverlay="true" v-if="typeShow"
+ :show="typeShow" :columns="[selectBusList]" @close="typeShow = false" @cancel="typeShow = false"
+ keyName="name" @confirm="typeSelect"></u-picker>
+ <!--出租时间选择-->
+ <u-datetime-picker v-model="currentTime" v-if="rentTimeShow" :closeOnClickOverlay="true"
+ @close="rentTimeShow = false" :show="rentTimeShow" mode="date" @confirm="rentTimeConfirm"
+ @cancel="rentTimeShow = false"></u-datetime-picker>
+ <u-datetime-picker v-model="currentTime" v-if="dueTimeShow" :closeOnClickOverlay="true"
+ @close="dueTimeShow = false" :show="dueTimeShow" mode="date" @confirm="dueTimeConfirm"
+ @cancel="dueTimeShow = false"></u-datetime-picker>
+
+ <!-- <view class="bottom-tools">
+ <u-button class="btn-item" color="#2CD5C0" plain style="width: 300rpx;" @click="addRentForm">再加一人</u-button>
+ <u-button class="btn-item" type="error" @click="isModelShow = true" v-if="btnControls.deleteBtn">删除
+ </u-button>
+ <u-button class="btn-item" type="success" @click="verifyConfirm" v-if="btnControls.verifyBtn">确认</u-button>
+ <u-button class="btn-item" color="linear-gradient(to right, #06B0FD, #027BFE)" @click="saveOrUpdate">
+ {{ rentId === '' ? "保存" : "确认修改" }}</u-button>
+ </view> -->
+
+ <footer-btn text="审核" @click="verifyConfirm" v-if="btnControls.verifyBtn" />
+
+ <u-modal :show="isModelShow" width="auto" :showCancelButton="true" title="提示" content="请确认是否删除当前租户信息"
+ @cancel="isModelShow = false" @confirm="deleteRent"></u-modal>
+ <u-picker v-if="isAuditShow" :closeOnClickOverlay="true" @close="isAuditShow = false" :columns="auditColumns"
+ :show="isAuditShow" @confirm="verifyConfirm" keyName="name" @cancel="isAuditShow = false"></u-picker>
+ </view>
+</template>
+
+<script>
+ import selectBus from "@/components/my-components/selectBus.vue"
+ import rentForm from '../components/rentForm.vue'
+ import uploadMixin from "@/mixin/uploadMixin";
+ import {
+ uploadFile,
+ getHouseRentInfo,
+ } from "@/api/doorplateAddress/doorplateAddress";
+ import {
+ addHouseRental,
+ updateRetalInfo,
+ deleteRentalInfo,
+ confirmHouseRental
+ } from '@/api/houseRental/houseRental.js'
+ import {
+ data
+ } from "uview-ui/libs/mixin/mixin";
+ import {
+ update
+ } from "../../../api/system/role";
+ import {
+ minioBaseUrl
+ } from '@/common/setting'
+ export default {
+ mixins: [uploadMixin],
+ components: {
+ selectBus,
+ rentForm
+ },
+ data() {
+ return {
+ currentRole: '',
+ form: {
+ relation: "",
+ rentTime: "",
+ houseTypeName: "",
+ rentalUseName: "",
+ dueTime: "",
+ fileUrls: "",
+ images: []
+ },
+ imagesList: [],
+ rules: {
+ relation: [{
+ required: true,
+ message: '请选择租客关系'
+ }],
+ houseTypeName: [{
+ required: true,
+ message: '请选择房屋状态'
+ }],
+ rentalUseName: [{
+ required: true,
+ message: '请选择房屋用途'
+ }],
+ rentTime: [{
+ required: true,
+ message: '请选择租房时间'
+ }],
+ dueTime: [{
+ required: true,
+ message: '请选择到期时间'
+ }]
+ },
+ rentTimeShow: false,
+ dueTimeShow: false,
+ rentFormNum: 1,
+ relationName: "",
+ houseTypeName: "",
+ rentalUseName: "",
+ dataList: {
+ relation: [{
+ name: "同一户",
+ value: "1"
+ },
+ {
+ name: "不同户",
+ value: "2"
+ }
+ ],
+ houseType: [{
+ name: "部分出租",
+ value: "1"
+ },
+ {
+ name: "全部出租",
+ value: "2"
+ }
+ ],
+ rentalUse: [{
+ name: "仓库",
+ value: "1"
+ },
+ {
+ name: "办公",
+ value: "2"
+ },
+ {
+ name: "商用",
+ value: "3"
+ },
+ {
+ name: "居住",
+ value: "4"
+ }
+ ]
+ },
+ isAuditShow: false,
+ auditColumns: [
+ [{
+ name: "待确认",
+ status: 0
+ },
+ {
+ name: "已确认",
+ status: 1
+ },
+ ]
+ ],
+ selectBusList: [],
+ selectBusTitle: '',
+ selectBusModel: '',
+ selectBusKey: '',
+ typeShow: false,
+ houseCode: '',
+ rentId: '',
+ auditStatus: null,
+ currentTime: Number(new Date()),
+ isModelShow: false,
+ btnControls: {
+ deleteBtn: false,
+ verifyBtn: false
+ },
+ selectDefaultIndex: {
+ rentalUse: 0,
+ relation: 0,
+ houseType: 0
+ }
+ }
+ },
+ onLoad(option) {
+ const {
+ id,
+ houseCode
+ } = option
+ this.houseCode = houseCode
+ this.currentRole = uni.getStorageSync("activeRole")
+ // 使用id来判断是不是修改
+ if (id !== void 0) {
+ this.rentId = id
+ this.getCurrentRentInfo()
+ }
+ },
+ methods: {
+ showSelectBus(data, title, model, key) {
+ this.selectBusList = data
+ this.selectBusTitle = title
+ this.selectBusModel = model
+ this.selectBusKey = key
+ this.typeShow = true
+ },
+ //类型选择确认
+ typeSelect(e) {
+ const [result] = e.value;
+ this[this.selectBusModel] = result.name
+ this.form[this.selectBusKey] = result.value
+ this.selectDefaultIndex[this.selectBusKey] = e.indexs[0];
+ this.typeShow = !this.typeShow
+ },
+ rentTimeClick() {
+ this.currentTime = Number(new Date(this.form.rentTime)) || Number(new Date())
+ this.rentTimeShow = true
+ },
+ rentTimeConfirm(e) {
+ const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
+ this.form.rentTime = time
+ this.rentTimeShow = false
+ },
+ dueTimeClick() {
+ this.currentTime = Number(new Date(this.form.dueTime)) || Number(new Date())
+ this.dueTimeShow = true
+ },
+ dueTimeConfirm(e) {
+ const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
+ this.form.dueTime = time
+ this.dueTimeShow = false
+ },
+ addRentForm() {
+ this.rentFormNum++
+ },
+ decRentForm(i) {
+ try {
+ let formData = []
+ this.$refs.rentform.forEach(vc => {
+ formData.push(vc.form)
+ })
+ formData.splice(i, 1)
+ formData.forEach((sform, i) => {
+ this.$refs.rentform[i].form = sform
+ })
+ this.rentFormNum > 1 && this.rentFormNum--
+ uni.showToast({
+ title: "删除成功",
+ icon: "success",
+ duration: 1500
+ })
+ } catch (e) {
+ uni.showToast({
+ title: "删除失败",
+ icon: "error",
+ duration: 1500
+ })
+ }
+ },
+ saveOrUpdate() {
+ this.form.houseTypeName = this.houseTypeName
+ this.form.rentalUseName = this.rentalUseName
+ this.$refs.form.validate().then(res => {
+ let rentFormValidGroup = []
+ this.$refs.rentform.forEach(item => {
+ rentFormValidGroup.push(item.$refs.refForm.validate());
+ })
+ Promise.all(rentFormValidGroup).then(result => {
+ if (this.rentId === '') {
+ this.save()
+ return
+ }
+ this.update()
+ })
+ })
+ },
+ // 新增操作
+ async save() {
+ let householdVOList = []
+ this.$refs.rentform.forEach(item => {
+ householdVOList.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)
+ let params = {
+ audit_status: this.currentRole.roleAlias === 'inhabitant' ? 0 : 1,
+ houseCode: this.houseCode,
+ tenantRelationship: this.dataList.relation[relationIndex].value,
+ rentalTime: this.form.rentTime,
+ dueTime: this.form.dueTime,
+ houseStatus: this.dataList.houseType[statusIndex].value,
+ rentalUse: this.dataList.rentalUse[rentalIndex].value,
+ fileUrls: this.form.fileUrls,
+ householdVOList,
+ roleName: uni.getStorageSync("activeRole").roleName
+ }
+ const {
+ code,
+ data
+ } = await addHouseRental(params)
+ if (code !== 200) {
+ uni.showToast({
+ title: "添加租户信息失败",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
+ uni.showToast({
+ title: "添加租户信息成功",
+ icon: "success",
+ duration: 1500,
+ success: () => {
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 1500)
+ }
+ })
+ },
+ // 确认操作
+ verify() {
+ this.isAuditShow = true
+ },
+ verifyConfirm() {
+ // const auditStatus = e.value[0].status
+
+
+
+ uni.showModal({
+ title: "提示",
+ content: "是否确认该租户?",
+ success: (res) => {
+ if (res.confirm) {
+ this.confirmRequest();
+ }
+ }
+ })
+
+
+ },
+
+ confirmRequest() {
+ confirmHouseRental({
+ id: this.rentId,
+ auditStatus: 1
+ }).then(res => {
+ const {
+ code,
+ data
+ } = res
+ if (code !== 200) {
+ this.$showTips("确认失败", 'error')
+ return
+ }
+ this.$showTips("确认成功", 'success')
+ // this.isAuditShow = false
+ this.getCurrentRentInfo()
+ })
+ },
+
+
+ // 更新操作
+ async update() {
+ let householdVOList = []
+ this.$refs.rentform.forEach(item => {
+ householdVOList.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)
+ let data = {
+ id: this.rentId,
+ houseCode: this.houseCode,
+ tenantRelationship: this.dataList.relation[relationIndex].value,
+ rentalTime: this.form.rentTime,
+ dueTime: this.form.dueTime,
+ houseStatus: this.dataList.houseType[statusIndex].value,
+ rentalUse: this.dataList.rentalUse[rentalIndex].value,
+ fileUrls: this.form.fileUrls,
+ householdVOList
+ }
+ const res = await updateRetalInfo(data)
+ 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) {
+ // const res = obj.find(item => {
+ // return item.value == value
+ // })
+ // return res.name
+
+ let data = {
+ index: "",
+ name: ""
+ }
+ for (let i = 0, ii = obj.length; i < ii; i++) {
+ if (value == obj[i].value) {
+ data.index = i;
+ data.name = obj[i].name;
+ }
+ }
+ return data;
+
+
+ },
+ // 获取租赁相关信息
+ async getCurrentRentInfo() {
+ const {
+ code,
+ data: {
+ houseRentalList
+ }
+ } = await getHouseRentInfo(this.houseCode)
+ this.auditStatus = houseRentalList[0].auditStatus
+ console.log(this.auditStatus);
+ const images = []
+ const {
+ houseStatus,
+ tenantRelationship,
+ rentalUse,
+ rentalTime,
+ dueTime,
+ householdVOList,
+ 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,
+ images: images
+ }
+ // this.rentalUseName = this.findObjValue(rentalUse, this.dataList.rentalUse)
+ // this.relationName = this.findObjValue(tenantRelationship, this.dataList.relation)
+ // this.houseTypeName = this.findObjValue(houseStatus, this.dataList.houseType)
+
+ this.rentalUseName = this.findObjValue(rentalUse, this.dataList.rentalUse).name
+ this.selectDefaultIndex.rentalUse = this.findObjValue(rentalUse, this.dataList.rentalUse).index;
+ this.relationName = this.findObjValue(tenantRelationship, this.dataList.relation).name
+ this.selectDefaultIndex.relation = this.findObjValue(tenantRelationship, this.dataList.relation).index;
+ this.houseTypeName = this.findObjValue(houseStatus, this.dataList.houseType).name
+ this.selectDefaultIndex.houseType = this.findObjValue(houseStatus, this.dataList.houseType).index
+
+ this.rentFormNum = householdVOList.length
+ this.$nextTick(() => {
+ householdVOList.forEach((item, index) => {
+ if (item.ethnicity) {
+ let obj = this.$getIndex(this.$refs.rentform[0].nationTypeList, item
+ .ethnicity,
+ "value", "name")
+ this.$refs.rentform[index].nationValue = obj.name;
+ this.$refs.rentform[index].nationTypeIndex = obj.index;
+ }
+ if (typeof(item.gender) == 'number') {
+ let obj = this.$getIndex(this.$refs.rentform[index]
+ .gender, item.gender, "value", "name")
+ this.$refs.rentform[index].genderValue = obj.name;
+ this.$refs.rentform[index].genderIndex = obj.index;
+ }
+ this.$refs.rentform[index].form = item
+ })
+ })
+ this.btnControls = {
+ deleteBtn: this.rentId !== '',
+ verifyBtn: !this.auditStatus && !!this.rentId && this.currentRole.roleAlias === 'wgy'
+ }
+ },
+ async deleteRent() {
+ const {
+ code,
+ data
+ } = await deleteRentalInfo(this.rentId)
+ if (code !== 200) {
+ uni.showToast({
+ title: "删除失败",
+ icon: "error",
+ duration: 1500
+ })
+ return
+ }
+ this.isModelShow = false
+ uni.showToast({
+ title: '删除成功',
+ icon: 'success',
+ duration: 1000,
+ complete: () => {
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 1000)
+ }
+ })
+ },
+
+ auditInfo() {
+
+
+
+ }
+
+ }
+ }
+</script>
+
+<style>
+ page {
+ background: #F5F5F5;
+ }
+</style>
+<style scoped lang="scss">
+ .container {
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ padding: 20rpx 30rpx;
+ padding-bottom: 200rpx;
+
+ .basic-info {
+ background-color: #ffffff;
+ padding: 30rpx;
+ border-radius: 8rpx;
+
+
+
+ .pic {
+
+
+ // padding: 40rpx 30rpx;
+ .title {
+ font-size: 30rpx;
+ margin: 20rpx 0;
+ }
+
+ /deep/ .u-upload__button {
+ border: 1rpx solid #EEEEEE;
+ background-color: #fff;
+ }
+ }
+ }
+
+ .rent-info {
+ .addPerson-box {
+ margin-top: 30rpx;
+ }
+
+ .rent-box {
+ padding: 30rpx;
+ background-color: #ffffff;
+ margin-top: 30rpx;
+ border-radius: 8rpx;
+
+ .box-title {
+ display: flex;
+ justify-content: space-between;
+
+ .l {
+ display: flex;
+ align-items: center;
+
+ .line {
+ width: 6rpx;
+ height: 60%;
+ margin-right: 10rpx;
+ background-color: #017BFC;
+ }
+
+ .title {
+ font-size: 30rpx;
+ font-weight: 700;
+ }
+ }
+ }
+ }
+ }
+
+
+ .btn-group {
+ padding: 30rpx;
+ position: absolute;
+ bottom: 28rpx;
+ width: calc(100% - 60rpx);
+
+ .btn {
+ margin-bottom: 30rpx;
+ }
+ }
+
+ .bottom-tools {
+ display: flex;
+ background-color: #ffffff;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: calc(100% - 40rpx);
+ // border-top: 1rpx solid #e4e4e4;
+ z-index: 999;
+ padding: 20rpx;
+ padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
+
+ /deep/ .u-button {
+ color: #ffffff;
+ font-weight: 700;
+ border: 0;
+ margin-left: 30rpx;
+
+ &:first-child {
+ margin-left: 0rpx;
+ }
+ }
+ }
+ }
+
+ /deep/ .u-form-item {
+ padding: 5rpx 20rpx;
+ border-bottom: 1px solid #eff1f3;
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/auditSite.vue b/subPackage/workbench/views/auditSite.vue
new file mode 100644
index 0000000..a9673f8
--- /dev/null
+++ b/subPackage/workbench/views/auditSite.vue
@@ -0,0 +1,319 @@
+<template>
+ <view>
+ <u-sticky>
+ <view class="bgc-ff">
+ <view class="tab">
+ <!-- <u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}"
+ :activeStyle="{color:'#017BFC'}">
+ </u-tabs> -->
+ <view class="search flex j-c-s-b a-i-c">
+ <view class="tab-filter flex j-c-c a-i-c" @click="showDateModal">
+ <text class="f-28">时间筛选</text>
+ <u-icon name="arrow-down"></u-icon>
+ </view>
+ <u-search placeholder="请输入需要查询信息的名称" v-model="keyWord" :clearabled="true" :showAction="true"
+ :animation="true" @search="searchConfirm" @clear="clearConfirm"></u-search>
+ </view>
+ </view>
+ </view>
+ </u-sticky>
+
+ <view class="list">
+ <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k"
+ @click="navTo(i.id,i.reportType,i.status,i.type)">
+ <view class="item-title flex a-i-c j-c-s-b mb-20">
+ <text class="f-32 fw">{{i.name}}</text>
+ <u-tag v-if="i.status == 4" text="待完成" type="warning" plain plainFill></u-tag>
+ <u-tag v-if="i.status == 1" text="待审批" type="warning" plain plainFill></u-tag>
+ <u-tag v-if="i.status == 2" text="审核通过" type="success" plain plainFill></u-tag>
+ <u-tag v-if="i.status == 3" text="审核拒绝" type="error" plain plainFill></u-tag>
+ </view>
+ <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">时间</text>
+ <text class="f-28 c-66">{{i.createTime}}</text>
+ </view>
+ <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">地址</text>
+ <text class="address f-28 c-66">{{i.addressName || ""}}</text>
+ </view>
+ </view>
+ </view>
+ <u-toast ref="uToast"></u-toast>
+ <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
+
+ <date-range-modal ref="dateRane" @comfirm="handleComfirmDate" @rest="handleRestDate" />
+ </view>
+</template>
+
+<script>
+ import {
+ getAuditReportingList
+ } from "@/api/reporting/reporting"
+ import dateRangeModal from '@/components/dateRangeModal/modal.vue';
+ export default {
+ components: {
+ dateRangeModal
+ },
+ data() {
+ return {
+ tabList: [
+
+ {
+ name: "全部",
+ status: "",
+ },
+ {
+ name: "待完成",
+ status: 4,
+ },
+ {
+ name: "待审核",
+ status: 1
+ },
+ {
+ name: "审核通过",
+ status: 2
+ },
+ {
+ name: "已拒绝",
+ status: 3
+ }
+ ],
+ tabIndex: 1,
+ currentStatus: 4,
+ list: [],
+ loadingStatus: 'nomore',
+ currentPage: 1,
+ frequency: '',
+ reportType: "",
+ selectDate: [],
+ houseCode: "",
+ keyword: ""
+ }
+ },
+
+ onLoad(option) {
+ console.log(option);
+ if (option.reportType) {
+ this.reportType = option.reportType;
+ uni.setNavigationBarTitle({
+ title: "取保候审"
+ })
+ }
+ if (option.from == "index") {
+ uni.setNavigationBarTitle({
+ title: "场所任务"
+ })
+ }
+ if (option.from == "task") {
+ this.tabIndex = 1;
+ this.currentStatus = 1;
+ }
+ if (option.code) {
+ this.houseCode = option.code;
+ }
+ // this.getList()
+ },
+
+ onShow() {
+ this.resetParams();
+ this.getList()
+ },
+
+ onReachBottom() {
+ this.currentPage++
+ this.getList()
+ },
+
+ methods: {
+ searchConfirm() {
+ this.resetParams()
+ this.getList()
+ },
+ clearConfirm() {
+ this.keyWord = ''
+ this.searchConfirm()
+ },
+ changeTab(e) {
+ this.tabIndex = e.index;
+ this.currentStatus = e.status;
+ this.resetParams();
+ this.getList();
+ },
+ resetParams() {
+ this.list = [];
+ this.currentPage = 1;
+ },
+ getList() {
+ this.$nextTick(() => {
+ this.loadingStatus = 'loadingmore'
+ this.$refs.uToast.show({
+ type: 'loading',
+ message: '正在加载',
+ duration: 9999999
+ })
+ })
+ let params = {
+ current: this.currentPage,
+ size: 20,
+ status: this.currentStatus,
+ frequency: this.frequency
+ }
+ if (this.selectDate.length) {
+ params.startTime = this.selectDate[0]
+ params.endTime = this.selectDate[1]
+ }
+ if (this.houseCode) {
+ params.houseCode = this.houseCode;
+ }
+
+ if (this.reportType) {
+ params.reportType = this.reportType
+ }
+ if (this.keyword) {
+ params.name = this.keyword;
+ }
+
+ getAuditReportingList(params).then(res => {
+ if (res.code != 200) {
+ uni.showToast({
+ title: '数据请求失败',
+ icon: 'error'
+ })
+ return
+ }
+ let records = res.data.records;
+ this.list = [...this.list, ...records]
+ this.$nextTick(() => {
+ this.$refs.uToast.isShow = false
+ })
+ this.loadingStatus = 'nomore'
+ })
+ },
+ navTo(id, reportType, status, type) {
+ if (status == 4) {
+ if (reportType == 8) {
+ this.navToDetail(reportType, id, type)
+ } else {
+ if (uni.getStorageSync("activeRole").roleName == "民警") {
+ this.navToDetail(reportType, id, type)
+ } else {
+ this.navToEdit(reportType, id, type);
+ }
+ }
+ } else {
+ this.navToDetail(reportType, id, type)
+ }
+ },
+
+ navToEdit(reportType, id, type) {
+ // if (reportType == 1) {
+ // this.$u.func.globalNavigator(`/subPackage/label/bail?id=${id}`)
+ // } else if (reportType == 2 || type == 7) {
+ // this.$u.func.globalNavigator(`/subPackage/label/hotel?id=${id}`)
+ // } else if (reportType == 3 || reportType == 4 || reportType == 5) {
+ // this.$u.func.globalNavigator(`/subPackage/label/form?id=${id}`)
+ // } else if (reportType == 6) {
+ // this.$u.func.globalNavigator(`/subPackage/label/school?id=${id}`)
+ // }
+
+ if (reportType == 1) {
+ this.$u.func.globalNavigator(`/subPackage/label/bail?id=${id}`)
+ } else if (reportType == 2) {
+ this.$u.func.globalNavigator(`/subPackage/label/check?id=${id}`)
+ } else if (reportType == 5) {
+ this.$u.func.globalNavigator(`/subPackage/label/form?id=${id}`)
+ }
+ },
+
+ navToDetail(reportType, id, type) {
+ // if (reportType == 1) {
+ // this.$u.func.globalNavigator(`bailReportDetail?id=${id}`)
+ // } else if (reportType == 2 || type == 7) {
+ // this.$u.func.globalNavigator(`hotelReportDetail?id=${id}`)
+ // } else if (reportType == 3 || reportType == 4 || reportType == 5) {
+ // this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
+ // } else if (reportType == 6) {
+ // this.$u.func.globalNavigator(`schoolReportDetail?id=${id}`)
+ // } else {
+ // this.$u.func.globalNavigator(`checkReform?id=${id}`)
+ // }
+
+ if (reportType == 1) {
+ this.$u.func.globalNavigator(`bailReportDetail?id=${id}`)
+ } else if (reportType == 2) {
+ this.$u.func.globalNavigator(`selfCheckDetail?id=${id}`)
+ } else if (reportType == 5) {
+ this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
+ } else {
+ this.$u.func.globalNavigator(`checkReform?id=${id}`)
+ }
+
+
+ },
+
+ showDateModal() {
+ this.$refs.dateRane.open();
+ },
+
+ handleRestDate() {
+ this.selectDate = [];
+ this.resetParams();
+ this.getList()
+ },
+ handleComfirmDate(val) {
+ this.selectDate = val;
+ this.resetParams();
+ this.getList()
+ }
+
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #F5F5F5;
+ }
+
+
+
+ .tab {
+ // width: 100%;
+
+ }
+
+ .search {
+ padding: 20rpx 20rpx;
+ }
+
+ // .tab /deep/.u-tabs__wrapper__nav__item {
+ // flex: 1;
+ // }
+ .tab-filter {
+ padding: 0 20rpx;
+ }
+
+ .list {
+ margin: 20rpx 30rpx 0;
+ }
+
+ .list-item {
+ padding: 0 30rpx 20rpx;
+ border-radius: 8rpx;
+
+ .item-title {
+ padding: 30rpx 0;
+ border-bottom: 1px solid #F5F5F5;
+ }
+
+ .item-row {
+ padding: 10rpx 0;
+
+ .address {
+ width: 65%;
+ text-align: right;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/cscj.vue b/subPackage/workbench/views/cscj.vue
index 947fb53..09aa3ca 100644
--- a/subPackage/workbench/views/cscj.vue
+++ b/subPackage/workbench/views/cscj.vue
@@ -2,6 +2,15 @@
<view class="container">
<view class="wrap">
<u-form labelWidth="70" :model="form" :rules="rules" ref="form">
+
+ <view class="top item flex j-c-s-b a-i-c" @click="onScan()" v-if="!currentId">
+ <view class="flex a-i-c">
+ <u-icon name="/static/icon/nav-05.png" width="90rpx" height="90rpx"></u-icon>
+ <text class="f-28 ml-10">扫码获取信息</text>
+ </view>
+ <u-icon name="arrow-right" size="20"></u-icon>
+ </view>
+
<view class="item">
<!-- u-form-item v-if="!currentId" @click="showPicker = true" class="form-item" labelWidth="100" label="楼栋:"
:required="isRequired" :disabled="isDisabled" prop="buildingCode">
@@ -81,6 +90,17 @@
</u-form-item>
+ <u-form-item label="三级消防单位" labelWidth="100" prop="threeFireProtection" :required="isRequired">
+ <u-radio-group v-model="form.threeFireProtection" v-if="!currentId">
+ <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList"
+ :key="index" :label="item.name" :name="item.id">
+ </u-radio>
+ </u-radio-group>
+ <view class="f-30" v-if="currentId">
+ {{form.threeFireProtection == 1?"否":"是"}}
+ </view>
+ </u-form-item>
+
<u-form-item class="form-item" labelWidth="100" label="备注:" prop="remark">
<u--input v-if="!currentId" border="none" v-model="form.remark" placeholder="请输入">
</u--input>
@@ -99,7 +119,7 @@
请选择地址
</view>
<view class="location-btn c-main f-24" @click="getLocation()"
- v-if="(!currentId && !isView) || (isView && !form.jwd)">
+ v-if="source == 3 || ((!currentId && !isView) || (isView && !form.jwd))">
获取地址
</view>
</view>
@@ -111,9 +131,43 @@
</view>
</u-form-item>
+ <u-form-item v-if="!currentId" label="负责人信息和法人信息是否一致" labelWidth="100" :required="isRequired">
+ <u-radio-group v-model="isLegalSame">
+ <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList"
+ :key="index" :label="item.name" :name="item.id">
+ </u-radio>
+ </u-radio-group>
+ <!-- <view class="f-30" v-if="currentId">
+ {{form.threeFireProtection == 1?"是":"否"}}
+ </view> -->
+ </u-form-item>
+
</view>
+
<view class="item">
+ <view class="box-title">
+ <box-title title="法人信息"></box-title>
+ </view>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="姓名:" prop="legalPerson">
+ <u--input border="none" v-model="form.placeExtEntity.legalPerson" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="身份证号:" prop="legalIdCard">
+ <u--input border="none" type="idcard" v-model="form.placeExtEntity.legalIdCard"
+ placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="手机号:" prop="legalTel">
+ <u--input border="none" type="number" v-model="form.placeExtEntity.legalTel" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ </view>
+
+ <view class="item" v-if="isLegalSame != 1 && !currentId">
<view class="box-title">
<box-title title="负责人信息"></box-title>
</view>
@@ -134,6 +188,38 @@
</u-form-item>
</view>
+
+ <view class="item">
+ <view class="box-title">
+ <box-title title="房东信息"></box-title>
+ </view>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="姓名:" prop="landlordName">
+ <u--input border="none" v-model="form.placeExtEntity.landlordName" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="身份证号:" prop="landlordIdCard">
+ <u--input border="none" type="idcard" v-model="form.placeExtEntity.landlordIdCard"
+ placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="手机号:" prop="landlordPhone">
+ <u--input border="none" type="number" v-model="form.placeExtEntity.landlordPhone"
+ placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="微信号:" prop="landlordWxAccount">
+ <u--input border="none" v-model="form.placeExtEntity.landlordWxAccount" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ </view>
+
+
+
+
<view class="item pic" v-if="(currentId && form.images.length) || !currentId ">
<view class="box-title">
<box-title title="场所照片"></box-title>
@@ -147,6 +233,27 @@
</view>
</u-form>
+
+ <view class="practitioner">
+ <view style="padding:20rpx 30rpx;">
+ <box-title title="从业人员信息"></box-title>
+ </view>
+ <view class="info" v-for="(item, index) in personNumArr" :key="index">
+ <view class="flex a-i-c j-c-s-b" style="padding:20rpx;">
+ <view class="title fw" style="text-align:center;">人员信息-#{{ index*1 + 1 }}</view>
+ <view>
+ <u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" />
+ </view>
+ </view>
+ <formItem ref="formItemRef"></formItem>
+ </view>
+ <view class="" style="padding:20rpx 0;" v-if="personNum == 0 && currentId">
+ 未完善
+ </view>
+ <view class="add-person" style="padding:20rpx 30rpx;" v-if="!currentId">
+ <u-button type="success" plain @click="addPerson">再加一人</u-button>
+ </view>
+ </view>
@@ -224,6 +331,16 @@
<u-picker :show="isShowCatePicker" :defaultIndex="categoryIndex" ref="catePicker" keyName="categoryName"
:columns="categoryList" @confirm="confirmCategory" @change="changeCategory"
@cancel="isShowCatePicker = false"></u-picker>
+
+
+ <u-picker :defaultIndex="nationTypeListIndex" :closeOnClickOverlay="true" :show="showNationPicker"
+ :columns="[nationTypeList]" @close="showNationPicker = false" @cancel="showNationPicker = false"
+ keyName="name" @confirm="confirmNation"></u-picker>
+
+ <u-picker :defaultIndex="genderIndex" :closeOnClickOverlay="true" :show="showGenderPicker" :columns="[gender]"
+ @close="showGenderPicker = false" @cancel="showGenderPicker = false" keyName="name"
+ @confirm="confirmGender"></u-picker>
+
<cate-selector ref="selector" @comfirm="comfirmNineType" />
</view>
</template>
@@ -239,10 +356,8 @@
getDoorplateAddressList
} from "@/api/doorplateAddress/doorplateAddress";
import {
+ add,
getPlaceDetail
- } from '@/api/place/place.js'
- import {
- add
} from "@/api/place/place";
import {
format
@@ -258,12 +373,18 @@
import cateSelector from "../components/cateSelector.vue"
+ import {
+ getQrCodeDetail
+ } from "@/api/system/index"
+
+ import formItem from '../components/formItem.vue'
export default {
mixins: [uploadMixin],
components: {
lineItem,
boxTitle,
- cateSelector
+ cateSelector,
+ formItem
},
data() {
return {
@@ -293,7 +414,19 @@
isNine: "",
isFront: "",
frontType: "",
- nineType: ""
+ nineType: "",
+ threeFireProtection: "",
+ placeExtEntity: {
+ landlordName: "",
+ landlordIdCard: "",
+ landlordPhone: "",
+ landlordWxAccount: "",
+ legalPerson: "",
+ legalTel: "",
+ legalIdCard: "",
+ placeId: "",
+
+ }
},
rules: {
// 'buildingCode': {
@@ -327,7 +460,7 @@
trigger: ['blur', 'change'],
},
'form.principalPhone': [{
- required: false,
+ required: true,
message: '请输入手机号',
trigger: ['blur', 'change'],
},
@@ -501,14 +634,31 @@
showFrontTypePicker: false,
nineTypeValue: "",
frontTypeValue: "",
- isView: false
+ isView: false,
+ source: "",
-
+ nationTypeList: [], //民族
+ nationTypeIndex: [0],
+ nationValue: "",
+ gender: [{ //性别
+ value: 1,
+ name: '男',
+ },
+ {
+ value: 0,
+ name: '女',
+ }
+ ],
+ genderIndex: [0],
+ genderValue: "",
+ showNationPicker: false,
+ showGenderPicker: false,
+ personNum: 0,
+ personNumArr: [],
+ isLegalSame: 1 //法人信息是否与负责人一致 1是 2否
}
},
- created() {
- this.buildColumn()
- },
+
options: {
styleIsolation: 'shared', // 解除样式隔离
},
@@ -556,71 +706,20 @@
},
immediate: true
}
-
- // secondId:{
- // handler(newVal,oldVal){
- // this.getCategory(3,this.secondId);
- // },
- // immediate:true
- // }
-
},
onReady() {
this.$refs.form.setRules(this.rules)
},
methods: {
- // getBuildingDetail(params = {}) {
- // getDoorplateAddressDetail(Object.assign(params, {
- // stdId: this.stdId
- // })).then(res => {
- // let data = res.data
- // this.form.buildingCode = data.buildingCode
-
- // let buildingNameArr = [data.townStreetName, data.neiName, data.streetRuName, data.aoiName,
- // data.buildingName
- // ]
- // let arr = buildingNameArr.filter(e => {
- // return e != null || e != ''
- // })
-
- // // 赋值
- // // this.form.placeName = data['placeName']
- // Object.keys(this.form).forEach(key => {
- // if (!data[key]) {
- // this.form[key] = data.place[key]
- // } else {
- // this.form[key] = data[key]
- // }
- // })
-
- // 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] || '未完善'
- // }
- // })
- // })
- // })
- // },
-
async getAllBizDict() {
// 获取九小场所类型
// await this.getBizDict('nineType', this.nineTypeList)
// 获取阵地
await this.getBizDict('frontType', this.frontTypeList)
+ // 获取民族
+ await this.getBizDict('nationType', this.nationTypeList);
},
// 获取业务字典
@@ -712,18 +811,11 @@
// picker为选择器this实例,变化第二列对应的选项
// picker.setColumnValues(1, this.categoryList[index])
this.firstId = e.value[columnIndex].categoryNo;
- // this.secondId = this.categoryList[1][0].categoryNo;
- // this.getCategory(2,this.firstId);
}
- // else if ( columnIndex === 1){
- // picker.setColumnValues(2, this.categoryList[index])
- // this.secondId = e.value[columnIndex].categoryNo;
- // this.getCategory(3,this.secondId)
- // }
+
},
getBuildingDetail(params = {}) {
-
let idorCodeParams = {}
if (this.houseCode) {
idorCodeParams = {
@@ -757,6 +849,10 @@
})
return
}
+ const placePractitioner = data?.placePractitioner || []
+ this.personNum = placePractitioner.length;
+ this.personNumArr = placePractitioner;
+ this.source = data.source;
// this.houseCode = data.houseCode;
const dpaEntity = data?.doorplateAddressEntity || {}
const gridEntity = data?.grid || {}
@@ -830,6 +926,28 @@
}
}
}
+
+ if (key == "legalGender" && data.legalGender) {
+ let {
+ index,
+ name
+ } = this.$getIndex(this.gender, data.legalGender, "value",
+ "name");
+ this.genderIndex = index;
+ this.genderValue = name;
+ }
+
+ if (key == "ethnicity" && data.ethnicity) {
+ let {
+ index,
+ name
+ } = this.$getIndex(this.nationTypeList, data.ethnicity, "value",
+ "name");
+ this.nationTypeIndex = index;
+ this.nationValue = name;
+ }
+
+
})
this.$set(this.form, "jwd", `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`)
this.form.building = arr.join("")
@@ -871,6 +989,31 @@
} else {
item.value = data[item.name] || '未完善'
}
+ })
+ })
+
+ placePractitioner.forEach((item, index) => {
+ this.$nextTick(() => {
+ if (item.ethnicity) {
+ let obj = this.$getIndex(this.nationTypeList, item.ethnicity,
+ "value", "name")
+ this.$refs.formItemRef[index].nationValue = obj.name;
+ this.$refs.formItemRef[index].nationTypeIndex = obj.index;
+ }
+
+ if (typeof(item.gender) == 'number') {
+ let obj = this.$getIndex(this.$refs.formItemRef[index]
+ .gender, item.gender, "value", "name")
+ this.$refs.formItemRef[index].genderValue = obj.name;
+ this.$refs.formItemRef[index].genderIndex = obj.index;
+ }
+ if (item.employerImg == "" || item.employerImg == null) {
+ item.employerImg = [];
+ } else {
+ item.employerImg = this.$setImageUrl(item.employerImg, 2)
+ }
+
+ this.$refs.formItemRef[index].form = item
})
})
})
@@ -938,6 +1081,22 @@
this.form.lng = Number(this.form.lng).toFixed(8)
this.form.lat = Number(this.form.lat).toFixed(8)
delete this.form.images;
+ if (this.personNum > 0) {
+ const placePractitioner = []
+ this.$refs.formItemRef.forEach(item => {
+ item.form.placeId = this.form.placeId
+ item.form.employerImg = this.$formattingUrls(item.form.employerImg);
+ placePractitioner.push(item.form)
+ })
+ this.form.placePractitioner = placePractitioner
+ }
+
+ if (this.isLegalSame == 1) {
+ this.form.principal = this.form.placeExtEntity.legalPerson;
+ this.form.principalPhone = this.form.placeExtEntity.legalTel;
+ this.form.principalIdCard = this.form.placeExtEntity.legalIdCard;
+ }
+
add(this.form).then(res => {
uni.showToast({
icon: 'success',
@@ -956,28 +1115,6 @@
// })
},
- async buildColumn() {
-
- //设置街道
- const townStreet = await this.getDoorplateAddressList(null, "townStreet")
- this.setColumn(townStreet, 0)
- //设置社区
- const nei = await this.getDoorplateAddressList(townStreet[0]?.code, "nei")
- this.setColumn(nei, 1)
- //设置路
- const streetRu = await this.getDoorplateAddressList(nei[0]?.code, "streetRu")
- this.setColumn(streetRu, 2)
- //设置地区
- const district = await this.getDoorplateAddressList(streetRu[0]?.code, "district")
- this.setColumn(district, 3)
- //设置楼栋
- const building = await this.getDoorplateAddressList(district[0]?.code, "building")
- this.setColumn(building, 4)
- },
-
- setColumn(data, index) {
- this.$set(this.pickColumns, index, data)
- },
//获取当前位置信息
getCurrentLocation() {
@@ -986,7 +1123,6 @@
success: (res) => {
// var latitude = res.latitude; // 维度
// var longitude = res.longitude; // 经度
-
// this.form.lng = longitude
// this.form.lat = latitude
// this.form.jwd =
@@ -1051,56 +1187,22 @@
this.showFrontTypePicker = false;
},
- async changeHandler(e) {
- const {
- columnIndex,
- index,
- // 微信小程序无法将picker实例传出来,只能通过ref操作
- picker = this.$refs.uPicker
- } = e
- let item = e.values[columnIndex][index]
- //街道
- if (columnIndex === 0) {
- //获取社区列表
- const nei = await this.getDoorplateAddressList(item.code, "nei")
- picker.setColumnValues(1, nei)
-
- const streetRu = await this.getDoorplateAddressList(nei[0].code, "streetRu")
- picker.setColumnValues(2, streetRu)
-
- const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
- picker.setColumnValues(3, district)
-
- const building = await this.getDoorplateAddressList(district[0].code, "building")
- picker.setColumnValues(4, building)
- }
-
- if (columnIndex === 1) {
- const streetRu = await this.getDoorplateAddressList(item.code, "streetRu")
- picker.setColumnValues(2, streetRu)
-
- const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
- picker.setColumnValues(3, district)
-
- const building = await this.getDoorplateAddressList(district[0].code, "building")
- picker.setColumnValues(4, building)
- }
-
- if (columnIndex === 2) {
-
- const district = await this.getDoorplateAddressList(item.code, "district")
- picker.setColumnValues(3, district)
-
- const building = await this.getDoorplateAddressList(district[0].code, "building")
- picker.setColumnValues(4, building)
- }
-
- if (columnIndex === 3) {
- const building = await this.getDoorplateAddressList(item.code, "building")
- picker.setColumnValues(4, building)
- }
-
+ //选择民族
+ confirmNation(e) {
+ this.nationIndex = e.indexs;
+ this.nationValue = e.value[0].name;
+ this.form.ethnicity = e.value[0].value;
+ this.showNationPicker = false;
},
+
+ //选择性别
+ confirmGender(e) {
+ this.genderIndex = e.indexs;
+ this.genderValue = e.value[0].name;
+ this.form.legalGender = e.value[0].value;
+ this.showGenderPicker = false;
+ },
+
//弹出层打开
popup() {
@@ -1115,6 +1217,58 @@
urls: minioBaseUrl + [value],
})
},
+
+ onScan() {
+ uni.scanCode({
+ success: (res) => {
+ let obj = this.getUrlParams(res.result);
+ this.getHouseType(obj.stdId);
+ }
+ })
+ },
+
+ getUrlParams(url) {
+ let urlStr = url.split('?')[1]
+ let obj = {};
+ let paramsArr = urlStr.split('&')
+ for (let i = 0, len = paramsArr.length; i < len; i++) {
+ let arr = paramsArr[i].split('=')
+ obj[arr[0]] = arr[1];
+ }
+ return obj
+ },
+
+ getHouseType(code) {
+ getQrCodeDetail({
+ roleName: uni.getStorageSync("activeRole").roleName,
+ addressCode: code
+ }).then(res => {
+ let {
+ isJur,
+ doorplateType,
+ addressLevel
+ } = res.data;
+ if ((doorplateType == "中门牌" && addressLevel != 4) || doorplateType == "小门牌") {
+ if (res.data.addressType) {
+ this.addressType = res.data.addressType
+ }
+ this.houseCode = code;
+ this.form.houseCode = code;
+ this.isView = true;
+ this.getBuildingDetail()
+ }
+ })
+ },
+
+ addPerson() {
+ this.personNum++
+ this.personNumArr.push(1)
+ },
+
+ deletePerson(index) {
+ this.personNum--;
+ this.personNumArr.splice(index, 1)
+ }
}
}
</script>
@@ -1251,4 +1405,14 @@
background-color: #fff;
text-align: center;
}
+
+ .top {
+ padding: 20rpx !important;
+ }
+
+ .practitioner {
+ background-color: #fff;
+ border-radius: 8rpx;
+ margin-top: 20rpx;
+ }
</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/cshw.vue b/subPackage/workbench/views/cshw.vue
index a2bcb47..20a86fa 100644
--- a/subPackage/workbench/views/cshw.vue
+++ b/subPackage/workbench/views/cshw.vue
@@ -100,6 +100,7 @@
clickInfo: {},
currentRole: {},
selectDate: [],
+ type: ""
}
},
@@ -112,6 +113,11 @@
if (option.placeId) {
this.pagingParams.placeId = option.placeId
}
+ if (option.type) {
+ this.type = option.type;
+ }
+
+
},
onShow() {
@@ -215,7 +221,12 @@
if (roleAlias === "inhabitant") {
return
}
- this.$u.func.globalNavigator(`/subPackage/workbench/views/examine?id=${id}&placeId=${placeId}`)
+ if (this.type) {
+ this.$u.func.globalNavigator(
+ `/subPackage/workbench/views/examine?id=${id}&placeId=${placeId}&type=${this.type}`)
+ } else {
+ this.$u.func.globalNavigator(`/subPackage/workbench/views/examine?id=${id}&placeId=${placeId}`)
+ }
},
handleRestDate() {
diff --git a/subPackage/workbench/views/editCscj.vue b/subPackage/workbench/views/editCscj.vue
index 4896d91..d5749ef 100644
--- a/subPackage/workbench/views/editCscj.vue
+++ b/subPackage/workbench/views/editCscj.vue
@@ -71,10 +71,22 @@
@close="delTag()" :text="item.categoryName"></u-tag>
</view>
</view> -->
+
+ <u-form-item label="三级消防单位" labelWidth="100" prop="threeFireProtection" :required="isRequired">
+ <u-radio-group v-model="form.threeFireProtection" v-if="!currentId">
+ <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in statusList"
+ :key="index" :label="item.name" :name="item.id">
+ </u-radio>
+ </u-radio-group>
+ <view class="f-30" v-if="currentId">
+ {{form.threeFireProtection == 1?"否":"是"}}
+ </view>
+ </u-form-item>
<u-form-item class="form-item" labelWidth="100" label="备注:" prop="remark">
<u--input border="none" v-model="form.remark" placeholder="请输入">
</u--input>
</u-form-item>
+
<u-form-item label="经纬度:" prop="location" labelWidth="100">
<view class="address-row flex j-c-s-b a-i-c">
@@ -96,6 +108,28 @@
</view>
</u-form-item>
+ </view>
+ <view class="item">
+ <view class="box-title">
+ <box-title title="法人信息"></box-title>
+ </view>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="姓名:" prop="legalPerson">
+ <u--input border="none" v-model="form.placeExtEntity.legalPerson" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="身份证号:" prop="legalIdCard">
+ <u--input border="none" type="idcard" v-model="form.placeExtEntity.legalIdCard"
+ placeholder="请输入">
+ </u--input>
+ </u-form-item>
+
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="手机号:" prop="legalTel">
+ <u--input border="none" type="number" v-model="form.placeExtEntity.legalTel" placeholder="请输入">
+ </u--input>
+ </u-form-item>
</view>
<view class="item">
@@ -119,6 +153,38 @@
</u-form-item>
</view>
+
+ <view class="item">
+ <view class="box-title">
+ <box-title title="房东信息"></box-title>
+ </view>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="姓名:" prop="landlordName">
+ <u--input border="none" v-model="form.placeExtEntity.landlordName" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="身份证号:" prop="landlordIdCard">
+ <u--input border="none" type="idcard" v-model="form.placeExtEntity.landlordIdCard"
+ placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="手机号:" prop="landlordPhone">
+ <u--input border="none" type="number" v-model="form.placeExtEntity.landlordPhone"
+ placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="微信号:" prop="landlordWxAccount">
+ <u--input border="none" v-model="form.placeExtEntity.landlordWxAccount" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ </view>
+
+
+
+
<view class="item pic">
<view class="box-title">
<box-title title="场所照片"></box-title>
@@ -130,6 +196,87 @@
</u-upload>
</view>
</u-form>
+
+ <view class="practitioner">
+ <view style="padding:20rpx 30rpx;">
+ <box-title title="从业人员信息"></box-title>
+ </view>
+ <view class="info" v-for="(item, index) in personNumArr" :key="index">
+ <view class="flex a-i-c j-c-s-b" style="padding:20rpx;">
+ <view class="title fw" style="text-align:center;">人员信息-#{{ index*1 + 1 }}</view>
+ <view>
+ <u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" />
+ </view>
+ </view>
+ <formItem ref="formItemRef"></formItem>
+ </view>
+
+ <view class="add-person" style="padding:20rpx 30rpx;">
+ <u-button type="success" plain @click="addPerson">再加一人</u-button>
+ </view>
+ </view>
+
+
+
+ <view class="item" v-if="currentId">
+ <view class="box-title">
+ <box-title title="综治网格">
+ <template slot="titleMore">
+ <view class="title-more">
+ <view class="red item"></view>
+ <view class="orange item"></view>
+ <view class="green item"></view>
+ </view>
+ </template>
+ </box-title>
+ </view>
+ <lineItem :dataInfo="comprehensiveData.basic">
+ </lineItem>
+ <!-- <view class="bgc-ff flex j-c-s-b a-i-c" @click="navTo(1)" style="padding:20rpx;">
+ <text>历史事件</text>
+ <u-icon name="arrow-right"></u-icon>
+ </view> -->
+
+ <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>
+ <view class="" v-else>
+ {{scope.value}}
+ </view>
+ </template>
+ </lineItem>
+ </view>
+
+
+
+ <view class="item" v-if="currentId">
+ <view class="box-title">
+ <box-title title="公安网格">
+ <template slot="titleMore">
+ <view class="title-more">
+ <view class="red item"></view>
+ <view class="orange item"></view>
+ <view class="green item"></view>
+ </view>
+ </template>
+ </box-title>
+ </view>
+ <lineItem :dataInfo="publicData.basic">
+ </lineItem>
+ <!-- <view class="bgc-ff flex j-c-s-b a-i-c" @click="navTo(2)" style="padding:20rpx;">
+ <text>历史事件</text>
+ <u-icon name="arrow-right"></u-icon>
+ </view> -->
+
+ <lineItem :dataInfo="publicData.scene">
+ <template v-slot:pic="{scope}">
+ {{scope.value}}
+ </template>
+ </lineItem>
+ </view>
</view>
<footer-btn @click="submit" text="保存" />
@@ -148,6 +295,16 @@
<u-picker :show="isShowCatePicker" :defaultIndex="categoryIndex" ref="catePicker" keyName="categoryName"
:columns="categoryList" @confirm="confirmCategory" @change="changeCategory"
@cancel="isShowCatePicker = false"></u-picker>
+
+
+ <u-picker :defaultIndex="nationTypeListIndex" :closeOnClickOverlay="true" :show="showNationPicker"
+ :columns="[nationTypeList]" @close="showNationPicker = false" @cancel="showNationPicker = false"
+ keyName="name" @confirm="confirmNation"></u-picker>
+
+ <u-picker :defaultIndex="genderIndex" :closeOnClickOverlay="true" :show="showGenderPicker" :columns="[gender]"
+ @close="showGenderPicker = false" @cancel="showGenderPicker = false" keyName="name"
+ @confirm="confirmGender"></u-picker>
+
<cate-selector ref="selector" @comfirm="comfirmNineType" />
</view>
</template>
@@ -163,10 +320,8 @@
getDoorplateAddressList
} from "@/api/doorplateAddress/doorplateAddress";
import {
+ add,
getPlaceDetail
- } from '@/api/place/place.js'
- import {
- add
} from "@/api/place/place";
import {
format
@@ -182,12 +337,18 @@
import cateSelector from "../components/cateSelector.vue"
+ import {
+ getQrCodeDetail
+ } from "@/api/system/index"
+
+ import formItem from '../components/formItem.vue'
export default {
mixins: [uploadMixin],
components: {
lineItem,
boxTitle,
- cateSelector
+ cateSelector,
+ formItem
},
data() {
return {
@@ -217,7 +378,19 @@
isNine: "",
isFront: "",
frontType: "",
- nineType: ""
+ nineType: "",
+ threeFireProtection: "",
+ placeExtEntity: {
+ landlordName: "",
+ landlordIdCard: "",
+ landlordPhone: "",
+ landlordWxAccount: "",
+ legalPerson: "",
+ legalTel: "",
+ legalIdCard: "",
+ placeId: "",
+
+ }
},
rules: {
// 'buildingCode': {
@@ -425,13 +598,27 @@
showFrontTypePicker: false,
nineTypeValue: "",
frontTypeValue: "",
- isView: false
+ isView: false,
-
+ nationTypeList: [], //民族
+ nationTypeIndex: [0],
+ nationValue: "",
+ gender: [{ //性别
+ value: 1,
+ name: '男',
+ },
+ {
+ value: 0,
+ name: '女',
+ }
+ ],
+ genderIndex: [0],
+ genderValue: "",
+ showNationPicker: false,
+ showGenderPicker: false,
+ personNum: 0,
+ personNumArr: [],
}
- },
- created() {
- this.buildColumn()
},
options: {
styleIsolation: 'shared', // 解除样式隔离
@@ -472,71 +659,20 @@
},
immediate: true
}
-
- // secondId:{
- // handler(newVal,oldVal){
- // this.getCategory(3,this.secondId);
- // },
- // immediate:true
- // }
-
},
onReady() {
this.$refs.form.setRules(this.rules)
},
methods: {
- // getBuildingDetail(params = {}) {
- // getDoorplateAddressDetail(Object.assign(params, {
- // stdId: this.stdId
- // })).then(res => {
- // let data = res.data
- // this.form.buildingCode = data.buildingCode
-
- // let buildingNameArr = [data.townStreetName, data.neiName, data.streetRuName, data.aoiName,
- // data.buildingName
- // ]
- // let arr = buildingNameArr.filter(e => {
- // return e != null || e != ''
- // })
-
- // // 赋值
- // // this.form.placeName = data['placeName']
- // Object.keys(this.form).forEach(key => {
- // if (!data[key]) {
- // this.form[key] = data.place[key]
- // } else {
- // this.form[key] = data[key]
- // }
- // })
-
- // 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] || '未完善'
- // }
- // })
- // })
- // })
- // },
-
async getAllBizDict() {
// 获取九小场所类型
// await this.getBizDict('nineType', this.nineTypeList)
// 获取阵地
await this.getBizDict('frontType', this.frontTypeList)
+ // 获取民族
+ await this.getBizDict('nationType', this.nationTypeList);
},
// 获取业务字典
@@ -625,17 +761,10 @@
// 当第一列值发生变化时,变化第二列(后一列)对应的选项
if (columnIndex === 0) {
- // picker为选择器this实例,变化第二列对应的选项
- // picker.setColumnValues(1, this.categoryList[index])
+
this.firstId = e.value[columnIndex].categoryNo;
- // this.secondId = this.categoryList[1][0].categoryNo;
- // this.getCategory(2,this.firstId);
}
- // else if ( columnIndex === 1){
- // picker.setColumnValues(2, this.categoryList[index])
- // this.secondId = e.value[columnIndex].categoryNo;
- // this.getCategory(3,this.secondId)
- // }
+
},
getBuildingDetail(params = {}) {
@@ -672,7 +801,11 @@
})
return
}
- this.houseCode = data.houseCode;
+ const placePractitioner = data?.placePractitioner || []
+ this.personNum = placePractitioner.length
+ this.personNumArr = placePractitioner;
+ this.source = data.source;
+ // this.houseCode = data.houseCode;
const dpaEntity = data?.doorplateAddressEntity || {}
const gridEntity = data?.grid || {}
// this.form.buildingCode = dpaEntity?.buildingCode || ''
@@ -745,6 +878,28 @@
}
}
}
+
+ if (key == "legalGender" && data.legalGender) {
+ let {
+ index,
+ name
+ } = this.$getIndex(this.gender, data.legalGender, "value",
+ "name");
+ this.genderIndex = index;
+ this.genderValue = name;
+ }
+
+ if (key == "ethnicity" && data.ethnicity) {
+ let {
+ index,
+ name
+ } = this.$getIndex(this.nationTypeList, data.ethnicity, "value",
+ "name");
+ this.nationTypeIndex = index;
+ this.nationValue = name;
+ }
+
+
})
this.$set(this.form, "jwd", `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`)
this.form.building = arr.join("")
@@ -789,6 +944,30 @@
})
})
+ placePractitioner.forEach((item, index) => {
+ this.$nextTick(() => {
+ if (item.ethnicity) {
+ let obj = this.$getIndex(this.nationTypeList, item.ethnicity,
+ "value", "name")
+ this.$refs.formItemRef[index].nationValue = obj.name;
+ this.$refs.formItemRef[index].nationTypeIndex = obj.index;
+ }
+
+ if (typeof(item.gender) == 'number') {
+ let obj = this.$getIndex(this.$refs.formItemRef[index]
+ .gender, item.gender, "value", "name")
+ this.$refs.formItemRef[index].genderValue = obj.name;
+ this.$refs.formItemRef[index].genderIndex = obj.index;
+ }
+ if (item.employerImg == "" || item.employerImg == null) {
+ item.employerImg = [];
+ } else {
+ item.employerImg = this.$setImageUrl(item.employerImg, 2)
+ }
+
+ this.$refs.formItemRef[index].form = item
+ })
+ })
})
},
@@ -816,12 +995,14 @@
}
// this.$refs.form.validate().then(valid => {
// if (valid) {
- if (this.form?.images?.length > 0) {
+ if (this.form.images.length) {
let urls = []
this.form.images.forEach(e => {
urls.push(e.name)
})
this.form.imageUrls = urls.join(",")
+ } else {
+ this.form.imageUrls = ""
}
this.form.roleName = uni.getStorageSync("activeRole").roleName;
@@ -845,6 +1026,19 @@
this.form.lat = Number(this.form.lat).toFixed(8)
delete this.form.images;
+ if (this.personNum > 0) {
+ const placePractitioner = []
+ this.$refs.formItemRef.forEach(item => {
+ item.form.placeId = this.form.placeId
+ item.form.employerImg = this.$formattingUrls(item.form.employerImg);
+ placePractitioner.push(item.form)
+ })
+ this.form.placePractitioner = placePractitioner
+ }
+
+
+
+
add(this.form).then(res => {
this.$showTips("提交成功", "success");
setTimeout(() => {
@@ -855,27 +1049,6 @@
},
- async buildColumn() {
- //设置街道
- const townStreet = await this.getDoorplateAddressList(null, "townStreet")
- this.setColumn(townStreet, 0)
- //设置社区
- const nei = await this.getDoorplateAddressList(townStreet[0]?.code, "nei")
- this.setColumn(nei, 1)
- //设置路
- const streetRu = await this.getDoorplateAddressList(nei[0]?.code, "streetRu")
- this.setColumn(streetRu, 2)
- //设置地区
- const district = await this.getDoorplateAddressList(streetRu[0]?.code, "district")
- this.setColumn(district, 3)
- //设置楼栋
- const building = await this.getDoorplateAddressList(district[0]?.code, "building")
- this.setColumn(building, 4)
- },
-
- setColumn(data, index) {
- this.$set(this.pickColumns, index, data)
- },
//获取当前位置信息
getCurrentLocation() {
@@ -950,55 +1123,20 @@
this.showFrontTypePicker = false;
},
- async changeHandler(e) {
- const {
- columnIndex,
- index,
- // 微信小程序无法将picker实例传出来,只能通过ref操作
- picker = this.$refs.uPicker
- } = e
- let item = e.values[columnIndex][index]
- //街道
- if (columnIndex === 0) {
- //获取社区列表
- const nei = await this.getDoorplateAddressList(item.code, "nei")
- picker.setColumnValues(1, nei)
+ //选择民族
+ confirmNation(e) {
+ this.nationIndex = e.indexs;
+ this.nationValue = e.value[0].name;
+ this.form.placeExtEntity.ethnicity = e.value[0].value;
+ this.showNationPicker = false;
+ },
- const streetRu = await this.getDoorplateAddressList(nei[0].code, "streetRu")
- picker.setColumnValues(2, streetRu)
-
- const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
- picker.setColumnValues(3, district)
-
- const building = await this.getDoorplateAddressList(district[0].code, "building")
- picker.setColumnValues(4, building)
- }
-
- if (columnIndex === 1) {
- const streetRu = await this.getDoorplateAddressList(item.code, "streetRu")
- picker.setColumnValues(2, streetRu)
-
- const district = await this.getDoorplateAddressList(streetRu[0].code, "district")
- picker.setColumnValues(3, district)
-
- const building = await this.getDoorplateAddressList(district[0].code, "building")
- picker.setColumnValues(4, building)
- }
-
- if (columnIndex === 2) {
-
- const district = await this.getDoorplateAddressList(item.code, "district")
- picker.setColumnValues(3, district)
-
- const building = await this.getDoorplateAddressList(district[0].code, "building")
- picker.setColumnValues(4, building)
- }
-
- if (columnIndex === 3) {
- const building = await this.getDoorplateAddressList(item.code, "building")
- picker.setColumnValues(4, building)
- }
-
+ //选择性别
+ confirmGender(e) {
+ this.genderIndex = e.indexs;
+ this.genderValue = e.value[0].name;
+ this.form.placeExtEntity.legalGender = e.value[0].value;
+ this.showGenderPicker = false;
},
//弹出层打开
@@ -1013,6 +1151,16 @@
urls: minioBaseUrl + [value],
})
},
+
+ addPerson() {
+ this.personNum++
+ this.personNumArr.push(1)
+ },
+
+ deletePerson(index) {
+ this.personNum--;
+ this.personNumArr.splice(index, 1)
+ }
}
}
</script>
@@ -1149,4 +1297,11 @@
background-color: #fff;
text-align: center;
}
+
+
+ .practitioner {
+ background-color: #fff;
+ border-radius: 8rpx;
+ margin-top: 20rpx;
+ }
</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/editExamine.vue b/subPackage/workbench/views/editExamine.vue
index 1460c92..793259a 100644
--- a/subPackage/workbench/views/editExamine.vue
+++ b/subPackage/workbench/views/editExamine.vue
@@ -1,28 +1,122 @@
<template>
<view class="container">
<view class="main-content">
- <view class="base">
- <box-title :title="'基本信息'"></box-title>
- <u-form labelWidth="70" :model="form" :rules="rules" ref="form" class="form">
+
+ <u-form labelWidth="80" :model="form" :rules="rules" ref="form" class="form">
+
+ <view class="base">
+ <box-title :title="'基本信息'"></box-title>
+
<u-form-item label="场所位置" required class="form-item" prop="location" @click="getLocation">
- <u--input border="none" v-model="form.location" placeholder="请选择场所位置"></u--input>
+ <u--textarea border="none" v-model="form.location" placeholder="请选择场所位置"></u--textarea>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
+
<u-form-item label="经纬度" required class="form-item">
<u--input border="none" v-model="jwd" placeholder="请选择场所位置" disabled
disabledColor="#ffffff"></u--input>
</u-form-item>
+ <!-- <u-form-item class="form-item" label="标准地址" required prop="houseCodeBinds"
+ @click="isShowPopup = true">
+ <u--input v-if="!addressNames.length" border="none" disabled disabledColor="#ffffff"
+ placeholder="请选择标准地址">
+ </u--input>
+
+ <view v-if="addressNames.length">
+ <view class="f-28" v-for="i in addressNames">
+ {{i}}
+ </view>
+ </view>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item> -->
<u-form-item label="场所名称" required class="form-item" prop="placeName">
<u--input border="none" v-model="form.placeName" placeholder="请填写场所名称"></u--input>
</u-form-item>
<u-form-item label="法人信息" required class="form-item" prop="legalPerson">
<u--input border="none" v-model="form.legalPerson" placeholder="请填写法人信息"></u--input>
</u-form-item>
+ <!-- <u-form-item label="法人身份证" :required="isRequired" class="form-item" prop="legalIdCard">
+ <u--input border="none" v-model="form.legalIdCard" placeholder="请填写法人身份证"></u--input>
+ </u-form-item> -->
<u-form-item label="法人电话" class="form-item" prop="legalTel" required>
<u--input border="none" type="number" v-model="form.legalTel" placeholder="请填写法人电话"></u--input>
</u-form-item>
- </u-form>
- </view>
+ <!-- <u-form-item class="form-item" :required="isRequired" :disabled="isDisabled" label="微信号:"
+ prop="legalWxAccount">
+ <u--input border="none" type="idcard" v-model="form.legalWxAccount" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+
+ <u-form-item @click="showGenderPicker = true" class="form-item" label="性别" prop="legalGender">
+ <u--input border="none" v-model="genderValue" disabled disabledColor="#ffffff"
+ placeholder="请选择性别">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item class="form-item" :required="isRequired" :disabled="isDisabled" label="年龄:"
+ prop="legalAge">
+ <u--input border="none" type="number" v-model="form.legalAge" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item @click="showNationPicker = true" class="form-item" label="民族" prop="ethnicity">
+ <u--input border="none" v-model="nationValue" disabled disabledColor="#ffffff"
+ placeholder="请选择民族">
+ </u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item class="form-item" :required="isRequired" :disabled="isDisabled" label="工作单位:"
+ prop="employer">
+ <u--input border="none" type="idcard" v-model="form.employer" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" :required="isRequired" :disabled="isDisabled" label="岗位性质:"
+ prop="legalJobNature">
+ <u--input border="none" type="idcard" v-model="form.legalJobNature" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" :required="isRequired" :disabled="isDisabled" label="户籍地址:"
+ prop="legalRegisteredAddress">
+ <u--textarea border="none" type="idcard" v-model="form.legalRegisteredAddress"
+ placeholder="请输入">
+ </u--textarea>
+ </u-form-item>
+ <u-form-item class="form-item" :required="isRequired" :disabled="isDisabled" label="居住地址:"
+ prop="legalTempAddress">
+ <u--textarea border="none" type="idcard" v-model="form.legalTempAddress" placeholder="请输入">
+ </u--textarea>
+ </u-form-item> -->
+
+ </view>
+
+
+ <view class="item bgc-ff mt-20">
+
+ <view class="box-title">
+ <box-title title="房东信息"></box-title>
+ </view>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="姓名:" prop="landlordName">
+ <u--input border="none" v-model="form.landlordName" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="身份证号:" prop="landlordIdCard">
+ <u--input border="none" type="idcard" v-model="form.landlordIdCard" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="手机号:" prop="landlordPhone">
+ <u--input border="none" type="number" v-model="form.landlordPhone" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+ <u-form-item class="form-item" labelWidth="100" :required="isRequired" :disabled="isDisabled"
+ label="微信号:" prop="landlordWxAccount">
+ <u--input border="none" v-model="form.landlordWxAccount" placeholder="请输入">
+ </u--input>
+ </u-form-item>
+
+ </view>
+ </u-form>
<view class="license">
<box-title title="营业执照"></box-title>
<view class="upload-img">
@@ -46,17 +140,51 @@
</view>
</view>
<view class="practitioner">
- <box-title title="从业人员信息"></box-title>
- <view class="info" v-for="(item, index) in personNum" :key="index">
- <view class="title">人员信息-#{{ index*1 + 1 }}</view>
+ <view style="padding:20rpx 30rpx;">
+ <box-title title="从业人员信息"></box-title>
+ </view>
+ <view class="info" v-for="(item, index) in personNumArr" :key="index">
+ <view class="flex a-i-c j-c-s-b" style="padding:20rpx;">
+ <view class="title fw" style="text-align:center;">人员信息-#{{ index*1 + 1 }}</view>
+ <view>
+ <u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" />
+ </view>
+ </view>
<formItem ref="formItemRef"></formItem>
</view>
- <view class="add-person">
+ <view class="add-person" style="padding:20rpx 30rpx;" v-if="!currentId">
<u-button type="success" plain @click="addPerson">再加一人</u-button>
</view>
</view>
</view>
+
+
+ <u-popup :show="isShowPopup" mode="bottom" :round="12" closeable="true" @close="isShowPopup = false">
+ <view class="popup-content">
+ <view class="popup-title f-30">选择标准地址</view>
+ <scroll-view class="popup-list" :scroll-y="true">
+ <u-checkbox-group v-model="checkedPlace" iconPlacement="right" placement="column"
+ @change="checkboxChange" shape="circle">
+ <view class="popup-list-item flex j-c-s-b" v-for="(i,k) in placeList" :key="k">
+ <text class="f-28" style="width:85%">{{i.addressName}}</text>
+ <u-checkbox :name="k"></u-checkbox>
+ </view>
+
+ </u-checkbox-group>
+ </scroll-view>
+
+ </view>
+
+ </u-popup>
+
+ <u-picker :defaultIndex="nationTypeListIndex" :closeOnClickOverlay="true" :show="showNationPicker"
+ :columns="[nationTypeList]" @close="showNationPicker = false" @cancel="showNationPicker = false"
+ keyName="name" @confirm="confirmNation"></u-picker>
+
+ <u-picker :defaultIndex="genderIndex" :closeOnClickOverlay="true" :show="showGenderPicker" :columns="[gender]"
+ @close="showGenderPicker = false" @cancel="showGenderPicker = false" keyName="name"
+ @confirm="confirmGender"></u-picker>
<footer-btn @click="submit"></footer-btn>
@@ -83,6 +211,12 @@
import {
minioBaseUrl
} from '@/common/setting'
+ import {
+ getPlaceList
+ } from '@/api/place/place.js'
+ import {
+ bizDictionary
+ } from '@/api/system/dict.js'
export default {
mixins: [uploadMixin],
components: {
@@ -99,7 +233,19 @@
legalPerson: '',
legalTel: '',
imageUrls: [],
- planImageUrls: []
+ planImageUrls: [],
+ houseCodeBinds: "",
+ legalWxAccount: "",
+ employer: "",
+ legalAge: "",
+ legalJobNature: "",
+ legalRegisteredAddress: "",
+ legalTempAddress: "",
+ images: [],
+ landlordName: "",
+ landlordPhone: "",
+ landlordIdCard: "",
+ landlordWxAccount: ""
},
rules: {
"location": {
@@ -131,9 +277,30 @@
}
]
},
- personNum: 1,
+ personNum: 0,
curSelectSite: {},
- jwd: ""
+ jwd: "",
+ placeList: [],
+ isShowPopup: false,
+ checkedPlace: [],
+ addressNames: [],
+ nationTypeList: [], //民族
+ nationTypeIndex: [0],
+ nationValue: "",
+ gender: [{ //性别
+ value: 1,
+ name: '男',
+ },
+ {
+ value: 0,
+ name: '女',
+ }
+ ],
+ genderIndex: [0],
+ genderValue: "",
+ showNationPicker: false,
+ showGenderPicker: false,
+ personNumArr: [],
}
},
onShow() {
@@ -143,13 +310,57 @@
onReady() {
//onReady 为uni-app支持的生命周期之一
this.$refs.form.setRules(this.rules)
+
},
- mounted() {
- this.$nextTick(() => {
- this.getCsDetails()
- })
+
+ async mounted() {
+ await this.getBizDict();
+ this.getCsDetails();
},
+
methods: {
+
+
+ // 获取民族
+ getBizDict() {
+ const param = {
+ code: "nationType"
+ }
+ bizDictionary(param).then(res => {
+ if (res.code == 200) {
+ res.data.forEach(e => {
+ this.nationTypeList.push({
+ name: e.dictValue,
+ value: Number(e.dictKey)
+ })
+ })
+ }
+ })
+ },
+
+ checkboxChange(n) {
+ console.log('change', n);
+ let list = n;
+ let ids = [];
+ let names = []
+ for (let i = 0, ii = list.length; i < ii; i++) {
+ ids.push(this.placeList[list[i]].addressCode)
+ names.push(this.placeList[list[i]].addressName)
+ }
+
+ this.$set(this.form, "houseCodeBinds", ids.join(","))
+ this.addressNames = names;
+ },
+
+ getPlace(location) {
+ getPlaceList({
+ addressName: location
+ }).then(res => {
+ console.log(res)
+ this.placeList = res.data;
+ })
+ },
+
getLocation() {
uni.chooseLocation({
success: (res) => {
@@ -165,10 +376,12 @@
}
})
},
+
getCsDetails() {
getPlaceDetail({
placeId: this.curSelectSite.id
}).then(detailRes => {
+
const {
code,
data
@@ -180,6 +393,7 @@
})
return
}
+ this.getPlace(data.location);
if (data.lat) {
this.jwd = `${Number(data.lng).toFixed(6)},${Number(data.lat).toFixed(6)}`
}
@@ -218,17 +432,50 @@
}
this.personNum = placePractitioner.length
+ this.personNumArr = placePractitioner;
// const componetns = this.$refs.formItemRef || []
placePractitioner.forEach((item, index) => {
this.$nextTick(() => {
+ if (item.ethnicity) {
+ let obj = this.$getIndex(this.nationTypeList, item.ethnicity,
+ "value", "name")
+ this.$refs.formItemRef[index].nationValue = obj.name;
+ this.$refs.formItemRef[index].nationTypeIndex = obj.index;
+ }
+
+ if (typeof(item.gender) == 'number') {
+ let obj = this.$getIndex(this.$refs.formItemRef[index].gender, item
+ .gender, "value", "name")
+ this.$refs.formItemRef[index].genderValue = obj.name;
+ this.$refs.formItemRef[index].genderIndex = obj.index;
+ }
+ if (item.employerImg == "" || item.employerImg == null) {
+ item.employerImg = [];
+ } else {
+ item.employerImg = this.$setImageUrl(item.employerImg, 2)
+ }
this.$refs.formItemRef[index].form = item
})
})
-
- // this.$refs.formItemRef.forEach((item, index) => {
- // item.form = placePractitioner[index]
- // })
})
+ },
+
+
+
+ //选择民族
+ confirmNation(e) {
+ this.nationIndex = e.indexs;
+ this.nationValue = e.value[0].name;
+ this.form.ethnicity = e.value[0].value;
+ this.showNationPicker = false;
+ },
+
+ //选择性别
+ confirmGender(e) {
+ this.genderIndex = e.indexs;
+ this.genderValue = e.value[0].name;
+ this.form.legalGender = e.value[0].value;
+ this.showGenderPicker = false;
},
@@ -284,14 +531,19 @@
})
})
},
- addPerson() {
- this.personNum++
- },
+
submit() {
if (this.personNum > 0) {
const placePractitioner = []
this.$refs.formItemRef.forEach(item => {
+ console.log("item====>", item);
item.form.placeId = this.form.placeId
+ if (item.form.employerImg == null) {
+ item.form.employerImg = "";
+ } else {
+ item.form.employerImg = this.$formattingUrls(item.form.employerImg);
+ }
+ // item.form.employerImg = "";
placePractitioner.push(item.form)
})
this.form.placePractitioner = placePractitioner
@@ -306,6 +558,16 @@
pushPage() {
this.$u.func.globalNavigator(`/subPackage/workbench/views/cshw?placeId=${this.form.placeId}`)
+ },
+
+ addPerson() {
+ this.personNum++
+ this.personNumArr.push(1)
+ },
+
+ deletePerson(index) {
+ this.personNum--;
+ this.personNumArr.splice(index, 1)
}
}
}
@@ -386,4 +648,45 @@
border: 1rpx solid #EEEEEE;
background-color: #fff;
}
+
+
+ .popup-content {
+ width: 100%;
+ padding: 0 30rpx 30rpx;
+ box-sizing: border-box;
+ background-color: #fff;
+ // height: 800rpx;
+
+ .popup-title {
+ padding: 30rpx 0;
+ text-align: center;
+ font-weight: bold;
+ }
+
+ .popup-list {
+ height: 600rpx;
+ margin-top: 20rpx;
+ }
+
+ .popup-list-item {
+ padding: 20rpx 0;
+ border-bottom: 1px solid #f1f1f1;
+ position: relative;
+ }
+
+ .address-name {
+ width: 90%;
+ }
+
+ .check-icon {
+ position: absolute;
+ right: 20rpx;
+ top: 20rpx;
+ }
+ }
+
+ .item {
+ padding: 0 30rpx;
+ border-radius: 8rpx;
+ }
</style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/examine.vue b/subPackage/workbench/views/examine.vue
index 884d0dc..01c916a 100644
--- a/subPackage/workbench/views/examine.vue
+++ b/subPackage/workbench/views/examine.vue
@@ -9,10 +9,7 @@
<view class="licence">
<box-title title="营业执照" class="box-title"></box-title>
<view class="info">
-
-
<view class="f-30" v-if="!imageObj.imageUrls.length">未完善</view>
-
<view class="images-box" v-for="(i,k) in imageObj.imageUrls" :key="k" v-if="imageObj.imageUrls.length">
<u-image width="80" height="80" :src="i" @click="preViewImg(i,imageObj.imageUrls)"></u-image>
</view>
@@ -28,7 +25,13 @@
</view>
</view>
</view>
- <view class="personnel">
+ <view class="personnel bgc-ff">
+ <box-title title="房东信息" class="box-title"></box-title>
+ <view class="info">
+ <lineItem :dataInfo="landlordData"></lineItem>
+ </view>
+ </view>
+ <view class="personnel" v-if="type == 1">
<box-title title="从业人员" class="box-title"></box-title>
<view class="info">
<view class="f-30" v-if="!placePersonList.length">
@@ -42,12 +45,58 @@
<text>{{ item.name || '未完善' }}</text>
</view>
<view class="content">
+ <text>性别</text>
+ <text>{{ item.gender || '未完善' }}</text>
+ </view>
+ <view class="content">
+ <text>民族</text>
+ <text>{{ item.ethnicity || '未完善' }}</text>
+ </view>
+
+ <view class="content">
+ <text>身份证号</text>
+ <text>{{ item.idCard || '未完善' }}</text>
+ </view>
+ <view class="content">
<text>电话号码</text>
<text>{{ item.telephone || '未完善' }}</text>
</view>
<view class="content">
- <text>暂住地</text>
+ <text>现居住地</text>
<text>{{ item.tempAddress || '未完善' }}</text>
+ </view>
+ <view class="content">
+ <text>岗位</text>
+ <text>{{ item.jobNature || '未完善' }}</text>
+ </view>
+
+ <!-- <view class="content">
+ <text>户籍地址</text>
+ <text>{{ item.registeredAddress || '未完善' }}</text>
+ </view> -->
+
+ <!-- <view class="content">
+ <text>入职时间</text>
+ <text>{{ item.registeredAddress || '未完善' }}</text>
+ </view>
+ <view class="content">
+ <text>离职时间</text>
+ <text>{{ item.registeredAddress || '未完善' }}</text>
+ </view> -->
+
+ <view class="content" v-if="!item.employerImg.length">
+ <text>从业人员照片</text>
+ <text>未完善</text>
+ </view>
+
+ <view v-if="item.employerImg.length" class="mt-20" style="margin-left:10rpx;">
+ <view class="f-28">
+ 从业人员照片
+ </view>
+ <view class="images-box" v-for="(i,k) in item.employerImg" :key="k"
+ @click="preViewImg(i,item.employerImg)">
+ <u-image width="80" height="80" :src="i"></u-image>
+ </view>
</view>
</view>
</view>
@@ -103,11 +152,16 @@
import lineItem from '../components/lineItem.vue'
import {
checkPlaceExtData,
- getPlaceDetail
+ getPlaceDetail,
+ auditPlacePeople
} from '@/api/placeExp/placeExp.js'
import {
minioBaseUrl
} from "@/common/setting.js"
+ import {
+ bizDictionary,
+ bizDictionaryTree
+ } from '@/api/system/dict.js'
export default {
components: {
boxTitle,
@@ -169,7 +223,42 @@
defaultPlaceholder: '待审核',
isShowModal: false,
confirmFlag: 1,
- confirmNotion: ""
+ confirmNotion: "",
+ nationTypeList: [],
+ nationValue: "",
+ gender: [{ //性别
+ value: 1,
+ name: '男',
+ },
+ {
+ value: 0,
+ name: '女',
+ }
+ ],
+ genderValue: "",
+ landlordData: [{
+ label: '姓名',
+ name: "landlordName",
+ value: '未完善'
+ },
+ {
+ label: '手机号',
+ name: "landlordPhone",
+ value: '未完善'
+ },
+ {
+ label: '身份证号',
+ name: "landlordIdCard",
+ value: '未完善'
+ },
+ {
+ label: '微信号',
+ name: "landlordWxAccount",
+ value: '未完善'
+ },
+ ],
+
+ type: 1 //1从业人员 、2场所
}
},
onLoad(option) {
@@ -181,11 +270,49 @@
placeId,
id
}
+
+ if (option.type) {
+ this.type = option.type;
+ }
+
+
},
onShow() {
this.setDefaultValue()
},
methods: {
+
+
+
+ // 获取业务字典
+ getBizDict(callback) {
+ // const param = {
+ // code: "nationType"
+ // }
+ // const res = await bizDictionary(param)
+ // res.data.forEach(e => {
+ // list.push({
+ // name: e.dictValue,
+ // value: Number(e.dictKey)
+ // })
+ // })
+
+
+
+ bizDictionary({
+ code: "nationType"
+ }).then(res => {
+ let list = []
+ res.data.forEach(e => {
+ list.push({
+ name: e.dictValue,
+ value: Number(e.dictKey)
+ })
+ })
+ callback(list);
+ })
+ },
+
async setDefaultValue() {
const {
code,
@@ -219,11 +346,44 @@
this.basicData.forEach(item => {
item.value = data[item.name] || '未完善'
})
+
+ this.landlordData.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
+ let placePractitioner = data.placePractitioner;
+ for (let i of placePractitioner) {
+ i.employerImg = this.$setImageUrl(i.employerImg)
+ if (i.gender) {
+ let {
+ index,
+ name
+ } = this.$getIndex(this.gender, i.gender, "value",
+ "name");
+ i.gender = name;
+ }
+
+ if (i.ethnicity) {
+ this.getBizDict(resp => {
+ let {
+ index,
+ name
+ } = this.$getIndex(resp, i.ethnicity, "value",
+ "name");
+ i.ethnicity = name;
+ })
+ }
+
+
+ }
+ this.placePersonList = placePractitioner
+
+
},
async checkPlaceExt() {
let data = {
@@ -255,6 +415,40 @@
}
})
},
+
+ async checkPlacePeople() {
+ let data = {
+ placeId: this.currentData.id,
+ confirmFlag: this.form.confirmFlag
+ }
+
+ if (this.form.confirmNotion) {
+ data.confirmNotion = this.form.confirmNotion;
+ }
+
+ const res = await checkPlaceExtData(data)
+ if (res.code !== 200) {
+ uni.showToast({
+ title: '更新失败',
+ icon: 'error'
+ })
+ return
+ }
+ this.isShowModal = false;
+ uni.showToast({
+ title: '审核成功',
+ icon: 'success',
+ duration: 1500,
+ complete() {
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 1000)
+ }
+ })
+ },
+
+
+
handleConfirm(e) {
console.log(e);
this.defaultColumns = e.indexs[0];
@@ -273,7 +467,11 @@
if (type == 3) {
this.isShowModal = true;
} else {
- this.checkPlaceExt()
+ if (this.type == 2) {
+ this.checkPlaceExt()
+ } else {
+ this.checkPlacePeople()
+ }
}
},
findObjValue(value, obj) {
@@ -292,7 +490,12 @@
return
}
this.form.confirmFlag = 3
- this.checkPlaceExt()
+ if (this.type == 2) {
+ this.checkPlaceExt()
+ } else {
+ this.checkPlacePeople()
+ }
+
}
diff --git a/subPackage/workbench/views/reformList.vue b/subPackage/workbench/views/reformList.vue
index 1fd6465..7915914 100644
--- a/subPackage/workbench/views/reformList.vue
+++ b/subPackage/workbench/views/reformList.vue
@@ -94,19 +94,13 @@
onLoad(option) {
console.log(option);
- if (option.reportType) {
- this.reportType = option.reportType;
- uni.setNavigationBarTitle({
- title: "取保候审"
- })
- }
if (option.from == "index") {
uni.setNavigationBarTitle({
title: "场所任务"
})
}
if (option.from == "task") {
- this.tabIndex = 1;
+ this.tabIndex = 2;
this.currentStatus = 1;
}
if (option.code) {
diff --git a/subPackage/workbench/views/rental.vue b/subPackage/workbench/views/rental.vue
index f8c9a9b..334ef2f 100644
--- a/subPackage/workbench/views/rental.vue
+++ b/subPackage/workbench/views/rental.vue
@@ -39,14 +39,14 @@
<view v-if="item.term =='shortTerm' " class="dot bgc-orange"></view>
<view v-if="item.term =='middleTerm' " class="dot bgc-main"></view>
<view v-if="item.term =='longTerm' " class="dot bgc-green"></view>
- <text class="f-24">{{formatTerm(item.term)}}{{item.total}}户 ({{item.personNum}})人</text>
+ <text class="f-22">{{formatTerm(item.term)}}{{item.total}}户 ({{item.personNum}})人</text>
</view>
</view>
- <view class="list bgc-ff" v-for="(records,index) in tenantList" :key="index">
+ <view class="list bgc-ff" v-for="(records,index) in tenantList" :key="index" @click="navTo(records)">
<view class="flex j-c-s-b a-i-c">
<view class="flex a-i-c">
- <text class="f-32 mr-50">{{ records.tenantName }}</text>
+ <text class="f-32 mr-50">{{ records.tenantName || "" }}</text>
<view class="flex a-i-c">
<u-icon name="phone-fill" color="#017BFC"></u-icon>
<text class="f-28 ml-10">{{ records.phone || '未填写' }}</text>
@@ -371,6 +371,15 @@
uni.navigateTo({
url: `/subPackage/task/workLogList?code=${code}`
})
+ },
+
+ navTo({
+ houseCode,
+ id
+ }) {
+ uni.navigateTo({
+ url: `auditRental?houseCode=${houseCode}&id=${id}`
+ })
}
}
}
diff --git a/subPackage/workbench/views/tradingList.vue b/subPackage/workbench/views/tradingList.vue
new file mode 100644
index 0000000..08be69b
--- /dev/null
+++ b/subPackage/workbench/views/tradingList.vue
@@ -0,0 +1,330 @@
+<template>
+ <view>
+ <u-sticky>
+ <view class="bgc-ff">
+ <view class="tab">
+ <u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}"
+ :activeStyle="{color:'#017BFC'}">
+ </u-tabs>
+ <view class="search flex j-c-s-b a-i-c">
+ <view class="tab-filter flex j-c-c a-i-c" @click="showDateModal">
+ <text class="f-28">时间筛选</text>
+ <u-icon name="arrow-down"></u-icon>
+ </view>
+ <u-search placeholder="请输入需要查询信息的名称" v-model="keyword" :clearabled="true" :showAction="true"
+ :animation="true" @search="searchConfirm" @clear="clearConfirm"></u-search>
+ </view>
+ </view>
+ </view>
+ </u-sticky>
+
+ <view class="list">
+ <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k"
+ @click="navTo(i.id,i.reportType,i.status,i.type)">
+ <view class="item-title flex a-i-c j-c-s-b mb-20">
+ <text class="f-32 fw">{{i.name}}</text>
+ <u-tag v-if="i.status == 4" text="待完成" type="warning" plain plainFill></u-tag>
+ <u-tag v-if="i.status == 1" text="待审批" type="warning" plain plainFill></u-tag>
+ <u-tag v-if="i.status == 2" text="审核通过" type="success" plain plainFill></u-tag>
+ <u-tag v-if="i.status == 3" text="审核拒绝" type="error" plain plainFill></u-tag>
+ </view>
+ <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">时间</text>
+ <text class="f-28 c-66">{{i.createTime}}</text>
+ </view>
+ <view class="item-row flex a-i-c j-c-s-b">
+ <text class="f-28">地址</text>
+ <text class="address f-28 c-66">{{i.addressName || ""}}</text>
+ </view>
+ </view>
+ </view>
+ <u-toast ref="uToast"></u-toast>
+ <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="没有更多了" line />
+
+ <date-range-modal ref="dateRane" @comfirm="handleComfirmDate" @rest="handleRestDate" />
+ </view>
+</template>
+
+<script>
+ import {
+ getAuditReportingList
+ } from "@/api/reporting/reporting"
+ import dateRangeModal from '@/components/dateRangeModal/modal.vue';
+ export default {
+ components: {
+ dateRangeModal
+ },
+ data() {
+ return {
+ tabList: [
+
+ {
+ name: "全部",
+ status: "",
+ },
+ // {
+ // name: "待完成",
+ // status: 4,
+ // },
+ {
+ name: "待审核",
+ status: 1
+ },
+ {
+ name: "审核通过",
+ status: 2
+ },
+ {
+ name: "已拒绝",
+ status: 3
+ }
+ ],
+ tabIndex: 0,
+ currentStatus: "",
+ list: [],
+ loadingStatus: 'nomore',
+ currentPage: 1,
+ frequency: '',
+ reportType: "",
+ selectDate: [],
+ houseCode: "",
+ keyword: ""
+ }
+ },
+
+ onLoad(option) {
+ console.log(option);
+ // if (option.reportType) {
+ // this.reportType = option.reportType;
+ // if (option.reportType == 1) {
+ // uni.setNavigationBarTitle({
+ // title: "取保候审"
+ // })
+ // } else if (option.reportType == 2) {
+ // uni.setNavigationBarTitle({
+ // title: "消防自查"
+ // })
+ // } else if (option.reportType == 5) {
+ // uni.setNavigationBarTitle({
+ // title: "二手交易"
+ // })
+ // }
+ // }
+
+ if (option.from == "index") {
+ uni.setNavigationBarTitle({
+ title: "场所任务"
+ })
+ }
+ if (option.from == "task") {
+ this.tabIndex = 2;
+ this.currentStatus = 1;
+ }
+ if (option.code) {
+ this.houseCode = option.code;
+ }
+ // this.getList()
+ },
+
+ onShow() {
+ this.resetParams();
+ this.getList()
+ },
+
+ onReachBottom() {
+ this.currentPage++
+ this.getList()
+ },
+
+ methods: {
+ searchConfirm() {
+ this.resetParams()
+ this.getList()
+ },
+ clearConfirm() {
+ this.keyword = ''
+ this.searchConfirm()
+ },
+ changeTab(e) {
+ this.tabIndex = e.index;
+ this.currentStatus = e.status;
+ this.resetParams();
+ this.getList();
+ },
+ resetParams() {
+ this.list = [];
+ this.currentPage = 1;
+ },
+ getList() {
+ this.$nextTick(() => {
+ this.loadingStatus = 'loadingmore'
+ this.$refs.uToast.show({
+ type: 'loading',
+ message: '正在加载',
+ duration: 9999999
+ })
+ })
+ let params = {
+ current: this.currentPage,
+ size: 20,
+ status: this.currentStatus,
+ frequency: this.frequency
+ }
+ if (this.selectDate.length) {
+ params.startTime = this.selectDate[0]
+ params.endTime = this.selectDate[1]
+ }
+ if (this.houseCode) {
+ params.houseCode = this.houseCode;
+ }
+
+ if (this.reportType) {
+ params.reportType = this.reportType
+ }
+ if (this.keyword) {
+ params.name = this.keyword;
+ }
+
+ getAuditReportingList(params).then(res => {
+ if (res.code != 200) {
+ uni.showToast({
+ title: '数据请求失败',
+ icon: 'error'
+ })
+ return
+ }
+ let records = res.data.records;
+ this.list = [...this.list, ...records]
+ this.$nextTick(() => {
+ this.$refs.uToast.isShow = false
+ })
+ this.loadingStatus = 'nomore'
+ })
+ },
+ navTo(id, reportType, status, type) {
+ if (status == 4) {
+ if (reportType == 8) {
+ this.navToDetail(reportType, id, type)
+ } else {
+ if (uni.getStorageSync("activeRole").roleName == "民警") {
+ this.navToDetail(reportType, id, type)
+ } else {
+ this.navToEdit(reportType, id, type);
+ }
+ }
+ } else {
+ this.navToDetail(reportType, id, type)
+ }
+ },
+
+ navToEdit(reportType, id, type) {
+ // if (reportType == 1) {
+ // this.$u.func.globalNavigator(`/subPackage/label/bail?id=${id}`)
+ // } else if (reportType == 2 || type == 7) {
+ // this.$u.func.globalNavigator(`/subPackage/label/hotel?id=${id}`)
+ // } else if (reportType == 3 || reportType == 4 || reportType == 5) {
+ // this.$u.func.globalNavigator(`/subPackage/label/form?id=${id}`)
+ // } else if (reportType == 6) {
+ // this.$u.func.globalNavigator(`/subPackage/label/school?id=${id}`)
+ // }
+
+ if (reportType == 1) {
+ this.$u.func.globalNavigator(`/subPackage/label/bail?id=${id}`)
+ } else if (reportType == 2) {
+ this.$u.func.globalNavigator(`/subPackage/label/check?id=${id}`)
+ } else if (reportType == 5) {
+ this.$u.func.globalNavigator(`/subPackage/label/form?id=${id}`)
+ }
+ },
+
+ navToDetail(reportType, id, type) {
+ // if (reportType == 1) {
+ // this.$u.func.globalNavigator(`bailReportDetail?id=${id}`)
+ // } else if (reportType == 2 || type == 7) {
+ // this.$u.func.globalNavigator(`hotelReportDetail?id=${id}`)
+ // } else if (reportType == 3 || reportType == 4 || reportType == 5) {
+ // this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
+ // } else if (reportType == 6) {
+ // this.$u.func.globalNavigator(`schoolReportDetail?id=${id}`)
+ // } else {
+ // this.$u.func.globalNavigator(`checkReform?id=${id}`)
+ // }
+
+ if (reportType == 1) {
+ this.$u.func.globalNavigator(`bailReportDetail?id=${id}`)
+ } else if (reportType == 2) {
+ this.$u.func.globalNavigator(`selfCheckDetail?id=${id}`)
+ } else if (reportType == 5) {
+ this.$u.func.globalNavigator(`labelReportDetail?id=${id}`)
+ } else {
+ this.$u.func.globalNavigator(`checkReform?id=${id}`)
+ }
+
+
+ },
+
+ showDateModal() {
+ this.$refs.dateRane.open();
+ },
+
+ handleRestDate() {
+ this.selectDate = [];
+ this.resetParams();
+ this.getList()
+ },
+ handleComfirmDate(val) {
+ this.selectDate = val;
+ this.resetParams();
+ this.getList()
+ }
+
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #F5F5F5;
+ }
+
+
+
+ .tab {
+ // width: 100%;
+
+ }
+
+ .search {
+ padding: 20rpx 20rpx;
+ }
+
+ // .tab /deep/.u-tabs__wrapper__nav__item {
+ // flex: 1;
+ // }
+ .tab-filter {
+ padding: 0 20rpx;
+ }
+
+ .list {
+ margin: 20rpx 30rpx 0;
+ }
+
+ .list-item {
+ padding: 0 30rpx 20rpx;
+ border-radius: 8rpx;
+
+ .item-title {
+ padding: 30rpx 0;
+ border-bottom: 1px solid #F5F5F5;
+ }
+
+ .item-row {
+ padding: 10rpx 0;
+
+ .address {
+ width: 65%;
+ text-align: right;
+ }
+ }
+ }
+</style>
\ No newline at end of file
--
Gitblit v1.9.3