Compare commits

...

80 Commits

Author SHA1 Message Date
校文 f2262e056d Merge branch 'master' into dev
3 years ago
校文 cb189d2228 cxw-010203
3 years ago
张雄 d1dd18d7ef zx
3 years ago
张雄 eb381eda7d zx
3 years ago
张雄 28504d792b zx
3 years ago
张雄 4d3446f40c zx
3 years ago
张雄 cef9b23e12 zx
3 years ago
张雄 df89efeed3 zx
3 years ago
luochenyi 782c7410f4 1
3 years ago
luochenyi 8fc8ca371a 1
3 years ago
luochenyi 6f59005335 1
3 years ago
luochenyi 59e1470e9d 时间重置
3 years ago
luochenyi e34287e0cc 搜索时间重置
3 years ago
luochenyi 656666aab8 1
3 years ago
luochenyi a711dccad7 3.14bug
3 years ago
luochenyi ed41c9a689 1
3 years ago
bibi 8a18f6b714 缴费
3 years ago
bibi b1cc2d15f5 1
3 years ago
bibi bf7ea11052 预缴
3 years ago
bibi 0b96d2c962 缴费
3 years ago
bibi ea0acaf167 缴费
3 years ago
bibi 51cc54d6a4 新增轮播图bug
3 years ago
bibi 4740daf677 1
3 years ago
bibi 73b4da2eaf 住户
3 years ago
bibi a63c3369e0 巡更
3 years ago
bibi da5102d6e6 巡检
3 years ago
bibi 7a8fbb2b5a 1
3 years ago
bibi a07e81945d 1
3 years ago
bibi d32aed83cd 1
3 years ago
bibi 94735ef4ae 分类
3 years ago
bibi f6f13ff574 1
3 years ago
bibi a4c68718fc 1
3 years ago
bibi f6c0d4f591 1
3 years ago
bibi 7033667d8d 商城
3 years ago
bibi 67c042df6f 1
3 years ago
bibi e070925cf8 1
3 years ago
bibi 6e58f4c30a 1
3 years ago
bibi 0fe77bb4f0 权限
3 years ago
bibi 98193f9fee 权限
3 years ago
bibi bdb5efd205 运营
3 years ago
bibi 6bb01721f5 资讯
3 years ago
bibi 81046c919f 资讯分类
3 years ago
bibi 1c3e0d5aaf 公告
3 years ago
bibi c123e77767 1
3 years ago
bibi a50096a106 活动
3 years ago
bibi 6668c99dcc 1
3 years ago
bibi ea988a2af1 活动
3 years ago
bibi 57b58a1f1f 活动
3 years ago
bibi ec274d30fd swiper
3 years ago
bibi c5a24b17bc 1
3 years ago
bibi 553e108b46 修改一些bug
3 years ago
bibi 12fe818f6f 1
3 years ago
bibi 6113c85c7b 任务
3 years ago
bibi 87049e2c51 1
3 years ago
bibi b6085145da 1
3 years ago
bibi c1b1091239 基础功能
3 years ago
bibi 4d794173d1 住户
3 years ago
bibi 84b3ae2034 房屋
3 years ago
bibi 5170215707 1
3 years ago
bibi 4d652df0a1 登录选择小区
3 years ago
bibi 8efa6fa4d3 年前最后一次更新。楼栋 房屋
3 years ago
bibi c9cfbd6f16 角色
3 years ago
bibi a200f3ca88 角色
3 years ago
bibi a8e7d91326 权限
3 years ago
bibi 54c34fba28 智慧code
3 years ago
bibi 28c9dab751 communityCode
3 years ago
bibi 18083f5080 商城订单
3 years ago
bibi 8318c11546 配置
3 years ago
bibi 1f4f15d0a7 lint
3 years ago
bibi 4a45b396f2 基础功能
3 years ago
bibi e98c23261a 基础功能静态页面,登录接口,拦截器更改
3 years ago
bibi 74de427762 工单
3 years ago
bibi 1cf7f614d5 住户审核
3 years ago
bibi 83dc074670 1.12基础功能
3 years ago
bibi a74ef209ab 1
3 years ago
bibi e015cae8e5 框架修改
3 years ago
bibi afe1f331fd 1
3 years ago
bibi 129c083f05 1
3 years ago
bibi f83e66ee2c 1
3 years ago
bibi 5ff0a30ed6 1
3 years ago

@ -0,0 +1,3 @@
NODE_ENV = 'development'
VUE_APP_URL = 'http://121.41.26.225:8004/'
VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/'

@ -0,0 +1,3 @@
NODE_ENV = 'production'
VUE_APP_URL = 'https://saas.kaidalai.cn/api/'
VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/'

@ -0,0 +1,24 @@
module.exports = {
"env": {
"browser": true,
"es6": true
},
"extends": [
"plugin:vue/essential",
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"vue"
],
"rules": {
// indent: ['error', 'tab'],
'no-console': 'off',
}
};

@ -1,24 +1,2 @@
# ansu-business
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn serve
```
### Compiles and minifies for production
```
yarn build
```
### Lints and fixes files
```
yarn lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
未开发功能:缴费计划、账单管理(暂无接口,暂无图),工单管理(暂无接口)
bug详见3.12问题单

25745
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -12,7 +12,9 @@
"core-js": "^3.6.5",
"less": "^4.1.2",
"less-loader": "5.0.0",
"momen": "^0.0.1-security",
"nprogress": "^0.2.0",
"qrcodejs2": "^0.0.2",
"vue": "^2.6.11",
"vue-router": "^3.5.3",
"vuescroll": "^4.17.3",
@ -23,7 +25,7 @@
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint": "^6.8.0",
"eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11"
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<title>智慧小区后台管理系统</title>
</head>
<body>
<noscript>

@ -9,7 +9,7 @@
<template>
<a-config-provider :locale="locale">
<div id="app">
<router-view></router-view>
<router-view v-if="isRouterAlive"></router-view>
</div>
</a-config-provider>
</template>
@ -18,11 +18,25 @@
import zhCN from "ant-design-vue/lib/locale-provider/zh_CN";
export default {
name: 'App',
provide () {
return {
reload: this.reload
}
},
data() {
return {
locale: zhCN
locale: zhCN,
isRouterAlive: true
};
},
methods: {
reload () {
this.isRouterAlive = false
this.$nextTick(() => {
this.isRouterAlive = true
})
}
}
}
</script>

@ -0,0 +1,180 @@
import httpService from "@/request"
// 工单
// list
export function name(params) {
return httpService({
url: ` `,
method: 'get/post',
data: params,
})
}
// 所有的工单类型
export function getAllWorkOrderType(params) {
return httpService({
url: `/user/workOrderType/list`,
method: 'get',
params: params,
})
}
// 添加工单类型
export function AddWorkOrderType(params) {
return httpService({
url: `/user/workOrderType/insert`,
method: 'post',
data: params,
})
}
// 修改工单类型
export function EditWorkOrderType(params) {
return httpService({
url: `/user/workOrderType/update`,
method: 'POST',
data: params,
})
}
// 删除工单类型
export function DelWorkOrderType(params) {
return httpService({
url: `/user/workOrderType/delete`,
method: 'POST',
data: params,
})
}
// 所有的工单信息
export function getAllWorkOrder(params) {
return httpService({
url: `/user/workOrder/list`,
method: 'get',
params: params,
})
}
// 查询后台工单详情
export function getDetail(params) {
return httpService({
url: `/user/workOrder/detail`,
method: 'get',
params: params,
})
}
// 添加工单信息
export function addWorkOrder(params) {
return httpService({
url: `/user/workOrder/insert`,
method: 'post',
data: params,
})
}
// 取消后台工单信息
export function cancelWorkOrder(params) {
return httpService({
url: `/user/workOrder/cancel`,
method: 'post',
data: params,
})
}
// 加入工单池
export function joinTicketPool(params) {
return httpService({
url: `/user/workOrder/joinTicketPool`,
method: 'get',
params: params,
})
}
// 转移至待分配
export function moveToAssignment(params) {
return httpService({
url: `/user/workOrder/moveToAssignment`,
method: 'get',
params: params,
})
}
// 指派人员
export function designate(params) {
return httpService({
url: `/user/workOrder/designate`,
method: 'post',
data: params,
})
}
// 转派人员
export function updateDesignate(params) {
return httpService({
url: `/user/workOrder/updateDesignate`,
method: 'post',
data: params,
})
}
// 工单处理
export function process(params) {
return httpService({
url: `/user/workOrder/process`,
method: 'get',
params: params,
})
}
// 完成工单
export function finish(params) {
return httpService({
url: `/user/workOrder/finish`,
method: 'post',
data: params,
})
}
// 确认工单
export function confirm(params) {
return httpService({
url: `/user/workOrder/confirm`,
method: 'get',
params: params,
})
}
// 工单结算账单
export function workOrderCostList(params) {
return httpService({
url: `/user/workOrder/workOrderCostList`,
method: 'get',
params: params,
})
}
// 结算工单
export function settlement(params) {
return httpService({
url: `/user/workOrder/settlement`,
method: 'post',
data: params,
})
}
// 汇报
export function report(params) {
return httpService({
url: `/user/workOrder/report`,
method: 'post',
data: params,
})
}
// 查询工单记录
export function orderSchedule(params) {
return httpService({
url: `/user/workOrder/orderSchedule`,
method: 'get',
params: params,
})
}

@ -0,0 +1,91 @@
import httpService from "@/request"
// 组织
// 所有的组织架构
export function departmentList(params) {
return httpService({
url: `/user/department/list`,
method: 'get',
data: params,
})
}
// 添加组织
export function departmentInsert(params) {
return httpService({
url: `/user/department/insert`,
method: 'post',
data: params,
})
}
// 组织删除
export function departmentDel(params) {
return httpService({
url: `/user/department/delete`,
method: 'post',
data: params,
})
}
// 组织修改
export function departmentUpdate(params) {
return httpService({
url: `/user/department/update`,
method: 'post',
data: params,
})
}
// 组织员工
export function findToUser(params) {
return httpService({
url: `/user/department/findToUser`,
method: 'GET',
params: params,
})
}
// 新增员工
export function insertManageUser(params) {
return httpService({
url: `/user/manageUser/insertManageUser`,
method: 'post',
data: params,
})
}
// 上传身份证照片
export function uploadManageUserIdCard(params) {
return httpService({
url: `/user/upload/uploadManageUserIdCard`,
method: 'post',
data: params,
})
}
// 员工info
export function manageUserInfo(params) {
return httpService({
url: `/user/manageUser/findById`,
method: 'GET',
params: params,
})
}
// 员工edit
export function EditManageUser(params) {
return httpService({
url: `/user/manageUser/update`,
method: 'post',
data: params,
})
}
// 员工开启关闭
export function userEnable(params) {
return httpService({
url: `/user/manageUser/isEnable`,
method: 'GET',
params: params,
})
}
// 重置密码
export function rePassword(params) {
return httpService({
url: `/user/manageUser/rePassword`,
method: 'post',
data: params,
})
}

@ -0,0 +1,182 @@
import httpService from "@/request"
// 房产 楼栋
// 楼栋列表
export function buildingList(params) {
return httpService({
url: `/user/building/list`,
method: 'get',
params: params,
})
}
// 楼栋新增
export function buildInsert(params) {
return httpService({
url: `/user/building/insert`,
method: 'post',
data: params,
})
}
// 楼栋详情
export function buildInfo(params) {
return httpService({
url: `/user/building/findById`,
method: 'get',
params: params,
})
}
// 楼栋修改
export function buildUpdate(params) {
return httpService({
url: `/user/building/updateBuilding`,
method: 'post',
data: params,
})
}
// 楼栋删除
export function buildingDel(params) {
return httpService({
url: `/user/building/deleteBuilding`,
method: 'post',
data: params,
})
}
// 全部楼栋
export function allBuilding(params) {
return httpService({
url: `/user/building/findAllBuilding`,
method: 'get',
params: params,
})
}
// 楼栋查单元
export function findByBuildingId(params) {
return httpService({
url: `/user/unit/findByBuildingId`,
method: 'get',
params: params,
})
}
/**
* 单元
* list update del
*/
export function unitAdd(params) {
return httpService({
url: `/user/unit/insertUnit`,
method: 'post',
data: params,
})
}
export function unitUpdate(params) {
return httpService({
url: `/user/unit/updateUnit`,
method: 'post',
data: params,
})
}
export function unitDel(params) {
return httpService({
url: `/user/unit/deleteUnit`,
method: 'post',
data: params,
})
}
// 房屋
// 房屋列表
export function houseList(params) {
return httpService({
url: `/user/estate/list`,
method: 'get',
params: params,
})
}
// 房屋新增
export function houseInsert(params) {
return httpService({
url: `/user/estate/insert`,
method: 'post',
data: params,
})
}
// 房屋修改
export function houseInfo(params) {
return httpService({
url: `/user/estate/findById`,
method: 'get',
params: params,
})
}
// 房屋修改
export function houseUpdate(params) {
return httpService({
url: `/user/estate/update`,
method: 'post',
data: params,
})
}
// 房屋删除
export function houseDel(params) {
return httpService({
url: `/user/estate/delete`,
method: 'post',
data: params,
})
}
// 房屋租赁切换
export function isEnableLease(params) {
return httpService({
url: `/user/estate/isEnableLease`,
method: 'get',
params: params,
})
}
// 房屋设置 房屋类型
export function estateType(params) {
return httpService({
url: `/user/estateType/list`,
method: 'get',
params: params,
})
}
// 类型新增
export function estateTypeInsert(params) {
return httpService({
url: `/user/estateType/insert`,
method: 'post',
data: params,
})
}
// 类型修改
export function estateTypeUpdate(params) {
return httpService({
url: `/user/estateType/update`,
method: 'post',
data: params,
})
}
// 类型删除
export function estateTypeDel(params) {
return httpService({
url: `/user/estateType/delete`,
method: 'post',
data: params,
})
}
// 房屋列表级联
export function estate(params) {
return httpService({
url: `/user/estate/findEstateCascade`,
method: 'get',
params: params,
})
}
// 房屋列表级联
export function findEstateCascade(params) {
return httpService({
url: `/user/estate/findEstateCascade`,
method: 'get',
params: params,
})
}

@ -0,0 +1,89 @@
import httpService from "@/request"
/**
*
* 住户
* @param {*} params
* @returns
*
* 住户列表
*/
export function residentList(params) {
return httpService({
url: `/user/resident/list`,
method: 'get',
params: params,
})
}
// 新增住户
export function residentInsert(params) {
return httpService({
url: `/user/resident/insert`,
method: 'post',
data: params,
})
}
// 修改住户
export function residentUpdate(params) {
return httpService({
url: `/user/resident/update`,
method: 'post',
data: params,
})
}
export function residentInfo(params) {
return httpService({
url: `/user/resident/findById`,
method: 'get',
params: params,
})
}
// 迁出
export function moveOut(params) {
return httpService({
url: `/user/resident/moveOut`,
method: 'post',
data: params,
})
}
// 迁入
export function moveIn(params) {
return httpService({
url: `/user/resident/moveIn`,
method: 'post',
data: params,
})
}
// 根据房屋查租户
export function findTenantByEstateId(params) {
return httpService({
url: `/user/resident/findTenantByEstateId`,
method: 'get',
params: params,
})
}
// 住户详情
export function residentDetail(params) {
return httpService({
url: `/user/resident/findDetail`,
method: 'get',
params: params,
})
}
// 住户审核
// 审核列表
export function reviewList(params) {
return httpService({
url: `/user/review/list`,
method: 'get',
params: params,
})
}
// 审核通过 不通过
export function review(params) {
return httpService({
url: `/user/review/review`,
method: 'post',
data: params,
})
}

@ -0,0 +1,88 @@
import httpService from "@/request"
// 权限 角色
// 角色列表
export function getrolelist(params) {
return httpService({
url: `/user/role/list`,
method: 'get',
data: params,
})
}
// 新增角色
export function roleInsert(params) {
return httpService({
url: `/user/role/insert`,
method: 'post',
data: params,
})
}
// 编辑角色
export function roleUpdate(params) {
return httpService({
url: `/user/role/update`,
method: 'post',
data: params,
})
}
// 分配角色
export function assignRoles(params) {
return httpService({
url: `/user/role/assignRoles`,
method: 'post',
data: params,
})
}
// 删除角色
export function roleDel(params) {
return httpService({
url: `user/role/delete`,
method: 'post',
data: params,
})
}
// 角色-----员工列表
export function listByRole(params) {
return httpService({
url: `/user/role/listByRole`,
method: 'GET',
params: params,
})
}
// 查询当前角色下的所有的菜单权限信息 roleId
export function FindAllMenus(params) {
return httpService({
url: `/user/jurisdiction/findAllMenus`,
method: 'GET',
params: params,
})
}
export function changeMenuShow(params) {
return httpService({
url: `/user/jurisdiction/isShowMenus`,
method: 'post',
data: params,
})
}
export function getActions(params) {
return httpService({
url: `/user/jurisdiction/findOperationByMId`,
method: 'get',
params: params,
})
}
export function changeActions(params) {
return httpService({
url: `/user/jurisdiction/isCheckOperation`,
method: 'post',
data: params,
})
}
// 当前用户菜单
export function getMenu(params) {
return httpService({
url: `/user/manageUser/findAllMenusByUser`,
method: 'GET',
params: params,
})
}

@ -0,0 +1,53 @@
import httpService from "@/request"
// 活动列表
export function activityList(params) {
return httpService({
url: `/user/activity/list`,
method: 'get',
params: params,
})
}
export function organizerSelect(params) {
return httpService({
url: `/user/activityOrganizer/allList`,
method: 'get',
params: params,
})
}
// 报名人
export function registrationList(params) {
return httpService({
url: `/user/activity/registrationList`,
method: 'get',
params: params,
})
}
export function activityInfo(params) {
return httpService({
url: `/user/activity/findById`,
method: 'get',
params: params,
})
}
export function activityInsert(params) {
return httpService({
url: `/user/activity/insert`,
method: 'post',
data: params,
})
}
export function activityUpdate(params) {
return httpService({
url: `/user/activity/update`,
method: 'post',
data: params,
})
}
export function activityDel(params) {
return httpService({
url: `/user/activity/delete`,
method: 'post',
data: params,
})
}

@ -0,0 +1,38 @@
import httpService from "@/request"
// 主办方列表
export function organizerList(params) {
return httpService({
url: `/user/activityOrganizer/list`,
method: 'get',
params: params,
})
}
export function organizerInfo(params) {
return httpService({
url: `/user/activityOrganizer/findById`,
method: 'get',
params: params,
})
}
export function organizerInsert(params) {
return httpService({
url: `/user/activityOrganizer/insert`,
method: 'post',
data: params,
})
}
export function organizerUpdate(params) {
return httpService({
url: `/user/activityOrganizer/update`,
method: 'post',
data: params,
})
}
export function organizerDel(params) {
return httpService({
url: `/user/activityOrganizer/delete`,
method: 'post',
data: params,
})
}

@ -0,0 +1,38 @@
import httpService from "@/request"
// 公告列表
export function announcementList(params) {
return httpService({
url: `/user/announcement/list`,
method: 'get',
params: params,
})
}
export function announcementInfo(params) {
return httpService({
url: `/user/announcement/findById`,
method: 'get',
params: params,
})
}
export function announcementInsert(params) {
return httpService({
url: `/user/announcement/insert`,
method: 'post',
data: params,
})
}
export function announcementDel(params) {
return httpService({
url: `/user/announcement/delete`,
method: 'post',
data: params,
})
}
export function announcementUpdate(params) {
return httpService({
url: `/user/announcement/update`,
method: 'post',
data: params,
})
}

@ -0,0 +1,57 @@
import httpService from "@/request"
// 动态列表
export function dynamicList(params) {
return httpService({
url: `/user/dynamic/list`,
method: 'get',
params: params,
})
}
export function dynamicInfo(params) {
return httpService({
url: `/user/dynamic/findById`,
method: 'get',
params: params,
})
}
// 删除
export function dynamicDel(params) {
return httpService({
url: `/user/dynamic/delete`,
method: 'post',
data: params,
})
}
// 恢复
export function dynamicRecover(params) {
return httpService({
url: `/user/dynamic/recover`,
method: 'post',
data: params,
})
}
// 评论list
export function commentList(params) {
return httpService({
url: `/user/comment/list`,
method: 'get',
params: params,
})
}
// 删除
export function commentDel(params) {
return httpService({
url: `/user/comment/delete`,
method: 'post',
data: params,
})
}
// 恢复
export function commentRecover(params) {
return httpService({
url: `/user/comment/recover`,
method: 'post',
data: params,
})
}

@ -0,0 +1,42 @@
import httpService from "@/request"
// 话题列表
export function topicList(params) {
return httpService({
url: `/user/topic/list`,
method: 'get',
params: params,
})
}
// 话题新增
export function topicInsert(params) {
return httpService({
url: `/user/topic/insert`,
method: 'post',
data: params,
})
}
// 话题信息
export function topicInfo(params) {
return httpService({
url: `/user/topic/findById`,
method: 'get',
params: params,
})
}
// 话题修改
export function topicUpdate(params) {
return httpService({
url: `/user/topic/update`,
method: 'post',
data: params,
})
}
// 话题删除
export function topicDelete(params) {
return httpService({
url: `/user/topic/delete`,
method: 'post',
data: params,
})
}

@ -0,0 +1,59 @@
import httpService from "@/request"
export function planList(params) {
return httpService({
url: `/user/inspectionPlan/list`,
method: 'get',
params: params,
})
}
export function planisEnable(params) {
return httpService({
url: `/user/inspectionPlan/isEnable`,
method: 'get',
params: params,
})
}
export function routeSelect(params) {
return httpService({
url: `/user/inspectionRoute/allList`,
method: 'get',
params: params,
})
}
export function planInfo(params) {
return httpService({
url: `/user/inspectionPlan/findById`,
method: 'get',
params: params,
})
}
export function planInsert(params) {
return httpService({
url: `/user/inspectionPlan/insert`,
method: 'post',
data: params,
})
}
export function planDel(params) {
return httpService({
url: `/user/inspectionPlan/delete`,
method: 'post',
data: params,
})
}
export function planUpdate(params) {
return httpService({
url: `/user/inspectionPlan/update`,
method: 'post',
data: params,
})
}
// 巡检记录
export function inspectionExecute(params) {
return httpService({
url: `/user/inspectionExecute/list`,
method: 'get',
params: params,
})
}

@ -0,0 +1,39 @@
import httpService from "@/request"
// 巡检点
// list
export function pointList(params) {
return httpService({
url: `/user/inspectionPoint/list`,
method: 'get',
params: params,
})
}
export function pointInfo(params) {
return httpService({
url: `/user/inspectionPoint/findById`,
method: 'get',
params: params,
})
}
export function pointInsert(params) {
return httpService({
url: `/user/inspectionPoint/insert`,
method: 'post',
data: params,
})
}
export function pointDel(params) {
return httpService({
url: `/user/inspectionPoint/delete`,
method: 'post',
data: params,
})
}
export function pointUpdate(params) {
return httpService({
url: `/user/inspectionPoint/update`,
method: 'post',
data: params,
})
}

@ -0,0 +1,54 @@
import httpService from "@/request"
// 路线
export function routeList(params) {
return httpService({
url: `/user/inspectionRoute/list`,
method: 'get',
params: params,
})
}
export function routeisEnable(params) {
return httpService({
url: `/user/inspectionRoute/isEnable`,
method: 'get',
params: params,
})
}
export function pointSelect(params) {
return httpService({
url: `/user/inspectionPoint/allList`,
method: 'get',
params: params,
})
}
export function routeInfo(params) {
return httpService({
url: `/user/inspectionRoute/findById`,
method: 'get',
params: params,
})
}
export function routeInsert(params) {
return httpService({
url: `/user/inspectionRoute/insert`,
method: 'post',
data: params,
})
}
export function routeDel(params) {
return httpService({
url: `/user/inspectionRoute/delete`,
method: 'post',
data: params,
})
}
export function routeUpdate(params) {
return httpService({
url: `/user/inspectionRoute/update`,
method: 'post',
data: params,
})
}

@ -0,0 +1,45 @@
import httpService from "@/request"
// 资讯
export function newsList(params) {
return httpService({
url: `/user/information/list`,
method: 'get',
params: params,
})
}
export function newsInfo(params) {
return httpService({
url: `/user/information/findById`,
method: 'get',
params: params,
})
}
export function itemSelect(params) {
return httpService({
url: `/user/informationCategory/allList`,
method: 'get',
params: params,
})
}
export function newsUpdate(params) {
return httpService({
url: `/user/information/update`,
method: 'post',
data: params,
})
}
export function newsDel(params) {
return httpService({
url: `/user/information/delete`,
method: 'post',
data: params,
})
}
export function newsInsert(params) {
return httpService({
url: `/user/information/insert`,
method: 'post',
data: params,
})
}

@ -0,0 +1,31 @@
import httpService from "@/request"
// 资讯分类
export function newsItemList(params) {
return httpService({
url: `/user/informationCategory/list`,
method: 'get',
params: params,
})
}
export function newsItemUpdate(params) {
return httpService({
url: `/user/informationCategory/update`,
method: 'post',
data: params,
})
}
export function newsItemDel(params) {
return httpService({
url: `/user/informationCategory/delete`,
method: 'post',
data: params,
})
}
export function newsItemInsert(params) {
return httpService({
url: `/user/informationCategory/insert`,
method: 'post',
data: params,
})
}

@ -0,0 +1,35 @@
import httpService from "@/request"
// 轮播图列表
export function swiperList(params) {
return httpService({
url: `/user/homepageCarousel/list`,
method: 'get',
params: params,
})
}
// 删除
export function swiperDel(params) {
return httpService({
url: `/user/homepageCarousel/delete`,
method: 'get',
params: params,
})
}
// 新增
export function swiperInsert(params) {
return httpService({
url: `/user/homepageCarousel/insert`,
method: 'post',
data: params,
})
}
// 修改
export function swiperUpdate(params) {
return httpService({
url: `/user/homepageCarousel/update`,
method: 'post',
data: params,
})
}

@ -0,0 +1,58 @@
import httpService from "@/request"
// 任务列表
export function taskList(params) {
return httpService({
url: `/user/taskRelease/list`,
method: 'get',
params: params,
})
}
// 置顶
export function topTask(params) {
return httpService({
url: `/user/taskRelease/topTask`,
method: 'get',
params: params,
})
}
// 取消
export function cancelTask(params) {
return httpService({
url: `/user/taskRelease/cancel`,
method: 'get',
params: params,
})
}
// 撤回
export function withdrawTask(params) {
return httpService({
url: `/user/taskRelease/withdraw`,
method: 'get',
params: params,
})
}
// 确认
export function confirmTask(params) {
return httpService({
url: `/user/taskRelease/confirm`,
method: 'get',
params: params,
})
}
// 获取任务设置
export function getSetting(params) {
return httpService({
url: `/user/settingTaskRelease/getSetting`,
method: 'get',
params: params,
})
}
// 保存任务设置
export function Setting(params) {
return httpService({
url: `/user/settingTaskRelease/setting`,
method: 'post',
data: params,
})
}

@ -0,0 +1,46 @@
import httpService from "@/request"
// 后台账单list
export function getBillList(params) {
return httpService({
url: `/user/bill/billList`,
method: 'post',
data: params,
})
}
// 账单废除
export function abolition(params) {
return httpService({
url: `/user/bill/abolition`,
method: 'get',
params: params,
})
}
// 账单恢复
export function recover(params) {
return httpService({
url: `/user/bill/recover`,
method: 'get',
params: params,
})
}
// 账单线下支付
export function offlinePayments(params) {
return httpService({
url: `/user/bill/offlinePayments`,
method: 'post',
data: params,
})
}
// 根据账单主键id查询账单订单
export function findBillOrderList(params) {
return httpService({
url: `/user/bill/findBillOrderList`,
method: 'get',
params: params,
})
}

@ -0,0 +1,24 @@
import httpService from "@/request"
// 收费标准列表
export function bindList(params) {
return httpService({
url: `/user/chargesBind/list`,
method: 'post',
data: params,
})
}
export function bind(params) {
return httpService({
url: `/user/chargesBind/bind`,
method: 'post',
data: params,
})
}
export function unbind(params) {
return httpService({
url: `/user/chargesBind/unbind`,
method: 'post',
data: params,
})
}

@ -0,0 +1,38 @@
import httpService from "@/request"
// 收费标准列表
export function chargesList(params) {
return httpService({
url: `/user/charges/list`,
method: 'get',
params: params,
})
}
export function chargesInfo(params) {
return httpService({
url: `/user/charges/findById`,
method: 'get',
params: params,
})
}
export function chargesInsert(params) {
return httpService({
url: `/user/charges/insert`,
method: 'post',
data: params,
})
}
export function chargesUpdate(params) {
return httpService({
url: `/user/charges/update`,
method: 'post',
data: params,
})
}
export function chargesDel(params) {
return httpService({
url: `/user/charges/delete`,
method: 'post',
data: params,
})
}

@ -0,0 +1,100 @@
import httpService from "@/request"
// 手动生成后台账单
export function manuallyGenerateBills(params) {
return httpService({
url: `/user/bill/manuallyGenerateBills`,
method: 'post',
data: params,
})
}
// 自动生成后台账单计划
export function autoGenerateBills(params) {
return httpService({
url: `/user/billAuto/autoGenerateBills`,
method: 'post',
data: params,
})
}
// 后台自动生成账单List
export function billAutoList(params) {
return httpService({
url: `/user/billAuto/billAutoList`,
method: 'get',
params: params,
})
}
// 删除后台自动生成账单计划
export function deleteAutoGenerateBills(params) {
return httpService({
url: `/user/billAuto/deleteAutoGenerateBills`,
method: 'post',
data: params,
})
}
// 生成后台账单自动扣费计划
export function autoDeductionBills(params) {
return httpService({
url: `/user/billAutoDeduction/autoDeductionBills`,
method: 'post',
data: params,
})
}
// 后台自动扣费账单list
export function getAutoDeductionBills(params) {
return httpService({
url: `/user/billAutoDeduction/list`,
method: 'get',
params: params,
})
}
// 删除后台自动扣费账单计划
export function deleteAutoDeductionBills(params) {
return httpService({
url: `/user/billAutoDeduction/deleteAutoDeductionBills`,
method: 'post',
data: params,
})
}
// 根据账单自动生成主键id获取账单自动生成信息
export function findByIdByBillAutoId(params) {
return httpService({
url: `/user/billAuto/findByIdByBillAutoId`,
method: 'get',
params: params,
})
}
// 根据账单自动扣费主键id获取账单自动扣费信息
export function findById(params) {
return httpService({
url: `/user/billAutoDeduction/findById`,
method: 'get',
params: params,
})
}
// 修改自动生成后台账单计划
export function updateAutoGenerateBills(params) {
return httpService({
url: `/user/billAuto/updateAutoGenerateBills`,
method: 'post',
data: params,
})
}
// 修改自动扣费后台账单计划
export function updateAutoDeductionBills(params) {
return httpService({
url: `/user/billAutoDeduction/updateAutoDeductionBills`,
method: 'post',
data: params,
})
}

@ -0,0 +1,24 @@
import httpService from "@/request"
// 预缴列表
export function prepaymentList(params) {
return httpService({
url: `/user/prepayment/list`,
method: 'get',
params: params,
})
}
export function rechargeList(params) {
return httpService({
url: `/user/prepayment/rechargeList`,
method: 'get',
params: params,
})
}
export function recharge(params) {
return httpService({
url: `/user/prepayment/recharge`,
method: 'post',
data: params,
})
}

@ -0,0 +1,26 @@
import httpService from "@/request"
// 发送验证码
export function sendTelCode(params) {
return httpService({
url: `/sendTelCode`,
method: 'post',
data: params,
})
}
// 登录
export function loginTel(params) {
return httpService({
url: `/loginTelCode`,
method: 'post',
data: params,
})
}
// 退出登录
export function quit(params) {
return httpService({
url: `/user/quit`,
method: 'post',
data: params,
})
}

@ -0,0 +1,32 @@
import httpService from "@/request"
// 商品
// 品牌
export function brandList(params) {
return httpService({
url: `/user/shopBrand/list`,
method: 'get',
params: params,
})
}
export function brandInsert(params) {
return httpService({
url: `/user/shopBrand/insert`,
method: 'post',
data: params,
})
}
export function brandDel(params) {
return httpService({
url: `/user/shopBrand/delete`,
method: 'post',
data: params,
})
}
export function brandUpdate(params) {
return httpService({
url: `/user/shopBrand/update`,
method: 'post',
data: params,
})
}

@ -0,0 +1,46 @@
import httpService from "@/request"
// 商品
// 品牌
export function cateList(params) {
return httpService({
url: `/user/shopCategory/listAll`,
method: 'get',
params: params,
})
}
export function cateShow(params) {
return httpService({
url: `/user/shopCategory/isShow`,
method: 'get',
params: params,
})
}
export function cateInfo(params) {
return httpService({
url: `/user/shopCategory/listByParentId`,
method: 'get',
params: params,
})
}
export function cateUpdate(params) {
return httpService({
url: `/user/shopCategory/updateCategory`,
method: 'post',
data: params,
})
}
export function cateInsert(params) {
return httpService({
url: `/user/shopCategory/insert`,
method: 'post',
data: params,
})
}
export function cateDel(params) {
return httpService({
url: `/user/shopCategory/delete`,
method: 'post',
data: params,
})
}

@ -0,0 +1,93 @@
import httpService from "@/request"
// 商品
// list
export function shopPushList(params) {
return httpService({
url: `/user/shop/shopPushList`,
method: 'get',
params: params,
})
}
export function jcookGoodsList(params) {
return httpService({
url: `/user/shop/jcookGoodsList`,
method: 'get',
params: params,
})
}
export function offShelf(params) {
return httpService({
url: `/user/shop/offShelf`,
method: 'post',
data: params,
})
}
export function onShelf(params) {
return httpService({
url: `/user/shop/onShelf`,
method: 'post',
data: params,
})
}
export function jcookGoodsBatchPush(params) {
return httpService({
url: `/user/shop/jcookGoodsBatchPush`,
method: 'post',
data: params,
})
}
export function jcookGoodsPush(params) {
return httpService({
url: `/user/shop/jcookGoodsPush`,
method: 'post',
data: params,
})
}
export function goodsEdit(params) {
return httpService({
url: `/user/shop/update`,
method: 'post',
data: params,
})
}
export function goodsInfo(params) {
return httpService({
url: `/user/shop/findById`,
method: 'get',
params: params,
})
}
// 分类
export function cateSelect(params) {
return httpService({
url: `/user/shopCategory/listAll`,
method: 'get',
params: params,
})
}
// 店铺
export function shopSelect(params) {
return httpService({
url: `/user/shopShop/allList`,
method: 'get',
params: params,
})
}
// 供应商
export function vendorSelect(params) {
return httpService({
url: `/user/shopVendor/allList`,
method: 'get',
params: params,
})
}
// 品牌
export function brandSelect(params) {
return httpService({
url: `/user/shopBrand/allList`,
method: 'get',
params: params,
})
}

@ -0,0 +1,27 @@
import httpService from "@/request"
// 订单
// list
export function orderList(params) {
return httpService({
url: `/user/shopOrder/list`,
method: 'get',
params: params,
})
}
// 订单详情
export function orderInfo(params) {
return httpService({
url: `/user/shopOrder/findDetail`,
method: 'get',
params: params,
})
}
// 取消订单
export function shopOrderCancel(params) {
return httpService({
url: `/user/shopOrder/cancel`,
method: 'get',
params: params,
})
}

@ -0,0 +1,18 @@
import httpService from "@/request"
// 获取任务设置
export function getSetting(params) {
return httpService({
url: `/user/pointsSetting/earnPointsSettingInfo`,
method: 'get',
params: params,
})
}
// 保存任务设置
export function Setting(params) {
return httpService({
url: `/user/pointsSetting/savePintsSetting`,
method: 'post',
data: params,
})
}

@ -0,0 +1,32 @@
import httpService from "@/request"
// 商品
// 店铺
export function shopList(params) {
return httpService({
url: `/user/shopShop/list`,
method: 'get',
params: params,
})
}
export function shopInsert(params) {
return httpService({
url: `/user/shopShop/insert`,
method: 'post',
data: params,
})
}
export function shopDel(params) {
return httpService({
url: `/user/shopShop/delete`,
method: 'post',
data: params,
})
}
export function shopUpdate(params) {
return httpService({
url: `/user/shopShop/update`,
method: 'post',
data: params,
})
}

@ -0,0 +1,32 @@
import httpService from "@/request"
// 商品
// 轮播图
export function swiperList(params) {
return httpService({
url: `/user/shopRotation/findRotationList`,
method: 'get',
params: params,
})
}
export function swiperDel(params) {
return httpService({
url: `/user/shopRotation/delete`,
method: 'get',
params: params,
})
}
export function swiperUpdate(params) {
return httpService({
url: `/user/shopRotation/update`,
method: 'post',
data: params,
})
}
export function swiperInsert(params) {
return httpService({
url: `/user/shopRotation/insert`,
method: 'post',
data: params,
})
}

@ -0,0 +1,32 @@
import httpService from "@/request"
// 商品
// 供应商
export function vendorList(params) {
return httpService({
url: `/user/shopVendor/list`,
method: 'get',
params: params,
})
}
export function vendorInsert(params) {
return httpService({
url: `/user/shopVendor/insert`,
method: 'post',
data: params,
})
}
export function vendorDel(params) {
return httpService({
url: `/user/shopVendor/delete`,
method: 'post',
data: params,
})
}
export function vendorUpdate(params) {
return httpService({
url: `/user/shopVendor/update`,
method: 'post',
data: params,
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

@ -1,58 +0,0 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

@ -0,0 +1,45 @@
<template>
<a-cascader
:options="cityList"
placeholder="请选择"
:field-names="{
label: 'name',
value: 'id',
children: 'cityList',
}"
@change="change"
style="width: 60%"
></a-cascader>
</template>
<script>
import store from "@/store";
export default {
data(){
return{
cityList:[]
}
},
methods: {
change(data){
this.$emit('onchange',data)
}
},
mounted() {
if(store.getters.getCity.length===0){
this.$axios({
method:'get',
url:process.env.VUE_APP_URL+'manage/city/allCity',//apicommunityCode
}).then((response) =>{
this.cityList = response.data.data
this.setCity(response.data.data);
}).catch((error) =>{
console.log(error) //
})
}
}
};
</script>
<style>
</style>

@ -0,0 +1,36 @@
<template>
<div>
<a-drawer
title="抽屉"
:width="720"
:visible="visible"
:body-style="{ paddingBottom: '80px' }"
@close="onClose"
>
<div class="drawer-content"></div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="onClose">
关闭
</a-button>
<a-button type="primary" @click="onClose"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
export default {
data() {
return {
visible: false,
};
},
methods: {
showDrawer() {
this.visible = true;
},
onClose() {
this.visible = false;
},
},
};
</script>

@ -0,0 +1,13 @@
<template>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -0,0 +1,110 @@
<template>
<div class="form-box">
<a-form-model ref="ruleForm" :model="form" layout='inline' v-if="itemList.length > 0">
<a-form-model-item
v-for="item in itemList"
:key="item.prop"
:label="item.label"
:prop="item.prop"
style="margin-left:32px"
>
<a-input v-if="item.type === 'input'" v-model="form[item.prop]" :placeholder="item.placeholder" />
<a-select
v-model="form[item.prop]"
v-else-if="item.type === 'select'"
:placeholder="item.placeholder"
>
<a-select-option
v-for="option in item.option"
:key="option.id"
:value="option.id"
>{{ option.name }}</a-select-option
>
</a-select>
<a-range-picker v-else-if="item.type === 'time'" v-model="form[item.prop]" value-format="YYYY/MM/DD HH:mm:ss" @change="changeTime($event,item.start,item.end)" />
</a-form-model-item>
</a-form-model>
<div class="btn-box"><a-button type="primary" @click="getSearch"> </a-button>
<a-button style="margin-left: 10px" @click="resetForm"> </a-button></div>
</div>
</template>
<script>
export default {
props: {
formItem:{
type:Array,
}
},
watch: {
formItem: {
handler(val){
this.itemList = val
let obj = {}
for(let k of val){
if(k.type==='time'){
obj[k.start] = undefined
obj[k.end] = undefined
}else{
obj[k.prop] = undefined;
}
}
this.form = obj;
},
immediate: true
},
},
data() {
return {
itemList: [],
form: {},
};
},
methods: {
getSearch() {
let obj = {}
for(let k in this.form){
if (!Array.isArray(this.form[k])) {
obj[k] = this.form[k]
}else{
console.log(k);
let start = k + 'StartTime'
let end = k + 'EndTime'
obj[start] = this.form[k][0]
obj[end] = this.form[k][1]
}
}
let obj1 = Object.assign({}, obj)
console.log(obj1);
this.$emit('getSearch', obj1)
},
resetForm() {
this.$refs.ruleForm.resetFields();
this.getSearch()
},
changeTime(data,start,end){
this.$emit('changeTime', data,start,end)
this.form[start] = data[0]
this.form[end] = data[1]
}
},
};
</script>
<style lang="less" scoped>
.form-box {
text-align: left;
background: #f9f9f9;
padding-top: 25px;
padding-bottom: 1px;
}
.btn-box{
margin:10px 0 15px 100px;
}
/deep/.ant-input{
min-width: 150px;
}
/deep/.ant-select{
min-width: 150px;
}
</style>

@ -0,0 +1,125 @@
<template>
<div class="main">
<div style="margin-bottom: 16px">
<!-- 批量操作 -->
<a-select
type="primary"
v-model="activeAction"
:disabled="!hasSelected"
:loading="loading"
style="width: 120px"
@change="Actions"
placeholder="请选择操作"
v-if="ActionsList.length!=0"
>
批量
<a-select-option v-for="item in ActionsList" :key="item.value">
{{ item.label }}
</a-select-option>
</a-select>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
<!-- 表格 -->
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 1400 }"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<!-- 外头传进来的操作栏信息data为表格循环出来的当前行数据信息 -->
<span slot="action" slot-scope="text, row">
<slot name="actionBox" :data="row"></slot>
</span>
<span slot="tags" slot-scope="tags">
<a-tag
v-for="tag,index in tags"
:key="index"
>
{{ formatter(tag) }}
</a-tag>
</span>
</a-table>
</div>
</template>
<script>
export default {
data() {
return {
//
pagination: {
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
activeAction:undefined,
/**
*
*
* customRender: function (gender) {
if (gender === 1) {
return "是";
} else {
return "否";
}
},
*/
loading: false,
// index
selectedRowKeys: [],
};
},
computed: {
// selection
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
//
props: {
columns: Array,
tableData: Array,
ActionsList: Array,
// activeAction:Number
},
methods: {
// selection
selectionChoosed(selectedRowKeys, data) {
this.selectedRowKeys = selectedRowKeys;
this.$emit("selectionChoosed", data);
},
//
handleTableChange(val) {
this.$emit("handleTableChange", val);
},
//
Actions(val) {
this.$emit("Actions", val);
this.activeAction = undefined
},
formatter(val){
this.$emit("formatter", val);
}
},
};
</script>
<style lang="less" scoped>
#commonTable {
margin: 24px;
}
</style>

@ -0,0 +1,30 @@
<template>
<div>
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
<img alt="example" style="width: 100%" :src="previewImage" />
</a-modal>
</div>
</template>
<script>
export default {
props:{
previewVisible:{
type:Boolean,
default:false,
},
previewImage:{
type:String,
}
},
methods:{
handleCancel() {
this.$emit('handleCancel')
},
}
}
</script>
<style>
</style>

@ -0,0 +1,86 @@
<template>
<div>
<a-upload
:action="`${$upload}`"
accept=".jpg,.JPG,.png,.PNG,.jpeg,.JPEG"
list-type="picture-card"
:headers="uploadHeaders"
:file-list="fileList"
@preview="handlePreview"
@change="handleChange"
:beforeUpload="beforeUpload"
>
<div v-if="fileList.length < limit">
<a-icon type="plus" />
<div class="ant-upload-text">上传图片</div>
</div>
</a-upload>
<imgModal
:previewVisible="previewVisible"
:previewImage="previewImage"
@handleCancel="handleCancel"
/>
</div>
</template>
<script>
import imgModal from "./imgModal.vue";
function getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = (error) => reject(error);
});
}
import store from "@/store";
export default {
components: {
imgModal,
},
props: {
fileList: Array,
limit: {
type: Number,
default: 1,
},
},
data() {
return {
previewVisible: false,
previewImage: "",
uploadHeaders: {
"manage-login-token": store.getters.getToken,
},
};
},
//
methods: {
async handlePreview(file) {
if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj);
}
this.previewImage = file.url || file.preview;
this.previewVisible = true;
},
handleCancel() {
this.previewVisible = false;
},
handleChange({ fileList }) {
this.$emit("handleChange", fileList);
},
// 50mb
beforeUpload(f, l) {
const isLt50M = f.size / 1024 / 1024 < 50;
if (!isLt50M) {
this.$message.error(f.name + "文件大小超出限制,请修改后重新上传");
return false;
} else {
return true;
}
},
},
};
</script>
<style></style>

@ -1,27 +1,35 @@
/*
* @Author: your name
* @Date: 2021-11-18 17:15:53
* @LastEditTime: 2021-11-26 16:18:36
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /ansu-business/src/main.js
*/
import Vue from 'vue'
import App from './App.vue'
import './styles/index.less';
import mixins from "@/mixins"
import Antd from 'ant-design-vue';
// import {Cascader} from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css';
// import moment from 'moment';
import util from '@/utils/util.js'
import 'ant-design-vue/dist/antd.css';
import vuescroll from 'vuescroll';
import createOps from '@/utils/ops';
import { Button } from 'ant-design-vue';
Vue.use(Button);
Vue.use(util);
Vue.use(Antd);
Vue.use(mixins);
// Vue.use(Cascader);
import store from "@/store";
import router from "@/permission";
Vue.config.productionTip = false;
Vue.use(vuescroll, {ops: createOps(true, true),name: 'vue-scroll'});
// Vue.prototype.$moment = moment
const communityCode = store.getters.getCommunityCode;
Vue.prototype.$baseUrl = process.env.VUE_APP_URL + communityCode + '/manage'
Vue.config.productionTip = false
import commonTable from './components/table'
import commonUpload from './components/upload/index.vue'
import allCity from './components/allCity/index.vue'
import searchForm from './components/searchForm/index.vue'
// 注册组件
Vue.component('commonTable', commonTable)
Vue.component('commonUpload', commonUpload)
Vue.component('allCity', allCity)
Vue.component('searchForm', searchForm)
new Vue({
render: h => h(App),

@ -12,10 +12,10 @@ export default {
install(Vue) {
Vue.mixin({
computed: {
...mapGetters(['getSelectedKeys', 'getOpenKeys'])
...mapGetters(['getToken','getCommunityCode','getSelectedKeys', 'getOpenKeys','getCity'])
},
methods: {
...mapActions(['setSelectedKeys', 'setOpenKeys'])
...mapActions(['setToken','setCommunityCode','setSelectedKeys', 'setOpenKeys','setCity'])
}
})
}

@ -1,18 +1,19 @@
/*
* @Author: your name
* @Date: 2021-11-18 17:34:50
* @LastEditTime: 2021-11-18 17:37:15
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /ansu-business/src/permission.js
*/
import NProgress from "nprogress"
import "nprogress/nprogress.css"
import router from "@/router"
import store from '@/store'
const whitePath = [ '/login']
// 判断登录
router.beforeEach((to, from, next) => {
NProgress.start()
const token = store.getters.getToken;
if(!token && !whitePath.includes(to.path)) {
next('/login');
} else {
next();
NProgress.done()
}
})
router.afterEach(() => {

@ -1,15 +1,17 @@
/*
* @Author: your name
* @Date: 2021-10-13 09:28:02
* @LastEditTime: 2021-11-11 10:45:00
* @LastEditTime: 2022-01-05 13:44:32
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/request/index.js
*/
import axios from 'axios';
import qs from 'qs';
// import qs from 'qs';
import router from "@/permission"
import { message} from 'ant-design-vue'
import store from '@/store'
// import baseURL from "@/utils/baseURL"
function filterRequestData(obj) {
let o = {};
for(let key in obj) {
@ -23,22 +25,21 @@ function filterRequestData(obj) {
}
//创建axios的实例
const httpService = axios.create({
baseURL: 'http://cloud.sws010.com',// TODO:具体的配置可以根据项目情况而来
baseURL: process.env.VUE_APP_URL ,// TODO:具体的配置可以根据项目情况而来
timeout: 5000
})
//axios的拦截--request
httpService.interceptors.request.use(config => {
// 请求成功处理
// if(localStorage.getItem('token')){//判断浏览器中的cookie中是否存在项目的token
// config.headers.token = localStorage.getItem('token')
// }
const rqParams = filterRequestData(config.params);
const rqData = filterRequestData(config.data);
// post 'Content-Type' === 'application/x-www-form-urlencoded'
config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
config.headers['Content-Type'] = "application/json";
config.headers['manage-login-token'] = store.getters.getToken;
// config.headers['device-type'] = "web";
config.baseURL = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage'
if(config.method === 'post') {
config.data = qs.stringify(rqData);
config.data = rqData;
} else {
config.data = rqData;
config.params = rqParams;
@ -51,25 +52,30 @@ httpService.interceptors.request.use(config => {
//4、axios的拦截--response
httpService.interceptors.response.use(response => {
// TODO:具体的code对应的处理可继续添加修改
let data = null;
let data1 = null;
// let data = null;
let msg = '';
let res = response.data;
let totalNum = 0;
if(res.Code == 1){
data = res.Data || [];
data1 = res.Data1 || [];
msg = res.Msg || "";
totalNum = res.totalNum || 0;
return {data,data1, msg, totalNum};
// console.log(response);
if(res.code === 200){
// code = 200;
// data = res.data;
// msg = res.msg || "";
// console.log(msg);
// console.log(data);
return res;
} else if(res.code == 10010) {
router.replace({
path: '/login'
});
} else {
msg = res.Msg || "";
msg = res.msg || "";
message.error(msg);
return Promise.reject(new Error(msg))
}
},err => {
console.log(err)
// TODO:具体的code对应的处理可继续添加修改
if(err.response.Code === 301){
if(err.response.code === 301){
//登录过期跳转登录页面并将要浏览的页面fullPath传过去登录成功后跳转需要访问的页面 ---主页(index) 或者 退出到登录前的浏览的页面
//这样登录页面登录接口成功之后可以进行跳转 主页(index) 或者 退出到登录前的页面: let path = this.$route.query.redirect || '/index.js'; this.$router.push(path);
setTimeout(() => {

@ -1,144 +1,139 @@
/*
* @Author: your name
* @Date: 2021-11-24 14:45:04
* @LastEditTime: 2021-11-26 16:15:03
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /LittleBeeSaas/src/router/basic.js
*/
export default [
// {
// path: '/Console',
// name: "Console",
// title: "控制台",
// hide: false,
// icon: 'container',
// component: resolve => require(['@/views/Basic/Console'], resolve),
// meta: {title: '控制台'}
// },
{
path: '/Basic/Console',
name: "Console",
title: "控制台",
hide: false,
icon: 'container',
component: resolve => require(['@/views/Basic/Console'], resolve),
meta: {title: '控制台'}
},
{
path: '/Basic/Employee',
path: '/Employee',
name: "Employee",
title: "员工管理",
icon: 'database',
icon: 'team',
hide: false,
component: resolve => require(['@/views/Basic/Employee'], resolve),
meta: {title: '员工管理'}
},
{
path: '/Basic/Authority',
path: '/authority',
name: "Authority",
title: "权限管理",
icon: 'profile',
icon: 'appstore',
hide: false,
component: resolve => require(['@/views/Basic/Authority'], resolve),
meta: {title: '权限管理'},
children: [
{
path: '/Basic/Authority/_member',
name: "Authority_member",
title: "成员管理",
icon: 'profile',
hide: false,
component: resolve => require(['@/views/Basic/Authority/_member'], resolve),
meta: {title: '成员管理'},
// children: [
// {
// path: '/Authority/_details',
// name: "Authority_details",
// title: "账单管理-详情",
// icon: 'profile',
// hide: true,
// component: resolve => require(['@/views/Basic/Authority/_details'], resolve),
// meta: {title: '账单管理-详情'},
// }
// ]
},
{
path: '/Basic/Authority/_role',
name: "Authority_role",
title: "角色管理",
icon: 'profile',
path: '/EstateInfo',
name: "EstateInfo",
title: "小区信息",
icon: 'home',
hide: false,
component: resolve => require(['@/views/Basic/Authority/_role'], resolve),
meta: {title: '角色管理'},
}
]
},
{
path: '/Basic/Attendance',
name: "Attendance",
title: "考勤管理",
icon: 'profile',
hide: false,
component: resolve => require(['@/views/Basic/Attendance'], resolve),
meta: {title: '考勤管理'},
component: resolve => require(['@/views/Basic/EstateInfo'], resolve),
redirect: '/EstateInfo/BuildingManage',
meta: {title: '小区信息'},
children: [
{
path: '/Basic/Attendance/record',
name: "Attendance_record",
title: "考勤记录",
icon: 'profile',
path: '/EstateInfo/BuildingManage',
name: "BuildingManage",
title: "楼栋管理",
hide: false,
component: resolve => require(['@/views/Basic/Attendance/_record'], resolve),
meta: {title: '考勤记录'},
component: resolve => require(['@/views/Basic/EstateInfo/_buildingManage'], resolve),
meta: {title: '楼栋管理'},
},
{
path: '/Basic/Attendance/application',
name: "Attendance_application",
title: "申请记录",
icon: 'profile',
path: '/EstateInfo/HouseManage',
name: "HouseManage",
title: "房屋管理",
hide: false,
component: resolve => require(['@/views/Basic/Attendance/_application'], resolve),
meta: {title: '申请记录'},
component: resolve => require(['@/views/Basic/EstateInfo/_houseManage'], resolve),
meta: {title: '房屋管理'},
},
{
path: '/Basic/Attendance/attendanceteam',
name: "Attendance_attendanceteam",
title: "考勤小组",
icon: 'profile',
path: '/EstateInfo/HouseHoldInfo',
name: "HouseHoldInfo",
title: "住户信息",
hide: false,
component: resolve => require(['@/views/Basic/Attendance/_attendanceteam'], resolve),
meta: {title: '考勤小组'},
component: resolve => require(['@/views/Basic/EstateInfo/_houseHoldInfo'], resolve),
meta: {title: '住户信息'},
},
{
path: '/Basic/Attendance/scheduling',
name: "Attendance_scheduling",
title: "排班计划",
icon: 'profile',
path: '/EstateInfo/HouseHoldAudit',
name: "HouseHoldAudit",
title: "住户审核",
hide: false,
component: resolve => require(['@/views/Basic/Attendance/_scheduling'], resolve),
meta: {title: '排班计划'},
component: resolve => require(['@/views/Basic/EstateInfo/_houseHoldAudit'], resolve),
meta: {title: '住户审核'},
},
]
},
{
path: '/Basic/Community',
name: "Community",
title: "社区档案",
icon: 'profile',
hide: false,
component: resolve => require(['@/views/Basic/Community'], resolve),
meta: {title: '社区档案'},
children: [
{
path: '/Basic/Community/_balcony',
name: "Community_balcony",
title: "楼座管理",
icon: 'profile',
path: '/Workorder',
name: "Workorder",
title: "工单管理",
icon: 'solution',
hide: false,
component: resolve => require(['@/views/Basic/Community/_balcony'], resolve),
meta: {title: '楼座管理'},
},
{
path: '/Basic/Community/_house',
name: "Community_house",
title: "房屋管理",
icon: 'profile',
hide: false,
component: resolve => require(['@/views/Basic/Community/_house'], resolve),
meta: {title: '房屋管理'},
},
{
path: '/Basic/Community/owner',
name: "Community_owner",
title: "业主管理",
icon: 'profile',
hide: false,
component: resolve => require(['@/views/Basic/Community/_owner'], resolve),
meta: {title: '业主管理'},
component: resolve => require(['@/views/Basic/WorkOrder'], resolve),
meta: {title: '工单管理'}
},
// {
// path: '/attendance',
// name: "Attendance",
// title: "考勤管理",
// icon: 'reconciliation',
// hide: false,
// redirect: '/attendance/record',
// component: resolve => require(['@/views/Basic/Attendance'], resolve),
// meta: {title: '考勤管理'},
// children: [
// {
// path: '/attendance/record',
// name: "Attendance_record",
// title: "考勤记录",
// hide: false,
// component: resolve => require(['@/views/Basic/Attendance/_record'], resolve),
// meta: {title: '考勤记录'},
// },
// {
// path: '/attendance/application',
// name: "Attendance_application",
// title: "申请记录",
// hide: false,
// component: resolve => require(['@/views/Basic/Attendance/application'], resolve),
// meta: {title: '申请记录'},
// },
// {
// path: '/attendance/attendanceteam',
// name: "Attendance_attendanceteam",
// title: "考勤小组",
// hide: false,
// component: resolve => require(['@/views/Basic/Attendance/_attendanceteam'], resolve),
// meta: {title: '考勤小组'},
// },
// {
// path: '/attendance/scheduling',
// name: "Attendance_scheduling",
// title: "排班计划",
// hide: false,
// component: resolve => require(['@/views/Basic/Attendance/_scheduling'], resolve),
// meta: {title: '排班计划'},
// },
]
}
// ]
// }
]

@ -15,22 +15,81 @@ Router.prototype.push = function push(location) {
}
Vue.use(Router);
// 枚举文件
// const files = require.context('./', true, /\.js/)
// let configRouters = []
// console.log(files.keys());
// files.keys().forEach((key, index) => {
// console.log(files(key).default,files);
// })
import Layout from "@/views/Layout"
import basic from "./basic" // 基础功能
// import payment from "./payment" // 缴费管理
// import smartMall from "./smartMall" // 智慧商城
// import operation from "./operation" // 运营管理
// import set from "./set" // 设置
import payment from "./payment" // 缴费管理
import shop from "./shop" // 智慧商城
import operation from "./operation" // 运营管理
import setting from "./setting" // 设置
const router = [
{
path: "/",
name: "Layout",
title: "外框",
name: "basic",
title: "基础",
component: Layout,
redirect: '/Basic/Console',
redirect: '/Employee',
meta: {title: '首页'},
children: [...basic]
children: [
...basic,
]
},
{
path: "/shop",
name: "shop",
title: "智慧商城",
component: Layout,
redirect: '/GoodsManage/GoodsList',
meta: {title: '智慧商城'},
children: [
...shop,
]
},
{
path: "/payment",
name: "payment",
title: "缴费管理",
component: Layout,
redirect: '/ChargeStandardManage',
meta: {title: '缴费管理'},
children: [
...payment,
]
},
{
path: "/operation",
name: "operation",
title: "运营管理",
component: Layout,
redirect: '/clientSet',
meta: {title: '运营管理'},
children: [
...operation,
]
},
{
path: "/setting",
name: "setting",
title: "设置",
component: Layout,
redirect: '/basicSet',
meta: {title: '设置'},
children: [
...setting,
]
},
{
path: "/rule",
name: "Rule",
title: "用户协议",
component: resolve => require(['@/views/Rule'], resolve)
},
{
path: "/login",

@ -6,4 +6,187 @@
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /LittleBeeSaas/src/router/operation.js
*/
export default []
export default [
{
path: '/ClientSet',
name: "ClientSet",
title: "用户端设置",
icon: 'setting',
hide: false,
component: resolve => require(['@/views/Operation/clientSet'], resolve),
meta: {title: '用户端设置'},
},
{
path: '/InspectionManage',
name: "InspectionManage",
title: "巡检管理",
icon: 'retweet',
hide: false,
component: resolve => require(['@/views/Operation/InspectionManage'], resolve),
redirect: '/InspectionManage/InspectionPoint',
meta: {title: '巡检管理'},
children: [
{
path: '/InspectionManage/InspectionPoint',
name: "InspectionPoint",
title: "巡检点",
hide: false,
component: resolve => require(['@/views/Operation/InspectionManage/_inspectionPoint'], resolve),
meta: {title: '巡检点'},
},
{
path: '/InspectionManage/InspectionRoute',
name: "InspectionRoute",
title: "巡检路线",
hide: false,
component: resolve => require(['@/views/Operation/InspectionManage/_inspectionRoute'], resolve),
meta: {title: '巡检路线'},
},
{
path: '/InspectionManage/InspectionPlan',
name: "InspectionPlan",
title: "巡检计划",
hide: false,
component: resolve => require(['@/views/Operation/InspectionManage/_inspectionPlan'], resolve),
meta: {title: '巡检计划'},
},
{
path: '/InspectionManage/InspectionExecute',
name: "InspectionExecute",
title: "巡检记录",
hide: false,
component: resolve => require(['@/views/Operation/InspectionManage/_inspectionExecute/index.vue'], resolve),
meta: {title: '巡检记录'},
},
]
},
{
path: '/Activity',
name: "Activity",
title: "活动",
icon: 'notification',
hide: false,
component: resolve => require(['@/views/Operation/Activity'], resolve),
redirect: '/Activity/ActivityManage',
meta: {title: '活动'},
children: [
{
path: '/Activity/ActivityManage',
name: "ActivityManage",
title: "活动管理",
hide: false,
component: resolve => require(['@/views/Operation/Activity/_activityManage'], resolve),
meta: {title: '活动管理'},
},
{
path: '/Activity/Organizers',
name: "Organizers",
title: "活动主办方",
hide: false,
component: resolve => require(['@/views/Operation/Activity/_organizers'], resolve),
meta: {title: '活动主办方'},
},
]
},
{
path: '/Announcement',
name: "Announcement",
title: "公告",
icon: 'file-search',
hide: false,
component: resolve => require(['@/views/Operation/Announcement'], resolve),
meta: {title: '公告'},
},
{
path: '/News',
name: "News",
title: "资讯",
icon: 'global',
hide: false,
component: resolve => require(['@/views/Operation/News'], resolve),
redirect: '/News/',
meta: {title: '资讯'},
children: [
{
path: '/News/NewsManage',
name: "NewsManage",
title: "资讯管理",
hide: false,
component: resolve => require(['@/views/Operation/News/_newsManage'], resolve),
meta: {title: '资讯管理'},
},
{
path: '/News/NewsItem',
name: "NewsItem",
title: "资讯分类",
hide: false,
component: resolve => require(['@/views/Operation/News/_newsItem'], resolve),
meta: {title: '资讯分类'},
},
]
},
{
path: '/TaskManage',
name: "TaskManage",
title: "任务",
icon: 'form',
hide: false,
component: resolve => require(['@/views/Operation/TaskManage'], resolve),
redirect: '/TaskManage/TaskList',
meta: {title: '任务'},
children: [
{
path: '/TaskManage/TaskList',
name: "TaskList",
title: "任务管理",
hide: false,
component: resolve => require(['@/views/Operation/TaskManage/_taskList'], resolve),
meta: {title: '任务管理'},
},
{
path: '/TaskManage/TaskSet',
name: "TaskSet",
title: "任务设置",
hide: false,
component: resolve => require(['@/views/Operation/TaskManage/_taskSet'], resolve),
meta: {title: '任务设置'},
},
]
},
{
path: '/BBS',
name: "BBS",
title: "社区",
icon: 'home',
hide: false,
component: resolve => require(['@/views/Operation/BBS'], resolve),
redirect: '/BBS/Dynamic',
meta: {title: '社区'},
children: [
{
path: '/BBS/Dynamic',
name: "Dynamic",
title: "社区动态",
hide: false,
component: resolve => require(['@/views/Operation/BBS/_dynamic'], resolve),
meta: {title: '社区动态'},
},
{
path: '/BBS/DynamicDetail',
name: "DynamicDetail",
title: "社区动态详情",
hide: true,
component: resolve => require(['@/views/Operation/BBS/_dynamic/detail'], resolve),
meta: {title: '社区动态详情'},
},
{
path: '/BBS/Topic',
name: "Topic",
title: "社区话题",
hide: false,
component: resolve => require(['@/views/Operation/BBS/_topic'], resolve),
meta: {title: '社区话题'},
},
]
},
]

@ -6,4 +6,101 @@
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /LittleBeeSaas/src/router/payment.js
*/
export default []
export default [
{
path: '/ChargeStandardManage',
name: "ChargeStandardManage",
title: "收费标准管理",
icon: 'form',
hide: false,
component: resolve => require(['@/views/Payment/ChargeStandardManage'], resolve),
meta: {title: '收费标准管理'},
},
{
path: '/ChargeStandardBind',
name: "ChargeStandardBind",
title: "收费标准绑定",
icon: 'sliders',
hide: false,
component: resolve => require(['@/views/Payment/ChargeStandardBind'], resolve),
meta: {title: '收费标准绑定'},
},
{
path: '/PrepayManage',
name: "PrepayManage",
title: "预缴管理",
icon: 'book',
hide: false,
component: resolve => require(['@/views/Payment/PrepayManage'], resolve),
meta: {title: '预缴管理'},
},
{
path: '/PayPlan',
name: "PayPlan",
title: "缴费计划",
icon: 'transaction',
hide: false,
component: resolve => require(['@/views/Payment/PayPlan'], resolve),
meta: {title: '缴费计划'},
},
{
path: '/BillManage',
name: "BillManage",
title: "账单管理",
icon: 'audit',
hide: false,
component: resolve => require(['@/views/Payment/BillManage'], resolve),
redirect: '/Payment/ActivityManage',
meta: {title: '账单管理'},
children: [
{
path: '/BillManage/PayInfo',
name: "PayInfo",
title: "账单明细",
hide: false,
component: resolve => require(['@/views/Payment/BillManage/_payInfo'], resolve),
meta: {title: '账单明细'},
},
{
path: '/BillManage/PayList',
name: "PayList",
title: "缴费明细",
hide: true,
component: resolve => require(['@/views/Payment/BillManage/_payList'], resolve),
meta: {title: '缴费明细'},
},
{
path: '/BillManage/OweList',
name: "OweList",
title: "欠费明细",
hide: true,
component: resolve => require(['@/views/Payment/BillManage/_oweList'], resolve),
meta: {title: '欠费明细'},
},
{
path: '/BillManage/PayRateReport',
name: "PayRateReport",
title: "收缴率报表",
hide: true,
component: resolve => require(['@/views/Payment/BillManage/_payRateReport'], resolve),
meta: {title: '收缴率报表'},
},
{
path: '/BillManage/RefundRecord',
name: "RefundRecord",
title: "退款记录",
hide: true,
component: resolve => require(['@/views/Payment/BillManage/_refundRecord'], resolve),
meta: {title: '退款记录'},
},
{
path: '/BillManage/BillNotice',
name: "BillNotice",
title: "账单通知",
hide: true,
component: resolve => require(['@/views/Payment/BillManage/_billNotice'], resolve),
meta: {title: '账单通知'},
},
]
},
]

@ -1,9 +0,0 @@
/*
* @Author: your name
* @Date: 2021-11-24 14:55:05
* @LastEditTime: 2021-11-24 14:55:06
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /LittleBeeSaas/src/router/set.js
*/
export default []

@ -0,0 +1,11 @@
export default [
{
path: '/basicSet',
name: "basicSet",
title: "基础设置",
hide: false,
icon: 'container',
component: resolve => require(['@/views/Set/basicSet'], resolve),
meta: {title: '基础设置'}
},
]

@ -0,0 +1,116 @@
/*
* @Author: your name
* @Date: 2021-11-24 14:50:31
* @LastEditTime: 2021-11-24 14:50:31
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /LittleBeeSaas/src/router/smartMall.js
*/
export default [
{
path: '/GoodsManage',
name: "GoodsManage",
title: "商品管理",
icon: 'home',
hide: false,
component: resolve => require(['@/views/Shop/GoodsManage'], resolve),
redirect: '/GoodsManage/GoodsList',
meta: {title: '商品管理'},
children: [
{
path: '/GoodsManage/GoodsList',
name: "GoodsList",
title: "商品列表",
hide: false,
component: resolve => require(['@/views/Shop/GoodsManage/_goodsList'], resolve),
meta: {title: '商品列表'},
},
{
path: '/GoodsManage/JcookList',
name: "JcookList",
title: "jcook商品库",
hide: false,
component: resolve => require(['@/views/Shop/GoodsManage/_jcookList'], resolve),
meta: {title: 'jcook商品库'},
},
{
path: '/GoodsManage/GoodsCate',
name: "GoodsCate",
title: "商品分类",
hide: false,
component: resolve => require(['@/views/Shop/GoodsManage/_goodsCate'], resolve),
meta: {title: '商品分类'},
},
// {
// path: '/GoodsManage/GoodsCate',
// name: "GoodsCate",
// title: "商品审核",
// hide: false,
// component: resolve => require(['@/views/Shop/GoodsManage/_goodsCate'], resolve),
// meta: {title: '商品分类'},
// },
{
path: '/GoodsManage/Brand',
name: "Brand",
title: "品牌资质",
hide: false,
component: resolve => require(['@/views/Shop/GoodsManage/_brand'], resolve),
meta: {title: '品牌资质'},
},
]
},
{
path: '/OrderManage',
name: "OrderManage",
title: "订单列表",
hide: false,
icon: 'container',
component: resolve => require(['@/views/Shop/OrderManage'], resolve),
meta: {title: '订单列表'}
},
{
path: '/OrderDetail',
name: "OrderDetail",
title: "订单详情",
hide: true,
icon: 'container',
component: resolve => require(['@/views/Shop/OrderManage/depend/detail'], resolve),
meta: {title: '订单详情'}
},
{
path: '/SupplierManage',
name: "SupplierManage",
title: "供应商管理",
hide: false,
icon: 'contacts',
component: resolve => require(['@/views/Shop/SupplierManage'], resolve),
meta: {title: '供应商管理'}
},
{
path: '/StoreManage',
name: "StoreManage",
title: "店铺管理",
hide: false,
icon: 'shop',
component: resolve => require(['@/views/Shop/StoreManage'], resolve),
meta: {title: '店铺管理'}
},
{
path: '/SwiperManage',
name: "SwiperManage",
title: "商城轮播图管理",
hide: false,
icon: 'bars',
component: resolve => require(['@/views/Shop/SwiperManage'], resolve),
meta: {title: '商城轮播图管理'}
},
{
path: '/ScoreSetting',
name: "ScoreSetting",
title: "积分设置",
hide: false,
icon: 'crown',
component: resolve => require(['@/views/Shop/ScoreSetting'], resolve),
meta: {title: '积分设置'}
},
]

@ -1,9 +0,0 @@
/*
* @Author: your name
* @Date: 2021-11-24 14:50:31
* @LastEditTime: 2021-11-24 14:50:31
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /LittleBeeSaas/src/router/smartMall.js
*/
export default []

@ -7,12 +7,21 @@
* @FilePath: /ansu-business/src/store/actions.js
*/
const actions = {
setToken: ({commit}, log) => {
commit('setToken', log)
},
setCommunityCode: ({commit}, log) => {
commit('setCommunityCode', log)
},
setSelectedKeys: ({commit}, log) => {
commit('setSelectedKeys', log)
},
setOpenKeys: ({commit}, log) => {
commit('setOpenKeys', log)
},
setCity: ({commit}, log) => {
commit('setCity', log)
},
}
export default actions

@ -12,7 +12,16 @@ const getters = {
},
getOpenKeys(state) {
return state.openKeys
}
},
getToken(state) {
return state.token
},
getCommunityCode(state) {
return state.communityCode
},
getCity(state) {
return state.cityList
},
}
export default getters

@ -14,7 +14,7 @@ import actions from "./actions";
import mutations from "./mutations";
import getters from "./getters";
import state from "./state";
const store = new Vuex.Store({
const store = new Vuex.Store({
state,
actions,
mutations,

@ -17,6 +17,17 @@ const mutations = {
let str = JSON.stringify(log);
sessionStorage.setItem('openKeys', str);
},
setToken: (state, log) => {
state.token = log;
sessionStorage.setItem('token', log);
},
setCommunityCode: (state, log) => {
state.communityCode = log;
sessionStorage.setItem('communityCode', log);
},
setCity (state, data) { // 设置参数
state.cityList = data
}
}
export default mutations

@ -8,6 +8,9 @@
*/
const state = {
selectedKeys: JSON.parse(sessionStorage.getItem('selectedKeys')) || ['/'],
openKeys: JSON.parse(sessionStorage.getItem('openKeys')) || []
openKeys: JSON.parse(sessionStorage.getItem('openKeys')) || [],
token: sessionStorage.getItem('token') || "",
communityCode: sessionStorage.getItem('communityCode') || "",
cityList:[]
}
export default state

@ -1,6 +1,6 @@
.ant-layout {
width: 100% !important;
height: 100% !important;
min-height: 100% !important;
}
.ant-layout-sider-children {
background-color: #2a334f;

@ -1 +1,77 @@
@import "./antd.less";
// 公共样式
#app {
background: #E5E5E5;
}
.content {
padding: 13px;
}
.main {
padding : 13px;
background: #fff;
}
.cardTitle {
border-left : 8px solid #205FBD;
padding-left : 10px;
margin-left : 10px;
margin-bottom: 10px;
}
.back-btn{
font-size: 16px;
line-height: 22px;
color: #000000D9;
font-weight: 500;
cursor: pointer;
}
// 表格
#commonTable {
margin: 24px;
}
.action {
margin-top: -50px;
}
.search-box {
margin: 20px;
}
.add-btn{
background-color: #1890FF !important;
color: rgba(255, 255, 255, 1) !important;
}
.footer {
height : 84px;
width : 100%;
background : #fff;
position : fixed;
bottom : 0;
z-index : 999;
line-height : 84px;
box-shadow : 0px -2px 4px 0px rgba(0, 0, 0, 0.35);
border-radius: 4px 4px 0px 0px;
border : 1px solid #e8e8e8;
left : 200px;
}
// 抽屉
.drawer-content {
text-align: left;
}
.drawer-footer {
position : absolute;
right : 0;
bottom : 0;
width : 100%;
border-top: 1px solid #e9e9e9;
padding : 10px 16px;
background: #fff;
text-align: right;
z-index : 1;
}
.ant-modal-content{
margin-top:100px;
}

@ -0,0 +1,41 @@
import store from '@/store'
import axios from 'axios'
import qs from 'qs'
export default {
install: function (Vue) {
//axios
Vue.prototype.$axios = axios
Vue.prototype.qs = qs
// 上传
Vue.prototype.$upload = process.env.VUE_APP_URL + store.getters.getCommunityCode + '/manage/user/upload/uploadImg'
// 静态地址
Vue.prototype.$ImgUrl = (src) => {
return process.env.VUE_APP_STATIC + store.getters.getCommunityCode + '/' + src
}
// 时间格式化
Vue.prototype.formatDate = (time, fmt) => {
if (time > 0) {
let date = new Date(time * 1000)
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
}
let o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds()
}
for (let k in o) {
if (new RegExp(`(${k})`).test(fmt)) {
let str = o[k] + ''
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : ('00' + str).substr(str.length))
}
}
return fmt
} else {
return ''
}
}
}
}

@ -0,0 +1,13 @@
<template>
<div></div>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -0,0 +1,13 @@
<template>
<div>test</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -0,0 +1,13 @@
<template>
<div>test</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -0,0 +1,14 @@
<template>
<div>application</div>
</template>
<script>
export default {
name:'application'
}
</script>
<style>
</style>

@ -0,0 +1,55 @@
/**
* 配置
* 表格列
*/
export const columns = [
{
title: "真实姓名",
dataIndex: "actualName",
width: "20%",
},
{
title: "手机号",
dataIndex: "tel",
width: "20%",
},
{
title: "角色",
dataIndex: "roleNameList",
width: "20%",
customRender: function (roleNameList) {
let arr = []
for (let item of roleNameList) {
arr.push(item.name)
}
return arr.toString()
},
},
{
title: "备注",
dataIndex: "remake",
width: "20%",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
// 搜索项
export const searchForm = {
roleId: null,
keyword: '',
}
// 分页
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

@ -0,0 +1,139 @@
<template>
<div>
<a-modal :title="title" :visible="show" @ok="addSubmit" @cancel="addClose">
<div>
<a-form-model
layout="vertical"
ref="ruleForm"
:model="form"
:rules="rules"
>
<a-form-model-item label="角色名称" prop="name">
<a-input v-model="form.name" placeholder="请输入角色名称" />
</a-form-model-item>
<a-form-model-item label="上级角色" prop="parentId">
<a-select v-model="form.parentId" placeholder="请选择" >
<a-select-option :key="0" :value="0">无上级</a-select-option>
<a-select-option v-for="item in rolelist" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="权限等级" prop="authorityLevel">
<a-input v-model.number="form.authorityLevel" placeholder="请选择" />
</a-form-model-item>
<a-form-model-item label="备注" prop="remakes">
<a-textarea v-model="form.remakes" placeholder="请输入" />
</a-form-model-item>
</a-form-model>
</div>
</a-modal>
</div>
</template>
<script>
import { roleInsert, roleUpdate } from "@/api/basic/role";
export default {
props: {
show: Boolean,
title: String,
id: Number,
list:Array
},
data() {
return {
rules:{
name: [{ required: true, message: '请输入', trigger: 'blur' }],
parentId: [{ required: true, message: '请选择', trigger: 'change' }],
authorityLevel: [{ required: true, message: '请输入', trigger: 'blur' }],
remakes: [{ required: true, message: '请输入', trigger: 'blur' }],
},
form:{
id: undefined,
name: '',
parentId: undefined,
authorityLevel: '',
remakes: '',
},
rolelist:[],
editInfo:null
};
},
methods: {
addSubmit() {
if(this.form.id === undefined){
this.$refs.ruleForm.validate(async valid => {
if (valid) {
const res = await roleInsert(this.form)
if(res.code === 200){
this.$message.success(res.msg)
this.addClose()
this.success()
}else{
this.$message.error(res.msg)
}
}
});
}else{
this.$refs.ruleForm.validate(async valid => {
if (valid) {
const res = await roleUpdate(this.form)
if(res.code === 200){
this.$message.success(res.msg)
this.addClose()
this.success()
}else{
this.$message.error(res.msg)
}
}
});
};
},
findId(list,id){
list.forEach(item => {
if(item.id === id){
this.editInfo = item
}else if(item.childrenList !== null && item.childrenList ){
this.findId(item.childrenList,id)
}else{
return
}
})
},
success(){
this.$emit('success')
},
addClose() {
this.$emit("close");
this.$refs.ruleForm.resetFields();
this.form.id = undefined;
},
},
watch: {
list:{
handler(val){
this.rolelist = []
this.rolelist = val
},
deep:true
},
id:{
handler(val){
if(val){
this.form.id = val
this.findId(this.rolelist,val)
// console.log(this.editInfo);
this.form.name = this.editInfo.name
this.form.parentId = this.editInfo.parentId
this.form.authorityLevel = this.editInfo.authorityLevel
this.form.remakes = this.editInfo.remakes
}else if( val === undefined ){
this.form.id = undefined
}
},
}
}
};
</script>
<style>
</style>

@ -0,0 +1,295 @@
<template>
<div>
<a-row>
<!-- 角色列表 -->
<a-col :span="5">
<div class="cardTitle">所有角色</div>
<a-collapse accordion @change="rolechange">
<a-collapse-panel
v-for="(item, index) in roleList"
:key="index"
:header="item.name"
>
<div
v-for="(rolechild, indexs) in item.childrenList"
class="role-card"
:key="indexs"
@click="rolechoose(rolechild.id)"
>
<span class="role-li">
<span>{{ rolechild.name || "无" }}</span>
<span v-show="rolechild.name"> </span>
</span>
</div>
</a-collapse-panel>
</a-collapse>
</a-col>
<!-- 功能表格 -->
<a-col :span="19">
<div class="treebox">
<a-tree
class="tree"
v-model="checkedKeys"
v-if="treeShow != undefined"
checkable
:expandedKeys="expandedKeys"
:replace-fields="replaceFields"
:selected-keys="selectedKeys"
:tree-data="menus"
@expand="onExpand"
@select="onSelect"
@check="onCheck"
/>
</div>
</a-col>
</a-row>
<a-drawer
title="配置操作"
placement="right"
:closable="false"
:visible="actions.show"
@close="onClose"
>
<div class="content">
<div v-if="actionsList.length === 0"></div>
<a-checkbox
v-for="action in actionsList"
:checked="action.isCheck"
:key="action.id"
@change="onChange($event, action.id)"
>
{{ action.name }}</a-checkbox
>
</div>
</a-drawer>
</div>
</template>
<script>
import {
getrolelist,
FindAllMenus,
changeMenuShow,
getActions,
changeActions,
} from "@/api/basic/role";
export default {
data() {
return {
roleId: null,
defaultExpandAll: true,
roleList: [],
expandedKeys: [],
replaceFields: {
children: "childrenList",
title: "name",
key: "id",
},
checkedKeys: {
checked: [],
halfChecked: [],
},
selectedKeys: [],
menus: [], //
actionsList: [], //
actions: {
show: false,
},
treeShow: undefined,
};
},
mounted() {
this.getData();
},
methods: {
getData() {
getrolelist().then((res) => {
this.roleList = res.data;
});
},
rolechoose(data) {
this.checkedKeys = {
checked: [],
halfChecked: [],
};
if (data !== undefined) {
this.roleId = data;
FindAllMenus({ roleId: this.roleId }).then((res) => {
this.menus = res.data;
this.defaultCheck(this.menus);
});
} else if (data === undefined) {
this.roleId = null;
}
},
rolechange(data) {
this.treeShow = data;
if (data != undefined) {
this.checkedKeys = {
checked: [],
halfChecked: [],
};
this.roleId = this.roleList[data].id;
FindAllMenus({ roleId: this.roleId }).then((res) => {
this.menus = res.data;
this.defaultCheck(this.menus);
});
} else {
this.roleId = null;
// this.menus = [];
}
},
// defaultCheck(arr) {
// for (let item of arr) {
// if (item.childrenList != null) {
// if(item.isShow == true){
// this.checkedKeys.push(item.id);
// }
// this.defaultCheck(item.childrenList);
// } else if (item.isShow == true) {
// this.checkedKeys.push(item.id);
// }
// }
// },
defaultCheck(arr) {
let res = {
checked: [],
halfChecked: [],
};
for(let x = 0; x<arr.length; x++) {
let item = arr[x];
for(let y = 0; y<arr[x].childrenList.length; y++) {
let item = arr[x].childrenList[y];
let checkedNum = 0
if(item.childrenList) {
for(let z = 0; z<arr[x].childrenList[y].childrenList.length; z++) {
let item = arr[x].childrenList[y].childrenList[z];
let checkedNum = 0
if(item.isShow == true) {
res.checked.push(item.id)
checkedNum = checkedNum + 1
}
if( checkedNum == arr[x].childrenList[y].childrenList.length) {
res.checked.push(arr[x].childrenList[y].id)
} else if ( checkedNum != 0) {
res.halfChecked.push(arr[x].childrenList[y].id)
} else {
}
}
}
if(!item.childrenList) {
if(item.isShow == true) {
res.checked.push(item.id);
checkedNum = checkedNum + 1
}
if(checkedNum == arr[x].childrenList.length) {
res.checked.push(arr[x].id)
} else if (checkedNum != 0) {
res.halfChecked.push(arr[x].id)
}
}
}
if(!item.childrenList) {
if(item.isShow == true) {
res.checked.push(item.id)
}
}
}
this.expandedKeys = res.halfChecked.concat(res.checked)
this.checkedKeys = res
},
onCheck(checkedKeys, e) {
this.checkedKeys = checkedKeys;
changeMenuShow({
roleId: this.roleId,
showMenusId: e.node.eventKey,
}).then((res) => {
if (res.code === 200) {
this.$message.success(res.msg);
} else {
this.$message.error(res.msg);
}
});
},
onExpand(e) {
this.expandedKeys = e;
},
onSelect(selectedKeys, info) {
this.selectedKeys = selectedKeys;
getActions({ roleId: this.roleId, menusId: this.selectedKeys[0] }).then(
(res) => {
this.actionsList = res.data;
this.actions.show = true;
}
);
},
onChange(e, id) {
changeActions({
roleId: this.roleId,
menusId: this.selectedKeys[0],
operationId: id,
}).then((res) => {
if (res.code === 200) {
this.$message.success(res.msg);
this.onSelect(this.selectedKeys)
} else {
this.$message.error(res.msg);
}
});
},
onClose() {
this.actions.show = false;
},
},
watch: {
checkedKeys(val) {
},
roleList: {
handler(val) {
val.forEach((ele, index) => {
if (ele.childrenList === undefined || ele.childrenList === null) {
this.roleList[index].childrenList = [{}];
}
});
},
deep: true,
},
},
};
</script>
<style lang="less" scoped>
.role-card {
line-height: 30px;
font-size: 16px;
cursor: pointer;
border-bottom: 1px solid #d9d9d9;
margin-bottom: 10px;
display: flex;
justify-content: space-between;
}
.treebox {
padding-left: 30px;
}
.tree {
display: flex;
}
.role-card {
line-height: 30px;
font-size: 16px;
cursor: pointer;
border-bottom: 1px solid #d9d9d9;
margin-bottom: 10px;
display: flex;
justify-content: space-between;
}
.role-li {
display: flex;
justify-content: space-between;
width: 100%;
}
/deep/.ant-checkbox-wrapper + .ant-checkbox-wrapper {
margin: 0px;
}
</style>

@ -8,7 +8,7 @@
-->
<template>
<div>
11111
</div>
</template>

@ -0,0 +1,217 @@
/**
* 配置
* 表格列
*/
export const columns = [
{
title: "真实名称",
dataIndex: "actualName",
width: "12%",
},
{
title: "手机号",
dataIndex: "tel",
width: "14%",
},
{
title: "所属部门",
dataIndex: "departmentName",
width: "16%",
},
{
title: "岗位",
dataIndex: "positionName",
width: "10%",
},
{
title: "状态",
dataIndex: "status",
width: "12%",
customRender: function (status) {
switch (status) {
case 1:
return "正常";
case 2:
return "停用";
default:
break;
}
},
},
{
title: "备注",
dataIndex: "remake",
width: "300",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
];
// 搜索项
export const searchForm = {
keyword: "",
departmentId: null,
positionId: null,
};
// 分页
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
};
export const form = {
cascVal: [],
id: null,
actualName: "",
sex: undefined,
idCard: "",
tel: "",
birthday: "",
password: "",
email: "",
address: "",
idCardImgUrls: [],
departmentId: "",
departmentIdPath: "",
positionId: "",
entryDate: "",
salary: "",
dataImgUrls: [],
emergencyContact: "",
emergencyContactNumber: "",
emergencyContactAddress: "",
maritalStatus:undefined,
nation: "",
politicalOutlook:undefined,
accountType:undefined,
remake: "",
};
const handleConfirm = (rule,value,callback) => {
if(!value){
callback();
}else{
// 正则判断失败抛出错误否则直接callback()
if(!/(^\d{18}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(value)){
callback(new Error("身份证格式不正确!"));
}else{
callback();
}
}
}
export const rules = {
actualName: [{ required: true, message: "请输入真实姓名", trigger: "blur" }],
sex: [{ required: true, message: "请选择性别", trigger: "change" }],
idCard: [{ required: true, message: "请输入身份证号", trigger: "blur" },{validator: (rule,value,callback) => handleConfirm(rule,value,callback)}],
tel: [
{ required: true, message: "请输入手机号", trigger: "blur" },
{ min: 11, max: 11, message: "手机号只能为11位", trigger: "blur" },
],
cascVal: [
{ type: "array", required: true, message: "请选择岗位", trigger: "change" },
],
entryDate: [{ required: true, message: "请选择入职时间", trigger: "change" }],
emergencyContactNumber: [
{ required: true, message: "请输入手机号", trigger: "blur" },
{ min: 11, max: 11, message: "手机号只能为11位", trigger: "blur" },
],
};
export const options = {
sex: [
{
id: 1,
name: "男",
},
{
id: 2,
name: "女",
},
{
id: 3,
name: "保密",
},
],
maritalStatus:[
{
id: 1,
name: "未婚",
},
{
id: 2,
name: "已婚",
},
],
politicalOutlook:[
{
id: 1,
name: "群众",
},
{
id: 2,
name: "中共党员",
},
{
id: 3,
name: "共青团",
},
{
id: 4,
name: "民革党员",
},
{
id: 5,
name: "民盟盟员",
},
{
id: 6,
name: "民建会员",
},
{
id: 7,
name: "民进会员",
},
{
id: 8,
name: "农工党党员",
},
{
id: 9,
name: "致公党党员",
},
{
id: 10,
name: "九三学社社员",
},
{
id: 11,
name: "台盟盟员",
},
{
id: 12,
name: "无党派人士",
},
],
accountType: [
{
id: 1,
name: "农村",
},
{
id: 2,
name: "城市",
},
]
};
import store from "@/store";
export const uploadHeaders = {
"manage-login-token": store.getters.getToken,
};

@ -0,0 +1,482 @@
<template>
<div>
<!-- 员工 新增修改表单 -->
<a-form-model
title="1d2"
layout="vertical"
ref="ruleForm"
:model="form"
:rules="rules"
:wrapper-col="{ span: 18 }"
>
<div class="drawer-title">基本信息</div>
<a-divider></a-divider>
<a-row>
<a-col :span="12">
<a-form-model-item label="真实姓名" prop="actualName">
<a-input v-model="form.actualName" placeholder="请输入真实姓名" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="性别" prop="sex">
<a-select v-model="form.sex" placeholder="请选择性别">
<a-select-option v-for="item in options.sex" :key="item.id">{{
item.name
}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="身份证号" prop="idCard">
<a-input v-model="form.idCard" placeholder="请输入身份证号" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item ref="tel" label="手机号" prop="tel">
<a-input
v-model="form.tel"
placeholder="请输入手机号"
@blur="
() => {
$refs.tel.onFieldBlur();
}
"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="出生日期" prop="birthday">
<a-date-picker v-model="form.birthday" value-format="YYYY-MM-DD HH:mm:ss"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="密码" prop="password">
<a-input
type="password"
placeholder="不输入默认为手机号后6位"
v-model="form.password"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="电子邮箱" prop="email">
<a-input placeholder="请输入电子邮箱" v-model="form.email" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="居住地址" prop="address">
<a-input placeholder="请输入居住地址" v-model="form.address" />
</a-form-model-item>
</a-col>
身份证照片
<a-upload
:action="`${$upload}`"
:headers="uploadHeaders"
list-type="picture-card"
accept='.jpg,.JPG,.png,.PNG,.jpeg,.JPEG'
:file-list="idcardfileList"
@preview="handlePreview"
@change="idcardhandleChange"
:beforeUpload='beforeUpload'
>
<div v-if="idcardfileList.length < 2">
<!-- <a-icon type="plus" /> -->
<a-icon :type="imgLoading ? 'loading' : 'plus'" />
<div class="ant-upload-text">点击上传</div>
</div>
</a-upload>
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
<img alt="example" style="width: 100%" :src="previewImage" />
</a-modal>
<span style="color: #00000073"
>单张最多不超过4M最多上传2张支持JPG,PNG格式</span
>
</a-row>
<div class="drawer-title">入职信息</div>
<a-divider></a-divider>
<a-row>
<a-col :span="12">
<a-form-model-item label="岗位" prop='cascVal'>
<a-cascader
:field-names="{
label: 'name',
value: 'id',
children: 'childList',
}"
:options="treeData"
placeholder="请选择"
@change="onChange"
v-model="form.cascVal"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="入职时间" prop="entryDate">
<a-date-picker
placeholder="请选择入职时间"
v-model="form.entryDate"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="薪资" prop="salary">
<a-input placeholder="请输入薪资" v-model="form.salary" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<div>上传资料</div>
<a-upload
:action="`${$upload}`"
:headers="uploadHeaders"
accept='.jpg,.JPG,.png,.PNG,.pdf,.PDF'
list-type="picture"
:file-list="fileList"
@preview="handlePreview"
@change="fileChange"
:beforeUpload='beforeUpload'
>
<a-button> <a-icon type="upload"/> 点击上传 </a-button>
</a-upload>
<span style="color: #00000073">支持上传PNGJPGPDF文件</span>
</a-col>
</a-row>
<div class="drawer-title">联系信息</div>
<a-divider></a-divider>
<a-row>
<a-col :span="12">
<a-form-model-item label="紧急联系人" prop="emergencyContact">
<a-input
placeholder="请输入紧急联系人"
v-model="form.emergencyContact"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="紧急联系电话" prop="emergencyContactNumber">
<a-input
placeholder="请输入紧急联系电话"
v-model="form.emergencyContactNumber"
/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item
label="紧急联系地址"
prop="emergencyContactAddress"
>
<a-input
placeholder="请输入紧急联系地址"
v-model="form.emergencyContactAddress"
/>
</a-form-model-item>
</a-col>
</a-row>
<div class="drawer-title">其他信息</div>
<a-divider></a-divider>
<a-row>
<a-col :span="12">
<a-form-model-item label="婚姻状态" prop="maritalStatus">
<a-select
placeholder="请选择婚姻状态"
v-model="form.maritalStatus"
>
<a-select-option v-for="item in options.maritalStatus" :key="item.id">{{
item.name
}}</a-select-option></a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="民族" prop="nation">
<a-input placeholder="请输入民族" v-model="form.nation"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="政治面貌" prop="politicalOutlook">
<a-select
placeholder="请选择政治面貌"
v-model="form.politicalOutlook"
>
<a-select-option v-for="item in options.politicalOutlook" :key="item.id">{{
item.name
}}</a-select-option></a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="户口类型" prop="accountType">
<a-select placeholder="请选择类型" v-model="form.accountType">
<a-select-option v-for="item in options.accountType" :key="item.id">{{
item.name
}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" prop="remake">
<a-textarea
v-model="form.remake"
placeholder="请输入备注"
></a-textarea>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</div>
</template>
<script>
import { form, rules, options, uploadHeaders } from "./config"
import { insertManageUser, departmentList, manageUserInfo, EditManageUser } from "@/api/basic/department";
function getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = (error) => reject(error);
});
}
export default {
name: "Vueform",
props: {
type: {
type: String,
default:'add'
},
editId:Number,
},
data() {
return {
form,
rules,
options,
uploadHeaders,
previewVisible: false,
previewImage: "",
imgLoading: false,
treeData:[], //
telephoneNum:"", //
idcardfileList: [], //
fileList:[], //
};
},
created() {
this.getData()
},
methods: {
getData(){
departmentList().then((res) => {
this.treeData = res.data;
// type 1 2
this.positionDisabled(this.treeData)
});
},
//
positionDisabled(arr){
arr.forEach((item,index)=>{
if(item.type=== 1 && (item.childList.length===0 || item.childList===null)){
arr[index].disabled=true
}else if(item.type === 2){
arr[index].disabled=false
}else{
this.positionDisabled(item.childList)
}
})
},
//
submit() {
let arr = []
let file = []
for(let item of this.idcardfileList){
//
if(item.response){
arr.push(item.response.data)
}else{
//
arr.push(item.url.split('/')[item.url.split('/').length-1])
}
}
for(let item of this.fileList){
//
if(item.response){
file.push(item.response.data)
}else{
//
file.push(item.url.split('/')[item.url.split('/').length-1])
}
}
this.form.idCardImgUrls = arr
this.form.dataImgUrls = file
this.$refs.ruleForm.validate((valid) => {
if (!valid) {
return;
}
if (this.type === "add") {
insertManageUser(this.form).then((res) => {
if(res.code===200){
this.$message.success(res.msg)
this.$emit('success')
this.close()
}
});
} else {
if(this.form.tel === this.telephoneNum){
this.form.tel = null
}
// console.log(this.form);
EditManageUser(this.form).then((res) => {
if(res.code===200){
this.$message.success(res.msg)
this.$emit('success')
this.close()
}
});
}
});
},
//
close() {
this.$refs.ruleForm.resetFields();
this.form.cascVal = []
this.idcardfileList =[]
this.fileList =[]
},
async handlePreview(file) {
console.log(file);
if(file.name.indexOf('pdf')!==-1){
if(file.response){
window.open(this.$ImgUrl(file.response.data))
return
}else{
window.open(file.url)
return
}
}
if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj);
}
this.previewImage = file.url || file.preview;
this.previewVisible = true;
},
//
onChange(data) {
// data [1,2,2]
// yyyy-mm-dd hh:mm:ss
let _data = JSON.parse(JSON.stringify(data))
this.form.positionId = _data.pop() //2
this.form.departmentId = _data[_data.length-1] //[1,2]==>2
let str = ''
// 1:2:
for (let i = 0; i < _data.length; i++) {
str += _data[i]+':'
}
// 0:1:2:
this.form.departmentIdPath = '0:'+ str
},
handleCancel() {
this.previewVisible = false;
},
idcardhandleChange(info) {
this.idcardfileList = info.fileList
},
fileChange(info) {
this.fileList = info.fileList
},
beforeUpload(f, l) {
const isLt50M = f.size / 1024 / 1024 < 50;
if (!isLt50M) {
this.$message.error(f.name + "文件大小超出限制,请修改后重新上传");
return false;
} else {
return true;
}
},
},
watch: {
editId: {
handler(val) {
// console.log(val);
if(val === null){
return
}
this.form.id =val;
manageUserInfo({id:this.form.id}).then(res=>{
let data = res.data
//
this.form.actualName = data.actualName
this.form.sex = data.sex
this.form.idCard = data.idCard
this.form.tel = data.tel
this.telephoneNum = data.tel
this.form.birthday = data.birthday
this.form.password = data.password
this.form.email = data.email
this.form.address = data.address
this.form.entryDate = data.entryDate
this.form.salary = data.salary
this.form.emergencyContact = data.emergencyContact
this.form.emergencyContactNumber = data.emergencyContactNumber
this.form.emergencyContactAddress = data.emergencyContactAddress
this.form.maritalStatus = data.maritalStatus
this.form.nation = data.nation
this.form.politicalOutlook = data.politicalOutlook
this.form.accountType = data.accountType
this.form.remake = data.remake
//
this.form.cascVal = []
let path = data.departmentIdPath.split(':')
path.pop()
path.splice(0,1)
path.push(data.positionId)
path.forEach(element => {
this.form.cascVal.push(Number(element))
});
//
//
if(!data.idCardImgList.length){
this.idcardfileList=[]
}
const arr = []
for(let item of data.idCardImgList){
let obj = {
name:item.url.split('_')[0],
url: this.$ImgUrl(item.url),
uid:item.url.split('_')[1],
status:'done',
}
arr.push(obj)
}
this.idcardfileList = arr
//
if(!data.dataImgList.length){
this.fileList=[]
}
const file = []
for(let item of data.dataImgList){
let obj = {
name:item.url.split('_')[0] +'.'+ item.url.split('.')[1],
url: this.$ImgUrl(item.url),
uid:item.url.split('_')[1],
status:'done',
thumbUrl: this.$ImgUrl(item.url),
}
file.push(obj)
}
this.fileList = file
})
},
immediate: true,
},
},
};
</script>
<style lang="less">
.drawer-title {
margin: 0;
color: rgba(0, 0, 0, 0.85);
font-weight: 500;
font-size: 16px;
line-height: 22px;
margin-top: 16px
}
</style>

@ -1,183 +1,580 @@
<!--
* @Author: your name
* @Date: 2021-11-22 15:56:04
* @LastEditTime: 2021-11-26 12:27:21
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /ansu-business/src/views/Employee/index.vue
-->
<template>
<div class="box">
<div class="left">
<a-input-search placeholder="请输入搜索信息" style="width: 200px" />
<a-tree :tree-data="treeData" :expandedKeys.sync="expandedKeys" @node-click="handleNodeClick">
<div class="main">
<a-row>
<!-- 组织架构 -->
<a-col :span="5" class="left-tree">
<!-- <a-input-search
style="margin-bottom: 8px"
placeholder="请输入搜索信息"
v-model="searchStr"
@change="onSearch"
/> -->
<div>
<a-button type="link" @click="openDepartment(1)"
>+&nbsp;新建分组</a-button
>
<a-button type="link" icon="form" @click="openDepartment()">
</a-button>
<a-button
type="link"
style="color: #ff4d4f"
icon="delete"
@click="del()"
>
</a-button>
</div>
<a-tree
v-model="checkedKeys"
:expanded-keys="expandedKeys"
:auto-expand-parent="autoExpandParent"
:selected-keys="selectedKeys"
:tree-data="treeData"
@expand="onExpand"
@select="onSelect"
:replaceFields="{ children: 'childList', title: 'name' }"
>
<template slot="title" slot-scope="{ name }">
<span
v-html="
name.replace(
new RegExp(searchValue, 'g'),
'<span style=color:#f50>' + searchValue + '</span>'
)
"
></span>
</template>
</a-tree>
</a-col>
<!-- right 员工 -->
<a-col :span="19">
<div class="search-box">
<a-space size="large">
<a-input v-model="searchForm.keyword" placeholder="请输入姓名/手机号" />
<a-button type="primary" @click='getData'> </a-button>
<a-button @click='reset'> </a-button>
</a-space>
</div>
<div class="right">
<div class="top">
<div class="topleft">
<a-button-group>
<a-button icon="plus" type="primary">新增员工</a-button>
<a-button>导入</a-button>
<a-button>导出</a-button>
</a-button-group>
<!-- 表格 -->
<div id="commonTable">
<div style="margin-bottom: 16px">
<a-space size="large">
<a-button class='add-btn' :loading="loading" @click="addStaff()">
新增员工
</a-button>
<a-button :disabled="!hasSelected" :loading="loading">
批量操作
</a-button>
</a-space>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
<div class="topright">
<a-form-model :model="form" layout="inline">
<a-form-model-item>
<a-select v-model="form.a" show-search placeholder="所属部门" option-filter-prop="children" style="width: 160px" :filter-option="filterOption">
<a-select-option value="jack">
Jack
</a-select-option>
<a-select-option value="lucy">
Lucy
</a-select-option>
</a-select>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<!-- 操作 -->
<span slot="action" slot-scope="text,scope">
<a-space size="small">
<a class="ant-dropdown-link" @click="edit(scope)"></a>
<a-switch checked-children="" un-checked-children="" @change="enableUser(scope.id)" :checked='scope.status ===1'></a-switch>
<a class="ant-dropdown-link" @click="resetPsw(scope.id)"></a>
</a-space>
</span>
<span slot="formatter" slot-scope="scope">{{
scope === 1 ? "可" : ""
}}</span>
</a-table>
</div>
</a-col>
</a-row>
<!-- 添加部门 -->
<a-modal
:title="show.depepartmentTitle"
:visible="show.addDepartment"
@ok="handleOk"
@cancel="handleCancel"
>
<div>
<a-form-model
layout="vertical"
ref="ruleForm"
:model="form"
:rules="rules"
:wrapper-col="{ span: 18 }"
>
<a-form-model-item
prop="parentId"
label="上级"
v-show="show.depepartmentTitle === '新增组织架构'"
>
<a-cascader
:field-names="{
label: 'name',
value: 'id',
children: 'childList',
}"
:options="treeData"
placeholder="无上级"
change-on-select
@change="onChange"
v-model="cascVal"
/>
</a-form-model-item>
<a-form-model-item>
<a-select v-model="form.b" show-search placeholder="职位" option-filter-prop="children" style="width: 160px" :filter-option="filterOption">
<a-select-option value="jack">
Jack
</a-select-option>
<a-select-option value="lucy">
Lucy
</a-select-option>
<a-form-model-item prop="type" label="类型">
<a-select v-model="form.type">
<a-select-option
v-for="item in typeOption"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
<a-form-model-item>
<a-input-search v-model="form.c" placeholder="请输入搜索信息" style="width: 160px"></a-input-search>
<a-form-model-item prop="name" label="部门/岗位名称">
<a-input v-model="form.name"></a-input>
</a-form-model-item>
</a-form-model>
</div>
</a-modal>
<!-- 添加员工信息 -->
<a-drawer
:title="show.addStaffTitle"
:width="720"
:visible="show.addStaffShow"
:body-style="{ paddingBottom: '80px' }"
@close="addStaffClose"
>
<div class="drawer-content">
<vue-form :type="type" ref="addform" @success="success" :editId='editId'></vue-form>
</div>
<a-table :row-selection="rowSelection" :columns="columns" :data-source="tableData" :pagination="false">
<template v-slot:action="{record}">
<span>
<a @click="Edit(record)"></a>
<a-divider type="vertical" />
<a-switch checked-children="" un-checked-children="" default-checked />
<span>
<a-divider type="vertical" />
<a @click="Password(record)"></a>
</span>
<span>
<a-divider type="vertical" />
<a @click="Delete(record)"></a>
</span>
</span>
</template>
</a-table>
<div class="block">
<span>共10900条</span>
<a-pagination :total="page.total" :current="form.page" :page-size="page.pageSize"/>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addStaffClose">
关闭
</a-button>
<a-button type="primary" @click="addStaffSubmit"> </a-button>
</div>
</a-drawer>
<!-- 重置密码 -->
<a-drawer
title="重置密码"
:width="500"
:visible="show.resetPswShow"
:body-style="{ paddingBottom: '80px' }"
@close="repswClose"
>
<div class="drawer-content">
<a-row>
<a-col :span="8">
新密码
</a-col>
<a-col :span="16">
<a-input style='width:90%' v-model="password.newPassword" type='password'/>
</a-col>
<a-col :span="8" style='margin-top:20px'>
确认密码
</a-col>
<a-col :span="16" style='margin-top:20px'>
<a-input style='width:90%' v-model="password.confirmpsw" type='password'/>
</a-col>
</a-row>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="repswClose">
关闭
</a-button>
<a-button type="primary" @click="rePswSubmit"> </a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import columns from "./curd/columns";
import treeData from "./testData/treeData";
//
const rowSelection = {
onChange: (selectedRowKeys, selectedRows) => {
console.log(
`selectedRowKeys: ${selectedRowKeys}`,
"selectedRows: ",
selectedRows
);
},
onSelect: (record, selected, selectedRows) => {
console.log(record, selected, selectedRows);
},
onSelectAll: (selected, selectedRows, changeRows) => {
console.log(selected, selectedRows, changeRows);
},
};
const options = [];
import { columns, pagination, searchForm } from "./depend/config.js";
import vueForm from "./depend/form.vue";
import {
departmentList,
departmentInsert,
departmentUpdate,
departmentDel,
findToUser,
rePassword,
userEnable
} from "@/api/basic/department";
export default {
name: "Employee", //
components: {
vueForm,
},
data() {
return {
form: {
a: "",
b: "",
c: "",
page:1
},
rowSelection,
treeData,
expandedKeys: ["0-0-0", "0-0-1"],
options,
tableData: [
columns,
pagination,
searchForm,
searchStr: "",
searchValue: "",
rules: {
type: [{ required: true, message: "请选择类型", trigger: "change" }],
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
},
cascVal: [],
typeOption: [
{
key: "1",
name: "潘迪",
mobilenumber: "13899191020",
Department: "安全保卫部",
position: "项目经理",
remarks: "青海省",
operation: "",
id: 1,
name: "公司/部门",
},
{
id: 2,
name: "岗位",
},
],
columns,
page: {
pageSize: 10,
total: 1,
form: {
parentId: 0,
type: null,
name: "",
},
editId:null,
password:{
id:null,
newPassword:'',
confirmpsw:''
},
choose: {
id: undefined,
},
show: {
addStaffShow: false,
addDepartment: false,
resetPswShow:false,
addStaffTitle:'添加员工信息',
depepartmentTitle: "",
},
expandedKeys: [],
autoExpandParent: true,
backupsExpandedKeys: [],
checkedKeys: [],
selectedKeys: [],
treeData: [],
//
tableData: [],
//
loading: false,
selectedRowKeys: [],
type: "add",
};
},
mounted() {
this.getData();
},
methods: {
//
Edit() {},
Password() {},
Delete() {},
//
handleNodeClick(treeData) {
console.log(treeData);
},
//
filterOption(input, option) {
return (
option.componentOptions.children[0].text
.toLowerCase()
.indexOf(input.toLowerCase()) >= 0
getData() {
departmentList().then((res) => {
this.treeData = res.data;
});
findToUser({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm
}).then((res) => {
this.tableData = res.data.rows;
this.pagination.total = res.data.total
});
},
openDepartment(type) {
if (type === 1) {
this.show.depepartmentTitle = "新增组织架构";
this.show.addDepartment = true;
} else {
if (this.choose.id !== undefined) {
this.show.depepartmentTitle = "修改组织架构";
this.show.addDepartment = true;
this.form.id = this.choose.id;
this.form.name = this.choose.name;
this.form.type = this.choose.type;
} else {
this.$message.error("请选择组织架构");
}
}
},
//
handleOk() {
if (this.show.depepartmentTitle === "新增组织架构") {
departmentInsert(this.form).then((res) => {
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
this.handleCancel();
} else {
this.$message.error(res.msg);
}
});
} else {
departmentUpdate({
id: this.form.id,
type: this.form.type,
name: this.form.name,
}).then((res) => {
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
this.handleCancel();
} else {
this.$message.error(res.msg);
}
});
}
},
del() {
if (this.choose.id === undefined) {
this.$message.error("请选择组织架构");
} else {
this.$confirm({
title: "是否删除",
icon: "delete",
onOk: () => {
departmentDel({ id: this.choose.id, type: this.choose.type }).then(
(res) => {
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
}
);
},
});
}
},
};
</script>
async enableUser(id){
const res = await userEnable({manageUserId:id})
if(res.code === 200){
this.$message.success(res.msg)
this.getData()
}else{
this.$message.error(res.msg)
}
},
handleCancel() {
this.show.addDepartment = false;
this.$refs.ruleForm.resetFields();
this.cascVal = [];
},
success() {
this.addStaffClose();
this.getData();
},
reset(){
this.searchForm.keyword=''
this.getData();
},
//
addStaff() {
this.type = 'add'
this.show.addStaffShow = true;
},
edit(row){
this.show.addStaffShow = true;
this.type = 'edit'
this.editId = row.id
this.show.addStaffTitle = "修改员工信息"
},
addStaffSubmit() {
this.$refs.addform.submit();
},
addStaffClose() {
this.editId =null
this.$refs.addform.close();
this.show.addStaffShow = false;
},
resetPsw(id){
this.show.resetPswShow = true
this.password.id = id
},
rePswSubmit() {
if(this.password.newPassword !== this.password.confirmpsw){
this.$message.error('两次输入密码不同')
return
}
rePassword(this.password).then(res=>{
if(res.code === 200){
this.$message.success(res.msg)
this.repswClose()
}else{
this.$message.error(res.msg)
}
})
},
repswClose(){
this.show.resetPswShow = false
this.password = {
id:null,
newPassword:'',
confirmpsw:''
}
},
onExpand(expandedKeys) {
this.expandedKeys = expandedKeys;
this.autoExpandParent = false;
},
onCheck(checkedKeys) {
this.checkedKeys = checkedKeys;
},
onSelect(selectedKeys, info) {
this.selectedKeys = selectedKeys;
this.searchForm.departmentId = null
this.searchForm.positionId = null
<style lang="less" scoped>
.box {
display: flex;
.left {
width: 260px;
height: 650px;
border-right: 3px solid rgb(175, 174, 174);
if (info.selectedNodes.length !== 0) {
this.choose.id = info.selectedNodes[0].data.props.id;
this.choose.name = info.selectedNodes[0].data.props.name;
this.choose.type = info.selectedNodes[0].data.props.type;
if(this.choose.type === 1){
this.searchForm.departmentId = this.choose.id
this.getData()
}else if(this.choose.type === 2){
this.searchForm.positionId = this.choose.id
this.getData()
}
.right {
width: 100%;
margin-left: 10px;
} else {
this.choose = {};
this.getData()
}
}
.top {
width: 100%;
display: flex;
justify-content: space-between;
.topleft {
width: 25%;
height: 50px;
}
.tpright {
width: 75%;
height: 50px;
},
detail() {
this.$router.push({ name: "settle_detail" });
},
// selection
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
},
handleTableChange(pagination) {
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
//
onChange(data) {
let thatId = data.slice(-1);
this.form.parentId = thatId[0];
},
onSearch() {
var vm = this;
//
vm.searchValue = vm.searchStr;
//expandedKeys
//expandedKeys
if (vm.searchValue === "") {
vm.expandedKeys = [];
} else {
//
vm.expandedKeys = [];
vm.backupsExpandedKeys = [];
//searchValue
let candidateKeysList = vm.getkeyList(vm.searchValue, vm.treeData, []);
//
candidateKeysList.map((item) => {
//
var key = vm.getParentKey(item, vm.treeData);
//itemkeyundefined
//
if (key && !vm.backupsExpandedKeys.some((item) => item === key))
vm.backupsExpandedKeys.push(key);
});
let length = this.backupsExpandedKeys.length;
for (let i = 0; i < length; i++) {
vm.getAllParentKey(vm.backupsExpandedKeys[i], vm.treeData);
}
vm.expandedKeys = vm.backupsExpandedKeys.slice();
}
},
//valuekey
getkeyList(value, tree, keyList) {
//
for (let i = 0; i < tree.length; i++) {
let node = tree[i];
//valuepush
if (node.name.indexOf(value) > -1) {
keyList.push(node.key);
}
//
if (node.childList) {
this.getkeyList(value, node.childList, keyList);
}
}
//
return keyList;
},
//keykey
getParentKey(key, tree) {
let parentKey, temp;
//
for (let i = 0; i < tree.length; i++) {
const node = tree[i];
if (node.childList) {
//key
//
if (node.childList.some((item) => item.key === key)) {
parentKey = node.key;
} else if ((temp = this.getParentKey(key, node.childList))) {
//parentKey = this.getParentKey(key,node.children)
//
parentKey = temp;
}
}
}
return parentKey;
},
//
getAllParentKey(key, tree) {
var parentKey;
if (key) {
//
parentKey = this.getParentKey(key, tree);
if (parentKey) {
//push
if (!this.backupsExpandedKeys.some((item) => item === parentKey)) {
this.backupsExpandedKeys.push(parentKey);
}
//
this.getAllParentKey(parentKey, tree);
}
}
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
watch: {
checkedKeys(val) {
console.log("onCheck", val);
},
},
};
</script>
<style lang="less" scoped>
.left-tree {
padding: 10px;
border-right: 1px solid #0000000f;
height: 100vh;
}
.block {
margin-top: 20px;
display: flex;
justify-content: space-between;
#commonTable {
padding: 10px;
}
</style>

@ -0,0 +1,117 @@
/**
* 配置
* 表格列
*/
export const columns = [
{
title: "楼栋名称",
dataIndex: "name",
width: "20%",
},
{
title: "房屋总数",
dataIndex: "estateTotals",
width: "20%",
},
{
title: "租赁房屋数",
dataIndex: "leaseEstateNums",
width: "20%"
},
{
title: "租赁率",
dataIndex: "leaseRate",
width: "20%",
customRender:function(leaseRate){
return ( leaseRate*100 )+'%'
}
},
{
title: "入住率",
dataIndex: "occupancyRate",
width: "20%",
customRender:function(occupancyRate){
return ( occupancyRate*100 )+'%'
}
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
// 搜索项
export const searchForm = {
name: "",
}
// 分页
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}
export const ActionsList = [
{
label: "批量删除",
value: 1,
},
]
export const form = {
id:undefined,
name: '',
buildingInfoImgUrls:[]
}
export const rules = {
name:[{required:true,message:'请输入楼栋',trigger:'blur'}],
}
export const unitColumns = [
{
title: "单元号",
dataIndex: "name",
width: "15%",
},
{
title: "楼层数",
dataIndex: "floor",
width: "15%",
},
{
title: "公共楼层数",
dataIndex: "publicFloor",
width: "18%",
},
{
title: "是否有电梯",
dataIndex: "elevator",
width: "18%",
customRender:function( elevator ){
switch (elevator) {
case 1:
return '有'
case 0:
return '无'
default:
break;
}
}
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
import store from "@/store";
export const uploadHeaders = {
"manage-login-token": store.getters.getToken,
}

@ -0,0 +1,369 @@
<template>
<div>
<a-drawer
:title="formTitle"
:width="720"
:visible="show"
:body-style="{ paddingBottom: '80px' }"
@close="close"
>
<div class="drawer-content" v-if="formType !== 3">
楼栋信息
<a-divider></a-divider>
<a-form-model
layout="vertical"
ref="ruleForm"
:model="form"
:rules="rules"
>
<a-form-model-item label="楼栋号" prop="name">
<a-input
v-model="form.name"
placeholder="请输入楼栋号"
style="width: 50%"
/>
</a-form-model-item>
<a-form-model-item
label="上传照片"
style="width: 70%"
prop="fileList"
>
<a-upload
:action="`${$upload}`"
:headers="uploadHeaders"
accept='.jpg,.JPG,.png,.PNG'
list-type="picture"
:file-list="fileList"
@preview="handlePreview"
@change="fileChange"
:beforeUpload='beforeUpload'
>
<a-button> <a-icon type="upload" /> 点击上传 </a-button>
</a-upload>
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
<img alt="example" style="width: 100%" :src="previewImage" />
</a-modal>
</a-form-model-item>
</a-form-model>
</div>
<!-- 详情 -->
<div class="drawer-content detail" v-else-if="formType===3">
楼栋信息
<a-divider></a-divider>
<a-form layout="vertical">
<a-form-item label="楼栋号" prop="name">
<span>{{form.name}}</span>
</a-form-item>
<a-form-item label="楼栋照片" style="width: 70%" v-if="fileList.length>0">
<a-upload
:action="`${$upload}`"
:headers="uploadHeaders"
accept='.jpg,.JPG,.png,.PNG'
list-type="picture"
:file-list="fileList"
@preview="handlePreview"
@change="fileChange"
:beforeUpload='beforeUpload'
>
</a-upload>
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
<img alt="example" style="width: 100%" :src="previewImage" />
</a-modal>
</a-form-item>
</a-form>
单元信息
<a-divider></a-divider>
<a-button class='add-btn' @click='addUnit' style="margin-bottom:5px">新增单元</a-button>
<a-table :columns="unitColumns" :data-source="unitData" :row-key="record => record.id">
<span slot="action" slot-scope="text, row">
<a-space><a @click="addUnit(text, row)">编辑</a>
<a @click="delUnit(text, row)" style="color: red">删除</a></a-space>
</span>
</a-table>
</div>
<!-- foot -->
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="close">
关闭
</a-button>
<a-button type="primary" @click="submit" v-if="formType !==3">
提交
</a-button>
<a-button type="primary" @click="edit" v-else> </a-button>
</div>
</a-drawer>
<!-- 单元 -->
<a-modal
:title="unit.modalTitle"
:visible="unit.showModal"
@ok="unitSubmit"
@cancel="unitClose"
>
<div>
<a-form-model
ref="unForm"
:model="unit.unitForm"
:rules="unit.rules"
layout="vertical"
>
<a-form-model-item prop='name' label='单元号'>
<a-input placeholder='请输入' v-model="unit.unitForm.name"/>
</a-form-model-item>
<a-form-model-item prop='floor' label='楼层数'>
<a-input placeholder='请输入' v-model.number="unit.unitForm.floor"/>
</a-form-model-item>
<a-form-model-item prop='publicFloor' label='公共楼层数'>
<a-input placeholder='请输入' v-model.number="unit.unitForm.publicFloor"/>
</a-form-model-item>
<a-form-model-item prop='elevator' label='是否有电梯'>
<a-select placeholder='请选择' v-model="unit.unitForm.elevator">
<a-select-option :value='1'></a-select-option>
<a-select-option :value='0'></a-select-option>
</a-select>
</a-form-model-item>
</a-form-model>
</div>
</a-modal>
</div>
</template>
<script>
import { form, rules, unitColumns,uploadHeaders } from "./config";
import { buildInsert,buildUpdate, buildInfo, unitAdd, unitUpdate, unitDel } from '@/api/basic/estate'
function getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = (error) => reject(error);
});
}
export default {
props: {
show: Boolean,
type: Number,
editId: Number,
},
data() {
return {
form,
rules,
unitColumns,
uploadHeaders,
previewVisible: false,
previewImage: "",
imgLoading: false,
formTitle:'新增楼栋',
fileList: [], //list
unitData: [], //
formType: 1, //1 add 2edit 3detail
unit:{//
showModal:false, //
modalTitle:'',
unitForm:{ //
id:null,
name:'',
floor:null,
elevator:undefined,
publicFloor:null,
manageBuildingId:null
},
rules:{
name:[{required:true,message:'请输入单元名称',trigger:'blur'}],
floor:[{required:true,message:'请输入楼层数',trigger:'blur'}],
elevator:[{required:true,message:'是否有电梯',trigger:'change'}],
publicFloor:[{required:true,message:'公共楼层数',trigger:'blur'}],
}
}
};
},
methods: {
getInfo(){
buildInfo({buildingId:this.form.id}).then(res=>{
this.form.name =res.data.name
this.unitData =res.data.manageUnitFBIVoList
if(!res.data.buildingInfoImgList.length){
this.fileList=[]
}
const file = []
for(let item of res.data.buildingInfoImgList){
let obj = {
name:item.url.split('_')[0] +'.'+ item.url.split('.')[1],
url: this.$ImgUrl(item.url),
uid:item.url.split('_')[1],
status:'done',
thumbUrl: this.$ImgUrl(item.url),
}
file.push(obj)
}
this.fileList = file
})
},
close() {// drawer
this.$emit('close');
this.form = {
id:null,
name: '',
buildingInfoImgUrls:[]
}
this.unitData =[]
this.fileList = []
},
edit(){//
this.formType = 2;
},
beforeUpload(f, l) {
const isLt50M = f.size / 1024 / 1024 < 50;
if (!isLt50M) {
this.$message.error(f.name + "文件大小超出限制,请修改后重新上传");
return false;
} else {
return true;
}
},
submit(){//
let file = []
for(let item of this.fileList){
//
if(item.response){
file.push(item.response.data)
}else{
//
file.push(item.url.split('/')[item.url.split('/').length-1])
}
}
this.form.buildingInfoImgUrls = file
this.$refs.ruleForm.validate(async valid => {
if (valid) {
if(this.formType ===1){
const res = await buildInsert(this.form)
if(res.code === 200){
this.$message.success(res.msg)
this.close()
}else{
this.$message.error(res.msg)
}
}else if(this.formType ===2){
const res = await buildUpdate(this.form)
if(res.code === 200){
this.$message.success(res.msg)
this.close()
}else{
this.$message.error(res.msg)
}
}
}
});
},
addUnit(data,row){//
if(row!==undefined){
this.unit.modalTitle='修改单元'
this.unit.unitForm= {...row}
this.unit.unitForm.manageBuildingId = this.form.id
}else{
this.unit.modalTitle='新增单元'
}
this.unit.showModal=true
},
unitSubmit(){//
this.$refs.unForm.validate(async valid => {
if (valid) {
if(this.unit.modalTitle==='新增单元'){
let res = await unitAdd(this.unit.unitForm)
if(res.code === 200){
this.$message.success(res.msg)
this.getInfo()
this.unitClose()
}else{
this.$message.error(res.msg)
}
}else{
let res = await unitUpdate(this.unit.unitForm)
if(res.code === 200){
this.$message.success(res.msg)
this.getInfo()
this.unitClose()
}else{
this.$message.error(res.msg)
}
}
}
});
},
delUnit(data,row){
this.$confirm({
title: "是否删除",
icon: "delete",
onOk: async() => {
let res = await unitDel({unitIds:[row.id]})
if(res.code === 200){
this.$message.success(res.msg)
this.getInfo()
}else{
this.$message.error(res.msg)
}
},
});
},
unitClose(){
this.unit.showModal = false;
this.$refs.unForm.resetFields()
},
async handlePreview(file) {
if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj);
}
this.previewImage = file.url || file.preview;
this.previewVisible = true;
},
handleCancel() {
this.previewVisible = false;
},
fileChange(info) {
this.fileList = info.fileList
},
},
watch: {
type: {
handler(val) {
this.formType = val;
},
},
editId:{
handler(val) {
this.form.id = val;
this.unit.unitForm.manageBuildingId = val
if(this.formType !== 1){
this.getInfo()
}
},
},
formType:{
handler(val) {
switch (val) {
case 1:
this.formTitle ='新增楼栋'
break;
case 2:
this.formTitle ='修改楼栋'
break;
case 3:
this.formTitle ='楼栋详情'
break;
default:
break;
}
},
}
},
};
</script>
<style lang="less" scoped>
.detail{
/deep/.anticon svg{
display:none;
}
}
</style>

@ -0,0 +1,169 @@
<template>
<div>
<div class="cardTitle">楼栋管理</div>
<div class="search-box">
<a-row>
<a-col :span='20'>
<a-space size="large">
<a-input v-model="searchForm.name" placeholder="请输入楼栋名称" />
<a-button type="primary" @click='getData()'> </a-button>
<a-button @click='reset()'> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<div class="search-box">
<a-button class="add-btn" @click="addBuilding"></a-button>
</div>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: tableChoosed,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}"
>
<template slot="action" slot-scope="text,record">
<a @click="detail(record.id)"></a>
<a @click="del([record.id])" style="margin-left: 8px;color: red">删除</a>
</template>
</a-table>
<div class="action">
<a-dropdown :disabled="!hasSelected" >
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="del"> 批量删除 </a-menu-item>
</a-menu>
<a-button> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${tableChoosed.length}` }}
</template>
</span>
</div>
<curd-form :show='drawerConfig.show' :type="drawerConfig.type" @close='close' :editId='editId'></curd-form>
</div>
</template>
<script>
import { columns,searchForm,ActionsList} from "./depend/config"
import { buildingList,buildingDel } from "@/api/basic/estate"
import curdForm from './depend/form.vue'
export default {
components: {
curdForm
},
data() {
return {
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
columns,
searchForm,
ActionsList,
drawerConfig:{
type:1,
show:false,
},
tableChoosed: [],
//
tableData: [],
editId:undefined,
};
},
created() {
this.getData()
},
computed: {
hasSelected() {
return this.tableChoosed.length > 0;
},
},
methods: {
async getData() {
const res = await buildingList(
{
pageNum:this.pagination.current,
size:this.pagination.pageSize,
...this.searchForm
}
)
this.tableData = res.data.rows
this.pagination.total = res.data.total
},
addBuilding(){
this.drawerConfig.show = true
this.drawerConfig.type = 1
},
close(){
this.drawerConfig.show = false
this.drawerConfig.type = 1;
this.editId = null
this.getData()
},
detail(data){
this.drawerConfig.show = true;
this.drawerConfig.type = 3;
this.editId = data
},
reset(){
this.searchForm.name =''
this.getData()
},
handleTableChange(pagination) {
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData()
},
del(ids) {
this.$confirm({
title: "是否删除",
icon: "delete",
onOk: ()=>{
buildingDel({buildingIds:ids}).then(res=>{
if(res.code === 200){
this.$message.success(res.msg)
this.getData()
}else{
this.$message.error(res.msg)
}
})
},
});
},
handleMenuClick(data) {
if (data.key === "del") {
this.del(this.tableChoosed);
}
},
selectionChoosed(data) {
this.tableChoosed = data;
},
},
};
</script>
<style lang="less" scoped>
.role-card{
line-height: 30px;
font-size: 16px;
cursor: pointer;
border-bottom: 1px solid #d9d9d9;
margin-bottom: 10px;
display: flex;
justify-content: space-between;
}
</style>

@ -0,0 +1,90 @@
/**
* 配置
* 表格列
*/
export const columns = [
{
title: "申请人姓名",
dataIndex:"name",
width:'12%'
},
{
title: "申请人身份",
key: "tags",
width: "12%",
dataIndex: "identity",
scopedSlots: { customRender: "tags" },
},
{
title: "房屋名称",
dataIndex: "manageBuildingName",
scopedSlots: { customRender: "name" },
width: "20%",
},
{
title: "申请人手机号",
dataIndex:"tel",
width:'10%'
},
{
title: "申请人身份证号",
dataIndex:"idCard",
width:'14%'
},
{
title: "状态",
dataIndex:"status",
width:'10%',
customRender:function(status){
switch (status) {
case 1:
return '审核中'
case 2:
return '已驳回'
case 3:
return '已通过'
default:
break;
}
}
},
{
title: "房屋类型",
dataIndex:"estateTypeName",
width:'10%'
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "100",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
// 搜索项
export const searchForm = {
identity: undefined,
}
export function reset() {
this.searchForm = {
identity: undefined,
}
this.getData()
}
export function handleTableChange(pagination) {
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData()
}
// 分页
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

@ -0,0 +1,236 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">
<span>住户审核</span>
<a-radio-group
default-value="1"
button-style="solid"
@change="tabsChange"
v-model="activeName"
>
<a-radio-button value="1"> 待审核 </a-radio-button>
<a-radio-button value="3"> 已通过 </a-radio-button>
<a-radio-button value="2"> 已驳回 </a-radio-button>
<a-radio-button> 全部 </a-radio-button>
</a-radio-group>
</a-space>
</div>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-select placeholder="请选择用户身份" v-model="searchForm.identity" style="width: 200px" >
<a-select-option v-for="item in options.identity" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
<a-button type="primary" @click="getData()"> </a-button>
<a-button @click="reset"> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<div class="main">
<div style="margin-bottom: 16px">
<!-- 批量操作 -->
<a-select
type="primary"
v-model="activeAction"
:disabled="!hasSelected"
:loading="loading"
style="width: 120px"
@change="Actions"
placeholder="请选择操作"
>
批量
<a-select-option v-for="item in ActionsList" :key="item.value">
{{ item.label }}
</a-select-option>
</a-select>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
<!-- 表格 -->
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.estateReviewId;
}
"
>
<span slot="name" slot-scope="text, row">
{{
row.buildingName +
"栋/" +
row.unitName +
"单元/" +
row.estateName +
"室"
}}
</span>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="audit(row.estateReviewId, 1)" :disabled="row.status!==1"
>通过</a
>
<a class="ant-dropdown-link" @click="audit(row.estateReviewId, 2)" :disabled="row.status!==1"
>驳回</a
>
</a-space>
</span>
<span slot="tags" slot-scope="tag">
<a-tag
:color="
tag === 1
? 'volcano'
: tag === 2
? 'geekblue'
: tag === 3
? 'geekblue'
: 'red'
"
>
{{
tag === 1
? "业主"
: tag === 2
? "业主亲属"
: tag === 3
? "租户"
: tag === 4
? "租户亲属"
: "-"
}}
</a-tag>
</span>
</a-table>
</div>
</div>
</template>
<script>
import {
columns,
pagination,
searchForm,
reset,
handleTableChange,
} from "./depend/config";
import { reviewList, review } from "@/api/basic/resident";
export default {
data() {
return {
pagination: pagination,
searchForm: searchForm,
columns: columns,
activeAction: undefined,
loading: false,
// index
selectedRowKeys: [],
tableData: [],
ActionsList: [
{ value: 1, label: '批量通过'},
{ value: 2, label: '批量驳回'}
],
activeName:'1',
options:{
identity:[
{
id:1,
name:'业主'
},
{
id:2,
name:'业主亲属'
},
{
id:3,
name:'租户'
},
{
id:4,
name:'租户亲属'
},
]
}
};
},
mounted() {
this.getData();
},
methods: {
async getData() {
const res = await reviewList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
status:this.activeName,
...this.searchForm
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total
},
tabsChange() {
this.getData();
},
// 1 2
audit(estateReviewId, operate) {
this.$confirm({
title: "是否" + (operate === 1 ? "通过" : "驳回"),
// okText:'',
// cancelText:'',
icon: "form",
onOk: async() =>{
const res = await review({
estateReviewId: estateReviewId,
operate: operate,
});
if (res.code === 200) {
this.$message.success(res.msg + res.data);
} else {
this.$message.error(res.msg);
}
},
});
},
handleTableChange:handleTableChange,
Actions(data) {
this.selectedRowKeys.forEach(ele => {
let obj = {operate: data, estateReviewId: ele};
review(obj).then(res => {
if(res.code === 200){
this.$message.success(res.msg)
}else{
this.$message.error(res.msg)
}
});
})
this.activeAction = undefined;
this.selectedRowKeys = [];
this.getData();
},
selectionChoosed(data) {
this.selectedRowKeys = data;
},
reset: reset,
},
computed: {
// selection
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
</style>

@ -0,0 +1,499 @@
<template>
<div>
<!-- add -->
<a-drawer
:title="title"
:width="720"
:visible="show"
:body-style="{ paddingBottom: '80px' }"
@close="addClose"
>
<div class="drawer-content">
基本信息
<a-divider></a-divider>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-row>
<a-col :span="8" v-if="form.id===null">
<a-form-model-item label="关联房屋" prop="manageEstateId">
<a-cascader
:options="estateData"
v-model="estateArr"
:field-names="{ label: 'name', value: 'id', children: 'childList' }"
placeholder="楼栋/单元/房间号"
@change="onChange"
style="width: 90%"
/>
</a-form-model-item>
</a-col>
<a-col :span="8" v-if="form.id===null">
<a-form-model-item label="房屋类型" prop="type">
<a-input
v-model="form.type"
placeholder="请先选择关联房屋"
disabled
style="width: 90%"
/>
</a-form-model-item>
</a-col>
<a-col :span="8" v-if="form.id===null">
<a-form-model-item label="住户身份" prop="identity">
<a-select v-model="form.identity" placeholder="请选择住户身份" style="width: 90%">
<a-select-option v-for="item in options.identity" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="姓名" prop="name">
<a-input placeholder="请输入姓名" v-model="form.name" style="width: 90%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="手机号" prop="tel">
<a-input placeholder="请输入手机号" v-model="form.tel" style="width: 90%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="性别" prop="sex">
<a-select placeholder="请选择性别" v-model="form.sex" style="width: 90%" >
<a-select-option v-for="item in options.sex" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="身份证号" prop="idCard">
<a-input placeholder="请输入身份证号" v-model="form.idCard" style="width: 90%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="入住时间" prop="checkTime">
<a-date-picker v-model="form.checkTime" value-format="YYYY-MM-DD HH:mm:ss"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="户籍所在地" prop="domicile">
<a-input placeholder="户籍所在地" v-model="form.domicile" style="width: 90%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
身份证头像照
<!-- head -->
<a-upload
list-type="picture-card"
:action="`${$upload}`"
:headers="uploadHeaders"
accept='.jpg,.JPG,.png,.PNG,.jpeg,.JPEG'
@preview="handlePreview"
@change="headChange"
:file-list="headList"
:beforeUpload="beforeUpload"
>
<div v-if="headList.length < 1">
<a-icon type="plus" />
<div class="ant-upload-text">
上传照片
</div>
</div>
</a-upload>
</a-col>
<a-col :span="12">
身份证徽面照
<!-- back -->
<a-upload
list-type="picture-card"
:action="`${$upload}`"
:headers="uploadHeaders"
accept='.jpg,.JPG,.png,.PNG,.jpeg,.JPEG'
@preview="handlePreview"
@change="backChange"
:file-list="backList"
:beforeUpload="beforeUpload"
>
<div v-if="backList.length < 1">
<a-icon type="plus" />
<div class="ant-upload-text">
上传照片
</div>
</div>
</a-upload>
</a-col>
<div v-show=" form.identity === 4">
关联信息
<a-divider></a-divider>
</div>
<div v-if="form.identity === 2">
<!-- <a-col :span="12">
<a-form-model-item label="业主姓名" prop="ownerName">
<a-input placeholder="请输入业主姓名" v-model="form.ownerName" style="width: 90%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="业主电话" prop="ownerTel">
<a-input placeholder="请输入业主电话" v-model="form.ownerTel" style="width: 90%" />
</a-form-model-item>
</a-col> -->
</div>
<div v-else-if="form.identity === 4">
<a-col :span="12">
<a-form-model-item label="租户姓名" prop="tenantName">
<a-input placeholder="请输入租户姓名" v-model="form.tenantName" style="width: 90%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="租户电话" prop="tenantTel">
<a-input placeholder="请输入租户电话" v-model="form.tenantTel" style="width: 90%" />
</a-form-model-item>
</a-col>
</div>
联系信息
<a-divider></a-divider>
<a-col :span="12">
<a-form-model-item label="紧急联系人" prop="emergencyContact">
<a-input placeholder="请输入紧急联系人" v-model="form.emergencyContact" style="width: 90%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item
label="紧急联系人电话"
prop="emergencyContactNumber"
>
<a-input
placeholder="请输入紧急联系人电话"
style="width: 90%"
v-model="form.emergencyContactNumber"
/>
</a-form-model-item>
</a-col>
其他信息
<a-divider></a-divider>
<a-col :span="12">
<a-form-model-item label="婚姻状况" prop="maritalStatus">
<a-select v-model="form.maritalStatus" placeholder="请选择婚姻状况" style="width: 90%">
<a-select-option v-for="item in options.maritalStatus" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="民族" prop="nation">
<a-input placeholder="请输入民族" v-model="form.tenantTel" style="width: 90%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="政治面貌" prop="politicalOutlook">
<a-select placeholder="请选择婚姻状况" v-model="form.politicalOutlook" style="width: 90%" >
<a-select-option v-for="item in options.politicalOutlook" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="户口类型" prop="accountType">
<a-select placeholder="请选择户口类型" v-model="form.accountType" style="width: 90%" >
<a-select-option v-for="item in options.accountType" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="从事职业" prop="occupation">
<a-input placeholder="请输入从事职业" v-model="form.occupation" style="width: 90%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="工作单位" prop="employer">
<a-input placeholder="请输入工作单位" v-model="form.employer" style="width: 90%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工作单位地址" prop="employerAddress">
<a-input placeholder="请输入工作单位地址" v-model="form.employerAddress" style="width: 90%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
住户照片
<!-- pic -->
<a-upload
list-type="picture-card"
:action="`${$upload}`"
:headers="uploadHeaders"
accept='.jpg,.JPG,.png,.PNG,.jpeg,.JPEG'
@preview="handlePreview"
@change="picChange"
:beforeUpload="beforeUpload"
:file-list="picList"
>
<div v-if="picList.length < 4">
<a-icon type="plus" />
<div class="ant-upload-text">
上传照片
</div>
</div>
</a-upload>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" prop="remarks">
<a-textarea placeholder="请输入备注" v-model="form.remarks" style="width: 90%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</div>
<div class="drawer-footer">
<a-button
:style="{ marginRight: '8px' }"
@click="addClose"
>
关闭
</a-button>
<a-button type="primary" @click="submit"> </a-button>
</div>
</a-drawer>
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
<img alt="example" style="width: 100%" :src="previewImage" />
</a-modal>
</div>
</template>
<script>
import { form, rules, options, uploadHeaders } from "./form.js"
import { estate } from '@/api/basic/estate'
import { residentInsert, residentUpdate, residentInfo } from '@/api/basic/resident'
function getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
export default {
props:{
show:{
default:false,
type:Boolean,
},
editId:Number,
},
data() {
return {
form,
rules,
options,
loading: false,
estateArr:[],
estateData:[],
title:'新增住户',
previewVisible:false,
uploadHeaders,
previewImage:'',
headList: [],
backList: [],
picList: [],
}
},
mounted() {
this.getEstate()
},
methods: {
async getEstate(){
let res = await estate()
this.estateData = res.data
this.estateDisable(this.estateData)
},
estateDisable(arr){
arr.forEach((item,index)=>{
if(!item.manageEstateTypeName && item.childList.length === 0){
arr[index].disabled = true
}else if(item.manageEstateTypeName || item.childList.length > 0){
arr[index].disabled = false
}else{
this.estateDisable(item.childList)
}
})
},
submit(){
//
//
let head = []
for(let item of this.headList){
//
if(item.response){
head.push(item.response.data)
}else{
//
head.push(item.url.split('/')[item.url.split('/').length-1])
}
}
this.form.idCardFrontImgUrls = head
//
let back = []
for(let item of this.backList){
//
if(item.response){
back.push(item.response.data)
}else{
//
back.push(item.url.split('/')[item.url.split('/').length-1])
}
}
this.form.idCardBackImgUrls = back
//
let pic = []
for(let item of this.picList){
//
if(item.response){
pic.push(item.response.data)
}else{
//
pic.push(item.url.split('/')[item.url.split('/').length-1])
}
}
this.form.residentImgUrls = pic
this.$refs.ruleForm.validate(async valid => {
if(valid){
if(this.title === '新增住户'){
let res = await residentInsert(this.form)
if(res.code === 200){
this.$message.success(res.msg)
this.success()
this.addClose()
}else{
this.$message.error(res.msg)
}
}else if(this.title === '修改住户信息'){
let res = await residentUpdate(this.form)
if(res.code === 200){
this.$message.success(res.msg)
this.success()
this.addClose()
}else{
this.$message.error(res.msg)
}
}
}
})
},
beforeUpload(f, l) {
const isLt50M = f.size / 1024 / 1024 < 50;
if (!isLt50M) {
this.$message.error(f.name + "文件大小超出限制,请修改后重新上传");
return false;
} else {
return true;
}
},
addClose(){
this.$refs.ruleForm.resetFields();
this.$emit('close')
this.estateArr = []
this.headList = []
this.backList = []
this.picList = []
},
success(){
this.$emit('success')
},
async handlePreview(file) {
if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj);
}
this.previewImage = file.url || file.preview;
this.previewVisible = true;
},
headChange(info){
this.headList = info.fileList
},
backChange(info){
this.backList = info.fileList
},
picChange(info){
this.picList = info.fileList
},
handleCancel() {
this.previewVisible = false;
},
onChange(value, selectedOptions){
if(value.length > 0){
this.form.manageEstateId = value[value.length - 1];
this.form.type = selectedOptions[selectedOptions.length - 1].manageEstateTypeName;
}else{
this.form.manageEstateId = undefined;
this.form.type = ''
}
},
},
watch: {
editId(val){
if(val){
this.form.id = val
this.title = '修改住户信息'
residentInfo({id:val}).then(res=>{
this.form.name = res.data.name
this.form.tel = res.data.tel
this.form.sex = res.data.sex
this.form.idCard = res.data.idCard
this.form.checkTime = res.data.checkTime
this.form.domicile = res.data.domicile
this.form.emergencyContact = res.data.emergencyContact
this.form.emergencyContactNumber = res.data.emergencyContactNumber
this.form.maritalStatus = res.data.maritalStatus
this.form.nation = res.data.nation
this.form.politicalOutlook = res.data.politicalOutlook
this.form.accountType = res.data.accountType
this.form.occupation = res.data.occupation
this.form.employer = res.data.employer
this.form.employerAddress = res.data.employerAddress
this.form.remarks = res.data.remarks
// idCardFrontImgUrls
// idCardBackImgUrls
// residentImgUrls
const head = []
for(let item of res.data.idCardFrontImgUrls){
let obj = {
name:item.url.split('_')[0] +'.'+ item.url.split('.')[1],
url: this.$ImgUrl(item.url),
uid:item.url.split('_')[1],
status:'done',
thumbUrl: this.$ImgUrl(item.url),
}
head.push(obj)
}
this.headList = head
const back = []
for(let item of res.data.idCardBackImgUrls){
let obj = {
name:item.url.split('_')[0] +'.'+ item.url.split('.')[1],
url: this.$ImgUrl(item.url),
uid:item.url.split('_')[1],
status:'done',
thumbUrl: this.$ImgUrl(item.url),
}
back.push(obj)
}
this.backList = back
const pic = []
for(let item of res.data.residentImgUrls){
let obj = {
name:item.url.split('_')[0] +'.'+ item.url.split('.')[1],
url: this.$ImgUrl(item.url),
uid:item.url.split('_')[1],
status:'done',
thumbUrl: this.$ImgUrl(item.url),
}
pic.push(obj)
}
this.picList = pic
})
}else{
this.form.id = null
this.title = '新增住户'
}
}
}
};
</script>
<style lang="less" scoped>
</style>

@ -0,0 +1,123 @@
/**
* 配置
* 表格列
*/
export const columns = [
{
title: "住户姓名",
dataIndex: "name",
width: 100
},
{
title: "住户手机号",
dataIndex: "tel",
width: 160
},
{
title: "居住房屋",
dataIndex: "build",
scopedSlots: { customRender: "build" },
width: 380
},
{
title: "住户身份",
dataIndex: "ids",
width: 120,
scopedSlots: { customRender: "ids" },
},
{
title: "房屋类型",
dataIndex: "type",
width: 120,
scopedSlots: { customRender: "type" },
},
{
title: "住户性别",
dataIndex: "sex",
width: 120,
customRender:function(sex){
switch (sex) {
case 1:
return '男'
case 2:
return '女'
case 3:
return '保密'
default:
break;
}
}
},
{
title: "住户身份证号",
dataIndex: "idCard",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const columns_house = [
{
title: "房屋名称",
dataIndex: "manageBuildingName",
scopedSlots: { customRender: "name" },
width: "44%",
},
{
title: "房屋类型",
dataIndex: "manageEstateTypeName",
width: "20%",
},
{
title: "住户身份",
dataIndex: "identity",
customRender:function(identity){
switch (identity) {
case 1:
return '业主'
case 2:
return '业主亲属'
case 3:
return '租户'
case 4:
return '租户亲属'
default:
break;
}
},width: "20%",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
// 搜索项
export const searchForm = {
keyword: "",
sex: undefined,
}
// 分页
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}
export const rules = {
estateId:[{required:true,message:'请选择房屋',trigger:'change'}],
identity:[{required:true,message:'请选择身份',trigger:'change'}],
linkUserId :[{required:true,message:'请输入姓名',trigger:'change'}],
}
export const politicalOutlook = ["群众","中共党员","共青团","民革党员","民盟盟员",
"民建会员","民进会员","农工党党员","致公党党员","九三学社社员","台盟盟员","无党派人士",]

@ -0,0 +1,95 @@
export const form = {
id:null,
manageEstateId: undefined,
type:'',
identity:undefined,
name:undefined,
tel:undefined,
sex:undefined,
idCard:undefined,
checkTime:undefined,
domicile:undefined,
emergencyContact:undefined,
emergencyContactNumber:undefined,
maritalStatus:undefined,
nation:undefined,
politicalOutlook:undefined,
accountType:undefined,
occupation:undefined,
employer:undefined,
employerAddress:undefined,
remarks:undefined,
idCardFrontImgUrls:undefined,
idCardBackImgUrls:undefined,
residentImgUrls:undefined,
ownerName:undefined,
ownerTel:undefined,
tenantName:undefined,
tenantTel:undefined,
}
const handleConfirm = (rule,value,callback) => {
if(!value){
callback();
}else{
// 正则判断失败抛出错误否则直接callback()
if(!/(^\d{18}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(value)){
callback(new Error("身份证格式不正确!"));
}else{
callback();
}
}
}
export const rules = {
manageEstateId:[{required:true,message:'请选择房屋',trigger:'change'}],
identity:[{required:true,message:'请选择身份',trigger:'change'}],
name:[{required:true,message:'请输入姓名',trigger:'blur'}],
tel:[{required:true,message:'请输入电话',trigger:'blur'}],
sex:[{required:true,message:'请选择性别',trigger:'change'}],
idCard:[{required:true,message:'请输入身份证号',trigger:'blur'},{validator: (rule,value,callback) => handleConfirm(rule,value,callback)}],
ownerName:[{required:true,message:'请输入业主姓名',trigger:'blur'}],
ownerTel:[{required:true,message:'请输入业主电话',trigger:'blur'}],
tenantName:[{required:true,message:'请输入租户姓名',trigger:'blur'}],
tenantTel:[{required:true,message:'请输入租户电话',trigger:'blur'}],
}
export const options = {
identity:[
{ id:1, name:'业主' },
{ id:2, name:'业主亲属' },
{ id:3, name:'租户' },
{ id:4, name:'租户亲属' },
],
sex:[
{ id:1, name:'男' },
{ id:2, name:'女' },
{ id:3, name:'保密' },
],
maritalStatus:[
{ id:1, name:'未婚' },
{ id:2, name:'已婚' },
],
politicalOutlook:[
{ id:1, name:'群众' },
{ id:2, name:'中共党员' },
{ id:3, name:'共青团' },
{ id:4, name:'民革党员' },
{ id:5, name:'民盟盟员' },
{ id:6, name:'民建会员' },
{ id:7, name:'民进会员' },
{ id:8, name:'农工党党员' },
{ id:9, name:'致公党党员' },
{ id:10, name:'九三学社社员' },
{ id:11, name:'台盟盟员' },
{ id:12, name:'无党派人士' },
],
accountType:[
{ id:1, name:'农村' },
{ id:2, name:'城市' },
]
}
// 请求头
import store from "@/store";
export const uploadHeaders = {
"manage-login-token": store.getters.getToken,
}

@ -0,0 +1,481 @@
<template>
<div>
<div class="cardTitle">住户信息</div>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-select
v-model="searchForm.sex"
style="width: 200px"
placeholder="请选择性别"
>
<a-select-option :value="1"></a-select-option>
<a-select-option :value="2"></a-select-option>
<a-select-option :value="3">保密</a-select-option>
</a-select>
<a-input
v-model="searchForm.keyword"
style="width: 200px"
placeholder="请输入关键字(姓名/手机号)"
/>
<a-button type="primary" @click="getData"> </a-button>
<a-button @click="reset"> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<div class="search-box">
<a-button class="add-btn" @click="show.add = true">添加住户</a-button>
</div>
<div class="main">
<!-- 表格 -->
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 1400 }"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="build" slot-scope="text, row">
<div v-for="(item,index) in row.residentListEstateVoList" :key="index">
{{item.manageBuildingName}}-{{item.manageUnitName}}-{{item.floorLocation}}-{{item.manageEstateName}}
</div>
</span>
<span slot="ids" slot-scope="text, row">
<a-tag v-for="(item,index) in row.residentListEstateVoList" :key="index">
{{item.identity==3?'租户':1?'业主':2?'业主亲属':'租户亲属'}}
</a-tag>
</span>
<span slot="type" slot-scope="text, row">
<div v-for="(item,index) in row.residentListEstateVoList" :key="index">
{{item.manageEstateTypeName}}
</div>
</span>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="houseManage(row)"></a>
<a class="ant-dropdown-link" @click="edit(row)"></a>
<a
class="ant-dropdown-link"
@click="(show.in = true), (inform.residentId = row.id)"
>迁入</a
>
</a-space>
</span>
</a-table>
</div>
<!-- 新增住户 -->
<add-form
:show="show.add"
:editId="editId"
@close="close"
@success="success"
></add-form>
<!-- 迁入提交 -->
<a-modal title="迁入" :visible="show.in" @ok="insubmit" @cancel="inclose">
<div>
<a-form-model
ref="ruleForm"
:model="inform"
:rules="rules"
layout="vertical"
>
<a-form-model-item label="关联房屋" prop="estateId">
<a-cascader
:options="estateData"
v-model="estateArr"
:field-names="{
label: 'name',
value: 'id',
children: 'childList',
}"
placeholder="楼栋/单元/房间号"
@change="onChange"
style="width: 90%"
/>
</a-form-model-item>
<a-form-model-item label="住户身份" prop="identity">
<a-select
v-model="inform.identity"
placeholder="请选择住户身份"
style="width: 90%"
>
<a-select-option
v-for="item in options.identity"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
<a-form-model-item
label="房屋租户"
prop="linkUserId"
v-if="inform.identity === 4"
>
<a-select
v-model="inform.linkUserId"
placeholder="请选择住户身份"
style="width: 90%"
>
<a-select-option
v-for="item in options.tenant"
:key="item.id"
:value="item.id"
>{{ item.name }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-form-model>
</div>
</a-modal>
<!-- 住户房屋管理 -->
<a-drawer
title="住户详情"
:width="1000"
:visible="show.detail"
:body-style="{ paddingBottom: '80px' }"
@close="onClose"
>
<div class="drawer-content">
<a-avatar :size="64" icon="user" :src="imgUrl" />
<span>
{{holderDetail.name}}
{{holderDetail.sex == 1 ? '男' : (holderDetail.sex == 2)?'女':'保密'}}
</span>
<img style="height: 81px;width: 131px;margin-left: 24px;float: right" :src="idCardFront" />
<img style="height: 81px;width: 131px;float: right" :src="idCardBack" />
<a-divider></a-divider>
<a-descriptions layout="vertical">
<a-descriptions-item label="手机号">
{{holderDetail.tel}}
</a-descriptions-item>
<a-descriptions-item label="身份证号" >
{{holderDetail.idCard}}
</a-descriptions-item>
<a-descriptions-item label="入住时间">
{{holderDetail.checkTime}}
</a-descriptions-item>
</a-descriptions>
<div style="margin-top: 24px">房屋信息</div>
<a-divider></a-divider>
<a-table
:columns="columns_house"
:data-source="table_house"
:pagination="false"
:row-key="
(record, index) => {
return index;
}
"
>
<span slot="name" slot-scope="text, row">
{{
row.manageBuildingName +
"栋/" +
row.manageUnitName +
"单元/" +
row.floorLocation +
"层-" +
row.manageEstateName +
"室"
}}
</span>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="out(row)"></a>
</a-space>
</span>
</a-table>
</div>
<div style="margin-top: 24px">其他信息</div>
<a-divider></a-divider>
<a-descriptions layout="vertical">
<a-descriptions-item label="婚姻状况">
{{holderDetail.maritalStatus == 1 ? '未婚' : '已婚'}}
</a-descriptions-item>
<a-descriptions-item label="民族">
{{holderDetail.nation}}
</a-descriptions-item>
<a-descriptions-item label="政治面貌">
{{holderDetail.politicalOutlook == -1 ? '' : politicalOutlook[holderDetail.politicalOutlook-1] }}
</a-descriptions-item>
<a-descriptions-item label="从事职业">
{{holderDetail.occupation}}
</a-descriptions-item>
<a-descriptions-item label="工作单位">
{{holderDetail.employer}}
</a-descriptions-item>
<a-descriptions-item label="户口类型">
{{holderDetail.accountType == 1 ? '农村' : '城市'}}
</a-descriptions-item>
<a-descriptions-item label="工作单位地址">
{{holderDetail.employerAddress}}
</a-descriptions-item>
</a-descriptions>
<a-descriptions layout="vertical" :column="1">
<a-descriptions-item label="备注">
{{holderDetail.remarks}}
</a-descriptions-item>
</a-descriptions>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="onClose">
关闭
</a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import {
columns,
pagination,
searchForm,
rules,
columns_house,
politicalOutlook,
} from "./depend/config.js";
import { estate } from "@/api/basic/estate";
import {
residentList,
moveIn,
moveOut,
findTenantByEstateId,
residentDetail,
} from "@/api/basic/resident";
import addForm from "./depend/addForm.vue";
export default {
components: {
addForm,
},
data() {
return {
columns_house,
editId: null,
inform: {
estateId: undefined,
residentId: undefined,
identity: undefined,
linkUserId: undefined,
},
estateArr: [],
estateData: [],
rules,
show: {
add: false,
in: false,
detail: false,
},
pagination,
searchForm,
selectedRowKeys: [],
//
//
columns,
holderInfo: {},
//
tableData: [],
table_house: [],
holderDetail: {},
imgUrl: '', //
idCardFront: '',
idCardBack: '',
politicalOutlook: politicalOutlook,
options: {
identity: [
{ id: 1, name: "业主" },
{ id: 2, name: "业主亲属" },
{ id: 3, name: "租户" },
{ id: 4, name: "租户亲属" },
],
tenant: [],
},
};
},
mounted() {
this.getData();
this.getEstate();
},
methods: {
async getData() {
const res = await residentList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
},
houseManage(data) {
this.holderInfo = data;
this.table_house = data.residentListEstateVoList;
residentDetail({id: data.id}).then(res => {
this.holderDetail = res.data;
if(res.data.residentImgUrls.length != 0) {
this.imgUrl = this.$ImgUrl(res.data.residentImgUrls[0].url)
} else {
this.imgUrl = ''
}
if(res.data.idCardFrontImgUrls.length != 0) {
this.idCardFront = this.$ImgUrl(res.data.idCardFrontImgUrls[0].url)
} else {
this.idCardFront = ''
}
if(res.data.idCardBackImgUrls.length != 0) {
this.idCardBack = this.$ImgUrl(res.data.idCardBackImgUrls[0].url)
} else {
this.idCardBack = ''
}
})
this.show.detail = true;
},
//
async getEstate() {
let res = await estate();
this.estateData = res.data;
this.estateDisable(this.estateData);
},
estateDisable(arr) {
arr.forEach((item, index) => {
if (!item.manageEstateTypeName && item.childList.length === 0) {
arr[index].disabled = true;
} else if (item.manageEstateTypeName || item.childList.length > 0) {
arr[index].disabled = false;
} else {
this.estateDisable(item.childList);
}
});
},
//
reset() {
this.searchForm = {
keyword: "",
sex: undefined,
};
this.getData();
},
//
edit(data) {
this.editId = data.id;
this.show.add = true;
},
// form
close() {
this.show.add = false;
this.editId = null;
},
// form
success() {
this.getData();
},
handleTableChange(pagination) {
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
selectionChoosed(data) {
this.selectedRowKeys = data;
},
async insubmit() {
//
console.log(this.inform);
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
let res = await moveIn(this.inform);
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
this.inclose();
} else {
this.$message.error(res.msg);
}
}
});
},
onClose() {
this.show.detail = false;
},
inclose() {
this.$refs.ruleForm.resetFields();
this.estateArr = [];
this.show.in = false;
},
out(data) {
console.log(data);
//
this.$confirm({
title: "是否迁出",
// okText:'',
// cancelText:'',
icon: "logout",
onOk: async () => {
let res = await moveOut({
estateId: data.id,
residentId: this.holderInfo.id,
});
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
this.onClose();
} else {
this.$message.error(res.msg);
}
},
});
},
onChange(value, selectedOptions) {
if (value.length > 0) {
this.inform.estateId = value[value.length - 1];
findTenantByEstateId({ estateId: this.inform.estateId }).then((res) => {
this.options.tenant = res.data;
});
} else {
this.inform.estateId = undefined;
}
},
//
handlerBuilding(index) {
console.log(index);
}
},
computed: {
// selection
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
/deep/.ant-upload.ant-upload-select-picture-card {
width: 240px;
height: 160px;
}
/deep/.avatar-uploader > .ant-upload {
width: 240px;
height: 160px;
}
.ant-upload-select-picture-card i {
font-size: 32px;
color: #999;
}
.ant-upload-select-picture-card .ant-upload-text {
margin-top: 8px;
color: #666;
}
</style>

@ -0,0 +1,72 @@
/**
* 配置
* 表格列
*/
export const columns = [
{
title: "房屋名称",
dataIndex: "manageBuildingName",
scopedSlots: { customRender: "name" },
width: "20%",
},
{
title: "室内面积",
dataIndex: "indoorArea",
width: "15%",
},
{
title: "建筑面积",
dataIndex: "constructionArea",
width: "15%",
},
{
title: "房屋类型",
dataIndex: "manageEstateTypeName",
width: "15%",
},
{
title: "居住状态",
key: "tags",
dataIndex: "residenceStatus",
scopedSlots: { customRender: "tags" },
},
{
title: "是否开启租赁",
dataIndex: "isEnableLease",
scopedSlots: { customRender: "switch" },
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "180",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
// 搜索项
export const searchForm = {
name: "",
isEnableLease: undefined,
manageEstateTypeId:undefined
}
// 分页
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}
// 操作
export const ActionsList = [
{
label: "批量删除",
value: 1,
},
// {
// label: "批量导出",
// value: 2,
// },
]

@ -0,0 +1,54 @@
/**
* 表单
*
*/
// 表单
export const form = {
id:undefined,
manageBuildingId:undefined,
manageUnitId:undefined,
floorLocation:undefined,
name:undefined,
indoorArea:undefined,
constructionArea:undefined,
manageEstateTypeId:undefined,
isEnableLease:undefined,
houseTypeHall:undefined,
houseTypeRoom:undefined,
houseTypeBathroom:undefined,
estateImgUrls:[],
remarks:undefined,
}
// 校验
export const rules = {
manageBuildingId:[
{ required: true, message: "请选择楼栋", trigger: "change" },
],
manageUnitId:[
{ required: true, message: "请选择单元", trigger: "change" },
],
floorLocation: [
{ required: true, message: "请输入楼层位置", trigger: "blur" },
],
name: [
{ required: true, message: "请输入房屋名称", trigger: "blur" },
],
manageEstateTypeId: [
{ required: true, message: "请选择房屋类型", trigger: "change" },
],
indoorArea: [
{ required: true, message: "请输入室内面积", trigger: "blur" },
],
constructionArea: [
{ required: true, message: "请输入建筑面积", trigger: "blur" },
],
isEnableLease: [
{ required: true, message: "请选择是否开启租赁", trigger: "change" },
],
}
// 请求头
import store from "@/store";
export const uploadHeaders = {
"manage-login-token": store.getters.getToken,
}

@ -0,0 +1,325 @@
<template>
<div>
<a-form-model
layout="vertical"
ref="ruleForm"
:model="form"
:rules="rules"
:wrapper-col="{ span: 18 }"
>
<a-row>
<a-col :span="12">
<a-form-model-item label="楼栋" prop="manageBuildingId">
<a-select
v-model="form.manageBuildingId"
placeholder="请选择楼栋"
@change='changeBuild'
>
<a-select-option v-for="item in options.building" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="单元" prop="manageUnitId">
<a-select v-model="form.manageUnitId" placeholder="请选择单元" @change='changeUnit'>
<a-select-option v-for="item in options.unit" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="楼层" prop="floorLocation">
<a-input-number v-model.number="form.floorLocation" placeholder="楼层" :min='0' :max='options.floor'/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="房屋名称" prop="name">
<a-input v-model="form.name" placeholder="请输入房屋名称" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="室内面积" prop="indoorArea">
<a-input
type="number"
v-model="form.indoorArea"
placeholder="请输入室内面积"
suffix="㎡"
:min='0'
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="建筑面积" prop="constructionArea">
<a-input
v-model="form.constructionArea"
type="number"
suffix="㎡"
placeholder="请输入建筑面积"
:min='0'
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="房屋类型" prop="manageEstateTypeId">
<a-select
v-model="form.manageEstateTypeId"
placeholder="请选择房屋类型"
>
<a-select-option v-for="item in options.houseType" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="是否开启租赁" prop="isEnableLease">
<a-select placeholder='请选择是否开启租赁' v-model="form.isEnableLease" >
<a-select-option v-for="item in options.isEnableLease" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<div>房屋户型</div>
</a-col>
<a-col :span="4">
<a-form-model-item label="厅" prop="houseTypeHall">
<a-input type="number" :min="0" v-model="form.houseTypeHall" />
</a-form-model-item>
</a-col>
<a-col :span="4">
<a-form-model-item label="室" prop="houseTypeRoom">
<a-input type="number" :min="0" v-model="form.houseTypeRoom" />
</a-form-model-item>
</a-col>
<a-col :span="4">
<a-form-model-item label="卫" prop="houseTypeBathroom">
<a-input type="number" :min="0" v-model="form.houseTypeBathroom" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<div>房屋照片</div>
<a-upload
:action="`${$upload}`"
:headers="uploadHeaders"
list-type="picture-card"
accept='.jpg,.JPG,.png,.PNG,.jpeg,.JPEG'
:file-list="fileList"
@preview="handlePreview"
@change="fileChange"
:beforeUpload="beforeUpload"
>
<div v-if="fileList.length < 2">
<!-- <a-icon type="plus" /> -->
<a-icon :type="imgLoading ? 'loading' : 'plus'" />
<div class="ant-upload-text">点击上传</div>
</div>
</a-upload>
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
<img alt="example" style="width: 100%" :src="previewImage" />
</a-modal>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" prop="remarks">
<a-textarea v-model="form.remarks" :rows="4" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</div>
</template>
<script>
import { form, rules, uploadHeaders } from "./form.js";
import { allBuilding, findByBuildingId, estateType, houseInsert, houseUpdate, houseInfo } from "@/api/basic/estate"
function getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
export default {
props: {
editId: {
default:null,
type:Number
},
typeList: {
default: null,
type:Array
}
},
data() {
return {
form,
rules,
uploadHeaders,
fileList: [],
previewVisible: false,
imgLoading: false,
previewImage: "",
formType:'add',
options:{
building:[],//
unit:[],//
floor:0,//
houseType:[],//
isEnableLease:[//
{
id:1,
name:'开启'
},
{
id:2,
name:'关闭'
},
],
}
};
},
mounted() {
allBuilding().then(res=>{
this.options.building = res.data
})
estateType().then(res=>{
this.options.houseType = res.data
})
if(this.editId !== null){
this.getInfo(this.editId)
}
},
methods: {
async getInfo(id){
this.formType = 'edit'
let res = await houseInfo({estateId:id})
this.form.id = id
this.form.manageBuildingId = res.data.manageBuildingId
//
await this.changeBuild(res.data.manageBuildingId)
this.form.manageUnitId = res.data.manageUnitId
for(let item of this.options.unit){
if(item.id === res.data.manageUnitId){
this.options.floor = item.floor
this.form.floorLocation = res.data.floorLocation
}
}
this.form.name = res.data.name
this.form.manageEstateTypeId = res.data.manageEstateTypeId
this.form.indoorArea = res.data.indoorArea
this.form.constructionArea = res.data.constructionArea
this.form.houseTypeHall = res.data.houseTypeHall
this.form.houseTypeRoom = res.data.houseTypeRoom
this.form.houseTypeBathroom = res.data.houseTypeBathroom
this.form.remarks = res.data.remarks
this.form.isEnableLease = res.data.isEnableLease
// this.form.estateImgUrls = res.data.estateImgUrls
const file = []
for(let item of res.data.estateImgList){
let obj = {
name:item.url.split('_')[0] +'.'+ item.url.split('.')[1],
url: this.$ImgUrl(item.url),
uid:item.url.split('_')[1],
status:'done',
thumbUrl: this.$ImgUrl(item.url),
}
file.push(obj)
}
this.fileList = file
},
async handlePreview(file) {
if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj);
}
this.previewImage = file.url || file.preview;
this.previewVisible = true;
},
async changeBuild(data){
this.form.manageUnitId = undefined
this.options.floor = 0
let res = await findByBuildingId({buildingId:data})
this.options.unit = res.data
},
changeUnit(data){
this.options.floor = 0
for(let item of this.options.unit){
if(item.id === data){
console.log(item);
this.options.floor = item.floor
}
}
},
addSubmit(){
let file = []
for(let item of this.fileList){
//
if(item.response){
file.push(item.response.data)
}else{
//
file.push(item.url.split('/')[item.url.split('/').length-1])
}
}
this.form.estateImgUrls = file
this.$refs.ruleForm.validate(async valid => {
if (valid) {
if(this.formType==='add'){
let res = await houseInsert(this.form)
if(res.code === 200){
this.$message.success(res.msg)
this.success()
}else{
this.$message.error(res.msg)
}
}else if(this.formType==='edit'){
let res = await houseUpdate(this.form)
if(res.code === 200){
this.$message.success(res.msg)
this.success()
}else{
this.$message.error(res.msg)
}
}
}
});
},
success(){
this.$emit('success')
},
close(){
this.$refs.ruleForm.resetFields();
this.fileList = []
this.formType = 'add'
},
handleCancel() {
this.previewVisible = false;
},
fileChange(info) {
this.fileList = info.fileList
},
handleChange({ fileList }) {
this.fileList = fileList;
console.log(this.fileList);
},
beforeUpload(f, l) {
const isLt50M = f.size / 1024 / 1024 < 50;
if (!isLt50M) {
this.$message.error(f.name + "文件大小超出限制,请修改后重新上传");
return false;
} else {
return true;
}
},
},
watch: {
editId(val){
if(val!==null){
this.getInfo(val)
}
},
typeList(val) {
this.options.houseType = val;
}
}
};
</script>
<style lang="less" scoped>
</style>

@ -0,0 +1,412 @@
<template>
<div>
<div class="cardTitle">房屋管理</div>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-input v-model="searchForm.name" placeholder="请输入房间号" />
<a-select style="width: 200px" v-model='searchForm.manageEstateTypeId' placeholder="请选择房屋类型" >
<a-select-option v-for="item in options.houseType" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
<a-select style="width: 200px" v-model='searchForm.isEnableLease' placeholder="请选择是否开启租赁" >
<a-select-option v-for="item in options.isEnableLease" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
<a-button type="primary" @click="getData"> </a-button>
<a-button @click="reset"> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<div class="search-box">
<a-button class="add-btn" @click="drawerConfig.addShow = true">添加房屋</a-button>
<a-button @click="drawerConfig.houseType = true">房屋配置</a-button>
</div>
<div class="main">
<div style="margin-bottom: 16px">
<!-- 批量操作 -->
<a-select
type="primary"
v-model="activeAction"
:disabled="!hasSelected"
:loading="loading"
style="width: 120px"
@change="Actions"
placeholder="请选择操作"
>
批量
<a-select-option v-for="item in ActionsList" :key="item.value">
{{ item.label }}
</a-select-option>
</a-select>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
<!-- 表格 -->
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 1400 }"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:row-key="
(record, index) => {
return record.id;
}
"
>
<span slot="name" slot-scope="text, row">
{{
row.manageBuildingName +
"栋/" +
row.manageUnitName +
"单元/" +
row.floorLocation +
"层-" +
row.name +
"室"
}}
</span>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="edit(row)"></a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
</span>
<span slot="tags" slot-scope="tag">
<a-tag
:color="tag === 1 ? 'volcano' : tag === 2 ? 'geekblue' : 'green'"
>
{{ tag === 1 ? "闲置" : tag === 2 ? "在住" : "在租" }}
</a-tag>
</span>
<span slot="switch" slot-scope="switchV, row">
<a-switch
checked-children="开" un-checked-children="关"
:checked="switchV === 1"
@change="handleEnable(row)"
></a-switch>
</span>
</a-table>
</div>
<a-drawer
title="添加房屋"
:width="720"
:visible="drawerConfig.addShow"
:body-style="{ paddingBottom: '80px' }"
@close="addClose"
>
<div class="drawer-content">
基本信息
<a-divider></a-divider>
<vue-form ref="form" @success='addSuccess' :typeList="typeList" :editId="editId"></vue-form>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="addClose">
关闭
</a-button>
<a-button type="primary" @click="addHouse"> </a-button>
</div>
</a-drawer>
<!-- 房屋类型 -->
<a-drawer
title="房屋设置"
:width="720"
:visible="drawerConfig.houseType"
:body-style="{ paddingBottom: '80px' }"
@close="drawerConfig.houseType=false"
>
<div class="drawer-content">
房屋类型
<a-divider></a-divider>
<!-- tags -->
<span v-for="item,index in typeList" :key="item.id">
<a-input
v-if="item.show==true"
ref="input"
v-focus
type="text"
size="small"
:style="{ width: '78px','padding-bottom':'3px','margin-right':'7px' }"
v-model="item.name"
@blur="editType(item)"
@keyup.enter="editType(item)"
/>
<a-tag
v-else-if="item.show==false" closable @close.prevent="delType(item.id)"
@click="editInput(item,index)" >
{{item.name}}
</a-tag>
</span>
<!-- addTag -->
<span>
<a-input
v-if="inputVisible"
ref="addInput"
type="text"
size="small"
:style="{ width: '78px','padding-bottom':'3px'}"
:value="typeForm.name"
@change="handleInputChange"
@blur="handleInputConfirm"
@keyup.enter="handleInputConfirm"
/>
<a-tag v-else style="background: #fff; borderStyle: dashed;" @click="addShow">
<a-icon type="plus" /> 新增类型
</a-tag>
</span>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="drawerConfig.houseType=false">
关闭
</a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { columns, pagination, searchForm, ActionsList } from "./depend/config";
import { houseList, houseDel, isEnableLease, estateType, estateTypeInsert, estateTypeDel, estateTypeUpdate } from "@/api/basic/estate";
import vueForm from "./depend/form.vue";
export default {
components: {
vueForm,
},
directives: {
focus: {
//
inserted: function (el) {
el.focus()
}
}
},
data() {
return {
drawerConfig: {
addShow: false,
houseType: false
},
pagination,
searchForm,
columns,
ActionsList,
inputVisible: false,
typeForm:{
id: null,
name: ''
},
editId:null,
activeAction: undefined,
loading: false,
// index
selectedRowKeys: [],
tableChoosed: [],
tableData: [],
typeList:[],
options:{
houseType:[],//
isEnableLease:[//
{
id:1,
name:'开启'
},
{
id:2,
name:'关闭'
},
],
}
};
},
created() {
this.getData();
this.getType()
},
methods: {
//
async getData() {
const res = await houseList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
...this.searchForm
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total
},
//
async getType() {
this.typeList = []
const res = await estateType();
this.options.houseType = res.data
const arr = res.data;
arr.forEach(ele => {
ele.show = false;
})
this.typeList = arr;
},
reset(){
this.searchForm.name= "",
this.searchForm.isEnableLease = undefined,
this.searchForm.manageEstateTypeId = undefined
this.getData()
},
//
addHouse() {
this.$refs.form.addSubmit()
},
//
addSuccess(){
this.getData()
this.addClose()
},
addClose() {
this.drawerConfig.addShow = false;
this.getType();
this.editId = null;
this.$refs.form.close()
},
edit(data){
this.getType();
this.editId = data.id
this.drawerConfig.addShow = true;
},
//
addShow(){
this.inputVisible = true;
this.$nextTick(function() {
this.$refs.addInput.focus();
});
},
//
delType(id){
this.$confirm({
title: "是否删除",
icon:'delete',
onOk:async()=>{
let res = await estateTypeDel({manageEstateTypeIds:[id]})
if(res.code=== 200){
this.$message.success(res.msg);
this.getType()
}else{
this.$message.error(res.msg);
}
},
})
},
// input
editInput(obj,i) {
this.$set(this.typeList[i],'show',true)
this.$forceUpdate()
},
//
async editType(item){
let res = await estateTypeUpdate({
id: item.id,
name: item.name
})
if(res.code === 200){
item.show = false
this.$forceUpdate()
this.$message.success(res.msg)
}else{
this.$message.error(res.msg)
}
},
handleInputChange(e) {
this.typeForm.name = e.target.value;
},
async handleInputConfirm() {
if(this.typeForm.name === ''){
this.inputVisible = false;
return
}
let res = await estateTypeInsert({
name:this.typeForm.name,
})
if(res.code === 200){
this.$message.success(res.msg);
this.inputVisible = false;
this.typeForm.name = ''
this.getType()
}else{
this.$message.error(res.msg);
}
},
//
handleEnable: async function (data) {
const res = await isEnableLease({
estateId: data.id,
});
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData()
},
del(ids) {
this.$confirm({
title: "是否删除",
icon: "delete",
onOk: () => {
houseDel({ estateIds: ids }).then((res) => {
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
});
},
});
},
Actions(data) {
//
if (data === 1) {
this.del(this.selectedRowKeys);
this.activeAction = undefined;
}
},
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
},
},
computed: {
// selection
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
.role-card {
line-height: 30px;
font-size: 16px;
cursor: pointer;
border-bottom: 1px solid #d9d9d9;
margin-bottom: 10px;
display: flex;
justify-content: space-between;
}
/deep/.ant-tag{
margin-bottom: 8px;
}
</style>

@ -0,0 +1,13 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>
<style>
</style>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save