diff --git a/package.json b/package.json
index f30d54d..6d2b8f3 100644
--- a/package.json
+++ b/package.json
@@ -24,6 +24,7 @@
"js-cookie": "^3.0.5",
"npm": "^9.6.6",
"pinia": "^2.0.36",
+ "pinia-plugin-persistedstate": "^3.1.0",
"spinkit": "^2.0.1",
"terser": "^5.19.1",
"vite-plugin-compression": "^0.5.1",
diff --git a/src/api/doctor/list.js b/src/api/doctor/list.js
index bc071bc..193f628 100644
--- a/src/api/doctor/list.js
+++ b/src/api/doctor/list.js
@@ -53,6 +53,13 @@ export function getDoctorDetail(id){
params
})
}
+ export function decryptBank(doctor_id){
+ return request({
+ url:'/decrypt/bank/'+doctor_id,
+ method: 'get'
+ })
+ }
+
export function hospitalList(params){ //获取医院地址列表
return request({
url:'/basic/hospital/list',
@@ -66,4 +73,17 @@ export function getDoctorDetail(id){
method: 'get'
})
}
+ export function bankList(){ //获取银行列表
+ return request({
+ url:'/basic/bank/list',
+ method: 'get'
+ })
+ }
+ export function areaList(params){ //获取银行列表
+ return request({
+ url:'/basic/area/list',
+ method: 'get',
+ params
+ })
+ }
\ No newline at end of file
diff --git a/src/layout/components/Avatar/index.vue b/src/layout/components/Avatar/index.vue
index 3e4bdfe..9749325 100644
--- a/src/layout/components/Avatar/index.vue
+++ b/src/layout/components/Avatar/index.vue
@@ -50,7 +50,7 @@ const handleLogout = () => {
onOk:async() => {
const store = useUserStore();
await store.userLogut();
- window.sessionStorage.removeItem('token');
+ window.localStorage.removeItem('token');
clearLocalStorage();
proxy.$router.push('/login');
},
diff --git a/src/main.js b/src/main.js
index 14b08b7..666f5ba 100644
--- a/src/main.js
+++ b/src/main.js
@@ -6,6 +6,7 @@ import { Message, Modal, Notification } from '@arco-design/web-vue';
import '@arco-design/web-vue/dist/arco.css';
import router from './router/';
import { parseTime } from '@/utils/parseTime';
+import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// Directive
import permission from '@/directive/permission/permission';
@@ -30,6 +31,7 @@ app.config.globalProperties.parseTime = parseTime;
for(const name in ArcoIconModules){
app.component(name,ArcoIconModules[name])
}
+pinia.use(piniaPluginPersistedstate);
app.use(Loading)
app.use(ArcoVue);
app.use(router);
diff --git a/src/router/index.js b/src/router/index.js
index 19b153d..7777783 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -71,7 +71,7 @@ router.beforeEach(async (to, from, next) => {
// 获取系统配置信息
await store.getSysConfig();
- console.log(permissionStore.addRouters.length)
+ console.log(permissionStore.addRouters.length,store.token)
// 判断用户Token是否获取
if (to.name !== 'login' && !store.token) {
next({ name: 'login' });
diff --git a/src/store/permission.js b/src/store/permission.js
index 770f67e..a6b8805 100644
--- a/src/store/permission.js
+++ b/src/store/permission.js
@@ -71,4 +71,12 @@ export const usePermissionStore = defineStore('permisson', {
this.menuList = [];
}
},
+ // persist: {
+ // // 修改存储中使用的键名称,默认为当前 Store的 id
+ // key: 'permession',
+ // // 修改为 sessionStorage,默认为 localStorage
+ // // storage: window.sessionStorage,
+ // // 按需持久化,默认不写会存储全部
+ // //paths: ['token'],
+ // }
});
diff --git a/src/store/userInfo.js b/src/store/userInfo.js
index c9bf2d3..968c5f2 100644
--- a/src/store/userInfo.js
+++ b/src/store/userInfo.js
@@ -8,11 +8,11 @@ import { getAppConfig } from '@/api/admin/login';
export const useUserStore = defineStore('user', {
state: () => {
return {
- token: window.sessionStorage.getItem('token') || '',
- uid: window.sessionStorage.getItem('uid') || '',
+ token: window.localStorage.getItem('token') || '',
+ uid: window.localStorage.getItem('uid') || '',
sysConfig: getLocalStorage('sysConfig'),
buttonPermissions:[],
- userInfo:window.sessionStorage.getItem('manage-userInfo')?JSON.parse(window.sessionStorage.getItem('manage-userInfo')):''
+ userInfo:window.localStorage.getItem('manage-userInfo')?JSON.parse(window.localStorage.getItem('manage-userInfo')):''
}
},
// getters: {
@@ -22,27 +22,12 @@ export const useUserStore = defineStore('user', {
setInfo(token,user) {
this.token = token;
this.userInfo=user;
- window.sessionStorage.setItem('token', token);
+ window.localStorage.setItem('token', token);
window.localStorage.setItem('uid',user.user_id);
- window.sessionStorage.setItem('manage-userInfo',JSON.stringify(user));
+ window.localStorage.setItem('manage-userInfo',JSON.stringify(user));
},
- // async getUserInfo() {
- // try {
- // const res = await getInfo();
- // // window.sessionStorage.setItem('uid', res.data.userId);
- // this.userInfo = res.data;
-
-
-
- // } catch (err) {
- // console.error(err);
- // }
- // },
async getSysConfig() {
try {
- // const res = await getAppConfig();
- // setLocalStorage('sysConfig', res.data);
- //res.data;
let data={sys_app_logo: "https://doc-image.zhangwj.com/img/go-admin.png", sys_app_name: "互联网医院后台管理"};
setLocalStorage('sysConfig', data);
this.sysConfig =data
@@ -61,5 +46,13 @@ export const useUserStore = defineStore('user', {
}
}
+},
+persist: {
+ // 修改存储中使用的键名称,默认为当前 Store的 id
+ key: 'token',
+ // 修改为 localStorage,默认为 localStorage
+ //storage: window.localStorage,
+ // 按需持久化,默认不写会存储全部
+ paths: ['token'],
}
})
diff --git a/src/views/admin/sys-dept/index.vue b/src/views/admin/sys-dept/index.vue
index 23e41f0..a5644e3 100644
--- a/src/views/admin/sys-dept/index.vue
+++ b/src/views/admin/sys-dept/index.vue
@@ -41,7 +41,7 @@
修改
- 新增
+ 新增
{ deleteVisible = true; deleteData = [record.dept_id]; }"> 删除
@@ -57,7 +57,7 @@
@@ -1154,7 +1273,9 @@
.action {
margin-bottom: 12px;
}
-
+ .okmodal div{
+ text-align: center;
+ }
.hospital_name {
width: 140px;
white-space: nowrap;
diff --git a/src/views/doctor/doctor-multipoint/index.vue b/src/views/doctor/doctor-multipoint/index.vue
index bd4142e..acecbf2 100644
--- a/src/views/doctor/doctor-multipoint/index.vue
+++ b/src/views/doctor/doctor-multipoint/index.vue
@@ -390,9 +390,7 @@
})
modalForm.cur_doctor_expertise = arr;
}
- } else {
- proxy.$notification.error(message);
- }
+ }
};
//开启服务处理
@@ -444,8 +442,6 @@
if (code == 200) {
tableData.value = data.data;
Object.assign(pager, { total: data.total, page: data.page, page_size: data.page_size });
- } else {
- proxy.$notification.error(message);
}
};
@@ -470,9 +466,7 @@
const { data, code, message } = res;
if (code == 200) {
departmentData.value = data;
- } else {
- proxy.$notification.error(message);
- };
+ }
});
}
//切换小眼睛
@@ -486,8 +480,6 @@
});
if (code == 200) {
id_card_num.value = data;
- } else {
- proxy.$notification.error(message);
}
};
const hospitalData = ref([]);
@@ -497,8 +489,6 @@
const { data, code, message } = res;
if (code == 200) {
hospitalData.value = data;
- } else {
- proxy.$notification.error(message);
}
});
@@ -510,8 +500,6 @@
const { data, code, message } = res;
if (code == 200) {
expertiseData.value = data;
- } else {
- proxy.$notification.error(message);
}
})
}
@@ -525,10 +513,11 @@
},modalForm.doctor_id);
if (code == 200) {
proxy.$notification.success("提交成功");
- } else {
- proxy.$notification.error(message);
+ modalVisible.value=false;
}
done();
+ getDoctorInfo(pager);
+
} else {
console.log(valid)
proxy.$message.error('表单校验失败');
@@ -539,15 +528,15 @@
//审核
const handleCheck= async(type)=>{
if(type=="ok"){
-
const {code,message,data}= await checkDoctor({
multi_point_status:1
},modalForm.doctor_id);
if (code == 200) {
proxy.$notification.success("审核通过");
- } else {
- proxy.$notification.error(message);
- }
+ modalVisible.value=false;
+ };
+ getDoctorInfo(pager);
+
}else{
modalCheckVisible.value=true;
}
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 240555d..2614782 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -153,9 +153,7 @@ const handleLogin = () => {
// proxy.$router.push(path);
// loading.value = false;
// },500);
- } else {
- proxy.$message.error(`登陆失败:${message}`);
- }
+ }
} catch (err) {
console.log(err)
// 登录失败 重新获取验证码