'v424'
This commit is contained in:
parent
994f45ae96
commit
6a9abfe877
|
@ -1,6 +1,7 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules/
|
node_modules/
|
||||||
dist/
|
dist/
|
||||||
|
convenience-prod/
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
|
|
@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工单列表
|
* 工单列表
|
||||||
* @param {YW_Content_Code,YW_Type_Code} data
|
* @param {Object}} data
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function list(data) {
|
export function list(data) {
|
||||||
|
@ -26,7 +26,7 @@ export function typeList() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起办事
|
* 发起办事
|
||||||
* @param {residentInformation,eventTypeId,sponsor,remark,Attachment} data
|
* @param {Object} data
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function add(data) {
|
export function add(data) {
|
||||||
|
@ -39,7 +39,7 @@ export function add(data) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工单详情
|
* 工单详情
|
||||||
* @param {工单id} id
|
* @param {String} id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function info(id) {
|
export function info(id) {
|
||||||
|
@ -52,7 +52,7 @@ export function info(id) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工单操作
|
* 工单操作
|
||||||
* @param {id,version,type,ids,remark,attachmentList,approve,evaluation} data
|
* @param {Object} data
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function update(data) {
|
export function update(data) {
|
||||||
|
@ -65,7 +65,7 @@ export function update(data) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取沟通人员列表
|
* 获取沟通人员列表
|
||||||
* @param {id} data
|
* @param {String} data
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function communicationList(data) {
|
export function communicationList(data) {
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 行政区域
|
* 行政区域列表
|
||||||
* @param {*} data
|
* @param {*} data
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function getRegions() {
|
export function getRegions() {
|
||||||
return request({
|
return request({
|
||||||
url: "/api/convenience/residentInformation/region/list",
|
// /api/convenience/v2/region/list
|
||||||
|
url: "/api/convenience/v2/region/list",
|
||||||
method: "get"
|
method: "get"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,4 +38,17 @@ export function updateResidentInfo(data) {
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 居民信息删除
|
||||||
|
* @param {*} id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function deleteResident(id) {
|
||||||
|
return request({
|
||||||
|
url: "/api/convenience/residentInformation",
|
||||||
|
method: "delete",
|
||||||
|
params:id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import request from '@/utils/request'
|
import request from "@/utils/request";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通讯录
|
* 通讯录
|
||||||
|
@ -6,10 +6,18 @@ import request from '@/utils/request'
|
||||||
*/
|
*/
|
||||||
export function staffList() {
|
export function staffList() {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/convenience/v2/staff/list',
|
url: "/api/convenience/v2/staff/list",
|
||||||
method: 'post'
|
method: "post",
|
||||||
})
|
data: { category: "CONVENIENCE" }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
// export function staffList(data) {
|
||||||
|
// return request({
|
||||||
|
// url: '/api/convenience/v2/staff/list',
|
||||||
|
// method: 'post',
|
||||||
|
// data
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 个人信息详情
|
* 个人信息详情
|
||||||
|
@ -18,8 +26,8 @@ export function staffList() {
|
||||||
*/
|
*/
|
||||||
export function info(data) {
|
export function info(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/convenience/v2/staff/info',
|
url: "/api/convenience/v2/staff/info",
|
||||||
method: 'get',
|
method: "get",
|
||||||
params: data
|
params: data
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,8 @@ import './icons' // icon
|
||||||
import './permission' // permission control
|
import './permission' // permission control
|
||||||
import './utils/error-log' // error log
|
import './utils/error-log' // error log
|
||||||
|
|
||||||
|
import has from './utils/permissionFilter.js'
|
||||||
|
|
||||||
import * as filters from './filters' // global filters
|
import * as filters from './filters' // global filters
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -92,7 +92,7 @@ export const constantRoutes = [
|
||||||
meta: {
|
meta: {
|
||||||
title: "工单管理",
|
title: "工单管理",
|
||||||
icon: "convenience",
|
icon: "convenience",
|
||||||
roles: ["admin", "editor"]
|
// roles: ["admin", "editor"]
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
@ -142,7 +142,7 @@ export const constantRoutes = [
|
||||||
meta: {
|
meta: {
|
||||||
title: "工作手册管理",
|
title: "工作手册管理",
|
||||||
icon: "list",
|
icon: "list",
|
||||||
roles: ["admin", "editor"]
|
// roles: ["admin", "editor"]
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
@ -158,30 +158,7 @@ export const constantRoutes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: "/residentInformation",
|
|
||||||
component: Layout,
|
|
||||||
name: "ResidentInformation",
|
|
||||||
redirect: "/residentInformation/list",
|
|
||||||
meta: {
|
|
||||||
title: "居民信息管理",
|
|
||||||
icon: "jmInfo",
|
|
||||||
roles: ["ESIDENT_ADMIN"]
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: "list",
|
|
||||||
component: () => import("@/views/residentInformation/list"),
|
|
||||||
name: "residentInformationList",
|
|
||||||
meta: {
|
|
||||||
title: "居民信息列表",
|
|
||||||
icon: "jmInfo",
|
|
||||||
affix: true,
|
|
||||||
parentTitle: "居民信息管理"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
// {
|
// {
|
||||||
// path: "/staff",
|
// path: "/staff",
|
||||||
// component: Layout,
|
// component: Layout,
|
||||||
|
@ -246,6 +223,31 @@ export const constantRoutes = [
|
||||||
* the routes that need to be dynamically loaded based on user roles
|
* the routes that need to be dynamically loaded based on user roles
|
||||||
*/
|
*/
|
||||||
export const asyncRoutes = [
|
export const asyncRoutes = [
|
||||||
|
{
|
||||||
|
path: "/residentInformation",
|
||||||
|
component: Layout,
|
||||||
|
name: "ResidentInformation",
|
||||||
|
redirect: "/residentInformation/list",
|
||||||
|
meta: {
|
||||||
|
title: "居民信息管理",
|
||||||
|
icon: "jmInfo",
|
||||||
|
roles: ["SSS"]
|
||||||
|
// roles: ["RESIDENT_ADMIN"]
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "list",
|
||||||
|
component: () => import("@/views/residentInformation/list"),
|
||||||
|
name: "residentInformationList",
|
||||||
|
meta: {
|
||||||
|
title: "居民信息列表",
|
||||||
|
icon: "jmInfo",
|
||||||
|
affix: true,
|
||||||
|
parentTitle: "居民信息管理"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// path: '/permission',
|
// path: '/permission',
|
||||||
// component: Layout,
|
// component: Layout,
|
||||||
|
|
|
@ -7,6 +7,7 @@ const getters = {
|
||||||
token: state => state.user.token,
|
token: state => state.user.token,
|
||||||
avatar: state => state.user.avatar,
|
avatar: state => state.user.avatar,
|
||||||
name: state => state.user.name,
|
name: state => state.user.name,
|
||||||
|
regionIds: state=>state.user.regionIds,
|
||||||
introduction: state => state.user.introduction,
|
introduction: state => state.user.introduction,
|
||||||
roles: state => state.user.roles,
|
roles: state => state.user.roles,
|
||||||
permission_routes: state => state.permission.routes,
|
permission_routes: state => state.permission.routes,
|
||||||
|
|
|
@ -50,7 +50,7 @@ const actions = {
|
||||||
generateRoutes({ commit }, roles) {
|
generateRoutes({ commit }, roles) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
let accessedRoutes
|
let accessedRoutes
|
||||||
if (roles.includes('admin')) {
|
if (roles.includes('RESIDENT_ADMIN')) {
|
||||||
accessedRoutes = asyncRoutes || []
|
accessedRoutes = asyncRoutes || []
|
||||||
} else {
|
} else {
|
||||||
accessedRoutes = filterAsyncRoutes(asyncRoutes, roles)
|
accessedRoutes = filterAsyncRoutes(asyncRoutes, roles)
|
||||||
|
|
|
@ -1,56 +1,57 @@
|
||||||
import { login, logout, getInfo } from '@/api/user'
|
import { login, logout, getInfo } from "@/api/user";
|
||||||
import { getToken, setToken, removeToken } from '@/utils/auth'
|
import { getToken, setToken, removeToken } from "@/utils/auth";
|
||||||
import router, { resetRouter } from '@/router'
|
import router, { resetRouter } from "@/router";
|
||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
token: getToken(),
|
token: getToken(),
|
||||||
name: '',
|
name: "",
|
||||||
avatar: '',
|
avatar: "",
|
||||||
introduction: '',
|
introduction: "",
|
||||||
roles: []
|
roles: [],
|
||||||
}
|
regionIds: ""
|
||||||
|
};
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
SET_TOKEN: (state, token) => {
|
SET_TOKEN: (state, token) => {
|
||||||
state.token = token
|
state.token = token;
|
||||||
},
|
},
|
||||||
SET_INTRODUCTION: (state, introduction) => {
|
SET_INTRODUCTION: (state, introduction) => {
|
||||||
state.introduction = introduction
|
state.introduction = introduction;
|
||||||
},
|
},
|
||||||
SET_NAME: (state, name) => {
|
SET_NAME: (state, name) => {
|
||||||
// console.log(name);
|
state.name = name;
|
||||||
state.name = name
|
|
||||||
},
|
},
|
||||||
SET_AVATAR: (state, avatar) => {
|
SET_AVATAR: (state, avatar) => {
|
||||||
state.avatar = avatar
|
state.avatar = avatar;
|
||||||
},
|
},
|
||||||
SET_ROLES: (state, roles) => {
|
SET_ROLES: (state, roles) => {
|
||||||
// console.log(roles);
|
state.roles = roles;
|
||||||
state.roles = roles
|
},
|
||||||
|
SET_REGIONIDS: (state, regionIds) => {
|
||||||
|
state.regionIds = regionIds;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
setToken({ commit }, token) {
|
setToken({ commit }, token) {
|
||||||
commit('SET_TOKEN', token)
|
commit("SET_TOKEN", token);
|
||||||
setToken(token)
|
setToken(token);
|
||||||
// commit("SET_ROLES", ['admin']);
|
|
||||||
},
|
},
|
||||||
// user login
|
// user login
|
||||||
login({ commit }, userInfo) {
|
login({ commit }, userInfo) {
|
||||||
const { username, password } = userInfo
|
const { username, password } = userInfo;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
login({ username: username.trim(), password: password })
|
login({ username: username.trim(), password: password })
|
||||||
.then(response => {
|
.then(response => {
|
||||||
const { data } = response
|
const { data } = response;
|
||||||
commit('SET_TOKEN', data.token)
|
commit("SET_TOKEN", data.token);
|
||||||
setToken(data.token)
|
setToken(data.token);
|
||||||
resolve()
|
resolve();
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
reject(error)
|
reject(error);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// get user info
|
// get user info
|
||||||
|
@ -59,20 +60,22 @@ const actions = {
|
||||||
getInfo({})
|
getInfo({})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
// console.log();
|
// console.log();
|
||||||
let roles = res.d.isResidentsAdministrator;
|
let roles = res.d.isResidentsAdministrator || [];
|
||||||
roles.push('admin')
|
roles.push("admin");
|
||||||
commit('SET_ROLES', roles)
|
commit("SET_ROLES", roles);
|
||||||
// commit('SET_ROLES', ['admin'])
|
// commit('SET_ROLES', ['admin'])
|
||||||
// console.log(['admin',...res.isResidentsAdministrator]);
|
// console.log(['admin',...res.isResidentsAdministrator]);
|
||||||
sessionStorage.setItem('id', res.d.id)
|
sessionStorage.setItem("Permissions", JSON.stringify(roles));
|
||||||
commit('SET_NAME', res.d.name)
|
sessionStorage.setItem("id", res.d.id);
|
||||||
commit('SET_AVATAR', res.d.avatar)
|
commit("SET_NAME", res.d.name);
|
||||||
resolve({ roles})
|
commit("SET_AVATAR", res.d.avatar);
|
||||||
|
commit("SET_REGIONIDS",res.d.regionIds)
|
||||||
|
resolve({ roles });
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
reject(error)
|
reject(error);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// user logout
|
// user logout
|
||||||
|
@ -80,14 +83,14 @@ const actions = {
|
||||||
// return new Promise((resolve, reject) => {
|
// return new Promise((resolve, reject) => {
|
||||||
// logout(state.token)
|
// logout(state.token)
|
||||||
// .then(() => {
|
// .then(() => {
|
||||||
commit('SET_TOKEN', '')
|
commit("SET_TOKEN", "");
|
||||||
commit('SET_ROLES', [])
|
commit("SET_ROLES", []);
|
||||||
removeToken()
|
removeToken();
|
||||||
resetRouter()
|
resetRouter();
|
||||||
|
|
||||||
// reset visited views and cached views
|
// reset visited views and cached views
|
||||||
// to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485
|
// to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485
|
||||||
dispatch('tagsView/delAllViews', null, { root: true })
|
dispatch("tagsView/delAllViews", null, { root: true });
|
||||||
|
|
||||||
// resolve()
|
// resolve()
|
||||||
// })
|
// })
|
||||||
|
@ -100,40 +103,40 @@ const actions = {
|
||||||
// remove token
|
// remove token
|
||||||
resetToken({ commit }) {
|
resetToken({ commit }) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
commit('SET_TOKEN', '')
|
commit("SET_TOKEN", "");
|
||||||
console.log('resetToken')
|
console.log("resetToken");
|
||||||
commit('SET_ROLES', [])
|
commit("SET_ROLES", []);
|
||||||
removeToken()
|
removeToken();
|
||||||
resolve()
|
resolve();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// dynamically modify permissions
|
// dynamically modify permissions
|
||||||
async changeRoles({ commit, dispatch }, role) {
|
async changeRoles({ commit, dispatch }, role) {
|
||||||
const token = role + '-token'
|
const token = role + "-token";
|
||||||
|
|
||||||
commit('SET_TOKEN', token)
|
commit("SET_TOKEN", token);
|
||||||
setToken(token)
|
setToken(token);
|
||||||
|
|
||||||
const { roles } = await dispatch('getInfo')
|
const { roles } = await dispatch("getInfo");
|
||||||
|
|
||||||
resetRouter()
|
resetRouter();
|
||||||
|
|
||||||
// generate accessible routes map based on roles
|
// generate accessible routes map based on roles
|
||||||
const accessRoutes = await dispatch('permission/generateRoutes', roles, {
|
const accessRoutes = await dispatch("permission/generateRoutes", roles, {
|
||||||
root: true
|
root: true
|
||||||
})
|
});
|
||||||
// dynamically add accessible routes
|
// dynamically add accessible routes
|
||||||
router.addRoutes(accessRoutes)
|
router.addRoutes(accessRoutes);
|
||||||
|
|
||||||
// reset visited views and cached views
|
// reset visited views and cached views
|
||||||
dispatch('tagsView/delAllViews', null, { root: true })
|
dispatch("tagsView/delAllViews", null, { root: true });
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
namespaced: true,
|
namespaced: true,
|
||||||
state,
|
state,
|
||||||
mutations,
|
mutations,
|
||||||
actions
|
actions
|
||||||
}
|
};
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
import Vue from "vue";
|
||||||
|
|
||||||
|
/** 权限指令**/
|
||||||
|
const has = Vue.directive("has", {
|
||||||
|
// bind:只调用一次,指令第一次绑定到元素时调用。在这里可以进行一次性的初始化设置。
|
||||||
|
// inserted:被绑定元素插入父节点时调用
|
||||||
|
// (仅保证父节点存在,但不一定已被插入文档中)。
|
||||||
|
// update:所在组件的 VNode 更新时调用,但是可能发生在其子 VNode
|
||||||
|
// 更新之前。指令的值可能发生了改变,也可能没有。但是你可以通过比较更新前后的值来忽略不必要的模板更新。
|
||||||
|
inserted: function(el, binding, vnode) {
|
||||||
|
// 获取按钮权限
|
||||||
|
if (!Vue.prototype.$_has(binding.value)) {
|
||||||
|
console.log(el);
|
||||||
|
el.parentNode.removeChild(el);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 权限检查方法
|
||||||
|
Vue.prototype.$_has = function(value) {
|
||||||
|
let isExist = false;
|
||||||
|
const btnPermissionsStr = sessionStorage.getItem("Permissions");
|
||||||
|
if (btnPermissionsStr === undefined || btnPermissionsStr === null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (btnPermissionsStr.indexOf(value) > -1) {
|
||||||
|
isExist = true;
|
||||||
|
}
|
||||||
|
return isExist;
|
||||||
|
};
|
||||||
|
export { has };
|
|
@ -12,7 +12,7 @@
|
||||||
<el-form-item label="受理人" prop="residentInformation">
|
<el-form-item label="受理人" prop="residentInformation">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="convenience.residentInformation"
|
v-model="convenience.residentInformation"
|
||||||
placeholder="群众身份证号或者手机号"
|
placeholder="群众身份证号"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
|
@ -677,10 +677,24 @@
|
||||||
>
|
>
|
||||||
<div class="preview-container">
|
<div class="preview-container">
|
||||||
<el-form ref="updateForm" style="width:100%" :rules="rules">
|
<el-form ref="updateForm" style="width:100%" :rules="rules">
|
||||||
|
<!-- <el-form-item label="选择行政区域">
|
||||||
|
<el-cascader
|
||||||
|
class="filter-item"
|
||||||
|
v-model="regionSearchVal"
|
||||||
|
style="width:100%"
|
||||||
|
:options="regions"
|
||||||
|
:show-all-levels="false"
|
||||||
|
@change="handleRegionChange"
|
||||||
|
placeholder="行政区域"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="updateType === 8 || updateType === 11"
|
v-if="updateType === 8 || updateType === 11"
|
||||||
label="选择审批人"
|
label="选择审批人"
|
||||||
>
|
>
|
||||||
|
<!-- <span v-if="!staffOptions.length > 0" style="font-size:12px;color:red">该行政区域下无工作人员</span> -->
|
||||||
<el-select
|
<el-select
|
||||||
v-model="spr"
|
v-model="spr"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
@ -741,6 +755,12 @@
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="default" @click="applyDialog = false">取消</el-button>
|
<el-button type="default" @click="applyDialog = false">取消</el-button>
|
||||||
<el-button type="primary" @click="apply">提交</el-button>
|
<el-button type="primary" @click="apply">提交</el-button>
|
||||||
|
<!-- <el-button
|
||||||
|
type="primary"
|
||||||
|
:disabled="JSON.stringify(spr) === '[]'"
|
||||||
|
@click="apply"
|
||||||
|
>提交</el-button
|
||||||
|
> -->
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
@ -774,6 +794,8 @@ import {
|
||||||
import { parseTime } from "@/utils";
|
import { parseTime } from "@/utils";
|
||||||
import { staffList } from "@/api/staff";
|
import { staffList } from "@/api/staff";
|
||||||
import AliOss from "@/components/AliOSS/index.vue";
|
import AliOss from "@/components/AliOSS/index.vue";
|
||||||
|
// import { getRegions } from "@/api/region";
|
||||||
|
// import { mapGetters } from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
filters: {
|
filters: {
|
||||||
|
@ -832,6 +854,9 @@ export default {
|
||||||
return statusMap[status];
|
return statusMap[status];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// computed: {
|
||||||
|
// ...mapGetters(["regionIds"])
|
||||||
|
// },
|
||||||
components: {
|
components: {
|
||||||
AliOss
|
AliOss
|
||||||
},
|
},
|
||||||
|
@ -902,8 +927,14 @@ export default {
|
||||||
cxPop: false,
|
cxPop: false,
|
||||||
audioSources: [
|
audioSources: [
|
||||||
"http://storage.myntv.cn/files20210415_142012.m4a"
|
"http://storage.myntv.cn/files20210415_142012.m4a"
|
||||||
// 'https://img.tukuppt.com/newpreview_music/08/99/49/5c897788e421b53181.mp3'
|
],
|
||||||
]
|
regionSearchVal: undefined,
|
||||||
|
regions: [],
|
||||||
|
staffQuery: {
|
||||||
|
regionIds: "",
|
||||||
|
isAll: false,
|
||||||
|
category: "CONVENIENCE"
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -911,6 +942,7 @@ export default {
|
||||||
this.getStaffList();
|
this.getStaffList();
|
||||||
this.getCommunicationList();
|
this.getCommunicationList();
|
||||||
this.getTypeList();
|
this.getTypeList();
|
||||||
|
// this.getRegionList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getInfo() {
|
getInfo() {
|
||||||
|
@ -1065,7 +1097,18 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getStaffList() {
|
getStaffList() {
|
||||||
staffList().then(res => {
|
// let payload = Object.assign({}, this.staffQuery);
|
||||||
|
// let arr = payload.regionIds.split(",");
|
||||||
|
// arr.map((item, index) => {
|
||||||
|
// if (item === "false") {
|
||||||
|
// arr.splice(index, 1);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// payload.regionIds = arr.join(",");
|
||||||
|
|
||||||
|
// staffList(payload).then(res => {
|
||||||
|
// this.staffOptions = [];
|
||||||
|
staffList().then(res => {
|
||||||
res.d.records.map(item => {
|
res.d.records.map(item => {
|
||||||
const obj = {
|
const obj = {
|
||||||
label: item.name,
|
label: item.name,
|
||||||
|
@ -1166,6 +1209,24 @@ export default {
|
||||||
// evaluation: undefined
|
// evaluation: undefined
|
||||||
},
|
},
|
||||||
handleApprovalReminder() {
|
handleApprovalReminder() {
|
||||||
|
// this.regionSearchVal = [];
|
||||||
|
// this.getStaffList();
|
||||||
|
// this.dialogApprovalReminder = true;
|
||||||
|
// const tempLen = this.regionIds.split(",").length;
|
||||||
|
// switch (tempLen) {
|
||||||
|
// case 1:
|
||||||
|
// this.regionSearchVal.push(this.regionIds, false);
|
||||||
|
// break;
|
||||||
|
// case 2:
|
||||||
|
// this.regionSearchVal.push(this.regionIds, false);
|
||||||
|
// break;
|
||||||
|
// case 3:
|
||||||
|
// this.regionSearchVal.push(this.regionIds);
|
||||||
|
// break;
|
||||||
|
// default:
|
||||||
|
// this.regionSearchVal = [];
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
this.dialogApprovalReminder = true;
|
this.dialogApprovalReminder = true;
|
||||||
},
|
},
|
||||||
handleConfirmApprovalReminder() {
|
handleConfirmApprovalReminder() {
|
||||||
|
@ -1283,6 +1344,9 @@ export default {
|
||||||
this.payload.ids.push(this.bzjr);
|
this.payload.ids.push(this.bzjr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// this.$refs.updateForm.validate(valid => {
|
||||||
|
// console.log(valid);
|
||||||
|
// });
|
||||||
update(this.payload).then(res => {
|
update(this.payload).then(res => {
|
||||||
if (res.c === 200) {
|
if (res.c === 200) {
|
||||||
this.$notify.success("操作成功");
|
this.$notify.success("操作成功");
|
||||||
|
@ -1356,12 +1420,63 @@ export default {
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const tempRef = this.$refs.eventTypeRef;
|
const tempRef = this.$refs.eventTypeRef;
|
||||||
console.log(tempRef);
|
|
||||||
if (tempRef) tempRef.toggleMenu();
|
if (tempRef) tempRef.toggleMenu();
|
||||||
// tempRef.$el.style.display = "inline-block";
|
// tempRef.$el.style.display = "inline-block";
|
||||||
// this.$refs.eventTypeRef.focusFirstNode();
|
// this.$refs.eventTypeRef.focusFirstNode();
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
},
|
||||||
|
// getRegionList() {
|
||||||
|
// getRegions().then(res => {
|
||||||
|
// const tempData = res.d;
|
||||||
|
// const countyArr = []; // 县,1
|
||||||
|
// tempData.map(county => {
|
||||||
|
// const countyObj = {
|
||||||
|
// value: county.root.id,
|
||||||
|
// label: county.root.name,
|
||||||
|
// disabled: !county.root.check,
|
||||||
|
// // children: [{value:true,label:'全县'},{value:false,label:'本县'}],
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// value: false,
|
||||||
|
// label: county.root.name,
|
||||||
|
// disabled: false
|
||||||
|
// // children: []
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// };
|
||||||
|
// countyArr.push(countyObj);
|
||||||
|
// county.node.map(town => {
|
||||||
|
// const townObj = {
|
||||||
|
// value: town.root.id,
|
||||||
|
// label: town.root.name,
|
||||||
|
// disabled: !town.root.check,
|
||||||
|
// // children: [{value:true,label:'全镇'},{value:false,label:'本镇'}],
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// value: false,
|
||||||
|
// label: town.root.name,
|
||||||
|
// disabled: false
|
||||||
|
// // children: []
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// };
|
||||||
|
// countyObj.children.push(townObj);
|
||||||
|
// town.node.map(country => {
|
||||||
|
// townObj.children.push({
|
||||||
|
// value: country.root.id,
|
||||||
|
// label: country.root.name,
|
||||||
|
// disabled: !country.root.check
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// this.regions = countyArr;
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// handleRegionChange(val) {
|
||||||
|
// this.staffQuery.regionIds = val.join(",");
|
||||||
|
// this.getStaffList();
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
beforeRouteLeave(to, from, next) {
|
beforeRouteLeave(to, from, next) {
|
||||||
clearInterval(this.acceptanceInterval);
|
clearInterval(this.acceptanceInterval);
|
||||||
|
|
|
@ -126,6 +126,8 @@ export default {
|
||||||
// password: '111111'
|
// password: '111111'
|
||||||
// },
|
// },
|
||||||
loginForm: {
|
loginForm: {
|
||||||
|
// username: "", //18882564006
|
||||||
|
// captcha: "",
|
||||||
username: "18882564006", //18882564006
|
username: "18882564006", //18882564006
|
||||||
captcha: "111111",
|
captcha: "111111",
|
||||||
appVersion: "1.0.0",
|
appVersion: "1.0.0",
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
<div class="app-container" style="padding-top:0">
|
<div class="app-container" style="padding-top:0">
|
||||||
<!-- <div>{{ list }}</div> -->
|
<!-- <div>{{ list }}</div> -->
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
|
<!-- <el-button v-if="list" id="te" type="warning" v-has="'editor'">abc</el-button> -->
|
||||||
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.params.name"
|
v-model="listQuery.params.name"
|
||||||
style="width:200px;margin-right:10px"
|
style="width:200px;margin-right:10px"
|
||||||
|
@ -47,7 +49,8 @@
|
||||||
>是否是便民工作人员</span
|
>是否是便民工作人员</span
|
||||||
> -->
|
> -->
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-model="listQuery.params.isConvenience"
|
v-model="isStaff"
|
||||||
|
@change="handleIsStaff"
|
||||||
style="margin-left:10px"
|
style="margin-left:10px"
|
||||||
>是否是便民工作人员</el-checkbox
|
>是否是便民工作人员</el-checkbox
|
||||||
>
|
>
|
||||||
|
@ -70,28 +73,31 @@
|
||||||
>新增</el-button
|
>新增</el-button
|
||||||
>
|
>
|
||||||
<el-table :data="list" style="width: 100%" border v-loading="listLoading">
|
<el-table :data="list" style="width: 100%" border v-loading="listLoading">
|
||||||
<el-table-column prop="name" label="姓名" width="180">
|
<el-table-column prop="name" label="姓名" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.name }}
|
{{ scope.row.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="nameZ" label="姓名(藏语)" width="180">
|
<el-table-column prop="nameZ" label="姓名(藏语)" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.nameZ }}
|
{{ scope.row.nameZ }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="phone" label="手机号">
|
|
||||||
|
<el-table-column prop="phone" label="手机号" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.phone }}
|
{{ scope.row.phone }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="phone" label="身份证号">
|
|
||||||
|
<el-table-column prop="phone" label="身份证号" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.idCard }}
|
{{ scope.row.idCard }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="phone" label="是否是便民工作人员">
|
<el-table-column prop="phone" label="是否是便民工作人员" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.isConvenience ? "是" : "否" }}
|
{{ scope.row.isConvenience ? "是" : "否" }}
|
||||||
</template>
|
</template>
|
||||||
|
@ -101,8 +107,9 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{
|
{{
|
||||||
scope.row.permanentResidenceRegion +
|
scope.row.permanentResidenceRegion +
|
||||||
"-" +
|
(scope.row.permanentResidenceTown
|
||||||
scope.row.permanentResidenceTown +
|
? "-" + scope.row.permanentResidenceTown
|
||||||
|
: "") +
|
||||||
(scope.row.permanentResidenceTownShip
|
(scope.row.permanentResidenceTownShip
|
||||||
? "-" + scope.row.permanentResidenceTownShip
|
? "-" + scope.row.permanentResidenceTownShip
|
||||||
: "")
|
: "")
|
||||||
|
@ -118,6 +125,13 @@
|
||||||
style="font-size:12px;padding:10px 20px"
|
style="font-size:12px;padding:10px 20px"
|
||||||
>修改</el-button
|
>修改</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
type="danger"
|
||||||
|
size="mini"
|
||||||
|
style="font-size:12px;padding:10px 20px;border-radius:21px"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -134,10 +148,9 @@
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:title="textMap[dialogStatus]"
|
:title="textMap[dialogStatus]"
|
||||||
:visible.sync="dialogAddVisible"
|
:visible.sync="dialogAddVisible"
|
||||||
width="30%"
|
:close-on-press-escape="false"
|
||||||
|
width="60%"
|
||||||
>
|
>
|
||||||
<!-- <span></span> -->
|
|
||||||
<!-- <div>居民名称</div> -->
|
|
||||||
<el-form
|
<el-form
|
||||||
:model="residentInfo"
|
:model="residentInfo"
|
||||||
ref="residentInfoForm"
|
ref="residentInfoForm"
|
||||||
|
@ -145,86 +158,96 @@
|
||||||
class="el-form"
|
class="el-form"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
>
|
>
|
||||||
<el-form-item label="头像">
|
<el-row :gutter="20">
|
||||||
<cut-upload
|
<el-col :span="12">
|
||||||
:fixed-number="[1, 1]"
|
<el-form-item label="头像">
|
||||||
:init-url="residentInfo.avatar"
|
<cut-upload
|
||||||
@imgupload="UploadCbk"
|
:fixed-number="[1, 1]"
|
||||||
/>
|
:init-url="residentInfo.avatar"
|
||||||
</el-form-item>
|
@imgupload="UploadCbk"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="姓名" prop="name">
|
<el-form-item label="姓名" prop="name">
|
||||||
<el-input v-model="residentInfo.name" />
|
<el-input v-model="residentInfo.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="姓名(藏文)">
|
<el-form-item label="姓名(藏文)">
|
||||||
<el-input v-model="residentInfo.nameZ" />
|
<el-input v-model="residentInfo.nameZ" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="性别">
|
<el-form-item label="性别">
|
||||||
<el-radio v-model="residentInfo.sex" :label="0">女</el-radio>
|
<el-radio v-model="residentInfo.sex" :label="0">女</el-radio>
|
||||||
<el-radio v-model="residentInfo.sex" :label="1">男</el-radio>
|
<el-radio v-model="residentInfo.sex" :label="1">男</el-radio>
|
||||||
<el-radio v-model="residentInfo.sex" :label="2">未知</el-radio>
|
<el-radio v-model="residentInfo.sex" :label="2">未知</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="手机号">
|
<el-form-item label="手机号">
|
||||||
<el-input v-model="residentInfo.phone" />
|
<el-input v-model="residentInfo.phone" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="身份证号" prop="idCard">
|
<el-form-item label="身份证号" prop="idCard">
|
||||||
<el-input v-model="residentInfo.idCard" />
|
<el-input v-model="residentInfo.idCard" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="身份证地址">
|
<el-form-item label="身份证地址">
|
||||||
<el-input v-model="residentInfo.idCardAddress" />
|
<el-input v-model="residentInfo.idCardAddress" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" style="padding-top:40px">
|
||||||
|
<el-form-item label="职责">
|
||||||
|
<el-input v-model="residentInfo.duty" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="职责">
|
<el-form-item label="职责(藏文)">
|
||||||
<el-input v-model="residentInfo.duty" />
|
<el-input v-model="residentInfo.dutyZ" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="职责(藏文)">
|
<el-form-item label="描述">
|
||||||
<el-input v-model="residentInfo.dutyZ" />
|
<el-input v-model="residentInfo.description" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="描述">
|
<el-form-item label="描述(藏文)">
|
||||||
<el-input v-model="residentInfo.description" />
|
<el-input v-model="residentInfo.descriptionZ" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="描述(藏文)">
|
<el-form-item label="序号">
|
||||||
<el-input v-model="residentInfo.descriptionZ" />
|
<el-input v-model="residentInfo.sort" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="序号">
|
<el-form-item label="行政区域" prop="regionIds">
|
||||||
<el-input v-model="residentInfo.sort" />
|
<el-cascader
|
||||||
</el-form-item>
|
v-model="residentInfo.regionIds"
|
||||||
|
style="width:240px"
|
||||||
|
:options="regions"
|
||||||
|
:props="{ checkStrictly: true }"
|
||||||
|
placeholder="行政区域"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="行政区域" prop="regionIds">
|
<el-form-item label="是否是便民工作人员">
|
||||||
<!-- <RegionSelect
|
<el-switch v-model="residentInfo.isConvenience"></el-switch>
|
||||||
v-model="residentInfo.regionIds"
|
</el-form-item>
|
||||||
|
|
||||||
/> -->
|
|
||||||
<!-- <RegionSelect
|
|
||||||
v-model="residentInfo.regionIds"
|
|
||||||
:regionNames="residentInfo.regionids"
|
|
||||||
/> -->
|
|
||||||
<el-cascader
|
|
||||||
v-model="residentInfo.regionIds"
|
|
||||||
style="width:240px"
|
|
||||||
:options="regions"
|
|
||||||
:props="{ checkStrictly: true }"
|
|
||||||
placeholder="行政区域"
|
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="是否是便民工作人员">
|
<el-form-item label="是否是便民领导">
|
||||||
<el-switch v-model="residentInfo.isConvenience"></el-switch>
|
<el-switch v-model="residentInfo.isConvenienceLeader"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="是否是便民领导">
|
<el-form-item label="授权权限" v-has="'RESIDENT_SET_ADMIN'">
|
||||||
<el-switch v-model="residentInfo.isConvenienceLeader"></el-switch>
|
<el-select
|
||||||
</el-form-item>
|
v-model="residentInfo.isResidentsAdministrator"
|
||||||
|
multiple
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
label="设置权限"
|
||||||
|
value="RESIDENT_SET_ADMIN"
|
||||||
|
></el-option>
|
||||||
|
<el-option label="居民管理" value="RESIDENT_ADMIN"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<!-- <el-form-item label="是否是融媒体工作人员">
|
<!-- <el-form-item label="是否是融媒体工作人员">
|
||||||
<el-switch v-model="residentInfo.isNews"></el-switch>
|
<el-switch v-model="residentInfo.isNews"></el-switch>
|
||||||
|
@ -245,6 +268,19 @@
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="提示"
|
||||||
|
:visible.sync="dialogDeleteConfirm"
|
||||||
|
width="30%"
|
||||||
|
center
|
||||||
|
>
|
||||||
|
<span>确定删除吗?</span>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogDeleteConfirm = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="deleteData">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -252,7 +288,8 @@
|
||||||
import {
|
import {
|
||||||
getResidentInfoList,
|
getResidentInfoList,
|
||||||
addResidentInfoList,
|
addResidentInfoList,
|
||||||
updateResidentInfo
|
updateResidentInfo,
|
||||||
|
deleteResident
|
||||||
} from "@/api/residentInformation";
|
} from "@/api/residentInformation";
|
||||||
import RegionSelect from "@/components/RegionSelect";
|
import RegionSelect from "@/components/RegionSelect";
|
||||||
import { getRegions } from "@/api/region";
|
import { getRegions } from "@/api/region";
|
||||||
|
@ -296,7 +333,9 @@ export default {
|
||||||
residentInfo: {
|
residentInfo: {
|
||||||
avatar: ""
|
avatar: ""
|
||||||
},
|
},
|
||||||
regionSearchVal: undefined
|
regionSearchVal: undefined,
|
||||||
|
dialogDeleteConfirm: false,
|
||||||
|
isStaff: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -307,7 +346,6 @@ export default {
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
getResidentInfoList(this.listQuery).then(res => {
|
getResidentInfoList(this.listQuery).then(res => {
|
||||||
// console.log(res);
|
|
||||||
this.list = res.d.list;
|
this.list = res.d.list;
|
||||||
this.total = res.d.total;
|
this.total = res.d.total;
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
|
@ -321,7 +359,7 @@ export default {
|
||||||
const countyObj = {
|
const countyObj = {
|
||||||
value: county.root.name,
|
value: county.root.name,
|
||||||
label: county.root.name,
|
label: county.root.name,
|
||||||
disabled: true,
|
disabled: !county.root.check,
|
||||||
children: []
|
children: []
|
||||||
};
|
};
|
||||||
countyArr.push(countyObj);
|
countyArr.push(countyObj);
|
||||||
|
@ -346,8 +384,8 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
|
this.listQuery.params.isConvenience = this.isStaff ? true : undefined;
|
||||||
if (this.regionSearchVal) {
|
if (this.regionSearchVal) {
|
||||||
// console.log(this.regionSearchVal.length);
|
|
||||||
switch (this.regionSearchVal.length) {
|
switch (this.regionSearchVal.length) {
|
||||||
case 1:
|
case 1:
|
||||||
this.listQuery.params.PermanentResidenceRegion = this.regionSearchVal[0];
|
this.listQuery.params.PermanentResidenceRegion = this.regionSearchVal[0];
|
||||||
|
@ -392,7 +430,7 @@ export default {
|
||||||
isConvenienceLeader: false,
|
isConvenienceLeader: false,
|
||||||
isNews: false,
|
isNews: false,
|
||||||
isNewsLeader: false,
|
isNewsLeader: false,
|
||||||
// isResidentsAdministrator: false,
|
isResidentsAdministrator: [],
|
||||||
phone: undefined,
|
phone: undefined,
|
||||||
sex: undefined,
|
sex: undefined,
|
||||||
regionIds: undefined,
|
regionIds: undefined,
|
||||||
|
@ -415,7 +453,6 @@ export default {
|
||||||
this.residentInfo.permanentResidenceRegion = regions[0];
|
this.residentInfo.permanentResidenceRegion = regions[0];
|
||||||
this.residentInfo.permanentResidenceTown = regions[1];
|
this.residentInfo.permanentResidenceTown = regions[1];
|
||||||
this.residentInfo.permanentResidenceTownShip = regions[2];
|
this.residentInfo.permanentResidenceTownShip = regions[2];
|
||||||
// delete this.residentInfo.regionIds;
|
|
||||||
},
|
},
|
||||||
createData() {
|
createData() {
|
||||||
this.$refs.residentInfoForm.validate(valid => {
|
this.$refs.residentInfoForm.validate(valid => {
|
||||||
|
@ -442,7 +479,7 @@ export default {
|
||||||
this.formatSubmitParams();
|
this.formatSubmitParams();
|
||||||
delete this.residentInfo.regionIds;
|
delete this.residentInfo.regionIds;
|
||||||
updateResidentInfo(this.residentInfo).then(res => {
|
updateResidentInfo(this.residentInfo).then(res => {
|
||||||
console.log(res);
|
// console.log(res);
|
||||||
if (res.c === 200) {
|
if (res.c === 200) {
|
||||||
this.$notify.success("修改成功");
|
this.$notify.success("修改成功");
|
||||||
this.dialogAddVisible = false;
|
this.dialogAddVisible = false;
|
||||||
|
@ -471,6 +508,35 @@ export default {
|
||||||
this.dialogStatus = "update";
|
this.dialogStatus = "update";
|
||||||
this.dialogAddVisible = true;
|
this.dialogAddVisible = true;
|
||||||
// },100);
|
// },100);
|
||||||
|
},
|
||||||
|
handleDelete(row) {
|
||||||
|
this.residentInfo = Object.assign({}, row);
|
||||||
|
this.dialogDeleteConfirm = true;
|
||||||
|
},
|
||||||
|
deleteData() {
|
||||||
|
deleteResident({ id: this.residentInfo.id }).then(res => {
|
||||||
|
// console.log(res);
|
||||||
|
if (res.c === 200) {
|
||||||
|
this.$notify.success("删除成功");
|
||||||
|
this.dialogDeleteConfirm = false;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleIsStaff(val) {
|
||||||
|
// console.log(val);
|
||||||
|
if (val === false) {
|
||||||
|
// console.log('ab');
|
||||||
|
this.listQuery.params.isConvenience === undefined;
|
||||||
|
let temp = Object.assign({}, this.listQuery);
|
||||||
|
temp.params.isConvenience === undefined;
|
||||||
|
this.listQuery = temp;
|
||||||
|
// console.log(this.listQuery);
|
||||||
|
}
|
||||||
|
// if (!val) {
|
||||||
|
// this.listQuery.params.isConvenience === undefined;
|
||||||
|
// console.log(this.listQuery.params);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,7 +25,8 @@ module.exports = {
|
||||||
* Detail: https://cli.vuejs.org/config/#publicpath
|
* Detail: https://cli.vuejs.org/config/#publicpath
|
||||||
*/
|
*/
|
||||||
publicPath: '/',
|
publicPath: '/',
|
||||||
outputDir: 'dist',
|
// outputDir: 'dist',
|
||||||
|
outputDir: process.env.NODE_ENV === 'development' ? 'convenience-dev' : 'convenience-prod',
|
||||||
assetsDir: 'static',
|
assetsDir: 'static',
|
||||||
lintOnSave: process.env.NODE_ENV === 'development',
|
lintOnSave: process.env.NODE_ENV === 'development',
|
||||||
productionSourceMap: false,
|
productionSourceMap: false,
|
||||||
|
|
Loading…
Reference in New Issue