From 84eefaa4eeb9bd672254ad1c6ee5e964cc100200 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Sat, 09 Dec 2023 17:45:56 +0800
Subject: [PATCH] 修复部分问题,优化圈子页面
---
subPackage/article/list.vue | 2
pages/user/test.vue | 436 +++++++++++++++++++++++++++
components/btn/footerBtn.vue | 4
pages/circle/index.vue | 45 ++
pages.json | 20 +
subPackage/house/member/index.vue | 68 +++-
subPackage/user/editUserInfo/editUserInfo.vue | 138 ++++++++
pages/user/center.vue | 25 +
subPackage/user/family/edit.vue | 73 +++-
common/common.js | 45 +-
pages/home/index.vue | 9
subPackage/workbench/views/bailReportDetail.vue | 6
subPackage/workbench/views/cscj.vue | 70 ++--
api/user.js | 9
subPackage/user/family/list.vue | 2
subPackage/workbench/views/report.vue | 1
16 files changed, 834 insertions(+), 119 deletions(-)
diff --git a/api/user.js b/api/user.js
index 4760b63..ff4fc91 100644
--- a/api/user.js
+++ b/api/user.js
@@ -94,6 +94,15 @@
})
}
+//更新用户信息
+export const updateUserInfo = (params) => {
+ return http.request({
+ url: '/blade-system/user/update',
+ method: 'get',
+ params: params
+ })
+}
+
export default {
token,
userInfo,
diff --git a/common/common.js b/common/common.js
index 1100ed5..2f29fbe 100644
--- a/common/common.js
+++ b/common/common.js
@@ -1,31 +1,36 @@
-import { minioBaseUrl } from "./setting.js"
+import {
+ minioBaseUrl
+} from "./setting.js"
/**
* @description 设置图片回显路径
* @param {String} str 路径
* @param {Number} type 回显类型 1普通回显 2上传回显
*/
-export const setImageUrl = (str,type = 1) =>{
- let strArr = str.split(",")
- let urls = [];
- if(type == 1){
- for(let i of strArr){
- urls.push(`${minioBaseUrl}${i}`)
+export const setImageUrl = (str, type = 1) => {
+ if (!str) {
+ let strArr = str.split(",")
+ let urls = [];
+ if (type == 1) {
+ for (let i of strArr) {
+ urls.push(`${minioBaseUrl}${i}`)
+ }
+ } else {
+ for (let i of strArr) {
+ urls.push({
+ name: i,
+ url: `${minioBaseUrl}${i}`
+ })
+ }
}
- }else {
- for(let i of strArr){
- urls.push({
- name:i,
- url:`${minioBaseUrl}${i}`
- })
- }
+ return urls;
+ } else {
+ return []
}
- return urls;
}
-
-export const showTips = (text,icon)=> {
+export const showTips = (text, icon) => {
uni.showToast({
- title:text,
- icon:icon?icon:'none'
+ title: text,
+ icon: icon ? icon : 'none'
})
-}
+}
\ No newline at end of file
diff --git a/components/btn/footerBtn.vue b/components/btn/footerBtn.vue
index bf330a0..e5c48cc 100644
--- a/components/btn/footerBtn.vue
+++ b/components/btn/footerBtn.vue
@@ -32,7 +32,9 @@
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:100%;
height: 78rpx;
diff --git a/pages.json b/pages.json
index 39134b0..fe89b55 100644
--- a/pages.json
+++ b/pages.json
@@ -21,6 +21,14 @@
}
},
{
+ "path": "pages/user/test",
+ "style": {
+ "navigationBarTitleText": "z-paging插件测试",
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black"
+ }
+ },
+ {
"path": "pages/login/login-account",
"style": {
// "navigationBarTitleText": "",
@@ -31,7 +39,7 @@
{
"path": "pages/circle/index",
"style": {
- "enablePullDownRefresh": true,
+ "enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
@@ -117,8 +125,16 @@
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
+ },
+ {
+ "path": "editUserInfo/editUserInfo",
+ "style": {
+ "navigationBarTitleText": "编辑资料",
+ "enablePullDownRefresh": false,
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTextStyle": "black"
+ }
}
-
]
},
//圈子
diff --git a/pages/circle/index.vue b/pages/circle/index.vue
index fc4e1c4..4ee8faf 100644
--- a/pages/circle/index.vue
+++ b/pages/circle/index.vue
@@ -1,6 +1,7 @@
<template>
<view class="">
- <view class="">
+ <z-paging ref="paging" v-model="list" @query="queryList" loading-more-no-more-text="没有更多了">
+ <view class="" slot="top">
<u-navbar :autoBack="false">
<view class="" slot="left" style="width:500rpx">
<u-search placeholder="搜索" v-model="keyword" :clearabled="true" animation="true" :showAction="true"
@@ -77,7 +78,7 @@
<text class="f-26 c-ff">发布</text>
</view>
</view>
-
+ </z-paging>
</view>
</template>
@@ -117,25 +118,33 @@
} else {
this.roleType = 1;
}
- this.getCircleList()
+ // this.getCircleList()
uni.$on("refreshList", () => {
- this.getCircleList()
+ // this.getCircleList()
+ this.$refs.paging.reload();
})
},
- onPullDownRefresh() {
- this.getCircleList();
- setTimeout(() => {
- uni.stopPullDownRefresh();
- }, 300)
- },
+ // onPullDownRefresh() {
+ // this.getCircleList();
+ // setTimeout(() => {
+ // uni.stopPullDownRefresh();
+ // }, 300)
+ // },
methods: {
+
+ refreshList(){
+ this.keyword = "";
+ this.$refs.paging.reload();
+ },
+
searchList() {
this.isSearch = true;
this.page = 1;
this.list = [];
- this.getCircleList()
+ // this.getCircleList()
+ this.$refs.paging.reload();
},
clearSearch() {
@@ -143,9 +152,21 @@
this.keyword = "";
this.page = 1;
this.list = [];
- this.getCircleList();
+ // this.getCircleList();
+ this.$refs.paging.reload();
this.isSearch = false;
},
+
+ queryList(pageNo, pageSize) {
+ getList({
+ circleText:this.keyword,
+ current:pageNo,
+ size:pageSize,
+ circleType: this.roleType
+ }).then(res=>{
+ this.$refs.paging.complete(res.data.records);
+ })
+ },
getCircleList() {
let params = {
diff --git a/pages/home/index.vue b/pages/home/index.vue
index d3e2f18..1db061c 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -21,7 +21,7 @@
</u-grid>
<view class="section flex j-c-s-a a-i-c mt-40" v-if="isShowContact && curSelectSite.addressType == 1">
- <view class="section-item" v-for="(i,k) in contactList" :key="k" v-if="i.name">
+ <view class="section-item" v-for="(i,k) in contactList" :key="k" v-if="i.name" >
<image class="section-item-bg" :src="i.bgImg" mode="aspectFill"></image>
<view class="item-box">
<view class="f-28">{{i.title}}</view>
@@ -384,14 +384,17 @@
if (data.wg) {
this.contactList[1].name = data.wg.name;
this.contactList[1].phone = data.wg.phone
+ this.contactList[1].path = ""
}
if (data.wy) {
this.contactList[0].name = data.wy.name;
- this.contactList[0].phone = data.wy.phone
+ this.contactList[0].phone = data.wy.phone;
+ this.contactList[0].path = "/subPackage/grid/tenement"
}
if (data.ga) {
this.contactList[2].name = data.ga.name;
- this.contactList[2].phone = data.ga.phone
+ this.contactList[2].phone = data.ga.phone;
+ this.contactList[2].path = ""
}
})
},
diff --git a/pages/user/center.vue b/pages/user/center.vue
index efae136..c081457 100644
--- a/pages/user/center.vue
+++ b/pages/user/center.vue
@@ -11,6 +11,11 @@
<text class="f-36 mb-20 fw">未登录</text>
<!-- <text class="f-28 c-99">您好业主,欢迎回家</text> -->
</view>
+
+ <view class="setting flex a-i-c j-c-c" @click="navigator('/subPackage/user/editUserInfo/editUserInfo')">
+ <u-icon name="setting" size="30" color="#fff"></u-icon>
+ </view>
+
</view>
<view class="main" v-if="isLogin">
@@ -52,6 +57,8 @@
</view>
</view>
+
+ <!-- <button @click="navigator('test')"> 测试</button> -->
</view>
</view>
</template>
@@ -112,9 +119,6 @@
this.$u.func.globalNavigator(url)
},
-
-
-
navToLogin() {
uni.redirectTo({
url: "/pages/login/login-account"
@@ -122,7 +126,6 @@
},
logOut() {
-
uni.showModal({
title: "提示",
content: "是否要退出该账号?",
@@ -136,9 +139,10 @@
}
}
})
-
-
- }
+ },
+
+
+
}
}
</script>
@@ -158,6 +162,13 @@
box-sizing: border-box;
background: linear-gradient(180deg, #017BFC 0%, rgba(1, 123, 252, 0) 100%);
}
+ .setting{
+ position: fixed;
+ width:40rpx;
+ height:40rpx;
+ right:38rpx;
+ top:200rpx;
+ }
.main {
margin: -120rpx 30rpx 0;
diff --git a/pages/user/test.vue b/pages/user/test.vue
new file mode 100644
index 0000000..d49556b
--- /dev/null
+++ b/pages/user/test.vue
@@ -0,0 +1,436 @@
+<template>
+ <view class="">
+ <z-paging ref="paging" v-model="tenantList" @query="queryList" loading-more-no-more-text="没有更多了"
+ @onRefresh="refreshList">
+ <view class="header bgc-ff" slot="top">
+ <!-- <view class="filter-box">
+ <chenchuang-CCDropDownFilter :filterData='filterData' :defaultIndex='defaultIndex'
+ @onSelected='handleSelect'></chenchuang-CCDropDownFilter>
+ </view> -->
+ <view class="tabs">
+ <u-tabs :list="tabsList" :current="tabIndex" @click="tabClick" :inactiveStyle="{color:'#999999'}"
+ :activeStyle="{color:'#017BFC'}"></u-tabs>
+ </view>
+ <view class="search-box">
+ <u-search placeholder="请输入租户名" v-model="keyword" :clearabled="true" :showAction="true"
+ :animation="true" @search="search" @clear="clear" @custom="search"></u-search>
+ </view>
+ </view>
+
+ <view class="content">
+ <!-- <view class="row flex j-c-s-b a-i-c" v-if="tenantList.length">
+ <view v-for="(item,index) in statistics" :key="index" class="row-item bgc-ff flex a-i-c">
+ <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>
+ </view>
+ </view> -->
+
+ <view class="list bgc-ff" v-for="(records,index) in tenantList" :key="index">
+ <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>
+ <view class="flex a-i-c">
+ <u-icon name="phone-fill" color="#017BFC"></u-icon>
+ <text class="f-28 ml-10">{{ records.phone || '未填写' }}</text>
+ </view>
+ </view>
+ <u-tag :text="showStatus(records.auditStatus)" type="success" plain plainFill></u-tag>
+ </view>
+ <view class="list-address f-28 c-99">
+ {{ records.houseName }}
+ </view>
+ <view class="list-action flex ">
+ <view class="action-item" @click="tenantManage(records)">
+ <u-icon name="/static/icon/list-02.png" width="40rpx" height="40rpx"></u-icon>
+ <text class="f-28 c-main ml-10">租客管理</text>
+ </view>
+ <view class="action-item">
+ <u-icon name="/static/icon/list-01.png" width="40rpx" height="40rpx"></u-icon>
+ <text class="f-28 c-main ml-10">走访日志</text>
+ </view>
+ </view>
+ </view>
+ </view>
+ <u-toast ref="uToast"></u-toast>
+ <!-- <u-loadmore :status="loadingStatus" loadmoreText="开始加载" loadingText="数据加载中" nomoreText="已经到底了" line />-->
+ </z-paging>
+ </view>
+</template>
+
+<script>
+ import {
+ getRentalHouseContent,
+ getStatistics
+ } from '@/api/houseRental/houseRental.js'
+ export default {
+ data() {
+ return {
+
+ tabsList: [{
+ name: '全部',
+ value: ''
+ },
+ {
+ name: '待确认',
+ value: '0'
+ },
+ {
+ name: '已确认',
+ value: '1'
+ },
+ {
+ name: '未到期',
+ value: '10'
+ },
+ {
+ name: '即将到期',
+ value: '20'
+ },
+ {
+ name: '已到期',
+ value: '30'
+ }
+ ],
+
+
+ filterData: [
+ [{
+ name: '全部',
+ value: ''
+ },
+ {
+ name: '待确认',
+ value: '0'
+ },
+ {
+ name: '已确认',
+ value: '1'
+ },
+ // {
+ // name: '审核不通过',
+ // value: '2'
+ // },
+ {
+ name: '未到期',
+ value: '10'
+ },
+ {
+ name: '即将到期',
+ value: '20'
+ },
+ {
+ name: '已到期',
+ value: '30'
+ }
+ ],
+ [{
+ name: '楼层',
+ value: ''
+ },
+ {
+ name: '1楼',
+ value: '1'
+ },
+ {
+ name: '2楼',
+ value: '2'
+ },
+ {
+ name: '3楼',
+ value: '3'
+ }
+ ]
+ ],
+ defaultIndex: [0, 0],
+ keyword: "",
+ statistics: [],
+ tenantList: [],
+ loadingStatus: 'nomore',
+ pagingParams: {
+ current: 1,
+ size: 10
+ },
+ selectParams: {},
+ tenantStatus: [{
+ name: '未到期',
+ value: 0
+ },
+ {
+ name: '已到期',
+ value: 1
+ },
+ {
+ name: '已终止',
+ value: 2
+ },
+ ],
+ tabIndex: 0
+ }
+ },
+ computed: {
+ formatTerm() {
+ return (term => {
+ if (term == 'longTerm') {
+ return "长期"
+ } else if (term == 'middleTerm') {
+ return "中期"
+ } else if (term == 'shortTerm') {
+ return "短期"
+ }
+ })
+ }
+ },
+ onLoad() {
+ this.currentRole = uni.getStorageSync('activeRole')
+ // this.getStatistics()
+ },
+ onShow() {
+ this.tenantList = []
+ // this.getRentalHouseInfo()
+ },
+ // onReachBottom() {
+ // this.pagingParams.current++
+ // this.getRentalHouseInfo()
+ // },
+ methods: {
+ refreshList(){
+ this.keyword = "";
+ this.$refs.paging.reload();
+ },
+ queryList(pageNo, pageSize) {
+ getRentalHouseContent({
+ tenantName: this.keyword,
+ current: pageNo,
+ size: pageSize
+ }
+
+ ).then(res => {
+ console.log(res);
+ this.$refs.paging.complete(res.data.records);
+ })
+ },
+
+ showStatus(status) {
+ for (let i of this.tabsList) {
+ if (i.value == status) {
+ return i.name
+ }
+ }
+ },
+
+ handleSelect(res) {
+ const [auditStatus, floor] = res
+ this.resetParams()
+ let params = {}
+ if (auditStatus[0].value !== '') {
+ params = {
+ auditStatus: auditStatus[0].value
+ }
+ }
+ if (floor[0].value !== '') {
+ params = {
+ ...params,
+ floor: floor[0].value
+ }
+ }
+ this.selectParams = params
+ this.getRentalHouseInfo()
+ this.getStatistics(auditStatus[0].value)
+ // 回到顶部,避免触发触底加载
+ uni.pageScrollTo({
+ scrollTop: 0, // 滚动到页面的目标位置(单位px)
+ });
+ },
+
+
+ tabClick(item) {
+ this.tabIndex = item.index;
+ this.pagingParams.current = 1;
+ this.pagingParams.auditStatus = item.value;
+ this.tenantList = []
+ this.getRentalHouseInfo()
+ // this.getStatistics(item.value)
+ },
+
+
+ getStatistics(auditStatus = '') {
+ const {
+ roleName
+ } = this.currentRole
+ let params = {
+ roleName
+ }
+ if (auditStatus) {
+ params = {
+ auditStatus,
+ roleName
+ }
+ }
+ getStatistics(params).then(res => {
+ this.statistics = res.data
+ })
+ },
+ findObjValue(value, obj) {
+ const res = obj.find(item => {
+ return item.value == value
+ })
+ return res.name
+ },
+ async getRentalHouseInfo(params = {}) {
+ this.$nextTick(() => {
+ this.loadingStatus = 'loadmore'
+ this.$refs.uToast.show({
+ type: 'loading',
+ message: '正在加载',
+ duration: 9999999
+ })
+ })
+ const {
+ roleName
+ } = this.currentRole
+ const {
+ code,
+ data: {
+ records
+ }
+ } = await getRentalHouseContent({
+ tenantName: this.keyword,
+ ...this.pagingParams,
+ roleName,
+ ...this.selectParams
+ })
+ if (code !== 200) {
+ uni.showToast({
+ title: "数据请求错误",
+ icon: "error"
+ })
+ return
+ }
+ this.tenantList = [...this.tenantList, ...records]
+ this.$nextTick(() => {
+ this.$refs.uToast.isShow = false
+ })
+ this.loadingStatus = 'nomore'
+ },
+ search() {
+ this.resetParams()
+ this.getRentalHouseInfo()
+ },
+ clear() {
+ this.keyword = ''
+ this.resetParams()
+ this.search()
+ },
+ tenantManage({
+ houseCode,
+ id
+ }) {
+ this.$u.func.globalNavigator(`/subPackage/bs/views/rentDetail?houseCode=${houseCode}&id=${id}`)
+ },
+ resetParams() {
+ this.tenantList = []
+ this.pagingParams = {
+ current: 1,
+ size: 10
+ }
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ background-color: #F5F5F5;
+ }
+
+ .header {
+ width: 100%;
+ // position: fixed;
+ /*#ifdef H5*/
+ top: 88rpx;
+ /*#endif*/
+ /*#ifdef MP-WEIXIN*/
+ top: 0;
+ /*#endif*/
+ left: 0;
+ // z-index: 10;
+ }
+
+ .filter-box {
+ width: 100%;
+ height: 100rpx;
+
+ }
+
+ .search-box {
+ padding: 20rpx 24rpx 30rpx;
+ }
+
+ .content {
+ width: 100%;
+ margin-top: 220rpx;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+
+ .row {
+ width: 100%;
+ padding: 20rpx 0;
+ }
+
+ .row-item {
+ width: calc(100% / 3 - 10rpx);
+ height: 46rpx;
+ border-radius: 30rpx;
+ padding: 0 20rpx;
+ box-sizing: border-box;
+ }
+
+ .dot {
+ width: 10rpx;
+ height: 10rpx;
+ border-radius: 50%;
+ margin-right: 18rpx;
+ }
+
+ .bgc-green {
+ background-color: #30D17C;
+ }
+
+ .bgc-orange {
+ background-color: #FFAC3D;
+ }
+
+ .list {
+ width: 100%;
+ padding: 30rpx 30rpx 0;
+ box-sizing: border-box;
+ margin-bottom: 20rpx;
+ border-radius: 8rpx;
+
+ .list-address {
+ padding: 30rpx 0;
+ }
+
+ .list-action {
+ padding: 22rpx 0 30rpx;
+ border-top: 1px solid #F5F5F5;
+ }
+
+ .action-item {
+ display: flex;
+ flex: 1;
+ justify-content: center;
+ }
+
+ .action-item:first-child {
+ border-right: 1px solid #DBDBDB;
+ }
+
+ .mr-50 {
+ margin-right: 50rpx;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/article/list.vue b/subPackage/article/list.vue
index a3833d6..bd80f17 100644
--- a/subPackage/article/list.vue
+++ b/subPackage/article/list.vue
@@ -53,7 +53,7 @@
},
onReachBottom() {
this.currentPage++
- this.getPageList()
+ this.getNoticeList()
},
methods: {
diff --git a/subPackage/house/member/index.vue b/subPackage/house/member/index.vue
index efa91aa..f5df12c 100644
--- a/subPackage/house/member/index.vue
+++ b/subPackage/house/member/index.vue
@@ -164,7 +164,7 @@
<!-- <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 :closeOnClickOverlay="true" v-if="typeShow" :show="typeShow" :columns="[selectBusList]"
+ <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>
</view>
</template>
@@ -283,7 +283,9 @@
selectBusList: [],
selectBusVal: '',
selectBusTitle: '',
- selectBusModel: ''
+ selectBusModel: '',
+ selectBusKey:"",
+ selectDefaultIndex:{}
}
},
created() {
@@ -338,15 +340,35 @@
// 获取所有字典
await this.getAllBizDict()
this.form = data
- this.roleTypeName = this.findObjValue(data.roleType, this.dataList.roleList)
- this.relationshipName = this.findObjValue(data.relationship, this.dataList.relationshipList)
- this.genderName = this.findObjValue(data.gender, this.dataList.genderList)
- this.isPrimaryContactName = this.findObjValue(data.isPrimaryContact, this.dataList.isPrimaryContactList)
- this.ethnicityName = this.findObjValue(data.ethnicity, this.dataList.ethnicityList)
- this.educationName = this.findObjValue(data.education, this.dataList.educationList)
- this.partyEmberName = this.findObjValue(data.partyEmber, this.dataList.partyEmberList)
- this.workStatusName = this.findObjValue(data.workStatus, this.dataList.workStatusList)
- this.maritalStatusName = this.findObjValue(data.maritalStatus, this.dataList.maritalStatusList)
+ // this.roleTypeName = this.findObjValue(data.roleType, this.dataList.roleList)
+ // this.relationshipName = this.findObjValue(data.relationship, this.dataList.relationshipList)
+ // this.genderName = this.findObjValue(data.gender, this.dataList.genderList)
+ // this.isPrimaryContactName = this.findObjValue(data.isPrimaryContact, this.dataList.isPrimaryContactList)
+ // this.ethnicityName = this.findObjValue(data.ethnicity, this.dataList.ethnicityList)
+ // this.educationName = this.findObjValue(data.education, this.dataList.educationList)
+ // this.partyEmberName = this.findObjValue(data.partyEmber, this.dataList.partyEmberList)
+ // this.workStatusName = this.findObjValue(data.workStatus, this.dataList.workStatusList)
+ // this.maritalStatusName = this.findObjValue(data.maritalStatus, this.dataList.maritalStatusList)
+
+ this.roleTypeName = this.findObjValue(data.roleType, this.dataList.roleList).name
+ this.selectDefaultIndex.roleType = this.findObjValue(data.roleType, this.dataList.roleList).index;
+ this.relationshipName = this.findObjValue(data.relationship, this.dataList.relationshipList).name;
+ this.selectDefaultIndex.relationshi = this.findObjValue(data.relationship, this.dataList.relationshipList).index;
+ this.genderName = this.findObjValue(data.gender, this.dataList.genderList).name;
+ this.selectDefaultIndex.gender = this.findObjValue(data.gender, this.dataList.genderList).index;
+ this.isPrimaryContactName = this.findObjValue(data.isPrimaryContact, this.dataList.isPrimaryContactList).name;
+ this.selectDefaultIndex.isPrimaryContact = this.findObjValue(data.isPrimaryContact, this.dataList.isPrimaryContactList).index;
+ this.ethnicityName = this.findObjValue(data.ethnicity, this.dataList.ethnicityList).name;
+ this.selectDefaultIndex.ethnicity = this.findObjValue(data.ethnicity, this.dataList.ethnicityList).index;
+ this.educationName = this.findObjValue(data.education, this.dataList.educationList).name;
+ this.selectDefaultIndex.education = this.findObjValue(data.education, this.dataList.educationList).index;
+ this.partyEmberName = this.findObjValue(data.partyEmber, this.dataList.partyEmberList).name;
+ this.selectDefaultIndex.partyEmber = this.findObjValue(data.partyEmber, this.dataList.partyEmberList).index;
+ this.workStatusName = this.findObjValue(data.workStatus, this.dataList.workStatusList).name;
+ this.selectDefaultIndex.workStatus = this.findObjValue(data.workStatus, this.dataList.workStatusList).index;
+ this.maritalStatusName = this.findObjValue(data.maritalStatus, this.dataList.maritalStatusList).name;
+ this.selectDefaultIndex.maritalStatus = this.findObjValue(data.maritalStatus, this.dataList.maritalStatusList).index;
+
},
// 显示选择弹框
showSelectBus(data, title, model, key) {
@@ -361,6 +383,7 @@
const [ result ] = item.value
this[this.selectBusModel] = result.name
this.form[this.selectBusKey] = result.value
+ this.selectDefaultIndex[this.selectBusKey] = item.indexs[0];
this.typeShow = !this.typeShow
},
//表单提交
@@ -414,13 +437,24 @@
})
},
findObjValue(value, obj) {
- if(value){
- const res = obj.find(item => {
- return item.value == value
- })
- return res.name
+ // if(value){
+ // const res = obj.find(item => {
+ // return item.value == value
+ // })
+ // return res.name
+ // }
+ // return ""
+ let data = {
+ index: "",
+ name:""
}
- return ""
+ 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;
},
// 跳转到首页
navigator() {
diff --git a/subPackage/user/editUserInfo/editUserInfo.vue b/subPackage/user/editUserInfo/editUserInfo.vue
new file mode 100644
index 0000000..3fc9db7
--- /dev/null
+++ b/subPackage/user/editUserInfo/editUserInfo.vue
@@ -0,0 +1,138 @@
+<template>
+ <view class="">
+ <view class="bgc-ff">
+ <view class="form-item flex j-c-s-b a-i-c">
+ <text class="f-30">头像</text>
+ <button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="chooseAvatar" >
+ <u-avatar :src="avatar" size="50"></u-avatar>
+ </button>
+ </view>
+ <view class="form-item flex j-c-s-b a-i-c">
+ <text class="f-30">昵称</text>
+ <view class="nickname">
+ <input class="nickname-value" type="nickname" placeholder="请输入昵称" v-model="info.nick_name" @blur="getInputValue" />
+ </view>
+
+ </view>
+ </view>
+ <footer-btn text="确定" />
+ </view>
+</template>
+
+<script>
+
+ import { updateUserInfo } from "@/api/user.js"
+ import {
+ Base64
+ } from '@/utils/base64.js';
+ import {
+ prodUrl,
+ clientId,
+ clientSecret
+ } from '@/common/setting'
+ export default {
+ data(){
+ return{
+ avatar:"",
+ info:{
+ avatar:"",
+ nick_name:""
+ },
+ header: {},
+ uploadConfig: {
+ url: prodUrl + "/blade-resource/oss/endpoint/put-file",
+ header: {},
+ },
+ }
+ },
+ onLoad() {
+ this.getHeader()
+ this.avatar = this.userInfo.avatar;
+ this.info.avatar = this.userInfo.avatar;
+ this.info.nick_name = this.userInfo.nick_name;
+ },
+ 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
+ },
+
+ chooseAvatar(e){
+ let {
+ avatarUrl
+ } = e.detail
+ this.uploadAvatar(avatarUrl)
+ },
+
+ uploadAvatar(url){
+ uni.uploadFile({
+ url:this.uploadConfig.url,
+ filePath: url,
+ name: 'file',
+ header: this.uploadConfig.header,
+ success:(res)=> {
+ let data = JSON.parse(res.data);
+ console.log(data.data);
+ this.info.avatar = data.data.name;
+ this.avatar = data.data.link;
+ }
+ })
+ },
+
+ getInputValue(e){
+ console.log(e);
+ this.info.nickname = e.detail.value;
+ },
+
+
+ submitInfo(){
+ updateUserInfo(this.info).then(res=>{
+ if(res.code == 200){
+ uni.showToast({
+ title:res.msg
+ })
+ setTimeout(()=>{
+ uni.navigateBack()
+ },300)
+ }
+ })
+ }
+
+ }
+ }
+</script>
+
+<style lang="scss">
+ page{
+ background-color:#f5f5f5;
+ }
+ .form-item{
+ padding:30rpx;
+ border-bottom:1px solid #f5f5f5;
+ }
+ .avatar-wrapper{
+ border:none;
+ background: transparent;
+ margin:0;
+ padding:0;
+ }
+ .avatar-wrapper::after{
+ border:none;
+ margin:0;
+ }
+ .nickname{
+ width:80%;
+ .nickname-value{
+ width:100%;
+ text-align: right;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/subPackage/user/family/edit.vue b/subPackage/user/family/edit.vue
index e61a2c1..dfdb330 100644
--- a/subPackage/user/family/edit.vue
+++ b/subPackage/user/family/edit.vue
@@ -172,7 +172,7 @@
<!-- <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 :closeOnClickOverlay="true" v-if="typeShow" :show="typeShow" :columns="[selectBusList]"
+ <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>
</view>
</template>
@@ -290,7 +290,9 @@
selectBusVal: '',
selectBusTitle: '',
selectBusModel: '',
- type: 1 //1添加 ,2编辑
+ type: 1 ,//1添加 ,2编辑
+ selectBusKey:"",
+ selectDefaultIndex:{}
}
},
created() {
@@ -348,15 +350,36 @@
// 获取所有字典
await this.getAllBizDict()
this.form = data
- this.roleTypeName = this.findObjValue(data.roleType, this.dataList.roleList)
- this.relationshipName = this.findObjValue(data.relationship, this.dataList.relationshipList)
- this.genderName = this.findObjValue(data.gender, this.dataList.genderList)
- this.isPrimaryContactName = this.findObjValue(data.isPrimaryContact, this.dataList.isPrimaryContactList)
- this.ethnicityName = this.findObjValue(data.ethnicity, this.dataList.ethnicityList)
- this.educationName = this.findObjValue(data.education, this.dataList.educationList)
- this.partyEmberName = this.findObjValue(data.partyEmber, this.dataList.partyEmberList)
- this.workStatusName = this.findObjValue(data.workStatus, this.dataList.workStatusList)
- this.maritalStatusName = this.findObjValue(data.maritalStatus, this.dataList.maritalStatusList)
+
+ // this.roleTypeName = this.findObjValue(data.roleType, this.dataList.roleList)
+ // this.relationshipName = this.findObjValue(data.relationship, this.dataList.relationshipList)
+ // this.genderName = this.findObjValue(data.gender, this.dataList.genderList)
+ // this.isPrimaryContactName = this.findObjValue(data.isPrimaryContact, this.dataList.isPrimaryContactList)
+ // this.ethnicityName = this.findObjValue(data.ethnicity, this.dataList.ethnicityList)
+ // this.educationName = this.findObjValue(data.education, this.dataList.educationList)
+ // this.partyEmberName = this.findObjValue(data.partyEmber, this.dataList.partyEmberList)
+ // this.workStatusName = this.findObjValue(data.workStatus, this.dataList.workStatusList)
+ // this.maritalStatusName = this.findObjValue(data.maritalStatus, this.dataList.maritalStatusList)
+
+ this.roleTypeName = this.findObjValue(data.roleType, this.dataList.roleList).name
+ this.selectDefaultIndex.roleType = this.findObjValue(data.roleType, this.dataList.roleList).index;
+ this.relationshipName = this.findObjValue(data.relationship, this.dataList.relationshipList).name;
+ this.selectDefaultIndex.relationshi = this.findObjValue(data.relationship, this.dataList.relationshipList).index;
+ this.genderName = this.findObjValue(data.gender, this.dataList.genderList).name;
+ this.selectDefaultIndex.gender = this.findObjValue(data.gender, this.dataList.genderList).index;
+ this.isPrimaryContactName = this.findObjValue(data.isPrimaryContact, this.dataList.isPrimaryContactList).name;
+ this.selectDefaultIndex.isPrimaryContact = this.findObjValue(data.isPrimaryContact, this.dataList.isPrimaryContactList).index;
+ this.ethnicityName = this.findObjValue(data.ethnicity, this.dataList.ethnicityList).name;
+ this.selectDefaultIndex.ethnicity = this.findObjValue(data.ethnicity, this.dataList.ethnicityList).index;
+ this.educationName = this.findObjValue(data.education, this.dataList.educationList).name;
+ this.selectDefaultIndex.education = this.findObjValue(data.education, this.dataList.educationList).index;
+ this.partyEmberName = this.findObjValue(data.partyEmber, this.dataList.partyEmberList).name;
+ this.selectDefaultIndex.partyEmber = this.findObjValue(data.partyEmber, this.dataList.partyEmberList).index;
+ this.workStatusName = this.findObjValue(data.workStatus, this.dataList.workStatusList).name;
+ this.selectDefaultIndex.workStatus = this.findObjValue(data.workStatus, this.dataList.workStatusList).index;
+ this.maritalStatusName = this.findObjValue(data.maritalStatus, this.dataList.maritalStatusList).name;
+ this.selectDefaultIndex.maritalStatus = this.findObjValue(data.maritalStatus, this.dataList.maritalStatusList).index;
+
},
// 显示选择弹框
showSelectBus(data, title, model, key) {
@@ -371,6 +394,7 @@
const [ result ] = item.value
this[this.selectBusModel] = result.name
this.form[this.selectBusKey] = result.value
+ this.selectDefaultIndex[this.selectBusKey] = item.indexs[0];
this.typeShow = !this.typeShow
},
//表单提交
@@ -424,13 +448,26 @@
})
},
findObjValue(value, obj) {
- if(value){
- const res = obj.find(item => {
- return item.value == value
- })
- return res.name
+ // if(value){
+ // const res = obj.find(item => {
+ // return item.value == value
+ // })
+ // return res.name
+ // }
+ // return ""
+ let data = {
+ index: "",
+ name:""
}
- return ""
+ 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;
+
+
},
delAction(){
@@ -459,8 +496,6 @@
}
})
}
-
-
}
}
</script>
diff --git a/subPackage/user/family/list.vue b/subPackage/user/family/list.vue
index fd1802c..0126ecd 100644
--- a/subPackage/user/family/list.vue
+++ b/subPackage/user/family/list.vue
@@ -64,7 +64,7 @@
<style lang="scss">
.list{
- padding:0 30rpx;
+ padding:0 30rpx 130rpx;
.list-item{
padding:30rpx 0;
border-bottom:1px solid #F5F5F5;
diff --git a/subPackage/workbench/views/bailReportDetail.vue b/subPackage/workbench/views/bailReportDetail.vue
index a110dcc..fcc9e0d 100644
--- a/subPackage/workbench/views/bailReportDetail.vue
+++ b/subPackage/workbench/views/bailReportDetail.vue
@@ -88,7 +88,7 @@
<u-upload :fileList="startImageUrls" :previewFullImage="uploadConfig.previewFullImage"
:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
:maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
- @afterRead="afterReadImgs($event,'startImageUrls')" @delete="deletePic">
+ @afterRead="afterReadImgs($event,'startImageUrls')" @delete="deletePics($event,'startImageUrls')">
<view class="upload-item upload-icon flex_base">
<u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
</view>
@@ -98,7 +98,7 @@
<u-upload :fileList="reachImageUrls" :previewFullImage="uploadConfig.previewFullImage"
:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
:maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
- @afterRead="afterReadImgs($event,'reachImageUrls')" @delete="deletePic">
+ @afterRead="afterReadImgs($event,'reachImageUrls')" @delete="deletePics($event,'reachImageUrls')">
<view class="upload-item upload-icon flex_base">
<u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
</view>
@@ -108,7 +108,7 @@
<u-upload :fileList="returnImageUrls" :previewFullImage="uploadConfig.previewFullImage"
:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
:maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
- @afterRead="afterReadImgs($event,'returnImageUrls')" @delete="deletePic">
+ @afterRead="afterReadImgs($event,'returnImageUrls')" @delete="deletePics($event,'returnImageUrls')">
<view class="upload-item upload-icon flex_base">
<u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
</view>
diff --git a/subPackage/workbench/views/cscj.vue b/subPackage/workbench/views/cscj.vue
index 55c2b26..4966ddc 100644
--- a/subPackage/workbench/views/cscj.vue
+++ b/subPackage/workbench/views/cscj.vue
@@ -1,5 +1,8 @@
<template>
<view class="container">
+ <view class="wrap">
+
+
<u-form labelWidth="70" :model="form" :rules="rules" ref="form">
<view class="item">
<!-- u-form-item v-if="!currentId" @click="showPicker = true" class="form-item" labelWidth="100" label="楼栋:"
@@ -23,7 +26,7 @@
</u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
- <view v-if="showLabelList.length" class="label" style="border-bottom:1px solid eff1f3;">
+ <view v-if="showLabelList.length" class="label" style="border-bottom:1px solid eff1f3;">
<view v-for="(item,index) in showLabelList" :key="index" class="activeLabel">
<u-tag :closable="currentId?false:true" :show="!item.isClose" size="mini" @close="delTag(item)"
:text="item.text"></u-tag>
@@ -41,8 +44,6 @@
</u-form-item>
</view>
-
-
<view class="item">
<view class="box-title">
<box-title title="负责人信息"></box-title>
@@ -59,15 +60,14 @@
</u-form-item>
</view>
- <view class="item pic" v-if="(currentId && form.images.length) || !currentId ">
+ <view class="item pic" v-if="(currentId && form.images.length) || !currentId ">
<view class="box-title">
<box-title title="场所照片"></box-title>
</view>
<u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
:accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
- :capture="uploadConfig.capture" uploadIcon="/static/icon/upload.png" @afterRead="afterReadImg" @delete="deletePic"
- :disabled="currentId?true:false" :deletable="currentId?false:true"
- >
+ :capture="uploadConfig.capture" uploadIcon="/static/icon/upload.png" @afterRead="afterReadImg"
+ @delete="deletePic" :disabled="currentId?true:false" :deletable="currentId?false:true">
</u-upload>
</view>
@@ -96,7 +96,7 @@
<u--image @click="imgPreview(scope.value)" width="200rpx" height="200rpx"
:src="scope.value"></u--image>
</view>
- <view class="" v-else>
+ <view class="" v-else>
{{scope.value}}
</view>
</template>
@@ -128,13 +128,13 @@
</view>
- <view class="bottom">
+ <!-- <view class="bottom">
<view class="btn">
<u-button @click="submit" type="primary" text="提交" v-if="!currentId"></u-button>
</view>
- </view>
-
-
+ </view> -->
+ </view>
+ <footer-btn @click="submit" v-if="!currentId" />
<uni-popup class="citys_win popup_win" ref="uniPopup" type="bottom">
<wyh-tree-select :items="labelList" title="标签选择" :showNav="true" defaultActiveColor="#4586fe"
@@ -171,7 +171,9 @@
format
} from "echarts";
import boxTitle from '../components/boxTitle/index.vue'
-import { minioBaseUrl } from "../../../common/setting";
+ import {
+ minioBaseUrl
+ } from "../../../common/setting";
export default {
mixins: [uploadMixin],
components: {
@@ -192,7 +194,7 @@
form: {
// buildingCode: "",
- images:[],
+ images: [],
label: "",
remark: "",
imageUrls: "",
@@ -345,7 +347,7 @@
showLabelList: [],
houseCode: "",
currentId: "",
- addressType:2
+ addressType: 2
}
},
watch: {
@@ -355,11 +357,9 @@
}
},
"form.buildingCode": {
- handler(newVal) {
- }
+ handler(newVal) {}
},
- showLabelList(newVal) {
- }
+ showLabelList(newVal) {}
},
created() {
@@ -375,14 +375,14 @@
console.log(option)
const {
type
- } = option
- if(option.addressType){
+ } = option
+ if (option.addressType) {
this.addressType = option.addressType
}
- if(option.id){
+ if (option.id) {
this.currentId = option.id
}
- if(option.houseCode){
+ if (option.houseCode) {
this.houseCode = option.houseCode
this.form.houseCode = option.houseCode
}
@@ -454,7 +454,7 @@
// addressType:this.addressType
}
}
- if(this.addressType){
+ if (this.addressType) {
idorCodeParams.addressType = this.addressType
}
if (this.currentId) {
@@ -504,22 +504,23 @@
}
if (key === "images") {
// this.form[key] = data.imageUrls
- if(data.imageUrls){
- this.form.images = this.$setImageUrl(data.imageUrls,2);
- }else {
+ if (data.imageUrls) {
+ this.form.images = this.$setImageUrl(data.imageUrls, 2);
+ } else {
this.form.images = []
}
}
})
this.form.building = arr.join("")
- setTimeout(()=>{
+ setTimeout(() => {
data.placePoiLabelVOList.forEach(item => {
- let label = this.labelList[0].children.find(sl => sl.text === item.labelName) || {}
+ let label = this.labelList[0].children.find(sl => sl.text === item
+ .labelName) || {}
label['isClose'] = false
label?.text && this.showLabelList.push(label)
})
- },500)
+ }, 500)
Object.keys(this.comprehensiveData).forEach(key => {
this.comprehensiveData[key].forEach(item => {
if (!data[item.name]) {
@@ -527,7 +528,7 @@
item.value = gridEntity[item.name] || '未完善'
} else {
item.value = data[item.name] || '未完善'
- if(item.name == "imageUrls" ){
+ if (item.name == "imageUrls") {
item.value = this.$setImageUrl(data[item.name])
// item.value = minioBaseUrl + data[item.name] || '未完善'
}
@@ -541,7 +542,7 @@
}
})
})
-
+
})
},
@@ -747,7 +748,10 @@
flex-direction: column;
background: #f5f5f5;
padding: 0 30rpx 20rpx 30rpx;
-
+ .wrap{
+ width:100%;
+ margin-bottom:120rpx;
+ }
.box-title {
padding: 10px 0;
diff --git a/subPackage/workbench/views/report.vue b/subPackage/workbench/views/report.vue
index 4bdd824..1fde3ad 100644
--- a/subPackage/workbench/views/report.vue
+++ b/subPackage/workbench/views/report.vue
@@ -192,6 +192,7 @@
padding: 10rpx 0;
.address {
width: 75%;
+ text-align: right;
}
}
}
--
Gitblit v1.9.3