From 4a45b396f2bb1e377819cbc50217a6429f15e911 Mon Sep 17 00:00:00 2001 From: bibi <541660090@qq.com> Date: Sat, 22 Jan 2022 15:16:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.production | 2 +- src/api/basic/Workorder/index.js | 11 + src/api/basic/department/index.js | 90 +++ src/api/basic/estate/index.js | 18 +- src/api/basic/organization/index.js | 10 - src/api/basic/resident/index.js | 33 + src/api/basic/role/index.js | 28 + src/components/table/index.vue | 1 + src/main.js | 4 + src/mixins/index.js | 4 +- src/request/index.js | 2 +- src/styles/index.less | 2 +- src/utils/util.js | 31 + src/views/Basic/Authority/component/config.js | 51 ++ src/views/Basic/Authority/component/form.vue | 375 +++++++++ .../Authority/component/permissions copy.vue | 167 ++++ .../Basic/Authority/component/permissions.vue | 165 ++++ src/views/Basic/Authority/index.vue | 180 +++-- src/views/Basic/Employee/component/config.js | 54 ++ src/views/Basic/Employee/component/form.vue | 421 ++++++++++ src/views/Basic/Employee/index.vue | 729 ++++++++++-------- .../_buildingManage/component/config.js | 55 ++ .../EstateInfo/_buildingManage/index.vue | 81 +- .../_houseHoldAudit/component/config.js | 92 +++ .../EstateInfo/_houseHoldAudit/index.vue | 249 +++--- .../_houseHoldInfo/component/addForm.vue | 226 ++++++ .../_houseHoldInfo/component/config.js | 77 ++ .../Basic/EstateInfo/_houseHoldInfo/index.vue | 334 +------- .../_houseManage/component/config.js | 72 ++ .../Basic/EstateInfo/_houseManage/index.vue | 131 +--- 31 files changed, 2633 insertions(+), 1064 deletions(-) create mode 100644 src/api/basic/Workorder/index.js create mode 100644 src/api/basic/department/index.js delete mode 100644 src/api/basic/organization/index.js create mode 100644 src/api/basic/resident/index.js create mode 100644 src/api/basic/role/index.js create mode 100644 src/utils/util.js create mode 100644 src/views/Basic/Authority/component/config.js create mode 100644 src/views/Basic/Authority/component/form.vue create mode 100644 src/views/Basic/Authority/component/permissions copy.vue create mode 100644 src/views/Basic/Authority/component/permissions.vue create mode 100644 src/views/Basic/Employee/component/config.js create mode 100644 src/views/Basic/Employee/component/form.vue create mode 100644 src/views/Basic/EstateInfo/_buildingManage/component/config.js create mode 100644 src/views/Basic/EstateInfo/_houseHoldAudit/component/config.js create mode 100644 src/views/Basic/EstateInfo/_houseHoldInfo/component/addForm.vue create mode 100644 src/views/Basic/EstateInfo/_houseHoldInfo/component/config.js create mode 100644 src/views/Basic/EstateInfo/_houseManage/component/config.js diff --git a/.env.development b/.env.development index ae2b7ab..bbc6474 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ NODE_ENV = 'development' VUE_APP_URL = 'http://121.41.26.225:8004/' -VUE_APP_CDN = 'http://121.41.26.225:8004/' \ No newline at end of file +VUE_APP_STATIC = 'http://121.41.26.225:8004/' \ No newline at end of file diff --git a/.env.production b/.env.production index d9c27f6..87ee745 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ NODE_ENV = 'production' VUE_APP_URL = 'http://121.41.26.225:8004/' -VUE_APP_CDN = 'http://121.41.26.225:8004/' \ No newline at end of file +VUE_APP_STATIC = 'http://121.41.26.225:8004/' \ No newline at end of file diff --git a/src/api/basic/Workorder/index.js b/src/api/basic/Workorder/index.js new file mode 100644 index 0000000..6a2aecd --- /dev/null +++ b/src/api/basic/Workorder/index.js @@ -0,0 +1,11 @@ +import httpService from "@/request" + +// 工单 +export function name(params) { + return httpService({ + url: ` `, + method: 'get/post', + data: params, + }) +} + diff --git a/src/api/basic/department/index.js b/src/api/basic/department/index.js new file mode 100644 index 0000000..b7bbe0d --- /dev/null +++ b/src/api/basic/department/index.js @@ -0,0 +1,90 @@ +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, + }) +} diff --git a/src/api/basic/estate/index.js b/src/api/basic/estate/index.js index 8acfc97..ce39a07 100644 --- a/src/api/basic/estate/index.js +++ b/src/api/basic/estate/index.js @@ -1,10 +1,18 @@ import httpService from "@/request" -// 获取预报列表 -export function functionName(params) { +// 楼栋列表 +export function buildingList(params) { return httpService({ - url: `url`, - method: 'post', - data: params, + url: `/user/building/list`, + method: 'get', + params: params, + }) +} +// 房屋列表 +export function houseList(params) { + return httpService({ + url: `/user/estate/list`, + method: 'get', + params: params, }) } diff --git a/src/api/basic/organization/index.js b/src/api/basic/organization/index.js deleted file mode 100644 index 8acfc97..0000000 --- a/src/api/basic/organization/index.js +++ /dev/null @@ -1,10 +0,0 @@ -import httpService from "@/request" - -// 获取预报列表 -export function functionName(params) { - return httpService({ - url: `url`, - method: 'post', - data: params, - }) -} diff --git a/src/api/basic/resident/index.js b/src/api/basic/resident/index.js new file mode 100644 index 0000000..4f5b034 --- /dev/null +++ b/src/api/basic/resident/index.js @@ -0,0 +1,33 @@ +import httpService from "@/request" + +/** + * + * 住户 + * @param {*} params + * @returns + * + * 住户列表 + */ +export function residentList(params) { + return httpService({ + url: `/user/resident/list`, + 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, + }) +} diff --git a/src/api/basic/role/index.js b/src/api/basic/role/index.js new file mode 100644 index 0000000..0a67c19 --- /dev/null +++ b/src/api/basic/role/index.js @@ -0,0 +1,28 @@ +import httpService from "@/request" + +// 权限 角色 +// 角色列表 +export function rolelist(params) { + return httpService({ + url: `/user/role/list`, + method: 'get', + 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, + }) +} + diff --git a/src/components/table/index.vue b/src/components/table/index.vue index abcd728..4f5d06d 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -10,6 +10,7 @@ style="width: 120px" @change="Actions" placeholder="请选择操作" + v-if="ActionsList.length!=0" > 批量 diff --git a/src/main.js b/src/main.js index 99c7154..dceee4b 100644 --- a/src/main.js +++ b/src/main.js @@ -11,11 +11,15 @@ import App from './App.vue' import './styles/index.less'; import mixins from "@/mixins" import Antd from 'ant-design-vue'; +import util from '@/utils/util.js' import 'ant-design-vue/dist/antd.css'; + +Vue.use(util); Vue.use(Antd); Vue.use(mixins); import store from "@/store"; import router from "@/permission"; +Vue.prototype.$baseUrl = process.env.VUE_APP_URL+'123456/manage' Vue.config.productionTip = false import commonTable from './components/table' diff --git a/src/mixins/index.js b/src/mixins/index.js index 712f20b..1cda6a6 100644 --- a/src/mixins/index.js +++ b/src/mixins/index.js @@ -12,10 +12,10 @@ export default { install(Vue) { Vue.mixin({ computed: { - ...mapGetters(['getToken','getSelectedKeys', 'getOpenKeys','getLoginStep']) + ...mapGetters(['getToken','getSelectedKeys', 'getOpenKeys']) }, methods: { - ...mapActions(['setToken','setSelectedKeys', 'setOpenKeys','setLoginStep']) + ...mapActions(['setToken','setSelectedKeys', 'setOpenKeys']) } }) } diff --git a/src/request/index.js b/src/request/index.js index 24516a8..e8123bc 100644 --- a/src/request/index.js +++ b/src/request/index.js @@ -62,7 +62,7 @@ httpService.interceptors.response.use(response => { // console.log(msg); // console.log(data); return res; - } else if(res.code == '超时') { + } else if(res.code == 10010) { router.replace({ path: '/login' }); diff --git a/src/styles/index.less b/src/styles/index.less index 429f53b..f827b5c 100644 --- a/src/styles/index.less +++ b/src/styles/index.less @@ -27,7 +27,7 @@ } .search-box { - margin: 30px; + margin: 20px; } .add-btn{ diff --git a/src/utils/util.js b/src/utils/util.js new file mode 100644 index 0000000..2cb626d --- /dev/null +++ b/src/utils/util.js @@ -0,0 +1,31 @@ +export default { + install: function (Vue) { + Vue.prototype.ImgUrl = (src) => { + return process.env.VUE_APP_CDN + 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 '' + } + } + } +} diff --git a/src/views/Basic/Authority/component/config.js b/src/views/Basic/Authority/component/config.js new file mode 100644 index 0000000..f33ccfa --- /dev/null +++ b/src/views/Basic/Authority/component/config.js @@ -0,0 +1,51 @@ +/** + * 配置 + * 表格列 + */ +export const columns = [ + { + title: "真实姓名", + dataIndex: "actualName", + width: "20%", + }, + { + title: "手机号", + dataIndex: "tel", + width: "20%", + }, + { + title: "角色", + dataIndex: "roleNameList", + width: "20%", + customRender: function (roleNameList) { + return roleNameList.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, +} \ No newline at end of file diff --git a/src/views/Basic/Authority/component/form.vue b/src/views/Basic/Authority/component/form.vue new file mode 100644 index 0000000..fd8aab5 --- /dev/null +++ b/src/views/Basic/Authority/component/form.vue @@ -0,0 +1,375 @@ + + + + + diff --git a/src/views/Basic/Authority/component/permissions copy.vue b/src/views/Basic/Authority/component/permissions copy.vue new file mode 100644 index 0000000..a83fdee --- /dev/null +++ b/src/views/Basic/Authority/component/permissions copy.vue @@ -0,0 +1,167 @@ + + + + + \ No newline at end of file diff --git a/src/views/Basic/Authority/component/permissions.vue b/src/views/Basic/Authority/component/permissions.vue new file mode 100644 index 0000000..c1117d7 --- /dev/null +++ b/src/views/Basic/Authority/component/permissions.vue @@ -0,0 +1,165 @@ + + + + + \ No newline at end of file diff --git a/src/views/Basic/Authority/index.vue b/src/views/Basic/Authority/index.vue index 9aa1801..dea0af9 100644 --- a/src/views/Basic/Authority/index.vue +++ b/src/views/Basic/Authority/index.vue @@ -1,103 +1,117 @@ diff --git a/src/views/Basic/Employee/index.vue b/src/views/Basic/Employee/index.vue index 249e681..f192423 100644 --- a/src/views/Basic/Employee/index.vue +++ b/src/views/Basic/Employee/index.vue @@ -6,15 +6,24 @@
- + 新建分组 - - + + 新建分组 + + + +
+ :replaceFields="{ children: 'childList', title: 'name' }" + > + +
- + 新增员工 @@ -52,7 +72,6 @@
- + - 详情 - 重置密码 + 编辑 + 重置密码 {{ @@ -81,393 +100,449 @@
- - + -
+
-
基本信息
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
入职信息
- - - - - - - - - - - - - - - - - - -
上传资料
- + + + + + {{ item.name }} - 点击上传 - - 支持上传PNG,JPG,PDF文件 -
-
-
联系信息
- - - - - - - - - - - - - - - - - - -
其他信息
- - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +
+ + + +
+ +
+
+ + +
+ + + 新密码 + + + + + + 确认密码 + + + + + +
+
+ + \ No newline at end of file diff --git a/src/views/Basic/EstateInfo/_houseHoldInfo/component/config.js b/src/views/Basic/EstateInfo/_houseHoldInfo/component/config.js new file mode 100644 index 0000000..0733910 --- /dev/null +++ b/src/views/Basic/EstateInfo/_houseHoldInfo/component/config.js @@ -0,0 +1,77 @@ +/** + * 配置 + * 表格列 + */ + export const columns = [ + { + title: "住户姓名", + dataIndex: "name", + width: "10%", + }, + { + title: "住户手机号", + dataIndex: "tel", + width: "10%", + }, + { + title: "住户性别", + dataIndex: "sex", + width: "8%", + customRender:function(sex){ + switch (sex) { + case 1: + return '男' + case 2: + return '女' + case 3: + return '保密' + default: + break; + } + } + }, + { + title: "住户身份证号", + dataIndex: "idCard", + width: "10%", + }, + { + title: "房屋名称", + dataIndex: "manageBuildingName", + scopedSlots: { customRender: "name" }, + width: "20%", + }, + { + title: "房屋类型", + dataIndex: "manageEstateTypeName", + width: "10%", + }, + { + title: "用户身份", + key: "tags", + dataIndex: "identity", + scopedSlots: { customRender: "tags" }, + }, + { + title: "操作", + dataIndex: "action", + key: "action", + width: "180", + fixed: "right", + scopedSlots: { customRender: "action" }, + }, +] +// 搜索项 +export const searchForm = { + keyword: "", + sex: null +} +// 分页 +export const pagination = { + current: 1, + total: 0, + pageSize: 10, + showTotal: (total) => `共 ${total} 条`, + showSizeChanger: true, + showQuickJumper: true, +} \ No newline at end of file diff --git a/src/views/Basic/EstateInfo/_houseHoldInfo/index.vue b/src/views/Basic/EstateInfo/_houseHoldInfo/index.vue index 4768166..f58f8a7 100644 --- a/src/views/Basic/EstateInfo/_houseHoldInfo/index.vue +++ b/src/views/Basic/EstateInfo/_houseHoldInfo/index.vue @@ -90,203 +90,12 @@ - - -
- 基本信息 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 身份证徽面照 - - avatar -
- -
-
-
-
-
- - 身份证头像照 - - avatar -
- -
-
-
-
-
-
- 关联信息 - -
-
- - - - - - - - - - -
-
- - - - - - - - - - -
- 联系信息 - - - - - - - - - - - - 其他信息 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -