其他页面同步

main
许宏杰 4 months ago
parent 3a5325039b
commit 89dde814d4

@ -34,6 +34,13 @@ export function updateBuilding(data) {
data: data, data: data,
}) })
} }
export function getNewBuilding(query) {
return request({
url: '/taicangpop/tc/appRedOrGreen',
method: 'get',
params: query,
})
}
// 删除楼栋管理 // 删除楼栋管理
export function delBuilding(id) { export function delBuilding(id) {

@ -21,7 +21,7 @@
<color-item :showBuildingName="true" :showColorName="false" :item="house" v-for="house in item" <color-item :showBuildingName="true" :showColorName="false" :item="house" v-for="house in item"
:key="house.id" @clickHouse="clickHouse"></color-item> :key="house.id" @clickHouse="clickHouse"></color-item>
</view> </view>
<view class="color-rows"> <view class="color-rows" v-show="groupedRooms && groupedRooms.length>0">
<view class="unitItem" v-for="unitItem in buildingInfo.unit" :key="unitItem"> <view class="unitItem" v-for="unitItem in buildingInfo.unit" :key="unitItem">
{{unitItem}} 单元 {{unitItem}} 单元
</view> </view>
@ -139,9 +139,11 @@
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss">
page { page,
.app-container {
background: #113666; background: #113666;
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>

@ -6,10 +6,11 @@
</u-dropdown> </u-dropdown>
<scroll-view scroll-y="true" :style="{height: `calc(100% - ${boxTop}rpx)`}" @scrolltolower="scrolltolower"> <scroll-view scroll-y="true" :style="{height: `calc(100% - ${boxTop}rpx)`}" @scrolltolower="scrolltolower">
<div class="building-list"> <div class="building-list">
<view class="building-item" v-for="item in buildingList" :key="item.id" @click="handlerBuilding(item)"> <view class="building-item" v-for="(item,index) in buildingList" :key="index"
@click="handlerBuilding(item)">
<text class="building-name">{{item.deptname}}{{item.name }}</text> <text class="building-name">{{item.deptname}}{{item.name }}</text>
<text class="yipaimo">已排查0户</text> <text class="yipaimo">已排查{{item.ygx || 0}}</text>
<text class="weipaimo">未排查0户</text> <text class="weipaimo">未排查{{item.wgx || 0}}</text>
</view> </view>
</div> </div>
@ -24,7 +25,8 @@
} from "vuex"; } from "vuex";
import { import {
appDeptname, appDeptname,
listBuilding getNewBuilding,
} from '@/api/taicangpop/building.js' } from '@/api/taicangpop/building.js'
export default { export default {
data() { data() {
@ -48,17 +50,19 @@
buildingList: [], buildingList: [],
} }
}, },
created() {
onLoad: function() {
const systemData = this.$u.sys() const systemData = this.$u.sys()
this.boxTop = (systemData.statusBarHeight + 44) * 2 + 80 this.boxTop = (systemData.statusBarHeight + 44) * 2 + 80
this.queryParams.xiaoquId = this.dept.xiaoquId
this.queryParams.deptId = this.deptId
}, },
onShow() {
onLoad: function() { this.queryParams.pageNum = 1
this.queryParams.xiaoquId = this.dept.xiaoquId this.total = 0
this.queryParams.deptId = this.dept.deptId this.buildingList = []
this.setBar() this.setBar()
this.getSelectList() this.getSelectList()
this.getBuildList() this.getBuildList()
@ -105,7 +109,7 @@
// //
async getBuildList() { async getBuildList() {
this.status = 'loading'; this.status = 'loading';
const res = await listBuilding(this.queryParams) const res = await getNewBuilding(this.queryParams)
this.buildingList = [...this.buildingList, ...res.rows] this.buildingList = [...this.buildingList, ...res.rows]
this.total = res.total this.total = res.total
this.queryParams.pageNum = this.queryParams.pageNum + 1 this.queryParams.pageNum = this.queryParams.pageNum + 1
@ -125,7 +129,7 @@
xiaoquId: this.queryParams.xiaoquId xiaoquId: this.queryParams.xiaoquId
}) })
this.selectList = res.data.map(item => { this.selectList = res.data.map(item => {
if (item.deptId == this.dept.deptId) this.selectTitle = item.deptName if (item.deptId == this.deptId) this.selectTitle = item.deptName
return { return {
label: item.deptName, label: item.deptName,
value: item.deptId value: item.deptId
@ -134,7 +138,7 @@
} }
}, },
computed: { computed: {
...mapGetters(["dept", ]), ...mapGetters(["deptId", "dept"]),
}, },
} }
</script> </script>

@ -1,9 +1,9 @@
<template> <template>
<view class="normal-login-container"> <view class="normal-login-container">
<view class="logo-content align-center justify-center flex"> <view class="logo-content align-center justify-center flex">
<image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix"> <!-- <image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
</image> </image> -->
<text class="title">若依移动端登录</text> <text class="title">娄东街道人口数据管理系统</text>
</view> </view>
<view class="login-form-content"> <view class="login-form-content">
<view class="input-item flex align-center"> <view class="input-item flex align-center">

@ -1,47 +1,65 @@
<template> <template>
<view class="container"> <navigation-general title="头像修改">
<view class="page-body uni-content-info"> <view class="container">
<view class='cropper-content'> <view class="page-body uni-content-info">
<view v-if="isShowImg" class="uni-corpper" :style="'width:'+cropperInitW+'px;height:'+cropperInitH+'px;background:#000'"> <view class='cropper-content'>
<view class="uni-corpper-content" :style="'width:'+cropperW+'px;height:'+cropperH+'px;left:'+cropperL+'px;top:'+cropperT+'px'"> <view v-if="isShowImg" class="uni-corpper"
<image :src="imageSrc" :style="'width:'+cropperW+'px;height:'+cropperH+'px'"></image> :style="'width:'+cropperInitW+'px;height:'+cropperInitH+'px;background:#000'">
<view class="uni-corpper-crop-box" @touchstart.stop="contentStartMove" @touchmove.stop="contentMoveing" @touchend.stop="contentTouchEnd" <view class="uni-corpper-content"
:style="'left:'+cutL+'px;top:'+cutT+'px;right:'+cutR+'px;bottom:'+cutB+'px'"> :style="'width:'+cropperW+'px;height:'+cropperH+'px;left:'+cropperL+'px;top:'+cropperT+'px'">
<view class="uni-cropper-view-box"> <image :src="imageSrc" :style="'width:'+cropperW+'px;height:'+cropperH+'px'"></image>
<view class="uni-cropper-dashed-h"></view> <view class="uni-corpper-crop-box" @touchstart.stop="contentStartMove"
<view class="uni-cropper-dashed-v"></view> @touchmove.stop="contentMoveing" @touchend.stop="contentTouchEnd"
<view class="uni-cropper-line-t" data-drag="top" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view> :style="'left:'+cutL+'px;top:'+cutT+'px;right:'+cutR+'px;bottom:'+cutB+'px'">
<view class="uni-cropper-line-r" data-drag="right" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view> <view class="uni-cropper-view-box">
<view class="uni-cropper-line-b" data-drag="bottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view> <view class="uni-cropper-dashed-h"></view>
<view class="uni-cropper-line-l" data-drag="left" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view> <view class="uni-cropper-dashed-v"></view>
<view class="uni-cropper-point point-t" data-drag="top" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view> <view class="uni-cropper-line-t" data-drag="top" @touchstart.stop="dragStart"
<view class="uni-cropper-point point-tr" data-drag="topTight"></view> @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-r" data-drag="right" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view> <view class="uni-cropper-line-r" data-drag="right" @touchstart.stop="dragStart"
<view class="uni-cropper-point point-rb" data-drag="rightBottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view> @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-b" data-drag="bottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove" @touchend.stop="dragEnd"></view> <view class="uni-cropper-line-b" data-drag="bottom" @touchstart.stop="dragStart"
<view class="uni-cropper-point point-bl" data-drag="bottomLeft"></view> @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-l" data-drag="left" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view> <view class="uni-cropper-line-l" data-drag="left" @touchstart.stop="dragStart"
<view class="uni-cropper-point point-lt" data-drag="leftTop"></view> @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-t" data-drag="top" @touchstart.stop="dragStart"
@touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-tr" data-drag="topTight"></view>
<view class="uni-cropper-point point-r" data-drag="right"
@touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-rb" data-drag="rightBottom"
@touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-b" data-drag="bottom"
@touchstart.stop="dragStart" @touchmove.stop="dragMove"
@touchend.stop="dragEnd"></view>
<view class="uni-cropper-point point-bl" data-drag="bottomLeft"></view>
<view class="uni-cropper-point point-l" data-drag="left"
@touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-lt" data-drag="leftTop"></view>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class='cropper-config'>
<button type="primary reverse" @click="getImage" style='margin-top: 30rpx;'> 选择头像 </button>
<button type="warn" @click="getImageInfo" style='margin-top: 30rpx;'> 提交 </button>
</view>
<canvas canvas-id="myCanvas"
:style="'position:absolute;border: 1px solid red; width:'+imageW+'px;height:'+imageH+'px;top:-9999px;left:-9999px;'"></canvas>
</view> </view>
<view class='cropper-config'>
<button type="primary reverse" @click="getImage" style='margin-top: 30rpx;'> 选择头像 </button>
<button type="warn" @click="getImageInfo" style='margin-top: 30rpx;'> 提交 </button>
</view>
<canvas canvas-id="myCanvas" :style="'position:absolute;border: 1px solid red; width:'+imageW+'px;height:'+imageH+'px;top:-9999px;left:-9999px;'"></canvas>
</view> </view>
</view> </navigation-general>
</template> </template>
<script> <script>
import config from '@/config' import config from '@/config'
import store from "@/store" import store from "@/store"
import { uploadAvatar } from "@/api/system/user" import {
uploadAvatar
const baseUrl = config.baseUrl } from "@/api/system/user"
const baseUrl = config.baseUrl
let sysInfo = uni.getSystemInfoSync() let sysInfo = uni.getSystemInfoSync()
let SCREEN_WIDTH = sysInfo.screenWidth let SCREEN_WIDTH = sysInfo.screenWidth
let PAGE_X, // x let PAGE_X, // x
@ -100,20 +118,20 @@
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { onReady: function() {
this.loadImage() this.loadImage()
}, },
methods: { methods: {
setData: function (obj) { setData: function(obj) {
let that = this let that = this
Object.keys(obj).forEach(function (key) { Object.keys(obj).forEach(function(key) {
that.$set(that.$data, key, obj[key]) that.$set(that.$data, key, obj[key])
}) })
}, },
getImage: function () { getImage: function() {
var _this = this var _this = this
uni.chooseImage({ uni.chooseImage({
success: function (res) { success: function(res) {
_this.setData({ _this.setData({
imageSrc: res.tempFilePaths[0], imageSrc: res.tempFilePaths[0],
}) })
@ -121,7 +139,7 @@
}, },
}) })
}, },
loadImage: function () { loadImage: function() {
var _this = this var _this = this
uni.getImageInfo({ uni.getImageInfo({
@ -139,7 +157,8 @@
INIT_DRAG_POSITION = minRange > INIT_DRAG_POSITION ? INIT_DRAG_POSITION : minRange INIT_DRAG_POSITION = minRange > INIT_DRAG_POSITION ? INIT_DRAG_POSITION : minRange
// //
if (IMG_RATIO >= 1) { if (IMG_RATIO >= 1) {
let cutT = Math.ceil((SCREEN_WIDTH / IMG_RATIO - (SCREEN_WIDTH / IMG_RATIO - INIT_DRAG_POSITION)) / 2) let cutT = Math.ceil((SCREEN_WIDTH / IMG_RATIO - (SCREEN_WIDTH / IMG_RATIO -
INIT_DRAG_POSITION)) / 2)
let cutB = cutT let cutB = cutT
let cutL = Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH + INIT_DRAG_POSITION) / 2) let cutL = Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH + INIT_DRAG_POSITION) / 2)
let cutR = cutL let cutR = cutL
@ -161,7 +180,8 @@
innerAspectRadio: IMG_RATIO innerAspectRadio: IMG_RATIO
}) })
} else { } else {
let cutL = Math.ceil((SCREEN_WIDTH * IMG_RATIO - (SCREEN_WIDTH * IMG_RATIO)) / 2) let cutL = Math.ceil((SCREEN_WIDTH * IMG_RATIO - (SCREEN_WIDTH * IMG_RATIO)) /
2)
let cutR = cutL let cutR = cutL
let cutT = Math.ceil((SCREEN_WIDTH - INIT_DRAG_POSITION) / 2) let cutT = Math.ceil((SCREEN_WIDTH - INIT_DRAG_POSITION) / 2)
let cutB = cutT let cutB = cutT
@ -253,12 +273,18 @@
destHeight: canvasH, destHeight: canvasH,
quality: 0.5, quality: 0.5,
canvasId: 'myCanvas', canvasId: 'myCanvas',
success: function (res) { success: function(res) {
uni.hideLoading() uni.hideLoading()
let data = {name: 'avatarfile', filePath: res.tempFilePath} let data = {
name: 'avatarfile',
filePath: res.tempFilePath
}
uploadAvatar(data).then(response => { uploadAvatar(data).then(response => {
store.commit('SET_AVATAR', baseUrl + response.imgUrl) store.commit('SET_AVATAR', baseUrl + response.imgUrl)
uni.showToast({ title: "修改成功", icon: 'success' }) uni.showToast({
title: "修改成功",
icon: 'success'
})
uni.navigateBack() uni.navigateBack()
}) })
} }
@ -290,7 +316,8 @@
case 'left': case 'left':
var dragLength = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO var dragLength = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
if (CUT_L - dragLength < 0) dragLength = CUT_L if (CUT_L - dragLength < 0) dragLength = CUT_L
if ((CUT_L - dragLength) > (this.cropperW - this.cutR)) dragLength = CUT_L - (this.cropperW - this.cutR) if ((CUT_L - dragLength) > (this.cropperW - this.cutR)) dragLength = CUT_L - (this.cropperW - this
.cutR)
this.setData({ this.setData({
cutL: CUT_L - dragLength cutL: CUT_L - dragLength
}) })
@ -298,7 +325,8 @@
case 'top': case 'top':
var dragLength = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO var dragLength = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_T - dragLength < 0) dragLength = CUT_T if (CUT_T - dragLength < 0) dragLength = CUT_T
if ((CUT_T - dragLength) > (this.cropperH - this.cutB)) dragLength = CUT_T - (this.cropperH - this.cutB) if ((CUT_T - dragLength) > (this.cropperH - this.cutB)) dragLength = CUT_T - (this.cropperH - this
.cutB)
this.setData({ this.setData({
cutT: CUT_T - dragLength cutT: CUT_T - dragLength
}) })
@ -382,6 +410,7 @@
image-orientation: 0deg !important; image-orientation: 0deg !important;
margin: 0 auto; margin: 0 auto;
} }
/* 移动图片效果 */ /* 移动图片效果 */
.uni-cropper-drag-box { .uni-cropper-drag-box {
@ -394,6 +423,7 @@
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
z-index: 1; z-index: 1;
} }
/* 内部的信息 */ /* 内部的信息 */
.uni-corpper-crop-box { .uni-corpper-crop-box {
@ -411,6 +441,7 @@
outline: 1rpx solid #69f; outline: 1rpx solid #69f;
outline-color: rgba(102, 153, 255, .75) outline-color: rgba(102, 153, 255, .75)
} }
/* 横向虚线 */ /* 横向虚线 */
.uni-cropper-dashed-h { .uni-cropper-dashed-h {
@ -422,6 +453,7 @@
border-top: 1rpx dashed rgba(255, 255, 255, 0.5); border-top: 1rpx dashed rgba(255, 255, 255, 0.5);
border-bottom: 1rpx dashed rgba(255, 255, 255, 0.5); border-bottom: 1rpx dashed rgba(255, 255, 255, 0.5);
} }
/* 纵向虚线 */ /* 纵向虚线 */
.uni-cropper-dashed-v { .uni-cropper-dashed-v {
@ -433,6 +465,7 @@
border-left: 1rpx dashed rgba(255, 255, 255, 0.5); border-left: 1rpx dashed rgba(255, 255, 255, 0.5);
border-right: 1rpx dashed rgba(255, 255, 255, 0.5); border-right: 1rpx dashed rgba(255, 255, 255, 0.5);
} }
/* 四个方向的线 为了之后的拖动事件*/ /* 四个方向的线 为了之后的拖动事件*/
.uni-cropper-line-t { .uni-cropper-line-t {
@ -615,6 +648,7 @@
margin-top: -3rpx; margin-top: -3rpx;
cursor: n-resize; cursor: n-resize;
} }
/* 裁剪框预览内容 */ /* 裁剪框预览内容 */
.uni-cropper-viewer { .uni-cropper-viewer {
@ -628,4 +662,4 @@
position: absolute; position: absolute;
z-index: 2; z-index: 2;
} }
</style> </style>

@ -1,198 +1,197 @@
<template> <template>
<view class="mine-container" :style="{height: `${windowHeight}px`}"> <view class="mine-container" :style="{height: `${windowHeight}px`}">
<!--顶部个人信息栏--> <!--顶部个人信息栏-->
<view class="header-section"> <view class="header-section" :style="{paddingTop:boxTop + 'px'}">
<view class="flex padding justify-between"> <view class="flex padding justify-between">
<view class="flex align-center"> <view class="flex align-center">
<view v-if="!avatar" class="cu-avatar xl round bg-white"> <view v-if="!avatar" class="cu-avatar xl round bg-white">
<view class="iconfont icon-people text-gray icon"></view> <view class="iconfont icon-people text-gray icon"></view>
</view> </view>
<image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round" mode="widthFix"> <image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round"
</image> mode="widthFix">
<view v-if="!name" @click="handleToLogin" class="login-tip"> </image>
点击登录 <view v-if="!name" @click="handleToLogin" class="login-tip">
</view> 点击登录
<view v-if="name" @click="handleToInfo" class="user-info"> </view>
<view class="u_title"> <view v-if="name" @click="handleToInfo" class="user-info">
用户名{{ name }} <view class="u_title">
</view> 用户名{{ name }}
</view> </view>
</view> </view>
<view @click="handleToInfo" class="flex align-center"> </view>
<text>个人信息</text>
<view class="iconfont icon-right"></view> </view>
</view> </view>
</view>
</view>
<view class="content-section"> <view class="menu-list">
<view class="mine-actions grid col-4 text-center"> <view class="list-cell list-cell-arrow" @click="handleToEditInfo">
<view class="action-item" @click="handleJiaoLiuQun"> <view class="menu-item-box">
<view class="iconfont icon-friendfill text-pink icon"></view>
<text class="text">交流群</text> <view class="iconfont icon-password menu-icon"></view>
</view> <view>修改密码</view>
<view class="action-item" @click="handleBuilding"> </view>
<view class="iconfont icon-service text-blue icon"></view> </view>
<text class="text">在线客服</text> <view class="list-cell list-cell-arrow" @click="handleToInfo">
</view> <view class="menu-item-box">
<view class="action-item" @click="handleBuilding"> <view class="iconfont icon-user menu-icon"></view>
<view class="iconfont icon-community text-mauve icon"></view> <view>个人信息</view>
<text class="text">反馈社区</text> </view>
</view> </view>
<view class="action-item" @click="handleBuilding"> </view>
<view class="iconfont icon-dianzan text-green icon"></view> <view class="outLogin">
<text class="text">点赞我们</text> <u-button type="primary" @click="handleLogout">退</u-button>
</view> </view>
</view>
<view class="menu-list"> </view>
<view class="list-cell list-cell-arrow" @click="handleToEditInfo"> </view>
<view class="menu-item-box">
<view class="iconfont icon-user menu-icon"></view>
<view>编辑资料</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleHelp">
<view class="menu-item-box">
<view class="iconfont icon-help menu-icon"></view>
<view>常见问题</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleAbout">
<view class="menu-item-box">
<view class="iconfont icon-aixin menu-icon"></view>
<view>关于我们</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleToSetting">
<view class="menu-item-box">
<view class="iconfont icon-setting menu-icon"></view>
<view>应用设置</view>
</view>
</view>
</view>
</view>
</view>
</template> </template>
<script> <script>
import storage from '@/utils/storage' import storage from '@/utils/storage'
export default { export default {
data() { data() {
return { return {
name: this.$store.state.user.name, boxTop: 0,
version: getApp().globalData.config.appInfo.version name: this.$store.state.user.name,
} version: getApp().globalData.config.appInfo.version
}, }
computed: { },
avatar() { onLoad() {
return this.$store.state.user.avatar const systemData = this.$u.sys()
}, this.boxTop = systemData.statusBarHeight
windowHeight() { },
return uni.getSystemInfoSync().windowHeight - 50 computed: {
} avatar() {
}, return this.$store.state.user.avatar
methods: { },
handleToInfo() { windowHeight() {
this.$tab.navigateTo('/pages/mine/info/index') return uni.getSystemInfoSync().windowHeight - 50
}, }
handleToEditInfo() { },
this.$tab.navigateTo('/pages/mine/info/edit') methods: {
}, handleLogout() {
handleToSetting() { this.$modal.confirm('确定注销并退出系统吗?').then(() => {
this.$tab.navigateTo('/pages/mine/setting/index') this.$store.dispatch('LogOut').then(() => {
}, this.$tab.reLaunch('/pages/index')
handleToLogin() { })
this.$tab.reLaunch('/pages/login') })
}, },
handleToAvatar() { handleToInfo() {
this.$tab.navigateTo('/pages/mine/avatar/index') this.$tab.navigateTo('/pages/mine/info/index')
}, },
handleLogout() { handleToEditInfo() {
this.$modal.confirm('确定注销并退出系统吗?').then(() => { this.$tab.navigateTo('/pages/mine/pwd/index')
this.$store.dispatch('LogOut').then(() => { },
this.$tab.reLaunch('/pages/index') handleToSetting() {
}) this.$tab.navigateTo('/pages/mine/setting/index')
}) },
}, handleToLogin() {
handleHelp() { this.$tab.reLaunch('/pages/login')
this.$tab.navigateTo('/pages/mine/help/index') },
}, handleToAvatar() {
handleAbout() { this.$tab.navigateTo('/pages/mine/avatar/index')
this.$tab.navigateTo('/pages/mine/about/index') },
}, handleLogout() {
handleJiaoLiuQun() { this.$modal.confirm('确定注销并退出系统吗?').then(() => {
this.$modal.showToast('QQ群①133713780、②146013835') this.$store.dispatch('LogOut').then(() => {
}, this.$tab.reLaunch('/pages/index')
handleBuilding() { })
this.$modal.showToast('模块建设中~') })
} },
} handleHelp() {
} this.$tab.navigateTo('/pages/mine/help/index')
},
handleAbout() {
this.$tab.navigateTo('/pages/mine/about/index')
},
handleJiaoLiuQun() {
this.$modal.showToast('QQ群①133713780、②146013835')
},
handleBuilding() {
this.$modal.showToast('模块建设中~')
}
}
}
</script> </script>
<style lang="scss"> <style lang="scss">
page { page {
background-color: #f5f6f7; background-color: #f5f6f7;
} }
.mine-container { .mine-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
.header-section { .header-section {
padding: 15px 15px 45px 15px; display: flex;
background-color: #3c96f3; align-items: center;
color: white;
.login-tip { height: 300rpx;
font-size: 18px; background-color: #3c96f3;
margin-left: 10px; color: white;
}
.login-tip {
.cu-avatar { font-size: 18px;
border: 2px solid #eaeaea; margin-left: 10px;
}
.icon {
font-size: 40px; .cu-avatar {
} border: 2px solid #eaeaea;
}
.icon {
.user-info { font-size: 40px;
margin-left: 15px; }
}
.u_title {
font-size: 18px; .user-info {
line-height: 30px; margin-left: 15px;
}
} .u_title {
} font-size: 18px;
line-height: 30px;
.content-section { }
position: relative; }
top: -50px; }
.mine-actions { .content-section {
margin: 15px 15px; position: relative;
padding: 20px 0px; top: -50px;
border-radius: 8px;
background-color: white; .mine-actions {
margin: 15px 15px;
.action-item { padding: 20px 0px;
.icon { border-radius: 8px;
font-size: 28px; background-color: white;
}
.action-item {
.text { .icon {
display: block; font-size: 28px;
font-size: 13px; }
margin: 8px 0px;
} .text {
} display: block;
} font-size: 13px;
} margin: 8px 0px;
} }
</style> }
}
}
}
.outLogin {
position: fixed;
bottom: 20%;
left: 50%;
transform: translateX(-50%);
width: 90%;
margin-top: 30rpx;
}
</style>

@ -1,44 +1,54 @@
<template> <template>
<view class="container"> <navigation-general title="个人信息">
<uni-list> <view class="container">
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称" :rightText="user.nickName" /> <uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="手机号码" :rightText="user.phonenumber" /> <uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称"
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="邮箱" :rightText="user.email" /> :rightText="user.nickName" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="岗位" :rightText="postGroup" /> <uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="手机号码"
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="角色" :rightText="roleGroup" /> :rightText="user.phonenumber" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="创建日期" :rightText="user.createTime" /> <uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="邮箱"
</uni-list> :rightText="user.email" />
</view> <uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="岗位"
:rightText="postGroup" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="角色"
:rightText="roleGroup" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="创建日期"
:rightText="user.createTime" />
</uni-list>
</view>
</navigation-general>
</template> </template>
<script> <script>
import { getUserProfile } from "@/api/system/user" import {
getUserProfile
} from "@/api/system/user"
export default { export default {
data() { data() {
return { return {
user: {}, user: {},
roleGroup: "", roleGroup: "",
postGroup: "" postGroup: ""
} }
}, },
onLoad() { onLoad() {
this.getUser() this.getUser()
}, },
methods: { methods: {
getUser() { getUser() {
getUserProfile().then(response => { getUserProfile().then(response => {
this.user = response.data this.user = response.data
this.roleGroup = response.roleGroup this.roleGroup = response.roleGroup
this.postGroup = response.postGroup this.postGroup = response.postGroup
}) })
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
page { page {
background-color: #ffffff; background-color: #ffffff;
} }
</style> </style>

@ -1,85 +1,89 @@
<template> <template>
<view class="pwd-retrieve-container"> <navigation-general title="修改密码">
<uni-forms ref="form" :value="user" labelWidth="80px"> <view class="pwd-retrieve-container">
<uni-forms-item name="oldPassword" label="旧密码"> <uni-forms ref="form" :value="user" labelWidth="80px">
<uni-easyinput type="password" v-model="user.oldPassword" placeholder="请输入旧密码" /> <uni-forms-item name="oldPassword" label="旧密码">
</uni-forms-item> <uni-easyinput type="password" v-model="user.oldPassword" placeholder="请输入旧密码" />
<uni-forms-item name="newPassword" label="新密码"> </uni-forms-item>
<uni-easyinput type="password" v-model="user.newPassword" placeholder="请输入新密码" /> <uni-forms-item name="newPassword" label="新密码">
</uni-forms-item> <uni-easyinput type="password" v-model="user.newPassword" placeholder="请输入新密码" />
<uni-forms-item name="confirmPassword" label="确认密码"> </uni-forms-item>
<uni-easyinput type="password" v-model="user.confirmPassword" placeholder="请确认新密码" /> <uni-forms-item name="confirmPassword" label="确认密码">
</uni-forms-item> <uni-easyinput type="password" v-model="user.confirmPassword" placeholder="请确认新密码" />
<button type="primary" @click="submit"></button> </uni-forms-item>
</uni-forms>
</view> </uni-forms>
</view>
<bottom-btn type="primary" title="提交" @handlerClick="submit"></bottom-btn>
</navigation-general>
</template> </template>
<script> <script>
import { updateUserPwd } from "@/api/system/user" import {
updateUserPwd
} from "@/api/system/user"
export default { export default {
data() { data() {
return { return {
user: { user: {
oldPassword: undefined, oldPassword: undefined,
newPassword: undefined, newPassword: undefined,
confirmPassword: undefined confirmPassword: undefined
}, },
rules: { rules: {
oldPassword: { oldPassword: {
rules: [{ rules: [{
required: true, required: true,
errorMessage: '旧密码不能为空' errorMessage: '旧密码不能为空'
}] }]
}, },
newPassword: { newPassword: {
rules: [{ rules: [{
required: true, required: true,
errorMessage: '新密码不能为空', errorMessage: '新密码不能为空',
}, },
{ {
minLength: 6, minLength: 6,
maxLength: 20, maxLength: 20,
errorMessage: '长度在 6 到 20 个字符' errorMessage: '长度在 6 到 20 个字符'
} }
] ]
}, },
confirmPassword: { confirmPassword: {
rules: [{ rules: [{
required: true, required: true,
errorMessage: '确认密码不能为空' errorMessage: '确认密码不能为空'
}, { }, {
validateFunction: (rule, value, data) => data.newPassword === value, validateFunction: (rule, value, data) => data.newPassword === value,
errorMessage: '两次输入的密码不一致' errorMessage: '两次输入的密码不一致'
} }]
] }
} }
} }
} },
}, onReady() {
onReady() { this.$refs.form.setRules(this.rules)
this.$refs.form.setRules(this.rules) },
}, methods: {
methods: { submit() {
submit() { this.$refs.form.validate().then(res => {
this.$refs.form.validate().then(res => { updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => { this.$modal.msgSuccess("修改成功")
this.$modal.msgSuccess("修改成功") })
}) })
}) }
} }
} }
}
</script> </script>
<style lang="scss"> <style lang="scss">
page { page {
background-color: #ffffff; background-color: #ffffff;
} }
.pwd-retrieve-container { .pwd-retrieve-container {
padding-top: 36rpx; padding-top: 36rpx;
padding: 15px; padding: 15px;
} }
</style> </style>

@ -2,7 +2,8 @@
<navigation-general :isBack="false" title="预警中心"> <navigation-general :isBack="false" title="预警中心">
<scroll-view scroll-y="true" :style="{height: `calc(100% - ${boxTop}rpx)`}" @scrolltolower="scrolltolower"> <scroll-view scroll-y="true" :style="{height: `calc(100% - ${boxTop}rpx)`}" @scrolltolower="scrolltolower">
<div class="building-list"> <div class="building-list">
<view class="building-item" v-for="(item,index) in buildingList" :key="index"> <view class="building-item" v-for="(item,index) in buildingList" :key="index"
@click="handlerCilck(item)">
<text class="building-name">{{item.pname }}</text> <text class="building-name">{{item.pname }}</text>
<color-item :item="item"></color-item> <color-item :item="item"></color-item>
<text class="building-name"> <text style="color: red;">{{item.daycount }}</text>天未更新</text> <text class="building-name"> <text style="color: red;">{{item.daycount }}</text>天未更新</text>
@ -56,6 +57,19 @@
this.getWarnList() this.getWarnList()
}, },
methods: { methods: {
handlerCilck(item) {
console.log(item)
this.$u.route({
url: 'pages/house/house',
params: {
buildingId: item.buildingId,
houseId: item.houseId,
deptId: item.deptId,
houseName: item.housename
}
})
},
// //
scrolltolower() { scrolltolower() {
if (this.buildingList.length >= this.total) { if (this.buildingList.length >= this.total) {

@ -101,6 +101,7 @@ const user = {
} }
commit('SET_NAME', username) commit('SET_NAME', username)
commit('SET_USER_ID', user.userId) commit('SET_USER_ID', user.userId)
commit('SET_DEPT_ID', user.dept.deptId)
commit('SET_DEPT', user.dept) commit('SET_DEPT', user.dept)
commit('SET_AVATAR', avatar) commit('SET_AVATAR', avatar)

Loading…
Cancel
Save