Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_app
9 files modified
1 files renamed
24 files added
| | |
| | | // 获取社区信息 |
| | | export const getHouseList = (type, name) => { |
| | | return http.request({ |
| | | url: '/blade-doorplateAddress/doorplateAddress/getHousesList', |
| | | url: 'blade-doorplateAddress/doorplateAddress/getHousesList', |
| | | method: 'GET', |
| | | params: { |
| | | type, |
| | |
| | | // 获取当前楼栋信息 |
| | | export const getHouseInfoList = (type, code) => { |
| | | return http.request({ |
| | | url: '/blade-doorplateAddress/doorplateAddress/getHousesList', |
| | | url: 'blade-doorplateAddress/doorplateAddress/getHousesList', |
| | | method: 'GET', |
| | | params: { |
| | | type, |
| | |
| | | // 获取当前房屋出租信息 |
| | | export const getHouseRentInfo = (code) => { |
| | | return http.request({ |
| | | url: '/blade-doorplateAddress/doorplateAddress/getHouseRentInfo', |
| | | url: 'blade-doorplateAddress/doorplateAddress/getHouseRentInfo', |
| | | method: 'GET', |
| | | params: { |
| | | code |
| | |
| | | // 获取房屋标签信息 |
| | | export const getHouseLabelList = () => { |
| | | return http.request({ |
| | | url: '/blade-label/label/getLabelList', |
| | | url: 'blade-label/label/getLabelList', |
| | | method: 'GET', |
| | | params: { |
| | | parentId: 1001 |
| | |
| | | // 获取房屋详细信息 |
| | | export const getHouseDetail = (houseCode) => { |
| | | return http.request({ |
| | | url: '/blade-house/house/getHouseDetail', |
| | | url: 'blade-house/house/getHouseDetail', |
| | | method: 'GET', |
| | | params: { |
| | | houseCode |
| | |
| | | |
| | | export const uploadFile = (data) => { |
| | | return http.request({ |
| | | url: '/blade-resource/oss/endpoint/put-file', |
| | | url: 'blade-resource/oss/endpoint/put-file', |
| | | method: 'post', |
| | | custom: { |
| | | Authorization: true |
| New file |
| | |
| | | import http from '@/http/api.js' |
| | | |
| | | //删除 |
| | | export const deleteRentalInfo = (id) => { |
| | | return http.request({ |
| | | url: 'blade-houseRental/houseRental/removeHouseRental', |
| | | method: 'POST', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 续租 |
| | | export const updateDueTime = (data) => { |
| | | return http.request({ |
| | | url: 'blade-houseRental/houseRental/update', |
| | | method: 'POST', |
| | | custom: { |
| | | 'Authorization': true |
| | | }, |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 修改数据 |
| | | // 续租 |
| | | export const updateRetalInfo = (data) => { |
| | | return http.request({ |
| | | url: '/blade-houseRental/houseRental/updateHouseRental', |
| | | method: 'POST', |
| | | custom: { |
| | | 'Authorization': true |
| | | }, |
| | | data |
| | | }) |
| | | } |
| | |
| | | version: '2.0.0', |
| | | // 开发环境接口Url |
| | | // devUrl: 'https://sk.hubeishuiyi.cn', |
| | | devUrl: 'http://192.168.1.156:9528', |
| | | // devUrl: 'http://192.168.1.156:9528', |
| | | devUrl:'http://192.168.0.207:9528', |
| | | // 数据中台接口url |
| | | // dataCenterUrl: 'http://10.10.2.192/services', |
| | | dataCenterUrl: 'https://sk.hubeishuiyi.cn/services', |
| | |
| | | { |
| | | "path": "views/zhsb", |
| | | "style": { |
| | | "navigationBarTitleText": "出租管理", |
| | | "navigationBarBackgroundColor": "#4586fe", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarTitleText": "租客上报", |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | |
| | | "path": "views/rentDetail", |
| | | "style": { |
| | | "navigationBarTitleText": "租户详情", |
| | | "navigationBarBackgroundColor": "#4586fe", |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | } |
| | |
| | | "list": [{ |
| | | "pagePath": "pages/home/index", |
| | | "selectedIconPath": "static/img/tabbar-01-selected.png", |
| | | "iconPath": "static/img/tabbar-01-selected.png", |
| | | "iconPath": "static/img/tabbar-01.png", |
| | | "text": "首页" |
| | | }, |
| | | { |
| | |
| | | <template>
|
| | | <view class="">
|
| | | <u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder>
|
| | | <u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder @leftClick="selectBoxShow = !selectBoxShow">
|
| | | <view slot="left" class="flex">
|
| | | <text class="top">万达华府26栋1903室</text>
|
| | | <text class="top">{{curSelectSite.name?curSelectSite.name:'暂无绑定' +roleTypeName+'信息'}}</text>
|
| | | <u-icon name="/static/icon/change-icon.png"></u-icon>
|
| | | </view>
|
| | | </u-navbar>
|
| | |
| | | <view class="swiper">
|
| | | <u-swiper :list="swiperList"></u-swiper>
|
| | | </view>
|
| | | <view class="">
|
| | | <view class="" v-if="roleType != 1">
|
| | | <u-grid :border="false" col="4">
|
| | | <u-grid-item v-for="(i,k) in menuList" :key="k" >
|
| | | <u-grid-item v-for="(i,k) in cellList" :key="k">
|
| | | <u-icon :name="i.icon" :size="45"></u-icon>
|
| | | <text class="f-26 mt-20">{{i.text}}</text>
|
| | | </u-grid-item>
|
| | | </u-grid>
|
| | |
|
| | | <view class="section flex j-c-s-b mt-40">
|
| | | <view class="section-item" v-for="i in navList">
|
| | | <image class="section-item-bg" src="/static/icon/nav-bg-01.png" mode="aspectFill"></image>
|
| | | <image class="section-item-bg" :src="i.bgImg" mode="aspectFill"></image>
|
| | | <view class="item-box">
|
| | | <view class="f-28">{{i.title}}</view>
|
| | | <view class="flex j-c-s-b">
|
| | |
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="notic">
|
| | | <view class="notic-caption flex a-i-c j-c-s-b">
|
| | | <view class="block flex a-i-c j-c-s-b" v-if="roleType == 1">
|
| | | <view 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="90rpx" height="90rpx"></u-icon>
|
| | | <view class="item-text flex f-d-c j-c-s-b">
|
| | | <text class="f-32 fw">扫一扫</text>
|
| | | <text class="f-26 opacity">场所采集</text>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="block-item">
|
| | | <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="90rpx" height="90rpx"></u-icon>
|
| | | <view class="item-text flex f-d-c j-c-s-b">
|
| | | <text class="f-32 fw">打卡登记</text>
|
| | | <text class="f-26 opacity">在线打卡</text>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="" v-if="hasMenu('楼盘表').length>0">
|
| | | <view class="caption">
|
| | | <view class="flex a-i-c">
|
| | | <view class="line"></view>
|
| | | <text class="f-32 fw">楼盘表</text>
|
| | | </view>
|
| | | </view>
|
| | | <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)">
|
| | | <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>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="" v-if="roleType == 1 && jobList.length>0">
|
| | | <view class="caption">
|
| | | <view class="flex a-i-c">
|
| | | <view class="line"></view>
|
| | | <text class="f-32 fw">工作台</text>
|
| | | </view>
|
| | | </view>
|
| | | <u-grid :border="false" col="4">
|
| | | <u-grid-item v-for="(item, index) in jobList" :index="index" :key="index"
|
| | | :customStyle="{paddingTop:20+'rpx'}">
|
| | | <view class="grid-item flex f-d-c a-i-c" :style="{background:item.style.background}">
|
| | | <u-icon :name="item.imgUrl" width="60rpx" height="60rpx"></u-icon>
|
| | | <text class="grid-text f-24">{{item.title}}</text>
|
| | | </view>
|
| | |
|
| | | </u-grid-item>
|
| | | </u-grid>
|
| | | </view>
|
| | |
|
| | | <view class="mt-40" v-if="roleType != 3">
|
| | | <view class="caption">
|
| | | <view class="flex a-i-c">
|
| | | <view class="line"></view>
|
| | | <text class="f-32 fw">我的任务</text>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="row flex j-c-s-b">
|
| | | <view class="row-item flex_base">
|
| | | <u-icon></u-icon>
|
| | | <view class="flex f-d-c fw">
|
| | | <text class="f-28">一次性</text>
|
| | | <text class="f-36">8</text>
|
| | | </view>
|
| | | </view>
|
| | | <view class="row-item flex_base">
|
| | | <u-icon></u-icon>
|
| | | <view class="flex f-d-c fw">
|
| | | <text class="f-28">周期性</text>
|
| | | <text class="f-36">8</text>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | <u-cell-group>
|
| | | <u-cell :icon="i.icon" :iconStyle="{width:'40rpx',height:'40rpx',marginRight:'18rpx'}"
|
| | | :title="i.title" v-for="i in taskList" :value="i.status"></u-cell>
|
| | | </u-cell-group>
|
| | | </view>
|
| | |
|
| | | <view class="notic" v-if="roleType == 3">
|
| | | <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">通知公告</text>
|
| | |
| | |
|
| | | </view>
|
| | | </view>
|
| | | |
| | | <u-picker :title="roleTypeName" :show="selectBoxShow" keyName="name" ref="uPicker" :columns="siteColumns"
|
| | | @confirm="confirmSite" @change="changeSite" @cancel="selectBoxShow = false"></u-picker>
|
| | | </view>
|
| | |
|
| | | </view>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import {
|
| | | getFuncList,
|
| | | getHouseList
|
| | | } from "@/api/doorplateAddress/doorplateAddress";
|
| | | export default {
|
| | | data() {
|
| | | return {
|
| | |
| | | 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
|
| | | 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
|
| | | ],
|
| | | menuList: [{
|
| | | cellList: [{
|
| | | icon: "/static/icon/nav-01.png",
|
| | | text: "扫一扫"
|
| | | },
|
| | |
| | | text: "租客上报"
|
| | | }
|
| | | ],
|
| | | navList: [
|
| | | {
|
| | | navList: [{
|
| | | title:"物业",
|
| | | name:"张三",
|
| | | icon:"/static/icon/tel-green.png",
|
| | |
| | | icon:"/static/icon/tel-blue.png",
|
| | | bgImg:"/static/nav-bg-03.png"
|
| | | },
|
| | | ]
|
| | | ],
|
| | | jobList: [{
|
| | | icon: "/static/icon/menu-01.png",
|
| | | text: "场所记录",
|
| | | style: {
|
| | | background: 'linear-gradient(133deg, #FFFCF9 0%, rgba(255,252,249,0) 100%)',
|
| | | }
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/menu-02.png",
|
| | | text: "场所采集",
|
| | | style: {
|
| | | background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
|
| | | }
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/menu-03.png",
|
| | | text: "出租房管理",
|
| | | style: {
|
| | | background: 'linear-gradient(131deg, #FCF8FF 0%, rgba(252,248,255,0) 100%)',
|
| | | }
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/menu-04.png",
|
| | | text: "出租房管理",
|
| | | style: {
|
| | | background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
|
| | | }
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/menu-05.png",
|
| | | text: "场所维护",
|
| | | style: {
|
| | | background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
|
| | | }
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/menu-06.png",
|
| | | text: "报事审核",
|
| | | style: {
|
| | | background: 'linear-gradient(137deg, #FFF4F3 0%, rgba(255,244,243,0) 100%)',
|
| | | }
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/menu-07.png",
|
| | | text: "校园安全",
|
| | | style: {
|
| | | background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
|
| | | }
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/menu-08.png",
|
| | | text: "旅馆安全",
|
| | | style: {
|
| | | background: 'linear-gradient(131deg, #FCF8FF 0%, rgba(252,248,255,0) 100%)',
|
| | | }
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/menu-09.png",
|
| | | text: "取保候审",
|
| | | style: {
|
| | | background: 'linear-gradient(137deg, #FFF4F3 0%, rgba(255,244,243,0) 100%)',
|
| | | }
|
| | | },
|
| | | ],
|
| | | taskList: [{
|
| | | icon: "/static/icon/cell-01.png",
|
| | | title: "综治任务",
|
| | | status: "待处理0"
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/cell-02.png",
|
| | | title: "住建任务",
|
| | | status: "待处理0"
|
| | | },
|
| | | {
|
| | | icon: "/static/icon/cell-03.png",
|
| | | title: "公安任务",
|
| | | status: "待处理0"
|
| | | }
|
| | | ],
|
| | | roleType: 1, // 1网格员/系统管理员 、2场所负责人、 3居民
|
| | | roleTypeName:"街道社区网格",
|
| | | selectBoxShow: false,
|
| | | siteColumns: [],
|
| | | curSelectSite: {},
|
| | | columnData: [],
|
| | | houseDataList: [{
|
| | | title: '-',
|
| | | useSlot: true
|
| | | }],
|
| | | jobList:[],
|
| | | menuList:[]
|
| | | }
|
| | | },
|
| | |
|
| | | onLoad() {
|
| | | console.log(uni.getStorageSync("activeRole"))
|
| | |
|
| | | },
|
| | | onShow() {
|
| | | this.init()
|
| | | },
|
| | | computed: {
|
| | | hasMenu() {
|
| | | return (name) => {
|
| | | let resultArr = []
|
| | | resultArr = this.getMenu(name, this.menuList, resultArr)
|
| | | if (resultArr.length > 0) {
|
| | | return resultArr
|
| | | } else {
|
| | | return []
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | | },
|
| | |
|
| | | methods: {
|
| | | |
| | | //初始化
|
| | | init() {
|
| | | this.curSelectSite = {}
|
| | | this.menuList = uni.getStorageSync("menu")
|
| | | this.selectRole = uni.getStorageSync("activeRole")
|
| | | console.log(uni.getStorageSync("activeRole"))
|
| | | this.getMenuList()
|
| | | this.getSiteList()
|
| | | // uni.hideTabBar()
|
| | | },
|
| | |
|
| | | //获取场所列表
|
| | | async getSiteList() {
|
| | | console.log(this.selectRole)
|
| | | let type = null
|
| | | let roleName = this.selectRole.roleName
|
| | | console.log("roleName", roleName)
|
| | | if (roleName == '网格员' || roleName == '系统管理员') {
|
| | | type = 1
|
| | | this.roleType = 1;
|
| | | this.roleTypeName = "街道社区网格"
|
| | | } else if (roleName == '场所负责人') {
|
| | | type = 2
|
| | | this.roleType = 2
|
| | | this.roleTypeName = "场所"
|
| | | } else if (roleName == '居民') {
|
| | | type = 3
|
| | | this.roleType = 3
|
| | | this.roleTypeName = "居民"
|
| | | }
|
| | |
|
| | | const res = await getFuncList(type, roleName)
|
| | | console.log(res, "-----------")
|
| | | let data = res.data
|
| | | this.siteColumns = []
|
| | |
|
| | | this.buildSiteColumn(data, 0)
|
| | | console.log(this.siteColumns)
|
| | |
|
| | | },
|
| | |
|
| | | buildSiteColumn(dataList, index) {
|
| | | if (dataList.length > 0) {
|
| | | this.siteColumns[index] = dataList
|
| | | if (dataList[0].children && dataList[0].children.length > 0) {
|
| | | this.buildSiteColumn(dataList[0].children, index + 1)
|
| | | }
|
| | | }
|
| | | },
|
| | |
|
| | |
|
| | | // 获取楼盘
|
| | | async getHouseDataList(name) {
|
| | | const res = await getHouseList(1, name)
|
| | | console.log(res);
|
| | | res.data.forEach(item => {
|
| | | item.title = item.name
|
| | | item.useSlot = true
|
| | | delete item.name
|
| | | })
|
| | | this.houseDataList = res.data || [{
|
| | | title: '-',
|
| | | useSlot: true
|
| | | }]
|
| | | },
|
| | |
|
| | |
|
| | | changeSite(e) {
|
| | | const {
|
| | | columnIndex,
|
| | | value,
|
| | | values, // values为当前变化列的数组内容
|
| | | index,
|
| | | // 微信小程序无法将picker实例传出来,只能通过ref操作
|
| | | picker = this.$refs.uPicker
|
| | | } = e
|
| | | // 当第一列值发生变化时,变化第二列(后一列)对应的选项
|
| | | if (columnIndex === 0 && this.columnData.length > 0) {
|
| | | // picker为选择器this实例,变化第二列对应的选项
|
| | | picker.setColumnValues(1, this.columnData[index])
|
| | | }
|
| | | },
|
| | | // 回调参数为包含columnIndex、value、values
|
| | | confirmSite(e) {
|
| | | console.log('confirm', e)
|
| | | this.curSelectSite = e.value[e.value.length - 1]
|
| | | this.selectBoxShow = false
|
| | | this.getHouseDataList(e.value[1].name)
|
| | | },
|
| | | getMenu(menuName, menuList, resultArr) {
|
| | | // console.log(menuList, menuName)
|
| | | for (var i = 0; i < menuList.length; i++) {
|
| | | if (menuList[i].name == menuName) {
|
| | | resultArr.push(menuList[i])
|
| | | } else {
|
| | | if (menuList[i].children && menuList[i].children.length) {
|
| | | this.getMenu(menuName, menuList[i].children, resultArr);
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | return resultArr
|
| | | |
| | | },
|
| | | |
| | | //获取首页菜单
|
| | | getMenuList() {
|
| | | console.log("当前角色菜单", this.menuList)
|
| | | this.getPhoneList()
|
| | | this.getLiveList()
|
| | | this.getWorkbenchList()
|
| | | },
|
| | | getPhoneList() {
|
| | | this.gridDataList = []
|
| | | const resultArr = this.hasMenu('快捷拨号')
|
| | | if (resultArr.length == 0) {
|
| | | return
|
| | | }
|
| | | |
| | | const topMenu = resultArr[0]
|
| | | |
| | | topMenu.children.forEach(menu => {
|
| | | this.gridDataList.push({
|
| | | title: menu.name,
|
| | | data: "无数据",
|
| | | phone: "无"
|
| | | })
|
| | | })
|
| | | },
|
| | | |
| | | //获取生活菜单
|
| | | getLiveList() {
|
| | | this.liveList = []
|
| | | const resultArr = this.hasMenu('生活')
|
| | | if (resultArr.length == 0) {
|
| | | return
|
| | | }
|
| | | |
| | | const topMenu = resultArr[0]
|
| | | |
| | | topMenu.children.forEach(menu => {
|
| | | this.liveList.push({
|
| | | imgUrl: menu.source,
|
| | | title: menu.name,
|
| | | })
|
| | | })
|
| | | },
|
| | | |
| | | //获取工作台菜单
|
| | | getWorkbenchList() {
|
| | | this.jobList = []
|
| | | const resultArr = this.hasMenu('工作台')
|
| | | if (resultArr.length == 0) {
|
| | | return
|
| | | }
|
| | | |
| | | const topMenu = resultArr[0]
|
| | | |
| | | topMenu.children.forEach(menu => {
|
| | | this.jobList.push({
|
| | | imgUrl: menu.source,
|
| | | title: menu.name,
|
| | | })
|
| | | })
|
| | | },
|
| | | |
| | | // 页面跳转
|
| | | pushPage({id, title}) {
|
| | | if (id !== void 0) {
|
| | | let url = `/subPackage/house/list/index?id=${id}&title=${title}`
|
| | | this.$u.func.globalNavigator(url, "navTo")
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | .content {
|
| | | padding: 0 30rpx;
|
| | | }
|
| | |
|
| | | .section{
|
| | | .section-item{
|
| | | width: 216rpx;
|
| | | height:120rpx;
|
| | | position: relative;
|
| | | }
|
| | |
|
| | | .section-item-bg{
|
| | | width: 216rpx;
|
| | | height:120rpx;
|
| | | }
|
| | |
|
| | | .item-box{
|
| | | width:216rpx;
|
| | | height:120rpx;
|
| | |
| | | box-sizing: border-box;
|
| | | }
|
| | | }
|
| | |
|
| | | .notic{
|
| | | width:100%;
|
| | | .notic-caption{
|
| | |
|
| | | .notic-list {
|
| | | padding: 30rpx 0;
|
| | | border-bottom: 1px solid #f5f5f5;
|
| | | }
|
| | | }
|
| | |
|
| | | .caption {
|
| | | width:100%;
|
| | | padding:40rpx 0 0;
|
| | | }
|
| | |
|
| | | .line{
|
| | | width:6rpx;
|
| | | height:29rpx;
|
| | | background-color:#017BFC;
|
| | | margin-right:14rpx;
|
| | | }
|
| | | .notic-list{
|
| | | padding:30rpx 0;
|
| | | border-bottom:1px solid #f5f5f5;
|
| | | }
|
| | |
|
| | | .block {
|
| | | .block-item {
|
| | | position: relative;
|
| | | }
|
| | |
|
| | | .block-item,
|
| | | .block-item-bg,
|
| | | .block-item-box {
|
| | | width: 334rpx;
|
| | | height: 170rpx;
|
| | | }
|
| | |
|
| | | .block-item-box {
|
| | | padding: 0 30rpx;
|
| | | box-sizing: border-box;
|
| | | position: absolute;
|
| | | top: 0;
|
| | | left: 0;
|
| | | }
|
| | |
|
| | | .item-text {
|
| | | height: 90rpx;
|
| | | margin-left: 22rpx;
|
| | | 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;
|
| | | }
|
| | | }
|
| | | </style> |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <u-navbar height="48" bgColor="#5887f9" :autoBack="false" safeAreaInsetTop placeholder> |
| | | <view slot="left"> |
| | | <u--text color="#ffffff" text="基层智治" size="18" /> |
| | | <view class=""> |
| | | <view class="header flex a-i-c"> |
| | | <u-avatar size="80"></u-avatar> |
| | | <view class="flex f-d-c ml-20"> |
| | | <text class="f-36 mb-20 fw">张三</text> |
| | | <text class="f-28 c-99">您好业主,欢迎回家</text> |
| | | </view> |
| | | </u-navbar> |
| | | </view> |
| | | |
| | | <view class="main"> |
| | | <view class="main-bg"> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <view class="main-cell"> |
| | | <view class="cell-content"> |
| | | <u-cell-group :border="false"> |
| | | <u-cell @click="navigator(item)" v-for="(item, index) in cellGroupData" :icon="item.icon" |
| | | :title="item.title" :key="index" :border="false"></u-cell> |
| | | <u-cell @click="navigator(item)" v-for="(item, index) in menuList" :icon="item.icon" |
| | | :title="item.title" :key="index" :border="false" :iconStyle="{width:'48rpx',height:'48rpx'}" :isLink="true" ></u-cell> |
| | | </u-cell-group> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <tabBar @change='change' :currentTab="1"></tabBar> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import tabBar from "@/components/tabBar/tabBar.vue"; |
| | | |
| | | export default { |
| | | components: { |
| | | tabBar, |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | cellGroupData: [{ |
| | | title: '我的家人', |
| | | icon: 'account-fill', |
| | | url: '' |
| | | menuList:[ |
| | | { |
| | | icon:"/static/icon/menu-center-01.png", |
| | | title:"我的家人", |
| | | url:"" |
| | | }, |
| | | { |
| | | title: '切换角色', |
| | | icon: 'account-fill', |
| | | url: '/subPackage/user/role/index' |
| | | icon:"/static/icon/menu-center-02.png", |
| | | title:"切换角色", |
| | | url:"/subPackage/user/role/index" |
| | | }, |
| | | { |
| | | title: '修改密码', |
| | | icon: 'account-fill', |
| | | url: '' |
| | | icon:"/static/icon/menu-center-03.png", |
| | | title:"修改密码", |
| | | url:"" |
| | | }, |
| | | { |
| | | title: '退出登录', |
| | | icon: 'account-fill', |
| | | url: '' |
| | | } |
| | | icon:"/static/icon/menu-center-04.png", |
| | | title:"退出登录", |
| | | url:"" |
| | | }, |
| | | |
| | | ] |
| | | } |
| | | }, |
| | | onShow() { |
| | | uni.hideTabBar() |
| | | }, |
| | | |
| | | methods: { |
| | | change(index) { |
| | | let url = index |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .container { |
| | | <style> |
| | | page{ |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | display: flex; |
| | | flex-direction: column; |
| | | background: #F9F9FA; |
| | | |
| | | .main { |
| | | position: relative; |
| | | height: 0; |
| | | flex: 1; |
| | | overflow-y: auto; |
| | | |
| | | .main-bg { |
| | | height: 36%; |
| | | background: royalblue; |
| | | background: linear-gradient(96deg, #E2EFFF 0%, rgba(255,255,255,0) 100%); |
| | | } |
| | | |
| | | .main-cell { |
| | | position: absolute; |
| | | top: 34%; |
| | | .header{ |
| | | width: 100%; |
| | | height: 66%; |
| | | border-radius: 10rpx 10rpx 0 0; |
| | | z-index: 11; |
| | | background: #fff; |
| | | |
| | | .cell-content { |
| | | margin-top: 240rpx; |
| | | } |
| | | } |
| | | } |
| | | padding:120rpx 38rpx 80rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <u-navbar height="48" bgColor="#5887f9" :autoBack="false" safeAreaInsetTop placeholder> |
| | | <view slot="left"> |
| | | <u--text color="#ffffff" text="基层智治" size="18" /> |
| | | </view> |
| | | </u-navbar> |
| | | |
| | | <view class="main"> |
| | | <view class="main-bg"> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <view class="main-cell"> |
| | | <view class="cell-content"> |
| | | <u-cell-group :border="false"> |
| | | <u-cell @click="navigator(item)" v-for="(item, index) in cellGroupData" :icon="item.icon" |
| | | :title="item.title" :key="index" :border="false"></u-cell> |
| | | </u-cell-group> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <tabBar @change='change' :currentTab="1"></tabBar> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import tabBar from "@/components/tabBar/tabBar.vue"; |
| | | |
| | | export default { |
| | | components: { |
| | | tabBar, |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | cellGroupData: [{ |
| | | title: '我的家人', |
| | | icon: 'account-fill', |
| | | url: '' |
| | | }, |
| | | { |
| | | title: '切换角色', |
| | | icon: 'account-fill', |
| | | url: '/subPackage/user/role/index' |
| | | }, |
| | | { |
| | | title: '修改密码', |
| | | icon: 'account-fill', |
| | | url: '' |
| | | }, |
| | | { |
| | | title: '退出登录', |
| | | icon: 'account-fill', |
| | | url: '' |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | onShow() { |
| | | uni.hideTabBar() |
| | | }, |
| | | |
| | | methods: { |
| | | change(index) { |
| | | let url = index |
| | | this.$u.func.globalNavigator(url, "switchTab") |
| | | }, |
| | | |
| | | navigator(item) { |
| | | |
| | | if (item.title == '退出登录') { |
| | | this.logOut() |
| | | } else { |
| | | this.$u.func.globalNavigator(item.url) |
| | | } |
| | | |
| | | }, |
| | | |
| | | logOut() { |
| | | uni.setStorageSync("responIndex", 0) |
| | | uni.clearStorageSync() |
| | | uni.reLaunch({ |
| | | url: "/pages/login/login-account" |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .container { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | display: flex; |
| | | flex-direction: column; |
| | | background: #F9F9FA; |
| | | |
| | | .main { |
| | | position: relative; |
| | | height: 0; |
| | | flex: 1; |
| | | overflow-y: auto; |
| | | |
| | | .main-bg { |
| | | height: 36%; |
| | | background: royalblue; |
| | | } |
| | | |
| | | .main-cell { |
| | | position: absolute; |
| | | top: 34%; |
| | | width: 100%; |
| | | height: 66%; |
| | | border-radius: 10rpx 10rpx 0 0; |
| | | z-index: 11; |
| | | background: #fff; |
| | | |
| | | .cell-content { |
| | | margin-top: 240rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | .boder-f7f8f9-1 { |
| | | border: 1rpx solid #F7F8F9; |
| | | } |
| | | .fw{ |
| | | font-weight: bold; |
| | | } |
| | | .f-20{ |
| | | font-size:20rpx; |
| | | } |
| | |
| | | .c-99{ |
| | | color:#999; |
| | | } |
| | | .c-ff{ |
| | | color:#fff; |
| | | } |
| | | /**主色调**/ |
| | | .c-main{ |
| | | color:#017BFC; |
| | | } |
| | | .bgc-main{ |
| | | background-color:#017BFC; |
| | | } |
| | |
| | | |
| | | <view class="item" v-for="(item, index) in list" :key="index"> |
| | | <view class="line"> |
| | | <view class="l">租客:{{item.name}} {{`(共${item.num}人)`}}</view> |
| | | <view class="l">租客:{{item.name}} (<text>{{`共${item.num}人`}}</text>)</view>
|
| | | <view class="r"> |
| | | <u-icon name="trash-fill" color="#ff0000" size="18"></u-icon> |
| | | <u-icon name="trash-fill" color="#ff0000" size="18" @click="deleteRental(item)"></u-icon>
|
| | | </view> |
| | | </view> |
| | | |
| | | <view class="line"> |
| | | <view class="l">{{item.startTime}} - {{item.endTime}}</view> |
| | | <view class="l">{{item.rentalTime}} - {{item.dueTime}}</view>
|
| | | <view class="r status"> |
| | | {{item.status}} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="list-btn"> |
| | | <u-button :customStyle="btnCustomStyle" color="#cdf3df" type="primary" text="修改"></u-button> |
| | | <u-button icon="edit-pen" class="btn-item" type="primary" plain text="修改"
|
| | | @click="pushPage(item)"></u-button>
|
| | | <u-button icon="calendar" class="btn-item" type="primary" plain text="续租"
|
| | | @click="xzHandleClick(item)"></u-button>
|
| | | <u-button icon="order" class="btn-item" type="primary" plain text="终止"
|
| | | @click="terminate(item)"></u-button>
|
| | | </view> |
| | | |
| | | </view> |
| | |
| | | <view class="tip"> |
| | | <u-divider text="已经到底了"></u-divider> |
| | | </view> |
| | |
|
| | | <u-datetime-picker :show="isPickerShow" @cancel="isPickerShow = false" mode="date"
|
| | | @confirm="dueTimeConfirm"></u-datetime-picker>
|
| | | <u-datetime-picker :show="istPickerShow" @cancel="istPickerShow = false" mode="date"
|
| | | @confirm="terminateTimeConfirm"></u-datetime-picker>
|
| | | <u-modal :show="isModelShow" width="auto" :showCancelButton="true" title="提示" content="请确认是否删除当前租户信息"
|
| | | @cancel="isModelShow = false" @confirm="deleteRentalConfirm"></u-modal>
|
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import {
|
| | | deleteRentalInfo,
|
| | | updateDueTime
|
| | | } from "@/api/houseRental/houseRental.js";
|
| | | export default { |
| | | props: { |
| | | list: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | btnCustomStyle: { |
| | | color: "#6dc160", |
| | | fontWeight: "700" |
| | | isPickerShow: false,
|
| | | istPickerShow: false,
|
| | | currentRentalId: '',
|
| | | isModelShow: false
|
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | onLoad(option) { |
| | | |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | deleteRental(item) {
|
| | | this.currentRentalId = item.housingRentalId
|
| | | this.isModelShow = true
|
| | | },
|
| | | async deleteRentalConfirm() {
|
| | | const {
|
| | | code,
|
| | | data
|
| | | } = await deleteRentalInfo(this.currentRentalId)
|
| | | console.log(code, data)
|
| | | this.isModelShow = false
|
| | | },
|
| | | pushPage(item) {
|
| | | const {
|
| | | houseCode
|
| | | } = this.$route.query
|
| | | const {
|
| | | id
|
| | | } = item
|
| | | this.$u.func.globalNavigator(
|
| | | `/subPackage/bs/views/rentDetail?houseCode=${houseCode}&id=${id}`)
|
| | | },
|
| | | xzHandleClick(item) {
|
| | | this.currentRentalId = item.housingRentalId
|
| | | this.isPickerShow = true
|
| | | },
|
| | | async dueTimeConfirm(e) {
|
| | | const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
|
| | | const res = await updateDueTime({
|
| | | id: this.currentRentalId,
|
| | | dueTime: time
|
| | | })
|
| | | this.isPickerShow = false
|
| | | },
|
| | | async terminate(item) {
|
| | | this.currentRentalId = item.housingRentalId
|
| | | this.istPickerShow = true
|
| | | },
|
| | | async terminateTimeConfirm(e) {
|
| | | const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
|
| | | const res = await updateDueTime({
|
| | | id: this.currentRentalId,
|
| | | terminationTime: time
|
| | | })
|
| | | this.isPickerShow = false
|
| | | }
|
| | | } |
| | | } |
| | | </script> |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 14rpx; |
| | | padding: 20rpx;
|
| | |
|
| | | &:nth-child(1) {
|
| | | border: 1rpx solid #F6F6F6;
|
| | | }
|
| | |
|
| | | .l {
|
| | | font-weight: 700;
|
| | |
|
| | | text {
|
| | | color: #0682EF;
|
| | | }
|
| | | }
|
| | | |
| | | .status { |
| | | color: #6dc160 |
| | |
| | | |
| | | .list-btn { |
| | | padding: 24rpx; |
| | | display: flex;
|
| | |
|
| | | .btn-item {
|
| | | margin: 0 10rpx;
|
| | | border: 0;
|
| | | color: #009FFF;
|
| | | font-weight: 700;
|
| | | }
|
| | | } |
| | | } |
| | | |
| | |
| | | <template>
|
| | | <view class="container">
|
| | | <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
|
| | | <view class="box-title">
|
| | | <box-title title="基础信息"></box-title>
|
| | | </view>
|
| | | <view class="basic-info">
|
| | | <u-form-item @click="showSelectBus(dataList.relation, '租客关系', 'relationName','relation')"
|
| | | class="form-item" labelWidth="100" label="租客关系" required prop="type">
|
| | |
| | | </u--input>
|
| | | <u-icon slot="right" name="arrow-right"></u-icon>
|
| | | </u-form-item>
|
| | | </view>
|
| | | <view class="box-title">
|
| | | <box-title title="合同上传"></box-title>
|
| | | </view>
|
| | |
|
| | | <u-form-item @click="dueTimeShow = true" class="form-item" labelWidth="100" label="到期时间:" required
|
| | | prop="type">
|
| | | <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">
|
| | |
|
| | | <u-upload :fileList="imagesList"
|
| | | :previewFullImage="uploadConfig.previewFullImage" :accept="uploadConfig.acceptImg"
|
| | | :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
|
| | | @afterRead="afterReadImg" @delete="deletePic">
|
| | | <view class="title">合同上传</view>
|
| | | <u-upload :fileList="imagesList" :previewFullImage="uploadConfig.previewFullImage"
|
| | | :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
|
| | | :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
|
| | | @delete="deletePic">
|
| | | </u-upload>
|
| | | </view>
|
| | |
|
| | | </view>
|
| | | <view class="rent-info">
|
| | | <view v-for="item in rentFormNum" :key="item">
|
| | | <view v-for="(item, index) in rentFormNum" :key="item" class="rent-box">
|
| | | <view class="box-title">
|
| | | <box-title :title="'租客信息-#'+item">
|
| | | <template #titleMore v-if="item !== 1">
|
| | | <u-icon size="25" name="trash" color='#EF0724'></u-icon>
|
| | | </template>
|
| | | </box-title>
|
| | | <view class="l">
|
| | | <view class="line"></view>
|
| | | <view class="title">{{ '租客信息-#' + item }}</view>
|
| | | </view>
|
| | | <view class="r" v-if="index === 1">
|
| | | <u-icon name="trash-fill" color="#ff0000" size="20" @click="decRentForm"></u-icon>
|
| | | </view>
|
| | | </view>
|
| | | <rentForm ref="rentform" />
|
| | | </view>
|
| | |
| | | :popupTitle="selectBusTitle" :dataLists="selectBusList" @cancel="typeShow = false" @submit="typeSelect">
|
| | | </select-bus>
|
| | | <!--出租时间选择-->
|
| | | <u-datetime-picker :show="rentTimeShow" v-model="form.rentTime" mode="date"
|
| | | @confirm="rentTimeShow = false"></u-datetime-picker>
|
| | |
|
| | | <u-datetime-picker :show="rentTimeShow" mode="date" @confirm="rentTimeConfirm"
|
| | | @cancel="rentTimeShow = false"></u-datetime-picker>
|
| | | <u-datetime-picker :show="dueTimeShow" mode="date" @confirm="dueTimeConfirm"
|
| | | @cancel="dueTimeShow = false"></u-datetime-picker>
|
| | |
|
| | | <view class="bottom-tools">
|
| | | <u-button plain class="btn-item" type="success" @click="addRentForm">再加一人</u-button>
|
| | | <u-button class="btn-item" type="error" @click="decRentForm">删除</u-button>
|
| | | <u-button class="btn-item" type="primary" @click="save">保存</u-button>
|
| | | <u-button class="btn-item" @click="addRentForm">再加一人</u-button>
|
| | | <u-button class="btn-item" @click="saveOrUpdate">{{ rentId === '' ? "保存" : "确认修改" }}</u-button>
|
| | | </view>
|
| | |
|
| | |
|
| | | </view>
|
| | | </template>
|
| | |
|
| | |
| | | import uploadMixin from "@/mixin/uploadMixin";
|
| | | import {
|
| | | uploadFile, |
| | | addHouseRental
|
| | | addHouseRental,
|
| | | getHouseRentInfo,
|
| | | } from "@/api/doorplateAddress/doorplateAddress";
|
| | | import {
|
| | | updateRetalInfo
|
| | | } from '@/api/houseRental/houseRental.js'
|
| | | import {
|
| | | data
|
| | | } from "uview-ui/libs/mixin/mixin";
|
| | | import {
|
| | | update
|
| | | } from "../../../api/system/role";
|
| | | export default {
|
| | | mixins: [uploadMixin],
|
| | | components: {
|
| | |
| | | form: {
|
| | | relation: "",
|
| | | rentTime: "",
|
| | | dueTime: "",
|
| | | },
|
| | | imagesList: [],
|
| | | rules: {},
|
| | | rentTimeShow: false,
|
| | | dueTimeShow: false,
|
| | | rentFormNum: 1,
|
| | | relationName: "",
|
| | | houseTypeName: "",
|
| | |
| | | selectBusModel: '',
|
| | | selectBusKey: '',
|
| | | typeShow: false,
|
| | | houseCode: ''
|
| | | houseCode: '',
|
| | | rentId: ''
|
| | | }
|
| | | },
|
| | | created() {
|
| | |
|
| | | },
|
| | | mounted() {
|
| | |
|
| | | },
|
| | | onLoad(option) {
|
| | | this.houseCode = option.houseCode
|
| | | },
|
| | | onShow() {
|
| | | const {
|
| | | id,
|
| | | houseCode
|
| | | } = option
|
| | | this.houseCode = houseCode
|
| | | // 使用id来判断是不是修改
|
| | | if (id !== void 0) {
|
| | | this.rentId = id
|
| | | this.getCurrentRentInfo()
|
| | | }
|
| | |
|
| | | },
|
| | | methods: {
|
| | |
| | | this.form[this.selectBusKey] = item.value
|
| | | this.typeShow = !this.typeShow
|
| | | },
|
| | | rentTimeConfirm(e) {
|
| | | const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
|
| | | this.form.rentTime = time
|
| | | this.rentTimeShow = false
|
| | | },
|
| | | dueTimeConfirm(e) {
|
| | | const time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
|
| | | this.form.dueTime = time
|
| | | this.dueTimeShow = false
|
| | | },
|
| | | beforeUpload(e) {
|
| | | console.log(e)
|
| | | return false
|
| | |
| | | },
|
| | | decRentForm() {
|
| | | this.rentFormNum > 1 && this.rentFormNum--
|
| | | },
|
| | | saveOrUpdate() {
|
| | | if (this.rentId === '') {
|
| | | this.save()
|
| | | return
|
| | | }
|
| | | this.update()
|
| | | },
|
| | | async save() {
|
| | | let houseTenantVOList = []
|
| | |
| | | let params = {
|
| | | houseCode: this.houseCode,
|
| | | tenantRelationship: this.dataList.relation[relationIndex].value,
|
| | | rentalTime: this.form.rentalTime,
|
| | | rentalTime: this.form.rentTime,
|
| | | dueTime: this.form.dueTime,
|
| | | houseStatus: this.dataList.houseType[statusIndex].value,
|
| | | rentalUse: this.dataList.rentalUse[rentalIndex].value,
|
| | | houseTenantVOList
|
| | | } |
| | |
|
| | | const res = await addHouseRental(params) |
| | | console.log(res) |
| | | },
|
| | | async update() {
|
| | | let houseTenantVOList = []
|
| | | this.$refs.rentform.forEach(item => {
|
| | | houseTenantVOList.push(item.form)
|
| | | })
|
| | | 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,
|
| | | houseTenantVOList
|
| | | }
|
| | | const res = await updateRetalInfo(data)
|
| | | },
|
| | | findObjValue(value, obj) {
|
| | | const res = obj.find(item => {
|
| | | return item.value == value
|
| | | })
|
| | | return res.name
|
| | | },
|
| | | async getCurrentRentInfo() {
|
| | | const {
|
| | | code,
|
| | | data: {
|
| | | houseRentalList
|
| | | }
|
| | | } = await getHouseRentInfo(this.houseCode)
|
| | | const {
|
| | | houseStatus,
|
| | | tenantRelationship,
|
| | | rentalUse,
|
| | | rentalTime,
|
| | | dueTime,
|
| | | houseTenantVOList
|
| | | } = houseRentalList.find(item => item.id === this.rentId)
|
| | | this.form = {
|
| | | relation: tenantRelationship,
|
| | | rentTime: rentalTime,
|
| | | dueTime: dueTime,
|
| | | }
|
| | | 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.rentFormNum = houseTenantVOList.length
|
| | | this.$nextTick(() => { |
| | | houseTenantVOList.forEach((item, index) => { |
| | | this.$refs.rentform[index].form = item |
| | | }) |
| | | })
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | <style scoped lang="scss">
|
| | | .container {
|
| | | position: relative;
|
| | | width: 100%;
|
| | | display: flex;
|
| | | flex-direction: column;
|
| | | background: #F9F9FA;
|
| | | background: #F8F8F9;
|
| | | padding: 20rpx 30rpx;
|
| | | padding-bottom: 200rpx;
|
| | |
|
| | | .box-title {
|
| | | padding: 10px 0;
|
| | | }
|
| | |
|
| | | .basic-info {
|
| | | background-color: #ffffff;
|
| | | padding: 20rpx;
|
| | |
|
| | | .form-item {
|
| | | background-color: #ffffff;
|
| | | padding: 5rpx 20rpx;
|
| | | border-bottom: 1px solid #eff1f3;
|
| | | }
|
| | |
|
| | | .pic {
|
| | |
|
| | | // padding: 40rpx 30rpx;
|
| | | .title {
|
| | | font-size: 30rpx;
|
| | | margin: 20rpx 0;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | .pic {
|
| | | .rent-info {
|
| | | .rent-box {
|
| | | padding: 20rpx;
|
| | | background-color: #ffffff;
|
| | | padding: 40rpx 30rpx;
|
| | | margin-top: 30rpx;
|
| | |
|
| | | .box-title {
|
| | | display: flex;
|
| | | justify-content: space-between;
|
| | |
|
| | | .l {
|
| | | display: flex;
|
| | |
|
| | | .line {
|
| | | width: 8rpx;
|
| | | margin-right: 10rpx;
|
| | | background-color: #2978FF;
|
| | | }
|
| | |
|
| | | .title {
|
| | | font-size: 30rpx;
|
| | | font-weight: 700;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | .btn-group {
|
| | | padding: 30rpx;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | .bottom-tools {
|
| | | display: flex;
|
| | | background-color: #ffffff;
|
| | | position: fixed;
|
| | | bottom: 0;
|
| | | left: 0;
|
| | | width: 100%;
|
| | | border-top: 1rpx solid #e4e4e4;
|
| | | // border-top: 1rpx solid #e4e4e4;
|
| | | z-index: 999;
|
| | |
|
| | | .btn-item {
|
| | | margin: 40rpx;
|
| | | color: #ffffff;
|
| | | font-weight: 700;
|
| | | border: 0;
|
| | |
|
| | | &:nth-child(1) {
|
| | | flex: 1;
|
| | | background-color: #2CD5C0;
|
| | | }
|
| | |
|
| | | &:nth-child(2) {
|
| | | flex: 3;
|
| | | background: linear-gradient(to right, #06B0FD, #027BFE);
|
| | | margin-left: 0rpx;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | <view class="content-box">
|
| | | <view class="info">
|
| | | <view class="item location">
|
| | | <u-icon name="map" color="#000000" size="16"></u-icon>
|
| | | <u-icon name="map" color="#AAAAAA" size="15"></u-icon> |
| | | <text>当前小区:</text>
|
| | | <view class="location">
|
| | | {{location}}
|
| | | {{ location }}{{ room }}{{ `(共${num}人)` }}
|
| | | </view>
|
| | | </view>
|
| | |
|
| | | <view class="item statistics">
|
| | | <!-- <view class="item statistics">
|
| | | <view class="room">{{room}}</view>
|
| | | <view class="num">{{`(共${num}人)`}}</view>
|
| | | </view>
|
| | | </view> -->
|
| | | </view>
|
| | |
|
| | |
|
| | | <view class="box-title">
|
| | | <box-title title="出租管理"></box-title>
|
| | | <view class="line"></view> |
| | | <view class="title">出租管理</view>
|
| | | </view>
|
| | | <view class="list">
|
| | | <rentList :list="rentList"></rentList>
|
| | |
| | | data() {
|
| | | return {
|
| | | houseCode: '',
|
| | | location: "万达晶座:11栋楼",
|
| | | room: "一单元303室",
|
| | | num: "1",
|
| | | location: "",
|
| | | room: "",
|
| | | num: 0,
|
| | |
|
| | | //出租列表
|
| | | rentList: [{
|
| | | name: "张三",
|
| | | num: "1",
|
| | | startTime: "2022-01-01",
|
| | | endTime: "2023-12-23",
|
| | | status: "未到期"
|
| | | }]
|
| | | rentList: []
|
| | | }
|
| | | },
|
| | | created() {
|
| | |
|
| | | },
|
| | | mounted() {
|
| | | console.log(this.$store)
|
| | | },
|
| | | onLoad(option) {
|
| | | const {
|
| | |
| | | buildingName,
|
| | | doorplateName,
|
| | | unitName,
|
| | | houseRentalList: {
|
| | | houseTenantVOList
|
| | | }
|
| | | houseRentalList
|
| | | } = res.data
|
| | | console.log(res.data)
|
| | | this.location = aoiName + buildingName
|
| | | this.room = unitName + doorplateName + "室"
|
| | | this.rentList = houseTenantVOList || []
|
| | | this.rentList.length !== 0 && this.rentList.forEach(item => {
|
| | | if (!item.houseTenantVOList) {
|
| | | num += item.houseTenantVOList.length
|
| | | this.rentList = []
|
| | | this.location = (!!aoiName ? aoiName : '') + buildingName
|
| | | this.room = (!!unitName ? unitName : '') + doorplateName + "室"
|
| | | houseRentalList !== 0 && houseRentalList.forEach(item => {
|
| | | const { houseTenantVOList, dueTime, rentalTime } = item |
| | | item.num = houseTenantVOList.length |
| | | this.num += item.num
|
| | | if (item.num !== 0) { |
| | | item.name = houseTenantVOList[0].name |
| | | }
|
| | | // 事件格式处理
|
| | | item.startTime = item.rentalTime.split(' ')[0]
|
| | | item.endTime = item.dueTime.split(' ')[0]
|
| | | item.status === 1 ? '未到期' : '到期'
|
| | | item.num = item.houseTenantVOList.length
|
| | | this.rentList = houseRentalList
|
| | | })
|
| | | },
|
| | | addRent() {
|
| | |
| | | height: 100%;
|
| | | display: flex;
|
| | | flex-direction: column;
|
| | | background: #F9F9FA;
|
| | | background: #F6F6F6;
|
| | |
|
| | | .content-box {
|
| | | height: 0;
|
| | | flex: 1;
|
| | | overflow-y: auto;
|
| | | margin: 20rpx 30rpx;
|
| | | }
|
| | |
|
| | | .list {
|
| | |
| | |
|
| | | .location {
|
| | | font-weight: 700;
|
| | | font-size: 27rpx; |
| | | text { |
| | | color: #AAAAAA; |
| | | }
|
| | | }
|
| | |
|
| | | .room {
|
| | |
| | | }
|
| | |
|
| | | .box-title {
|
| | | padding: 40rpx 0;
|
| | | margin: 25rpx 0; |
| | | display: flex; |
| | | .line { |
| | | width: 8rpx; |
| | | margin-right: 10rpx; |
| | | background-color: #2978FF; |
| | | } |
| | | .title { |
| | | font-weight: 700; |
| | | }
|
| | | }
|
| | |
|
| | | view {
|