Compare commits

...

12 Commits

  1. 117
      acupuncture-前台/src/App.vue
  2. 8
      acupuncture-前台/src/api/medicalFile.js
  3. 1
      acupuncture-前台/src/store/getters.js
  4. 148
      acupuncture-前台/src/store/modules/user.js
  5. 61
      acupuncture-前台/src/views/medicalFile/index.vue
  6. BIN
      acupuncture-前台/南宁针灸前台ssl-4.zip
  7. 52
      acupuncture-后台/src/api/monitor/cache.js
  8. 10
      acupuncture-后台/src/api/report.js
  9. 2
      acupuncture-后台/src/views/followFile/work.vue
  10. 2
      acupuncture-后台/src/views/medicalFile/index.vue
  11. 103
      acupuncture-后台/src/views/monitor/cache/list.vue
  12. 5
      acupuncture-后台/src/views/monitor/online/index.vue
  13. 25
      acupuncture-后台/src/views/monitor/server/index.vue
  14. 913
      acupuncture-后台/src/views/report/manage.vue
  15. 715
      acupuncture-后台/src/views/report/type.vue
  16. 268
      acupuncture-后台/src/views/system/dict/data.vue
  17. 2
      acupuncture-后台/src/views/system/dict/index.vue
  18. 30
      acupuncture-后台/src/views/system/menu/index.vue
  19. 276
      acupuncture-后台/src/views/system/notice/index.vue
  20. 388
      acupuncture-后台/src/views/system/role/index.vue
  21. BIN
      acupuncture-后台/南宁针灸后台ssl-4.zip

117
acupuncture-前台/src/App.vue

@ -2,15 +2,130 @@
<div id="app"> <div id="app">
<router-view /> <router-view />
<theme-picker /> <theme-picker />
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
title="修改密码"
:visible.sync="passShow"
width="620px"
append-to-body
class="popup"
:show-close="false"
>
<el-form ref="form" :model="user" :rules="rules" label-width="80px">
<el-form-item label="旧密码" prop="oldPassword">
<el-input
v-model="user.oldPassword"
placeholder="请输入旧密码"
type="password"
show-password
/>
</el-form-item>
<el-form-item label="新密码" prop="newPassword">
<el-input
v-model="user.newPassword"
placeholder="请输入新密码"
type="password"
show-password
/>
</el-form-item>
<el-form-item label="确认密码" prop="confirmPassword">
<el-input
v-model="user.confirmPassword"
placeholder="请确认新密码"
type="password"
show-password
/>
</el-form-item>
<el-form-item label=" " style="margin-bottom: 0px">
<template slot-scope="scope">
<el-button type="primary" @click="submit" size="mini"
> </el-button
>
</template>
</el-form-item>
</el-form>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { updateUserPwd } from "@/api/system/user";
import ThemePicker from "@/components/ThemePicker"; import ThemePicker from "@/components/ThemePicker";
import { mapState, mapMutations } from "vuex";
export default { export default {
name: "App", name: "App",
components: { ThemePicker }, components: { ThemePicker },
data() {
const equalToPassword = (rule, value, callback) => {
if (this.user.newPassword !== value) {
callback(new Error("两次输入的密码不一致"));
} else {
callback();
}
};
return {
passShow: false,
user: {
oldPassword: undefined,
newPassword: undefined,
confirmPassword: undefined,
},
rules: {
oldPassword: [
{ required: true, message: "旧密码不能为空", trigger: "blur" },
],
newPassword: [
{ required: true, message: "密码不能为空", trigger: "blur" },
{
pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[^\da-zA-Z\s]).{8,20}$/,
message: "必须包含数字、字母、特殊字符, 长度为8到20位",
trigger: "blur",
},
],
confirmPassword: [
{ required: true, message: "确认密码不能为空", trigger: "blur" },
{ required: true, validator: equalToPassword, trigger: "blur" },
],
},
userInfo: {},
};
},
computed: {
...mapState({
forceUpdPwdFlag: (state) => state.user.forceUpdPwdFlag,
}),
},
watch: {
// storeforceUpdPwdFlag
forceUpdPwdFlag(new1, old) {
if (new1) {
this.passShow = true;
}
},
},
created() {},
methods: {
submit() {
this.$refs["form"].validate(async (valid) => {
if (valid) {
const res = await updateUserPwd(
this.user.oldPassword,
this.user.newPassword
);
const { code, msg } = res;
if (code === 200) {
this.passShow = false;
this.$message.success("修改成功");
// const res = await getInfo();
} else {
this.$message.warning(msg);
}
}
});
},
},
metaInfo() { metaInfo() {
return { return {
title: title:

8
acupuncture-前台/src/api/medicalFile.js

@ -32,6 +32,14 @@ export function treatmentDel(data) {
data: data, data: data,
}); });
} }
// 查询上报管理
export function managerMy(data) {
return request({
url: "/report/queryManagerMy",
method: "post",
data: data,
});
}
// 档案详情 // 档案详情
export function queryRecord(data) { export function queryRecord(data) {
return request({ return request({

1
acupuncture-前台/src/store/getters.js

@ -15,5 +15,6 @@ const getters = {
topbarRouters:state => state.permission.topbarRouters, topbarRouters:state => state.permission.topbarRouters,
defaultRoutes:state => state.permission.defaultRoutes, defaultRoutes:state => state.permission.defaultRoutes,
sidebarRouters:state => state.permission.sidebarRouters, sidebarRouters:state => state.permission.sidebarRouters,
forceUpdPwdFlag: state => state.user.forceUpdPwdFlag,
} }
export default getters export default getters

148
acupuncture-前台/src/store/modules/user.js

@ -1,107 +1,121 @@
import { login, logout, getInfo } from '@/api/login' import { login, logout, getInfo } from "@/api/login";
import { getToken, setToken, removeToken } from '@/utils/auth' import { getToken, setToken, removeToken } from "@/utils/auth";
import { isHttp, isEmpty } from "@/utils/validate" import { isHttp, isEmpty } from "@/utils/validate";
import defAva from '@/assets/images/profile.jpg' import defAva from "@/assets/images/profile.jpg";
const user = { const user = {
state: { state: {
token: getToken(), token: getToken(),
id: '', id: "",
name: '', name: "",
avatar: '', avatar: "",
roles: [], roles: [],
permissions: [] permissions: [],
forceUpdPwdFlag: 0,
}, },
mutations: { mutations: {
SET_TOKEN: (state, token) => { SET_TOKEN: (state, token) => {
state.token = token state.token = token;
}, },
SET_ID: (state, id) => { SET_ID: (state, id) => {
state.id = id state.id = id;
}, },
SET_NAME: (state, name) => { SET_NAME: (state, 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) => {
state.roles = roles state.roles = roles;
}, },
SET_PERMISSIONS: (state, permissions) => { SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions state.permissions = permissions;
} },
SET_PWDFLAG: (state, data) => {
state.forceUpdPwdFlag = data;
},
}, },
actions: { actions: {
// 登录 // 登录
Login({ commit }, userInfo) { Login({ commit }, userInfo) {
const username = userInfo.username.trim() const username = userInfo.username.trim();
const password = userInfo.password const password = userInfo.password;
const code = userInfo.code const code = userInfo.code;
const uuid = userInfo.uuid const uuid = userInfo.uuid;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
login(username, password, code, uuid).then(res => { login(username, password, code, uuid)
setToken(res.token) .then((res) => {
commit('SET_TOKEN', res.token) setToken(res.token);
resolve() commit("SET_TOKEN", res.token);
}).catch(error => { resolve();
reject(error) })
}) .catch((error) => {
}) reject(error);
});
});
}, },
// 获取用户信息 // 获取用户信息
GetInfo({ commit, state }) { GetInfo({ commit, state }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getInfo().then(res => { getInfo()
const user = res.user .then((res) => {
localStorage.setItem("user", JSON.stringify(user)) const user = res.user;
let avatar = user.avatar || "" commit("SET_PWDFLAG", res.forceUpdPwdFlag);
if (!isHttp(avatar)) { localStorage.setItem("user", JSON.stringify(user));
avatar = (isEmpty(avatar)) ? defAva : process.env.VUE_APP_BASE_API + avatar let avatar = user.avatar || "";
} if (!isHttp(avatar)) {
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 avatar = isEmpty(avatar)
commit('SET_ROLES', res.roles) ? defAva
commit('SET_PERMISSIONS', res.permissions) : process.env.VUE_APP_BASE_API + avatar;
} else { }
commit('SET_ROLES', ['ROLE_DEFAULT']) if (res.roles && res.roles.length > 0) {
} // 验证返回的roles是否是一个非空数组
commit('SET_ID', user.userId) commit("SET_ROLES", res.roles);
commit('SET_NAME', user.userName) commit("SET_PERMISSIONS", res.permissions);
commit('SET_AVATAR', avatar) } else {
resolve(res) commit("SET_ROLES", ["ROLE_DEFAULT"]);
}).catch(error => { }
reject(error) commit("SET_ID", user.userId);
}) commit("SET_NAME", user.userName);
}) commit("SET_AVATAR", avatar);
resolve(res);
})
.catch((error) => {
reject(error);
});
});
}, },
// 退出系统 // 退出系统
LogOut({ commit, state }) { LogOut({ commit, state }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
logout(state.token).then(() => { logout(state.token)
commit('SET_TOKEN', '') .then(() => {
commit('SET_ROLES', []) commit("SET_TOKEN", "");
commit('SET_PERMISSIONS', []) commit("SET_ROLES", []);
removeToken() commit("SET_PERMISSIONS", []);
resolve() removeToken();
}).catch(error => { resolve();
reject(error) })
}) .catch((error) => {
}) reject(error);
});
});
}, },
// 前端 登出 // 前端 登出
FedLogOut({ commit }) { FedLogOut({ commit }) {
return new Promise(resolve => { return new Promise((resolve) => {
commit('SET_TOKEN', '') commit("SET_TOKEN", "");
removeToken() removeToken();
resolve() resolve();
}) });
} },
} },
} };
export default user export default user;

61
acupuncture-前台/src/views/medicalFile/index.vue

@ -48,14 +48,6 @@
<el-option label="女" :value="1" /> <el-option label="女" :value="1" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item label="手机号码" prop="phone">
<el-input v-model="queryParams.param.phone" placeholder="请输入" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="证件号码" prop="idCard">
<el-input v-model="queryParams.param.idCard" placeholder="请输入" clearable
@keyup.enter.native="handleQuery" />
</el-form-item> -->
<el-form-item label="年龄范围" prop="createBy"> <el-form-item label="年龄范围" prop="createBy">
<div class="form-item-age"> <div class="form-item-age">
<el-input <el-input
@ -93,6 +85,20 @@
<el-option label="驳回" :value="3" /> <el-option label="驳回" :value="3" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="上报" prop="managementId">
<el-select
v-model="queryParams.param.managementId"
placeholder="请选择"
>
<el-option
v-for="item in managerMyList"
:key="item.id"
:label="item.reportTitle"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
@ -471,9 +477,20 @@
ref="form" ref="form"
:model="form" :model="form"
:rules="rules" :rules="rules"
label-width="140px" label-width="100px"
class="formStep" class="formStep"
> >
<el-form-item label="上报" prop="managementId">
<el-select v-model="form.managementId" placeholder="请选择">
<el-option
v-for="item in managerMyList"
:key="item.id"
:label="item.reportTitle"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="姓名" prop="name"> <el-form-item label="姓名" prop="name">
<el-input v-model="form.name" placeholder="请输入" /> <el-input v-model="form.name" placeholder="请输入" />
</el-form-item> </el-form-item>
@ -578,18 +595,6 @@
<el-form-item label="责任医生" prop=""> <el-form-item label="责任医生" prop="">
<el-input v-model="form.doctor" placeholder="请输入" /> <el-input v-model="form.doctor" placeholder="请输入" />
</el-form-item> </el-form-item>
<!-- <el-form-item label="随访队列" prop="queueIdList">
<el-select v-model="form.queueIdList" multiple placeholder="请选择">
<el-option
v-for="item in followupList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item> -->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -644,6 +649,7 @@ import {
saveAidRecord, saveAidRecord,
queueAdd, queueAdd,
exportTreatmentPg, exportTreatmentPg,
managerMy,
} from "@/api/medicalFile"; } from "@/api/medicalFile";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { followupQuery } from "@/api/followupFile"; import { followupQuery } from "@/api/followupFile";
@ -653,7 +659,7 @@ export default {
data() { data() {
return { return {
reportPath: "", reportPath: "",
managerMyList: [], //
timestamp: "", timestamp: "",
qzUrl: process.env.VUE_APP_API_QZURL, // qzUrl: process.env.VUE_APP_API_QZURL, //
userInfo: {}, userInfo: {},
@ -992,10 +998,19 @@ export default {
this.open = true; this.open = true;
} }
this.getList(); this.getList();
this.getManagerMy();
this.userInfo = JSON.parse(localStorage.getItem("user")); this.userInfo = JSON.parse(localStorage.getItem("user"));
// this.getFollowupQuery(); // this.getFollowupQuery();
}, },
methods: { methods: {
getManagerMy() {
managerMy({
pageNum: -1,
param: {},
}).then((res) => {
this.managerMyList = res.data.list;
});
},
// 访 // 访
getFollowupQuery() { getFollowupQuery() {
followupQuery({ followupQuery({
@ -1077,6 +1092,7 @@ export default {
doctor: "", doctor: "",
status: 0, status: 0,
queueIdList: [], queueIdList: [],
managementId: "",
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -1098,6 +1114,7 @@ export default {
endAge: "", endAge: "",
doctor: "", doctor: "",
status: "", status: "",
managementId: "",
}; };
this.handleQuery(); this.handleQuery();
}, },

BIN
acupuncture-前台/南宁针灸前台ssl-添加不良反应、并发症1.zip → acupuncture-前台/南宁针灸前台ssl-4.zip

Binary file not shown.

52
acupuncture-后台/src/api/monitor/cache.js

@ -1,57 +1,65 @@
import request from '@/utils/request' import request from "@/utils/request";
// 查询缓存详细 // 查询缓存详细
export function getCache() { export function getCache() {
return request({ return request({
url: '/monitor/cache', url: "/monitor/cache",
method: 'get' method: "get",
}) });
} }
// 查询缓存名称列表 // 查询缓存名称列表
export function listCacheName() { export function listCacheName() {
return request({ return request({
url: '/monitor/cache/getNames', url: "/monitor/cache/getNames",
method: 'get' method: "get",
}) });
} }
// 查询缓存键名列表 // 查询缓存键名列表
export function listCacheKey(cacheName) { export function listCacheKey(cacheName) {
return request({ return request({
url: '/monitor/cache/getKeys/' + cacheName, url: "/monitor/cache/getKeys/" + cacheName,
method: 'get' method: "get",
}) });
} }
// 查询缓存内容 // 查询缓存内容
export function getCacheValue(cacheName, cacheKey) { export function getCacheValue(cacheName, cacheKey) {
return request({ return request({
url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey, url: "/monitor/cache/getValue/" + cacheName + "/" + cacheKey,
method: 'get' method: "get",
}) });
} }
// 清理指定名称缓存 // 清理指定名称缓存
export function clearCacheName(cacheName) { export function clearCacheName(cacheName) {
return request({ return request({
url: '/monitor/cache/clearCacheName/' + cacheName, url: "/monitor/cache/clearCacheName/" + cacheName,
method: 'delete' method: "delete",
}) });
} }
// 清理指定键名缓存 // 清理指定键名缓存
export function clearCacheKey(cacheKey) { export function clearCacheKey(cacheKey) {
return request({ return request({
url: '/monitor/cache/clearCacheKey/' + cacheKey, url: "/monitor/cache/clearCacheKey/" + cacheKey,
method: 'delete' method: "delete",
}) });
} }
// 清理全部缓存 // 清理全部缓存
export function clearCacheAll() { export function clearCacheAll() {
return request({ return request({
url: '/monitor/cache/clearCacheAll', url: "/monitor/cache/clearCacheAll",
method: 'delete' method: "delete",
}) });
}
// 新增修改
export function cacheAdd(query) {
return request({
url: "/monitor/cache/add",
method: "get",
params: query,
});
} }

10
acupuncture-后台/src/api/report.js

@ -61,4 +61,12 @@ export function managerDel(data) {
method: "post", method: "post",
data: data, data: data,
}); });
} }
// 下载上报汇总表
export function reportDown(data) {
return request({
url: "/admin/treatment/adminExportTreatmentPgZip",
method: "post",
data: data,
});
}

2
acupuncture-后台/src/views/followFile/work.vue

@ -530,7 +530,7 @@ export default {
created() { created() {
let { name, phone } = this.$route.query; let { name, phone } = this.$route.query;
this.queryParams.param.keywords = name || ""; this.queryParams.param.keywords = name || "";
this.queryParams.param.phone = phone || ""; this.queryParams.param.phone = phone !== 'null' ? phone : "";
this.getList(); this.getList();
this.getTenantsList(); // this.getTenantsList(); //
}, },

2
acupuncture-后台/src/views/medicalFile/index.vue

@ -1369,7 +1369,7 @@ export default {
created() { created() {
let { name, phone } = this.$route.query; let { name, phone } = this.$route.query;
this.queryParams.param.keywords = name || ""; this.queryParams.param.keywords = name || "";
this.queryParams.param.phone = phone || ""; this.queryParams.param.phone = phone !== 'null' ? phone : "";
this.getList(); this.getList();
this.getTenantsList(); // this.getTenantsList(); //
}, },

103
acupuncture-后台/src/views/monitor/cache/list.vue

@ -11,6 +11,12 @@
icon="el-icon-refresh-right" icon="el-icon-refresh-right"
@click="refreshCacheNames()" @click="refreshCacheNames()"
></el-button> ></el-button>
<el-button
style="float: right; padding: 3px 0"
type="text"
icon="el-icon-plus"
@click="handelAdd()"
></el-button>
</div> </div>
<el-table <el-table
v-loading="loading" v-loading="loading"
@ -47,6 +53,12 @@
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpd(scope.row)"
></el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -148,33 +160,106 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<el-dialog
:title="title"
:visible.sync="open"
width="620px"
append-to-body
class="popup"
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="缓存名称" prop="cacheName">
<el-input
v-model="form.cacheName"
placeholder="请输入缓存名称"
:disabled="title == '修改缓存'"
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label=" " style="margin-bottom: 0px">
<template slot-scope="scope">
<el-button type="primary" @click="submit" size="mini"
> </el-button
>
<el-button @click="open = false"> </el-button>
</template>
</el-form-item>
</el-form>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listCacheName, listCacheKey, getCacheValue, clearCacheName, clearCacheKey, clearCacheAll } from "@/api/monitor/cache"; import {
listCacheName,
listCacheKey,
getCacheValue,
clearCacheName,
clearCacheKey,
clearCacheAll,
cacheAdd,
} from "@/api/monitor/cache";
export default { export default {
name: "CacheList", name: "CacheList",
data() { data() {
return { return {
form: {
cacheName: "",
remark: "",
},
rules: {
cacheName: [
{ required: true, message: "缓存名称不能为空", trigger: "blur" },
],
},
open: false,
cacheNames: [], cacheNames: [],
cacheKeys: [], cacheKeys: [],
cacheForm: {}, cacheForm: {},
loading: true, loading: true,
subLoading: false, subLoading: false,
nowCacheName: "", nowCacheName: "",
tableHeight: window.innerHeight - 200 tableHeight: window.innerHeight - 200,
}; };
}, },
created() { created() {
this.getCacheNames(); this.getCacheNames();
}, },
methods: { methods: {
handleUpd(row) {
this.title = "修改缓存";
this.form = {
cacheName: row.cacheName,
remark: row.remark,
};
this.open = true;
},
handelAdd() {
this.title = "新增缓存";
this.open = true;
this.form = {
cacheName: "",
remark: "",
};
},
submit() {
this.$refs["form"].validate(async (valid) => {
if (valid) {
cacheAdd(this.form).then((response) => {
this.$modal.msgSuccess("添加成功");
this.open = false;
this.getCacheNames();
});
}
});
},
/** 查询缓存名称列表 */ /** 查询缓存名称列表 */
getCacheNames() { getCacheNames() {
this.loading = true; this.loading = true;
listCacheName().then(response => { listCacheName().then((response) => {
this.cacheNames = response.data; this.cacheNames = response.data;
this.loading = false; this.loading = false;
}); });
@ -186,7 +271,7 @@ export default {
}, },
/** 清理指定名称缓存 */ /** 清理指定名称缓存 */
handleClearCacheName(row) { handleClearCacheName(row) {
clearCacheName(row.cacheName).then(response => { clearCacheName(row.cacheName).then((response) => {
this.$modal.msgSuccess("清理缓存名称[" + row.cacheName + "]成功"); this.$modal.msgSuccess("清理缓存名称[" + row.cacheName + "]成功");
this.getCacheKeys(); this.getCacheKeys();
}); });
@ -198,7 +283,7 @@ export default {
return; return;
} }
this.subLoading = true; this.subLoading = true;
listCacheKey(cacheName).then(response => { listCacheKey(cacheName).then((response) => {
this.cacheKeys = response.data; this.cacheKeys = response.data;
this.subLoading = false; this.subLoading = false;
this.nowCacheName = cacheName; this.nowCacheName = cacheName;
@ -211,7 +296,7 @@ export default {
}, },
/** 清理指定键名缓存 */ /** 清理指定键名缓存 */
handleClearCacheKey(cacheKey) { handleClearCacheKey(cacheKey) {
clearCacheKey(cacheKey).then(response => { clearCacheKey(cacheKey).then((response) => {
this.$modal.msgSuccess("清理缓存键名[" + cacheKey + "]成功"); this.$modal.msgSuccess("清理缓存键名[" + cacheKey + "]成功");
this.getCacheKeys(); this.getCacheKeys();
}); });
@ -226,16 +311,16 @@ export default {
}, },
/** 查询缓存内容详细 */ /** 查询缓存内容详细 */
handleCacheValue(cacheKey) { handleCacheValue(cacheKey) {
getCacheValue(this.nowCacheName, cacheKey).then(response => { getCacheValue(this.nowCacheName, cacheKey).then((response) => {
this.cacheForm = response.data; this.cacheForm = response.data;
}); });
}, },
/** 清理全部缓存 */ /** 清理全部缓存 */
handleClearCacheAll() { handleClearCacheAll() {
clearCacheAll().then(response => { clearCacheAll().then((response) => {
this.$modal.msgSuccess("清理全部缓存成功"); this.$modal.msgSuccess("清理全部缓存成功");
}); });
} },
}, },
}; };
</script> </script>

5
acupuncture-后台/src/views/monitor/online/index.vue

@ -45,6 +45,11 @@
<span>{{ parseTime(scope.row.loginTime) }}</span> <span>{{ parseTime(scope.row.loginTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="最后访问时间" align="center" prop="lastVisitTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.lastVisitTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button

25
acupuncture-后台/src/views/monitor/server/index.vue

@ -171,6 +171,31 @@
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="24" class="card-box">
<el-card>
<div slot="header">
<span><i class="el-icon-s-data"></i> 数据库状态</span>
</div>
<div class="el-table el-table--enable-row-hover el-table--medium">
<table cellspacing="0" style="width: 100%;">
<thead>
<tr>
<th class="el-table__cell el-table__cell is-leaf"><div class="cell">数据库类型</div></th>
<th class="el-table__cell is-leaf"><div class="cell">版本号</div></th>
<th class="el-table__cell is-leaf"><div class="cell">状态</div></th>
</tr>
</thead>
<tbody v-if="server.sysFiles">
<tr >
<td class="el-table__cell is-leaf"><div class="cell">MariaDB</div></td>
<td class="el-table__cell is-leaf"><div class="cell">10.3.23</div></td>
<td class="el-table__cell is-leaf"><div class="cell">在线</div></td>
</tr>
</tbody>
</table>
</div>
</el-card>
</el-col>
</el-row> </el-row>
</div> </div>
</template> </template>

913
acupuncture-后台/src/views/report/manage.vue

@ -1,345 +1,618 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" <el-form
label-width="80px"> :model="queryParams"
<el-form-item label="标题" prop="reportTitle"> ref="queryForm"
<el-input v-model="queryParams.param.reportTitle" placeholder="请输入" clearable size="small"
@keyup.enter.native="handleQuery" /> :inline="true"
</el-form-item> v-show="showSearch"
<el-form-item> label-width="80px"
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-form-item label="标题" prop="reportTitle">
</el-form-item> <el-input
</el-form> v-model="queryParams.param.reportTitle"
<el-row :gutter="10" class="mb8"> placeholder="请输入"
<el-col :span="1.5"> clearable
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button> @keyup.enter.native="handleQuery"
</el-col> />
<el-col :span="1.5"> </el-form-item>
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" <el-form-item>
@click="handleDelete">删除</el-button> <el-button
</el-col> type="primary"
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> icon="el-icon-search"
</el-row> size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="listData" @selection-change="handleSelectionChange" max-height="600"> <el-table
<el-table-column type="selection" width="55" align="center" /> v-loading="loading"
<el-table-column fixed label="标题" align="center" prop="reportTitle" min-width="100" /> :data="listData"
<el-table-column fixed label="类型" align="center" prop="typeName" show-overflow-tooltip min-width="100"> @selection-change="handleSelectionChange"
</el-table-column> max-height="600"
<el-table-column fixed label="开始时间" align="center" prop="timeRangeStart" show-overflow-tooltip >
min-width="100"> <el-table-column type="selection" width="55" align="center" />
<template slot-scope="scope"> <el-table-column
<span> fixed
{{ parseTime(scope.row.timeRangeStart, "{y}-{m}-{d}") }} label="标题"
</span> align="center"
</template> prop="reportTitle"
</el-table-column> min-width="100"
<el-table-column fixed label="结束时间" align="center" prop="timeRangeEnd" show-overflow-tooltip />
min-width="100"> <el-table-column
<template slot-scope="scope"> fixed
<span> label="类型"
{{ parseTime(scope.row.timeRangeEnd, "{y}-{m}-{d}") }} align="center"
</span> prop="typeName"
</template> show-overflow-tooltip
</el-table-column> min-width="100"
<el-table-column label="创建人/创建时间" align="center" min-width="140"> >
<template slot-scope="scope"> </el-table-column>
<div>{{scope.row.createBy}}</div> <el-table-column
<span> label="单位"
{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }} align="center"
</span> prop="tenantIdList"
</template> min-width="250"
</el-table-column> show-overflow-tooltip
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="200"> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <!-- 通过id列表找到tenantsData中匹配的数据并替换为中文数据后面添加逗号 -->
:disabled="scope.row.id == 1 || scope.row.id == 2">修改</el-button> <template v-for="(item, index) in scope.row.tenantIdList">
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" <template v-if="tenantsData.some((tenant) => tenant.id === item)">
:disabled="scope.row.id == 1 || scope.row.id == 2">删除</el-button> {{ tenantsData.find((tenant) => tenant.id === item).name
</template> }}{{ index < scope.row.tenantIdList.length - 1 ? "," : "" }}
</el-table-column> </template>
</el-table> </template>
</template>
</el-table-column>
<el-table-column
fixed
label="开始时间"
align="center"
prop="timeRangeStart"
show-overflow-tooltip
min-width="100"
>
<template slot-scope="scope">
<span>
{{ parseTime(scope.row.timeRangeStart, "{y}-{m}-{d}") }}
</span>
</template>
</el-table-column>
<el-table-column
fixed
label="结束时间"
align="center"
prop="timeRangeEnd"
show-overflow-tooltip
min-width="100"
>
<template slot-scope="scope">
<span>
{{ parseTime(scope.row.timeRangeEnd, "{y}-{m}-{d}") }}
</span>
</template>
</el-table-column>
<el-table-column
label="状态"
align="center"
prop="status"
show-overflow-tooltip
min-width="100"
>
<template slot-scope="scope">
<span v-if="scope.row.status === 0"> 未开始 </span>
<span v-if="scope.row.status === 1"> 进行中 </span>
<span v-if="scope.row.status === 2"> 已结束 </span>
</template>
</el-table-column>
<!-- <el-table-column
label="开启/结束"
align="center"
prop="typeName"
show-overflow-tooltip
min-width="100"
>
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
active-color="#13ce66"
inactive-color="#ff4949"
></el-switch>
</template>
</el-table-column> -->
<el-table-column label="创建人/创建时间" align="center" min-width="140">
<template slot-scope="scope">
<div>{{ scope.row.createBy }}</div>
<span>
{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }}
</span>
</template>
</el-table-column>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" <el-table-column
:limit.sync="queryParams.pageSize" @pagination="getList" /> fixed="right"
label="操作"
align="center"
class-name="small-padding fixed-width"
width="150"
>
<template slot-scope="scope">
<el-button
v-if="scope.row.status === 0 || scope.row.status === 2"
size="mini"
type="text"
icon="el-icon-folder-checked"
@click="handleSwitch(scope.row, 1)"
>开启</el-button
>
<el-button
v-if="scope.row.status === 1"
size="mini"
type="text"
icon="el-icon-folder-delete"
@click="handleSwitch(scope.row, 2)"
>结束</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleDetails(scope.row)"
>上报详情</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-download"
@click="handleDownload(scope.row)"
>上报汇总表</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 添加或修改公告对话框 --> <pagination
<el-dialog class="popup" :title="title" :visible.sync="open" width="780px" append-to-body> v-show="total > 0"
<el-form ref="form" :model="form" :rules="rules" label-width="140px" class="formStep"> :total="total"
<el-form-item label="标题" prop="reportTitle"> :page.sync="queryParams.pageNum"
<el-input v-model="form.reportTitle" placeholder="请输入" /> :limit.sync="queryParams.pageSize"
</el-form-item> @pagination="getList"
<el-form-item label="上报类型" prop="reportType"> />
<el-select v-model="form.reportType" placeholder="请选择">
<el-option v-for="item in reporTypeList" :key="item.id" :label="item.typeName" :value="item.id"> <!-- 添加或修改公告对话框 -->
</el-option> <el-dialog
</el-select> class="popup"
</el-form-item> :title="title"
<el-form-item label="时间范围" prop="time"> :visible.sync="open"
<!-- <el-date-picker format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="form.timeRangeStart" width="780px"
type="date" placeholder="选择日期"> append-to-body
</el-date-picker> --> >
<el-date-picker format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="form.time" type="daterange" <el-form
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @input="$forceUpdate()"> ref="form"
</el-date-picker> :model="form"
</el-form-item> :rules="rules"
<!-- <el-form-item label="结束时间" prop="timeRangeEnd"> label-width="100px"
<el-date-picker format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="form.timeRangeEnd" type="date" class="formStep"
placeholder="选择日期"> >
</el-date-picker> <el-form-item label="标题" prop="reportTitle">
</el-form-item> --> <el-input v-model="form.reportTitle" placeholder="请输入" />
</el-form> </el-form-item>
<div slot="footer" class="dialog-footer"> <el-form-item label="上报类型" prop="reportType">
<el-button type="primary" @click="submitForm"> </el-button> <el-select
<el-button @click="cancel"> </el-button> v-model="form.reportType"
</div> placeholder="请选择"
</el-dialog> @change="handleTypeChage"
</div> >
<el-option
v-for="item in reporTypeList"
:key="item.id"
:label="item.typeName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="单位" prop="tenantIdList">
<el-select v-model="form.tenantIdList" multiple placeholder="请选择">
<el-option
v-for="item in tenantsData"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="时间范围" prop="time">
<el-date-picker
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
v-model="form.time"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@input="$forceUpdate()"
>
</el-date-picker>
</el-form-item>
<el-form-item label="状态" prop="status" v-if="!form.id">
<el-radio-group v-model="form.status">
<el-radio :label="0">未开始</el-radio>
<el-radio :label="1">进行中</el-radio>
<el-radio :label="2">已结束</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import { import {
managerQuery, managerQuery,
managerAdd, managerAdd,
managerUpd, managerUpd,
managerDel, managerDel,
reportList reportList,
} from "@/api/report"; reportDown,
export default { } from "@/api/report";
name: "Notice", import { tenantsList } from "@/api/member";
data() { export default {
return { name: "Notice",
reporTypeList: [], data() {
queryParams: { return {
param: { reporTypeList: [],
reportTitle: "", queryParams: {
} pageNum: 1,
}, pageSize: 10,
listData: [], param: {
title: '', reportTitle: "",
open: false, },
total: 0, },
form: {}, listData: [],
loading: false, title: "",
showSearch: true, open: false,
multiple: false, total: 0,
// form: {},
rules: { loading: false,
reportTitle: [{ showSearch: true,
required: true, multiple: false,
message: "标题不能为空", //
trigger: "blur", rules: {
}], reportTitle: [
reportType: [{ {
required: true, required: true,
message: "类型不能为空", message: "标题不能为空",
trigger: "blur", trigger: "blur",
}], },
time: [{ ],
required: true, reportType: [
message: "时间范围不能为空", {
trigger: "change", required: true,
}] message: "类型不能为空",
// timeRangeStart: [{ trigger: "blur",
// required: true, },
// message: "", ],
// trigger: "blur", time: [
// }], {
// timeRangeEnd: [{ required: true,
// required: true, message: "时间范围不能为空",
// message: "", trigger: "change",
// trigger: "blur" },
// }], ],
}, tenantIdList: [
}; {
}, required: true,
created() { message: "单位不能为空",
this.getList(); trigger: "change",
this.getReportType(); },
}, ],
methods: { // timeRangeStart: [{
getReportType() { // required: true,
reportList({ // message: "",
pageNum: -1, // trigger: "blur",
param: {}, // }],
}).then((res) => { // timeRangeEnd: [{
this.reporTypeList = res.data.list; // required: true,
}); // message: "",
}, // trigger: "blur"
/** 查询公告列表 */ // }],
getList() { },
this.loading = true; tenantsData: [],
managerQuery(this.queryParams).then((res) => { qzUrl: process.env.VUE_APP_API_QZURL, //
this.listData = res.data.list; };
this.total = res.data.total; },
this.loading = false; created() {
}); this.getList();
}, this.getReportType();
// this.getTenantsList();
cancel() { },
this.open = false; methods: {
this.reset(); handleDownload(row) {
}, reportDown({
// managementId: row.id,
reset() { }).then((res) => {
this.form = { if (res.data) {
"reportTitle": "", window.open(this.qzUrl + res.data);
"reportType": "", } else {
time:[], this.$modal.msgError("暂无上报汇总表");
"timeRangeStart": "", }
"timeRangeEnd": "", });
}; },
this.resetForm("form"); //
}, handleDetails(row) {
/** 搜索按钮操作 */ this.$router.push({
handleQuery() { path: "/medicalFile/index",
this.queryParams.pageNum = 1; query: { id: row.id },
this.getList(); });
}, },
/** 重置按钮操作 */ //
resetQuery() { handleTypeChage() {
this.queryParams.param = { // form.reportType reporTypeList id tenantIdList
reportTitle: "", let reportType = this.form.reportType;
}; let tenantIdList = this.reporTypeList.find(
this.handleQuery(); (item) => item.id == reportType
}, ).tenantIdList;
// this.form.tenantIdList = tenantIdList;
handleSelectionChange(selection) { },
this.ids = selection.map((item) => item.id); //
this.single = selection.length != 1; getReportType() {
this.multiple = !selection.length; reportList({
}, pageNum: -1,
/** 新增按钮操作 */ param: {},
handleAdd() { }).then((res) => {
this.reset(); this.reporTypeList = res.data.list;
this.open = true; });
this.title = "新增上报"; },
}, /** 查询公告列表 */
/** 修改按钮操作 */ getTenantsList() {
handleUpdate(row) { tenantsList({
this.open = true; pageNum: -1,
this.title = "修改上报"; param: {},
this.form = JSON.parse(JSON.stringify(row)) }).then((res) => {
let timeRangeStart = this.parseTime(this.form.timeRangeStart, "{y}-{m}-{d}") this.tenantsData = res.data.list;
let timeRangeEnd = this.parseTime(this.form.timeRangeEnd, "{y}-{m}-{d}") });
this.form.time = [] },
this.form.time[0] = timeRangeStart /** 查询公告列表 */
this.form.time[1] = timeRangeEnd getList() {
}, this.loading = true;
/** 诊疗档案 */ managerQuery(this.queryParams).then((res) => {
submitForm: function() { this.listData = res.data.list;
this.$refs["form"].validate((valid) => { this.total = res.data.total;
if (valid) { this.loading = false;
let data = JSON.parse(JSON.stringify(this.form)) });
let time = data.time },
data.timeRangeStart = data.time[0] //
data.timeRangeEnd = data.time[1] cancel() {
if (data.id != undefined) { this.open = false;
managerUpd(data).then((response) => { this.reset();
this.$modal.msgSuccess("修改成功"); },
this.open = false; //
this.getList(); reset() {
}); this.form = {
} else { reportTitle: "",
managerAdd(data).then((response) => { reportType: "",
this.$modal.msgSuccess("新增成功"); time: [],
this.open = false; timeRangeStart: "",
this.getList(); timeRangeEnd: "",
}); tenantIdList: [],
} status: 0,
} };
}); this.resetForm("form");
}, },
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.param = {
reportTitle: "",
};
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "新增上报";
},
/** 修改按钮操作 */
handleSwitch(row, status) {
this.form = JSON.parse(JSON.stringify(row));
this.form.status = status;
managerUpd(this.form).then((response) => {
this.$modal.msgSuccess("操作成功");
this.getList();
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.open = true;
this.title = "修改上报";
this.form = JSON.parse(JSON.stringify(row));
let timeRangeStart = this.parseTime(
this.form.timeRangeStart,
"{y}-{m}-{d}"
);
let timeRangeEnd = this.parseTime(this.form.timeRangeEnd, "{y}-{m}-{d}");
this.form.time = [];
this.form.time[0] = timeRangeStart;
this.form.time[1] = timeRangeEnd;
},
/** 诊疗档案 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
let data = JSON.parse(JSON.stringify(this.form));
let time = data.time;
data.timeRangeStart = data.time[0];
data.timeRangeEnd = data.time[1];
if (data.id != undefined) {
managerUpd(data).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
managerAdd(data).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const idList = row.id ? [row.id] : this.ids; const idList = row.id ? [row.id] : this.ids;
this.$modal this.$modal
.confirm("是否确认删除当前选择的数据?") .confirm("是否确认删除当前选择的数据?")
.then(function() { .then(function () {
return managerDel({ return managerDel({
idList: idList, idList: idList,
}); });
}) })
.then(() => { .then(() => {
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
this.getList(); this.getList();
}) })
.catch(() => {}); .catch(() => {});
}, },
}, },
}; };
</script> </script>
<style scoped src="@/assets/styles/common.css"></style> <style scoped src="@/assets/styles/common.css"></style>
<style scoped> <style scoped>
.div-title1 { .div-title1 {
font-size: 22px; font-size: 22px;
font-weight: bold; font-weight: bold;
margin-bottom: 10px; margin-bottom: 10px;
} }
.div-title2 { .div-title2 {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
margin-bottom: 10px; margin-bottom: 10px;
} }
.div-title3 { .div-title3 {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
margin-bottom: 10px; margin-bottom: 10px;
} }
.span-but { .span-but {
display: inline-block; display: inline-block;
border-radius: 4px; border-radius: 4px;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
line-height: 32px; line-height: 32px;
padding: 0 15px; padding: 0 15px;
margin: 5px; margin: 5px;
} }
.span-but-active { .span-but-active {
border: 1px solid #1890ff; border: 1px solid #1890ff;
} }
.human-body { .human-body {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.human-body>>>.el-form-item { .human-body >>> .el-form-item {
width: 49%; width: 49%;
margin-right: 2%; margin-right: 2%;
} }
.human-body>>>.el-form-item:nth-of-type(2n) { .human-body >>> .el-form-item:nth-of-type(2n) {
margin-right: 0; margin-right: 0;
} }
.formStep1>>>.el-form-item__label {} .formStep1 >>> .el-form-item__label {
}
.form-item-zd { .form-item-zd {
width: 100%; width: 100%;
text-align: left; text-align: left;
} }
.form-item-age { .form-item-age {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.form-item-age span { .form-item-age span {
margin: 0 10px; margin: 0 10px;
} }
.form-item-age>>>.el-input { .form-item-age >>> .el-input {
width: 100px; width: 100px;
} }
>>>.el-drawer.rtl { >>> .el-drawer.rtl {
width: 50% !important; width: 50% !important;
} }
</style> </style>

715
acupuncture-后台/src/views/report/type.vue

@ -1,265 +1,500 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" <el-form
label-width="80px"> :model="queryParams"
<el-form-item label="类型名称" prop="typeName"> ref="queryForm"
<el-input v-model="queryParams.param.typeName" placeholder="请输入" clearable size="small"
@keyup.enter.native="handleQuery" /> :inline="true"
</el-form-item> v-show="showSearch"
<el-form-item> label-width="80px"
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-form-item label="类型名称" prop="typeName">
</el-form-item> <el-input
</el-form> v-model="queryParams.param.typeName"
<el-row :gutter="10" class="mb8"> placeholder="请输入"
<el-col :span="1.5"> clearable
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button> @keyup.enter.native="handleQuery"
</el-col> />
<el-col :span="1.5"> </el-form-item>
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" <el-form-item>
@click="handleDelete">删除</el-button> <el-button
</el-col> type="primary"
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> icon="el-icon-search"
</el-row> size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="listData" @selection-change="handleSelectionChange" max-height="600"> <el-table
<el-table-column type="selection" width="55" align="center" /> v-loading="loading"
<el-table-column fixed label="类型名称" align="center" prop="typeName" min-width="100" /> :data="listData"
<el-table-column label="创建人/创建时间" align="center" min-width="140"> @selection-change="handleSelectionChange"
<template slot-scope="scope"> max-height="600"
<div>{{scope.row.createBy}}</div> >
<span> <el-table-column type="selection" width="55" align="center" />
{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }} <el-table-column
</span> fixed
</template> label="类型名称"
</el-table-column> align="center"
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="200"> prop="typeName"
<template slot-scope="scope"> min-width="100"
<el-button size="mini" type="text" icon="el-icon-edit" show-overflow-tooltip
@click="handleUpdate(scope.row)">修改</el-button> />
<el-button size="mini" type="text" icon="el-icon-delete" <el-table-column
@click="handleDelete(scope.row)">删除</el-button> label="单位"
</template> align="center"
</el-table-column> prop="tenantIdList"
</el-table> min-width="250"
show-overflow-tooltip
>
<template slot-scope="scope">
<!-- 通过id列表找到tenantsData中匹配的数据并替换为中文数据后面添加逗号 -->
<template v-for="(item, index) in scope.row.tenantIdList">
<template v-if="tenantsData.some((tenant) => tenant.id === item)">
{{ tenantsData.find((tenant) => tenant.id === item).name
}}{{ index < scope.row.tenantIdList.length - 1 ? "," : "" }}
</template>
</template>
</template>
</el-table-column>
<el-table-column
label="附件"
align="center"
prop="typeName"
min-width="150"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-button type="text" size="mini" @click="handleDownload(scope.row)">
<span v-if="scope.row.file">
<i class="el-icon-download"></i>
<span>{{
scope.row.file.substring(scope.row.file.lastIndexOf("/") + 1)
}}</span>
</span>
</el-button>
</template>
</el-table-column>
<el-table-column
label="备注"
align="center"
prop="remark"
min-width="150"
show-overflow-tooltip
/>
<el-table-column label="创建人/创建时间" align="center" min-width="140">
<template slot-scope="scope">
<div>{{ scope.row.createBy }}</div>
<span>
{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }}
</span>
</template>
</el-table-column>
<el-table-column
fixed="right"
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" <pagination
:limit.sync="queryParams.pageSize" @pagination="getList" /> v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改公告对话框 --> <!-- 添加或修改公告对话框 -->
<el-dialog class="popup" :title="title" :visible.sync="open" width="780px" append-to-body> <el-dialog
<el-form ref="form" :model="form" :rules="rules" label-width="90px" class="formStep"> class="popup"
<el-form-item label="类型名称" prop="typeName"> :title="title"
<el-input v-model="form.typeName" placeholder="请输入" /> :visible.sync="open"
</el-form-item> width="780px"
</el-form> append-to-body
<div slot="footer" class="dialog-footer"> >
<el-button type="primary" @click="submitForm"> </el-button> <el-form
<el-button @click="cancel"> </el-button> ref="form"
</div> :model="form"
</el-dialog> :rules="rules"
</div> label-width="90px"
class="formStep"
>
<el-form-item label="类型名称" prop="typeName">
<el-input v-model="form.typeName" placeholder="请输入" />
</el-form-item>
<el-form-item label="单位" prop="tenantIdList">
<el-select v-model="form.tenantIdList" multiple placeholder="请选择">
<el-option
v-for="item in tenantsData"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="附件" prop="file">
<el-upload
:limit="1"
class="avatar-uploader wj-uploader"
:headers="headers"
:action="uploadFileUrl"
accept=".xlsx,.xls,.pdf,.doc,.docx"
:before-upload="handleBeforePdfUpload1"
:on-success="handleUploadPdfAdd1"
:on-remove="handleRemove"
:file-list="fileList"
:show-file-list="true"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将文件拖到此处
<em>点击上传</em>
</div>
</el-upload>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
type="textarea"
v-model="form.remark"
placeholder="请输入"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import { import { getToken } from "@/utils/auth";
reportList, import { tenantsList } from "@/api/member";
reportAdd, import { reportList, reportAdd, reportUpd, reportDel } from "@/api/report";
reportUpd, export default {
reportDel name: "Notice",
} from "@/api/report"; data() {
export default { return {
name: "Notice", uploadFileUrl: process.env.VUE_APP_API_QZURL + "/common/upload", //
data() { headers: {
return { Authorization: "Bearer " + getToken(),
dataSourceList: [], },
queryParams: { dataSourceList: [],
param: { queryParams: {
name: "", param: {
} name: "",
}, },
listData: [], },
title: '', listData: [],
open: false, title: "",
total: 0, open: false,
form: {}, total: 0,
loading: false, form: {},
showSearch: true, loading: false,
multiple: false, showSearch: true,
// multiple: false,
rules: { //
typeName: [{ rules: {
required: true, typeName: [
message: "上报类型不能为空", {
trigger: "blur", required: true,
}], message: "上报类型不能为空",
}, trigger: "blur",
}; },
}, ],
created() { tenantIdList: [
this.getList(); {
}, required: true,
methods: { message: "单位不能为空",
/** 查询公告列表 */ trigger: "change",
getList() { },
this.loading = true; ],
reportList(this.queryParams).then((res) => { file: [
this.listData = res.data.list; {
this.total = res.data.total; required: true,
this.loading = false; message: "附件不能为空",
}); trigger: "change",
}, },
// ],
cancel() { },
this.open = false; tenantsData: [],
this.reset(); fileList: [],
}, };
// },
reset() { created() {
this.form = { this.getList();
"typeName": "", this.getTenantsList();
}; },
this.resetForm("form"); methods: {
}, handleRemove(file, fileList) {
/** 搜索按钮操作 */ this.form.file = "";
handleQuery() { this.fileList = [];
this.queryParams.pageNum = 1; },
this.getList(); // - pdg
}, handleUploadPdfAdd1(res) {
/** 重置按钮操作 */ if (res.code == 200) {
resetQuery() { this.$message.success(res.msg || "导入成功");
this.queryParams.param = { this.form.file = res.fileName;
typeName: "", setTimeout(() => {
}; this.$refs["form"].validateField("file", (errorMessage) => {});
this.handleQuery(); });
}, } else {
// this.$message.error(res.msg || "导入失败");
handleSelectionChange(selection) { this.fileList = [];
this.ids = selection.map((item) => item.id); }
this.single = selection.length != 1; },
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "新增上报类型";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.open = true;
this.title = "修改诊疗档案";
this.form = JSON.parse(JSON.stringify(row))
},
/** 诊疗档案 */
submitForm: function() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != undefined) {
reportUpd(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
reportAdd(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */ // -
handleDelete(row) { handleBeforePdfUpload1(file) {
const idList = row.id ? [row.id] : this.ids; const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
this.$modal const whiteList = ["xlsx", "xls", "pdf", "doc", "docx"];
.confirm("是否确认删除当前选择的数据?") if (whiteList.indexOf(fileSuffix) === -1) {
.then(function() { this.$message.error("上传文件只能是xlsx/xls/pdf/doc/docx 格式!");
return reportDel({ return false;
idList: idList, }
}); },
}) /** 查询公告列表 */
.then(() => { getTenantsList() {
this.getList(); tenantsList({
this.$modal.msgSuccess("删除成功"); pageNum: -1,
}) param: {},
.catch(() => {}); }).then((res) => {
}, this.tenantsData = res.data.list;
}, });
}; },
/** 查询公告列表 */
getList() {
this.loading = true;
reportList(this.queryParams).then((res) => {
this.listData = res.data.list;
this.total = res.data.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.fileList = [];
this.form = {
typeName: "",
tenantIdList: [],
remark: "",
file: "",
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.param = {
typeName: "",
};
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "新增上报类型";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.open = true;
this.title = "修改上报类型";
this.form = JSON.parse(JSON.stringify(row));
if (row.file) {
this.fileList = [
{
//
name: row.file.substring(row.file.lastIndexOf("/") + 1),
url: row.file,
},
];
} else {
this.fileList = [];
}
},
/** 诊疗档案 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != undefined) {
reportUpd(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
reportAdd(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const idList = row.id ? [row.id] : this.ids;
this.$modal
.confirm("是否确认删除当前选择的数据?")
.then(function () {
return reportDel({
idList: idList,
});
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
},
};
</script> </script>
<style scoped src="@/assets/styles/common.css"></style> <style scoped src="@/assets/styles/common.css"></style>
<style scoped> <style scoped>
.div-title1 { >>> .el-upload-list__item:first-child {
font-size: 22px; margin-top: 0 !important;
font-weight: bold; }
margin-bottom: 10px; .div-title1 {
} font-size: 22px;
font-weight: bold;
margin-bottom: 10px;
}
.div-title2 { .div-title2 {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
margin-bottom: 10px; margin-bottom: 10px;
} }
.div-title3 { .div-title3 {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
margin-bottom: 10px; margin-bottom: 10px;
} }
.span-but { .span-but {
display: inline-block; display: inline-block;
border-radius: 4px; border-radius: 4px;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
line-height: 32px; line-height: 32px;
padding: 0 15px; padding: 0 15px;
margin: 5px; margin: 5px;
} }
.span-but-active { .span-but-active {
border: 1px solid #1890ff; border: 1px solid #1890ff;
} }
.human-body { .human-body {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.human-body>>>.el-form-item { .human-body >>> .el-form-item {
width: 49%; width: 49%;
margin-right: 2%; margin-right: 2%;
} }
.human-body>>>.el-form-item:nth-of-type(2n) { .human-body >>> .el-form-item:nth-of-type(2n) {
margin-right: 0; margin-right: 0;
} }
.formStep1>>>.el-form-item__label {} .formStep1 >>> .el-form-item__label {
}
.form-item-zd { .form-item-zd {
width: 100%; width: 100%;
text-align: left; text-align: left;
} }
.form-item-age { .form-item-age {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.form-item-age span { .form-item-age span {
margin: 0 10px; margin: 0 10px;
} }
.form-item-age>>>.el-input { .form-item-age >>> .el-input {
width: 100px; width: 100px;
} }
>>>.el-drawer.rtl { >>> .el-drawer.rtl {
width: 50% !important; width: 50% !important;
} }
</style> </style>

268
acupuncture-后台/src/views/system/dict/data.vue

@ -1,6 +1,13 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="字典名称" prop="dictType"> <el-form-item label="字典名称" prop="dictType">
<el-select v-model="queryParams.dictType"> <el-select v-model="queryParams.dictType">
<el-option <el-option
@ -20,7 +27,11 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="数据状态" clearable> <el-select
v-model="queryParams.status"
placeholder="数据状态"
clearable
>
<el-option <el-option
v-for="dict in dict.type.sys_normal_disable" v-for="dict in dict.type.sys_normal_disable"
:key="dict.value" :key="dict.value"
@ -30,8 +41,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -44,7 +63,8 @@
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:dict:add']" v-hasPermi="['system:dict:add']"
>新增</el-button> >新增</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -55,7 +75,8 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['system:dict:edit']" v-hasPermi="['system:dict:edit']"
>修改</el-button> >修改</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -66,7 +87,8 @@
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['system:dict:remove']" v-hasPermi="['system:dict:remove']"
>删除</el-button> >删除</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -76,7 +98,8 @@
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['system:dict:export']" v-hasPermi="['system:dict:export']"
>导出</el-button> >导出</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -85,34 +108,87 @@
icon="el-icon-close" icon="el-icon-close"
size="mini" size="mini"
@click="handleClose" @click="handleClose"
>关闭</el-button> >关闭</el-button
>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
:data="dataList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编码" align="center" prop="dictCode" /> <el-table-column label="字典编码" align="center" prop="dictCode" />
<el-table-column label="字典标签" align="center" prop="dictLabel"> <el-table-column label="字典标签" align="center" prop="dictLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="(scope.row.listClass == '' || scope.row.listClass == 'default') && (scope.row.cssClass == '' || scope.row.cssClass == null)">{{ scope.row.dictLabel }}</span> <span
<el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass" :class="scope.row.cssClass">{{ scope.row.dictLabel }}</el-tag> v-if="
(scope.row.listClass == '' || scope.row.listClass == 'default') &&
(scope.row.cssClass == '' || scope.row.cssClass == null)
"
>{{ scope.row.dictLabel }}</span
>
<el-tag
v-else
:type="scope.row.listClass == 'primary' ? '' : scope.row.listClass"
:class="scope.row.cssClass"
>{{ scope.row.dictLabel }}</el-tag
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="字典键值" align="center" prop="dictValue" /> <el-table-column label="字典键值" align="center" prop="dictValue" />
<el-table-column label="字典排序" align="center" prop="dictSort" /> <el-table-column label="字典排序" align="center" prop="dictSort" />
<el-table-column label="数据类型" align="center" prop="dataType" />
<!-- 长度是否必填是否唯一 -->
<el-table-column label="长度" align="center" prop="dataLength" />
<el-table-column label="是否必填" align="center" width="100">
<template slot-scope="scope">
<el-tag type="info" v-if="scope.row.isRequired == 0"></el-tag>
<el-tag type="success" v-if="scope.row.isRequired == 1"></el-tag>
</template>
</el-table-column>
<el-table-column label="是否唯一" align="center" width="100">
<template slot-scope="scope">
<el-tag type="info" v-if="scope.row.isSole == 0"></el-tag>
<el-tag type="success" v-if="scope.row.isSole == 1"></el-tag>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status"> <el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> <dict-tag
:options="dict.type.sys_normal_disable"
:value="scope.row.status"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" /> <el-table-column
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> label="备注"
align="center"
prop="remark"
:show-overflow-tooltip="true"
/>
<el-table-column
label="创建时间"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
fixed="right"
width="150"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -120,20 +196,22 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:edit']" v-hasPermi="['system:dict:edit']"
>修改</el-button> >修改</el-button
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:dict:remove']" v-hasPermi="['system:dict:remove']"
>删除</el-button> >删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@ -155,8 +233,30 @@
<el-form-item label="样式属性" prop="cssClass"> <el-form-item label="样式属性" prop="cssClass">
<el-input v-model="form.cssClass" placeholder="请输入样式属性" /> <el-input v-model="form.cssClass" placeholder="请输入样式属性" />
</el-form-item> </el-form-item>
<el-form-item label="数据类型" prop="dataType">
<el-input v-model="form.dataType" placeholder="请输入" />
</el-form-item>
<el-form-item label="长度" prop="dataLength">
<el-input v-model="form.dataLength" placeholder="请输入长度" />
</el-form-item>
<el-form-item label="是否必填" prop="isRequired">
<el-radio-group v-model="form.isRequired">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否唯一" prop="isSole">
<el-radio-group v-model="form.isSole">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="显示排序" prop="dictSort"> <el-form-item label="显示排序" prop="dictSort">
<el-input-number v-model="form.dictSort" controls-position="right" :min="0" /> <el-input-number
v-model="form.dictSort"
controls-position="right"
:min="0"
/>
</el-form-item> </el-form-item>
<el-form-item label="回显样式" prop="listClass"> <el-form-item label="回显样式" prop="listClass">
<el-select v-model="form.listClass"> <el-select v-model="form.listClass">
@ -174,11 +274,16 @@
v-for="dict in dict.type.sys_normal_disable" v-for="dict in dict.type.sys_normal_disable"
:key="dict.value" :key="dict.value"
:label="dict.value" :label="dict.value"
>{{dict.label}}</el-radio> >{{ dict.label }}</el-radio
>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input> <el-input
v-model="form.remark"
type="textarea"
placeholder="请输入内容"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -190,12 +295,21 @@
</template> </template>
<script> <script>
import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data"; import {
import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type"; listData,
getData,
delData,
addData,
updateData,
} from "@/api/system/dict/data";
import {
optionselect as getDictOptionselect,
getType,
} from "@/api/system/dict/type";
export default { export default {
name: "Data", name: "Data",
dicts: ['sys_normal_disable'], dicts: ["sys_normal_disable"],
data() { data() {
return { return {
// //
@ -222,28 +336,28 @@ export default {
listClassOptions: [ listClassOptions: [
{ {
value: "default", value: "default",
label: "默认" label: "默认",
}, },
{ {
value: "primary", value: "primary",
label: "主要" label: "主要",
}, },
{ {
value: "success", value: "success",
label: "成功" label: "成功",
}, },
{ {
value: "info", value: "info",
label: "信息" label: "信息",
}, },
{ {
value: "warning", value: "warning",
label: "警告" label: "警告",
}, },
{ {
value: "danger", value: "danger",
label: "危险" label: "危险",
} },
], ],
// //
typeOptions: [], typeOptions: [],
@ -253,22 +367,22 @@ export default {
pageSize: 10, pageSize: 10,
dictType: undefined, dictType: undefined,
dictLabel: undefined, dictLabel: undefined,
status: undefined status: undefined,
}, },
// //
form: {}, form: {},
// //
rules: { rules: {
dictLabel: [ dictLabel: [
{ required: true, message: "数据标签不能为空", trigger: "blur" } { required: true, message: "数据标签不能为空", trigger: "blur" },
], ],
dictValue: [ dictValue: [
{ required: true, message: "数据键值不能为空", trigger: "blur" } { required: true, message: "数据键值不能为空", trigger: "blur" },
], ],
dictSort: [ dictSort: [
{ required: true, message: "数据顺序不能为空", trigger: "blur" } { required: true, message: "数据顺序不能为空", trigger: "blur" },
] ],
} },
}; };
}, },
created() { created() {
@ -279,7 +393,7 @@ export default {
methods: { methods: {
/** 查询字典类型详细 */ /** 查询字典类型详细 */
getType(dictId) { getType(dictId) {
getType(dictId).then(response => { getType(dictId).then((response) => {
this.queryParams.dictType = response.data.dictType; this.queryParams.dictType = response.data.dictType;
this.defaultDictType = response.data.dictType; this.defaultDictType = response.data.dictType;
this.getList(); this.getList();
@ -287,14 +401,14 @@ export default {
}, },
/** 查询字典类型列表 */ /** 查询字典类型列表 */
getTypeList() { getTypeList() {
getDictOptionselect().then(response => { getDictOptionselect().then((response) => {
this.typeOptions = response.data; this.typeOptions = response.data;
}); });
}, },
/** 查询字典数据列表 */ /** 查询字典数据列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listData(this.queryParams).then(response => { listData(this.queryParams).then((response) => {
this.dataList = response.rows; this.dataList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -312,10 +426,14 @@ export default {
dictLabel: undefined, dictLabel: undefined,
dictValue: undefined, dictValue: undefined,
cssClass: undefined, cssClass: undefined,
listClass: 'default', listClass: "default",
dictSort: 0, dictSort: 0,
status: "0", status: "0",
remark: undefined remark: undefined,
dataType: "",
dataLength: "",
isRequired: 1,
isSole: 1,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -344,34 +462,40 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.dictCode) this.ids = selection.map((item) => item.dictCode);
this.single = selection.length!=1 this.single = selection.length != 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const dictCode = row.dictCode || this.ids const dictCode = row.dictCode || this.ids;
getData(dictCode).then(response => { getData(dictCode).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改字典数据"; this.title = "修改字典数据";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function() { submitForm: function () {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.dictCode != undefined) { if (this.form.dictCode != undefined) {
updateData(this.form).then(response => { updateData(this.form).then((response) => {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType); this.$store.dispatch(
"dict/removeDict",
this.queryParams.dictType
);
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
addData(this.form).then(response => { addData(this.form).then((response) => {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType); this.$store.dispatch(
"dict/removeDict",
this.queryParams.dictType
);
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -383,20 +507,28 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const dictCodes = row.dictCode || this.ids; const dictCodes = row.dictCode || this.ids;
this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() { this.$modal
return delData(dictCodes); .confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?')
}).then(() => { .then(function () {
this.getList(); return delData(dictCodes);
this.$modal.msgSuccess("删除成功"); })
this.$store.dispatch('dict/removeDict', this.queryParams.dictType); .then(() => {
}).catch(() => {}); this.getList();
this.$modal.msgSuccess("删除成功");
this.$store.dispatch("dict/removeDict", this.queryParams.dictType);
})
.catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('system/dict/data/export', { this.download(
...this.queryParams "system/dict/data/export",
}, `data_${new Date().getTime()}.xlsx`) {
} ...this.queryParams,
} },
`data_${new Date().getTime()}.xlsx`
);
},
},
}; };
</script> </script>

2
acupuncture-后台/src/views/system/dict/index.vue

@ -168,6 +168,7 @@
</router-link> </router-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="status"> <el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
@ -235,6 +236,7 @@
<el-form-item label="字典类型" prop="dictType"> <el-form-item label="字典类型" prop="dictType">
<el-input v-model="form.dictType" placeholder="请输入字典类型" /> <el-input v-model="form.dictType" placeholder="请输入字典类型" />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status">
<el-radio <el-radio

30
acupuncture-后台/src/views/system/menu/index.vue

@ -19,6 +19,17 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户端类型" prop="status">
<el-select
v-model="queryParams.clientType"
placeholder="客户端类型"
clearable
style="width: 240px"
>
<el-option label="PC端" :value="0" />
<el-option label="移动端" :value="1" />
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -70,6 +81,12 @@
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="客户端类型" align="center" width="100">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.clientType === 0">PC端</el-tag>
<el-tag type="info" v-if="scope.row.clientType === 1">移动端</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime"> <el-table-column label="创建时间" align="center" prop="createTime">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
@ -278,6 +295,16 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item label="客户端类型">
<el-radio-group v-model="form.clientType">
<el-radio :label="0">PC端</el-radio>
<el-radio :label="1">移动端</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -389,7 +416,8 @@ export default {
isFrame: "1", isFrame: "1",
isCache: "0", isCache: "0",
visible: "0", visible: "0",
status: "0" status: "0",
clientType: 0
}; };
this.resetForm("form"); this.resetForm("form");
}, },

276
acupuncture-后台/src/views/system/notice/index.vue

@ -1,6 +1,13 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="公告标题" prop="noticeTitle"> <el-form-item label="公告标题" prop="noticeTitle">
<el-input <el-input
v-model="queryParams.noticeTitle" v-model="queryParams.noticeTitle"
@ -18,7 +25,11 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="类型" prop="noticeType"> <el-form-item label="类型" prop="noticeType">
<el-select v-model="queryParams.noticeType" placeholder="公告类型" clearable> <el-select
v-model="queryParams.noticeType"
placeholder="公告类型"
clearable
>
<el-option <el-option
v-for="dict in dict.type.sys_notice_type" v-for="dict in dict.type.sys_notice_type"
:key="dict.value" :key="dict.value"
@ -28,8 +39,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -42,7 +61,8 @@
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:notice:add']" v-hasPermi="['system:notice:add']"
>新增</el-button> >新增</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -53,7 +73,8 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['system:notice:edit']" v-hasPermi="['system:notice:edit']"
>修改</el-button> >修改</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -64,37 +85,88 @@
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['system:notice:remove']" v-hasPermi="['system:notice:remove']"
>删除</el-button> >删除</el-button
>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
:data="noticeList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="noticeId" width="100" /> <el-table-column
label="序号"
align="center"
prop="noticeId"
width="100"
/>
<el-table-column <el-table-column
label="公告标题" label="公告标题"
align="center" align="center"
prop="noticeTitle" prop="noticeTitle"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column label="公告类型" align="center" prop="noticeType" width="100">
<el-table-column
label="公告类型"
align="center"
prop="noticeType"
width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_notice_type" :value="scope.row.noticeType"/> <dict-tag
:options="dict.type.sys_notice_type"
:value="scope.row.noticeType"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="status" width="100"> <el-table-column label="状态" align="center" prop="status" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_notice_status" :value="scope.row.status"/> <dict-tag
:options="dict.type.sys_notice_status"
:value="scope.row.status"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建者" align="center" prop="createBy" width="100" /> <el-table-column
<el-table-column label="创建时间" align="center" prop="createTime" width="100"> label="创建者"
align="center"
prop="createBy"
width="100"
/>
<el-table-column
label="创建时间"
align="center"
prop="createTime"
width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column
label="更新时间"
align="center"
prop="createTime"
width="140"
>
<template slot-scope="scope">
<span>{{
parseTime(scope.row.updateTime, "{y}-{m}-{d} {h}:{i}")
}}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -102,20 +174,22 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:notice:edit']" v-hasPermi="['system:notice:edit']"
>修改</el-button> >修改</el-button
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:notice:remove']" v-hasPermi="['system:notice:remove']"
>删除</el-button> >删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@ -125,41 +199,48 @@
<!-- 添加或修改公告对话框 --> <!-- 添加或修改公告对话框 -->
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-form-item label="公告标题" prop="noticeTitle">
<el-col :span="12"> <el-input v-model="form.noticeTitle" placeholder="请输入公告标题" />
<el-form-item label="公告标题" prop="noticeTitle"> </el-form-item>
<el-input v-model="form.noticeTitle" placeholder="请输入公告标题" /> <el-form-item label="公告类型" prop="noticeType">
</el-form-item> <el-select v-model="form.noticeType" placeholder="请选择公告类型">
</el-col> <el-option
<el-col :span="12"> v-for="dict in dict.type.sys_notice_type"
<el-form-item label="公告类型" prop="noticeType"> :key="dict.value"
<el-select v-model="form.noticeType" placeholder="请选择公告类型"> :label="dict.label"
<el-option :value="dict.value"
v-for="dict in dict.type.sys_notice_type" ></el-option>
:key="dict.value" </el-select>
:label="dict.label" </el-form-item>
:value="dict.value" <el-form-item label="通知用户" prop="userIdList">
></el-option> <el-select
</el-select> v-model="form.userIdList"
</el-form-item> multiple
</el-col> placeholder="请选择"
<el-col :span="24"> style="width: 100%"
<el-form-item label="状态"> >
<el-radio-group v-model="form.status"> <el-option
<el-radio v-for="item in userList"
v-for="dict in dict.type.sys_notice_status" :key="item.userId"
:key="dict.value" :label="`${item.userName}-${item.nickName}`"
:label="dict.value" :value="item.userId"
>{{dict.label}}</el-radio> >
</el-radio-group> </el-option>
</el-form-item> </el-select>
</el-col> </el-form-item>
<el-col :span="24"> <el-form-item label="状态">
<el-form-item label="内容"> <el-radio-group v-model="form.status">
<editor v-model="form.noticeContent" :min-height="192"/> <el-radio
</el-form-item> v-for="dict in dict.type.sys_notice_status"
</el-col> :key="dict.value"
</el-row> :label="dict.value"
>{{ dict.label }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item label="内容">
<editor v-model="form.noticeContent" :min-height="192" />
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -170,11 +251,17 @@
</template> </template>
<script> <script>
import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/system/notice"; import {
listNotice,
getNotice,
delNotice,
addNotice,
updateNotice,
} from "@/api/system/notice";
import { listUser } from "@/api/system/user";
export default { export default {
name: "Notice", name: "Notice",
dicts: ['sys_notice_status', 'sys_notice_type'], dicts: ["sys_notice_status", "sys_notice_type"],
data() { data() {
return { return {
// //
@ -201,29 +288,47 @@ export default {
pageSize: 10, pageSize: 10,
noticeTitle: undefined, noticeTitle: undefined,
createBy: undefined, createBy: undefined,
status: undefined status: undefined,
}, },
// //
form: {}, form: {},
// //
rules: { rules: {
noticeTitle: [ noticeTitle: [
{ required: true, message: "公告标题不能为空", trigger: "blur" } { required: true, message: "公告标题不能为空", trigger: "blur" },
], ],
noticeType: [ noticeType: [
{ required: true, message: "公告类型不能为空", trigger: "change" } { required: true, message: "公告类型不能为空", trigger: "change" },
] ],
} userIdList: [
{ required: true, message: "通知用户不能为空", trigger: "blur" },
],
},
userList: [],
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getUserList();
}, },
methods: { methods: {
/** 查询用户列表 */
getUserList() {
listUser({
pageNum: 1,
pageSize: 1000000,
}).then((response) => {
// userNameadmin
response.rows = response.rows.filter(
(item) => item.userName != "admin"
);
this.userList = response.rows;
});
},
/** 查询公告列表 */ /** 查询公告列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listNotice(this.queryParams).then(response => { listNotice(this.queryParams).then((response) => {
this.noticeList = response.rows; this.noticeList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -241,7 +346,8 @@ export default {
noticeTitle: undefined, noticeTitle: undefined,
noticeType: undefined, noticeType: undefined,
noticeContent: undefined, noticeContent: undefined,
status: "0" status: "0",
userIdList: [],
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -257,9 +363,9 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.noticeId) this.ids = selection.map((item) => item.noticeId);
this.single = selection.length!=1 this.single = selection.length != 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
@ -270,25 +376,25 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const noticeId = row.noticeId || this.ids const noticeId = row.noticeId || this.ids;
getNotice(noticeId).then(response => { getNotice(noticeId).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改公告"; this.title = "修改公告";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function() { submitForm: function () {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.noticeId != undefined) { if (this.form.noticeId != undefined) {
updateNotice(this.form).then(response => { updateNotice(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
addNotice(this.form).then(response => { addNotice(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -299,14 +405,18 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const noticeIds = row.noticeId || this.ids const noticeIds = row.noticeId || this.ids;
this.$modal.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?').then(function() { this.$modal
return delNotice(noticeIds); .confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?')
}).then(() => { .then(function () {
this.getList(); return delNotice(noticeIds);
this.$modal.msgSuccess("删除成功"); })
}).catch(() => {}); .then(() => {
} this.getList();
} this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
},
}; };
</script> </script>

388
acupuncture-后台/src/views/system/role/index.vue

@ -1,6 +1,12 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
>
<el-form-item label="角色名称" prop="roleName"> <el-form-item label="角色名称" prop="roleName">
<el-input <el-input
v-model="queryParams.roleName" v-model="queryParams.roleName"
@ -34,6 +40,17 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="客户端类型" prop="status">
<el-select
v-model="queryParams.clientType"
placeholder="客户端类型"
clearable
style="width: 240px"
>
<el-option label="PC端" :value="0" />
<el-option label="移动端" :value="1" />
</el-select>
</el-form-item>
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<el-date-picker <el-date-picker
v-model="dateRange" v-model="dateRange"
@ -46,8 +63,16 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -60,7 +85,8 @@
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:role:add']" v-hasPermi="['system:role:add']"
>新增</el-button> >新增</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -71,7 +97,8 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['system:role:edit']" v-hasPermi="['system:role:edit']"
>修改</el-button> >修改</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -82,7 +109,8 @@
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['system:role:remove']" v-hasPermi="['system:role:remove']"
>删除</el-button> >删除</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -92,16 +120,34 @@
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['system:role:export']" v-hasPermi="['system:role:export']"
>导出</el-button> >导出</el-button
>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
:data="roleList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="角色编号" prop="roleId" width="120" /> <el-table-column label="角色编号" prop="roleId" width="120" />
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true" width="150" /> <el-table-column
<el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" width="150" /> label="角色名称"
prop="roleName"
:show-overflow-tooltip="true"
width="150"
/>
<el-table-column
label="权限字符"
prop="roleKey"
:show-overflow-tooltip="true"
width="150"
/>
<el-table-column label="显示顺序" prop="roleSort" width="100" /> <el-table-column label="显示顺序" prop="roleSort" width="100" />
<el-table-column label="状态" align="center" width="100"> <el-table-column label="状态" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
@ -113,12 +159,27 @@
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="客户端类型" align="center" width="100">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.clientType === 0">PC端</el-tag>
<el-tag type="info" v-if="scope.row.clientType === 1">移动端</el-tag>
</template>
</el-table-column>
<el-table-column
label="创建时间"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope" v-if="scope.row.roleId !== 1"> <template slot-scope="scope" v-if="scope.row.roleId !== 1">
<el-button <el-button
size="mini" size="mini"
@ -126,21 +187,37 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:role:edit']" v-hasPermi="['system:role:edit']"
>修改</el-button> >修改</el-button
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:role:remove']" v-hasPermi="['system:role:remove']"
>删除</el-button> >删除</el-button
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']"> >
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button> <el-dropdown
size="mini"
@command="(command) => handleCommand(command, scope.row)"
v-hasPermi="['system:role:edit']"
>
<el-button size="mini" type="text" icon="el-icon-d-arrow-right"
>更多</el-button
>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="handleDataScope" icon="el-icon-circle-check" <el-dropdown-item
v-hasPermi="['system:role:edit']">数据权限</el-dropdown-item> command="handleDataScope"
<el-dropdown-item command="handleAuthUser" icon="el-icon-user" icon="el-icon-circle-check"
v-hasPermi="['system:role:edit']">分配用户</el-dropdown-item> v-hasPermi="['system:role:edit']"
>数据权限</el-dropdown-item
>
<el-dropdown-item
command="handleAuthUser"
icon="el-icon-user"
v-hasPermi="['system:role:edit']"
>分配用户</el-dropdown-item
>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
@ -148,7 +225,7 @@
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@ -163,7 +240,10 @@
</el-form-item> </el-form-item>
<el-form-item prop="roleKey"> <el-form-item prop="roleKey">
<span slot="label"> <span slot="label">
<el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)" placement="top"> <el-tooltip
content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)"
placement="top"
>
<i class="el-icon-question"></i> <i class="el-icon-question"></i>
</el-tooltip> </el-tooltip>
权限字符 权限字符
@ -171,7 +251,11 @@
<el-input v-model="form.roleKey" placeholder="请输入权限字符" /> <el-input v-model="form.roleKey" placeholder="请输入权限字符" />
</el-form-item> </el-form-item>
<el-form-item label="角色顺序" prop="roleSort"> <el-form-item label="角色顺序" prop="roleSort">
<el-input-number v-model="form.roleSort" controls-position="right" :min="0" /> <el-input-number
v-model="form.roleSort"
controls-position="right"
:min="0"
/>
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="状态">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status">
@ -179,13 +263,32 @@
v-for="dict in dict.type.sys_normal_disable" v-for="dict in dict.type.sys_normal_disable"
:key="dict.value" :key="dict.value"
:label="dict.value" :label="dict.value"
>{{dict.label}}</el-radio> >{{ dict.label }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item label="客户端类型">
<el-radio-group v-model="form.clientType">
<el-radio :label="0">PC端</el-radio>
<el-radio :label="1">移动端</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="菜单权限"> <el-form-item label="菜单权限">
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox> <el-checkbox
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox> v-model="menuExpand"
<el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox> @change="handleCheckedTreeExpand($event, 'menu')"
>展开/折叠</el-checkbox
>
<el-checkbox
v-model="menuNodeAll"
@change="handleCheckedTreeNodeAll($event, 'menu')"
>全选/全不选</el-checkbox
>
<el-checkbox
v-model="form.menuCheckStrictly"
@change="handleCheckedTreeConnect($event, 'menu')"
>父子联动</el-checkbox
>
<el-tree <el-tree
class="tree-border" class="tree-border"
:data="menuOptions" :data="menuOptions"
@ -198,7 +301,11 @@
></el-tree> ></el-tree>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input> <el-input
v-model="form.remark"
type="textarea"
placeholder="请输入内容"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -208,7 +315,12 @@
</el-dialog> </el-dialog>
<!-- 分配角色数据权限对话框 --> <!-- 分配角色数据权限对话框 -->
<el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body> <el-dialog
:title="title"
:visible.sync="openDataScope"
width="500px"
append-to-body
>
<el-form :model="form" label-width="80px"> <el-form :model="form" label-width="80px">
<el-form-item label="角色名称"> <el-form-item label="角色名称">
<el-input v-model="form.roleName" :disabled="true" /> <el-input v-model="form.roleName" :disabled="true" />
@ -227,9 +339,21 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="数据权限" v-show="form.dataScope == 2"> <el-form-item label="数据权限" v-show="form.dataScope == 2">
<el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">展开/折叠</el-checkbox> <el-checkbox
<el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">全选/全不选</el-checkbox> v-model="deptExpand"
<el-checkbox v-model="form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">父子联动</el-checkbox> @change="handleCheckedTreeExpand($event, 'dept')"
>展开/折叠</el-checkbox
>
<el-checkbox
v-model="deptNodeAll"
@change="handleCheckedTreeNodeAll($event, 'dept')"
>全选/全不选</el-checkbox
>
<el-checkbox
v-model="form.deptCheckStrictly"
@change="handleCheckedTreeConnect($event, 'dept')"
>父子联动</el-checkbox
>
<el-tree <el-tree
class="tree-border" class="tree-border"
:data="deptOptions" :data="deptOptions"
@ -252,12 +376,24 @@
</template> </template>
<script> <script>
import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role"; import {
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"; listRole,
getRole,
delRole,
addRole,
updateRole,
dataScope,
changeRoleStatus,
deptTreeSelect,
} from "@/api/system/role";
import {
treeselect as menuTreeselect,
roleMenuTreeselect,
} from "@/api/system/menu";
export default { export default {
name: "Role", name: "Role",
dicts: ['sys_normal_disable'], dicts: ["sys_normal_disable"],
data() { data() {
return { return {
// //
@ -290,24 +426,24 @@ export default {
dataScopeOptions: [ dataScopeOptions: [
{ {
value: "1", value: "1",
label: "全部数据权限" label: "全部数据权限",
}, },
{ {
value: "2", value: "2",
label: "自定数据权限" label: "自定数据权限",
}, },
{ {
value: "3", value: "3",
label: "本部门数据权限" label: "本部门数据权限",
}, },
{ {
value: "4", value: "4",
label: "本部门及以下数据权限" label: "本部门及以下数据权限",
}, },
{ {
value: "5", value: "5",
label: "仅本人数据权限" label: "仅本人数据权限",
} },
], ],
// //
menuOptions: [], menuOptions: [],
@ -319,26 +455,26 @@ export default {
pageSize: 10, pageSize: 10,
roleName: undefined, roleName: undefined,
roleKey: undefined, roleKey: undefined,
status: undefined status: undefined,
}, },
// //
form: {}, form: {},
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "label" label: "label",
}, },
// //
rules: { rules: {
roleName: [ roleName: [
{ required: true, message: "角色名称不能为空", trigger: "blur" } { required: true, message: "角色名称不能为空", trigger: "blur" },
], ],
roleKey: [ roleKey: [
{ required: true, message: "权限字符不能为空", trigger: "blur" } { required: true, message: "权限字符不能为空", trigger: "blur" },
], ],
roleSort: [ roleSort: [
{ required: true, message: "角色顺序不能为空", trigger: "blur" } { required: true, message: "角色顺序不能为空", trigger: "blur" },
] ],
} },
}; };
}, },
created() { created() {
@ -348,7 +484,8 @@ export default {
/** 查询角色列表 */ /** 查询角色列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listRole(this.addDateRange(this.queryParams, this.dateRange)).then(response => { listRole(this.addDateRange(this.queryParams, this.dateRange)).then(
(response) => {
this.roleList = response.rows; this.roleList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -357,7 +494,7 @@ export default {
}, },
/** 查询菜单树结构 */ /** 查询菜单树结构 */
getMenuTreeselect() { getMenuTreeselect() {
menuTreeselect().then(response => { menuTreeselect().then((response) => {
this.menuOptions = response.data; this.menuOptions = response.data;
}); });
}, },
@ -381,14 +518,14 @@ export default {
}, },
/** 根据角色ID查询菜单树结构 */ /** 根据角色ID查询菜单树结构 */
getRoleMenuTreeselect(roleId) { getRoleMenuTreeselect(roleId) {
return roleMenuTreeselect(roleId).then(response => { return roleMenuTreeselect(roleId).then((response) => {
this.menuOptions = response.menus; this.menuOptions = response.menus;
return response; return response;
}); });
}, },
/** 根据角色ID查询部门树结构 */ /** 根据角色ID查询部门树结构 */
getDeptTree(roleId) { getDeptTree(roleId) {
return deptTreeSelect(roleId).then(response => { return deptTreeSelect(roleId).then((response) => {
this.deptOptions = response.depts; this.deptOptions = response.depts;
return response; return response;
}); });
@ -396,13 +533,17 @@ export default {
// //
handleStatusChange(row) { handleStatusChange(row) {
let text = row.status === "0" ? "启用" : "停用"; let text = row.status === "0" ? "启用" : "停用";
this.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?').then(function() { this.$modal
return changeRoleStatus(row.roleId, row.status); .confirm('确认要"' + text + '""' + row.roleName + '"角色吗?')
}).then(() => { .then(function () {
this.$modal.msgSuccess(text + "成功"); return changeRoleStatus(row.roleId, row.status);
}).catch(function() { })
row.status = row.status === "0" ? "1" : "0"; .then(() => {
}); this.$modal.msgSuccess(text + "成功");
})
.catch(function () {
row.status = row.status === "0" ? "1" : "0";
});
}, },
// //
cancel() { cancel() {
@ -419,22 +560,23 @@ export default {
if (this.$refs.menu != undefined) { if (this.$refs.menu != undefined) {
this.$refs.menu.setCheckedKeys([]); this.$refs.menu.setCheckedKeys([]);
} }
this.menuExpand = false, (this.menuExpand = false),
this.menuNodeAll = false, (this.menuNodeAll = false),
this.deptExpand = true, (this.deptExpand = true),
this.deptNodeAll = false, (this.deptNodeAll = false),
this.form = { (this.form = {
roleId: undefined, roleId: undefined,
roleName: undefined, roleName: undefined,
roleKey: undefined, roleKey: undefined,
roleSort: 0, roleSort: 0,
status: "0", status: "0",
menuIds: [], menuIds: [],
deptIds: [], deptIds: [],
menuCheckStrictly: true, menuCheckStrictly: true,
deptCheckStrictly: true, deptCheckStrictly: true,
remark: undefined remark: undefined,
}; clientType: 0,
});
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -450,9 +592,9 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.roleId) this.ids = selection.map((item) => item.roleId);
this.single = selection.length!=1 this.single = selection.length != 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
// //
handleCommand(command, row) { handleCommand(command, row) {
@ -469,12 +611,12 @@ export default {
}, },
// / // /
handleCheckedTreeExpand(value, type) { handleCheckedTreeExpand(value, type) {
if (type == 'menu') { if (type == "menu") {
let treeList = this.menuOptions; let treeList = this.menuOptions;
for (let i = 0; i < treeList.length; i++) { for (let i = 0; i < treeList.length; i++) {
this.$refs.menu.store.nodesMap[treeList[i].id].expanded = value; this.$refs.menu.store.nodesMap[treeList[i].id].expanded = value;
} }
} else if (type == 'dept') { } else if (type == "dept") {
let treeList = this.deptOptions; let treeList = this.deptOptions;
for (let i = 0; i < treeList.length; i++) { for (let i = 0; i < treeList.length; i++) {
this.$refs.dept.store.nodesMap[treeList[i].id].expanded = value; this.$refs.dept.store.nodesMap[treeList[i].id].expanded = value;
@ -483,18 +625,18 @@ export default {
}, },
// / // /
handleCheckedTreeNodeAll(value, type) { handleCheckedTreeNodeAll(value, type) {
if (type == 'menu') { if (type == "menu") {
this.$refs.menu.setCheckedNodes(value ? this.menuOptions: []); this.$refs.menu.setCheckedNodes(value ? this.menuOptions : []);
} else if (type == 'dept') { } else if (type == "dept") {
this.$refs.dept.setCheckedNodes(value ? this.deptOptions: []); this.$refs.dept.setCheckedNodes(value ? this.deptOptions : []);
} }
}, },
// //
handleCheckedTreeConnect(value, type) { handleCheckedTreeConnect(value, type) {
if (type == 'menu') { if (type == "menu") {
this.form.menuCheckStrictly = value ? true: false; this.form.menuCheckStrictly = value ? true : false;
} else if (type == 'dept') { } else if (type == "dept") {
this.form.deptCheckStrictly = value ? true: false; this.form.deptCheckStrictly = value ? true : false;
} }
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
@ -507,19 +649,19 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const roleId = row.roleId || this.ids const roleId = row.roleId || this.ids;
const roleMenu = this.getRoleMenuTreeselect(roleId); const roleMenu = this.getRoleMenuTreeselect(roleId);
getRole(roleId).then(response => { getRole(roleId).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.$nextTick(() => { this.$nextTick(() => {
roleMenu.then(res => { roleMenu.then((res) => {
let checkedKeys = res.checkedKeys let checkedKeys = res.checkedKeys;
checkedKeys.forEach((v) => { checkedKeys.forEach((v) => {
this.$nextTick(()=>{ this.$nextTick(() => {
this.$refs.menu.setChecked(v, true ,false); this.$refs.menu.setChecked(v, true, false);
}) });
}) });
}); });
}); });
}); });
@ -527,7 +669,7 @@ export default {
}, },
/** 选择角色权限范围触发 */ /** 选择角色权限范围触发 */
dataScopeSelectChange(value) { dataScopeSelectChange(value) {
if(value !== '2') { if (value !== "2") {
this.$refs.dept.setCheckedKeys([]); this.$refs.dept.setCheckedKeys([]);
} }
}, },
@ -535,11 +677,11 @@ export default {
handleDataScope(row) { handleDataScope(row) {
this.reset(); this.reset();
const deptTreeSelect = this.getDeptTree(row.roleId); const deptTreeSelect = this.getDeptTree(row.roleId);
getRole(row.roleId).then(response => { getRole(row.roleId).then((response) => {
this.form = response.data; this.form = response.data;
this.openDataScope = true; this.openDataScope = true;
this.$nextTick(() => { this.$nextTick(() => {
deptTreeSelect.then(res => { deptTreeSelect.then((res) => {
this.$refs.dept.setCheckedKeys(res.checkedKeys); this.$refs.dept.setCheckedKeys(res.checkedKeys);
}); });
}); });
@ -547,24 +689,24 @@ export default {
this.title = "分配数据权限"; this.title = "分配数据权限";
}, },
/** 分配用户操作 */ /** 分配用户操作 */
handleAuthUser: function(row) { handleAuthUser: function (row) {
const roleId = row.roleId; const roleId = row.roleId;
this.$router.push("/system/role-auth/user/" + roleId); this.$router.push("/system/role-auth/user/" + roleId);
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function() { submitForm: function () {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.roleId != undefined) { if (this.form.roleId != undefined) {
this.form.menuIds = this.getMenuAllCheckedKeys(); this.form.menuIds = this.getMenuAllCheckedKeys();
updateRole(this.form).then(response => { updateRole(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
this.form.menuIds = this.getMenuAllCheckedKeys(); this.form.menuIds = this.getMenuAllCheckedKeys();
addRole(this.form).then(response => { addRole(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
@ -574,10 +716,10 @@ export default {
}); });
}, },
/** 提交按钮(数据权限) */ /** 提交按钮(数据权限) */
submitDataScope: function() { submitDataScope: function () {
if (this.form.roleId != undefined) { if (this.form.roleId != undefined) {
this.form.deptIds = this.getDeptAllCheckedKeys(); this.form.deptIds = this.getDeptAllCheckedKeys();
dataScope(this.form).then(response => { dataScope(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.openDataScope = false; this.openDataScope = false;
this.getList(); this.getList();
@ -587,19 +729,27 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const roleIds = row.roleId || this.ids; const roleIds = row.roleId || this.ids;
this.$modal.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?').then(function() { this.$modal
return delRole(roleIds); .confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?')
}).then(() => { .then(function () {
this.getList(); return delRole(roleIds);
this.$modal.msgSuccess("删除成功"); })
}).catch(() => {}); .then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('system/role/export', { this.download(
...this.queryParams "system/role/export",
}, `role_${new Date().getTime()}.xlsx`) {
} ...this.queryParams,
} },
`role_${new Date().getTime()}.xlsx`
);
},
},
}; };
</script> </script>

BIN
acupuncture-后台/南宁后台ssl-3.zip → acupuncture-后台/南宁针灸后台ssl-4.zip

Binary file not shown.
Loading…
Cancel
Save