添加证书和签章
This commit is contained in:
parent
b82466f17d
commit
dc09f9b497
@ -10,4 +10,5 @@
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
34
src/api/doctor/ca.js
Normal file
34
src/api/doctor/ca.js
Normal file
@ -0,0 +1,34 @@
|
||||
import request from '../../utils/request'
|
||||
export function updateCA(id){//更新证书
|
||||
return request({
|
||||
url:'/admin/ca/cert/user/renew/'+id,
|
||||
method: 'put',
|
||||
|
||||
})
|
||||
}
|
||||
export function removeCA(id){//注销证书
|
||||
return request({
|
||||
url:'/admin/ca/cert/user/remove/'+id,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
export function applyCA(id){//申请证书
|
||||
return request({
|
||||
url:'/admin/ca/cert/user/'+id,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
||||
export function updateSign(id){//更新签章
|
||||
return request({
|
||||
url:'/admin/ca/cert/user/renew/'+id,
|
||||
method: 'put',
|
||||
|
||||
})
|
||||
}
|
||||
export function applySign(id){//申请签章
|
||||
return request({
|
||||
url:'/admin/ca/cert/user/'+id,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
@ -6,7 +6,6 @@ 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';
|
||||
|
||||
@ -558,24 +558,33 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider v-if="(modalForm.user_doctor_info.license_cert && modalForm.user_doctor_info.license_cert.length>0) || modalSatus!='detail'"/>
|
||||
<div class="titlebox">
|
||||
<div class="titlebox" v-if="modalForm.department_custom_name && modalForm.iden_auth_status==1 && modalForm.user_doctor_info.sign_image">
|
||||
<div class="bar"></div>
|
||||
<div class="name">CA证书配置</div>
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px;" >
|
||||
<a-row :gutter="24" style="margin-top: 35px;" v-if="modalForm.department_custom_name && modalForm.iden_auth_status==1 && modalForm.user_doctor_info.sign_image">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="" label="" no-style>
|
||||
<div>证书有效期:2023.02.01-2023.08.01</div>
|
||||
<a-space style="margin-top: 15px;">
|
||||
<a-button type="primary" status="success">更新</a-button>
|
||||
<a-button type="primary" status="danger">注销</a-button>
|
||||
<a-button type="primary" >重新申请</a-button>
|
||||
<!-- <a-button type="primary" >证书申请</a-button> -->
|
||||
<a-button type="primary" status="success" @click="()=>{okVisible=true;okStatus=2;}">证书续期</a-button>
|
||||
<a-button type="primary" status="danger" @click="()=>{okVisible=true;okStatus=3;}">证书注销</a-button>
|
||||
|
||||
</a-space>
|
||||
<a-divider />
|
||||
<div class="title">签章配置</div>
|
||||
<a-space style="margin-top: 15px;">
|
||||
<!-- <a-button type="primary" >证书申请</a-button> -->
|
||||
<a-button type="primary" status="success" @click="()=>{okVisible=true;okStatus=4;}">签章申请</a-button>
|
||||
<a-button type="primary" status="danger" @click="()=>{okVisible=true;okStatus=5;}">签章更新</a-button>
|
||||
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<a-divider v-show="modalSatus!='detail'" />
|
||||
<a-divider v-show="modalSatus!='detail' " v-if="modalForm.department_custom_name && modalForm.iden_auth_status==1 && modalForm.user_doctor_info.sign_image"/>
|
||||
<div class="titlebox" v-if="modalSatus!='detail'">
|
||||
<div class="bar"></div>
|
||||
<div class="name">操作</div>
|
||||
@ -584,7 +593,7 @@
|
||||
<a-col :span="24">
|
||||
<a-form-item field="" label="" no-style>
|
||||
<a-space v-if="modalSatus!='detail'" style="margin-right: 8px;">
|
||||
<a-button type="primary" @click="()=>okVisible=true">保存</a-button>
|
||||
<a-button type="primary" @click="()=>{okVisible=true,okStatus=1}">保存</a-button>
|
||||
</a-space>
|
||||
<!-- <a-space v-if="modalSatus=='edit'">
|
||||
<a-button type="primary" status="warning">拉黑</a-button>
|
||||
@ -604,7 +613,11 @@
|
||||
<template #title>
|
||||
提示
|
||||
</template>
|
||||
<div>确定保存当前信息?</div>
|
||||
<div v-if="okStatus==1">确定保存当前信息?</div>
|
||||
<div v-else-if="okStatus==2">确定重新续期CA证书?</div>
|
||||
<div v-else-if="okStatus==3">确定注销CA证书?</div>
|
||||
<div v-else-if="okStatus==4">确定申请签章?</div>
|
||||
<div v-else-if="okStatus==5">确定更新签章?</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
@ -612,6 +625,7 @@
|
||||
<script setup>
|
||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
||||
import { getDoctorList, addDoctor, removeDoctor, updateDoctor, getDoctorDetail, departmentList, decryptCard, hospitalList, expertiseList, areaList, bankList, decryptBank } from '@/api/doctor/list';
|
||||
import { updateCA,removeCA,updateSign,applySign } from '@/api/doctor/ca';
|
||||
import { ossSign, ossUpload } from '@/api/oss';
|
||||
import dayjs from 'dayjs'
|
||||
// Akiraka 20230210 删除数据
|
||||
@ -620,7 +634,7 @@
|
||||
const deleteVisible = ref(false)
|
||||
// Akiraka 20230210 监听删除事件
|
||||
const okVisible = ref(false);
|
||||
|
||||
const okStatus=ref(1); //1保存 2证书续期 3//证书注销 //4申请签章 //5更新签章
|
||||
watch(() => deleteVisible.value, (value) => {
|
||||
if (value == false) {
|
||||
getDoctorInfo(pager);
|
||||
@ -1130,6 +1144,38 @@
|
||||
//await nextTick();
|
||||
|
||||
};
|
||||
const handleUpdateCA=()=>{
|
||||
updateCA(modalForm.user_doctor_info.user_id).then(data=>{
|
||||
let result=data.data;
|
||||
if(result.code==200){
|
||||
proxy.$message.success('证书更新成功');
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleRemoveCA=()=>{
|
||||
removeCA(modalForm.user_doctor_info.user_id).then(data=>{
|
||||
let result=data.data;
|
||||
if(result.code==200){
|
||||
proxy.$message.success('证书注销成功');
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleApplySign=()=>{
|
||||
applySign(modalForm.user_doctor_info.user_id).then(data=>{
|
||||
let result=data.data;
|
||||
if(result.code==200){
|
||||
proxy.$message.success('签章申请成功');
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleUpdateSign=()=>{
|
||||
updateSign(modalForm.user_doctor_info.user_id).then(data=>{
|
||||
let result=data.data;
|
||||
if(result.code==200){
|
||||
proxy.$message.success('签章更新成功');
|
||||
}
|
||||
})
|
||||
}
|
||||
//开启服务处理
|
||||
// const filterService = (record) => {
|
||||
// let arr = [];
|
||||
@ -1158,6 +1204,7 @@
|
||||
// Modal ok
|
||||
// 异步关闭Modal需要调用 done()
|
||||
const handleSubmit = (done) => {
|
||||
if(okStatus.value==1){
|
||||
proxy.$refs.modalFormRef.validate(async (valid) => {
|
||||
if (!valid) {
|
||||
let res;
|
||||
@ -1279,6 +1326,21 @@
|
||||
//done(false);
|
||||
}
|
||||
});
|
||||
}else if(okStatus.value==2){
|
||||
//证书续期
|
||||
handleUpdateCA();
|
||||
}else if(okStatus.value==3){
|
||||
//证书注销
|
||||
handleRemoveCA();
|
||||
}else if(okStatus.value==4){
|
||||
//签章申请
|
||||
handleApplySign();
|
||||
}else if(okStatus.value==5){
|
||||
//签章更新
|
||||
handleUpdateSign();
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
// 批量删除
|
||||
@ -1498,6 +1560,7 @@
|
||||
|
||||
getOssSign(1, fileList[0].file);
|
||||
}
|
||||
//ca证书
|
||||
onMounted(() => {
|
||||
getDoctorInfo(pager);
|
||||
handleHospitalList();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user