bibi 3 years ago
parent 4a45b396f2
commit 1f4f15d0a7

@ -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,5 +1,5 @@
module.exports = { module.exports = {
presets: [ presets: [
'@vue/cli-plugin-babel/preset' '@vue/cli-plugin-babel/preset'
] ]
} }

25723
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -22,7 +22,7 @@
"@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0", "@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"eslint": "^6.7.2", "eslint": "^6.8.0",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "^2.6.11"
}, },

@ -17,12 +17,12 @@
<script> <script>
import zhCN from "ant-design-vue/lib/locale-provider/zh_CN"; import zhCN from "ant-design-vue/lib/locale-provider/zh_CN";
export default { export default {
name: 'App', name: 'App',
data() { data() {
return { return {
locale: zhCN locale: zhCN
}; };
}, },
} }
</script> </script>

@ -2,10 +2,10 @@ import httpService from "@/request"
// 工单 // 工单
export function name(params) { export function name(params) {
return httpService({ return httpService({
url: ` `, url: ` `,
method: 'get/post', method: 'get/post',
data: params, data: params,
}) })
} }

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

@ -2,17 +2,17 @@ import httpService from "@/request"
// 楼栋列表 // 楼栋列表
export function buildingList(params) { export function buildingList(params) {
return httpService({ return httpService({
url: `/user/building/list`, url: `/user/building/list`,
method: 'get', method: 'get',
params: params, params: params,
}) })
} }
// 房屋列表 // 房屋列表
export function houseList(params) { export function houseList(params) {
return httpService({ return httpService({
url: `/user/estate/list`, url: `/user/estate/list`,
method: 'get', method: 'get',
params: params, params: params,
}) })
} }

@ -9,25 +9,25 @@ import httpService from "@/request"
* 住户列表 * 住户列表
*/ */
export function residentList(params) { export function residentList(params) {
return httpService({ return httpService({
url: `/user/resident/list`, url: `/user/resident/list`,
method: 'get', method: 'get',
params: params, params: params,
}) })
} }
// 审核列表 // 审核列表
export function reviewList(params) { export function reviewList(params) {
return httpService({ return httpService({
url: `/user/review/list`, url: `/user/review/list`,
method: 'get', method: 'get',
params: params, params: params,
}) })
} }
// 审核通过 不通过 // 审核通过 不通过
export function review(params) { export function review(params) {
return httpService({ return httpService({
url: `/user/review/review`, url: `/user/review/review`,
method: 'post', method: 'post',
data: params, data: params,
}) })
} }

@ -3,26 +3,26 @@ import httpService from "@/request"
// 权限 角色 // 权限 角色
// 角色列表 // 角色列表
export function rolelist(params) { export function rolelist(params) {
return httpService({ return httpService({
url: `/user/role/list`, url: `/user/role/list`,
method: 'get', method: 'get',
data: params, data: params,
}) })
} }
// 角色-----员工列表 // 角色-----员工列表
export function listByRole(params) { export function listByRole(params) {
return httpService({ return httpService({
url: `/user/role/listByRole`, url: `/user/role/listByRole`,
method: 'GET', method: 'GET',
params: params, params: params,
}) })
} }
// 查询当前角色下的所有的菜单权限信息 roleId // 查询当前角色下的所有的菜单权限信息 roleId
export function FindAllMenus(params) { export function FindAllMenus(params) {
return httpService({ return httpService({
url: `/user/jurisdiction/findAllMenus`, url: `/user/jurisdiction/findAllMenus`,
method: 'GET', method: 'GET',
params: params, params: params,
}) })
} }

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

@ -19,18 +19,18 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
visible: false, visible: false,
}; };
}, },
methods: { methods: {
showDrawer() { showDrawer() {
this.visible = true; this.visible = true;
}, },
onClose() { onClose() {
this.visible = false; this.visible = false;
}, },
}, },
}; };
</script> </script>

@ -57,16 +57,16 @@
<script> <script>
export default { export default {
data() { data() {
return { return {
// //
pagination: { pagination: {
showTotal: (total) => `${total}`, showTotal: (total) => `${total}`,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
}, },
activeAction:undefined, activeAction:undefined,
/** /**
* *
* *
* customRender: function (gender) { * customRender: function (gender) {
@ -77,43 +77,43 @@ export default {
} }
}, },
*/ */
loading: false, loading: false,
// index // index
selectedRowKeys: [], selectedRowKeys: [],
}; };
}, },
computed: { computed: {
// selection // selection
hasSelected() { hasSelected() {
return this.selectedRowKeys.length > 0; return this.selectedRowKeys.length > 0;
}, },
}, },
// //
props: { props: {
columns: Array, columns: Array,
tableData: Array, tableData: Array,
ActionsList: Array, ActionsList: Array,
// activeAction:Number // activeAction:Number
}, },
methods: { methods: {
// selection // selection
selectionChoosed(selectedRowKeys, data) { selectionChoosed(selectedRowKeys, data) {
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
this.$emit("selectionChoosed", data); this.$emit("selectionChoosed", data);
}, },
// //
handleTableChange(val) { handleTableChange(val) {
this.$emit("handleTableChange", val); this.$emit("handleTableChange", val);
}, },
// //
Actions(val) { Actions(val) {
this.$emit("Actions", val); this.$emit("Actions", val);
this.activeAction = undefined this.activeAction = undefined
}, },
formatter(val){ formatter(val){
this.$emit("formatter", val); this.$emit("formatter", val);
} }
}, },
}; };
</script> </script>

@ -19,14 +19,14 @@ Vue.use(Antd);
Vue.use(mixins); Vue.use(mixins);
import store from "@/store"; import store from "@/store";
import router from "@/permission"; import router from "@/permission";
Vue.prototype.$baseUrl = process.env.VUE_APP_URL+'123456/manage' Vue.prototype.$baseUrl = process.env.VUE_APP_URL + '123456/manage'
Vue.config.productionTip = false Vue.config.productionTip = false
import commonTable from './components/table' import commonTable from './components/table'
// 注册组件 // 注册组件
Vue.component('commonTable', commonTable) Vue.component('commonTable', commonTable)
new Vue({ new Vue({
render: h => h(App), render: h => h(App),
router, router,
store store
}).$mount('#app') }).$mount('#app')

@ -9,14 +9,14 @@
import { mapGetters, mapActions } from "vuex"; import { mapGetters, mapActions } from "vuex";
export default { export default {
install(Vue) { install(Vue) {
Vue.mixin({ Vue.mixin({
computed: { computed: {
...mapGetters(['getToken','getSelectedKeys', 'getOpenKeys']) ...mapGetters(['getToken','getSelectedKeys', 'getOpenKeys'])
}, },
methods: { methods: {
...mapActions(['setToken','setSelectedKeys', 'setOpenKeys']) ...mapActions(['setToken','setSelectedKeys', 'setOpenKeys'])
} }
}) })
} }
} }

@ -6,17 +6,17 @@ import store from '@/store'
const whitePath = [ '/login'] const whitePath = [ '/login']
// 判断登录 // 判断登录
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()
const token = store.getters.getToken; const token = store.getters.getToken;
if(!token && !whitePath.includes(to.path)) { if(!token && !whitePath.includes(to.path)) {
next('/login'); next('/login');
} else { } else {
next(); next();
} }
}) })
router.afterEach(() => { router.afterEach(() => {
NProgress.done() NProgress.done()
}) })
export default router export default router

@ -13,80 +13,80 @@ import { message} from 'ant-design-vue'
import store from '@/store' import store from '@/store'
// import baseURL from "@/utils/baseURL" // import baseURL from "@/utils/baseURL"
function filterRequestData(obj) { function filterRequestData(obj) {
let o = {}; let o = {};
for(let key in obj) { for(let key in obj) {
let b1 = obj[key] === 0; let b1 = obj[key] === 0;
let b2 = obj[key] === false; let b2 = obj[key] === false;
if(obj[key] || b1 || b2) { if(obj[key] || b1 || b2) {
o[key] = obj[key] o[key] = obj[key]
} }
} }
return o; return o;
} }
//创建axios的实例 //创建axios的实例
const httpService = axios.create({ const httpService = axios.create({
baseURL: process.env.VUE_APP_URL+'123456/manage',// TODO:具体的配置可以根据项目情况而来 baseURL: process.env.VUE_APP_URL+'123456/manage',// TODO:具体的配置可以根据项目情况而来
timeout: 5000 timeout: 5000
}) })
//axios的拦截--request //axios的拦截--request
httpService.interceptors.request.use(config => { httpService.interceptors.request.use(config => {
const rqParams = filterRequestData(config.params); const rqParams = filterRequestData(config.params);
const rqData = filterRequestData(config.data); const rqData = filterRequestData(config.data);
// post 'Content-Type' === 'application/x-www-form-urlencoded' // post 'Content-Type' === 'application/x-www-form-urlencoded'
config.headers['Content-Type'] = "application/json"; config.headers['Content-Type'] = "application/json";
config.headers['manage-login-token'] = store.getters.getToken; config.headers['manage-login-token'] = store.getters.getToken;
// config.headers['device-type'] = "web"; // config.headers['device-type'] = "web";
if(config.method === 'post') { if(config.method === 'post') {
config.data = rqData; config.data = rqData;
} else { } else {
config.data = rqData; config.data = rqData;
config.params = rqParams; config.params = rqParams;
} }
return config; return config;
},err => { },err => {
Promise.reject(err);// 请求错误处理 Promise.reject(err);// 请求错误处理
}) })
//4、axios的拦截--response //4、axios的拦截--response
httpService.interceptors.response.use(response => { httpService.interceptors.response.use(response => {
// TODO:具体的code对应的处理可继续添加修改 // TODO:具体的code对应的处理可继续添加修改
// let data = null; // let data = null;
let msg = ''; let msg = '';
let res = response.data; let res = response.data;
// console.log(response); // console.log(response);
if(res.code === 200){ if(res.code === 200){
// code = 200; // code = 200;
// data = res.data; // data = res.data;
// msg = res.msg || ""; // msg = res.msg || "";
// console.log(msg); // console.log(msg);
// console.log(data); // console.log(data);
return res; return res;
} else if(res.code == 10010) { } else if(res.code == 10010) {
router.replace({ router.replace({
path: '/login' path: '/login'
}); });
} else { } else {
msg = res.msg || ""; msg = res.msg || "";
message.error(msg); message.error(msg);
return Promise.reject(new Error(msg)) return Promise.reject(new Error(msg))
} }
},err => { },err => {
console.log(err) console.log(err)
// TODO:具体的code对应的处理可继续添加修改 // TODO:具体的code对应的处理可继续添加修改
if(err.response.code === 301){ if(err.response.code === 301){
//登录过期跳转登录页面并将要浏览的页面fullPath传过去登录成功后跳转需要访问的页面 ---主页(index) 或者 退出到登录前的浏览的页面 //登录过期跳转登录页面并将要浏览的页面fullPath传过去登录成功后跳转需要访问的页面 ---主页(index) 或者 退出到登录前的浏览的页面
//这样登录页面登录接口成功之后可以进行跳转 主页(index) 或者 退出到登录前的页面: let path = this.$route.query.redirect || '/index.js'; this.$router.push(path); //这样登录页面登录接口成功之后可以进行跳转 主页(index) 或者 退出到登录前的页面: let path = this.$route.query.redirect || '/index.js'; this.$router.push(path);
setTimeout(() => { setTimeout(() => {
router.replace({ router.replace({
path: '/login', path: '/login',
query: { query: {
redirect: router.currentRoute.fullPath redirect: router.currentRoute.fullPath
} }
}); });
}, 1000); }, 1000);
} }
return Promise.reject(err); return Promise.reject(err);
}) })
export default httpService export default httpService

@ -1,138 +1,138 @@
export default [ export default [
{ {
path: '/Console', path: '/Console',
name: "Console", name: "Console",
title: "控制台", title: "控制台",
hide: false, hide: false,
icon: 'container', icon: 'container',
component: resolve => require(['@/views/Basic/Console'], resolve), component: resolve => require(['@/views/Basic/Console'], resolve),
meta: {title: '控制台'} meta: {title: '控制台'}
}, },
{ {
path: '/Employee', path: '/Employee',
name: "Employee", name: "Employee",
title: "员工管理", title: "员工管理",
icon: 'team', icon: 'team',
hide: false, hide: false,
component: resolve => require(['@/views/Basic/Employee'], resolve), component: resolve => require(['@/views/Basic/Employee'], resolve),
meta: {title: '员工管理'} meta: {title: '员工管理'}
}, },
{ {
path: '/authority', path: '/authority',
name: "Authority", name: "Authority",
title: "权限管理", title: "权限管理",
icon: 'appstore', icon: 'appstore',
hide: false, hide: false,
component: resolve => require(['@/views/Basic/Authority'], resolve), component: resolve => require(['@/views/Basic/Authority'], resolve),
meta: {title: '权限管理'}, meta: {title: '权限管理'},
children: [ children: [
{ {
path: '/Authority/_details', path: '/Authority/_details',
name: "Authority_details", name: "Authority_details",
title: "账单管理-详情", title: "账单管理-详情",
icon: 'profile', icon: 'profile',
hide: true, hide: true,
component: resolve => require(['@/views/Basic/Authority/_details'], resolve), component: resolve => require(['@/views/Basic/Authority/_details'], resolve),
meta: {title: '账单管理-详情'}, meta: {title: '账单管理-详情'},
} }
] ]
}, },
{ {
path: '/EstateInfo', path: '/EstateInfo',
name: "EstateInfo", name: "EstateInfo",
title: "小区信息", title: "小区信息",
icon: 'home', icon: 'home',
hide: false, hide: false,
component: resolve => require(['@/views/Basic/EstateInfo'], resolve), component: resolve => require(['@/views/Basic/EstateInfo'], resolve),
meta: {title: '小区信息'}, meta: {title: '小区信息'},
children: [ children: [
{ {
path: '/EstateInfo/BuildingManage', path: '/EstateInfo/BuildingManage',
name: "BuildingManage", name: "BuildingManage",
title: "楼栋管理", title: "楼栋管理",
hide: false, hide: false,
component: resolve => require(['@/views/Basic/EstateInfo/_buildingManage'], resolve), component: resolve => require(['@/views/Basic/EstateInfo/_buildingManage'], resolve),
meta: {title: '楼栋管理'}, meta: {title: '楼栋管理'},
}, },
{ {
path: '/EstateInfo/HouseManage', path: '/EstateInfo/HouseManage',
name: "HouseManage", name: "HouseManage",
title: "房屋管理", title: "房屋管理",
hide: false, hide: false,
component: resolve => require(['@/views/Basic/EstateInfo/_houseManage'], resolve), component: resolve => require(['@/views/Basic/EstateInfo/_houseManage'], resolve),
meta: {title: '房屋管理'}, meta: {title: '房屋管理'},
}, },
{ {
path: '/EstateInfo/HouseHoldInfo', path: '/EstateInfo/HouseHoldInfo',
name: "HouseHoldInfo", name: "HouseHoldInfo",
title: "住户信息", title: "住户信息",
hide: false, hide: false,
component: resolve => require(['@/views/Basic/EstateInfo/_houseHoldInfo'], resolve), component: resolve => require(['@/views/Basic/EstateInfo/_houseHoldInfo'], resolve),
meta: {title: '住户信息'}, meta: {title: '住户信息'},
}, },
{ {
path: '/EstateInfo/HouseHoldAudit', path: '/EstateInfo/HouseHoldAudit',
name: "HouseHoldAudit", name: "HouseHoldAudit",
title: "住户审核", title: "住户审核",
hide: false, hide: false,
component: resolve => require(['@/views/Basic/EstateInfo/_houseHoldAudit'], resolve), component: resolve => require(['@/views/Basic/EstateInfo/_houseHoldAudit'], resolve),
meta: {title: '住户审核'}, meta: {title: '住户审核'},
}, },
] ]
}, },
{ {
path: '/Workorder', path: '/Workorder',
name: "Workorder", name: "Workorder",
title: "工单管理", title: "工单管理",
icon: 'solution', icon: 'solution',
hide: false, hide: false,
component: resolve => require(['@/views/Basic/WorkOrder'], resolve), component: resolve => require(['@/views/Basic/WorkOrder'], resolve),
meta: {title: '工单管理'} meta: {title: '工单管理'}
}, },
// { // {
// path: '/attendance', // path: '/attendance',
// name: "Attendance", // name: "Attendance",
// title: "考勤管理", // title: "考勤管理",
// icon: 'reconciliation', // icon: 'reconciliation',
// hide: false, // hide: false,
// redirect: '/attendance/record', // redirect: '/attendance/record',
// component: resolve => require(['@/views/Basic/Attendance'], resolve), // component: resolve => require(['@/views/Basic/Attendance'], resolve),
// meta: {title: '考勤管理'}, // meta: {title: '考勤管理'},
// children: [ // children: [
// { // {
// path: '/attendance/record', // path: '/attendance/record',
// name: "Attendance_record", // name: "Attendance_record",
// title: "考勤记录", // title: "考勤记录",
// hide: false, // hide: false,
// component: resolve => require(['@/views/Basic/Attendance/_record'], resolve), // component: resolve => require(['@/views/Basic/Attendance/_record'], resolve),
// meta: {title: '考勤记录'}, // meta: {title: '考勤记录'},
// }, // },
// { // {
// path: '/attendance/application', // path: '/attendance/application',
// name: "Attendance_application", // name: "Attendance_application",
// title: "申请记录", // title: "申请记录",
// hide: false, // hide: false,
// component: resolve => require(['@/views/Basic/Attendance/application'], resolve), // component: resolve => require(['@/views/Basic/Attendance/application'], resolve),
// meta: {title: '申请记录'}, // meta: {title: '申请记录'},
// }, // },
// { // {
// path: '/attendance/attendanceteam', // path: '/attendance/attendanceteam',
// name: "Attendance_attendanceteam", // name: "Attendance_attendanceteam",
// title: "考勤小组", // title: "考勤小组",
// hide: false, // hide: false,
// component: resolve => require(['@/views/Basic/Attendance/_attendanceteam'], resolve), // component: resolve => require(['@/views/Basic/Attendance/_attendanceteam'], resolve),
// meta: {title: '考勤小组'}, // meta: {title: '考勤小组'},
// }, // },
// { // {
// path: '/attendance/scheduling', // path: '/attendance/scheduling',
// name: "Attendance_scheduling", // name: "Attendance_scheduling",
// title: "排班计划", // title: "排班计划",
// hide: false, // hide: false,
// component: resolve => require(['@/views/Basic/Attendance/_scheduling'], resolve), // component: resolve => require(['@/views/Basic/Attendance/_scheduling'], resolve),
// meta: {title: '排班计划'}, // meta: {title: '排班计划'},
// }, // },
// ] // ]
// } // }
] ]

@ -11,7 +11,7 @@ import Router from "vue-router"
const originalPush = Router.prototype.push const originalPush = Router.prototype.push
Router.prototype.push = function push(location) { Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err) return originalPush.call(this, location).catch(err => err)
} }
Vue.use(Router); Vue.use(Router);
@ -23,36 +23,36 @@ import basic from "./basic" // 基础功能
import setting from "./setting" // 设置 import setting from "./setting" // 设置
const router = [ const router = [
{ {
path: "/", path: "/",
name: "basic", name: "basic",
title: "基础", title: "基础",
component: Layout, component: Layout,
redirect: '/Console', redirect: '/Console',
meta: {title: '首页'}, meta: {title: '首页'},
children: [ children: [
...basic, ...basic,
] ]
}, },
{ {
path: "/setting", path: "/setting",
name: "setting", name: "setting",
title: "设置", title: "设置",
component: Layout, component: Layout,
redirect: '/basicSet', redirect: '/basicSet',
meta: {title: '设置'}, meta: {title: '设置'},
children: [ children: [
...setting, ...setting,
] ]
}, },
{ {
path: "/login", path: "/login",
name: "Login", name: "Login",
title: "登录", title: "登录",
component: resolve => require(['@/views/Login'], resolve) component: resolve => require(['@/views/Login'], resolve)
} }
] ]
export default new Router({ export default new Router({
routes: router routes: router
}) })

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

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

@ -7,15 +7,15 @@
* @FilePath: /ansu-business/src/store/getters.js * @FilePath: /ansu-business/src/store/getters.js
*/ */
const getters = { const getters = {
getSelectedKeys(state) { getSelectedKeys(state) {
return state.selectedKeys return state.selectedKeys
}, },
getOpenKeys(state) { getOpenKeys(state) {
return state.openKeys return state.openKeys
}, },
getToken(state) { getToken(state) {
return state.token return state.token
}, },
} }
export default getters export default getters

@ -14,10 +14,10 @@ import actions from "./actions";
import mutations from "./mutations"; import mutations from "./mutations";
import getters from "./getters"; import getters from "./getters";
import state from "./state"; import state from "./state";
const store = new Vuex.Store({ const store = new Vuex.Store({
state, state,
actions, actions,
mutations, mutations,
getters getters
}) })
export default store export default store

@ -7,20 +7,20 @@
* @FilePath: /ansu-business/src/store/mutations.js * @FilePath: /ansu-business/src/store/mutations.js
*/ */
const mutations = { const mutations = {
setSelectedKeys: (state, log) => { setSelectedKeys: (state, log) => {
state.selectedKeys = log; state.selectedKeys = log;
let str = JSON.stringify(log); let str = JSON.stringify(log);
sessionStorage.setItem('selectedKeys', str); sessionStorage.setItem('selectedKeys', str);
}, },
setOpenKeys: (state, log) => { setOpenKeys: (state, log) => {
state.openKeys = log; state.openKeys = log;
let str = JSON.stringify(log); let str = JSON.stringify(log);
sessionStorage.setItem('openKeys', str); sessionStorage.setItem('openKeys', str);
}, },
setToken: (state, log) => { setToken: (state, log) => {
state.token = log; state.token = log;
sessionStorage.setItem('token', log); sessionStorage.setItem('token', log);
}, },
} }
export default mutations export default mutations

@ -7,8 +7,8 @@
* @FilePath: /ansu-business/src/store/state.js * @FilePath: /ansu-business/src/store/state.js
*/ */
const state = { const state = {
selectedKeys: JSON.parse(sessionStorage.getItem('selectedKeys')) || ['/'], selectedKeys: JSON.parse(sessionStorage.getItem('selectedKeys')) || ['/'],
openKeys: JSON.parse(sessionStorage.getItem('openKeys')) || [], openKeys: JSON.parse(sessionStorage.getItem('openKeys')) || [],
token: sessionStorage.getItem('token') || "" token: sessionStorage.getItem('token') || ""
} }
export default state export default state

@ -1,31 +1,32 @@
export default { export default {
install: function (Vue) { install: function (Vue) {
Vue.prototype.ImgUrl = (src) => { Vue.prototype.$upload = process.env.VUE_APP_URL + 'user/upload/uploadTestMinioImg'
return process.env.VUE_APP_CDN + src Vue.prototype.ImgUrl = (src) => {
} return process.env.VUE_APP_STATIC + src
Vue.prototype.formatDate = (time, fmt) => { }
if (time > 0) { Vue.prototype.formatDate = (time, fmt) => {
let date = new Date(time * 1000) if (time > 0) {
if (/(y+)/.test(fmt)) { let date = new Date(time * 1000)
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length)) if (/(y+)/.test(fmt)) {
} fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
let o = { }
'M+': date.getMonth() + 1, let o = {
'd+': date.getDate(), 'M+': date.getMonth() + 1,
'h+': date.getHours(), 'd+': date.getDate(),
'm+': date.getMinutes(), 'h+': date.getHours(),
's+': date.getSeconds() 'm+': date.getMinutes(),
} 's+': date.getSeconds()
for (let k in o) { }
if (new RegExp(`(${k})`).test(fmt)) { for (let k in o) {
let str = o[k] + '' if (new RegExp(`(${k})`).test(fmt)) {
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : ('00' + str).substr(str.length)) let str = o[k] + ''
} fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : ('00' + str).substr(str.length))
} }
return fmt }
} else { return fmt
return '' } else {
} return ''
} }
} }
}
} }

@ -14,7 +14,7 @@
<script> <script>
export default { export default {
name: "Billing_details" name: "Billing_details"
} }
</script> </script>

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

@ -208,166 +208,166 @@
import { insertManageUser,departmentList,uploadManageUserIdCard } from "@/api/basic/department"; import { insertManageUser,departmentList,uploadManageUserIdCard } from "@/api/basic/department";
import store from "@/store"; import store from "@/store";
function getBase64(file) { function getBase64(file) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const reader = new FileReader(); const reader = new FileReader();
reader.readAsDataURL(file); reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result); reader.onload = () => resolve(reader.result);
reader.onerror = (error) => reject(error); reader.onerror = (error) => reject(error);
}); });
} }
export default { export default {
name: "Vueform", name: "Vueform",
props: { props: {
type: { type: {
type: String, type: String,
default: "add", default: "add",
}, },
}, },
watch: { watch: {
type: { type: {
handler(val) { handler(val) {
if (val === "edit") { if (val === "edit") {
console.log(1); console.log(1);
} }
}, },
immediate: true, immediate: true,
}, },
}, },
data() { data() {
return { return {
previewVisible: false, previewVisible: false,
previewImage: "", previewImage: "",
treeData:[], treeData:[],
cascVal:[], cascVal:[],
uploadHeaders: { uploadHeaders: {
"manage-login-token": store.getters.getToken, "manage-login-token": store.getters.getToken,
'Content-Type': 'multipart/form-data' 'Content-Type': 'multipart/form-data'
}, },
sexOption: [ sexOption: [
{ {
id: 1, id: 1,
name: "男", name: "男",
}, },
{ {
id: 2, id: 2,
name: "女", name: "女",
}, },
{ {
id: 3, id: 3,
name: "保密", name: "保密",
}, },
], ],
form: { form: {
actualName: "", actualName: "",
sex: null, sex: null,
idCard: "", idCard: "",
tel: "", tel: "",
birthday: "", birthday: "",
password: "", password: "",
email: "", email: "",
address: "", address: "",
idCardImgUrls: "", idCardImgUrls: "",
departmentId: "", departmentId: "",
departmentIdPath: "", departmentIdPath: "",
positionId: "", positionId: "",
entryDate: "", entryDate: "",
salary: "", salary: "",
dataImgUrls: "", dataImgUrls: "",
emergencyContact: "", emergencyContact: "",
emergencyContactNumber: "", emergencyContactNumber: "",
emergencyContactAddress: "", emergencyContactAddress: "",
maritalStatus: "", maritalStatus: "",
nation: "", nation: "",
politicalOutlook: "", politicalOutlook: "",
accountType: "", accountType: "",
remake: "", remake: "",
}, },
rules: { rules: {
actualName: [ actualName: [
{ required: true, message: "请输入真实姓名", trigger: "blur" }, { required: true, message: "请输入真实姓名", trigger: "blur" },
], ],
sex: [{ required: true, message: "请选择性别", trigger: "change" }], sex: [{ required: true, message: "请选择性别", trigger: "change" }],
idCard: [ idCard: [
{ required: true, message: "请输入身份证号", trigger: "blur" }, { required: true, message: "请输入身份证号", trigger: "blur" },
], ],
tel: [ tel: [
{ required: true, message: "请输入手机号", trigger: "blur" }, { required: true, message: "请输入手机号", trigger: "blur" },
{ min: 11, max: 11, message: "手机号只能为11位", trigger: "blur" }, { min: 11, max: 11, message: "手机号只能为11位", trigger: "blur" },
], ],
entryDate: [ entryDate: [
{ required: true, message: "请选择入职时间", trigger: "change" }, { required: true, message: "请选择入职时间", trigger: "change" },
], ],
}, },
fileList: [], fileList: [],
}; };
}, },
created() { created() {
this.getData() this.getData()
}, },
methods: { methods: {
getData(){ getData(){
departmentList().then((res) => { departmentList().then((res) => {
this.treeData = res.data; this.treeData = res.data;
}); });
}, },
// //
submit() { submit() {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (!valid) { if (!valid) {
return; return;
} }
if (this.type === "add") { if (this.type === "add") {
insertManageUser(this.form).then((res) => { insertManageUser(this.form).then((res) => {
if(res.code===200){ if(res.code===200){
this.$message.success(res.msg) this.$message.success(res.msg)
this.success() this.success()
this.close() this.close()
} }
}); });
} else { } else {
console.log(1); console.log(1);
} }
}); });
}, },
// //
close() { close() {
this.$refs.ruleForm.resetFields(); this.$refs.ruleForm.resetFields();
this.cascVal=[] this.cascVal=[]
}, },
success(){ success(){
this.$emit('success') this.$emit('success')
}, },
async handlePreview(file) { async handlePreview(file) {
if (!file.url && !file.preview) { if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj); file.preview = await getBase64(file.originFileObj);
} }
this.previewImage = file.url || file.preview; this.previewImage = file.url || file.preview;
this.previewVisible = true; this.previewVisible = true;
}, },
onChange(data) { onChange(data) {
// data [1,2,2] // data [1,2,2]
// yyyy-mm-dd hh:mm:ss // yyyy-mm-dd hh:mm:ss
let _data = JSON.parse(JSON.stringify(data)) let _data = JSON.parse(JSON.stringify(data))
this.form.positionId = _data.pop() //2 this.form.positionId = _data.pop() //2
this.form.departmentId = _data[_data.length-1] //[1,2]==>2 this.form.departmentId = _data[_data.length-1] //[1,2]==>2
let str = '' let str = ''
// 1:2: // 1:2:
for (let i = 0; i < _data.length; i++) { for (let i = 0; i < _data.length; i++) {
str += _data[i]+':' str += _data[i]+':'
} }
// 0:1:2: // 0:1:2:
this.form.departmentIdPath = '0:'+ str this.form.departmentIdPath = '0:'+ str
}, },
handleCancel() { handleCancel() {
this.previewVisible = false; this.previewVisible = false;
}, },
handleChange({ fileList }) { handleChange({ fileList }) {
this.fileList = fileList; this.fileList = fileList;
}, },
u1pload(){ u1pload(){
uploadManageUserIdCard().then((res) => {console.log(res);}) uploadManageUserIdCard().then((res) => {console.log(res);})
} }
}, },
}; };
</script> </script>

@ -49,99 +49,99 @@
import {columns,pagination,searchForm} from './config.js' import {columns,pagination,searchForm} from './config.js'
import { rolelist,FindAllMenus } from "@/api/basic/role"; import { rolelist,FindAllMenus } from "@/api/basic/role";
export default { export default {
data() { data() {
return { return {
tableChoosed: [], tableChoosed: [],
roleList: [], roleList: [],
// //
pagination: pagination, pagination: pagination,
// //
columns: columns, columns: columns,
searchForm:searchForm, searchForm:searchForm,
expandedKeys: [], expandedKeys: [],
replaceFields: { replaceFields: {
children: 'childrenList', children: 'childrenList',
title: 'name', title: 'name',
key: 'id', key: 'id',
}, },
autoExpandParent: true, autoExpandParent: true,
checkedKeys: [], checkedKeys: [],
selectedKeys: [], selectedKeys: [],
// //
tableData: [], tableData: [],
ActionsList: [ ], ActionsList: [ ],
menus:[] menus:[]
}; };
}, },
mounted() { mounted() {
this.getData(); this.getData();
}, },
methods: { methods: {
getData() { getData() {
rolelist().then((res) => { rolelist().then((res) => {
this.roleList = res.data; this.roleList = res.data;
}); });
}, },
rolechange(data){ rolechange(data){
if(data){ if(data){
this.searchForm.roleId = this.roleList[data].id this.searchForm.roleId = this.roleList[data].id
FindAllMenus({roleId:this.searchForm.roleId}).then(res=>{ FindAllMenus({roleId:this.searchForm.roleId}).then(res=>{
this.menus = res.data this.menus = res.data
}) })
}else{ }else{
this.searchForm.roleId = null this.searchForm.roleId = null
} }
}, },
onExpand(expandedKeys) { onExpand(expandedKeys) {
console.log('onExpand', expandedKeys); console.log('onExpand', expandedKeys);
// if not set autoExpandParent to false, if children expanded, parent can not collapse. // if not set autoExpandParent to false, if children expanded, parent can not collapse.
// or, you can remove all expanded children keys. // or, you can remove all expanded children keys.
this.expandedKeys = expandedKeys; this.expandedKeys = expandedKeys;
this.autoExpandParent = false; this.autoExpandParent = false;
}, },
onCheck(checkedKeys) { onCheck(checkedKeys) {
console.log('onCheck', checkedKeys); console.log('onCheck', checkedKeys);
this.checkedKeys = checkedKeys; this.checkedKeys = checkedKeys;
}, },
onSelect(selectedKeys, info) { onSelect(selectedKeys, info) {
console.log('onSelect', info); console.log('onSelect', info);
this.selectedKeys = selectedKeys; this.selectedKeys = selectedKeys;
}, },
reset(){ reset(){
this.searchForm.keyword ='' this.searchForm.keyword =''
}, },
handleTableChange(pagination) { handleTableChange(pagination) {
console.log(pagination); console.log(pagination);
const pager = { ...this.pagination }; const pager = { ...this.pagination };
pager.current = pagination.current; pager.current = pagination.current;
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
}, },
del(data) { del(data) {
this.$confirm({ this.$confirm({
title: "是否删除", title: "是否删除",
// okText:'', // okText:'',
// cancelText:'', // cancelText:'',
icon: "", icon: "",
onOk: function () { onOk: function () {
console.log(data); console.log(data);
}, },
}); });
}, },
Actions(data) { Actions(data) {
console.log(data); console.log(data);
}, },
selectionChoosed(data) { selectionChoosed(data) {
console.log(data); console.log(data);
this.tableChoosed = data; this.tableChoosed = data;
}, },
}, },
// watch:{ // watch:{
// checkedKeys(val) { // checkedKeys(val) {
// console.log('onCheck', val); // console.log('onCheck', val);
// }, // },
// } // }
}; };
</script> </script>

@ -49,99 +49,99 @@
import {columns,pagination,searchForm} from './config.js' import {columns,pagination,searchForm} from './config.js'
import { rolelist,FindAllMenus } from "@/api/basic/role"; import { rolelist,FindAllMenus } from "@/api/basic/role";
export default { export default {
data() { data() {
return { return {
tableChoosed: [], tableChoosed: [],
roleList: [], roleList: [],
// //
pagination: pagination, pagination: pagination,
// //
columns: columns, columns: columns,
searchForm:searchForm, searchForm:searchForm,
expandedKeys: [], expandedKeys: [],
replaceFields: { replaceFields: {
children: 'childrenList', children: 'childrenList',
title: 'name', title: 'name',
key: 'id', key: 'id',
}, },
autoExpandParent: true, autoExpandParent: true,
checkedKeys: [], checkedKeys: [],
selectedKeys: [], selectedKeys: [],
// //
tableData: [], tableData: [],
ActionsList: [ ], ActionsList: [ ],
menus:[] menus:[]
}; };
}, },
mounted() { mounted() {
this.getData(); this.getData();
}, },
methods: { methods: {
getData() { getData() {
rolelist().then((res) => { rolelist().then((res) => {
this.roleList = res.data; this.roleList = res.data;
}); });
}, },
rolechange(data){ rolechange(data){
if(data){ if(data){
this.searchForm.roleId = this.roleList[data].id this.searchForm.roleId = this.roleList[data].id
FindAllMenus({roleId:this.searchForm.roleId}).then(res=>{ FindAllMenus({roleId:this.searchForm.roleId}).then(res=>{
this.menus = res.data this.menus = res.data
}) })
}else{ }else{
this.searchForm.roleId = null this.searchForm.roleId = null
} }
}, },
onExpand(expandedKeys) { onExpand(expandedKeys) {
console.log('onExpand', expandedKeys); console.log('onExpand', expandedKeys);
// if not set autoExpandParent to false, if children expanded, parent can not collapse. // if not set autoExpandParent to false, if children expanded, parent can not collapse.
// or, you can remove all expanded children keys. // or, you can remove all expanded children keys.
this.expandedKeys = expandedKeys; this.expandedKeys = expandedKeys;
this.autoExpandParent = false; this.autoExpandParent = false;
}, },
onCheck(checkedKeys) { onCheck(checkedKeys) {
console.log('onCheck', checkedKeys); console.log('onCheck', checkedKeys);
this.checkedKeys = checkedKeys; this.checkedKeys = checkedKeys;
}, },
onSelect(selectedKeys, info) { onSelect(selectedKeys, info) {
console.log('onSelect', info); console.log('onSelect', info);
this.selectedKeys = selectedKeys; this.selectedKeys = selectedKeys;
}, },
reset(){ reset(){
this.searchForm.keyword ='' this.searchForm.keyword =''
}, },
handleTableChange(pagination) { handleTableChange(pagination) {
console.log(pagination); console.log(pagination);
const pager = { ...this.pagination }; const pager = { ...this.pagination };
pager.current = pagination.current; pager.current = pagination.current;
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
}, },
del(data) { del(data) {
this.$confirm({ this.$confirm({
title: "是否删除", title: "是否删除",
// okText:'', // okText:'',
// cancelText:'', // cancelText:'',
icon: "", icon: "",
onOk: function () { onOk: function () {
console.log(data); console.log(data);
}, },
}); });
}, },
Actions(data) { Actions(data) {
console.log(data); console.log(data);
}, },
selectionChoosed(data) { selectionChoosed(data) {
console.log(data); console.log(data);
this.tableChoosed = data; this.tableChoosed = data;
}, },
}, },
watch:{ watch:{
checkedKeys(val) { checkedKeys(val) {
console.log('onCheck', val); console.log('onCheck', val);
}, },
} }
}; };
</script> </script>

@ -62,82 +62,82 @@ import {columns,pagination,searchForm} from './component/config.js'
import { rolelist,listByRole } from "@/api/basic/role"; import { rolelist,listByRole } from "@/api/basic/role";
import rolePermissions from './component/permissions.vue' import rolePermissions from './component/permissions.vue'
export default { export default {
components:{ components:{
rolePermissions rolePermissions
}, },
data() { data() {
return { return {
tableChoosed: [], tableChoosed: [],
roleList: [], roleList: [],
// //
pagination: pagination, pagination: pagination,
// //
columns: columns, columns: columns,
searchForm:searchForm, searchForm:searchForm,
// //
tableData: [], tableData: [],
ActionsList: [ ActionsList: [
], ],
}; };
}, },
mounted() { mounted() {
this.getData(); this.getData();
this.getPeople() this.getPeople()
}, },
methods: { methods: {
getData() { getData() {
rolelist().then((res) => { rolelist().then((res) => {
this.roleList = res.data; this.roleList = res.data;
}); });
}, },
getPeople(){ getPeople(){
listByRole({ listByRole({
pageNum:this.pagination.current, pageNum:this.pagination.current,
size:this.pagination.pageSize, size:this.pagination.pageSize,
roleId:this.searchForm.roleId, roleId:this.searchForm.roleId,
keyword:this.searchForm.keyword, keyword:this.searchForm.keyword,
}).then((res) => { }).then((res) => {
this.tableData = res.data.rows; this.tableData = res.data.rows;
}); });
}, },
rolechange(data){ rolechange(data){
if(data){ if(data){
this.searchForm.roleId = this.roleList[data].id this.searchForm.roleId = this.roleList[data].id
}else{ }else{
this.searchForm.roleId = null this.searchForm.roleId = null
} }
this.getPeople(); this.getPeople();
}, },
reset(){ reset(){
this.searchForm.keyword ='' this.searchForm.keyword =''
this.getPeople() this.getPeople()
}, },
handleTableChange(pagination) { handleTableChange(pagination) {
console.log(pagination); console.log(pagination);
const pager = { ...this.pagination }; const pager = { ...this.pagination };
pager.current = pagination.current; pager.current = pagination.current;
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
}, },
del(data) { del(data) {
this.$confirm({ this.$confirm({
title: "是否删除", title: "是否删除",
// okText:'', // okText:'',
// cancelText:'', // cancelText:'',
icon: "", icon: "",
onOk: function () { onOk: function () {
console.log(data); console.log(data);
}, },
}); });
}, },
Actions(data) { Actions(data) {
console.log(data); console.log(data);
}, },
selectionChoosed(data) { selectionChoosed(data) {
console.log(data); console.log(data);
this.tableChoosed = data; this.tableChoosed = data;
}, },
}, },
}; };
</script> </script>

@ -14,7 +14,7 @@
<script> <script>
export default { export default {
name: "Console" name: "Console"
} }
</script> </script>

@ -3,52 +3,52 @@
* 表格列 * 表格列
*/ */
export const columns = [ export const columns = [
{ {
title: "真实名称", title: "真实名称",
dataIndex: "actualName", dataIndex: "actualName",
width: "16%", width: "16%",
}, },
{ {
title: "手机号", title: "手机号",
dataIndex: "tel", dataIndex: "tel",
width: "16%", width: "16%",
}, },
{ {
title: "所属部门", title: "所属部门",
dataIndex: "departmentName", dataIndex: "departmentName",
width: "16%", width: "16%",
}, },
{ {
title: "岗位", title: "岗位",
dataIndex: "positionName", dataIndex: "positionName",
width: "16%", width: "16%",
}, },
{ {
title: "备注", title: "备注",
dataIndex: "remake", dataIndex: "remake",
width: "300", width: "300",
}, },
{ {
title: "操作", title: "操作",
dataIndex: "action", dataIndex: "action",
key: "action", key: "action",
width: "180", width: "180",
fixed: "right", fixed: "right",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
] ]
// 搜索项 // 搜索项
export const searchForm = { export const searchForm = {
keyword: "", keyword: "",
departmentId: null, departmentId: null,
positionId: null, positionId: null,
} }
// 分页 // 分页
export const pagination = { export const pagination = {
current: 1, current: 1,
total: 0, total: 0,
pageSize: 10, pageSize: 10,
showTotal: (total) => `${total}`, showTotal: (total) => `${total}`,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
} }

@ -69,7 +69,7 @@
</a-col> </a-col>
身份证照片 身份证照片
<a-upload <a-upload
:action="`${$baseUrl}/user/upload/uploadManageUserIdCard`" :action="`${$upload}`"
:headers="uploadHeaders" :headers="uploadHeaders"
list-type="picture-card" list-type="picture-card"
:file-list="fileList" :file-list="fileList"
@ -208,212 +208,212 @@
import { insertManageUser,departmentList,uploadManageUserIdCard,manageUserInfo,EditManageUser } from "@/api/basic/department"; import { insertManageUser,departmentList,uploadManageUserIdCard,manageUserInfo,EditManageUser } from "@/api/basic/department";
import store from "@/store"; import store from "@/store";
function getBase64(file) { function getBase64(file) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const reader = new FileReader(); const reader = new FileReader();
reader.readAsDataURL(file); reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result); reader.onload = () => resolve(reader.result);
reader.onerror = (error) => reject(error); reader.onerror = (error) => reject(error);
}); });
} }
export default { export default {
name: "Vueform", name: "Vueform",
props: { props: {
type: { type: {
type: String, type: String,
default:'add' default:'add'
}, },
editId:Number, editId:Number,
}, },
watch: { watch: {
editId: { editId: {
handler(val) { handler(val) {
if(val === null){ if(val === null){
return return
} }
this.form.id =val; this.form.id =val;
manageUserInfo({id:this.form.id}).then(res=>{ manageUserInfo({id:this.form.id}).then(res=>{
let data = res.data let data = res.data
this.form.actualName = data.actualName this.form.actualName = data.actualName
this.form.sex = data.sex this.form.sex = data.sex
this.form.idCard = data.idCard this.form.idCard = data.idCard
this.form.tel = data.tel this.form.tel = data.tel
this.telephoneNum = data.tel this.telephoneNum = data.tel
// this.form.birthday = this.formatDate(data.birthday/1000,'yyyy-MM-dd hh:mm:ss') // this.form.birthday = this.formatDate(data.birthday/1000,'yyyy-MM-dd hh:mm:ss')
this.form.password = data.password this.form.password = data.password
this.form.email = data.email this.form.email = data.email
this.form.address = data.address this.form.address = data.address
this.form.idCardImgUrls = data.idCardImgUrls this.form.idCardImgUrls = data.idCardImgUrls
// this.form.entryDate = this.formatDate(data.entryDate/1000,'yyyy-MM-dd hh:mm:ss') // this.form.entryDate = this.formatDate(data.entryDate/1000,'yyyy-MM-dd hh:mm:ss')
this.form.salary = data.salary this.form.salary = data.salary
this.form.emergencyContact = data.emergencyContact this.form.emergencyContact = data.emergencyContact
this.form.emergencyContactNumber = data.emergencyContactNumber this.form.emergencyContactNumber = data.emergencyContactNumber
this.form.emergencyContactAddress = data.emergencyContactAddress this.form.emergencyContactAddress = data.emergencyContactAddress
this.form.maritalStatus = data.maritalStatus this.form.maritalStatus = data.maritalStatus
this.form.nation = data.nation this.form.nation = data.nation
this.form.politicalOutlook = data.politicalOutlook this.form.politicalOutlook = data.politicalOutlook
this.form.accountType = data.accountType this.form.accountType = data.accountType
this.form.remake = data.remake this.form.remake = data.remake
// //
this.cascVal = [] this.cascVal = []
let path = data.departmentIdPath.split(':') let path = data.departmentIdPath.split(':')
path.pop() path.pop()
path.splice(0,1) path.splice(0,1)
path.push(data.positionId) path.push(data.positionId)
path.forEach(element => { path.forEach(element => {
this.cascVal.push(Number(element)) this.cascVal.push(Number(element))
}); });
// //
}) })
}, },
immediate: true, immediate: true,
}, },
}, },
data() { data() {
return { return {
previewVisible: false, previewVisible: false,
previewImage: "", previewImage: "",
treeData:[], treeData:[],
cascVal:[], cascVal:[],
telephoneNum:"", telephoneNum:"",
uploadHeaders: { uploadHeaders: {
"manage-login-token": store.getters.getToken, "manage-login-token": store.getters.getToken,
'Content-Type': 'multipart/form-data' 'Content-Type': 'multipart/form-data'
}, },
sexOption: [ sexOption: [
{ {
id: 1, id: 1,
name: "男", name: "男",
}, },
{ {
id: 2, id: 2,
name: "女", name: "女",
}, },
{ {
id: 3, id: 3,
name: "保密", name: "保密",
}, },
], ],
form: { form: {
id:null, id:null,
actualName: "", actualName: "",
sex: null, sex: null,
idCard: "", idCard: "",
tel: "", tel: "",
birthday: "", birthday: "",
password: "", password: "",
email: "", email: "",
address: "", address: "",
idCardImgUrls: "", idCardImgUrls: "",
departmentId: "", departmentId: "",
departmentIdPath: "", departmentIdPath: "",
positionId: "", positionId: "",
entryDate: "", entryDate: "",
salary: "", salary: "",
dataImgUrls: "", dataImgUrls: "",
emergencyContact: "", emergencyContact: "",
emergencyContactNumber: "", emergencyContactNumber: "",
emergencyContactAddress: "", emergencyContactAddress: "",
maritalStatus: "", maritalStatus: "",
nation: "", nation: "",
politicalOutlook: "", politicalOutlook: "",
accountType: "", accountType: "",
remake: "", remake: "",
}, },
rules: { rules: {
actualName: [ actualName: [
{ required: true, message: "请输入真实姓名", trigger: "blur" }, { required: true, message: "请输入真实姓名", trigger: "blur" },
], ],
sex: [{ required: true, message: "请选择性别", trigger: "change" }], sex: [{ required: true, message: "请选择性别", trigger: "change" }],
idCard: [ idCard: [
{ required: true, message: "请输入身份证号", trigger: "blur" }, { required: true, message: "请输入身份证号", trigger: "blur" },
], ],
tel: [ tel: [
{ required: true, message: "请输入手机号", trigger: "blur" }, { required: true, message: "请输入手机号", trigger: "blur" },
{ min: 11, max: 11, message: "手机号只能为11位", trigger: "blur" }, { min: 11, max: 11, message: "手机号只能为11位", trigger: "blur" },
], ],
entryDate: [ entryDate: [
{ required: true, message: "请选择入职时间", trigger: "change" }, { required: true, message: "请选择入职时间", trigger: "change" },
], ],
}, },
fileList: [], fileList: [],
}; };
}, },
created() { created() {
this.getData() this.getData()
}, },
methods: { methods: {
getData(){ getData(){
departmentList().then((res) => { departmentList().then((res) => {
this.treeData = res.data; this.treeData = res.data;
}); });
}, },
// //
submit() { submit() {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (!valid) { if (!valid) {
return; return;
} }
if (this.type === "add") { if (this.type === "add") {
insertManageUser(this.form).then((res) => { insertManageUser(this.form).then((res) => {
if(res.code===200){ if(res.code===200){
this.$message.success(res.msg) this.$message.success(res.msg)
this.success() this.success()
this.close() this.close()
} }
}); });
} else { } else {
if(this.form.tel === this.telephoneNum){ if(this.form.tel === this.telephoneNum){
this.form.tel = null this.form.tel = null
} }
EditManageUser(this.form).then((res) => { EditManageUser(this.form).then((res) => {
if(res.code===200){ if(res.code===200){
this.$message.success(res.msg) this.$message.success(res.msg)
this.success() this.success()
this.close() this.close()
} }
}); });
} }
}); });
}, },
// //
close() { close() {
this.$refs.ruleForm.resetFields(); this.$refs.ruleForm.resetFields();
this.cascVal=[] this.cascVal=[]
}, },
success(){ success(){
this.$emit('success') this.$emit('success')
}, },
async handlePreview(file) { async handlePreview(file) {
if (!file.url && !file.preview) { if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj); file.preview = await getBase64(file.originFileObj);
} }
this.previewImage = file.url || file.preview; this.previewImage = file.url || file.preview;
this.previewVisible = true; this.previewVisible = true;
}, },
onChange(data) { onChange(data) {
// data [1,2,2] // data [1,2,2]
// yyyy-mm-dd hh:mm:ss // yyyy-mm-dd hh:mm:ss
let _data = JSON.parse(JSON.stringify(data)) let _data = JSON.parse(JSON.stringify(data))
this.form.positionId = _data.pop() //2 this.form.positionId = _data.pop() //2
this.form.departmentId = _data[_data.length-1] //[1,2]==>2 this.form.departmentId = _data[_data.length-1] //[1,2]==>2
let str = '' let str = ''
// 1:2: // 1:2:
for (let i = 0; i < _data.length; i++) { for (let i = 0; i < _data.length; i++) {
str += _data[i]+':' str += _data[i]+':'
} }
// 0:1:2: // 0:1:2:
this.form.departmentIdPath = '0:'+ str this.form.departmentIdPath = '0:'+ str
}, },
handleCancel() { handleCancel() {
this.previewVisible = false; this.previewVisible = false;
}, },
handleChange({ fileList }) { handleChange({ fileList }) {
this.fileList = fileList; this.fileList = fileList;
}, },
u1pload(){ u1pload(){
uploadManageUserIdCard().then((res) => {console.log(res);}) uploadManageUserIdCard().then((res) => {console.log(res);})
} }
}, },
}; };
</script> </script>

@ -204,357 +204,357 @@
import { columns, pagination, searchForm } from "./component/config.js"; import { columns, pagination, searchForm } from "./component/config.js";
import vueForm from "./component/form.vue"; import vueForm from "./component/form.vue";
import { import {
departmentList, departmentList,
departmentInsert, departmentInsert,
departmentUpdate, departmentUpdate,
departmentDel, departmentDel,
findToUser, findToUser,
rePassword rePassword
} from "@/api/basic/department"; } from "@/api/basic/department";
export default { export default {
components: { components: {
vueForm, vueForm,
}, },
data() { data() {
return { return {
columns: columns, columns: columns,
pagination: pagination, pagination: pagination,
searchForm: searchForm, searchForm: searchForm,
searchStr: "", searchStr: "",
searchValue: "", searchValue: "",
rules: { rules: {
type: [{ required: true, message: "请选择类型", trigger: "change" }], type: [{ required: true, message: "请选择类型", trigger: "change" }],
name: [{ required: true, message: "请输入名称", trigger: "blur" }], name: [{ required: true, message: "请输入名称", trigger: "blur" }],
}, },
cascVal: [], cascVal: [],
typeOption: [ typeOption: [
{ {
id: 1, id: 1,
name: "公司/部门", name: "公司/部门",
}, },
{ {
id: 2, id: 2,
name: "岗位", name: "岗位",
}, },
], ],
form: { form: {
parentId: 0, parentId: 0,
type: null, type: null,
name: "", name: "",
}, },
editId:null, editId:null,
password:{ password:{
id:null, id:null,
newPassword:'', newPassword:'',
confirmpsw:'' confirmpsw:''
}, },
choose: { choose: {
id: undefined, id: undefined,
}, },
show: { show: {
addStaffShow: false, addStaffShow: false,
addDepartment: false, addDepartment: false,
resetPswShow:false, resetPswShow:false,
addStaffTitle:'添加员工信息', addStaffTitle:'添加员工信息',
depepartmentTitle: "", depepartmentTitle: "",
}, },
expandedKeys: [], expandedKeys: [],
autoExpandParent: true, autoExpandParent: true,
backupsExpandedKeys: [], backupsExpandedKeys: [],
checkedKeys: [], checkedKeys: [],
selectedKeys: [], selectedKeys: [],
treeData: [], treeData: [],
// //
tableData: [], tableData: [],
// //
loading: false, loading: false,
selectedRowKeys: [], selectedRowKeys: [],
type: "add", type: "add",
}; };
}, },
mounted() { mounted() {
this.getData(); this.getData();
}, },
methods: { methods: {
getData() { getData() {
departmentList().then((res) => { departmentList().then((res) => {
this.treeData = res.data; this.treeData = res.data;
}); });
findToUser({ findToUser({
pageNum: this.pagination.current, pageNum: this.pagination.current,
size: this.pagination.pageSize, size: this.pagination.pageSize,
keyword:this.searchForm.keyword, keyword:this.searchForm.keyword,
departmentId:this.searchForm.departmentId, departmentId:this.searchForm.departmentId,
positionId:this.searchForm.positionId, positionId:this.searchForm.positionId,
}).then((res) => { }).then((res) => {
this.tableData = res.data.rows; this.tableData = res.data.rows;
}); });
}, },
openDepartment(type) { openDepartment(type) {
if (type === 1) { if (type === 1) {
this.show.depepartmentTitle = "新增组织架构"; this.show.depepartmentTitle = "新增组织架构";
this.show.addDepartment = true; this.show.addDepartment = true;
} else { } else {
if (this.choose.id !== undefined) { if (this.choose.id !== undefined) {
this.show.depepartmentTitle = "修改组织架构"; this.show.depepartmentTitle = "修改组织架构";
this.show.addDepartment = true; this.show.addDepartment = true;
this.form.id = this.choose.id; this.form.id = this.choose.id;
this.form.name = this.choose.name; this.form.name = this.choose.name;
this.form.type = this.choose.type; this.form.type = this.choose.type;
} else { } else {
this.$message.error("请选择组织架构"); this.$message.error("请选择组织架构");
} }
} }
}, },
edit(row){ edit(row){
this.show.addStaffShow = true; this.show.addStaffShow = true;
this.type = 'edit' this.type = 'edit'
this.editId = row.id this.editId = row.id
this.show.addStaffTitle = "修改员工信息" this.show.addStaffTitle = "修改员工信息"
}, },
// //
handleOk() { handleOk() {
if (this.depepartmentTitle === "新增组织架构") { if (this.depepartmentTitle === "新增组织架构") {
departmentInsert(this.form).then((res) => { departmentInsert(this.form).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success(res.msg); this.$message.success(res.msg);
this.getData(); this.getData();
this.handleCancel(); this.handleCancel();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
}); });
} else { } else {
departmentUpdate({ departmentUpdate({
id: this.form.id, id: this.form.id,
type: this.form.type, type: this.form.type,
name: this.form.name, name: this.form.name,
}).then((res) => { }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success(res.msg); this.$message.success(res.msg);
this.getData(); this.getData();
this.handleCancel(); this.handleCancel();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
}); });
} }
}, },
del() { del() {
if (this.choose.id === undefined) { if (this.choose.id === undefined) {
this.$message.error("请选择组织架构"); this.$message.error("请选择组织架构");
} else { } else {
this.$confirm({ this.$confirm({
title: "是否删除", title: "是否删除",
icon: "", icon: "",
onOk: () => { onOk: () => {
departmentDel({ id: this.choose.id, type: this.choose.type }).then( departmentDel({ id: this.choose.id, type: this.choose.type }).then(
(res) => { (res) => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success(res.msg); this.$message.success(res.msg);
this.getData(); this.getData();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
} }
); );
}, },
}); });
} }
}, },
handleCancel() { handleCancel() {
this.show.addDepartment = false; this.show.addDepartment = false;
this.$refs.ruleForm.resetFields(); this.$refs.ruleForm.resetFields();
this.cascVal = []; this.cascVal = [];
}, },
success() { success() {
this.addStaffClose(); this.addStaffClose();
this.getData(); this.getData();
}, },
reset(){ reset(){
this.searchForm.keyword='' this.searchForm.keyword=''
this.getData(); this.getData();
}, },
// //
addStaff() { addStaff() {
this.show.addStaffShow = true; this.show.addStaffShow = true;
}, },
addStaffSubmit() { addStaffSubmit() {
this.$refs.addform.submit(); this.$refs.addform.submit();
}, },
addStaffClose() { addStaffClose() {
this.$refs.addform.close(); this.$refs.addform.close();
this.show.addStaffShow = false; this.show.addStaffShow = false;
this.editId =null this.editId =null
}, },
resetPsw(id){ resetPsw(id){
this.show.resetPswShow = true this.show.resetPswShow = true
this.password.id = id this.password.id = id
}, },
rePswSubmit() { rePswSubmit() {
if(this.password.newPassword !== this.password.confirmpsw){ if(this.password.newPassword !== this.password.confirmpsw){
this.$message.error('两次输入密码不同') this.$message.error('两次输入密码不同')
return return
} }
rePassword(this.password).then(res=>{ rePassword(this.password).then(res=>{
if(res.code === 200){ if(res.code === 200){
this.$message.success(res.msg) this.$message.success(res.msg)
this.repswClose() this.repswClose()
}else{ }else{
this.$message.error(res.msg) this.$message.error(res.msg)
} }
}) })
}, },
repswClose(){ repswClose(){
this.show.resetPswShow = false this.show.resetPswShow = false
this.password = { this.password = {
id:null, id:null,
newPassword:'', newPassword:'',
confirmpsw:'' confirmpsw:''
} }
}, },
onExpand(expandedKeys) { onExpand(expandedKeys) {
this.expandedKeys = expandedKeys; this.expandedKeys = expandedKeys;
this.autoExpandParent = false; this.autoExpandParent = false;
}, },
onCheck(checkedKeys) { onCheck(checkedKeys) {
this.checkedKeys = checkedKeys; this.checkedKeys = checkedKeys;
}, },
onSelect(selectedKeys, info) { onSelect(selectedKeys, info) {
this.selectedKeys = selectedKeys; this.selectedKeys = selectedKeys;
this.searchForm.departmentId = null this.searchForm.departmentId = null
this.searchForm.positionId = null this.searchForm.positionId = null
if (info.selectedNodes.length !== 0) { if (info.selectedNodes.length !== 0) {
this.choose.id = info.selectedNodes[0].data.props.id; this.choose.id = info.selectedNodes[0].data.props.id;
this.choose.name = info.selectedNodes[0].data.props.name; this.choose.name = info.selectedNodes[0].data.props.name;
this.choose.type = info.selectedNodes[0].data.props.type; this.choose.type = info.selectedNodes[0].data.props.type;
if(this.choose.type === 1){ if(this.choose.type === 1){
this.searchForm.departmentId = this.choose.id this.searchForm.departmentId = this.choose.id
this.getData() this.getData()
}else if(this.choose.type === 2){ }else if(this.choose.type === 2){
this.searchForm.positionId = this.choose.id this.searchForm.positionId = this.choose.id
this.getData() this.getData()
} }
} else { } else {
this.choose = {}; this.choose = {};
this.getData() this.getData()
} }
}, },
detail() { detail() {
this.$router.push({ name: "settle_detail" }); this.$router.push({ name: "settle_detail" });
}, },
// selection // selection
onSelectChange(selectedRowKeys) { onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
}, },
handleTableChange(pagination) { handleTableChange(pagination) {
const pager = { ...this.pagination }; const pager = { ...this.pagination };
pager.current = pagination.current; pager.current = pagination.current;
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
this.getData(); this.getData();
}, },
// //
onChange(data) { onChange(data) {
let thatId = data.slice(-1); let thatId = data.slice(-1);
this.form.parentId = thatId[0]; this.form.parentId = thatId[0];
}, },
onSearch() { onSearch() {
var vm = this; var vm = this;
// //
vm.searchValue = vm.searchStr; vm.searchValue = vm.searchStr;
//expandedKeys //expandedKeys
//expandedKeys //expandedKeys
if (vm.searchValue === "") { if (vm.searchValue === "") {
vm.expandedKeys = []; vm.expandedKeys = [];
} else { } else {
// //
vm.expandedKeys = []; vm.expandedKeys = [];
vm.backupsExpandedKeys = []; vm.backupsExpandedKeys = [];
//searchValue //searchValue
let candidateKeysList = vm.getkeyList(vm.searchValue, vm.treeData, []); let candidateKeysList = vm.getkeyList(vm.searchValue, vm.treeData, []);
// //
candidateKeysList.map((item) => { candidateKeysList.map((item) => {
// //
var key = vm.getParentKey(item, vm.treeData); var key = vm.getParentKey(item, vm.treeData);
//itemkeyundefined //itemkeyundefined
// //
if (key && !vm.backupsExpandedKeys.some((item) => item === key)) if (key && !vm.backupsExpandedKeys.some((item) => item === key))
vm.backupsExpandedKeys.push(key); vm.backupsExpandedKeys.push(key);
}); });
let length = this.backupsExpandedKeys.length; let length = this.backupsExpandedKeys.length;
for (let i = 0; i < length; i++) { for (let i = 0; i < length; i++) {
vm.getAllParentKey(vm.backupsExpandedKeys[i], vm.treeData); vm.getAllParentKey(vm.backupsExpandedKeys[i], vm.treeData);
} }
vm.expandedKeys = vm.backupsExpandedKeys.slice(); vm.expandedKeys = vm.backupsExpandedKeys.slice();
} }
}, },
//valuekey //valuekey
getkeyList(value, tree, keyList) { getkeyList(value, tree, keyList) {
// //
for (let i = 0; i < tree.length; i++) { for (let i = 0; i < tree.length; i++) {
let node = tree[i]; let node = tree[i];
//valuepush //valuepush
if (node.name.indexOf(value) > -1) { if (node.name.indexOf(value) > -1) {
keyList.push(node.key); keyList.push(node.key);
} }
// //
if (node.childList) { if (node.childList) {
this.getkeyList(value, node.childList, keyList); this.getkeyList(value, node.childList, keyList);
} }
} }
// //
return keyList; return keyList;
}, },
//keykey //keykey
getParentKey(key, tree) { getParentKey(key, tree) {
let parentKey, temp; let parentKey, temp;
// //
for (let i = 0; i < tree.length; i++) { for (let i = 0; i < tree.length; i++) {
const node = tree[i]; const node = tree[i];
if (node.childList) { if (node.childList) {
//key //key
// //
if (node.childList.some((item) => item.key === key)) { if (node.childList.some((item) => item.key === key)) {
parentKey = node.key; parentKey = node.key;
} else if ((temp = this.getParentKey(key, node.childList))) { } else if ((temp = this.getParentKey(key, node.childList))) {
//parentKey = this.getParentKey(key,node.children) //parentKey = this.getParentKey(key,node.children)
// //
parentKey = temp; parentKey = temp;
} }
} }
} }
return parentKey; return parentKey;
}, },
// //
getAllParentKey(key, tree) { getAllParentKey(key, tree) {
var parentKey; var parentKey;
if (key) { if (key) {
// //
parentKey = this.getParentKey(key, tree); parentKey = this.getParentKey(key, tree);
if (parentKey) { if (parentKey) {
//push //push
if (!this.backupsExpandedKeys.some((item) => item === parentKey)) { if (!this.backupsExpandedKeys.some((item) => item === parentKey)) {
this.backupsExpandedKeys.push(parentKey); this.backupsExpandedKeys.push(parentKey);
} }
// //
this.getAllParentKey(parentKey, tree); this.getAllParentKey(parentKey, tree);
} }
} }
}, },
}, },
computed: { computed: {
hasSelected() { hasSelected() {
return this.selectedRowKeys.length > 0; return this.selectedRowKeys.length > 0;
}, },
}, },
watch: { watch: {
checkedKeys(val) { checkedKeys(val) {
console.log("onCheck", val); console.log("onCheck", val);
}, },
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

@ -2,54 +2,54 @@
* 配置 * 配置
* 表格列 * 表格列
*/ */
export const columns = [ export const columns = [
{ {
title: "楼栋名称", title: "楼栋名称",
dataIndex: "name", dataIndex: "name",
width: "20%", width: "20%",
}, },
{ {
title: "房屋总数", title: "房屋总数",
dataIndex: "estateTotals", dataIndex: "estateTotals",
width: "20%", width: "20%",
}, },
{ {
title: "租赁房屋数", title: "租赁房屋数",
dataIndex: "leaseEstateNums", dataIndex: "leaseEstateNums",
width: "20%" width: "20%"
}, },
{ {
title: "租赁率", title: "租赁率",
dataIndex: "leaseRate", dataIndex: "leaseRate",
width: "20%", width: "20%",
customRender:function(leaseRate){ customRender:function(leaseRate){
return leaseRate+'%' return leaseRate+'%'
} }
}, },
{ {
title: "入住率", title: "入住率",
dataIndex: "occupancyRate", dataIndex: "occupancyRate",
width: "20%", width: "20%",
customRender:function(occupancyRate){ customRender:function(occupancyRate){
return occupancyRate+'%' return occupancyRate+'%'
} }
}, },
{ {
title: "操作", title: "操作",
dataIndex: "action", dataIndex: "action",
key: "action", key: "action",
width: "180", width: "180",
fixed: "right", fixed: "right",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
] ]
// 搜索项 // 搜索项
export const searchForm = { export const searchForm = {
name: "", name: "",
} }
// 分页 // 分页
export const pagination = { export const pagination = {
current: 1, current: 1,
total: 0, total: 0,
pageSize: 10, pageSize: 10,
} }

@ -138,161 +138,161 @@
import { columns,pagination,searchForm} from "./component/config" import { columns,pagination,searchForm} from "./component/config"
import { buildingList } from "@/api/basic/estate" import { buildingList } from "@/api/basic/estate"
export default { export default {
data() { data() {
return { return {
drawerConfig:{ drawerConfig:{
addShow:false, addShow:false,
detailShow:false, detailShow:false,
title:'添加楼栋', title:'添加楼栋',
editNow:false, editNow:false,
}, },
addUnitShow:false, addUnitShow:false,
form:{ form:{
name:'' name:''
}, },
rules:{ rules:{
name:[{required:true,message:'请输入楼栋',trigger:'blur'}], name:[{required:true,message:'请输入楼栋',trigger:'blur'}],
fileList:[{required:true}] fileList:[{required:true}]
}, },
fileList: [ fileList: [
{ {
uid: '-1', uid: '-1',
name: 'xxx.png', name: 'xxx.png',
url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
}, },
{ {
uid: '-2', uid: '-2',
name: 'yyy.png', name: 'yyy.png',
status: 'done', status: 'done',
url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
thumbUrl: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png', thumbUrl: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
}, },
], ],
tableChoosed: [], tableChoosed: [],
// //
pagination: pagination, pagination: pagination,
// //
columns:columns, columns:columns,
searchForm:searchForm, searchForm:searchForm,
unitData:[], unitData:[],
unitColumns: [ unitColumns: [
{ {
title: "单元名称", title: "单元名称",
dataIndex: "name", dataIndex: "name",
width: "15%", width: "15%",
}, },
{ {
title: "楼层数", title: "楼层数",
dataIndex: "floor", dataIndex: "floor",
width: "15%", width: "15%",
}, },
{ {
title: "公共楼层数", title: "公共楼层数",
dataIndex: "publicFloor", dataIndex: "publicFloor",
width: "18%", width: "18%",
}, },
{ {
title: "是否有电梯", title: "是否有电梯",
dataIndex: "elevator", dataIndex: "elevator",
width: "18%", width: "18%",
customRender:function(elevator){ customRender:function(elevator){
switch (elevator) { switch (elevator) {
case 1: case 1:
return '有' return '有'
case 0: case 0:
return '无' return '无'
default: default:
break; break;
} }
} }
}, },
{ {
title: "操作", title: "操作",
dataIndex: "action", dataIndex: "action",
key: "action", key: "action",
width: "180", width: "180",
fixed: "right", fixed: "right",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
], ],
// //
tableData: [], tableData: [],
ActionsList: [ ActionsList: [
{ {
label: "批量删除", label: "批量删除",
value: 1, value: 1,
}, },
{ {
label: "批量导出", label: "批量导出",
value: 2, value: 2,
}, },
], ],
}; };
}, },
created() { created() {
this.getData() this.getData()
}, },
methods: { methods: {
async getData() { async getData() {
const res = await buildingList( const res = await buildingList(
{ {
pageNum:this.pagination.current, pageNum:this.pagination.current,
size:this.pagination.pageSize, size:this.pagination.pageSize,
name:this.searchForm.name name:this.searchForm.name
} }
) )
this.tableData = res.data.rows this.tableData = res.data.rows
}, },
addBuilding(){ addBuilding(){
this.drawerConfig.addShow = true this.drawerConfig.addShow = true
}, },
addSubmit(){ addSubmit(){
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
alert('submit!'); alert('submit!');
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
return false; return false;
} }
}); });
}, },
addClose(){ addClose(){
this.drawerConfig.addShow = false this.drawerConfig.addShow = false
}, },
detail(data){ detail(data){
console.log(data); console.log(data);
this.drawerConfig.detailShow = true; this.drawerConfig.detailShow = true;
}, },
detailClose(){ detailClose(){
this.drawerConfig.detailShow = false; this.drawerConfig.detailShow = false;
this.drawerConfig.editNow = false; this.drawerConfig.editNow = false;
}, },
handleTableChange(pagination) { handleTableChange(pagination) {
console.log(pagination); console.log(pagination);
const pager = { ...this.pagination }; const pager = { ...this.pagination };
pager.current = pagination.current; pager.current = pagination.current;
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
}, },
del(data) { del(data) {
this.$confirm({ this.$confirm({
title: "是否删除", title: "是否删除",
// okText:'', // okText:'',
// cancelText:'', // cancelText:'',
icon: "", icon: "",
onOk: function () { onOk: function () {
console.log(data); console.log(data);
}, },
}); });
}, },
Actions(data) { Actions(data) {
console.log(data); console.log(data);
}, },
selectionChoosed(data) { selectionChoosed(data) {
console.log(data); console.log(data);
this.tableChoosed = data; this.tableChoosed = data;
}, },
}, },
}; };
</script> </script>

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

@ -117,86 +117,86 @@
<script> <script>
import { import {
columns, columns,
pagination, pagination,
searchForm, searchForm,
reset, reset,
handleTableChange, handleTableChange,
} from "./component/config"; } from "./component/config";
import { reviewList, review } from "@/api/basic/resident"; import { reviewList, review } from "@/api/basic/resident";
export default { export default {
data() { data() {
return { return {
pagination: pagination, pagination: pagination,
searchForm: searchForm, searchForm: searchForm,
columns: columns, columns: columns,
activeAction: undefined, activeAction: undefined,
loading: false, loading: false,
// index // index
selectedRowKeys: [], selectedRowKeys: [],
tableChoosed: [], tableChoosed: [],
tableData: [], tableData: [],
ActionsList: [], ActionsList: [],
}; };
}, },
mounted() { mounted() {
this.getData(); this.getData();
}, },
methods: { methods: {
async getData() { async getData() {
const res = await reviewList({ const res = await reviewList({
pageNum: this.pagination.current, pageNum: this.pagination.current,
size: this.pagination.pageSize, size: this.pagination.pageSize,
status: this.searchForm.status, status: this.searchForm.status,
identity: this.searchForm.identity, identity: this.searchForm.identity,
}); });
this.tableData = res.data.rows; this.tableData = res.data.rows;
}, },
tabsChange(e) { tabsChange(e) {
if (e.target.value === "0") { if (e.target.value === "0") {
this.searchForm.status = null; this.searchForm.status = null;
} else { } else {
this.searchForm.status = e.target.value; this.searchForm.status = e.target.value;
} }
this.getData(); this.getData();
}, },
// 1 2 // 1 2
audit(estateReviewId, operate) { audit(estateReviewId, operate) {
this.$confirm({ this.$confirm({
title: "是否" + (operate === 1 ? "通过" : "驳回"), title: "是否" + (operate === 1 ? "通过" : "驳回"),
// okText:'', // okText:'',
// cancelText:'', // cancelText:'',
icon: "", icon: "",
onOk: async function () { onOk: async function () {
const res = await review({ const res = await review({
estateReviewId: estateReviewId, estateReviewId: estateReviewId,
operate: operate, operate: operate,
}); });
if (res.code === 0) { if (res.code === 0) {
this.$message.success(res.msg); this.$message.success(res.msg);
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
}, },
}); });
}, },
handleTableChange:handleTableChange, handleTableChange:handleTableChange,
Actions(data) { Actions(data) {
console.log(data); console.log(data);
this.activeAction = undefined; this.activeAction = undefined;
}, },
selectionChoosed(data) { selectionChoosed(data) {
console.log(data); console.log(data);
this.tableChoosed = data; this.tableChoosed = data;
}, },
reset: reset, reset: reset,
}, },
computed: { computed: {
// selection // selection
hasSelected() { hasSelected() {
return this.selectedRowKeys.length > 0; return this.selectedRowKeys.length > 0;
}, },
}, },
}; };
</script> </script>

@ -214,11 +214,11 @@
<script> <script>
export default { export default {
data() { data() {
return { return {
} }
} }
}; };
</script> </script>

@ -2,76 +2,76 @@
* 配置 * 配置
* 表格列 * 表格列
*/ */
export const columns = [ export const columns = [
{ {
title: "住户姓名", title: "住户姓名",
dataIndex: "name", dataIndex: "name",
width: "10%", width: "10%",
}, },
{ {
title: "住户手机号", title: "住户手机号",
dataIndex: "tel", dataIndex: "tel",
width: "10%", width: "10%",
}, },
{ {
title: "住户性别", title: "住户性别",
dataIndex: "sex", dataIndex: "sex",
width: "8%", width: "8%",
customRender:function(sex){ customRender:function(sex){
switch (sex) { switch (sex) {
case 1: case 1:
return '男' return '男'
case 2: case 2:
return '女' return '女'
case 3: case 3:
return '保密' return '保密'
default: default:
break; break;
} }
} }
}, },
{ {
title: "住户身份证号", title: "住户身份证号",
dataIndex: "idCard", dataIndex: "idCard",
width: "10%", width: "10%",
}, },
{ {
title: "房屋名称", title: "房屋名称",
dataIndex: "manageBuildingName", dataIndex: "manageBuildingName",
scopedSlots: { customRender: "name" }, scopedSlots: { customRender: "name" },
width: "20%", width: "20%",
}, },
{ {
title: "房屋类型", title: "房屋类型",
dataIndex: "manageEstateTypeName", dataIndex: "manageEstateTypeName",
width: "10%", width: "10%",
}, },
{ {
title: "用户身份", title: "用户身份",
key: "tags", key: "tags",
dataIndex: "identity", dataIndex: "identity",
scopedSlots: { customRender: "tags" }, scopedSlots: { customRender: "tags" },
}, },
{ {
title: "操作", title: "操作",
dataIndex: "action", dataIndex: "action",
key: "action", key: "action",
width: "180", width: "180",
fixed: "right", fixed: "right",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
] ]
// 搜索项 // 搜索项
export const searchForm = { export const searchForm = {
keyword: "", keyword: "",
sex: null sex: null
} }
// 分页 // 分页
export const pagination = { export const pagination = {
current: 1, current: 1,
total: 0, total: 0,
pageSize: 10, pageSize: 10,
showTotal: (total) => `${total}`, showTotal: (total) => `${total}`,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
} }

@ -97,123 +97,123 @@
import { columns,pagination,searchForm } from './component/config.js' import { columns,pagination,searchForm } from './component/config.js'
import { residentList } from '@/api/basic/resident' import { residentList } from '@/api/basic/resident'
export default { export default {
data() { data() {
return { return {
imageUrl: '', imageUrl: '',
form:{ form: {
identity:2 identity: 2
}, },
drawer:{ drawer: {
add:{ add: {
show: false show: false
}, },
detail:{} detail:{}
}, },
changeId:null, changeId:null,
pagination: pagination, pagination: pagination,
searchForm:searchForm, searchForm:searchForm,
activeAction: undefined, activeAction: undefined,
loading: false, loading: false,
// index // index
selectedRowKeys: [], selectedRowKeys: [],
tableChoosed: [], tableChoosed: [],
// //
// //
columns: columns, columns: columns,
newData:[], newData:[],
// //
tableData:[], tableData:[],
ActionsList: [ ActionsList: [
{ {
label: "批量删除", label: "批量删除",
value: 1, value: 1,
}, },
{ {
label: "批量导出", label: "批量导出",
value: 2, value: 2,
}, },
], ],
}; };
}, },
mounted(){ mounted(){
this.getData() this.getData()
}, },
methods: { methods: {
async getData() { async getData() {
const res = await residentList({ const res = await residentList({
pageNum: this.pagination.current, pageNum: this.pagination.current,
size :this.pagination.pageSize, size :this.pagination.pageSize,
sex:this.searchForm.sex, sex:this.searchForm.sex,
keyword:this.searchForm.keyword, keyword:this.searchForm.keyword,
}) })
this.tableData = res.data.rows this.tableData = res.data.rows
this.newData = this.tableData this.newData = this.tableData
}, },
addClose(){ addClose(){
this.drawer.add.show = false; this.drawer.add.show = false;
}, },
handleChange(info){ handleChange(info){
console.log(info); console.log(info);
}, },
beforeUpload(file) { beforeUpload(file) {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) { if (!isJpgOrPng) {
this.$message.error('You can only upload JPG file!'); this.$message.error('You can only upload JPG file!');
} }
const isLt2M = file.size / 1024 / 1024 < 2; const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) { if (!isLt2M) {
this.$message.error('Image must smaller than 2MB!'); this.$message.error('Image must smaller than 2MB!');
} }
return isJpgOrPng && isLt2M; return isJpgOrPng && isLt2M;
}, },
// //
changeHouse(value){ changeHouse(value){
// //
this.newData.forEach((item,index)=>{ this.newData.forEach((item,index)=>{
// //
item.residentListEstateVoList.forEach(items=>{ item.residentListEstateVoList.forEach(items=>{
// idchangeid // idchangeid
if(items.id === value){ if(items.id === value){
// newData // newData
this.$set(this.newData[index],'identity' ,items.identity ) this.$set(this.newData[index],'identity' ,items.identity )
this.$set(this.newData[index],'manageEstateTypeName' ,items.manageEstateTypeName ) this.$set(this.newData[index],'manageEstateTypeName' ,items.manageEstateTypeName )
} }
}) })
}) })
}, },
handleTableChange(pagination) { handleTableChange(pagination) {
console.log(pagination); console.log(pagination);
const pager = { ...this.pagination }; const pager = { ...this.pagination };
pager.current = pagination.current; pager.current = pagination.current;
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
}, },
del(data) { del(data) {
this.$confirm({ this.$confirm({
title: "是否删除", title: "是否删除",
// okText:'', // okText:'',
// cancelText:'', // cancelText:'',
icon: "", icon: "",
onOk: function () { onOk: function () {
console.log(data); console.log(data);
}, },
}); });
}, },
Actions(data) { Actions(data) {
console.log(data); console.log(data);
this.activeAction = undefined; this.activeAction = undefined;
}, },
selectionChoosed(data) { selectionChoosed(data) {
console.log(data); console.log(data);
this.tableChoosed = data; this.tableChoosed = data;
}, },
}, },
computed: { computed: {
// selection // selection
hasSelected() { hasSelected() {
return this.selectedRowKeys.length > 0; return this.selectedRowKeys.length > 0;
}, },
}, },
}; };
</script> </script>

@ -2,71 +2,71 @@
* 配置 * 配置
* 表格列 * 表格列
*/ */
export const columns = [ export const columns = [
{ {
title: "房屋名称", title: "房屋名称",
dataIndex: "manageBuildingName", dataIndex: "manageBuildingName",
scopedSlots: { customRender: "name" }, scopedSlots: { customRender: "name" },
width: "20%", width: "20%",
}, },
{ {
title: "室内面积", title: "室内面积",
dataIndex: "indoorArea", dataIndex: "indoorArea",
width: "15%", width: "15%",
}, },
{ {
title: "建筑面积", title: "建筑面积",
dataIndex: "constructionArea", dataIndex: "constructionArea",
width: "15%", width: "15%",
}, },
{ {
title: "房屋类型", title: "房屋类型",
dataIndex: "manageEstateTypeName", dataIndex: "manageEstateTypeName",
width: "15%", width: "15%",
}, },
{ {
title: "居住状态", title: "居住状态",
key: "tags", key: "tags",
dataIndex: "residenceStatus", dataIndex: "residenceStatus",
scopedSlots: { customRender: "tags" }, scopedSlots: { customRender: "tags" },
}, },
{ {
title: "是否开启租赁", title: "是否开启租赁",
dataIndex: "isEnableLease", dataIndex: "isEnableLease",
scopedSlots: { customRender: "switch" }, scopedSlots: { customRender: "switch" },
}, },
{ {
title: "操作", title: "操作",
dataIndex: "action", dataIndex: "action",
key: "action", key: "action",
width: "180", width: "180",
fixed: "right", fixed: "right",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
] ]
// 搜索项 // 搜索项
export const searchForm = { export const searchForm = {
name: "", name: "",
isEnableLease: null, isEnableLease: null,
manageEstateTypeId:null manageEstateTypeId:null
} }
// 分页 // 分页
export const pagination = { export const pagination = {
current: 1, current: 1,
total: 0, total: 0,
pageSize: 10, pageSize: 10,
showTotal: (total) => `${total}`, showTotal: (total) => `${total}`,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
} }
export function del(data) { export function del(data) {
this.$confirm({ this.$confirm({
title: "是否删除", title: "是否删除",
// okText:'删除', // okText:'删除',
// cancelText:'取消', // cancelText:'取消',
icon: "", icon: "",
onOk: function () { onOk: function () {
console.log(data); console.log(data);
}, },
}); });
} }

@ -243,156 +243,156 @@
<script> <script>
function getBase64(file) { function getBase64(file) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const reader = new FileReader(); const reader = new FileReader();
reader.readAsDataURL(file); reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result); reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error); reader.onerror = error => reject(error);
}); });
} }
import { columns,pagination,searchForm, del } from "./component/config" import { columns,pagination,searchForm, del } from "./component/config"
import { houseList } from '@/api/basic/estate' import { houseList } from '@/api/basic/estate'
export default { export default {
data() { data() {
return { return {
drawerConfig:{ drawerConfig:{
addShow:false, addShow:false,
}, },
previewVisible: false, previewVisible: false,
previewImage: '', previewImage: '',
fileList: [ fileList: [
{ {
uid: '-1', uid: '-1',
name: 'image.png', name: 'image.png',
status: 'done', status: 'done',
url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
}, },
{ {
uid: '-2', uid: '-2',
name: 'image.png', name: 'image.png',
status: 'done', status: 'done',
url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
}, },
{ {
uid: '-3', uid: '-3',
name: 'image.png', name: 'image.png',
status: 'done', status: 'done',
url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
}, },
{ {
uid: '-4', uid: '-4',
name: 'image.png', name: 'image.png',
status: 'done', status: 'done',
url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png', url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
}, },
{ {
uid: '-5', uid: '-5',
name: 'image.png', name: 'image.png',
status: 'error', status: 'error',
}, },
], ],
form:{ form:{
manageBuildingId:undefined, manageBuildingId:undefined,
manageUnitId:undefined, manageUnitId:undefined,
floorLocation:undefined, floorLocation:undefined,
name:undefined, name:undefined,
indoorArea:undefined, indoorArea:undefined,
constructionArea:undefined, constructionArea:undefined,
manageEstateTypeId:undefined, manageEstateTypeId:undefined,
isEnableLease:undefined, isEnableLease:undefined,
houseTypeHall:undefined, houseTypeHall:undefined,
houseTypeRoom:undefined, houseTypeRoom:undefined,
houseTypeBathroom:undefined, houseTypeBathroom:undefined,
estateImgUrls:undefined, estateImgUrls:undefined,
remarks:undefined, remarks:undefined,
}, },
rules:{}, rules:{},
pagination:pagination , pagination:pagination ,
searchForm:searchForm, searchForm:searchForm,
columns:columns , columns:columns ,
activeAction: undefined, activeAction: undefined,
loading: false, loading: false,
// index // index
selectedRowKeys: [], selectedRowKeys: [],
tableChoosed: [], tableChoosed: [],
// //
// //
// //
tableData:[], tableData:[],
ActionsList: [ ActionsList: [
{ {
label: "批量删除", label: "批量删除",
value: 1, value: 1,
}, },
{ {
label: "批量导出", label: "批量导出",
value: 2, value: 2,
}, },
], ],
}; };
}, },
created() { created() {
this.getData() this.getData()
}, },
methods: { methods: {
async getData() { async getData() {
const res = await houseList( const res = await houseList(
{ {
pageNum:this.pagination.current, pageNum:this.pagination.current,
size:this.pagination.pageSize, size:this.pagination.pageSize,
name:this.searchForm.name, name:this.searchForm.name,
isEnableLease:this.searchForm.isEnableLease, isEnableLease:this.searchForm.isEnableLease,
manageEstateTypeId:this.searchForm.manageEstateTypeId, manageEstateTypeId:this.searchForm.manageEstateTypeId,
} }
) )
this.tableData = res.data.rows this.tableData = res.data.rows
}, },
addHouse() {}, addHouse() {},
handleCancel() { handleCancel() {
this.previewVisible = false; this.previewVisible = false;
}, },
async handlePreview(file) { async handlePreview(file) {
if (!file.url && !file.preview) { if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj); file.preview = await getBase64(file.originFileObj);
} }
this.previewImage = file.url || file.preview; this.previewImage = file.url || file.preview;
this.previewVisible = true; this.previewVisible = true;
}, },
handleChange({ fileList }) { handleChange({ fileList }) {
this.fileList = fileList; this.fileList = fileList;
}, },
enable(data) { enable(data) {
console.log(data); console.log(data);
}, },
handleTableChange(pagination) { handleTableChange(pagination) {
console.log(pagination); console.log(pagination);
const pager = { ...this.pagination }; const pager = { ...this.pagination };
pager.current = pagination.current; pager.current = pagination.current;
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
}, },
// del(data) { // del(data) {
// }, // },
del:del, del:del,
Actions(data) { Actions(data) {
console.log(data); console.log(data);
this.activeAction = undefined; this.activeAction = undefined;
}, },
selectionChoosed(data) { selectionChoosed(data) {
console.log(data); console.log(data);
this.tableChoosed = data; this.tableChoosed = data;
}, },
addClose(){ addClose(){
this.drawerConfig.addShow = false; this.drawerConfig.addShow = false;
} }
}, },
computed: { computed: {
// selection // selection
hasSelected() { hasSelected() {
return this.selectedRowKeys.length > 0; return this.selectedRowKeys.length > 0;
}, },
}, },
}; };
</script> </script>

@ -41,30 +41,30 @@
</template> </template>
<script> <script>
export default { export default {
name: "addWork", name: "addWork",
data() { data() {
return { return {
isVisibleDrawe: false, isVisibleDrawe: false,
}; };
}, },
props: { props: {
visible: Boolean, visible: Boolean,
form:Object, form:Object,
rules:Object rules:Object
}, },
methods: { methods: {
onClose() { onClose() {
this.$emit("onClose"); this.$emit("onClose");
}, },
}, },
watch: { watch: {
visible: { visible: {
handler(newValue) { handler(newValue) {
this.isVisibleDrawe = newValue; this.isVisibleDrawe = newValue;
}, },
immediate: true, immediate: true,
}, },
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

@ -123,155 +123,155 @@
<script> <script>
import addWork from "../WorkOrder/addWorkOrder.vue" import addWork from "../WorkOrder/addWorkOrder.vue"
export default { export default {
components:{ components:{
addWork addWork
}, },
data() { data() {
return { return {
form:{ form:{
identity:null identity:null
}, },
rules:{}, rules:{},
show: false, show: false,
activeName:'0', activeName:'0',
pagination: { pagination: {
current: 1, current: 1,
total: 0, total: 0,
pageSize: 10, pageSize: 10,
showTotal: (total) => `${total}`, showTotal: (total) => `${total}`,
showSizeChanger: true, showSizeChanger: true,
showQuickJumper: true, showQuickJumper: true,
}, },
searchForm:{ searchForm:{
status:null, status:null,
identity:null identity:null
}, },
activeAction: undefined, activeAction: undefined,
loading: false, loading: false,
// index // index
selectedRowKeys: [], selectedRowKeys: [],
tableChoosed: [], tableChoosed: [],
// //
// //
columns: [ columns: [
{ {
title: "工单状态", title: "工单状态",
key: "tags", key: "tags",
width: "14%", width: "14%",
dataIndex: "status", dataIndex: "status",
scopedSlots: { customRender: "tags" }, scopedSlots: { customRender: "tags" },
}, },
{ {
title: "工单号", title: "工单号",
width: "14%", width: "14%",
dataIndex: "code", dataIndex: "code",
}, },
{ {
title: "申请人", title: "申请人",
width: "14%", width: "14%",
dataIndex: "people", dataIndex: "people",
}, },
{ {
title: "手机号", title: "手机号",
width: "14%", width: "14%",
dataIndex: "tel", dataIndex: "tel",
}, },
{ {
title: "工单类型", title: "工单类型",
width: "14%", width: "14%",
dataIndex: "type", dataIndex: "type",
}, },
{ {
title: "工单类型", title: "工单类型",
width: "14%", width: "14%",
dataIndex: "content", dataIndex: "content",
}, },
{ {
title: "操作", title: "操作",
dataIndex: "action", dataIndex: "action",
key: "action", key: "action",
width: "300", width: "300",
fixed: "right", fixed: "right",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
}, },
], ],
// //
tableData: [{}, tableData: [{},
], ],
ActionsList: [ ActionsList: [
{ {
label: "批量删除", label: "批量删除",
value: 1, value: 1,
}, },
{ {
label: "批量导出", label: "批量导出",
value: 2, value: 2,
}, },
], ],
}; };
}, },
mounted(){ mounted(){
this.getData() this.getData()
}, },
methods: { methods: {
getData(){}, getData(){},
tabsChange(e){ tabsChange(e){
this.searchForm.status = e.target.value this.searchForm.status = e.target.value
this.getData() this.getData()
}, },
onClose(){ onClose(){
this.show = false; this.show = false;
}, },
// //
put(){ put(){
}, },
// //
shift(){ shift(){
}, },
// //
assign(){ assign(){
}, },
// //
shiftAssign(){ shiftAssign(){
}, },
// //
finish(){ finish(){
}, },
// //
deal(){ deal(){
}, },
// //
refuse(){ refuse(){
}, },
handleTableChange(pagination) { handleTableChange(pagination) {
console.log(pagination); console.log(pagination);
const pager = { ...this.pagination }; const pager = { ...this.pagination };
pager.current = pagination.current; pager.current = pagination.current;
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
}, },
Actions(data) { Actions(data) {
console.log(data); console.log(data);
this.activeAction = undefined; this.activeAction = undefined;
}, },
selectionChoosed(data) { selectionChoosed(data) {
console.log(data); console.log(data);
this.tableChoosed = data; this.tableChoosed = data;
}, },
}, },
computed: { computed: {
// selection // selection
hasSelected() { hasSelected() {
return this.selectedRowKeys.length > 0; return this.selectedRowKeys.length > 0;
}, },
}, },
}; };
</script> </script>

@ -40,60 +40,60 @@
<script> <script>
import yMenu from "./yMenu"; import yMenu from "./yMenu";
export default { export default {
components: { components: {
yMenu, yMenu,
}, },
watch: { watch: {
$route: { $route: {
handler(val) { handler(val) {
this.tags = val.matched; this.tags = val.matched;
}, },
immediate: true, immediate: true,
}, },
tagActive:{ tagActive:{
handler(val) { handler(val) {
sessionStorage.setItem('modal',this.menuTags[val].value) sessionStorage.setItem('modal',this.menuTags[val].value)
}, },
immediate: true, immediate: true,
} }
}, },
data() { data() {
return { return {
collapsed: false, collapsed: false,
tagActive: 0, tagActive: 0,
menuTags: [ menuTags: [
{ {
label: "基础功能", label: "基础功能",
value: "basic" value: "basic"
}, },
{ {
label: "缴费管理", label: "缴费管理",
value: "payment" value: "payment"
}, },
{ {
label: "智慧商城", label: "智慧商城",
value: "smartMall" value: "smartMall"
}, },
// { // {
// label: "", // label: "",
// value: "operation" // value: "operation"
// }, // },
// { // {
// label: "", // label: "",
// value: "setting" // value: "setting"
// } // }
], ],
}; };
}, },
methods: { methods: {
handlerBread(row) { handlerBread(row) {
let path = row.path || "/"; let path = row.path || "/";
this.$router.push(path); this.$router.push(path);
}, },
handlerTags(n) { handlerTags(n) {
this.tagActive = n; this.tagActive = n;
} }
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

@ -8,40 +8,40 @@
*/ */
export default [ export default [
{ {
key: '1', key: '1',
title: '信息管理', title: '信息管理',
path: '/info', path: '/info',
}, },
{ {
key: '2', key: '2',
title: '用户管理', title: '用户管理',
path: '/user', path: '/user',
children: [ children: [
{ {
key: '2.1', key: '2.1',
title: '后台用户', title: '后台用户',
path: '/adminUser', path: '/adminUser',
children: [ children: [
{ {
key: '2.1.1', key: '2.1.1',
title: '新增用户', title: '新增用户',
path: '/addAdminUser', path: '/addAdminUser',
children: [ children: [
{ {
key: '2.1.1。1', key: '2.1.1。1',
title: '用户xx', title: '用户xx',
path: '/addAdminUserXX', path: '/addAdminUserXX',
} }
] ]
} }
] ]
}, },
{ {
key: '2.2', key: '2.2',
title: '前台用户', title: '前台用户',
path: '/frontUser', path: '/frontUser',
} }
] ]
}, },
] ]

@ -22,7 +22,7 @@
import ost from "../ost"; import ost from "../ost";
import { Menu } from 'ant-design-vue'; import { Menu } from 'ant-design-vue';
const SubMenu = { const SubMenu = {
template: ` template: `
<a-sub-menu :key="menuInfo.key" v-bind="$props" v-on="$listeners"> <a-sub-menu :key="menuInfo.key" v-bind="$props" v-on="$listeners">
<span slot="title"> <span slot="title">
<a-icon v-if="menuInfo.icon" :type="menuInfo.icon" /><span>{{ menuInfo.title }}</span> <a-icon v-if="menuInfo.icon" :type="menuInfo.icon" /><span>{{ menuInfo.title }}</span>
@ -36,128 +36,128 @@ const SubMenu = {
</template> </template>
</a-sub-menu> </a-sub-menu>
`, `,
name: 'SubMenu', name: 'SubMenu',
// must add isSubMenu: true // must add isSubMenu: true
isSubMenu: true, isSubMenu: true,
props: { props: {
// a-sub-menu使 // a-sub-menu使
...Menu.SubMenu.props, ...Menu.SubMenu.props,
// Cannot overlap with properties within Menu.SubMenu.props // Cannot overlap with properties within Menu.SubMenu.props
menuInfo: { menuInfo: {
type: Object, type: Object,
default: () => ({}), default: () => ({}),
}, },
}, },
}; };
export default { export default {
name: "yMenu", name: "yMenu",
props: { props: {
csd: { csd: {
type: Boolean, type: Boolean,
default: false, default: false,
indexPath: 0 indexPath: 0
}, },
num:Number, num:Number,
}, },
watch: { watch: {
csd: { csd: {
handler(val) { handler(val) {
this.collapsed = val this.collapsed = val
}, },
immediate: true immediate: true
}, },
$route: { $route: {
handler(val) { handler(val) {
let secPath = [val.path]; let secPath = [val.path];
this.selectedKeys = secPath; this.selectedKeys = secPath;
this.setSelectedKeys(secPath); this.setSelectedKeys(secPath);
}, },
immediate: true, immediate: true,
}, },
// num // num
num:{ num:{
handler() { handler() {
this.initMenu() this.initMenu()
}, },
immediate: true, immediate: true,
} }
}, },
components: { components: {
'sub-menu': SubMenu, 'sub-menu': SubMenu,
}, },
data() { data() {
return { return {
list: ost, list: ost,
collapsed: false, collapsed: false,
openKeys: [], openKeys: [],
selectedKeys: [], selectedKeys: [],
defaultSelectedKeys: [] defaultSelectedKeys: []
}; };
}, },
created() { created() {
this.openKeys = this.getOpenKeys; this.openKeys = this.getOpenKeys;
this.defaultSelectedKeys = this.getSelectedKeys; this.defaultSelectedKeys = this.getSelectedKeys;
this.initMenu(); this.initMenu();
}, },
methods: { methods: {
handlerSelect({selectedKeys}) { handlerSelect({selectedKeys}) {
this.selectedKeys = selectedKeys; this.selectedKeys = selectedKeys;
this.setSelectedKeys(selectedKeys); this.setSelectedKeys(selectedKeys);
}, },
handlerOpen(val) { handlerOpen(val) {
this.setOpenKeys(val); this.setOpenKeys(val);
}, },
menuClick({key}) { menuClick({key}) {
this.$router.push(key) this.$router.push(key)
}, },
initMenu() { initMenu() {
// console.log(this.$router); // console.log(this.$router);
// console.log(sessionStorage.getItem('modal')); // console.log(sessionStorage.getItem('modal'));
let modal= sessionStorage.getItem('modal') let modal= sessionStorage.getItem('modal')
let routes = this.$router.options.routes || []; let routes = this.$router.options.routes || [];
let farr = routes.filter(ele => { let farr = routes.filter(ele => {
return ele.name === modal return ele.name === modal
}); });
let arr = farr[0].children || []; let arr = farr[0].children || [];
let menus = []; let menus = [];
this.routerToMenu(arr, menus); this.routerToMenu(arr, menus);
this.list = menus; this.list = menus;
let path = farr[0].redirect let path = farr[0].redirect
this.$router.push({path:path}) this.$router.push({path:path})
}, },
// //
routerToMenu(arr = [], menus) { routerToMenu(arr = [], menus) {
for(let i = 0; i < arr.length; i++) { for(let i = 0; i < arr.length; i++) {
this.indexPath++ this.indexPath++
if(!arr[i].children && !arr[i].hide) { if(!arr[i].children && !arr[i].hide) {
let obj = { let obj = {
key: this.indexPath, key: this.indexPath,
title: arr[i].title, title: arr[i].title,
path: arr[i].path, path: arr[i].path,
hide: arr[i].hide, hide: arr[i].hide,
icon: arr[i].icon || '' icon: arr[i].icon || ''
} }
menus.push(obj) menus.push(obj)
} }
if(arr[i].children) { if(arr[i].children) {
let obj = { let obj = {
key: this.indexPath, key: this.indexPath,
title: arr[i].title, title: arr[i].title,
path: arr[i].path, path: arr[i].path,
hide: arr[i].hide || false, hide: arr[i].hide || false,
icon: arr[i].icon || '', icon: arr[i].icon || '',
children: [] children: []
} }
menus.push(obj); menus.push(obj);
this.routerToMenu(arr[i].children, obj.children) this.routerToMenu(arr[i].children, obj.children)
} }
} }
// console.log(menus); // console.log(menus);
} }
} }
}; };
</script> </script>

@ -189,96 +189,96 @@
<script> <script>
import { loginTel, sendTelCode } from "../../api/public/login"; import { loginTel, sendTelCode } from "../../api/public/login";
export default { export default {
name: "Login", name: "Login",
data() { data() {
return { return {
status: 1, status: 1,
activeName: "2", activeName: "2",
form: { form: {
tel: "", tel: "",
code: "", code: "",
}, },
rules: { rules: {
tel: [ tel: [
{ {
required: true, required: true,
message: "请输入手机号", message: "请输入手机号",
trigger: "blur", trigger: "blur",
}, },
{ {
min: 11, min: 11,
max: 11, max: 11,
message: "姓名长度必须为 11 位", message: "姓名长度必须为 11 位",
trigger: "blur", trigger: "blur",
}, },
], ],
name: [ name: [
{ {
required: true, required: true,
message: "请输入姓名", message: "请输入姓名",
trigger: "blur", trigger: "blur",
}, },
{ {
min: 3, min: 3,
max: 5, max: 5,
message: "姓名长度必须为 3 至 5位", message: "姓名长度必须为 3 至 5位",
trigger: "blur", trigger: "blur",
}, },
], ],
}, },
}; };
}, },
created() { created() {
this.keyupEnter(); this.keyupEnter();
}, },
methods: { methods: {
// enter // enter
keyupEnter() { keyupEnter() {
document.onkeydown = (e) => { document.onkeydown = (e) => {
if (e.keyCode === 13 && e.target.baseURI.match(/loginTel/)) { if (e.keyCode === 13 && e.target.baseURI.match(/loginTel/)) {
// //
this.login(); this.login();
} }
}; };
}, },
login() { login() {
loginTel(this.form).then(res=>{ loginTel(this.form).then(res=>{
if (res.code === 200) { if (res.code === 200) {
this.$message.success(res.msg); this.$message.success(res.msg);
this.setToken(res.data); this.setToken(res.data);
this.$router.push("/"); this.$router.push("/");
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
}) })
}, },
// //
getCode() { getCode() {
sendTelCode(this.form).then((res) => { sendTelCode(this.form).then((res) => {
if (res) { if (res) {
// this.$message.success(""); // this.$message.success("");
this.$message.success(res.msg +' ' +res.data); this.$message.success(res.msg +' ' +res.data);
} }
}); });
}, },
onSubmit() { onSubmit() {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
alert("submit!"); alert("submit!");
} else { } else {
console.log("error submit!!"); console.log("error submit!!");
return false; return false;
} }
}); });
}, },
// //
resetForm() { resetForm() {
this.$refs.ruleForm.resetFields(); this.$refs.ruleForm.resetFields();
}, },
tabsSwitch() { tabsSwitch() {
console.log(this.activeName); console.log(this.activeName);
}, },
}, },
}; };
</script> </script>

@ -7,11 +7,11 @@
* @FilePath: /ansu-business/vue.config.js * @FilePath: /ansu-business/vue.config.js
*/ */
module.exports = { module.exports = {
// ... // ...
runtimeCompiler: true, runtimeCompiler: true,
devServer: { devServer: {
port: "8443", port: "8443",
}, },
// ... // ...
}; };

15919
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save