update
1.更新im 2.修改最近提的问题
This commit is contained in:
+2
-1
@@ -68,6 +68,7 @@
|
|||||||
"sass": "^1.26.5",
|
"sass": "^1.26.5",
|
||||||
"sass-loader": "^8.0.2",
|
"sass-loader": "^8.0.2",
|
||||||
"typescript": "^4.1.5",
|
"typescript": "^4.1.5",
|
||||||
"vue-eslint-parser": "^8.3.0"
|
"vue-eslint-parser": "^8.3.0",
|
||||||
|
"webpack": "^4.47.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1217,4 +1217,8 @@
|
|||||||
.h5-span {
|
.h5-span {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.call-main-voice) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="icon" href="faviconnew.png"><title>即时通信</title><link href="css/vendors~app.0c5dd3ef.css" rel="stylesheet"><link href="css/app.dbd41998.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but 腾讯云即时通信 Web-IM doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="./TCaptcha.js"></script><script src="./aegis.min.js"></script><script>/**
|
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="icon" href="faviconnew.png"><title>即时通信</title><link href="css/vendors~app.21030041.css" rel="stylesheet"><link href="css/app.108aca6f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but 腾讯云即时通信 Web-IM doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="./TCaptcha.js"></script><script src="./aegis.min.js"></script><script>/**
|
||||||
* 根据基础字体大小 和 效果图宽度设置 根节点字体大小
|
* 根据基础字体大小 和 效果图宽度设置 根节点字体大小
|
||||||
* @param baseFontSize 浏览器默认字体大小 [注]浏览器最小字体为12像素,所以该值必需大于等于12
|
* @param baseFontSize 浏览器默认字体大小 [注]浏览器最小字体为12像素,所以该值必需大于等于12
|
||||||
* @param baseWidth 设计稿的尺寸
|
* @param baseWidth 设计稿的尺寸
|
||||||
@@ -53,4 +53,4 @@
|
|||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
};</script><script src="js/vendors~app.43ede50a.js"></script><script src="js/app.4e192d04.js"></script></body></html>
|
};</script><script src="js/vendors~app.cad1a8d4.js"></script><script src="js/app.5521fbd6.js"></script></body></html>
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,8 +5,6 @@ import { PAGE_NOT_FOUND_ROUTE, REDIRECT_ROUTE } from '/@/router/routes/basic';
|
|||||||
import { PageEnum } from '/@/enums/pageEnum';
|
import { PageEnum } from '/@/enums/pageEnum';
|
||||||
import { t } from '/@/hooks/web/useI18n';
|
import { t } from '/@/hooks/web/useI18n';
|
||||||
|
|
||||||
import { getEnvInfo } from '/@/utils/getEnv';
|
|
||||||
|
|
||||||
const modules = import.meta.glob('./modules/**/*.ts', { eager: true });
|
const modules = import.meta.glob('./modules/**/*.ts', { eager: true });
|
||||||
|
|
||||||
const routeModuleList: AppRouteModule[] = [];
|
const routeModuleList: AppRouteModule[] = [];
|
||||||
@@ -28,14 +26,12 @@ export const RootRoute: AppRouteRecordRaw = {
|
|||||||
title: 'Root',
|
title: 'Root',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const res = getEnvInfo(import.meta.env);
|
|
||||||
export const LoginRoute: AppRouteRecordRaw = {
|
export const LoginRoute: AppRouteRecordRaw = {
|
||||||
path: '/login',
|
path: '/login',
|
||||||
name: 'Login',
|
name: 'Login',
|
||||||
//新版后台登录,如果想要使用旧版登录放开即可
|
//新版后台登录,如果想要使用旧版登录放开即可
|
||||||
// component: () => import('/@/views/sys/login/Login.vue'),
|
// component: () => import('/@/views/sys/login/Login.vue'),
|
||||||
component: () =>
|
component: () => import('/@/views/system/loginmini/MiniLogin.vue'),
|
||||||
res.VITE_PLATFORM == 'JD' ? import('/@/views/system/loginmini/MiniLoginJD.vue') : import('/@/views/system/loginmini/MiniLogin.vue'),
|
|
||||||
meta: {
|
meta: {
|
||||||
title: t('routes.basic.login'),
|
title: t('routes.basic.login'),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { getEnvInfo } from '/@/utils/getEnv';
|
import { getEnvInfo } from '/@/utils/getEnv';
|
||||||
export const imAddressSrc = `/static/im-web/index.html?${getUrlP()}`;
|
export const imAddressSrc = `/static/im-web/index.html?${getUrlP()}`;
|
||||||
// export const imAddressSrc = `http://192.168.1.48:8080?${getUrlP()}`;
|
// export const imAddressSrc = `http://192.168.1.100:8080?${getUrlP()}`;
|
||||||
|
|
||||||
function getUrlP() {
|
function getUrlP() {
|
||||||
return `vitePlatform=${getEnvInfo().VITE_PLATFORM}&`;
|
return `vitePlatform=${getEnvInfo().VITE_PLATFORM}&`;
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
export const mapCenter = [87.592458, 43.80006];
|
||||||
@@ -112,6 +112,6 @@ export const getRecordDetail2 = (params) => defHttp.get({ url: Api.getRecordDeta
|
|||||||
//导出专家账户
|
//导出专家账户
|
||||||
export const exportFile = (params) => defHttp.post({ url: Api.exportXls, params });
|
export const exportFile = (params) => defHttp.post({ url: Api.exportXls, params });
|
||||||
// 添加专家银行卡
|
// 添加专家银行卡
|
||||||
export const addCard = (params) => defHttp.post({ url: Api.addCard, params });
|
export const addCard = (params) => defHttp.post({ url: Api.addCard, params }, { successNeedMessage: false });
|
||||||
//删除专家银行卡
|
//删除专家银行卡
|
||||||
export const deleteCard = (params) => defHttp.delete({ url: Api.deleteCard + '?id=' + params.id });
|
export const deleteCard = (params) => defHttp.delete({ url: Api.deleteCard + '?id=' + params.id });
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||||
import { FormInstance } from 'ant-design-vue';
|
import { FormInstance, message } from 'ant-design-vue';
|
||||||
import { addCard, getDoctorCard, deleteCard } from '/@/views/consult/doctor/account/account.api';
|
import { addCard, getDoctorCard, deleteCard } from '/@/views/consult/doctor/account/account.api';
|
||||||
import { FormState, CardType } from '/@/views/consult/doctor/account/account.data';
|
import { FormState, CardType } from '/@/views/consult/doctor/account/account.data';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
@@ -50,6 +50,8 @@
|
|||||||
// Emits声明
|
// Emits声明
|
||||||
const emit = defineEmits(['register', 'success']);
|
const emit = defineEmits(['register', 'success']);
|
||||||
const title = '专家银行卡';
|
const title = '专家银行卡';
|
||||||
|
// 如果状态为true则判断之前没有添加银行卡或者全移除过
|
||||||
|
const initListStatus = ref<boolean>(false);
|
||||||
const bankForm = ref<FormInstance>();
|
const bankForm = ref<FormInstance>();
|
||||||
const formState = reactive<FormState>({
|
const formState = reactive<FormState>({
|
||||||
data: [],
|
data: [],
|
||||||
@@ -57,20 +59,26 @@
|
|||||||
});
|
});
|
||||||
const rules = {
|
const rules = {
|
||||||
cardMsg: [{ required: true, trigger: 'blur', pattern: /[\u4e00-\u9fa5]/, message: '请输入正确的银行卡开户行' }],
|
cardMsg: [{ required: true, trigger: 'blur', pattern: /[\u4e00-\u9fa5]/, message: '请输入正确的银行卡开户行' }],
|
||||||
cardNum: [{ required: true, trigger: 'blur', pattern: /^([1-9])(\d{14,18})$/, message: '银行卡号格式有误' }],
|
cardNum: [
|
||||||
|
{ required: true, trigger: 'blur', message: '请输入银行卡号' },
|
||||||
|
{ trigger: 'blur', pattern: /^([1-9])(\d{14,18})$/, message: '银行卡号格式有误' },
|
||||||
|
],
|
||||||
status: [{ required: true, trigger: 'blur', message: '请选择是否启用该卡号' }],
|
status: [{ required: true, trigger: 'blur', message: '请选择是否启用该卡号' }],
|
||||||
};
|
};
|
||||||
const [registerModal, { closeModal }] = useModalInner(async (data) => {
|
const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
|
||||||
formState.doctorId = data.record.id;
|
formState.doctorId = data.record.id;
|
||||||
try {
|
try {
|
||||||
let res = await getDoctorCard({ doctorId: data.record.id });
|
let res = await getDoctorCard({ doctorId: data.record.id });
|
||||||
if (res && res.length) {
|
if (res && res.length > 0) {
|
||||||
formState.data = res.map((item) => ({
|
formState.data = res.map((item) => ({
|
||||||
cardMsg: item.cardMsg,
|
cardMsg: item.cardMsg,
|
||||||
cardNum: item.cardNum,
|
cardNum: item.cardNum,
|
||||||
status: item.status == '1',
|
status: item.status == '1',
|
||||||
id: item.id,
|
id: item.id,
|
||||||
}));
|
}));
|
||||||
|
initListStatus.value = false;
|
||||||
|
} else {
|
||||||
|
initListStatus.value = true;
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
});
|
});
|
||||||
@@ -104,13 +112,21 @@
|
|||||||
try {
|
try {
|
||||||
await bankForm.value?.validateFields();
|
await bankForm.value?.validateFields();
|
||||||
const params = formState.data.map((item) => ({ ...item, status: item?.status ? 1 : 2, doctorId: formState.doctorId }));
|
const params = formState.data.map((item) => ({ ...item, status: item?.status ? 1 : 2, doctorId: formState.doctorId }));
|
||||||
|
setModalProps({ confirmLoading: true });
|
||||||
await addCard(params);
|
await addCard(params);
|
||||||
|
if (initListStatus.value) {
|
||||||
|
message.success('新增成功');
|
||||||
|
} else {
|
||||||
|
message.success('修改成功');
|
||||||
|
}
|
||||||
//关闭弹窗
|
//关闭弹窗
|
||||||
closeModal();
|
closeModal();
|
||||||
//刷新列表
|
//刷新列表
|
||||||
emit('success');
|
emit('success');
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
} finally {
|
} finally {
|
||||||
clearData();
|
setModalProps({ confirmLoading: false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
import { Position } from '/@/views/consult/resource/components/Map';
|
import { Position } from '/@/views/consult/resource/components/Map';
|
||||||
import mapKey from '/@/utils/mapKey';
|
import mapKey from '/@/utils/mapKey';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
import {mapCenter} from "/@/utils/mapInfo";
|
||||||
let geocoder = ref();
|
let geocoder = ref();
|
||||||
const emit = defineEmits(['getPosition']);
|
const emit = defineEmits(['getPosition']);
|
||||||
let BasicMap = null;
|
let BasicMap = null;
|
||||||
@@ -87,7 +88,7 @@
|
|||||||
BasicMap = new AMap.Map('container', {
|
BasicMap = new AMap.Map('container', {
|
||||||
viewMode: '3D', //是否为3D地图模式
|
viewMode: '3D', //是否为3D地图模式
|
||||||
zoom: 12, //初始化地图级别
|
zoom: 12, //初始化地图级别
|
||||||
center: [108.95, 34.33], //初始化地图中心点位置
|
center: mapCenter, //初始化地图中心点位置
|
||||||
resizeEnable: true,
|
resizeEnable: true,
|
||||||
});
|
});
|
||||||
// 注册搜索插件
|
// 注册搜索插件
|
||||||
@@ -138,7 +139,7 @@
|
|||||||
setMapZoom(15);
|
setMapZoom(15);
|
||||||
let { lng, lat } = option.location;
|
let { lng, lat } = option.location;
|
||||||
let handleItem = panelList.value?.find((item) => item['id'] === intValue.value) ?? { pname: '' };
|
let handleItem = panelList.value?.find((item) => item['id'] === intValue.value) ?? { pname: '' };
|
||||||
// adr.value = value;
|
adr.value = value;
|
||||||
positionRef.value = { lng, lat, handleItem };
|
positionRef.value = { lng, lat, handleItem };
|
||||||
addMarker(option.location);
|
addMarker(option.location);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ import { render } from '/@/utils/common/renderUtils';
|
|||||||
import { getHospitalsList, getNewHospitalApi } from '../../system/user/user.api';
|
import { getHospitalsList, getNewHospitalApi } from '../../system/user/user.api';
|
||||||
import { personType } from '/@/views/emergency/outburst/ScheduleCustom/ScheduleDefault.api';
|
import { personType } from '/@/views/emergency/outburst/ScheduleCustom/ScheduleDefault.api';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { onSitePersonNewApi } from '/@/views/emergency/communication/components/commApi';
|
import {
|
||||||
|
employListApi,
|
||||||
|
onSitePersonNewApi, secondDepartApi
|
||||||
|
} from '/@/views/emergency/communication/components/commApi';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { getZHospitalApi } from '/@/views/emergency/EmergencySeriousDisease/EmergencySeriousDisease.api';
|
import { getZHospitalApi } from '/@/views/emergency/EmergencySeriousDisease/EmergencySeriousDisease.api';
|
||||||
@@ -436,3 +439,82 @@ export function getBpmFormSchema(_formData): FormSchema[] {
|
|||||||
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
||||||
return formSchema;
|
return formSchema;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const mColumns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '员工姓名',
|
||||||
|
dataIndex: 'realname',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '单位名称',
|
||||||
|
dataIndex: ['secondDepart', 'departName'],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const mSearchFormSchema: FormSchema[] = [
|
||||||
|
{
|
||||||
|
label: '员工姓名',
|
||||||
|
field: 'realname',
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '单位名称',
|
||||||
|
field: 'orgCode',
|
||||||
|
component: 'ApiSelect',
|
||||||
|
componentProps: () => {
|
||||||
|
return {
|
||||||
|
api: secondDepartApi,
|
||||||
|
resultField: 'result',
|
||||||
|
labelField: 'departName',
|
||||||
|
valueField: 'orgCode',
|
||||||
|
immediate: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export const tableProps = {
|
||||||
|
tableProps: {
|
||||||
|
api: employListApi,
|
||||||
|
columns: mColumns,
|
||||||
|
canResize: false,
|
||||||
|
immediate: false,
|
||||||
|
rowKey: (record: Recordable) => {
|
||||||
|
return JSON.stringify({
|
||||||
|
id: record.id,
|
||||||
|
realname: record?.realname
|
||||||
|
});
|
||||||
|
},
|
||||||
|
formConfig: {
|
||||||
|
labelWidth: 63,
|
||||||
|
schemas: mSearchFormSchema,
|
||||||
|
autoSubmitOnEnter: true,
|
||||||
|
showAdvancedButton: false,
|
||||||
|
fieldMapToNumber: [],
|
||||||
|
fieldMapToTime: [],
|
||||||
|
baseColProps: {
|
||||||
|
xs: 12,
|
||||||
|
sm: 12,
|
||||||
|
md: 12,
|
||||||
|
lg: 12,
|
||||||
|
xl: 12,
|
||||||
|
xxl: 12,
|
||||||
|
},
|
||||||
|
actionColOptions: {
|
||||||
|
span: 24,
|
||||||
|
offset: 0,
|
||||||
|
xs: 12,
|
||||||
|
sm: 12,
|
||||||
|
md: 12,
|
||||||
|
lg: 12,
|
||||||
|
xl: 12,
|
||||||
|
xxl: 12,
|
||||||
|
},
|
||||||
|
// resetFunc: () => {
|
||||||
|
// setTimeout(async () => {
|
||||||
|
// await chooseDom.value.getForm().setFieldsValue(paramsInfo.value);
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
showActionColumn: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|||||||
+21
-5
@@ -13,7 +13,14 @@
|
|||||||
<BasicForm @register="registerForm" style="overflow: auto" />
|
<BasicForm @register="registerForm" style="overflow: auto" />
|
||||||
</BasicDrawer>
|
</BasicDrawer>
|
||||||
<!-- <UserSelectModal rowKey="id" @register="registerSelUserModal" @getSelectResult="onSelectUserOk" />-->
|
<!-- <UserSelectModal rowKey="id" @register="registerSelUserModal" @getSelectResult="onSelectUserOk" />-->
|
||||||
<replace-other ref="replaceOtherRef" title="选择用户" @choose-employ="onSelectUserOk" />
|
<!-- <replace-other ref="replaceOtherRef" title="选择用户" @choose-employ="onSelectUserOk" />-->
|
||||||
|
<ChooseSome
|
||||||
|
:width="750"
|
||||||
|
@register="registerUserDrawer"
|
||||||
|
@select-some="onSelectUserOk"
|
||||||
|
title="选择用户"
|
||||||
|
:tableprops="tableProps"
|
||||||
|
/>
|
||||||
<list-user-by-person-type @register="registerListModal" />
|
<list-user-by-person-type @register="registerListModal" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -22,14 +29,15 @@
|
|||||||
import { ref, unref } from 'vue';
|
import { ref, unref } from 'vue';
|
||||||
import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
|
import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
|
||||||
import { BasicForm, useForm } from '/@/components/Form/index';
|
import { BasicForm, useForm } from '/@/components/Form/index';
|
||||||
import { formSchema } from '../EmergencySeriousDisease.data';
|
import {formSchema, tableProps} from '../EmergencySeriousDisease.data';
|
||||||
import { saveOrUpdate } from '../EmergencySeriousDisease.api';
|
import { saveOrUpdate } from '../EmergencySeriousDisease.api';
|
||||||
import UserSelectModal from '/@/components/Form/src/jeecg/components/modal/UserSelectModalIllness.vue';
|
import UserSelectModal from '/@/components/Form/src/jeecg/components/modal/UserSelectModalIllness.vue';
|
||||||
import { useModal } from '/@/components/Modal';
|
import { useModal } from '/@/components/Modal';
|
||||||
import { useDrawer } from '/@/components/Drawer';
|
import { useDrawer } from '/@/components/Drawer';
|
||||||
import ListUserByPersonType from '/@/views/emergency/EmergencySeriousDisease/components/listUserByPersonType.vue';
|
import ListUserByPersonType from '/@/views/emergency/EmergencySeriousDisease/components/listUserByPersonType.vue';
|
||||||
import ReplaceOther from '/@/views/emergency/communication/components/replaceOther.vue';
|
import ReplaceOther from '/@/views/emergency/communication/components/replaceOther.vue';
|
||||||
const [registerSelUserModal, selUserModal] = useDrawer();
|
import ChooseSome from "/@/views/compoents/chooseSome/index.vue";
|
||||||
|
const [registerUserDrawer, {openDrawer}] = useDrawer();
|
||||||
const [registerListModal, { openDrawer: openListModal }] = useDrawer();
|
const [registerListModal, { openDrawer: openListModal }] = useDrawer();
|
||||||
// Emits声明
|
// Emits声明
|
||||||
const emit = defineEmits(['register', 'success']);
|
const emit = defineEmits(['register', 'success']);
|
||||||
@@ -39,7 +47,15 @@
|
|||||||
//设置标题
|
//设置标题
|
||||||
const title = ref<string>('');
|
const title = ref<string>('');
|
||||||
formSchema[0].componentProps.onClick = () => {
|
formSchema[0].componentProps.onClick = () => {
|
||||||
replaceOtherRef.value.showModal();
|
// replaceOtherRef.value.showModal();
|
||||||
|
openDrawer(true, {
|
||||||
|
selectedRowKeys: [
|
||||||
|
JSON.stringify({
|
||||||
|
id: getFieldsValue().userId,
|
||||||
|
realname: getFieldsValue().realname,
|
||||||
|
})
|
||||||
|
]
|
||||||
|
});
|
||||||
};
|
};
|
||||||
formSchema[7].componentProps.onOptionsChange = (options) => {
|
formSchema[7].componentProps.onOptionsChange = (options) => {
|
||||||
onSelectHospital(options);
|
onSelectHospital(options);
|
||||||
@@ -64,7 +80,7 @@
|
|||||||
// });
|
// });
|
||||||
|
|
||||||
//表单配置
|
//表单配置
|
||||||
const [registerForm, { setProps, resetFields, setFieldsValue, validate, clearValidate, updateSchema }] = useForm({
|
const [registerForm, { setProps, resetFields, setFieldsValue, validate, clearValidate, updateSchema, getFieldsValue }] = useForm({
|
||||||
//labelWidth: 150,
|
//labelWidth: 150,
|
||||||
schemas: formSchema,
|
schemas: formSchema,
|
||||||
showActionButtonGroup: false,
|
showActionButtonGroup: false,
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
import MarkersIcon from '/@/assets/images/markerCricle.png';
|
import MarkersIcon from '/@/assets/images/markerCricle.png';
|
||||||
import { list } from './DeviceMap.api';
|
import { list } from './DeviceMap.api';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
import {mapCenter} from "/@/utils/mapInfo";
|
||||||
|
|
||||||
let SelfMap = null;
|
let SelfMap = null;
|
||||||
let BasicMap = null;
|
let BasicMap = null;
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
BasicMap = new AMap.Map('container', {
|
BasicMap = new AMap.Map('container', {
|
||||||
viewMode: '3D', //是否为3D地图模式
|
viewMode: '3D', //是否为3D地图模式
|
||||||
// zoom: 11, //初始化地图级别
|
// zoom: 11, //初始化地图级别
|
||||||
// center: [108.95, 34.33], //初始化地图中心点位置
|
center: mapCenter, //初始化地图中心点位置
|
||||||
resizeEnable: true,
|
resizeEnable: true,
|
||||||
});
|
});
|
||||||
// 注册搜索插件
|
// 注册搜索插件
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
|
||||||
enum Api {
|
enum Api {
|
||||||
list = '/health-archives/housenew/fakerData/getFakerData',
|
list = '/health-emergency/emergency/fakerData/getFakerData',
|
||||||
save = '/health-archives/housenew/fakerData/createYcServiceFakerData,' +
|
save = '/health-emergency/emergency/fakerData/createYcServiceFakerData,' +
|
||||||
'/health-archives/housenew/fakerData/createYcMedicalFakerData,' +
|
'/health-emergency/emergency/fakerData/createYcMedicalFakerData,' +
|
||||||
'/health-archives/housenew/fakerData/createYcMedicalCenterFakerData,' +
|
'/health-emergency/emergency/fakerData/createYcMedicalCenterFakerData,' +
|
||||||
'/health-archives/housenew/fakerData/createYcUserHealthFakerData', // 查询: 9:银川服务 10:银川医院 11:银川一线医疗点 12:银川员工健康
|
'/health-emergency/emergency/fakerData/createYcUserHealthFakerData', // 查询: 9:银川服务 10:银川医院 11:银川一线医疗点 12:银川员工健康
|
||||||
status = '/health-archives/housenew/fakerData/getFakerDataEnable',
|
status = '/health-emergency/emergency/fakerData/getFakerDataEnable',
|
||||||
changeStatus = '/health-archives/housenew/fakerData/fakerDataEnable',
|
changeStatus = '/health-emergency/emergency/fakerData/fakerDataEnable',
|
||||||
}
|
}
|
||||||
export const listApi = (params: any) => defHttp.post({ url: Api.list, params }, { joinParamsToUrl: true, isTransformResponse: false });
|
export const listApi = (params: any) => defHttp.post({ url: Api.list, params }, { joinParamsToUrl: true, isTransformResponse: false });
|
||||||
export const saveApi = (params: any) => defHttp.post({ url: Api.save.split(',')[params['module'] - 9], params });
|
export const saveApi = (params: any) => defHttp.post({ url: Api.save.split(',')[params['module'] - 9], params });
|
||||||
|
|||||||
@@ -10,13 +10,13 @@
|
|||||||
@close="closeDrawer"
|
@close="closeDrawer"
|
||||||
:headerStyle="{ display: 'none' }"
|
:headerStyle="{ display: 'none' }"
|
||||||
>
|
>
|
||||||
<div id="container1" style="height: 100%"></div>
|
<div id="container1" style="height: calc(100% + 20px); overflow: hidden"></div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||||
import { mapKey } from '/@/utils/baiduMaopKey';
|
import mapKey from "/@/utils/mapKey";
|
||||||
let BasicMap = null;
|
let BasicMap = null;
|
||||||
const visible = ref<Boolean>();
|
const visible = ref<Boolean>();
|
||||||
const emit = defineEmits(['closeDrawerOpenUp']);
|
const emit = defineEmits(['closeDrawerOpenUp']);
|
||||||
@@ -121,4 +121,8 @@
|
|||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.amap-logo) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
<a-row class="bottom-button">
|
<a-row class="bottom-button">
|
||||||
<a-button type="primary" :disabled="resultInfo.orderStatus === '5'" @click="saveB" :loading="saveLoading">保存</a-button>
|
<a-button type="primary" :disabled="resultInfo.orderStatus === '5'" @click="saveB" :loading="saveLoading">保存</a-button>
|
||||||
<a-button type="primary" :disabled="resultInfo.orderStatus === '5'" @click="supplementB(resultInfo)">补充小节</a-button>
|
<a-button type="primary" :disabled="resultInfo.orderStatus === '5'" @click="supplementB(resultInfo)">补充小节</a-button>
|
||||||
<a-button type="primary" :disabled="resultInfo.orderStatus === '5'" @click="onSiteB(resultInfo)">驻场派单</a-button>
|
<!-- <a-button type="primary" :disabled="resultInfo.orderStatus === '5'" @click="onSiteB(resultInfo)">驻场派单</a-button>-->
|
||||||
<!-- <a-button type="primary" :disabled="resultInfo.orderStatus === '5'" @click="endB(resultInfo)" :loading="endLoading">结束应急</a-button>-->
|
<!-- <a-button type="primary" :disabled="resultInfo.orderStatus === '5'" @click="endB(resultInfo)" :loading="endLoading">结束应急</a-button>-->
|
||||||
</a-row>
|
</a-row>
|
||||||
<replaceOther ref="replaceOtherRef" @choose-employ="chooseEmploy" />
|
<replaceOther ref="replaceOtherRef" @choose-employ="chooseEmploy" />
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
<!-- {{ oneNumber > 99 ? '99+' : oneNumber }}-->
|
<!-- {{ oneNumber > 99 ? '99+' : oneNumber }}-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
<div :class="['button-t', checked ? '' : 'choose-this']" @click="clickThis(false)">
|
<!-- <div :class="['button-t', checked ? '' : 'choose-this']" @click="clickThis(false)">-->
|
||||||
大病就医
|
<!-- 大病就医-->
|
||||||
<!-- <div v-show="twoNumber > 0" class="number-d">-->
|
<!-- <!– <div v-show="twoNumber > 0" class="number-d">–>-->
|
||||||
<!-- {{ twoNumber > 99 ? '99+' : twoNumber }}-->
|
<!-- <!– {{ twoNumber > 99 ? '99+' : twoNumber }}–>-->
|
||||||
<!-- </div>-->
|
<!-- <!– </div>–>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12" style="display: flex; justify-content: flex-end; padding-right: 60px">
|
<a-col :span="12" style="display: flex; justify-content: flex-end; padding-right: 60px">
|
||||||
<a-row class="top-right-row" style="color: #ffa845">
|
<a-row class="top-right-row" style="color: #ffa845">
|
||||||
@@ -22,12 +22,12 @@
|
|||||||
{{ stat.emeResRate + '%' }}
|
{{ stat.emeResRate + '%' }}
|
||||||
</div>
|
</div>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row class="top-right-row" style="color: #4ad246">
|
<!-- <a-row class="top-right-row" style="color: #4ad246">-->
|
||||||
<div> 大病就医率</div>
|
<!-- <div> 大病就医率</div>-->
|
||||||
<div>
|
<!-- <div>-->
|
||||||
{{ stat.seriousRate + '%' }}
|
<!-- {{ stat.seriousRate + '%' }}-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</a-row>
|
<!-- </a-row>-->
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row class="bottom-row">
|
<a-row class="bottom-row">
|
||||||
|
|||||||
@@ -66,11 +66,11 @@ export const columns: BasicColumn[] = [
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'operationUserName',
|
dataIndex: 'operationUserName',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '驻场人员',
|
// title: '驻场人员',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
dataIndex: 'stationUserName',
|
// dataIndex: 'stationUserName',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '工单状态',
|
title: '工单状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
@@ -688,36 +688,36 @@ export const formSchema: FormSchema[] = [
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: [{ required: false, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' }],
|
rules: [{ required: false, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' }],
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '驻场人员',
|
// label: '驻场人员',
|
||||||
field: 'stationUserName',
|
// field: 'stationUserName',
|
||||||
component: 'Input',
|
// component: 'Input',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '驻场人员性别',
|
// label: '驻场人员性别',
|
||||||
field: 'stationUserSex',
|
// field: 'stationUserSex',
|
||||||
component: 'JDictSelectTag',
|
// component: 'JDictSelectTag',
|
||||||
componentProps: () => ({
|
// componentProps: () => ({
|
||||||
dictCode: 'sex',
|
// dictCode: 'sex',
|
||||||
type: 'radioButton',
|
// type: 'radioButton',
|
||||||
}),
|
// }),
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '驻场人员电话',
|
// label: '驻场人员电话',
|
||||||
field: 'stationUserMobile',
|
// field: 'stationUserMobile',
|
||||||
component: 'Input',
|
// component: 'Input',
|
||||||
rules: [{ required: false, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' }],
|
// rules: [{ required: false, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' }],
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '驻场人员部门',
|
// label: '驻场人员部门',
|
||||||
field: 'stationUserDepart',
|
// field: 'stationUserDepart',
|
||||||
component: 'Input',
|
// component: 'Input',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '驻场人员派单业务',
|
// label: '驻场人员派单业务',
|
||||||
field: 'stationBusiness',
|
// field: 'stationBusiness',
|
||||||
component: 'Input',
|
// component: 'Input',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
label: '操作人员响应时间',
|
label: '操作人员响应时间',
|
||||||
field: 'operationResponseTime',
|
field: 'operationResponseTime',
|
||||||
@@ -733,16 +733,16 @@ export const formSchema: FormSchema[] = [
|
|||||||
field: 'majorResponseTime',
|
field: 'majorResponseTime',
|
||||||
component: 'DatePicker',
|
component: 'DatePicker',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '驻场人员响应时间',
|
// label: '驻场人员响应时间',
|
||||||
field: 'stationResponseTime',
|
// field: 'stationResponseTime',
|
||||||
component: 'DatePicker',
|
// component: 'DatePicker',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '驻场人员拒单时间',
|
// label: '驻场人员拒单时间',
|
||||||
field: 'stationRejectionTime',
|
// field: 'stationRejectionTime',
|
||||||
component: 'DatePicker',
|
// component: 'DatePicker',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
label: '专业人员救助意见',
|
label: '专业人员救助意见',
|
||||||
field: 'majorSalvageOpinion',
|
field: 'majorSalvageOpinion',
|
||||||
@@ -907,14 +907,14 @@ export const descList2 = [
|
|||||||
label: '派单时间',
|
label: '派单时间',
|
||||||
key: 'operationSendOrderTime',
|
key: 'operationSendOrderTime',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '驻场人员',
|
// label: '驻场人员',
|
||||||
key: 'stationUserName',
|
// key: 'stationUserName',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '驻场人员手机',
|
// label: '驻场人员手机',
|
||||||
key: 'stationUserMobile',
|
// key: 'stationUserMobile',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
label: '接单时间',
|
label: '接单时间',
|
||||||
key: 'stationResponseTime',
|
key: 'stationResponseTime',
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
},
|
},
|
||||||
showActionColumn: userStore.getUserInfo?.personType !== '6',
|
showActionColumn: userStore.getUserInfo?.personType !== '6',
|
||||||
actionColumn: {
|
actionColumn: {
|
||||||
width: 200,
|
width: 130,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
},
|
},
|
||||||
beforeFetch: (info) => {
|
beforeFetch: (info) => {
|
||||||
@@ -138,10 +138,10 @@
|
|||||||
onClick: handleDetail.bind(null, record),
|
onClick: handleDetail.bind(null, record),
|
||||||
auth: 'emergency:emergency_order:edit',
|
auth: 'emergency:emergency_order:edit',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '派单记录',
|
// label: '派单记录',
|
||||||
onClick: orderRecord.bind(null, record),
|
// onClick: orderRecord.bind(null, record),
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
label: '删除',
|
label: '删除',
|
||||||
onClick: handleDelete.bind(null, record),
|
onClick: handleDelete.bind(null, record),
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ export const formSchema: FormSchema[] = [
|
|||||||
label: '联系电话',
|
label: '联系电话',
|
||||||
field: 'mobile',
|
field: 'mobile',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: [{ required: true, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' }],
|
rules: [{ required: true },{ pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误'}],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '经度',
|
label: '经度',
|
||||||
|
|||||||
@@ -251,15 +251,15 @@
|
|||||||
listApi(params)
|
listApi(params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
weekKey.map((item: any, index: number) => {
|
weekKey.map((item: any, index: number) => {
|
||||||
res[item]['professionalUserListIds'] = [];
|
if(!res[item]['professionalUserListIds']) res[item]['professionalUserListIds'] = [];
|
||||||
res[item]['operationUserListIds'] = [];
|
if(!res[item]['operationUserListIds']) res[item]['operationUserListIds'] = [];
|
||||||
res[item]?.professionalUserList &&
|
res[item]?.professionalUserList &&
|
||||||
res[item]?.professionalUserList.map((it: any) => {
|
res[item]?.professionalUserList.map((it: any) => {
|
||||||
res[item]['professionalUserListIds'].push(it.userId);
|
if(!res[item]['professionalUserListIds'].includes(it.userId)) res[item]['professionalUserListIds'].push(it.userId);
|
||||||
});
|
});
|
||||||
res[item]?.operationUserList &&
|
res[item]?.operationUserList &&
|
||||||
res[item]?.operationUserList.map((it: any) => {
|
res[item]?.operationUserList.map((it: any) => {
|
||||||
res[item]['operationUserListIds'].push(it.userId);
|
if(!res[item]['operationUserListIds'].includes(it.userId)) res[item]['operationUserListIds'].push(it.userId);
|
||||||
});
|
});
|
||||||
if (date1) {
|
if (date1) {
|
||||||
res[item]['time'] = dayjs(date1).add(index, 'day').format('YYYY-MM-DD');
|
res[item]['time'] = dayjs(date1).add(index, 'day').format('YYYY-MM-DD');
|
||||||
|
|||||||
@@ -1,303 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div :class="prefixCls" class="login-background-img">
|
|
||||||
<!-- <AppLocalePicker :showText="false" class="absolute top-4 right-4 enter-x xl:text-gray-600" />-->
|
|
||||||
<!-- <AppDarkModeToggle class="absolute top-3 right-7 enter-x" />-->
|
|
||||||
<div v-show="type === 'login'">
|
|
||||||
<div class="aui-content">
|
|
||||||
<div class="aui-top">
|
|
||||||
<div class="aui-title">{{ t('sys.login.loginTitle') }}</div>
|
|
||||||
<div class="aui-title-image"></div>
|
|
||||||
</div>
|
|
||||||
<div class="aui-container">
|
|
||||||
<div class="aui-form">
|
|
||||||
<div class="aui-formBox">
|
|
||||||
<div class="aui-formWell">
|
|
||||||
<div class="form-title">{{ t('sys.login.formTitle') }}</div>
|
|
||||||
<div class="aui-form-box" style="height: 180px">
|
|
||||||
<a-form ref="loginRef" :model="formData" @keyup.enter.native="loginHandleClick">
|
|
||||||
<div class="aui-account">
|
|
||||||
<div class="aui-inputClear">
|
|
||||||
<i class="icon icon-code"></i>
|
|
||||||
<a-form-item>
|
|
||||||
<a-input
|
|
||||||
v-model:value="formData.username"
|
|
||||||
:placeholder="t('sys.login.userName')"
|
|
||||||
class="fix-auto-fill"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="aui-inputClear">
|
|
||||||
<i class="icon icon-password"></i>
|
|
||||||
<a-form-item>
|
|
||||||
<a-input
|
|
||||||
v-model:value="formData.password"
|
|
||||||
:placeholder="t('sys.login.password')"
|
|
||||||
class="fix-auto-fill"
|
|
||||||
type="password"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="aui-inputClear">
|
|
||||||
<i class="icon icon-code"></i>
|
|
||||||
<a-form-item>
|
|
||||||
<a-input
|
|
||||||
v-model:value="formData.inputCode"
|
|
||||||
:placeholder="t('sys.login.inputCode')"
|
|
||||||
class="fix-auto-fill"
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
<div class="aui-code">
|
|
||||||
<img
|
|
||||||
v-if="randCodeData.requestCodeSuccess"
|
|
||||||
:src="randCodeData.randCodeImage"
|
|
||||||
@click="handleChangeCheckCode"
|
|
||||||
/>
|
|
||||||
<img
|
|
||||||
v-else
|
|
||||||
:src="codeImg"
|
|
||||||
style="margin-top: 2px; max-width: initial"
|
|
||||||
@click="handleChangeCheckCode"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="aui-flex remember">
|
|
||||||
<div class="aui-flex-box">
|
|
||||||
<div class="aui-choice">
|
|
||||||
<a-input v-model:value="rememberMe" class="fix-auto-fill" type="checkbox" />
|
|
||||||
<span class="aui-check">{{ t('sys.login.rememberMe') }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-form>
|
|
||||||
</div>
|
|
||||||
<div class="aui-formButton">
|
|
||||||
<div class="aui-flex">
|
|
||||||
<a-button
|
|
||||||
:loading="loginLoading"
|
|
||||||
class="aui-link-login aui-flex-box"
|
|
||||||
style="background: #53b173; color: #ffffff"
|
|
||||||
@click="loginHandleClick"
|
|
||||||
>
|
|
||||||
{{ t('sys.login.loginButton') }}
|
|
||||||
</a-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script lang="ts" name="login-mini" setup>
|
|
||||||
import { getCodeInfo } from '/@/api/sys/user';
|
|
||||||
import { onMounted, reactive, ref, toRaw, watch } from 'vue';
|
|
||||||
import codeImg from '/@/assets/images/checkcode.png';
|
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
|
||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
|
||||||
import { useDesign } from '/@/hooks/web/useDesign';
|
|
||||||
import { encipher } from '/@/utils/jsencrypt';
|
|
||||||
|
|
||||||
const { prefixCls } = useDesign('mini-login');
|
|
||||||
const { notification, createMessage } = useMessage();
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const { t } = useI18n();
|
|
||||||
const randCodeData = reactive<any>({
|
|
||||||
randCodeImage: '',
|
|
||||||
requestCodeSuccess: false,
|
|
||||||
checkKey: null,
|
|
||||||
});
|
|
||||||
const rememberMe = ref<string>('0');
|
|
||||||
const type = ref<string>('login');
|
|
||||||
//账号登录表单字段
|
|
||||||
const formData = reactive<any>({
|
|
||||||
inputCode: '',
|
|
||||||
username: '',
|
|
||||||
password: '',
|
|
||||||
});
|
|
||||||
const loginRef = ref();
|
|
||||||
const loginLoading = ref<boolean>(false);
|
|
||||||
defineProps({
|
|
||||||
sessionTimeout: {
|
|
||||||
type: Boolean,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取验证码
|
|
||||||
*/
|
|
||||||
function handleChangeCheckCode() {
|
|
||||||
formData.inputCode = '';
|
|
||||||
|
|
||||||
randCodeData.checkKey = 1629428467008;
|
|
||||||
getCodeInfo(randCodeData.checkKey).then((res) => {
|
|
||||||
randCodeData.randCodeImage = res;
|
|
||||||
randCodeData.requestCodeSuccess = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 账号或者手机登录
|
|
||||||
*/
|
|
||||||
async function loginHandleClick() {
|
|
||||||
accountLogin();
|
|
||||||
}
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => formData.password,
|
|
||||||
() => {
|
|
||||||
formData.password = formData.password.replace(/[\u4e00-\u9fa5]/g, '');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
async function accountLogin() {
|
|
||||||
if (!formData.username) {
|
|
||||||
createMessage.warn(t('sys.login.accountPlaceholder'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!formData.password) {
|
|
||||||
createMessage.warn(t('sys.login.passwordPlaceholder'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!formData.inputCode) {
|
|
||||||
createMessage.warn(t('sys.login.inputCodePlaceholder'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
loginLoading.value = true;
|
|
||||||
const { userInfo } = await userStore.login(
|
|
||||||
toRaw({
|
|
||||||
password: encipher(formData.password) as string,
|
|
||||||
// password: formData.password,
|
|
||||||
username: formData.username,
|
|
||||||
captcha: formData.inputCode,
|
|
||||||
checkKey: randCodeData.checkKey,
|
|
||||||
mode: 'none', //不要默认的错误提示
|
|
||||||
})
|
|
||||||
);
|
|
||||||
if (userInfo) {
|
|
||||||
notification.success({
|
|
||||||
message: t('sys.login.loginSuccessTitle'),
|
|
||||||
description: `${t('sys.login.loginSuccessDesc')}: ${userInfo.realname}`,
|
|
||||||
duration: 3,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
notification.error({
|
|
||||||
message: t('sys.api.errorTip'),
|
|
||||||
description: error.message || t('sys.login.networkExceptionMsg'),
|
|
||||||
duration: 3,
|
|
||||||
});
|
|
||||||
handleChangeCheckCode();
|
|
||||||
} finally {
|
|
||||||
loginLoading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onMounted(() => {
|
|
||||||
//加载验证码
|
|
||||||
handleChangeCheckCode();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
@import '/@/assets/loginmini/style/home1.less';
|
|
||||||
@import '/@/assets/loginmini/style/base.less';
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style lang="less">
|
|
||||||
@prefix-cls: ~'@{namespace}-mini-login';
|
|
||||||
@dark-bg: #293146;
|
|
||||||
|
|
||||||
html[data-theme='dark'] {
|
|
||||||
.@{prefix-cls} {
|
|
||||||
background-color: @dark-bg !important;
|
|
||||||
background-image: none;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
background-image: url(/@/assets/svg/login-bg-dark.svg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.aui-inputClear {
|
|
||||||
background-color: #232a3b !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-input,
|
|
||||||
.ant-input-password {
|
|
||||||
background-color: #232a3b !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-btn:not(.ant-btn-link):not(.ant-btn-primary) {
|
|
||||||
border: 1px solid #4a5569 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-form {
|
|
||||||
background: @dark-bg !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-iconify {
|
|
||||||
color: #fff !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aui-inputClear input,
|
|
||||||
.aui-input-line input,
|
|
||||||
.aui-choice {
|
|
||||||
color: #c9d1d9 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aui-formBox {
|
|
||||||
background-color: @dark-bg !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aui-third-text span {
|
|
||||||
background-color: @dark-bg !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aui-form-nav .aui-flex-box {
|
|
||||||
color: #c9d1d9 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aui-formButton .aui-linek-code {
|
|
||||||
background: @dark-bg !important;
|
|
||||||
color: white !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aui-code-line {
|
|
||||||
border-left: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-checkbox-inner,
|
|
||||||
.aui-success h3 {
|
|
||||||
border-color: #c9d1d9;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
input.fix-auto-fill,
|
|
||||||
.fix-auto-fill input {
|
|
||||||
-webkit-text-fill-color: #c9d1d9 !important;
|
|
||||||
box-shadow: inherit !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-sign-in-way {
|
|
||||||
.anticon {
|
|
||||||
font-size: 22px !important;
|
|
||||||
color: #888 !important;
|
|
||||||
cursor: pointer !important;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: @primary-color !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-divider-inner-text {
|
|
||||||
font-size: 12px !important;
|
|
||||||
color: @text-color-secondary !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aui-third-login a {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -17,9 +17,9 @@
|
|||||||
import { ref, toRaw, unref } from 'vue';
|
import { ref, toRaw, unref } from 'vue';
|
||||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||||
import { BasicTable } from '/@/components/Table';
|
import { BasicTable } from '/@/components/Table';
|
||||||
import { checkUserFormSchema1, userColumns1 } from '../role.data';
|
import { checkUserFormSchema, userColumns } from '../role.data';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
import { listUser } from '/@/views/system/role/role.api';
|
import { list } from '../../user/user.api';
|
||||||
// 声明Emits
|
// 声明Emits
|
||||||
const emit = defineEmits(['select', 'register']);
|
const emit = defineEmits(['select', 'register']);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -30,12 +30,12 @@
|
|||||||
//注册table数据
|
//注册table数据
|
||||||
const { tableContext } = useListPage({
|
const { tableContext } = useListPage({
|
||||||
tableProps: {
|
tableProps: {
|
||||||
api: listUser,
|
api: list,
|
||||||
rowKey: 'userId',
|
rowKey: 'id',
|
||||||
columns: userColumns1,
|
columns: userColumns,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
labelWidth: 60,
|
labelWidth: 60,
|
||||||
schemas: checkUserFormSchema1,
|
schemas: checkUserFormSchema,
|
||||||
baseRowStyle: { maxHeight: '20px' },
|
baseRowStyle: { maxHeight: '20px' },
|
||||||
autoSubmitOnEnter: true,
|
autoSubmitOnEnter: true,
|
||||||
baseColProps: {
|
baseColProps: {
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="min-height: 400px">
|
|
||||||
<BasicForm @register="registerForm" />
|
|
||||||
<div v-if="!formDisabled" style="width: 100%; text-align: center">
|
|
||||||
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { BasicForm, useForm } from '/@/components/Form';
|
|
||||||
import { computed, defineComponent } from 'vue';
|
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
import { propTypes } from '/@/utils/propTypes';
|
|
||||||
import { getBpmFormSchema } from '../healthOperatorEx.data';
|
|
||||||
import { queryByIdUrl, saveOrUpdate } from '../healthOperatorEx.api';
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
name: 'HealthOperatorExForm',
|
|
||||||
components: {
|
|
||||||
BasicForm,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
formData: propTypes.object.def({}),
|
|
||||||
formBpm: propTypes.bool.def(true),
|
|
||||||
},
|
|
||||||
setup(props) {
|
|
||||||
const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({
|
|
||||||
labelWidth: 150,
|
|
||||||
schemas: getBpmFormSchema(props.formData),
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
});
|
|
||||||
|
|
||||||
const formDisabled = computed(() => {
|
|
||||||
if (props.formData.disabled === false) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
let formData = {};
|
|
||||||
async function initFormData() {
|
|
||||||
let params = { id: props.formData.dataId };
|
|
||||||
const data = await defHttp.get({ url: queryByIdUrl, params });
|
|
||||||
formData = { ...data };
|
|
||||||
//设置表单的值
|
|
||||||
await setFieldsValue(formData);
|
|
||||||
//默认是禁用
|
|
||||||
await setProps({ disabled: formDisabled.value });
|
|
||||||
}
|
|
||||||
|
|
||||||
async function submitForm() {
|
|
||||||
let data = getFieldsValue();
|
|
||||||
let params = Object.assign({}, formData, data);
|
|
||||||
await saveOrUpdate(params, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
initFormData();
|
|
||||||
|
|
||||||
return {
|
|
||||||
registerForm,
|
|
||||||
formDisabled,
|
|
||||||
submitForm,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicDrawer
|
|
||||||
:title="title"
|
|
||||||
width="70%"
|
|
||||||
:showFooter="showFooter"
|
|
||||||
destroyOnClose
|
|
||||||
v-bind="$attrs"
|
|
||||||
@ok="handleSubmit"
|
|
||||||
@register="registerDrawer"
|
|
||||||
:maskClosable="false"
|
|
||||||
>
|
|
||||||
<div style="height: 60vh">
|
|
||||||
<BasicForm @register="registerForm" />
|
|
||||||
</div>
|
|
||||||
</BasicDrawer>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { computed, ref, unref } from 'vue';
|
|
||||||
import { BasicForm, useForm } from '/@/components/Form';
|
|
||||||
import { formSchema } from '../healthOperatorEx.data';
|
|
||||||
import { saveOrUpdate } from '../healthOperatorEx.api';
|
|
||||||
import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
|
|
||||||
import { useDrawerAdaptiveWidth } from '/@/hooks/jeecg/useAdaptiveWidth';
|
|
||||||
const { adaptiveWidth } = useDrawerAdaptiveWidth();
|
|
||||||
// Emits声明
|
|
||||||
const emit = defineEmits(['register', 'success']);
|
|
||||||
const isUpdate = ref<boolean>(true);
|
|
||||||
const showFooter = ref<boolean>(true);
|
|
||||||
//设置标题
|
|
||||||
const title = ref(String);
|
|
||||||
//表单配置
|
|
||||||
const [registerForm, { setProps, resetFields, setFieldsValue, validate, clearValidate, updateSchema }] = useForm({
|
|
||||||
//labelWidth: 150,
|
|
||||||
schemas: formSchema,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
});
|
|
||||||
//表单赋值
|
|
||||||
const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
|
|
||||||
//重置表单
|
|
||||||
await resetFields();
|
|
||||||
setDrawerProps({ confirmLoading: false, showCancelBtn: !!data?.showFooter, showOkBtn: !!data?.showFooter });
|
|
||||||
isUpdate.value = !!data?.isUpdate;
|
|
||||||
showFooter.value = data.showFooter;
|
|
||||||
title.value = data.type;
|
|
||||||
if (unref(isUpdate)) {
|
|
||||||
//表单赋值
|
|
||||||
await setFieldsValue({
|
|
||||||
...data.record,
|
|
||||||
});
|
|
||||||
await updateSchema([
|
|
||||||
{
|
|
||||||
field: 'password',
|
|
||||||
ifShow: false,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
await clearValidate();
|
|
||||||
} else {
|
|
||||||
await updateSchema([
|
|
||||||
{
|
|
||||||
field: 'password',
|
|
||||||
ifShow: true,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
// 隐藏底部时禁用整个表单
|
|
||||||
setProps({ disabled: !data?.showFooter });
|
|
||||||
});
|
|
||||||
//表单提交事件
|
|
||||||
async function handleSubmit() {
|
|
||||||
try {
|
|
||||||
let values = await validate();
|
|
||||||
setDrawerProps({ confirmLoading: true });
|
|
||||||
//提交表单
|
|
||||||
await saveOrUpdate(values, isUpdate.value);
|
|
||||||
//关闭弹窗
|
|
||||||
closeDrawer();
|
|
||||||
//刷新列表
|
|
||||||
emit('success');
|
|
||||||
} finally {
|
|
||||||
setDrawerProps({ confirmLoading: false });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
/** 时间和数字输入框样式 */
|
|
||||||
:deep(.ant-input-number) {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-calendar-picker) {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
import { defHttp } from "/@/utils/http/axios";
|
|
||||||
import { useMessage } from "/@/hooks/web/useMessage";
|
|
||||||
import { dealPassword } from "/@/views/system/user/user.data";
|
|
||||||
|
|
||||||
const { createConfirm } = useMessage();
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
list = '/sys/healthUserOperatorEx/operatorList',
|
|
||||||
save = '/sys/healthUserOperatorEx/addOpertor',
|
|
||||||
edit = '/sys/healthUserOperatorEx/editOpertor',
|
|
||||||
deleteOne = '/sys/healthUserOperatorEx/delete',
|
|
||||||
deleteBatch = '/sys/healthUserOperatorEx/deleteBatch',
|
|
||||||
importExcel = '/sys/healthUserOperatorEx/importExcel',
|
|
||||||
exportXls = '/sys/healthUserOperatorEx/exportXls',
|
|
||||||
queryById = '/sys/healthUserOperatorEx/queryById',
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出api
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const getExportUrl = Api.exportXls;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑页面回显
|
|
||||||
*/
|
|
||||||
export const queryByIdUrl = Api.queryById;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导入api
|
|
||||||
*/
|
|
||||||
export const getImportUrl = Api.importExcel;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表接口
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 请求编辑数据
|
|
||||||
*/
|
|
||||||
export const resEditData = async (params) => {
|
|
||||||
return await defHttp.get({ url: Api.queryById, params });
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除单个
|
|
||||||
*/
|
|
||||||
export const deleteOne = (params, handleSuccess) => {
|
|
||||||
createConfirm({
|
|
||||||
iconType: 'warning',
|
|
||||||
title: '确认删除',
|
|
||||||
content: '是否删除选中数据',
|
|
||||||
okText: '确认',
|
|
||||||
cancelText: '取消',
|
|
||||||
onOk: () => {
|
|
||||||
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
|
||||||
handleSuccess();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const batchDelete = (params, handleSuccess) => {
|
|
||||||
createConfirm({
|
|
||||||
iconType: 'warning',
|
|
||||||
title: '确认删除',
|
|
||||||
content: '是否删除选中数据',
|
|
||||||
okText: '确认',
|
|
||||||
cancelText: '取消',
|
|
||||||
onOk: () => {
|
|
||||||
return defHttp
|
|
||||||
.delete(
|
|
||||||
{
|
|
||||||
url: Api.deleteBatch,
|
|
||||||
data: params,
|
|
||||||
},
|
|
||||||
{ joinParamsToUrl: true }
|
|
||||||
)
|
|
||||||
.then(() => {
|
|
||||||
handleSuccess();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存或者更新
|
|
||||||
* @param params
|
|
||||||
* @param isUpdate
|
|
||||||
*/
|
|
||||||
export const saveOrUpdate = (params, isUpdate) => {
|
|
||||||
let passwordObj = {};
|
|
||||||
if (!isUpdate.value) {
|
|
||||||
passwordObj = {
|
|
||||||
password: dealPassword(params?.password),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
const data = {
|
|
||||||
healthUserOperatorEx: {
|
|
||||||
id: params?.id,
|
|
||||||
userId: params?.userId,
|
|
||||||
nativePlace: params?.nativePlace,
|
|
||||||
nation: params?.nation,
|
|
||||||
doctorTitle: params?.doctorTitle,
|
|
||||||
goodAt: params?.goodAt,
|
|
||||||
goodAtSymptom: params?.goodAtSymptom,
|
|
||||||
goodAtSickness: params?.goodAtSickness,
|
|
||||||
experience: params?.experience,
|
|
||||||
cardNo: params?.cardNo,
|
|
||||||
healthStatus: params?.healthStatus,
|
|
||||||
college: params?.college,
|
|
||||||
graduateDate: params?.graduateDate,
|
|
||||||
education: params?.education,
|
|
||||||
awardsPapers: params?.awardsPapers,
|
|
||||||
resume: params?.resume,
|
|
||||||
reason: params?.reason,
|
|
||||||
onDutyTime: params?.onDutyTime,
|
|
||||||
createTime: params?.createTime,
|
|
||||||
phone: params?.phone,
|
|
||||||
},
|
|
||||||
sysUserModel: {
|
|
||||||
username: params?.userName,
|
|
||||||
...passwordObj,
|
|
||||||
realname: params?.realname,
|
|
||||||
birthday: params?.birthday,
|
|
||||||
id: params?.id,
|
|
||||||
sex: params?.sex,
|
|
||||||
phone: params?.phone,
|
|
||||||
avatar: params?.avatar,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
url = isUpdate ? Api.edit : Api.save;
|
|
||||||
return defHttp.post({ url: url, params: data });
|
|
||||||
};
|
|
||||||
@@ -1,389 +0,0 @@
|
|||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
||||||
import { render } from '/@/utils/common/renderUtils';
|
|
||||||
import { checkPassword } from '/@/hooks/checkPassword/checkPassword';
|
|
||||||
import { isShowIdCard } from '/@/utils/getEnv';
|
|
||||||
//列表数据
|
|
||||||
export const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '用户账号',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'userName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'realName',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: '籍贯',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'nativePlace',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '民族',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'nation',
|
|
||||||
// customRender: ({ text }) => {
|
|
||||||
// return render.renderDict(text, 'nation') || '';
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
title: '职称',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'doctorTitle',
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return render.renderDict(text, 'z_doct_lev');
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: '擅长',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'goodAt',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '执业经历',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'experience',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '擅长症状',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'goodAtSymptom',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '擅长疾病',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'goodAtSickness',
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
title: '注册时间',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'createTime',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '身份证号',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'cardNo',
|
|
||||||
width: 160,
|
|
||||||
ifShow: isShowIdCard(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '健康状况',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'healthStatus',
|
|
||||||
customRender: ({ text }) => (text && render.renderDict(text, 'jk_status')) || '',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '毕业院校',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'college',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '毕业时间',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'graduateDate',
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '学历',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'education',
|
|
||||||
customRender: ({ text }) => (text && render.renderDict(text, 'emp_education')) || '',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: '获奖及论文发表',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'awardsPapers',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '工作经历',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'resume',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '入选理由',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'reason',
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
title: '值班时间',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'onDutyTime',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
//查询数据
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
field: 'realName',
|
|
||||||
label: '姓名',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
//表单数据
|
|
||||||
export const formSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'id',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'userId',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '用户账号',
|
|
||||||
field: 'userName',
|
|
||||||
component: 'Input',
|
|
||||||
componentProps: ({ formModel }) => {
|
|
||||||
return {
|
|
||||||
autocomplete: 'off',
|
|
||||||
onInput: (event) => {
|
|
||||||
const target = event.target;
|
|
||||||
formModel.username = target.value.replace(/[^\w]/g, '');
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
required: true,
|
|
||||||
rules: [{ required: true, message: '请输入用户账号' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '密码',
|
|
||||||
field: 'password',
|
|
||||||
component: 'StrengthMeter',
|
|
||||||
componentProps: {
|
|
||||||
autocomplete: 'new-password',
|
|
||||||
readOnly: true,
|
|
||||||
onfocus: (field) => {
|
|
||||||
field.target.readOnly = false;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dynamicRules: () => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
validator: (_, value) => {
|
|
||||||
let { message } = checkPassword(value);
|
|
||||||
if (message === 'ok') {
|
|
||||||
return Promise.resolve();
|
|
||||||
} else {
|
|
||||||
return Promise.reject(message);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
show: ({ values }) => {
|
|
||||||
return !values.id;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
field: 'realname',
|
|
||||||
component: 'Input',
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'sex',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
label: '性别',
|
|
||||||
componentProps: {
|
|
||||||
dictCode: 'sex2',
|
|
||||||
type: 'radio',
|
|
||||||
},
|
|
||||||
rules: [{ required: true, message: '请选择性别' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '头像',
|
|
||||||
field: 'avatar',
|
|
||||||
component: 'JImageUpload',
|
|
||||||
componentProps: {
|
|
||||||
maxCount: 1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '手机号',
|
|
||||||
field: 'phone',
|
|
||||||
component: 'Input',
|
|
||||||
rules: [{ required: true, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' }],
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// label: '人员类型',
|
|
||||||
// field: 'userType',
|
|
||||||
// component: 'JDictSelectTag',
|
|
||||||
// componentProps: {
|
|
||||||
// dictCode: 'p_type',
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
label: '身份证号',
|
|
||||||
field: 'cardNo',
|
|
||||||
component: 'Input',
|
|
||||||
rules: [
|
|
||||||
{ required: true, pattern: /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/, message: '身份证号码格式有误' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '籍贯',
|
|
||||||
field: 'nativePlace',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '民族',
|
|
||||||
field: 'nation',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
dictCode: 'nation',
|
|
||||||
showSearch: true,
|
|
||||||
filterOption: (input: string, option: any): boolean => {
|
|
||||||
const str: string = input.toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '出生日期',
|
|
||||||
field: 'birthday',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: false,
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '职称',
|
|
||||||
field: 'doctorTitle',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
dictCode: 'z_doct_lev',
|
|
||||||
showSearch: true,
|
|
||||||
filterOption: (input: string, option: any): boolean => {
|
|
||||||
const str: string = input.trim().toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '擅长',
|
|
||||||
field: 'goodAt',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '执业经历',
|
|
||||||
field: 'experience',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '擅长症状',
|
|
||||||
field: 'goodAtSymptom',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '擅长疾病',
|
|
||||||
field: 'goodAtSickness',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '注册时间',
|
|
||||||
field: 'createTime',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: false,
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '健康状况',
|
|
||||||
field: 'healthStatus',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
dictCode: 'jk_status',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '毕业院校',
|
|
||||||
field: 'college',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '毕业时间',
|
|
||||||
field: 'graduateDate',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: false,
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '学历',
|
|
||||||
field: 'education',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
dictCode: 'emp_education',
|
|
||||||
showSearch: true,
|
|
||||||
filterOption: (input: string, option: any): boolean => {
|
|
||||||
const str: string = input.trim().toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '获奖及论文发表',
|
|
||||||
field: 'awardsPapers',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '工作经历',
|
|
||||||
field: 'resume',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '入选理由',
|
|
||||||
field: 'reason',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'onDutyTime',
|
|
||||||
label: '值班时间',
|
|
||||||
component: 'CheckboxGroup',
|
|
||||||
ifShow: false,
|
|
||||||
componentProps: {
|
|
||||||
options: [
|
|
||||||
{ label: '周一上午', value: '周一上午' },
|
|
||||||
{ label: '周一下午', value: '周一下午' },
|
|
||||||
{ label: '周二上午', value: '周二上午' },
|
|
||||||
{ label: '周二下午', value: '周二下午' },
|
|
||||||
{ label: '周三上午', value: '周三上午' },
|
|
||||||
{ label: '周三下午', value: '周三下午' },
|
|
||||||
{ label: '周四上午', value: '周四上午' },
|
|
||||||
{ label: '周四下午', value: '周四下午' },
|
|
||||||
{ label: '周五上午', value: '周五上午' },
|
|
||||||
{ label: '周五下午', value: '周五下午' },
|
|
||||||
{ label: '周六上午', value: '周六上午' },
|
|
||||||
{ label: '周六下午', value: '周六下午' },
|
|
||||||
{ label: '周日上午', value: '周日上午' },
|
|
||||||
{ label: '周日下午', value: '周日下午' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'id',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程表单调用这个方法获取formSchema
|
|
||||||
* @param param
|
|
||||||
*/
|
|
||||||
export function getBpmFormSchema(_formData): FormSchema[] {
|
|
||||||
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
|
||||||
return formSchema;
|
|
||||||
}
|
|
||||||
@@ -1,234 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<!--引用表格-->
|
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
|
||||||
<!--插槽:table标题-->
|
|
||||||
<template #tableTitle>
|
|
||||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined" v-auth="'system:health_operator_ex:add'">
|
|
||||||
新增
|
|
||||||
</a-button>
|
|
||||||
<!-- <a-button-->
|
|
||||||
<!-- type="primary"-->
|
|
||||||
<!-- preIcon="ant-design:export-outlined"-->
|
|
||||||
<!-- v-auth="'system:health_user_operator_ex:exportXls'"-->
|
|
||||||
<!-- @click="onExportXls"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- 导出-->
|
|
||||||
<!-- </a-button>-->
|
|
||||||
<!-- <j-upload-button-->
|
|
||||||
<!-- type="primary"-->
|
|
||||||
<!-- preIcon="ant-design:import-outlined"-->
|
|
||||||
<!-- v-auth="'system:health_user_operator_ex:importExcel'"-->
|
|
||||||
<!-- @click="onImportXls"-->
|
|
||||||
<!-- >导入-->
|
|
||||||
<!-- </j-upload-button>-->
|
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
@click="batchHandleDelete"
|
|
||||||
v-auth="'system:health_operator_ex:deleteBatch'"
|
|
||||||
preIcon="ant-design:delete-outlined"
|
|
||||||
>
|
|
||||||
批量删除
|
|
||||||
</a-button>
|
|
||||||
</template>
|
|
||||||
<!--操作栏-->
|
|
||||||
<template #action="{ record }">
|
|
||||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
|
||||||
</template>
|
|
||||||
<!--字段回显插槽-->
|
|
||||||
<template #htmlSlot="{ text }">
|
|
||||||
<div v-html="text"></div>
|
|
||||||
</template>
|
|
||||||
<template #fileSlot="{ text }">
|
|
||||||
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
|
|
||||||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)"
|
|
||||||
>下载
|
|
||||||
</a-button>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<!-- 表单区域 -->
|
|
||||||
<healthOperatorExModal @register="registerDrawer" @success="handleSuccess" />
|
|
||||||
<!-- 重置密码 -->
|
|
||||||
<RestPass @register="restPassModal" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" name="system-healthOperatorEx" setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { BasicTable, TableAction } from '/@/components/Table';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import healthOperatorExModal from './components/healthOperatorExModal.vue';
|
|
||||||
import { columns, searchFormSchema } from './healthOperatorEx.data';
|
|
||||||
import { batchDelete, deleteOne, getExportUrl, getImportUrl, list, resEditData } from './healthOperatorEx.api';
|
|
||||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
|
||||||
import { lockUser } from '/@/views/system/user/hospitalDoctor/HospitalDoctor.api';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
import RestPass from '../restPass/RestPass.vue';
|
|
||||||
import { useDrawer } from '/@/components/Drawer';
|
|
||||||
|
|
||||||
const checkedKeys = ref<Array<string | number>>([]);
|
|
||||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
|
||||||
|
|
||||||
//注册model
|
|
||||||
const [restPassModal, { openModal: restPaddModel }] = useModal();
|
|
||||||
//注册table数据
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
title: 'health_user_operator_ex',
|
|
||||||
api: list,
|
|
||||||
columns,
|
|
||||||
canResize: false,
|
|
||||||
formConfig: {
|
|
||||||
//labelWidth: 120,
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: true,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 160,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
exportConfig: {
|
|
||||||
name: '操作人员',
|
|
||||||
url: getExportUrl,
|
|
||||||
},
|
|
||||||
importConfig: {
|
|
||||||
url: getImportUrl,
|
|
||||||
success: handleSuccess,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增事件
|
|
||||||
*/
|
|
||||||
function handleAdd() {
|
|
||||||
openDrawer(true, {
|
|
||||||
isUpdate: false,
|
|
||||||
showFooter: true,
|
|
||||||
type: '新增',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑事件
|
|
||||||
*/
|
|
||||||
function handleEdit(record: Recordable) {
|
|
||||||
resEditData({ id: record.id }).then((res) => {
|
|
||||||
let data = { ...res.sysUserModel, ...res.healthUserOperatorEx, phone: res.sysUserModel.phone };
|
|
||||||
data.userName = res.sysUserModel.username;
|
|
||||||
openDrawer(true, {
|
|
||||||
record: data,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: true,
|
|
||||||
type: '编辑',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情
|
|
||||||
*/
|
|
||||||
function handleDetail(record: Recordable) {
|
|
||||||
resEditData({ id: record.id }).then((res) => {
|
|
||||||
let data = { ...res.sysUserModel, ...res.healthUserOperatorEx };
|
|
||||||
data.userName = res.sysUserModel.username;
|
|
||||||
openDrawer(true, {
|
|
||||||
record: data,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: false,
|
|
||||||
type: '详情',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除事件
|
|
||||||
*/
|
|
||||||
async function handleDelete(record) {
|
|
||||||
await deleteOne({ id: record.id }, handleSuccess);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除事件
|
|
||||||
*/
|
|
||||||
async function batchHandleDelete() {
|
|
||||||
if (selectedRowKeys.value.length === 0) {
|
|
||||||
return message.warning('未选中任何数据');
|
|
||||||
}
|
|
||||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 成功回调
|
|
||||||
*/
|
|
||||||
function handleSuccess() {
|
|
||||||
(selectedRowKeys.value = []) && reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作栏
|
|
||||||
*/
|
|
||||||
function getTableAction(record) {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: '编辑',
|
|
||||||
onClick: handleEdit.bind(null, record),
|
|
||||||
auth: 'system:health_operator_ex:edit',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '详情',
|
|
||||||
onClick: handleDetail.bind(null, record),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
// 重置密码
|
|
||||||
function restPass(record) {
|
|
||||||
restPaddModel(true, {
|
|
||||||
record: record.userId,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: false,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 1 锁定用户 2 激活用户
|
|
||||||
async function handleUserOpt(record, type) {
|
|
||||||
const params = {
|
|
||||||
userId: record.userId,
|
|
||||||
status: type,
|
|
||||||
};
|
|
||||||
await lockUser(params, type, handleSuccess);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 下拉操作栏
|
|
||||||
*/
|
|
||||||
function getDropDownAction(record) {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: '删除',
|
|
||||||
onClick: handleDelete.bind(null, record),
|
|
||||||
auth: 'system:health_operator_ex:delete',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '重置密码',
|
|
||||||
onClick: restPass.bind(null, record),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '锁定用户',
|
|
||||||
auth: 'system:user:frozen',
|
|
||||||
onClick: handleUserOpt.bind(null, record, 2),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '激活用户',
|
|
||||||
auth: 'system:user:frozen',
|
|
||||||
onClick: handleUserOpt.bind(null, record, 1),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
@@ -1,136 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
|
||||||
import { dealPassword } from '/@/views/system/user/user.data';
|
|
||||||
|
|
||||||
const { createConfirm } = useMessage();
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
list = '/sys/healthUserOperatorEx/list',
|
|
||||||
save = '/sys/healthUserOperatorEx/add',
|
|
||||||
edit = '/sys/healthUserOperatorEx/edit',
|
|
||||||
deleteOne = '/sys/healthUserOperatorEx/delete',
|
|
||||||
deleteBatch = '/sys/healthUserOperatorEx/deleteBatch',
|
|
||||||
importExcel = '/sys/healthUserOperatorEx/importExcel',
|
|
||||||
exportXls = '/sys/healthUserOperatorEx/exportXls',
|
|
||||||
getEdit = '/sys/healthUserOperatorEx/queryById',
|
|
||||||
queryById = '/system/healthUserOperatorEx/queryById',
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出api
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const getExportUrl = Api.exportXls;
|
|
||||||
/**
|
|
||||||
* 编辑页面回显
|
|
||||||
*/
|
|
||||||
export const queryByIdUrl = Api.queryById;
|
|
||||||
/**
|
|
||||||
* 导入api
|
|
||||||
*/
|
|
||||||
export const getImportUrl = Api.importExcel;
|
|
||||||
/**
|
|
||||||
* 列表接口
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 请求编辑数据
|
|
||||||
*/
|
|
||||||
export const resEditData = async (params) => {
|
|
||||||
return await defHttp.get({ url: Api.getEdit, params }, { joinParamsToUrl: true });
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 删除单个
|
|
||||||
*/
|
|
||||||
export const deleteOne = (params, handleSuccess) => {
|
|
||||||
createConfirm({
|
|
||||||
iconType: 'warning',
|
|
||||||
title: '确认删除',
|
|
||||||
content: '是否删除选中数据',
|
|
||||||
okText: '确认',
|
|
||||||
cancelText: '取消',
|
|
||||||
onOk: () => {
|
|
||||||
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
|
||||||
handleSuccess();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const batchDelete = (params, handleSuccess) => {
|
|
||||||
createConfirm({
|
|
||||||
iconType: 'warning',
|
|
||||||
title: '确认删除',
|
|
||||||
content: '是否删除选中数据',
|
|
||||||
okText: '确认',
|
|
||||||
cancelText: '取消',
|
|
||||||
onOk: () => {
|
|
||||||
return defHttp
|
|
||||||
.delete(
|
|
||||||
{
|
|
||||||
url: Api.deleteBatch,
|
|
||||||
data: params,
|
|
||||||
},
|
|
||||||
{ joinParamsToUrl: true }
|
|
||||||
)
|
|
||||||
.then(() => {
|
|
||||||
handleSuccess();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 保存或者更新
|
|
||||||
* @param params
|
|
||||||
* @param isUpdate
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export const saveOrUpdate = (params, isUpdate) => {
|
|
||||||
let passwordObj = {};
|
|
||||||
if (!isUpdate.value) {
|
|
||||||
passwordObj = {
|
|
||||||
password: dealPassword(params?.password),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
const url = isUpdate ? Api.edit : Api.save;
|
|
||||||
const data = {
|
|
||||||
healthUserOperatorEx: {
|
|
||||||
id: params?.id,
|
|
||||||
userId: params?.userId,
|
|
||||||
userType: params?.userType,
|
|
||||||
nativePlace: params?.nativePlace,
|
|
||||||
nation: params?.nation,
|
|
||||||
doctorTitle: params?.doctorTitle,
|
|
||||||
goodAt: params?.goodAt,
|
|
||||||
experience: params?.experience,
|
|
||||||
goodAtSymptom: params?.goodAtSymptom,
|
|
||||||
goodAtSickness: params?.goodAtSickness,
|
|
||||||
createTime: params?.createTime,
|
|
||||||
cardNo: params?.cardNo,
|
|
||||||
healthStatus: params?.healthStatus,
|
|
||||||
college: params?.college,
|
|
||||||
graduateDate: params?.graduateDate,
|
|
||||||
education: params?.education,
|
|
||||||
awardsPapers: params?.awardsPapers,
|
|
||||||
resume: params?.resume,
|
|
||||||
reason: params?.reason,
|
|
||||||
onDutyTime: params?.onDutyTime,
|
|
||||||
},
|
|
||||||
sysUserModel: {
|
|
||||||
username: params?.username,
|
|
||||||
...passwordObj,
|
|
||||||
realname: params?.realname,
|
|
||||||
birthday: params?.birthday,
|
|
||||||
sex: params?.sex,
|
|
||||||
phone: params?.phone,
|
|
||||||
id: params?.id,
|
|
||||||
avatar: params?.avatar,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
return defHttp.post({ url: url, data });
|
|
||||||
};
|
|
||||||
@@ -1,420 +0,0 @@
|
|||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
||||||
import { render } from '/@/utils/common/renderUtils';
|
|
||||||
import { checkPassword } from '/@/hooks/checkPassword/checkPassword';
|
|
||||||
import { isShowIdCard } from '/@/utils/getEnv';
|
|
||||||
//列表数据
|
|
||||||
export const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '用户账号',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'userName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'realName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '籍贯',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'nativePlace',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '民族',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'nation',
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return render.renderDict(text, 'nation') || '';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '出生日期',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'birthday',
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '职称',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'doctorTitle',
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return render.renderDict(text, 'z_doct_lev');
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '擅长',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'goodAt',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '执业经历',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'experience',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '擅长症状',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'goodAtSymptom',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '擅长疾病',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'goodAtSickness',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '注册时间',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'createTime',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '身份证号',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'cardNo',
|
|
||||||
width: 160,
|
|
||||||
ifShow: isShowIdCard(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '健康状况',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'healthStatus',
|
|
||||||
customRender: ({ text }) => (text && render.renderDict(text, 'jk_status')) || '',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '毕业院校',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'college',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '毕业时间',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'graduateDate',
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '学历',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'education',
|
|
||||||
customRender: ({ text }) => (text && render.renderDict(text, 'emp_education')) || '',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '获奖及论文发表',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'awardsPapers',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '工作简历',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'resume',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '入选理由',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'reason',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: '值班时间',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'onDutyTime',
|
|
||||||
// },
|
|
||||||
];
|
|
||||||
//查询数据
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
field: 'realName',
|
|
||||||
label: '姓名',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
//表单数据
|
|
||||||
export const formSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '人员类型',
|
|
||||||
field: 'userType',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
dictCode: 'p_type',
|
|
||||||
},
|
|
||||||
// required: true,
|
|
||||||
ifShow: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '用户账号',
|
|
||||||
field: 'username',
|
|
||||||
component: 'Input',
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '密码',
|
|
||||||
field: 'password',
|
|
||||||
component: 'StrengthMeter',
|
|
||||||
componentProps: {
|
|
||||||
autocomplete: 'new-password',
|
|
||||||
readOnly: true,
|
|
||||||
onfocus: (field) => {
|
|
||||||
field.target.readOnly = false;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dynamicRules: () => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
validator: (_, value) => {
|
|
||||||
let { message } = checkPassword(value);
|
|
||||||
if (message === 'ok') {
|
|
||||||
return Promise.resolve();
|
|
||||||
} else {
|
|
||||||
return Promise.reject(message);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
show: ({ values }) => {
|
|
||||||
return !values.id;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
field: 'realname',
|
|
||||||
component: 'Input',
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '性别',
|
|
||||||
field: 'sex',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
dictCode: 'sex2',
|
|
||||||
type: 'radio',
|
|
||||||
},
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '头像',
|
|
||||||
field: 'avatar',
|
|
||||||
component: 'JImageUpload',
|
|
||||||
componentProps: {
|
|
||||||
maxCount: 1,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '手机号',
|
|
||||||
field: 'phone',
|
|
||||||
component: 'Input',
|
|
||||||
rules: [{ required: true, pattern: /^1[3456789]\d{9}$/, message: '手机号码格式有误' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '身份证号',
|
|
||||||
field: 'cardNo',
|
|
||||||
component: 'Input',
|
|
||||||
rules: [
|
|
||||||
{ required: true, pattern: /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/, message: '身份证号码格式有误' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '籍贯',
|
|
||||||
field: 'nativePlace',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '民族',
|
|
||||||
field: 'nation',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
dictCode: 'nation',
|
|
||||||
showSearch: true,
|
|
||||||
filterOption: (input: string, option: any): boolean => {
|
|
||||||
const str: string = input.toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '出生日期',
|
|
||||||
field: 'birthday',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: false,
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '职称',
|
|
||||||
field: 'doctorTitle',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
dictCode: 'z_doct_lev',
|
|
||||||
showSearch: true,
|
|
||||||
filterOption: (input: string, option: any): boolean => {
|
|
||||||
const str: string = input.trim().toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '毕业时间',
|
|
||||||
field: 'graduateDate',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: false,
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '学历',
|
|
||||||
field: 'education',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
dictCode: 'emp_education',
|
|
||||||
showSearch: true,
|
|
||||||
filterOption: (input: string, option: any): boolean => {
|
|
||||||
const str: string = input.trim().toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// label: '值班时间',
|
|
||||||
// field: 'onDutyTime',
|
|
||||||
// component: 'CheckboxGroup',
|
|
||||||
// componentProps: {
|
|
||||||
// options: [
|
|
||||||
// {
|
|
||||||
// label: '周一上午',
|
|
||||||
// value: '周一上午',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '周一下午',
|
|
||||||
// value: '周一下午',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '周二上午',
|
|
||||||
// value: '周二上午',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '周二下午',
|
|
||||||
// value: '周二下午',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '周三上午',
|
|
||||||
// value: '周三上午',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '周三下午',
|
|
||||||
// value: '周三下午',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '周四上午',
|
|
||||||
// value: '周四上午',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '周四下午',
|
|
||||||
// value: '周四下午',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '周五上午',
|
|
||||||
// value: '周五上午',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '周五下午',
|
|
||||||
// value: '周五下午',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '周六上午',
|
|
||||||
// value: '周六上午',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '周六下午',
|
|
||||||
// value: '周六下午',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '周日上午',
|
|
||||||
// value: '周日上午',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '周日下午',
|
|
||||||
// value: '周日下午',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
label: '擅长',
|
|
||||||
field: 'goodAt',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '执业经历',
|
|
||||||
field: 'experience',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '擅长症状',
|
|
||||||
field: 'goodAtSymptom',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '擅长疾病',
|
|
||||||
field: 'goodAtSickness',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '注册时间',
|
|
||||||
field: 'createTime',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: false,
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '健康状况',
|
|
||||||
field: 'healthStatus',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
dictCode: 'jk_status',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '毕业院校',
|
|
||||||
field: 'college',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '获奖及论文发表',
|
|
||||||
field: 'awardsPapers',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '工作简历',
|
|
||||||
field: 'resume',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '入选理由',
|
|
||||||
field: 'reason',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'id',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程表单调用这个方法获取formSchema
|
|
||||||
* @param param
|
|
||||||
*/
|
|
||||||
export function getBpmFormSchema(_formData): FormSchema[] {
|
|
||||||
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
|
||||||
return formSchema;
|
|
||||||
}
|
|
||||||
@@ -1,232 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<!--引用表格-->
|
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
|
||||||
<!--插槽:table标题-->
|
|
||||||
<template #tableTitle>
|
|
||||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined" v-auth="'system:health_user_operator_ex:add'">
|
|
||||||
新增
|
|
||||||
</a-button>
|
|
||||||
<!-- <a-button-->
|
|
||||||
<!-- type="primary"-->
|
|
||||||
<!-- preIcon="ant-design:export-outlined"-->
|
|
||||||
<!-- v-auth="'system:health_user_operator_ex:exportXls'"-->
|
|
||||||
<!-- @click="onExportXls"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- 导出-->
|
|
||||||
<!-- </a-button>-->
|
|
||||||
<!-- <j-upload-button-->
|
|
||||||
<!-- type="primary"-->
|
|
||||||
<!-- preIcon="ant-design:import-outlined"-->
|
|
||||||
<!-- v-auth="'system:health_user_operator_ex:importExcel'"-->
|
|
||||||
<!-- @click="onImportXls"-->
|
|
||||||
<!-- >导入-->
|
|
||||||
<!-- </j-upload-button>-->
|
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
preIcon="ant-design:delete-outlined"
|
|
||||||
v-auth="'system:health_user_operator_ex:deleteBatch'"
|
|
||||||
@click="batchHandleDelete"
|
|
||||||
>批量删除</a-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
<!--操作栏-->
|
|
||||||
<template #action="{ record }">
|
|
||||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
|
||||||
</template>
|
|
||||||
<!--字段回显插槽-->
|
|
||||||
<template #htmlSlot="{ text }">
|
|
||||||
<div v-html="text"></div>
|
|
||||||
</template>
|
|
||||||
<template #fileSlot="{ text }">
|
|
||||||
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
|
|
||||||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)"
|
|
||||||
>下载
|
|
||||||
</a-button>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<!-- 表单区域 -->
|
|
||||||
<HealthUserOperatorExModal :userId="userId" @register="registerDrawer" @success="handleSuccess" />
|
|
||||||
<!-- 重置密码 -->
|
|
||||||
<RestPass @register="restPassModal" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" name="system-healthUserOperatorEx" setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { BasicTable, TableAction } from '/@/components/Table';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import HealthUserOperatorExModal from './components/HealthUserOperatorExModal.vue';
|
|
||||||
import RestPass from '../restPass/RestPass.vue';
|
|
||||||
import { columns, searchFormSchema } from './HealthUserOperatorEx.data';
|
|
||||||
import { batchDelete, deleteOne, getExportUrl, getImportUrl, list, resEditData } from './HealthUserOperatorEx.api';
|
|
||||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
|
||||||
import { lockUser } from '/@/views/system/user/hospitalDoctor/HospitalDoctor.api';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
import { useDrawer } from '/@/components/Drawer';
|
|
||||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
|
||||||
const userId = ref<String>('');
|
|
||||||
//注册model
|
|
||||||
const [restPassModal, { openModal: restPaddModel }] = useModal();
|
|
||||||
//注册table数据
|
|
||||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
title: 'health_user_operator_ex',
|
|
||||||
api: list,
|
|
||||||
columns,
|
|
||||||
canResize: false,
|
|
||||||
formConfig: {
|
|
||||||
//labelWidth: 120,
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: true,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 160,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
exportConfig: {
|
|
||||||
name: '专业人员',
|
|
||||||
url: getExportUrl,
|
|
||||||
},
|
|
||||||
importConfig: {
|
|
||||||
url: getImportUrl,
|
|
||||||
success: handleSuccess,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增事件
|
|
||||||
*/
|
|
||||||
function handleAdd() {
|
|
||||||
openDrawer(true, {
|
|
||||||
isUpdate: false,
|
|
||||||
showFooter: true,
|
|
||||||
type: '新增',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑事件
|
|
||||||
*/
|
|
||||||
function handleEdit(record: Recordable) {
|
|
||||||
userId.value = record.userId;
|
|
||||||
resEditData({ id: record.id }).then((res) => {
|
|
||||||
let data = { ...res.sysUserModel, ...res.healthUserOperatorEx };
|
|
||||||
data.phone = res.sysUserModel.phone;
|
|
||||||
openDrawer(true, {
|
|
||||||
record: data,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: true,
|
|
||||||
type: '编辑',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情
|
|
||||||
*/
|
|
||||||
function handleDetail(record: Recordable) {
|
|
||||||
resEditData({ id: record.id }).then((res) => {
|
|
||||||
let data = { ...res.sysUserModel, ...res.healthUserOperatorEx };
|
|
||||||
data.phone = res.sysUserModel.phone;
|
|
||||||
openDrawer(true, {
|
|
||||||
record: data,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: false,
|
|
||||||
type: '详情',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除事件
|
|
||||||
*/
|
|
||||||
async function handleDelete(record) {
|
|
||||||
await deleteOne({ id: record.id }, handleSuccess);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除事件
|
|
||||||
*/
|
|
||||||
async function batchHandleDelete() {
|
|
||||||
if (selectedRowKeys.value.length === 0) {
|
|
||||||
return message.warning('未选中任何数据');
|
|
||||||
}
|
|
||||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 成功回调
|
|
||||||
*/
|
|
||||||
function handleSuccess() {
|
|
||||||
(selectedRowKeys.value = []) && reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作栏
|
|
||||||
*/
|
|
||||||
function getTableAction(record) {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: '编辑',
|
|
||||||
onClick: handleEdit.bind(null, record),
|
|
||||||
auth: 'system:health_user_operator_ex:edit',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '详情',
|
|
||||||
onClick: handleDetail.bind(null, record),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
// 重置密码
|
|
||||||
function restPass(record) {
|
|
||||||
restPaddModel(true, {
|
|
||||||
record: record.userId,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: false,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 1 锁定用户 2 激活用户
|
|
||||||
async function handleUserOpt(record, type) {
|
|
||||||
const params = {
|
|
||||||
userId: record.userId,
|
|
||||||
status: type,
|
|
||||||
};
|
|
||||||
await lockUser(params, type, handleSuccess);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 下拉操作栏
|
|
||||||
*/
|
|
||||||
function getDropDownAction(record) {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: '删除',
|
|
||||||
onClick: handleDelete.bind(null, record),
|
|
||||||
auth: 'system:health_user_operator_ex:delete',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '重置密码',
|
|
||||||
onClick: restPass.bind(null, record),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '锁定用户',
|
|
||||||
auth: 'system:user:frozen',
|
|
||||||
onClick: handleUserOpt.bind(null, record, 2),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '激活用户',
|
|
||||||
auth: 'system:user:frozen',
|
|
||||||
onClick: handleUserOpt.bind(null, record, 1),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="min-height: 400px">
|
|
||||||
<BasicForm @register="registerForm" />
|
|
||||||
<div v-if="!formDisabled" style="width: 100%; text-align: center">
|
|
||||||
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { BasicForm, useForm } from '/@/components/Form';
|
|
||||||
import { computed, defineComponent } from 'vue';
|
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
import { propTypes } from '/@/utils/propTypes';
|
|
||||||
import { getBpmFormSchema } from '../HealthUserOperatorEx.data';
|
|
||||||
import { queryByIdUrl, saveOrUpdate } from '../HealthUserOperatorEx.api';
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
name: 'HealthUserOperatorExForm',
|
|
||||||
components: {
|
|
||||||
BasicForm,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
formData: propTypes.object.def({}),
|
|
||||||
formBpm: propTypes.bool.def(true),
|
|
||||||
},
|
|
||||||
setup(props) {
|
|
||||||
const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({
|
|
||||||
labelWidth: 150,
|
|
||||||
schemas: getBpmFormSchema(props.formData),
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
});
|
|
||||||
|
|
||||||
const formDisabled = computed(() => {
|
|
||||||
if (props.formData.disabled === false) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
let formData = {};
|
|
||||||
async function initFormData() {
|
|
||||||
let params = { id: props.formData.dataId };
|
|
||||||
const data = await defHttp.get({ url: queryByIdUrl, params });
|
|
||||||
formData = { ...data };
|
|
||||||
//设置表单的值
|
|
||||||
await setFieldsValue(formData);
|
|
||||||
//默认是禁用
|
|
||||||
await setProps({ disabled: formDisabled.value });
|
|
||||||
}
|
|
||||||
|
|
||||||
async function submitForm() {
|
|
||||||
let data = getFieldsValue();
|
|
||||||
let params = Object.assign({}, formData, data);
|
|
||||||
await saveOrUpdate(params, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
initFormData();
|
|
||||||
|
|
||||||
return {
|
|
||||||
registerForm,
|
|
||||||
formDisabled,
|
|
||||||
submitForm,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicDrawer
|
|
||||||
:maskClosable="false"
|
|
||||||
:title="title"
|
|
||||||
:width="adaptiveWidth"
|
|
||||||
:showFooter="showFooter"
|
|
||||||
v-bind="$attrs"
|
|
||||||
@register="registerDrawer"
|
|
||||||
destroyOnClose
|
|
||||||
@ok="handleSubmit"
|
|
||||||
>
|
|
||||||
<BasicForm @register="registerForm" />
|
|
||||||
</BasicDrawer>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { computed, defineProps, ref, unref } from 'vue';
|
|
||||||
import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
|
|
||||||
import { BasicForm, useForm } from '/@/components/Form';
|
|
||||||
import { formSchema } from '../HealthUserOperatorEx.data';
|
|
||||||
import { saveOrUpdate } from '../HealthUserOperatorEx.api';
|
|
||||||
import { useDrawerAdaptiveWidth } from '/@/hooks/jeecg/useAdaptiveWidth';
|
|
||||||
const { adaptiveWidth } = useDrawerAdaptiveWidth();
|
|
||||||
// Emits声明
|
|
||||||
const emit = defineEmits(['register', 'success']);
|
|
||||||
const isUpdate = ref<boolean>(true);
|
|
||||||
const showFooter = ref<boolean>(true);
|
|
||||||
//设置标题
|
|
||||||
const title = ref(String);
|
|
||||||
const props = defineProps({
|
|
||||||
userId: String,
|
|
||||||
});
|
|
||||||
//表单配置
|
|
||||||
const [registerForm, { setProps, resetFields, setFieldsValue, validate, clearValidate, updateSchema }] = useForm({
|
|
||||||
//labelWidth: 150,
|
|
||||||
schemas: formSchema,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
});
|
|
||||||
//表单赋值
|
|
||||||
const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
|
|
||||||
//重置表单
|
|
||||||
await resetFields();
|
|
||||||
setDrawerProps({ confirmLoading: false, showCancelBtn: !!data?.showFooter, showOkBtn: !!data?.showFooter });
|
|
||||||
isUpdate.value = !!data?.isUpdate;
|
|
||||||
showFooter.value = data.showFooter;
|
|
||||||
title.value = data.type;
|
|
||||||
if (unref(isUpdate)) {
|
|
||||||
//表单赋值
|
|
||||||
await setFieldsValue({
|
|
||||||
...data.record,
|
|
||||||
});
|
|
||||||
await updateSchema([
|
|
||||||
{
|
|
||||||
field: 'password',
|
|
||||||
ifShow: false,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
await clearValidate();
|
|
||||||
} else {
|
|
||||||
await updateSchema([
|
|
||||||
{
|
|
||||||
field: 'password',
|
|
||||||
ifShow: true,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
// 隐藏底部时禁用整个表单
|
|
||||||
setProps({ disabled: !data?.showFooter });
|
|
||||||
});
|
|
||||||
//表单提交事件
|
|
||||||
async function handleSubmit(v) {
|
|
||||||
try {
|
|
||||||
let values = await validate();
|
|
||||||
values.userId = props.userId;
|
|
||||||
setDrawerProps({ confirmLoading: true });
|
|
||||||
//提交表单
|
|
||||||
await saveOrUpdate(values, isUpdate.value);
|
|
||||||
//关闭弹窗
|
|
||||||
closeDrawer();
|
|
||||||
//刷新列表
|
|
||||||
emit('success');
|
|
||||||
} finally {
|
|
||||||
setDrawerProps({ confirmLoading: false });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
/** 时间和数字输入框样式 */
|
|
||||||
:deep(.ant-input-number) {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-calendar-picker) {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,132 +0,0 @@
|
|||||||
import { defHttp } from "/@/utils/http/axios";
|
|
||||||
import { useMessage } from "/@/hooks/web/useMessage";
|
|
||||||
import { dealPassword } from "/@/views/system/user/user.data";
|
|
||||||
|
|
||||||
const { createConfirm } = useMessage();
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
list = '/sys/healthUserStationEx/list',
|
|
||||||
save = '/sys/healthUserStationEx/add',
|
|
||||||
edit = '/sys/healthUserStationEx/edit',
|
|
||||||
deleteOne = '/sys/healthUserStationEx/delete',
|
|
||||||
deleteBatch = '/sys/healthUserStationEx/deleteBatch',
|
|
||||||
importExcel = '/sys/healthUserStationEx/importExcel',
|
|
||||||
exportXls = '/sys/healthUserStationEx/exportXls',
|
|
||||||
getEdit = '/sys/healthUserStationEx/queryById',
|
|
||||||
getHospitals = '/rest/consult/r/h/list',
|
|
||||||
queryById = '/system/healthUserStationEx/queryById',
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出api
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const getExportUrl = Api.exportXls;
|
|
||||||
/**
|
|
||||||
* 编辑页面回显
|
|
||||||
*/
|
|
||||||
export const queryByIdUrl = Api.queryById;
|
|
||||||
/**
|
|
||||||
* 导入api
|
|
||||||
*/
|
|
||||||
export const getImportUrl = Api.importExcel;
|
|
||||||
/**
|
|
||||||
* 列表接口
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 请求编辑数据
|
|
||||||
*/
|
|
||||||
export const resEditData = async (params) => {
|
|
||||||
return await defHttp.get({ url: Api.getEdit, params }, { joinParamsToUrl: true });
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 医院列表
|
|
||||||
*/
|
|
||||||
export const hospitalLists = async (params) => {
|
|
||||||
return await defHttp.get({ url: Api.getHospitals, params });
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 删除单个
|
|
||||||
*/
|
|
||||||
export const deleteOne = (params, handleSuccess) => {
|
|
||||||
createConfirm({
|
|
||||||
iconType: 'warning',
|
|
||||||
title: '确认删除',
|
|
||||||
content: '是否删除选中数据',
|
|
||||||
okText: '确认',
|
|
||||||
cancelText: '取消',
|
|
||||||
onOk: () => {
|
|
||||||
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
|
||||||
handleSuccess();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 批量删除
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const batchDelete = (params, handleSuccess) => {
|
|
||||||
createConfirm({
|
|
||||||
iconType: 'warning',
|
|
||||||
title: '确认删除',
|
|
||||||
content: '是否删除选中数据',
|
|
||||||
okText: '确认',
|
|
||||||
cancelText: '取消',
|
|
||||||
onOk: () => {
|
|
||||||
return defHttp
|
|
||||||
.delete(
|
|
||||||
{
|
|
||||||
url: Api.deleteBatch,
|
|
||||||
data: params,
|
|
||||||
},
|
|
||||||
{ joinParamsToUrl: true }
|
|
||||||
)
|
|
||||||
.then(() => {
|
|
||||||
handleSuccess();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 保存或者更新
|
|
||||||
* @param params
|
|
||||||
* @param isUpdate
|
|
||||||
*/
|
|
||||||
export const saveOrUpdate = (params, isUpdate) => {
|
|
||||||
let passwordObj = {};
|
|
||||||
if (!isUpdate.value) {
|
|
||||||
passwordObj = {
|
|
||||||
password: dealPassword(params?.password),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
const url = isUpdate ? Api.edit : Api.save,
|
|
||||||
data = {
|
|
||||||
healthUserStationEx: {
|
|
||||||
id: params?.id,
|
|
||||||
hospitalId: params?.hospitalId,
|
|
||||||
hospitalName: params?.hospitalName,
|
|
||||||
memo: params?.memo,
|
|
||||||
},
|
|
||||||
sysUserModel: {
|
|
||||||
realname: params?.realname,
|
|
||||||
username: params?.username,
|
|
||||||
sex: params?.sex,
|
|
||||||
avatar: params?.avatar,
|
|
||||||
idCard: params?.idCard,
|
|
||||||
birthday: params?.birthday,
|
|
||||||
email: params?.email,
|
|
||||||
phone: params?.phone,
|
|
||||||
workNo: params?.workNo,
|
|
||||||
...passwordObj,
|
|
||||||
post: params?.post,
|
|
||||||
orgCode: params?.orgCode,
|
|
||||||
id: params?.id,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
return defHttp.post({ url: url, data });
|
|
||||||
};
|
|
||||||
@@ -1,232 +0,0 @@
|
|||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
||||||
import { getNewHospitalApi, getPhysicalHospitalsList } from '../user.api';
|
|
||||||
import { checkPassword } from '/@/hooks/checkPassword/checkPassword';
|
|
||||||
//列表数据
|
|
||||||
export const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '用户账号',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'userName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'realName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '医院',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'hospitalName',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
//查询数据
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
field: 'realName',
|
|
||||||
label: '姓名',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '医院',
|
|
||||||
field: 'hospitalId',
|
|
||||||
component: 'ApiSelect',
|
|
||||||
componentProps: {
|
|
||||||
api: getNewHospitalApi,
|
|
||||||
resultField: 'list',
|
|
||||||
labelField: 'name',
|
|
||||||
valueField: 'id',
|
|
||||||
immediate: false,
|
|
||||||
placeholder: '请选择驻场医院',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
//表单数据
|
|
||||||
export const formSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '医院',
|
|
||||||
field: 'hospitalName',
|
|
||||||
component: 'ApiSelect',
|
|
||||||
componentProps: {
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
api: getNewHospitalApi,
|
|
||||||
resultField: 'list',
|
|
||||||
labelField: 'name',
|
|
||||||
valueField: 'id',
|
|
||||||
immediate: false,
|
|
||||||
// onChange: (e) => {
|
|
||||||
// console.log('selected:', e);
|
|
||||||
// },
|
|
||||||
// // 请求后回调
|
|
||||||
// onOptionsChange: (options) => {
|
|
||||||
// console.log('get options', options.length, options);
|
|
||||||
// },
|
|
||||||
onOptionsChange: (options) => {
|
|
||||||
// console.log("options",options)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '用户账号',
|
|
||||||
field: 'username',
|
|
||||||
component: 'Input',
|
|
||||||
required: true,
|
|
||||||
componentProps: {
|
|
||||||
autocomplete: 'off',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '密码',
|
|
||||||
field: 'password',
|
|
||||||
component: 'StrengthMeter',
|
|
||||||
required: true,
|
|
||||||
componentProps: {
|
|
||||||
autocomplete: 'new-password',
|
|
||||||
readOnly: true,
|
|
||||||
onfocus: (field) => {
|
|
||||||
field.target.readOnly = false;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dynamicRules: () => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
validator: (_, value) => {
|
|
||||||
let { message } = checkPassword(value);
|
|
||||||
if (message === 'ok') {
|
|
||||||
return Promise.resolve();
|
|
||||||
} else {
|
|
||||||
return Promise.reject(message);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
show: ({ values }) => {
|
|
||||||
return !values.id;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'hospitalId', // 医院名称选中的医院ID
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
field: 'realname',
|
|
||||||
component: 'Input',
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'sex',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
label: '性别',
|
|
||||||
colProps: {
|
|
||||||
span: 24,
|
|
||||||
},
|
|
||||||
componentProps: {
|
|
||||||
type: 'radio',
|
|
||||||
dictCode: 'sex2',
|
|
||||||
},
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'avatar',
|
|
||||||
label: '头像',
|
|
||||||
component: 'JImageUpload',
|
|
||||||
componentProps: {
|
|
||||||
text: '头像',
|
|
||||||
},
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '手机号',
|
|
||||||
field: 'phone',
|
|
||||||
component: 'Input',
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
pattern: /^1[3456789][0-9]{9}$/,
|
|
||||||
message: '${label}格式有误',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '身份证号',
|
|
||||||
field: 'idCard',
|
|
||||||
component: 'Input',
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
|
|
||||||
message: '${label}格式有误',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '出生日期',
|
|
||||||
field: 'birthday',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: false,
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
placeholder: '请选择出生日期',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '邮箱',
|
|
||||||
field: 'email',
|
|
||||||
component: 'Input',
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
pattern: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
|
|
||||||
message: '${label}格式有误',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '员工编号', // 原来为工号
|
|
||||||
field: 'workNo',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '人员类型',
|
|
||||||
field: 'personType',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
dictCode: 'p_type',
|
|
||||||
},
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// label: '职务',
|
|
||||||
// field: 'post',
|
|
||||||
// component: 'Input',
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
label: '部门编码',
|
|
||||||
field: 'orgCode',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
// TODO 主键隐藏字段,目前写死为ID
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'id',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程表单调用这个方法获取formSchema
|
|
||||||
* @param param
|
|
||||||
*/
|
|
||||||
export function getBpmFormSchema(_formData): FormSchema[] {
|
|
||||||
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
|
||||||
return formSchema;
|
|
||||||
}
|
|
||||||
@@ -1,218 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<!--引用表格-->
|
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
|
||||||
<template #customSlot="{ model, field }">
|
|
||||||
<a-input v-model:value="model[field]" />
|
|
||||||
</template>
|
|
||||||
<!--插槽:table标题-->
|
|
||||||
<template #tableTitle>
|
|
||||||
<a-button v-auth="'system:health_user_station_ex:add'" type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined">
|
|
||||||
新增
|
|
||||||
</a-button>
|
|
||||||
<!-- <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出 </a-button>-->
|
|
||||||
<!-- <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入 </j-upload-button>-->
|
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
v-auth="'system:health_user_station_ex:deleteBatch'"
|
|
||||||
preIcon="ant-design:delete-outlined"
|
|
||||||
@click="batchHandleDelete"
|
|
||||||
>批量删除</a-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
<!--操作栏-->
|
|
||||||
<template #action="{ record }">
|
|
||||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
|
||||||
</template>
|
|
||||||
<!--字段回显插槽-->
|
|
||||||
<template #htmlSlot="{ text }">
|
|
||||||
<div v-html="text"></div>
|
|
||||||
</template>
|
|
||||||
<template #fileSlot="{ text }">
|
|
||||||
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
|
|
||||||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)"
|
|
||||||
>下载
|
|
||||||
</a-button>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<!-- 表单区域 -->
|
|
||||||
<HealthUserStationExModal @register="registerDrawer" @success="handleSuccess" />
|
|
||||||
<!-- 重置密码 -->
|
|
||||||
<RestPass @register="restPassModal" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" name="system-healthUserStationEx" setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { BasicTable, TableAction } from '/@/components/Table';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { useDrawer } from '/@/components/Drawer';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import HealthUserStationExModal from './components/HealthUserStationExModal.vue';
|
|
||||||
import RestPass from '../restPass/RestPass.vue';
|
|
||||||
import { columns, searchFormSchema } from './HealthUserStationEx.data';
|
|
||||||
import { batchDelete, deleteOne, getExportUrl, getImportUrl, list, resEditData } from './HealthUserStationEx.api';
|
|
||||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
|
||||||
import { lockUser } from '/@/views/system/user/hospitalDoctor/HospitalDoctor.api';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
|
||||||
const checkedKeys = ref<Array<string | number>>([]);
|
|
||||||
//注册model
|
|
||||||
const [restPassModal, { openModal: restPaddModel }] = useModal();
|
|
||||||
//注册table数据
|
|
||||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
title: 'health_user_station_ex',
|
|
||||||
api: list,
|
|
||||||
columns,
|
|
||||||
canResize: false,
|
|
||||||
formConfig: {
|
|
||||||
//labelWidth: 120,
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: true,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 220,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
exportConfig: {
|
|
||||||
name: '驻场人员',
|
|
||||||
url: getExportUrl,
|
|
||||||
},
|
|
||||||
importConfig: {
|
|
||||||
url: getImportUrl,
|
|
||||||
success: handleSuccess,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增事件
|
|
||||||
*/
|
|
||||||
function handleAdd() {
|
|
||||||
openDrawer(true, {
|
|
||||||
isUpdate: false,
|
|
||||||
showFooter: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 重置密码
|
|
||||||
function restPass(record) {
|
|
||||||
restPaddModel(true, {
|
|
||||||
record: record.id,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: false,
|
|
||||||
type: '新增',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 编辑事件
|
|
||||||
*/
|
|
||||||
function handleEdit(record: Recordable) {
|
|
||||||
resEditData({ id: record.id }).then((res) => {
|
|
||||||
let data = { ...res.sysUserModel, ...res.healthUserStationEx };
|
|
||||||
openDrawer(true, {
|
|
||||||
record: data,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: true,
|
|
||||||
type: '编辑',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情
|
|
||||||
*/
|
|
||||||
function handleDetail(record: Recordable) {
|
|
||||||
resEditData({ id: record.id }).then((res) => {
|
|
||||||
let data = { ...res.sysUserModel, ...res.healthUserStationEx };
|
|
||||||
openDrawer(true, {
|
|
||||||
record: data,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: false,
|
|
||||||
type: '详情',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除事件
|
|
||||||
*/
|
|
||||||
async function handleDelete(record) {
|
|
||||||
await deleteOne({ id: record.id }, handleSuccess);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除事件
|
|
||||||
*/
|
|
||||||
async function batchHandleDelete() {
|
|
||||||
if (selectedRowKeys.value.length === 0) {
|
|
||||||
return message.warning('未选中任何数据');
|
|
||||||
}
|
|
||||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 成功回调
|
|
||||||
*/
|
|
||||||
function handleSuccess() {
|
|
||||||
(selectedRowKeys.value = []) && reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作栏
|
|
||||||
*/
|
|
||||||
function getTableAction(record) {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: '编辑',
|
|
||||||
onClick: handleEdit.bind(null, record),
|
|
||||||
auth: 'system:health_user_station_ex:edit',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '详情',
|
|
||||||
onClick: handleDetail.bind(null, record),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '删除',
|
|
||||||
onClick: handleDelete.bind(null, record),
|
|
||||||
auth: 'system:health_user_station_ex:delete',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
// 1 锁定用户 2 激活用户
|
|
||||||
async function handleUserOpt(record, type) {
|
|
||||||
const params = {
|
|
||||||
userId: record.id,
|
|
||||||
status: type,
|
|
||||||
};
|
|
||||||
await lockUser(params, type, handleSuccess);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 下拉操作栏
|
|
||||||
*/
|
|
||||||
function getDropDownAction(record) {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: '重置密码',
|
|
||||||
onClick: restPass.bind(null, record),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '锁定用户',
|
|
||||||
auth: 'system:user:frozen',
|
|
||||||
onClick: handleUserOpt.bind(null, record, 2),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '激活用户',
|
|
||||||
auth: 'system:user:frozen',
|
|
||||||
onClick: handleUserOpt.bind(null, record, 1),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="min-height: 400px">
|
|
||||||
<BasicForm @register="registerForm" />
|
|
||||||
<div v-if="!formDisabled" style="width: 100%; text-align: center">
|
|
||||||
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { BasicForm, useForm } from '/@/components/Form';
|
|
||||||
import { computed, defineComponent } from 'vue';
|
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
import { propTypes } from '/@/utils/propTypes';
|
|
||||||
import { getBpmFormSchema } from '../HealthUserStationEx.data';
|
|
||||||
import { queryByIdUrl, saveOrUpdate } from '../HealthUserStationEx.api';
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
name: 'HealthUserStationExForm',
|
|
||||||
components: {
|
|
||||||
BasicForm,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
formData: propTypes.object.def({}),
|
|
||||||
formBpm: propTypes.bool.def(true),
|
|
||||||
},
|
|
||||||
setup(props) {
|
|
||||||
const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({
|
|
||||||
labelWidth: 150,
|
|
||||||
schemas: getBpmFormSchema(props.formData),
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
});
|
|
||||||
|
|
||||||
const formDisabled = computed(() => {
|
|
||||||
if (props.formData.disabled === false) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
let formData = {};
|
|
||||||
async function initFormData() {
|
|
||||||
let params = { id: props.formData.dataId };
|
|
||||||
const data = await defHttp.get({ url: queryByIdUrl, params });
|
|
||||||
formData = { ...data };
|
|
||||||
//设置表单的值
|
|
||||||
await setFieldsValue(formData);
|
|
||||||
//默认是禁用
|
|
||||||
await setProps({ disabled: formDisabled.value });
|
|
||||||
}
|
|
||||||
|
|
||||||
async function submitForm() {
|
|
||||||
let data = getFieldsValue();
|
|
||||||
let params = Object.assign({}, formData, data);
|
|
||||||
await saveOrUpdate(params, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
initFormData();
|
|
||||||
|
|
||||||
return {
|
|
||||||
registerForm,
|
|
||||||
formDisabled,
|
|
||||||
submitForm,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -1,110 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicDrawer
|
|
||||||
:maskClosable="false"
|
|
||||||
:title="title"
|
|
||||||
:width="adaptiveWidth"
|
|
||||||
:showFooter="showFooter"
|
|
||||||
destroyOnClose
|
|
||||||
v-bind="$attrs"
|
|
||||||
@ok="handleSubmit"
|
|
||||||
@register="registerDrawer"
|
|
||||||
>
|
|
||||||
<BasicForm @register="registerForm" />
|
|
||||||
</BasicDrawer>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { computed, ref, unref } from 'vue';
|
|
||||||
import { BasicForm, useForm } from '/@/components/Form';
|
|
||||||
import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
|
|
||||||
import { formSchema } from '../HealthUserStationEx.data';
|
|
||||||
import { saveOrUpdate } from '../HealthUserStationEx.api';
|
|
||||||
import { useDrawerAdaptiveWidth } from '/@/hooks/jeecg/useAdaptiveWidth';
|
|
||||||
const { adaptiveWidth } = useDrawerAdaptiveWidth();
|
|
||||||
// Emits声明
|
|
||||||
const emit = defineEmits(['register', 'success']);
|
|
||||||
const isUpdate = ref<boolean>(true);
|
|
||||||
const showFooter = ref<boolean>(true);
|
|
||||||
//设置标题
|
|
||||||
const title = ref(String);
|
|
||||||
//表单配置
|
|
||||||
const [registerForm, { setProps, resetFields, setFieldsValue, validate, clearValidate, updateSchema }] = useForm({
|
|
||||||
//labelWidth: 150,
|
|
||||||
schemas: formSchema,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
});
|
|
||||||
formSchema[0].componentProps.onOptionsChange = (options) => {
|
|
||||||
onSelectHospital(options);
|
|
||||||
};
|
|
||||||
//表单赋值
|
|
||||||
const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
|
|
||||||
//重置表单
|
|
||||||
await resetFields();
|
|
||||||
setDrawerProps({
|
|
||||||
confirmLoading: false,
|
|
||||||
showCancelBtn: !!data?.showFooter,
|
|
||||||
showOkBtn: !!data?.showFooter,
|
|
||||||
});
|
|
||||||
isUpdate.value = !!data?.isUpdate;
|
|
||||||
showFooter.value = data.showFooter;
|
|
||||||
title.value = data.type;
|
|
||||||
if (unref(isUpdate)) {
|
|
||||||
//表单赋值
|
|
||||||
await setFieldsValue({
|
|
||||||
...data.record,
|
|
||||||
});
|
|
||||||
await updateSchema([
|
|
||||||
{
|
|
||||||
field: 'password',
|
|
||||||
ifShow: false,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
await clearValidate();
|
|
||||||
} else {
|
|
||||||
await updateSchema([
|
|
||||||
{
|
|
||||||
field: 'password',
|
|
||||||
ifShow: true,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
// 隐藏底部时禁用整个表单
|
|
||||||
setProps({ disabled: !data?.showFooter });
|
|
||||||
});
|
|
||||||
|
|
||||||
//表单提交事件
|
|
||||||
async function handleSubmit(v) {
|
|
||||||
try {
|
|
||||||
let values = await validate();
|
|
||||||
setDrawerProps({ confirmLoading: true });
|
|
||||||
//提交表单
|
|
||||||
await saveOrUpdate(values, isUpdate.value);
|
|
||||||
//关闭弹窗
|
|
||||||
closeDrawer();
|
|
||||||
//刷新列表
|
|
||||||
emit('success');
|
|
||||||
} finally {
|
|
||||||
setDrawerProps({ confirmLoading: false });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 选择医院名称
|
|
||||||
async function onSelectHospital(options) {
|
|
||||||
await setFieldsValue({
|
|
||||||
hospitalName: options[0]['label'],
|
|
||||||
hospitalId: options[0]['value'],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
/** 时间和数字输入框样式 */
|
|
||||||
:deep(.ant-input-number) {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-calendar-picker) {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,184 +0,0 @@
|
|||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
||||||
import { getPhysicalHospitalsList } from '/@/views/system/user/user.api';
|
|
||||||
import { checkPassword } from '/@/hooks/checkPassword/checkPassword';
|
|
||||||
|
|
||||||
//列表数据
|
|
||||||
export const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '用户账号',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'username',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'realname',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '医院',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'hospitalName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '账号类型',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'pType_dictText',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '账号状态',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'status_dictText',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
//查询数据
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '用户账号',
|
|
||||||
field: 'username',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'realname',
|
|
||||||
label: '姓名',
|
|
||||||
width: 150,
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '医院',
|
|
||||||
field: 'hospitalId',
|
|
||||||
component: 'ApiSelect',
|
|
||||||
componentProps: {
|
|
||||||
api: getPhysicalHospitalsList,
|
|
||||||
resultField: 'list',
|
|
||||||
labelField: 'hospitalName',
|
|
||||||
valueField: 'hospitalId',
|
|
||||||
immediate: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '账号类型',
|
|
||||||
field: 'pType',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
options: [
|
|
||||||
{ label: '医院检查医生', value: '10' },
|
|
||||||
{ label: '医院管理员', value: '9' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'status',
|
|
||||||
label: '账号状态',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
dictCode: 'hospital_status',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
//表单数据
|
|
||||||
export const formSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '所属医院',
|
|
||||||
field: 'hospitalId',
|
|
||||||
component: 'ApiSelect',
|
|
||||||
componentProps: {
|
|
||||||
api: getPhysicalHospitalsList,
|
|
||||||
resultField: 'list',
|
|
||||||
labelField: 'hospitalName',
|
|
||||||
valueField: 'hospitalId',
|
|
||||||
immediate: true,
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
},
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '账号类型',
|
|
||||||
field: 'pType',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
options: [
|
|
||||||
{ label: '医院检查医生', value: '10' },
|
|
||||||
{ label: '医院管理员', value: '9' },
|
|
||||||
],
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
},
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '用户账号',
|
|
||||||
field: 'username',
|
|
||||||
component: 'Input',
|
|
||||||
componentProps: {
|
|
||||||
autocomplete: 'off',
|
|
||||||
},
|
|
||||||
dynamicRules: ({ model }) => {
|
|
||||||
return [{ required: !model.id, message: '请输入账号' }];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '密码',
|
|
||||||
field: 'password',
|
|
||||||
component: 'StrengthMeter',
|
|
||||||
componentProps: {
|
|
||||||
autocomplete: 'new-password',
|
|
||||||
readOnly: true,
|
|
||||||
onfocus: (field) => {
|
|
||||||
field.target.readOnly = false;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dynamicRules: ({ model }) => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
required: !model.id,
|
|
||||||
validator: (_, value) => {
|
|
||||||
let { message } = checkPassword(value);
|
|
||||||
if (message === 'ok') {
|
|
||||||
return Promise.resolve();
|
|
||||||
} else {
|
|
||||||
return Promise.reject(message);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
field: 'realname',
|
|
||||||
component: 'Input',
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '账号状态',
|
|
||||||
field: 'status',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
type: 'radio',
|
|
||||||
dictCode: 'hospital_status',
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
},
|
|
||||||
dynamicRules: ({ model }) => {
|
|
||||||
return [{ required: model.id, message: '请选择账号状态' }];
|
|
||||||
},
|
|
||||||
ifShow: ({ values }) => {
|
|
||||||
return values.id;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// TODO 主键隐藏字段,目前写死为ID
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'id',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程表单调用这个方法获取formSchema
|
|
||||||
* @param param
|
|
||||||
*/
|
|
||||||
export function getBpmFormSchema(_formData): FormSchema[] {
|
|
||||||
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
|
||||||
return formSchema;
|
|
||||||
}
|
|
||||||
@@ -1,223 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<!--引用表格-->
|
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
|
||||||
<template #customSlot="{ model, field }">
|
|
||||||
<a-input v-model:value="model[field]" />
|
|
||||||
</template>
|
|
||||||
<!--插槽:table标题-->
|
|
||||||
<template #tableTitle>
|
|
||||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined" v-auth="'medical:medical_hospital_user:add'">
|
|
||||||
新增
|
|
||||||
</a-button>
|
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
v-auth="'medical:medical_hospital_user:deleteBatch'"
|
|
||||||
@click="batchHandleDelete"
|
|
||||||
preIcon="ant-design:delete-outlined"
|
|
||||||
>
|
|
||||||
批量删除
|
|
||||||
</a-button>
|
|
||||||
</template>
|
|
||||||
<!--操作栏-->
|
|
||||||
<template #action="{ record }">
|
|
||||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
|
||||||
</template>
|
|
||||||
<!--字段回显插槽-->
|
|
||||||
<template #htmlSlot="{ text }">
|
|
||||||
<div v-html="text"></div>
|
|
||||||
</template>
|
|
||||||
<template #fileSlot="{ text }">
|
|
||||||
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
|
|
||||||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)"
|
|
||||||
>下载
|
|
||||||
</a-button>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<!-- 表单区域 -->
|
|
||||||
<HealthUserStationExModal @register="registerModal" @success="handleSuccess" />
|
|
||||||
<CheckPageTable ref="pageTableRef" @register="registerCheckTable" @success="handleSuccess" />
|
|
||||||
<!-- 重置密码 -->
|
|
||||||
<RestPass @register="restPassModal" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" name="system-hospitalDoctor" setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { BasicTable, TableAction } from '/@/components/Table';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import HealthUserStationExModal from './components/HospitalDoctorModal.vue';
|
|
||||||
import CheckPageTable from './components/checkPageTable/CheckPageTable.vue';
|
|
||||||
import { columns, searchFormSchema } from './HospitalDoctor.data';
|
|
||||||
import { batchDelete, deleteOne, list, lockUser, configuredLists } from './HospitalDoctor.api';
|
|
||||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
import RestPass from '../restPass/RestPass.vue';
|
|
||||||
|
|
||||||
//注册model
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
|
||||||
const [restPassModal, { openModal: restPaddModel }] = useModal();
|
|
||||||
const [registerCheckTable, { openModal: openHosModal }] = useModal();
|
|
||||||
const pageTableRef = ref();
|
|
||||||
//注册table数据
|
|
||||||
const { prefixCls, tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
title: 'hospitalDoctor',
|
|
||||||
api: list,
|
|
||||||
columns,
|
|
||||||
canResize: false,
|
|
||||||
formConfig: {
|
|
||||||
// labelWidth: 80,
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 220,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增事件
|
|
||||||
*/
|
|
||||||
function handleAdd() {
|
|
||||||
openModal(true, {
|
|
||||||
isUpdate: false,
|
|
||||||
showFooter: true,
|
|
||||||
type: '新增',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑事件
|
|
||||||
*/
|
|
||||||
function handleEdit(record: Recordable) {
|
|
||||||
openModal(true, {
|
|
||||||
record,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: true,
|
|
||||||
type: '编辑',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情
|
|
||||||
*/
|
|
||||||
function handleDetail(record: Recordable) {
|
|
||||||
openModal(true, {
|
|
||||||
record,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: false,
|
|
||||||
type: '详情',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除事件
|
|
||||||
*/
|
|
||||||
async function handleDelete(record) {
|
|
||||||
await deleteOne({ id: record.id }, handleSuccess);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除事件
|
|
||||||
*/
|
|
||||||
async function batchHandleDelete() {
|
|
||||||
if (selectedRowKeys.value.length === 0) {
|
|
||||||
return message.warning('未选中任何数据');
|
|
||||||
}
|
|
||||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 成功回调
|
|
||||||
*/
|
|
||||||
function handleSuccess() {
|
|
||||||
(selectedRowKeys.value = []) && reload();
|
|
||||||
}
|
|
||||||
async function handleExamination(record) {
|
|
||||||
const params = {
|
|
||||||
doctorId: record.userId,
|
|
||||||
};
|
|
||||||
const res = await configuredLists(params);
|
|
||||||
openHosModal(true, {
|
|
||||||
record,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: false,
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
pageTableRef.value && pageTableRef?.value?.updateSource(res);
|
|
||||||
}, 200);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 操作栏
|
|
||||||
*/
|
|
||||||
function getTableAction(record) {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: '编辑',
|
|
||||||
onClick: handleEdit.bind(null, record),
|
|
||||||
auth: 'medical:medical_hospital_user:edit',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '配置体检项',
|
|
||||||
onClick: handleExamination.bind(null, record),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
// 重置密码
|
|
||||||
function restPass(record) {
|
|
||||||
restPaddModel(true, {
|
|
||||||
record: record.userId,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: false,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 1 锁定用户 2 激活用户
|
|
||||||
async function handleUserOpt(record, type) {
|
|
||||||
const params = {
|
|
||||||
userId: record.userId,
|
|
||||||
status: type,
|
|
||||||
};
|
|
||||||
await lockUser(params, type, handleSuccess);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 下拉操作栏
|
|
||||||
*/
|
|
||||||
function getDropDownAction(record) {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: '详情',
|
|
||||||
onClick: handleDetail.bind(null, record),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '删除',
|
|
||||||
onClick: handleDelete.bind(null, record),
|
|
||||||
auth: 'medical:medical_hospital_user:delete',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '重置密码',
|
|
||||||
onClick: restPass.bind(null, record),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '锁定用户',
|
|
||||||
auth: 'system:user:frozen',
|
|
||||||
onClick: handleUserOpt.bind(null, record, 2),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '激活用户',
|
|
||||||
auth: 'system:user:frozen',
|
|
||||||
onClick: handleUserOpt.bind(null, record, 1),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="min-height: 400px">
|
|
||||||
<BasicForm @register="registerForm" />
|
|
||||||
<div v-if="!formDisabled" style="width: 100%; text-align: center">
|
|
||||||
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { BasicForm, useForm } from '/@/components/Form';
|
|
||||||
import { computed, defineComponent } from 'vue';
|
|
||||||
import { propTypes } from '/@/utils/propTypes';
|
|
||||||
import { getBpmFormSchema } from '../HospitalDoctor.data';
|
|
||||||
import { saveOrUpdate } from '../HospitalDoctor.api';
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
name: 'HealthUserStationExForm',
|
|
||||||
components: {
|
|
||||||
BasicForm,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
formData: propTypes.object.def({}),
|
|
||||||
formBpm: propTypes.bool.def(true),
|
|
||||||
},
|
|
||||||
setup(props) {
|
|
||||||
const [registerForm, { getFieldsValue }] = useForm({
|
|
||||||
labelWidth: 150,
|
|
||||||
schemas: getBpmFormSchema(props.formData),
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
});
|
|
||||||
|
|
||||||
const formDisabled = computed(() => {
|
|
||||||
if (props.formData.disabled === false) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
let formData = {};
|
|
||||||
|
|
||||||
async function submitForm() {
|
|
||||||
let data = getFieldsValue();
|
|
||||||
let params = Object.assign({}, formData, data);
|
|
||||||
await saveOrUpdate(params, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
|
||||||
registerForm,
|
|
||||||
formDisabled,
|
|
||||||
submitForm,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicModal :title="title" :width="800" destroyOnClose v-bind="$attrs" @ok="handleSubmit" @register="registerModal">
|
|
||||||
<BasicForm @register="registerForm" />
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { computed, ref, unref } from 'vue';
|
|
||||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
||||||
import { BasicForm, useForm } from '/@/components/Form';
|
|
||||||
import { formSchema } from '../HospitalDoctor.data';
|
|
||||||
import { saveOrUpdate } from '../HospitalDoctor.api';
|
|
||||||
import { dealParams } from '/@/views/system/user/user.data';
|
|
||||||
// Emits声明
|
|
||||||
const emit = defineEmits(['register', 'success']);
|
|
||||||
const isUpdate = ref(true);
|
|
||||||
//设置标题
|
|
||||||
const title = ref(String);
|
|
||||||
//表单配置
|
|
||||||
const [registerForm, { setProps, resetFields, setFieldsValue, validate, updateSchema, clearValidate }] = useForm({
|
|
||||||
//labelWidth: 150,
|
|
||||||
schemas: formSchema,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
});
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
|
||||||
//重置表单
|
|
||||||
await resetFields();
|
|
||||||
setModalProps({ confirmLoading: false, showCancelBtn: !!data?.showFooter, showOkBtn: !!data?.showFooter });
|
|
||||||
isUpdate.value = !!data?.isUpdate;
|
|
||||||
title.value = data.type;
|
|
||||||
if (unref(isUpdate)) {
|
|
||||||
//表单赋值
|
|
||||||
await setFieldsValue({
|
|
||||||
...data.record,
|
|
||||||
});
|
|
||||||
await clearValidate();
|
|
||||||
}
|
|
||||||
updateSchema([
|
|
||||||
{ field: 'username', ifShow: !unref(isUpdate) },
|
|
||||||
{ field: 'password', ifShow: !unref(isUpdate) },
|
|
||||||
{ field: 'hospitalId', dynamicDisabled: unref(isUpdate) },
|
|
||||||
{ field: 'pType', dynamicDisabled: unref(isUpdate) },
|
|
||||||
]);
|
|
||||||
// 隐藏底部时禁用整个表单
|
|
||||||
setProps({ disabled: !data?.showFooter });
|
|
||||||
});
|
|
||||||
//表单提交事件
|
|
||||||
async function handleSubmit() {
|
|
||||||
try {
|
|
||||||
let values = await validate();
|
|
||||||
setModalProps({ confirmLoading: true });
|
|
||||||
//提交表单
|
|
||||||
await saveOrUpdate(dealParams(values), isUpdate.value);
|
|
||||||
//关闭弹窗
|
|
||||||
closeModal();
|
|
||||||
//刷新列表
|
|
||||||
emit('success');
|
|
||||||
} finally {
|
|
||||||
setModalProps({ confirmLoading: false });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
/** 时间和数字输入框样式 */
|
|
||||||
:deep(.ant-input-number) {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-calendar-picker) {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-71
@@ -1,71 +0,0 @@
|
|||||||
import { BasicColumn } from '/@/components/Table';
|
|
||||||
import { FormSchema } from '/@/components/Table';
|
|
||||||
//列表数据
|
|
||||||
export const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '体检项名称',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'itemName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '体检项类型',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'checkItemType_dictText',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
//查询数据
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '体检项目名称',
|
|
||||||
field: 'itemName',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '体检项类型',
|
|
||||||
field: 'checkItemType',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: {
|
|
||||||
dictCode: 'check_item_type',
|
|
||||||
},
|
|
||||||
// colProps: { span: 8 },
|
|
||||||
},
|
|
||||||
];
|
|
||||||
//表单数据
|
|
||||||
export const formSchema: FormSchema[] = [
|
|
||||||
// TODO 主键隐藏字段,目前写死为ID
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'id',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
// 配置体检项数据
|
|
||||||
|
|
||||||
// 列表数据
|
|
||||||
export const TransferColumns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '体检项名称',
|
|
||||||
align: 'center',
|
|
||||||
key: 'checkItemName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '体检项类型',
|
|
||||||
align: 'center',
|
|
||||||
key: 'checkItemType_dictText',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
key: 'action',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 流程表单调用这个方法获取formSchema
|
|
||||||
* @param _formData
|
|
||||||
*/
|
|
||||||
export function getBpmFormSchema(_formData): FormSchema[] {
|
|
||||||
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
|
||||||
return formSchema;
|
|
||||||
}
|
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="1200" @ok="handleSubmit" @cancel="cancel">
|
|
||||||
<div class="configuration-module">
|
|
||||||
<BasicTable class="self-table" @register="registerTable" @row-click="(record) => handleCheck(record)">
|
|
||||||
<template #tableTitle>
|
|
||||||
<span class="title-span">点击行添加到体检项中</span>
|
|
||||||
</template>
|
|
||||||
<!--操作栏-->
|
|
||||||
<template #action="{ record }">
|
|
||||||
<div class="operation-box">
|
|
||||||
<div v-if="checkList[record.id]" class="operation add-row">√</div>
|
|
||||||
<div v-else class="operation elete-row"></div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<transfer-table
|
|
||||||
ref="transferTableRef"
|
|
||||||
:key="transferTableKey"
|
|
||||||
:columns="TransferColumns"
|
|
||||||
:dataSource="dataSource"
|
|
||||||
class="transfer-table"
|
|
||||||
@deleteItem="handleRemoveCheck"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
||||||
import { BasicTable } from '/@/components/Table';
|
|
||||||
import { columns, searchFormSchema, TransferColumns } from './CheckPackageTable.data';
|
|
||||||
import { selectHosList, saveSelectHosApi } from '../../HospitalDoctor.api';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import TransferTable from './TransferTable.vue';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
|
|
||||||
// Emits声明
|
|
||||||
const emit = defineEmits(['register', 'success']);
|
|
||||||
const title = ref('配置体检项');
|
|
||||||
const hosId = ref();
|
|
||||||
const doctorId = ref();
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
|
||||||
let { hospitalId, userId } = data.record;
|
|
||||||
hosId.value = hospitalId;
|
|
||||||
doctorId.value = userId;
|
|
||||||
});
|
|
||||||
//注册table数据
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: selectHosList,
|
|
||||||
columns,
|
|
||||||
canResize: false,
|
|
||||||
formConfig: {
|
|
||||||
labelAlign: 'right',
|
|
||||||
// labelWidth: 100,
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
labelCol: {
|
|
||||||
style: '100px',
|
|
||||||
},
|
|
||||||
baseColProps: {
|
|
||||||
xs: 8,
|
|
||||||
sm: 8,
|
|
||||||
md: 8,
|
|
||||||
lg: 8,
|
|
||||||
xl: 12,
|
|
||||||
xxl: 8,
|
|
||||||
},
|
|
||||||
actionColOptions: {
|
|
||||||
span: 24,
|
|
||||||
offset: 0,
|
|
||||||
xs: 8,
|
|
||||||
sm: 8,
|
|
||||||
md: 8,
|
|
||||||
lg: 8,
|
|
||||||
xl: 12,
|
|
||||||
xxl: 8,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params['hospitalId'] = hosId.value;
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 120,
|
|
||||||
fixed: 'right',
|
|
||||||
title: '选中',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, {}, {}] = tableContext;
|
|
||||||
const transferTableRef = ref();
|
|
||||||
const transferTableKey = ref(true);
|
|
||||||
const dataSource = ref([]);
|
|
||||||
const checkList = ref({});
|
|
||||||
|
|
||||||
function updateSource(res: []) {
|
|
||||||
dataSource.value.push(...res);
|
|
||||||
if (res) {
|
|
||||||
res.map((item) => {
|
|
||||||
checkList.value[item.checkItemId] = item;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 表单提交事件
|
|
||||||
function clearDataSource() {
|
|
||||||
dataSource.value = [];
|
|
||||||
checkList.value = {};
|
|
||||||
transferTableRef.value.updateDataSource([]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function cancel() {
|
|
||||||
clearDataSource();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleSubmit() {
|
|
||||||
try {
|
|
||||||
const selectIds = transferTableRef.value.emitDataSource();
|
|
||||||
// if (selectIds === '') {
|
|
||||||
// return message.warning('请选择体检配置项');
|
|
||||||
// }
|
|
||||||
const params = {
|
|
||||||
...selectIds,
|
|
||||||
doctorId: doctorId.value,
|
|
||||||
};
|
|
||||||
setModalProps({ confirmLoading: true });
|
|
||||||
// 提交
|
|
||||||
await saveSelectHosApi(params);
|
|
||||||
} finally {
|
|
||||||
setModalProps({ confirmLoading: false });
|
|
||||||
clearDataSource();
|
|
||||||
//刷新列表
|
|
||||||
emit('success');
|
|
||||||
//关闭弹窗
|
|
||||||
closeModal();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleCheck(record) {
|
|
||||||
if (!checkList.value.hasOwnProperty(record.itemId)) {
|
|
||||||
checkList.value[record.itemId] = record;
|
|
||||||
(dataSource.value as any).push({
|
|
||||||
...record,
|
|
||||||
checkItemName: record.itemName,
|
|
||||||
checkItemId: record.itemId,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
handleRemoveCheck({ ...record, checkItemId: record.itemId });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleRemoveCheck(record) {
|
|
||||||
delete checkList.value[record.checkItemId];
|
|
||||||
dataSource.value = dataSource.value.filter((item) => item.checkItemId !== record.checkItemId);
|
|
||||||
transferTableRef.value.updateDataSource(dataSource.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
updateSource,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.configuration-module {
|
|
||||||
display: flex;
|
|
||||||
height: 70vh;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-table-title) {
|
|
||||||
//display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.self-table {
|
|
||||||
width: 70%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.transfer-table {
|
|
||||||
width: 30%;
|
|
||||||
border: 1px solid #f0f0f0;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.add-row) {
|
|
||||||
width: 100px;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #1890ff;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.delete-row) {
|
|
||||||
width: 100px;
|
|
||||||
//opacity: 0; cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-span {
|
|
||||||
color: red;
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.operation-box {
|
|
||||||
margin-left: 40%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.operation {
|
|
||||||
width: 21px;
|
|
||||||
height: 21px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border: 1px solid #d9d9d9;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div class="panel-header">
|
|
||||||
<p class="panel-title"> 体检项已选 </p>
|
|
||||||
</div>
|
|
||||||
<a-table :dataSource="transferState.dataSource" :columns="transferState.columns">
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.key === 'action'">
|
|
||||||
<a @click="deleteItem(record)">删除</a>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
{{ record[column.key] }}
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</a-table>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
columns: Array,
|
|
||||||
dataSource: Array,
|
|
||||||
});
|
|
||||||
const emits = defineEmits(['deleteItem']);
|
|
||||||
const transferState = ref({
|
|
||||||
columns: props.columns,
|
|
||||||
// dataSource: computed(() => props.dataSource),
|
|
||||||
dataSource: props.dataSource,
|
|
||||||
});
|
|
||||||
|
|
||||||
function updateDataSource(data) {
|
|
||||||
transferState.value.dataSource = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
function emitDataSource() {
|
|
||||||
return {
|
|
||||||
selectIds: transferState.value.dataSource?.map((item) => item?.checkItemId).join(',') || '',
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function deleteItem(record) {
|
|
||||||
emits('deleteItem', record);
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
updateDataSource,
|
|
||||||
emitDataSource,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.panel-header {
|
|
||||||
background-color: #fafafa;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
height: 48px;
|
|
||||||
line-height: 48px;
|
|
||||||
padding: 0 15px;
|
|
||||||
border-bottom: 1px solid #e7eaec !important;
|
|
||||||
border-top-right-radius: 3px;
|
|
||||||
border-top-left-radius: 3px;
|
|
||||||
|
|
||||||
.panel-title {
|
|
||||||
height: 48px;
|
|
||||||
line-height: 48px;
|
|
||||||
color: #333;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -4,12 +4,8 @@ import { rules } from '/@/utils/helper/validator';
|
|||||||
import { render } from '/@/utils/common/renderUtils';
|
import { render } from '/@/utils/common/renderUtils';
|
||||||
import { Component, h } from 'vue';
|
import { Component, h } from 'vue';
|
||||||
import HealthUserEmployeeEx from './HealthUserEmployeeEx/HealthUserEmployeeExList.vue';
|
import HealthUserEmployeeEx from './HealthUserEmployeeEx/HealthUserEmployeeExList.vue';
|
||||||
import healthUserOperatorEx from './healthUserOperatorEx/HealthUserOperatorExList.vue';
|
|
||||||
import healthUserStationEx from './healthUserStationEx/HealthUserStationExList.vue';
|
|
||||||
import healthOperatorEx from './healthOperatorEx/healthOperatorExList.vue';
|
|
||||||
import healthExpert from '/@/views/consult/doctor/message/conDoctorList.vue';
|
import healthExpert from '/@/views/consult/doctor/message/conDoctorList.vue';
|
||||||
import healthHelper from '/@/views/consult/helper/conHelperList.vue';
|
import healthHelper from '/@/views/consult/helper/conHelperList.vue';
|
||||||
import hospitalDoctor from './hospitalDoctor/HospitalDoctorList.vue';
|
|
||||||
import { encipher } from '/@/utils/jsencrypt';
|
import { encipher } from '/@/utils/jsencrypt';
|
||||||
import { checkPassword } from '/@/hooks/checkPassword/checkPassword';
|
import { checkPassword } from '/@/hooks/checkPassword/checkPassword';
|
||||||
import { isShowIdCard } from '/@/utils/getEnv';
|
import { isShowIdCard } from '/@/utils/getEnv';
|
||||||
@@ -674,30 +670,6 @@ export const typeList: UserType[] = [
|
|||||||
component: healthHelper,
|
component: healthHelper,
|
||||||
auth: 'system:consultation:con_helper:list',
|
auth: 'system:consultation:con_helper:list',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
title: '操作人员',
|
|
||||||
component: healthOperatorEx,
|
|
||||||
auth: 'system:health_operator_ex:list',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 5,
|
|
||||||
title: '专业人员',
|
|
||||||
component: healthUserOperatorEx,
|
|
||||||
auth: 'system:health_user_operator_ex:list',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// key: 6,
|
|
||||||
// title: '驻场人员',
|
|
||||||
// component: healthUserStationEx,
|
|
||||||
// auth: 'system:health_user_station_ex:list',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// key: 7,
|
|
||||||
// title: '体检医院',
|
|
||||||
// component: hospitalDoctor,
|
|
||||||
// auth: 'medical:medical_hospital_user:list',
|
|
||||||
// },
|
|
||||||
];
|
];
|
||||||
/**
|
/**
|
||||||
* @Description:处理请求参数
|
* @Description:处理请求参数
|
||||||
|
|||||||
Reference in New Issue
Block a user