修复关闭弹框id为空
This commit is contained in:
parent
23c4fe9f9e
commit
36f8bbd652
@ -38,13 +38,42 @@ service.interceptors.response.use(
|
|||||||
if (Authorization_token) {
|
if (Authorization_token) {
|
||||||
sessionStorage.setItem('token', Authorization_token); //当token快过期时,服务器会返回新token,本地刷新
|
sessionStorage.setItem('token', Authorization_token); //当token快过期时,服务器会返回新token,本地刷新
|
||||||
}
|
}
|
||||||
|
const store = useUserStore();
|
||||||
|
const { code, message } = response.data;
|
||||||
|
if (code === 401 || code==403 || code==405 || code==406) {
|
||||||
|
alert(405);
|
||||||
|
Message.error({
|
||||||
|
content: message,
|
||||||
|
duration: 3000
|
||||||
|
});
|
||||||
|
// 重定向路由到登陆页面
|
||||||
|
store.userLogout();
|
||||||
|
window.location.href="/login";
|
||||||
|
}else if(code === 400){
|
||||||
|
Message.error({
|
||||||
|
content: '缺少参数',
|
||||||
|
duration: 3000
|
||||||
|
});
|
||||||
|
}else if(code === 402){
|
||||||
|
Message.error({
|
||||||
|
content: '请求无权限',
|
||||||
|
duration: 3000
|
||||||
|
});
|
||||||
|
}else if(code === 201){
|
||||||
|
Message.error({
|
||||||
|
content: '账户状态异常',
|
||||||
|
duration: 3000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return response.data;
|
return response.data;
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
const store = useUserStore();
|
|
||||||
const { code, message } = error.response.data;
|
const { code, message } = error.response.data;
|
||||||
// 如果过期则退出登录
|
// 如果过期则退出登录
|
||||||
if (code === 401 || code==403 || code==405 || code==406) {
|
if (code === 401 || code==403 || code==405 || code==406) {
|
||||||
|
alert(405);
|
||||||
Message.error({
|
Message.error({
|
||||||
content: message,
|
content: message,
|
||||||
duration: 3000
|
duration: 3000
|
||||||
@ -75,8 +104,9 @@ service.interceptors.response.use(
|
|||||||
content: error.message,
|
content: error.message,
|
||||||
duration: 3000
|
duration: 3000
|
||||||
})
|
})
|
||||||
return Promise.reject(message);
|
|
||||||
}
|
}
|
||||||
|
return Promise.reject(message);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -391,7 +391,7 @@
|
|||||||
|
|
||||||
<!-- 审核失败弹框 -->
|
<!-- 审核失败弹框 -->
|
||||||
<a-modal :mask-closable="false" v-model:visible="modalCheckVisible" :title="'拒绝理由'" title-align="start"
|
<a-modal :mask-closable="false" v-model:visible="modalCheckVisible" :title="'拒绝理由'" title-align="start"
|
||||||
@before-ok="handleSubmit" @close="() => { $refs.checkFormRef.resetFields(); modalForm.doctor_id = null;}">
|
@before-ok="handleSubmit" @close="() => { $refs.checkFormRef.resetFields();}">
|
||||||
<a-form :model="modalCheckForm" ref="checkFormRef"
|
<a-form :model="modalCheckForm" ref="checkFormRef"
|
||||||
:auto-label-width="true" :mask-closable="false" :rules="rules">
|
:auto-label-width="true" :mask-closable="false" :rules="rules">
|
||||||
<a-form-item field="option" label="原因:">
|
<a-form-item field="option" label="原因:">
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<a-option :value="4">问诊购药</a-option>
|
<a-option :value="4">问诊购药</a-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item field="multi_point_status" label="认 证">
|
<a-form-item field="multi_point_status" label="多点认证">
|
||||||
<a-select v-model="queryForm.multi_point_status" placeholder="请选择多点认证状态" :style="{ width: '180px' }">
|
<a-select v-model="queryForm.multi_point_status" placeholder="请选择多点认证状态" :style="{ width: '180px' }">
|
||||||
<!-- 医生多点执业认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败) -->
|
<!-- 医生多点执业认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败) -->
|
||||||
<a-option :value="0">未认证</a-option>
|
<a-option :value="0">未认证</a-option>
|
||||||
@ -30,7 +30,7 @@
|
|||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item field="iden_auth_status" label="审核状态">
|
<a-form-item field="iden_auth_status" label="审核状态">
|
||||||
<a-select v-model="queryForm.iden_auth_status" placeholder="请选择多点认证状态" :style="{ width: '180px' }">
|
<a-select v-model="queryForm.iden_auth_status" placeholder="请选择审核状态" :style="{ width: '180px' }">
|
||||||
<!-- 医生多点执业认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败) -->
|
<!-- 医生多点执业认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败) -->
|
||||||
<a-option :value="0">未认证</a-option>
|
<a-option :value="0">未认证</a-option>
|
||||||
<a-option :value="1">认证通过</a-option>
|
<a-option :value="1">认证通过</a-option>
|
||||||
@ -183,15 +183,17 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item field="hospital.address" label="医院地址:">
|
<a-form-item field="hospital.address" label="医院地址:">
|
||||||
<a-input v-model="modalForm.hospital.address" placeholder="请输入医院地址" />
|
<a-input v-model="modalForm.hospital.address" placeholder="请输入医院地址" :disabled="modalSatus=='edit'"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item field="hospital.hospital_name" label="医院名称:">
|
<a-form-item field="hospital.hospital_name" label="医院名称:">
|
||||||
<a-select placeholder="请选择所在医院" v-model="modalForm.hospital.hospital_name">
|
<a-space direction="vertical" size="large">
|
||||||
<a-option v-for="item in hospitalData" :key="item.hospital_id" :value="item.hospital_id"
|
<a-select :options="hospitalData" allow-search placeholder="请选择所在医院" v-model="modalForm.hospital.hospital_name" :loading="loading" @search="handleHospitalList" >
|
||||||
:label="item.hospital_name">{{item.hospital_name}}</a-option>
|
<!-- <a-option v-for="item in hospitalData" :key="item.hospital_id" :value="item.hospital_id"
|
||||||
|
:label="item.hospital_name"></a-option> -->
|
||||||
</a-select>
|
</a-select>
|
||||||
|
</a-space>
|
||||||
<!-- <a-input v-model="modalForm.hospital.hospital_name" placeholder="请输入医院名称" /> -->
|
<!-- <a-input v-model="modalForm.hospital.hospital_name" placeholder="请输入医院名称" /> -->
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@ -470,7 +472,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed} from 'vue';
|
||||||
import { getDoctorList, addDoctor, removeDoctor, updateDoctor, getDoctorDetail, departmentList, decryptCard, hospitalList, expertiseList } from '@/api/doctor/list';
|
import { getDoctorList, addDoctor, removeDoctor, updateDoctor, getDoctorDetail, departmentList, decryptCard, hospitalList, expertiseList } from '@/api/doctor/list';
|
||||||
import { ossSign, ossUpload } from '@/api/oss';
|
import { ossSign, ossUpload } from '@/api/oss';
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
@ -489,6 +491,7 @@
|
|||||||
const oldFrontImg=ref(''),oldBackImg=ref(''),oldSignImg=ref('');
|
const oldFrontImg=ref(''),oldBackImg=ref(''),oldSignImg=ref('');
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const currentPage = ref(1);
|
const currentPage = ref(1);
|
||||||
|
const loading = ref(false);
|
||||||
// Pager
|
// Pager
|
||||||
const pager = {
|
const pager = {
|
||||||
total: 0,
|
total: 0,
|
||||||
@ -1050,11 +1053,19 @@
|
|||||||
};
|
};
|
||||||
const hospitalData = ref([]);
|
const hospitalData = ref([]);
|
||||||
//获取医院列表
|
//获取医院列表
|
||||||
const handleHospitalList = () => {
|
const handleHospitalList = (value) => {
|
||||||
hospitalList().then((res) => {
|
loading.value = true;
|
||||||
|
hospitalList({
|
||||||
|
hospital_name:value,
|
||||||
|
}).then((res) => {
|
||||||
const { data, code, message } = res;
|
const { data, code, message } = res;
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
hospitalData.value = data;
|
let name =data.map((item)=>{
|
||||||
|
return item.hospital_name
|
||||||
|
})
|
||||||
|
console.log(name)
|
||||||
|
hospitalData.value =reactive(name);
|
||||||
|
loading.value = false;
|
||||||
} else {
|
} else {
|
||||||
proxy.$notification.error(message);
|
proxy.$notification.error(message);
|
||||||
}
|
}
|
||||||
@ -1134,7 +1145,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hospital_name {
|
.hospital_name {
|
||||||
width: 160px;
|
width: 140px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|||||||
@ -245,7 +245,7 @@
|
|||||||
|
|
||||||
<!-- 审核失败弹框 -->
|
<!-- 审核失败弹框 -->
|
||||||
<a-modal :mask-closable="false" v-model:visible="modalCheckVisible" :title="'拒绝理由'" title-align="start"
|
<a-modal :mask-closable="false" v-model:visible="modalCheckVisible" :title="'拒绝理由'" title-align="start"
|
||||||
@before-ok="handleSubmit" @close="() => { $refs.checkFormRef.resetFields(); modalForm.doctor_id = null;}">
|
@before-ok="handleSubmit" @close="() => { $refs.checkFormRef.resetFields();}">
|
||||||
<a-form :model="modalCheckForm" ref="checkFormRef"
|
<a-form :model="modalCheckForm" ref="checkFormRef"
|
||||||
:auto-label-width="true" :mask-closable="false" :rules="rules">
|
:auto-label-width="true" :mask-closable="false" :rules="rules">
|
||||||
<a-form-item field="multi_point_fail_reason" label="原因:">
|
<a-form-item field="multi_point_fail_reason" label="原因:">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user