Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,53 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div ref="chartRef" v-if="!loading" :style="{ width, height }" style="margin: 10px 0"></div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { Ref, ref } from 'vue';
|
|
||||||
import { useECharts } from '/@/hooks/web/useECharts';
|
|
||||||
|
|
||||||
const chartRef = ref<HTMLDivElement | null>(null);
|
|
||||||
const { setOptions, resize, getInstance } = useECharts(chartRef as Ref<HTMLDivElement>);
|
|
||||||
const props = defineProps({
|
|
||||||
loading: Boolean,
|
|
||||||
width: {
|
|
||||||
type: String as PropType<string>,
|
|
||||||
default: '100%',
|
|
||||||
},
|
|
||||||
height: {
|
|
||||||
type: String as PropType<string>,
|
|
||||||
default: '350px',
|
|
||||||
},
|
|
||||||
data: {
|
|
||||||
type: Array,
|
|
||||||
default: () => [],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
function setData(name, value) {
|
|
||||||
setOptions({
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: name,
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
data: value,
|
|
||||||
type: 'line',
|
|
||||||
smooth: true,
|
|
||||||
label: {
|
|
||||||
show: true, // 显示标签
|
|
||||||
position: 'top', // 标签显示在点的上方
|
|
||||||
color: '#37a2da', // 标签颜色
|
|
||||||
fontSize: 12, // 标签字体大小
|
|
||||||
formatter: '{c}人', // 标签格式,{c}表示当前点的值
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
defineExpose({
|
|
||||||
setData,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="all-box" ref="wrapRef">
|
|
||||||
<BasicModal v-bind="$attrs" :getContainer="() => wrapRef" @register="registerModal" :footer="false" :title="title" width="60%">
|
|
||||||
<template #title>
|
|
||||||
<div class="basic-title">{{ title }}</div>
|
|
||||||
</template>
|
|
||||||
<div>
|
|
||||||
<div class="infomation">
|
|
||||||
<div v-for="(item, index) in titleInfo" :key="index">
|
|
||||||
{{ item.name }}{{ item.year ? `(${item.year})` : '' }}:{{ item.value }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<LineCharts ref="lineCharts" :data="dataSource"></LineCharts>
|
|
||||||
<div class="info-table">
|
|
||||||
<a-table :columns="columns" :dataSource="dataSource" :pagination="false" :scroll="{ y: 300 }" bordered></a-table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</BasicModal>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
||||||
import LineCharts from '/@/views/archivesManage/components/lineCharts.vue';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
const width = ref();
|
|
||||||
const title = ref('');
|
|
||||||
const lineCharts = ref();
|
|
||||||
const wrapRef = ref(null);
|
|
||||||
const columns = ref(getColumns('体检人数'));
|
|
||||||
const dataSource = ref([]);
|
|
||||||
const titleInfo = ref();
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
|
||||||
title.value = data.title;
|
|
||||||
titleInfo.value = data.titleInfo;
|
|
||||||
dataSource.value = data.dataSource;
|
|
||||||
columns.value = getColumns(data.sumsName);
|
|
||||||
lineCharts.value.setData(data.chartsName, data.chartsValue);
|
|
||||||
});
|
|
||||||
function getColumns(name) {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
dataIndex: 'index',
|
|
||||||
align: 'center',
|
|
||||||
customRender: ({ index }) => {
|
|
||||||
return index + 1;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '年份',
|
|
||||||
dataIndex: 'year',
|
|
||||||
align: 'center',
|
|
||||||
key: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '体检人数',
|
|
||||||
dataIndex: 'sums',
|
|
||||||
align: 'center',
|
|
||||||
key: 'age',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.infomation {
|
|
||||||
display: flex;
|
|
||||||
div {
|
|
||||||
width: 20%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.info-table {
|
|
||||||
padding: 0 8%;
|
|
||||||
}
|
|
||||||
.all-box {
|
|
||||||
background: red;
|
|
||||||
:deep(.ant-modal-header) {
|
|
||||||
background: #b4c7e7 !important;
|
|
||||||
}
|
|
||||||
.basic-title {
|
|
||||||
font-weight: bold !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,236 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div :class="[props.mapType === '0' ? 'outer-map' : 'outer-map-1']" ref="outerMap">
|
|
||||||
<div id="container" style="position: relative">
|
|
||||||
<BasicDrawer
|
|
||||||
@register="registerDrawer"
|
|
||||||
get-container="#container"
|
|
||||||
:title="props.drawerTitle"
|
|
||||||
:width="props.drawerWidth"
|
|
||||||
style="position: relative"
|
|
||||||
>
|
|
||||||
<slot name="mapDrawer" v-bind="{ data: record }"></slot>
|
|
||||||
</BasicDrawer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
|
||||||
import mapKey from '/@/utils/mapKey';
|
|
||||||
import BasicDrawer from '/@/components/Drawer/src/BasicDrawer.vue';
|
|
||||||
import { useDrawer } from '/@/components/Drawer';
|
|
||||||
import { onMounted, ref, watch } from 'vue';
|
|
||||||
import building from '/@/assets/images/archivesManage/building.png';
|
|
||||||
import { mapApi } from '/@/views/archivesManage/institution/institutionInfomation/depart/depart.api';
|
|
||||||
|
|
||||||
const [registerDrawer, { openDrawer, closeDrawer, getVisible }] = useDrawer();
|
|
||||||
|
|
||||||
const outerMap = ref();
|
|
||||||
const record = ref({});
|
|
||||||
|
|
||||||
let BasicMap = null;
|
|
||||||
let SelfMap = null;
|
|
||||||
const props = defineProps({
|
|
||||||
mapList: {
|
|
||||||
type: Array<any>,
|
|
||||||
default: () => [],
|
|
||||||
},
|
|
||||||
centerPosition: {
|
|
||||||
type: Array<any>,
|
|
||||||
default: () => [108.95, 34.33],
|
|
||||||
},
|
|
||||||
drawerTitle: {
|
|
||||||
type: String,
|
|
||||||
default: () => '单位信息',
|
|
||||||
},
|
|
||||||
drawerWidth: {
|
|
||||||
type: Number,
|
|
||||||
default: () => 500,
|
|
||||||
},
|
|
||||||
selectValue: {
|
|
||||||
type: String,
|
|
||||||
default: () => '{}',
|
|
||||||
},
|
|
||||||
filed: {
|
|
||||||
type: String,
|
|
||||||
default: () => 'name',
|
|
||||||
},
|
|
||||||
mapType: {
|
|
||||||
type: String,
|
|
||||||
default: () => '0',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.mapList,
|
|
||||||
(nV) => {
|
|
||||||
if (SelfMap) {
|
|
||||||
addMarker(nV);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
function initMap(mapList) {
|
|
||||||
AMapLoader.load({
|
|
||||||
key: mapKey, // 申请好的Web端开发者Key,首次调用 load 时必填
|
|
||||||
// version: '1.4.15', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
||||||
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
||||||
plugins: ['AMap.Geocoder'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
|
||||||
})
|
|
||||||
.then((AMap) => {
|
|
||||||
SelfMap = AMap;
|
|
||||||
let lng = [];
|
|
||||||
let lat = [];
|
|
||||||
mapList.map((item: any) => {
|
|
||||||
lng.push(item.longitude * 1);
|
|
||||||
lat.push(item.latitude * 1);
|
|
||||||
});
|
|
||||||
let centerPosition = props.centerPosition;
|
|
||||||
if (mapList.length === 1) {
|
|
||||||
centerPosition = [lng[0], lat[0]];
|
|
||||||
} else {
|
|
||||||
centerPosition = getCenter(
|
|
||||||
lng.sort((a, b) => {
|
|
||||||
return a - b;
|
|
||||||
}),
|
|
||||||
lat.sort((a, b) => {
|
|
||||||
return a - b;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
//设置地图容器id
|
|
||||||
BasicMap = new AMap.Map('container', {
|
|
||||||
viewMode: '3D', //是否为3D地图模式
|
|
||||||
zoom: 6, //初始化地图级别
|
|
||||||
center: centerPosition, //初始化地图中心点位置
|
|
||||||
resizeEnable: true,
|
|
||||||
});
|
|
||||||
addMarker(mapList);
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectInfo(v) {
|
|
||||||
try {
|
|
||||||
if (v && Object.keys(JSON.parse(v)).length > 0) {
|
|
||||||
const { longitude, latitude } = JSON.parse(v);
|
|
||||||
record.value = JSON.parse(v);
|
|
||||||
if (getVisible) {
|
|
||||||
closeDrawer();
|
|
||||||
openDrawer(true, {
|
|
||||||
record: JSON.parse(v),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (latitude && latitude) {
|
|
||||||
let lngLat = new SelfMap.LngLat(longitude, latitude);
|
|
||||||
BasicMap.setCenter(lngLat);
|
|
||||||
BasicMap.setZoom(12);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let markerList = [];
|
|
||||||
function addMarker(list) {
|
|
||||||
removeMarker();
|
|
||||||
if (list.length === 0) return;
|
|
||||||
let marker = null;
|
|
||||||
markerList = list.map((item: any) => {
|
|
||||||
marker = new SelfMap.Marker({
|
|
||||||
position: new SelfMap.LngLat(item.longitude * 1, item.latitude * 1),
|
|
||||||
icon: new SelfMap.Icon({
|
|
||||||
image: building,
|
|
||||||
size: new SelfMap.Size(0, 0), //图标大小
|
|
||||||
imageSize: new SelfMap.Size(0, 0),
|
|
||||||
}),
|
|
||||||
// icon: medicalResource,
|
|
||||||
label: {
|
|
||||||
content: `<div style="display: flex">
|
|
||||||
<img src="${building}" style="height: 15px;width: 15px" alt=""/>
|
|
||||||
<div>${item[props.filed]}</div>
|
|
||||||
</div>`,
|
|
||||||
icon: null,
|
|
||||||
offset: new SelfMap.Pixel(0, 27),
|
|
||||||
direction: 'top',
|
|
||||||
},
|
|
||||||
maxZoom: 8,
|
|
||||||
});
|
|
||||||
marker.info = item;
|
|
||||||
marker.on('click', markerClick);
|
|
||||||
return marker;
|
|
||||||
});
|
|
||||||
BasicMap.add(markerList);
|
|
||||||
}
|
|
||||||
function getCenter(lng, lat) {
|
|
||||||
let lngCenter = (lng[0] + lng[lng.length - 1]) / 2;
|
|
||||||
let latCenter = (lat[0] + lat[lat.length - 1]) / 2;
|
|
||||||
return [lngCenter, latCenter];
|
|
||||||
// let centerLngLat = new SelfMap.LngLat(lngCenter, latCenter);
|
|
||||||
// BasicMap.setCenter(centerLngLat); // 设置地图中心点坐标
|
|
||||||
}
|
|
||||||
function markerClick(e) {
|
|
||||||
record.value = e.target.info;
|
|
||||||
openDrawer(true, {
|
|
||||||
record: e.target.info,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeMarker() {
|
|
||||||
for (let i = 0; i < markerList.length; i++) {
|
|
||||||
markerList[i].setMap(null);
|
|
||||||
}
|
|
||||||
markerList = []; // 清空数组
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
selectInfo,
|
|
||||||
initMap,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.outer-map {
|
|
||||||
position: absolute;
|
|
||||||
left: 10px;
|
|
||||||
width: calc(100% - 20px);
|
|
||||||
height: calc(100% - 115px);
|
|
||||||
top: 105px;
|
|
||||||
}
|
|
||||||
.outer-map-1 {
|
|
||||||
position: absolute;
|
|
||||||
left: 10px;
|
|
||||||
width: calc(100% - 20px);
|
|
||||||
height: calc(100% - 175px);
|
|
||||||
top: 165px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#container {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
:deep(.ant-drawer) {
|
|
||||||
position: absolute !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-drawer-header) {
|
|
||||||
background-color: #b4c7e7;
|
|
||||||
}
|
|
||||||
:deep(.jeecg-basic-title) {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.amap-marker-label) {
|
|
||||||
background-color: #58a55c !important;
|
|
||||||
padding: 5px 10px !important;
|
|
||||||
border-radius: 5px !important;
|
|
||||||
color: #ffffff !important;
|
|
||||||
border-color: #58a55c !important;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-drawer-content-wrapper) {
|
|
||||||
height: 90%;
|
|
||||||
margin-top: 2.5%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<template>
|
|
||||||
<safekeeping type="4" />
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import Safekeeping from '/@/views/archivesManage/employee/archiveFlow/safekeeping/safekeeping.vue';
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less"></style>
|
|
||||||
@@ -1,338 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicModal @register="registerModal" title="新增流动员工" width="96%" v-bind="$attrs">
|
|
||||||
<div class="body-inner">
|
|
||||||
<div style="">
|
|
||||||
<div style="padding: 10px 10px 0; font-weight: bold; font-size: 16px">搜索员工</div>
|
|
||||||
<BasicTable @register="registerTable" table-type="1" :row-selection="rowSelection" @selectionChange="changeSelection" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div style="padding: 10px 0; font-weight: bold; font-size: 16px">已选员工</div>
|
|
||||||
<div style="flex: 1; background-color: #f8f8f8; overflow: auto; padding: 10px">
|
|
||||||
<div class="list-item head">
|
|
||||||
<div style="width: 50px">序号</div>
|
|
||||||
<div style="flex: 1">单位</div>
|
|
||||||
<div style="flex: 1">部门</div>
|
|
||||||
<div style="flex: 1">员工编号</div>
|
|
||||||
<div style="width: 80px">姓名</div>
|
|
||||||
<div style="width: 60px">性别</div>
|
|
||||||
<div style="width: 60px">年龄</div>
|
|
||||||
<div style="width: 60px">操作</div>
|
|
||||||
</div>
|
|
||||||
<div class="list-item body" v-for="(item, index) in rows" :key="`data-list-${index}`">
|
|
||||||
<div style="width: 50px">{{ index + 1 }}</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.secondDepart || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.secondDepart || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.thirdDepart || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.thirdDepart || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.workNo || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.workNo || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 80px">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.realname || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.realname || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 60px">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.sex_dictText || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.sex_dictText || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 60px">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.age || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.age || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 60px"><span @click="delItem(index)" style="cursor: pointer; color: #5473e8">移除</span></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="padding: 0 0 10px">
|
|
||||||
<div style="padding: 10px 0; font-weight: bold; font-size: 16px"> 选择转往部门 </div>
|
|
||||||
部门:<a-select
|
|
||||||
v-model:value="toOrgCode"
|
|
||||||
placeholder="请选择转往部门"
|
|
||||||
style="width: 230px"
|
|
||||||
:disabled="!showTipInfo"
|
|
||||||
:show-search="true"
|
|
||||||
ref="selectRef"
|
|
||||||
@focus="focusSelect"
|
|
||||||
>
|
|
||||||
<template v-if="fetchIng" #notFoundContent>
|
|
||||||
<div style="padding: 20px 0 10px; text-align: center">
|
|
||||||
<a-spin />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-for="(item, index) in deptList" :key="`dept-${index}`">
|
|
||||||
<a-select-option :value="item?.orgCode"> {{ item?.departName }}</a-select-option>
|
|
||||||
</template>
|
|
||||||
</a-select>
|
|
||||||
<div style="text-align: center; padding: 40px 0 5px">
|
|
||||||
<div
|
|
||||||
style="color: #fe8802; display: flex; justify-content: center; padding: 0 0 10px 0"
|
|
||||||
v-if="!showTipInfo && rows.length > 0"
|
|
||||||
>
|
|
||||||
<div style="background-color: #fff3e5; padding: 2px 5px; display: flex; align-items: center">
|
|
||||||
<img :src="tipPng" alt="" style="width: 20px; height: 20px" />
|
|
||||||
当前已选择员工中存在不同的单位,无法进行批量转入单位操作,请重新进行选择
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a-button type="primary" @click="submitInfo" :loading="buttonLoading">确认流动</a-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicModal from '/@/components/Modal/src/BasicModal.vue';
|
|
||||||
import { useModalInner } from '/@/components/Modal';
|
|
||||||
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { computed, nextTick, onMounted, ref } from 'vue';
|
|
||||||
import { userListApi } from '/@/views/archivesManage/employee/archiveFlow/safekeeping/safekeeping.api';
|
|
||||||
import { employeeColumns, employeeSearchSchema } from '/@/views/archivesManage/employee/archiveFlow/safekeeping/safekeeping.data';
|
|
||||||
import tipPng from '/@/assets/images/insideModal/tip.png';
|
|
||||||
import { getThirdDepartsNew } from '/@/utils/orgSearchInfo';
|
|
||||||
import { changeApi } from '/@/views/archivesManage/employee/archiveFlow/inside/inside.api';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
|
|
||||||
const keys = ref<any[]>([]);
|
|
||||||
const rows = ref<any[]>([]);
|
|
||||||
const selectRef = ref();
|
|
||||||
const toOrgCode = ref(null);
|
|
||||||
const deptList = ref([]);
|
|
||||||
const fetchIng = ref(true);
|
|
||||||
const buttonLoading = ref(false);
|
|
||||||
|
|
||||||
const emit = defineEmits(['success']);
|
|
||||||
|
|
||||||
const showTipInfo = computed(() => {
|
|
||||||
let orgCodes: any[] = [];
|
|
||||||
for (let i = 0; i < rows.value.length; i++) {
|
|
||||||
let org = rows.value[i]?.orgCode.substring(0, 6);
|
|
||||||
if (!orgCodes.includes(org)) {
|
|
||||||
orgCodes.push(org);
|
|
||||||
}
|
|
||||||
if (orgCodes.length > 1) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (orgCodes.length === 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(() => {
|
|
||||||
toOrgCode.value = null;
|
|
||||||
rows.value = [];
|
|
||||||
keys.value = [];
|
|
||||||
selectedRowKeys.value = [];
|
|
||||||
getForm().resetFields();
|
|
||||||
reload({ page: 1 });
|
|
||||||
buttonLoading.value = false;
|
|
||||||
setModalProps({ showOkBtn: false, showCancelBtn: false });
|
|
||||||
});
|
|
||||||
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
title: '工具管理列表',
|
|
||||||
api: userListApi,
|
|
||||||
columns: employeeColumns,
|
|
||||||
immediate: false,
|
|
||||||
canResize: false,
|
|
||||||
showIndexColumn: true,
|
|
||||||
clearSelectOnPageChange: false,
|
|
||||||
formConfig: {
|
|
||||||
schemas: employeeSearchSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
labelWidth: 70,
|
|
||||||
submitFunc: async () => {
|
|
||||||
selectedRowKeys.value = keys.value;
|
|
||||||
selectedRows.value = rows.value;
|
|
||||||
await reload({ page: 1 });
|
|
||||||
},
|
|
||||||
baseColProps: {
|
|
||||||
xs: 24,
|
|
||||||
sm: 24,
|
|
||||||
md: 24,
|
|
||||||
lg: 12,
|
|
||||||
xl: 12,
|
|
||||||
xxl: 12,
|
|
||||||
},
|
|
||||||
actionColOptions: {
|
|
||||||
span: 24,
|
|
||||||
offset: 0,
|
|
||||||
style: {
|
|
||||||
marginLeft: '70px',
|
|
||||||
},
|
|
||||||
xs: 12,
|
|
||||||
sm: 12,
|
|
||||||
md: 12,
|
|
||||||
lg: 8,
|
|
||||||
xl: 8,
|
|
||||||
xxl: 8,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 200,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
nextTick(() => {
|
|
||||||
selectRef.value && selectRef.value.focus(() => focusSelect());
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function focusSelect() {
|
|
||||||
console.log(showTipInfo.value);
|
|
||||||
if (!showTipInfo.value) return;
|
|
||||||
fetchIng.value = true;
|
|
||||||
getThirdDepartsNew({ idOrCode: rows.value[0]?.orgCode.substring(0, 6) })
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
deptList.value = res;
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
fetchIng.value = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeSelection(v) {
|
|
||||||
toOrgCode.value = null;
|
|
||||||
rows.value = v.rows;
|
|
||||||
keys.value = v.keys;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function submitInfo() {
|
|
||||||
try {
|
|
||||||
if (keys.value.length === 0) return message.warn('请至少选择一个员工');
|
|
||||||
if (showTipInfo.value) return message.warn('当前已选择员工中存在不同的单位,无法进行批量转入单位操作,请重新进行选择');
|
|
||||||
if (!toOrgCode.value) return message.warn('请选择转往部门');
|
|
||||||
buttonLoading.value = true;
|
|
||||||
await changeApi({ targetOrgCode: toOrgCode.value, userIds: keys.value });
|
|
||||||
emit('success');
|
|
||||||
closeModal();
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
} finally {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function delItem(index: any) {
|
|
||||||
keys.value.splice(index, 1);
|
|
||||||
keys.value = [...keys.value];
|
|
||||||
rows.value.splice(index, 1);
|
|
||||||
rows.value = [...rows.value];
|
|
||||||
selectedRowKeys.value = keys.value;
|
|
||||||
selectedRows.value = rows.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
const [registerTable, { reload, getForm }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.body-inner {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
> div {
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
padding: 0 10px;
|
|
||||||
width: 50%;
|
|
||||||
&:nth-child(1) {
|
|
||||||
border-right: 1px dashed #cecece;
|
|
||||||
}
|
|
||||||
&:nth-child(2) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.jeecg-basic-table) {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-table-wrapper) {
|
|
||||||
flex: 1;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-table-title) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.list-item) {
|
|
||||||
border-left: 1px solid #bdbdbd;
|
|
||||||
background-color: #ffffff;
|
|
||||||
display: flex;
|
|
||||||
> div {
|
|
||||||
border-bottom: 1px solid #bdbdbd;
|
|
||||||
border-right: 1px solid #bdbdbd;
|
|
||||||
text-align: center;
|
|
||||||
padding: 5px 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.list-item) {
|
|
||||||
border-left: 1px solid #f0f0f0;
|
|
||||||
background-color: #ffffff;
|
|
||||||
display: flex;
|
|
||||||
> div {
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
text-align: center;
|
|
||||||
padding: 10px 5px;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
word-break: keep-all;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.head {
|
|
||||||
border-top: 1px solid #f0f0f0;
|
|
||||||
font-weight: bold;
|
|
||||||
position: sticky;
|
|
||||||
z-index: 99;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,150 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<BasicTables @register="registerTable" @goAdd="addInside" @go-export="exportExcel" task-code="userChangeInteriorTaskCode">
|
|
||||||
<template #btnTop>
|
|
||||||
<div class="btn-top-d">
|
|
||||||
本月流动人员数量:<span>{{ topInfo?.currentMonth }}</span> 上月流动人员数量:<span>{{ topInfo?.lastMonth }}</span>
|
|
||||||
本年流动人员数量:<span>{{ topInfo?.currentYear }}</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.dataIndex === 'infoEdit'">
|
|
||||||
<a-button @click="editInfo(record)" type="link">信息修改</a-button>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTables>
|
|
||||||
<div class="inside-modal" ref="outer">
|
|
||||||
<inside-modal @register="registerModal" :getContainer="outer" @success="handleSuccess" />
|
|
||||||
</div>
|
|
||||||
<UserEditModal @register="registerModal1" @success="handleSuccess" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicTables from '/@/components/Table/src/BasicTables.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { columns, searchSchema } from '/@/views/archivesManage/employee/archiveFlow/inside/inside.data';
|
|
||||||
import InsideModal from '/@/views/archivesManage/employee/archiveFlow/inside/components/insideModal.vue';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import UserEditModal from '/@/views/archivesManage/employee/basicInfo/components/userEditModal.vue';
|
|
||||||
import { getByIdApi, listApi, statApi } from '/@/views/archivesManage/employee/archiveFlow/inside/inside.api';
|
|
||||||
import { userInfoExportApi } from '/@/views/information/employeeInformation/basicInformation/database/database.api';
|
|
||||||
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
|
||||||
const [registerModal1, { openModal: openUserModal }] = useModal();
|
|
||||||
|
|
||||||
const outer = ref();
|
|
||||||
const topInfo = ref({
|
|
||||||
currentMonth: 0,
|
|
||||||
currentYear: 0,
|
|
||||||
lastMonth: 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
function exportExcel() {
|
|
||||||
let form = getForm().getFieldsValue();
|
|
||||||
let optionConfig = {
|
|
||||||
exportConfig: {
|
|
||||||
name: '长庆油田员工名册',
|
|
||||||
url: userInfoExportApi,
|
|
||||||
params: { ...form, isXlsx: true },
|
|
||||||
},
|
|
||||||
};
|
|
||||||
onExportXls(optionConfig);
|
|
||||||
}
|
|
||||||
|
|
||||||
const { tableContext, onExportXls } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: listApi,
|
|
||||||
pageTitle: '长庆油田内部流动员工',
|
|
||||||
columns,
|
|
||||||
canResize: false,
|
|
||||||
btnArr: ['edit', 'delete', 'exportRecord'],
|
|
||||||
btnArrText: { add: '新增流动员工', search: '列表查询', export: '信息导出', print: '信息打印' },
|
|
||||||
formConfig: {
|
|
||||||
schemas: searchSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [['timeInfo', ['timeStart', 'timeEnd']]],
|
|
||||||
},
|
|
||||||
showIndexColumn: true,
|
|
||||||
indexColumnProps: {
|
|
||||||
dataIndex: 'listIndex',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 120,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
statApi({})
|
|
||||||
.then((res) => {
|
|
||||||
topInfo.value = { ...topInfo.value, ...res };
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function addInside() {
|
|
||||||
openModal(true, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
const [registerTable, { getForm, reload }, {}] = tableContext;
|
|
||||||
|
|
||||||
function handleSuccess() {
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
function editInfo(record: Recordable) {
|
|
||||||
getByIdApi({ userId: record?.userId })
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
openUserModal(true, {
|
|
||||||
record: { ...res, secondDepart: record?.oldSecondDepart, thirdDepart: record?.oldThirdDepart },
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.btn-top-d {
|
|
||||||
padding: 15px 10px;
|
|
||||||
border-radius: 7px;
|
|
||||||
font-size: 15px;
|
|
||||||
background: #ffffff;
|
|
||||||
|
|
||||||
> span {
|
|
||||||
color: #5087ec;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.inside-modal {
|
|
||||||
:deep(.ant-modal) {
|
|
||||||
top: 10px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-modal-footer) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-modal-body) {
|
|
||||||
height: calc(100vh - 80px);
|
|
||||||
overflow: hidden;
|
|
||||||
.scrollbar__view {
|
|
||||||
height: 100%;
|
|
||||||
> div {
|
|
||||||
height: 100% !important;
|
|
||||||
min-height: 100% !important;
|
|
||||||
max-height: 100% !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
list = '/health-system/archives/userDepartChange/interior/page',
|
|
||||||
change = '/health-system/archives/userDepartChange/interior/change',
|
|
||||||
stat = '/health-system/archives/userDepartChange/interior/stat',
|
|
||||||
getById = '/health-system/user/info/getById',
|
|
||||||
}
|
|
||||||
|
|
||||||
export const listApi = (params) => defHttp.get({ url: Api.list, params });
|
|
||||||
export const statApi = (params) => defHttp.get({ url: Api.stat, params });
|
|
||||||
export const changeApi = (params) => defHttp.post({ url: Api.change, params });
|
|
||||||
export const getByIdApi = (params) => defHttp.get({ url: Api.getById, params });
|
|
||||||
@@ -1,176 +0,0 @@
|
|||||||
// @ts-ignore
|
|
||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
||||||
import { allSecondaryDepartsNew, getThirdDepartsNew, orgSearchInfo } from '/@/utils/orgSearchInfo';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
import { render } from '/@/utils/common/renderUtils';
|
|
||||||
|
|
||||||
export const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '单位',
|
|
||||||
dataIndex: 'oldSecondDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '原部门',
|
|
||||||
dataIndex: 'oldThirdDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '员工编号',
|
|
||||||
dataIndex: 'workNo',
|
|
||||||
width: 110,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
dataIndex: 'realName',
|
|
||||||
width: 90,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '性别',
|
|
||||||
dataIndex: 'sex',
|
|
||||||
width: 70,
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return render.renderDict(text, 'sex2');
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '年龄',
|
|
||||||
dataIndex: 'age',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '流动时间',
|
|
||||||
dataIndex: 'createTime',
|
|
||||||
width: 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '转往部门',
|
|
||||||
dataIndex: 'newThirdDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作人员',
|
|
||||||
dataIndex: 'applyUserName',
|
|
||||||
width: 90,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '信息修改',
|
|
||||||
dataIndex: 'infoEdit',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const searchSchema: FormSchema[] = [
|
|
||||||
// {
|
|
||||||
// label: '单位',
|
|
||||||
// field: 'orgCode1',
|
|
||||||
// component: 'ApiSelect',
|
|
||||||
// componentProps: ({ formModel }) => {
|
|
||||||
// return {
|
|
||||||
// api: allSecondaryDepartsNew,
|
|
||||||
// resultField: 'result',
|
|
||||||
// labelField: 'departName',
|
|
||||||
// valueField: 'orgCode',
|
|
||||||
// placeholder: '请选择单位',
|
|
||||||
// showSearch: true,
|
|
||||||
// showDefaultValue: false,
|
|
||||||
// filterOption: (input: string, option: any): boolean => {
|
|
||||||
// const str: string = input.trim().toLowerCase();
|
|
||||||
// return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
// },
|
|
||||||
// onChange: () => {
|
|
||||||
// formModel['orgCode2'] = '';
|
|
||||||
// },
|
|
||||||
// onDeselect: () => {
|
|
||||||
// formModel['orgCode1'] = '';
|
|
||||||
// formModel['orgCode2'] = '';
|
|
||||||
// formModel['orgCode'] = '';
|
|
||||||
// },
|
|
||||||
// getPopupContainer: () => document.body,
|
|
||||||
// };
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '原部门',
|
|
||||||
// field: 'oldOrgCode',
|
|
||||||
// component: 'ApiSelect',
|
|
||||||
// componentProps: ({ formModel }) => {
|
|
||||||
// return {
|
|
||||||
// api: getThirdDepartsNew,
|
|
||||||
// resultField: 'list',
|
|
||||||
// labelField: 'departName',
|
|
||||||
// valueField: 'orgCode',
|
|
||||||
// placeholder: '请选择部门',
|
|
||||||
// showSearch: true,
|
|
||||||
// showDefaultValue: false,
|
|
||||||
// getPopupContainer: () => document.body,
|
|
||||||
// params: {
|
|
||||||
// idOrCode: formModel['orgCode1'] || 'xasd',
|
|
||||||
// },
|
|
||||||
// onFocus: () => {
|
|
||||||
// if (!formModel['orgCode1']) {
|
|
||||||
// return message.warn('请先选择单位!');
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// filterOption: (input: string, option: any): boolean => {
|
|
||||||
// const str: string = input.trim().toLowerCase();
|
|
||||||
// return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
// },
|
|
||||||
// };
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
...orgSearchInfo({ orgField: 'orgCode1', deptName: '原部门', deptFiled: 'orgCode2', orgCode: 'oldOrgCode' }),
|
|
||||||
{
|
|
||||||
label: '转往部门',
|
|
||||||
field: 'newOrgCode',
|
|
||||||
component: 'ApiSelect',
|
|
||||||
componentProps: ({ formModel }) => {
|
|
||||||
return {
|
|
||||||
api: getThirdDepartsNew,
|
|
||||||
resultField: 'list',
|
|
||||||
labelField: 'departName',
|
|
||||||
valueField: 'orgCode',
|
|
||||||
placeholder: '请选择部门',
|
|
||||||
showSearch: true,
|
|
||||||
showDefaultValue: false,
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
params: {
|
|
||||||
idOrCode: formModel['orgCode1'] || 'xasd',
|
|
||||||
},
|
|
||||||
onFocus: () => {
|
|
||||||
if (!formModel['orgCode1']) {
|
|
||||||
return message.warn('请先选择原单位!');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
filterOption: (input: string, option: any): boolean => {
|
|
||||||
const str: string = input.trim().toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '员工编号',
|
|
||||||
field: 'workNo',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
field: 'name',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '性别',
|
|
||||||
field: 'sex',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({ dictCode: 'sex2' }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '流动时间',
|
|
||||||
field: 'timeInfo',
|
|
||||||
component: 'RangeDate',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
format: 'YYYY-MM-DD',
|
|
||||||
valueFormat: 'YYYY-MM-DD',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
@@ -1,559 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicModal @register="registerModal" title="新增流动员工" width="96%" class="inside-modal">
|
|
||||||
<div class="body-inner">
|
|
||||||
<div style="">
|
|
||||||
<div style="padding: 10px 10px 0; font-weight: bold; font-size: 16px">当前待处理员工</div>
|
|
||||||
<BasicTable @register="registerTable" table-type="1" :row-selection="rowSelection" @selectionChange="changeSelection" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div style="padding: 10px 0; font-weight: bold; font-size: 16px">已选员工</div>
|
|
||||||
<div style="flex: 1; background-color: #f8f8f8; overflow: auto; padding: 10px">
|
|
||||||
<template v-if="props.activeValue === '0'">
|
|
||||||
<div class="list-item head">
|
|
||||||
<div style="width: 50px">序号</div>
|
|
||||||
<div style="flex: 1">原单位</div>
|
|
||||||
<div style="flex: 1">原部门</div>
|
|
||||||
<div style="flex: 1">员工编号</div>
|
|
||||||
<div style="width: 80px">姓名</div>
|
|
||||||
<div style="width: 60px">性别</div>
|
|
||||||
<div style="width: 60px">年龄</div>
|
|
||||||
<div style="flex: 1">请求转入单位</div>
|
|
||||||
<div style="width: 60px">操作</div>
|
|
||||||
</div>
|
|
||||||
<div class="list-item body" v-for="(item, index) in rows" :key="`data-list-${index}`">
|
|
||||||
<div style="width: 50px">{{ index + 1 }}</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.oldSecondDepart || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.oldSecondDepart || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.oldThirdDepart || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.oldThirdDepart || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.workNo || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.workNo || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 80px">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.realName || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.realName || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 60px">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ getName(item?.sex, Dict.getDict('sex2')) || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ getName(item?.sex, Dict.getDict('sex2')) || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 60px">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.age || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.age || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.newSecondDepart || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.newSecondDepart || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 60px"><span @click="delItem(index)" style="cursor: pointer; color: #5473e8">移除</span></div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-else>
|
|
||||||
<div class="list-item head">
|
|
||||||
<div style="width: 60px">序号</div>
|
|
||||||
<div style="flex: 1">单位</div>
|
|
||||||
<div style="flex: 1">部门</div>
|
|
||||||
<div style="flex: 1">员工编号</div>
|
|
||||||
<div style="width: 80px">姓名</div>
|
|
||||||
<div style="width: 60px">性别</div>
|
|
||||||
<div style="width: 60px">年龄</div>
|
|
||||||
<div style="flex: 1">职位</div>
|
|
||||||
<div style="width: 60px">操作</div>
|
|
||||||
</div>
|
|
||||||
<div class="list-item body" v-for="(item, index) in rows" :key="`data-list-${index}`">
|
|
||||||
<div style="width: 60px">{{ index + 1 }}</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.secondDepart || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.secondDepart || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.thirdDepart || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.thirdDepart || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.workNo || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.workNo || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 80px">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.realname || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.realname || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 60px">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.sex_dictText || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.sex_dictText || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 60px">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.age || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.age || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.empJob_dictText || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.empJob_dictText || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 60px"><span @click="delItem(index)" style="cursor: pointer; color: #5473e8">移除</span></div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<template v-if="props.activeValue === '0'">
|
|
||||||
<div style="padding: 0 0 10px">
|
|
||||||
<div style="padding: 10px 0; font-weight: bold; font-size: 16px"> 接收操作 </div>
|
|
||||||
<a-radio-group v-model:value="radioValue" style="width: 100%">
|
|
||||||
<div style="display: flex">
|
|
||||||
<div style="width: 50%">
|
|
||||||
<a-radio value="1">审查无问题,同意接收转入</a-radio>
|
|
||||||
</div>
|
|
||||||
<div style="width: 50%">
|
|
||||||
<a-radio value="2">审查有问题,拒绝接收转入</a-radio>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-radio-group>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="padding: 0 0 10px" v-if="radioValue === '2'">
|
|
||||||
<div style="padding: 10px 0; font-weight: bold; font-size: 16px"> 填写拒绝原因 </div>
|
|
||||||
<div style="display: flex">
|
|
||||||
<div style="width: 85px">拒绝原因:</div><a-textarea v-model:value="reasonText" placeholder="请输入拒绝原因" :rows="5" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="padding: 0 0 10px">
|
|
||||||
<template v-if="radioValue === '1'">
|
|
||||||
<div style="padding: 10px 0; font-weight: bold; font-size: 16px"> 选择转往部门 </div>
|
|
||||||
<div class="to-org-div" style="padding: 10px 0 40px">
|
|
||||||
<div style="display: flex; align-items: center; padding-top: 2px">
|
|
||||||
<div> 单位: </div>
|
|
||||||
<div style="flex: 1; padding: 0 5px">{{ toOrgCodeName }}</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
部门:<a-select
|
|
||||||
v-model:value="toOrgCode"
|
|
||||||
placeholder="请选择转往部门"
|
|
||||||
style="width: 230px"
|
|
||||||
:disabled="!showTipInfo"
|
|
||||||
:show-search="true"
|
|
||||||
ref="selectRef"
|
|
||||||
@focus="focusSelect"
|
|
||||||
>
|
|
||||||
<template v-if="fetchIng" #notFoundContent>
|
|
||||||
<div style="padding: 20px 0 10px; text-align: center">
|
|
||||||
<a-spin />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-for="(item, index) in deptList" :key="`dept-${index}`">
|
|
||||||
<a-select-option :value="item?.orgCode"> {{ item?.departName }}</a-select-option>
|
|
||||||
</template>
|
|
||||||
</a-select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<div style="text-align: center; padding: 0 0 5px">
|
|
||||||
<div
|
|
||||||
style="color: #fe8802; display: flex; justify-content: center; padding: 0 0 10px 0"
|
|
||||||
v-if="!showTipInfo && rows.length > 0 && radioValue === '1'"
|
|
||||||
>
|
|
||||||
<div style="background-color: #fff3e5; padding: 2px 5px; display: flex; align-items: center">
|
|
||||||
<img :src="tipPng" alt="" style="width: 20px; height: 20px" />
|
|
||||||
当前已选择员工中存在不同的转入单位,无法进行批量转入单位操作,请重新进行选择
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a-button type="primary" @click="submitInfo" :loading="buttonLoading">确认操作</a-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-else>
|
|
||||||
<div style="padding: 10px 0; font-weight: bold; font-size: 16px"> 请选择转出单位 </div>
|
|
||||||
<div style="display: flex; align-items: center">
|
|
||||||
部门:<ApiSelect
|
|
||||||
v-model:value="toOrgCode"
|
|
||||||
:api="allSecondaryDepartsNew"
|
|
||||||
placeholder="请选择单位"
|
|
||||||
resultField="result"
|
|
||||||
labelField="departName"
|
|
||||||
valueField="orgCode"
|
|
||||||
:allowClear="true"
|
|
||||||
:show-default-value="false"
|
|
||||||
:immediate="true"
|
|
||||||
:showSearch="true"
|
|
||||||
:filterOption="
|
|
||||||
(input: string, option: any): boolean => {
|
|
||||||
const str: string = input.toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
}"
|
|
||||||
style="width: 260px"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: center; padding: 10px 0 0">
|
|
||||||
<a-button type="primary" @click="submitInfo1" :loading="buttonLoading">确认操作</a-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicModal from '/@/components/Modal/src/BasicModal.vue';
|
|
||||||
import { useModalInner } from '/@/components/Modal';
|
|
||||||
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { columns1, searchSchemaModal } from '/@/views/archivesManage/employee/archiveFlow/org/org.data';
|
|
||||||
import { ref, computed, nextTick, onMounted } from 'vue';
|
|
||||||
import { acceptApi, listApi, rollOutApi } from '/@/views/archivesManage/employee/archiveFlow/org/org.api';
|
|
||||||
import tipPng from '/@/assets/images/insideModal/tip.png';
|
|
||||||
import { getName } from '/@/views/interveneNew/compoents/utils';
|
|
||||||
import { Dict } from '/@/utils/cache/dict';
|
|
||||||
import { allSecondaryDepartsNew, getThirdDepartsNew } from '/@/utils/orgSearchInfo';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
import ApiSelect from '/@/components/Form/src/components/ApiSelect.vue';
|
|
||||||
import { userListApi } from '/@/views/archivesManage/employee/archiveFlow/safekeeping/safekeeping.api';
|
|
||||||
import { employeeColumns, employeeSearchSchema } from '/@/views/archivesManage/employee/archiveFlow/safekeeping/safekeeping.data';
|
|
||||||
import { FormSchema } from '/@/components/Form';
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
activeValue: {
|
|
||||||
type: String,
|
|
||||||
default: () => '0',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const keys = ref<any[]>([]);
|
|
||||||
const rows = ref<any[]>([]);
|
|
||||||
const deptList = ref([]);
|
|
||||||
const fetchIng = ref(true);
|
|
||||||
const radioValue = ref('0');
|
|
||||||
const reasonText = ref('');
|
|
||||||
const toOrgCode = ref();
|
|
||||||
const selectRef = ref();
|
|
||||||
const buttonLoading = ref(false);
|
|
||||||
|
|
||||||
const emit = defineEmits(['success']);
|
|
||||||
|
|
||||||
const showTipInfo = computed(() => {
|
|
||||||
let orgCodes: any[] = [];
|
|
||||||
for (let i = 0; i < rows.value.length; i++) {
|
|
||||||
let org = rows.value[i]?.newOrgCode;
|
|
||||||
if (!orgCodes.includes(org)) {
|
|
||||||
orgCodes.push(org);
|
|
||||||
}
|
|
||||||
if (orgCodes.length > 1) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (orgCodes.length === 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
const toOrgCodeName = computed(() => {
|
|
||||||
let orgName: any[] = [];
|
|
||||||
rows.value.forEach((item) => {
|
|
||||||
if (!orgName.includes(item?.newSecondDepart)) {
|
|
||||||
orgName.push(item?.newSecondDepart);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return orgName.join(',');
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(() => {
|
|
||||||
setProps({
|
|
||||||
api: props.activeValue === '0' ? listApi : userListApi,
|
|
||||||
columns: props.activeValue === '0' ? columns1 : [...employeeColumns, { title: '职位', dataIndex: 'empJob_dictText' }],
|
|
||||||
});
|
|
||||||
getForm().setProps({
|
|
||||||
schemas: props.activeValue === '0' ? searchSchemaModal : employeeSearchSchema,
|
|
||||||
});
|
|
||||||
toOrgCode.value = null;
|
|
||||||
reasonText.value = '';
|
|
||||||
radioValue.value = '1';
|
|
||||||
rows.value = [];
|
|
||||||
keys.value = [];
|
|
||||||
selectedRowKeys.value = [];
|
|
||||||
getForm().resetFields();
|
|
||||||
reload({ page: 1 });
|
|
||||||
buttonLoading.value = false;
|
|
||||||
setModalProps({ showOkBtn: false, showCancelBtn: false });
|
|
||||||
});
|
|
||||||
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
title: '工具管理列表',
|
|
||||||
api: listApi,
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params['applyStatus'] = '0';
|
|
||||||
},
|
|
||||||
columns: columns1.slice(0, 7),
|
|
||||||
immediate: true,
|
|
||||||
canResize: false,
|
|
||||||
showIndexColumn: true,
|
|
||||||
clearSelectOnPageChange: false,
|
|
||||||
formConfig: {
|
|
||||||
schemas: searchSchemaModal,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
labelWidth: 70,
|
|
||||||
submitFunc: async () => {
|
|
||||||
selectedRowKeys.value = keys.value;
|
|
||||||
selectedRows.value = rows.value;
|
|
||||||
await reload({ page: 1 });
|
|
||||||
},
|
|
||||||
baseColProps: {
|
|
||||||
xs: 24,
|
|
||||||
sm: 24,
|
|
||||||
md: 24,
|
|
||||||
lg: 12,
|
|
||||||
xl: 12,
|
|
||||||
xxl: 12,
|
|
||||||
},
|
|
||||||
actionColOptions: {
|
|
||||||
span: 24,
|
|
||||||
offset: 0,
|
|
||||||
style: {
|
|
||||||
marginLeft: '70px',
|
|
||||||
},
|
|
||||||
xs: 12,
|
|
||||||
sm: 12,
|
|
||||||
md: 12,
|
|
||||||
lg: 8,
|
|
||||||
xl: 8,
|
|
||||||
xxl: 8,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 200,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
nextTick(() => {
|
|
||||||
selectRef.value && selectRef.value.focus(() => focusSelect());
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function focusSelect() {
|
|
||||||
console.log(showTipInfo.value);
|
|
||||||
if (!showTipInfo.value) return;
|
|
||||||
fetchIng.value = true;
|
|
||||||
getThirdDepartsNew({ idOrCode: rows.value[0]?.newOrgCode.substring(0, 6) })
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
deptList.value = res;
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
fetchIng.value = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeSelection(v) {
|
|
||||||
rows.value = v.rows;
|
|
||||||
keys.value = v.keys;
|
|
||||||
}
|
|
||||||
|
|
||||||
function delItem(index: any) {
|
|
||||||
keys.value.splice(index, 1);
|
|
||||||
keys.value = [...keys.value];
|
|
||||||
rows.value.splice(index, 1);
|
|
||||||
rows.value = [...rows.value];
|
|
||||||
selectedRowKeys.value = keys.value;
|
|
||||||
selectedRows.value = rows.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function submitInfo() {
|
|
||||||
if (keys.value.length === 0) return message.warn('请至少选择一个员工');
|
|
||||||
if (radioValue.value === '2' && reasonText.value === '') return message.warn('请填写拒绝原因');
|
|
||||||
|
|
||||||
try {
|
|
||||||
buttonLoading.value = true;
|
|
||||||
await acceptApi({
|
|
||||||
ids: keys.value,
|
|
||||||
targetOrgCode: radioValue.value === '2' ? '' : toOrgCode.value ? toOrgCode.value : rows.value[0]?.newOrgCode,
|
|
||||||
applyStatus: radioValue.value,
|
|
||||||
applyReason: reasonText.value,
|
|
||||||
});
|
|
||||||
|
|
||||||
closeModal();
|
|
||||||
emit('success');
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
} finally {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function submitInfo1() {
|
|
||||||
if (keys.value.length === 0) return message.warn('请至少选择一个员工');
|
|
||||||
if (!toOrgCode.value) return message.warn('请选择转出单位');
|
|
||||||
|
|
||||||
try {
|
|
||||||
buttonLoading.value = true;
|
|
||||||
await rollOutApi({
|
|
||||||
userIds: keys.value,
|
|
||||||
targetOrgCode: toOrgCode.value,
|
|
||||||
});
|
|
||||||
|
|
||||||
closeModal();
|
|
||||||
emit('success');
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
} finally {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const [registerTable, { reload, setProps, getForm }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.body-inner {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
> div {
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
padding: 0 10px;
|
|
||||||
width: 50%;
|
|
||||||
&:nth-child(1) {
|
|
||||||
border-right: 1px dashed #cecece;
|
|
||||||
}
|
|
||||||
&:nth-child(2) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.jeecg-basic-table) {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-table-wrapper) {
|
|
||||||
flex: 1;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-table-title) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.list-item) {
|
|
||||||
border-left: 1px solid #bdbdbd;
|
|
||||||
background-color: #ffffff;
|
|
||||||
display: flex;
|
|
||||||
> div {
|
|
||||||
border-bottom: 1px solid #bdbdbd;
|
|
||||||
border-right: 1px solid #bdbdbd;
|
|
||||||
text-align: center;
|
|
||||||
padding: 5px 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.list-item) {
|
|
||||||
border-left: 1px solid #f0f0f0;
|
|
||||||
background-color: #ffffff;
|
|
||||||
display: flex;
|
|
||||||
> div {
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
text-align: center;
|
|
||||||
padding: 10px 5px;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
word-break: keep-all;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.head {
|
|
||||||
border-top: 1px solid #f0f0f0;
|
|
||||||
font-weight: bold;
|
|
||||||
position: sticky;
|
|
||||||
z-index: 99;
|
|
||||||
}
|
|
||||||
|
|
||||||
.to-org-div {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
> div {
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-select-dropdown) {
|
|
||||||
width: 230px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,172 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicModal @register="registerModal" title="接收操作" width="96%">
|
|
||||||
<div class="body-inner">
|
|
||||||
<div style="display: flex; flex-direction: column">
|
|
||||||
<div style="padding-bottom: 20px">
|
|
||||||
<a-radio-group button-style="solid" v-model:value="radioValue">
|
|
||||||
<a-radio-button value="0">基本信息</a-radio-button>
|
|
||||||
<a-radio-button value="1">健康现状</a-radio-button>
|
|
||||||
<a-radio-button value="2">基本体格</a-radio-button>
|
|
||||||
<a-radio-button value="3">健康检查</a-radio-button>
|
|
||||||
<a-radio-button value="4">个人病史</a-radio-button>
|
|
||||||
<a-radio-button value="5">家族病史</a-radio-button>
|
|
||||||
<a-radio-button value="6">膳食情况</a-radio-button>
|
|
||||||
<a-radio-button value="7">运动情况</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1; overflow: auto">
|
|
||||||
<Tab1 :userInfo="userInfo" edit-type="1" v-if="userInfo && radioValue == 0" />
|
|
||||||
<!-- 2、健康现状 -->
|
|
||||||
<Tab2 :userInfo="userInfo" edit-type="1" v-if="userInfo && radioValue == 1" />
|
|
||||||
<!-- 3、基本体格 -->
|
|
||||||
<Tab3 :userInfo="userInfo" edit-type="1" v-if="userInfo && radioValue == 2" />
|
|
||||||
<!-- 4、健康检查 -->
|
|
||||||
<Tab4 :userInfo="userInfo" edit-type="1" v-if="userInfo && radioValue == 3" />
|
|
||||||
<!-- 5、个人病史 -->
|
|
||||||
<Tab5 :userInfo="userInfo" edit-type="1" v-if="userInfo && radioValue == 4" />
|
|
||||||
<!-- 6、家族病史 -->
|
|
||||||
<Tab6 :userInfo="userInfo" edit-type="1" v-if="userInfo && radioValue == 5" />
|
|
||||||
<!-- 8、运动情况-->
|
|
||||||
<Tab8 :userInfo="userInfo" edit-type="1" v-if="userInfo && radioValue == 7" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="display: flex; flex-direction: column">
|
|
||||||
<div style="flex: 1">
|
|
||||||
<div>
|
|
||||||
<div style="padding: 10px 0; font-weight: bold; font-size: 16px"> 接收操作 </div>
|
|
||||||
<a-radio-group v-model:value="radioValue1" style="width: 100%">
|
|
||||||
<div style="display: flex">
|
|
||||||
<div style="width: 50%">
|
|
||||||
<a-radio value="1">审查无问题,同意接收转入</a-radio>
|
|
||||||
</div>
|
|
||||||
<div style="width: 50%">
|
|
||||||
<a-radio value="2">审查有问题,拒绝接收转入</a-radio>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a-radio-group>
|
|
||||||
</div>
|
|
||||||
<div v-if="radioValue1 === '1'">
|
|
||||||
<div style="padding: 10px 0; font-weight: bold; font-size: 16px"> 请选择转入单位部门 </div>
|
|
||||||
<div style="display: flex">
|
|
||||||
<div style="display: flex; align-items: center; padding-top: 2px; width: 50%">
|
|
||||||
<div> 单位: </div>
|
|
||||||
<div style="flex: 1; padding: 0 5px">{{ orgName }}</div>
|
|
||||||
</div>
|
|
||||||
<div style="width: 50%; display: flex; align-items: center">
|
|
||||||
<div style="width: 60px; text-align: right">部门:</div>
|
|
||||||
<ApiSelect
|
|
||||||
v-model:value="toOrgCode"
|
|
||||||
:api="getThirdDepartsNew"
|
|
||||||
placeholder="请选择部门"
|
|
||||||
resultField="result"
|
|
||||||
labelField="departName"
|
|
||||||
:params="{
|
|
||||||
idOrCode: orgCode,
|
|
||||||
}"
|
|
||||||
valueField="orgCode"
|
|
||||||
:allowClear="true"
|
|
||||||
:show-default-value="false"
|
|
||||||
:immediate="true"
|
|
||||||
:showSearch="true"
|
|
||||||
:filterOption="
|
|
||||||
(input: string, option: any): boolean => {
|
|
||||||
const str: string = input.toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
}"
|
|
||||||
style="width: 260px"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="padding: 0 0 10px" v-else>
|
|
||||||
<div style="padding: 10px 0; font-weight: bold; font-size: 16px"> 填写拒绝原因 </div>
|
|
||||||
<div style="display: flex">
|
|
||||||
<div style="width: 85px">拒绝原因:</div><a-textarea v-model:value="reasonText" placeholder="请输入拒绝原因" :rows="5" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="text-align: center; padding-bottom: 20px">
|
|
||||||
<a-button type="primary" @click="submitInfo" :loading="buttonLoading">确认操作</a-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicModal from '/@/components/Modal/src/BasicModal.vue';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { useModalInner } from '/@/components/Modal';
|
|
||||||
import Tab6 from '/@/views/archivesManage/employee/fileMaintenance/components/tab6.vue';
|
|
||||||
import Tab5 from '/@/views/archivesManage/employee/fileMaintenance/components/tab5.vue';
|
|
||||||
import Tab8 from '/@/views/archivesManage/employee/fileMaintenance/components/tab8.vue';
|
|
||||||
import Tab3 from '/@/views/archivesManage/employee/fileMaintenance/components/tab3.vue';
|
|
||||||
import Tab4 from '/@/views/archivesManage/employee/fileMaintenance/components/tab4.vue';
|
|
||||||
import Tab2 from '/@/views/archivesManage/employee/fileMaintenance/components/tab2.vue';
|
|
||||||
import Tab1 from '/@/views/archivesManage/employee/fileMaintenance/components/tab1.vue';
|
|
||||||
import { acceptApi, getByIdApi } from '/@/views/archivesManage/employee/archiveFlow/org/org.api';
|
|
||||||
import { getThirdDepartsNew } from '/@/utils/orgSearchInfo';
|
|
||||||
import ApiSelect from '/@/components/Form/src/components/ApiSelect.vue';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
|
|
||||||
const emit = defineEmits(['success']);
|
|
||||||
|
|
||||||
const radioValue = ref('0');
|
|
||||||
const userInfo = ref({});
|
|
||||||
const radioValue1 = ref('1');
|
|
||||||
const toOrgCode = ref(null);
|
|
||||||
const buttonLoading = ref(false);
|
|
||||||
const orgName = ref('');
|
|
||||||
const orgCode = ref('');
|
|
||||||
const reasonText = ref('');
|
|
||||||
const id = ref('');
|
|
||||||
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
|
||||||
userInfo.value = { ...(await getByIdApi({ userId: data?.userId })), secondDepart: data?.secondDepart, thirdDepart: data?.thirdDepart };
|
|
||||||
orgName.value = data?.orgName;
|
|
||||||
orgCode.value = data?.orgCode;
|
|
||||||
id.value = data?.id;
|
|
||||||
setModalProps({ showOkBtn: false, showCancelBtn: false });
|
|
||||||
});
|
|
||||||
|
|
||||||
async function submitInfo() {
|
|
||||||
if (radioValue.value === '2' && reasonText.value === '') return message.warn('请填写拒绝原因');
|
|
||||||
|
|
||||||
try {
|
|
||||||
buttonLoading.value = true;
|
|
||||||
await acceptApi({
|
|
||||||
ids: [id.value],
|
|
||||||
targetOrgCode: radioValue.value === '2' ? '' : toOrgCode.value ? toOrgCode.value : orgCode.value,
|
|
||||||
applyStatus: radioValue1.value,
|
|
||||||
applyReason: reasonText.value,
|
|
||||||
});
|
|
||||||
|
|
||||||
closeModal();
|
|
||||||
emit('success');
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
} finally {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.body-inner {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
> div {
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
padding: 0 10px;
|
|
||||||
&:nth-child(1) {
|
|
||||||
width: 60%;
|
|
||||||
border-right: 1px dashed #cecece;
|
|
||||||
}
|
|
||||||
&:nth-child(2) {
|
|
||||||
width: 40%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
|
||||||
const { createConfirm } = useMessage();
|
|
||||||
enum Api {
|
|
||||||
list = '/health-system/archives/userDepartChange/without/accept/page',
|
|
||||||
list2 = '/health-system/archives/userDepartChange/without/rollOut/page',
|
|
||||||
accept = '/health-system/archives/userDepartChange/without/accept',
|
|
||||||
rollOut = '/health-system/archives/userDepartChange/without/rollOut',
|
|
||||||
stat = '/health-system/archives/userDepartChange/without/accept/stat',
|
|
||||||
stat2 = '/health-system/archives/userDepartChange/without/rollOut/numStat',
|
|
||||||
numStat = '/health-system/archives/userDepartChange/without/accept/numStat',
|
|
||||||
getById = '/health-system/user/info/getById',
|
|
||||||
export1 = '/health-system/archives/userDepartChange/without/accept/export',
|
|
||||||
export2 = '/health-system/archives/userDepartChange/without/rollOut/export',
|
|
||||||
cancel = '/health-system/archives/userDepartChange/without/cancel',
|
|
||||||
}
|
|
||||||
|
|
||||||
export const listApi = (params) => defHttp.get({ url: Api.list, params });
|
|
||||||
export const list2Api = (params) => defHttp.get({ url: Api.list2, params });
|
|
||||||
export const statApi = (params) => defHttp.get({ url: Api.stat, params });
|
|
||||||
export const stat2Api = (params) => defHttp.get({ url: Api.stat2, params });
|
|
||||||
export const numStatApi = (params) => defHttp.get({ url: Api.numStat, params });
|
|
||||||
export const getByIdApi = (params) => defHttp.get({ url: Api.getById, params });
|
|
||||||
export const acceptApi = (params) => defHttp.post({ url: Api.accept, params });
|
|
||||||
export const rollOutApi = (params) => defHttp.post({ url: Api.rollOut, params });
|
|
||||||
export const export1Api = (params) => defHttp.get({ url: Api.export1, params });
|
|
||||||
export const export2Api = (params) => defHttp.get({ url: Api.export2, params });
|
|
||||||
export const cancelApi = (params, handleSuccess) => {
|
|
||||||
createConfirm({
|
|
||||||
iconType: 'info',
|
|
||||||
title: '提示',
|
|
||||||
content: '确定取消转出?',
|
|
||||||
okText: '确认',
|
|
||||||
cancelText: '取消',
|
|
||||||
onOk: async () => {
|
|
||||||
try {
|
|
||||||
await defHttp.post({ url: Api.cancel + '?id=' + params?.id, params });
|
|
||||||
handleSuccess();
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,370 +0,0 @@
|
|||||||
// @ts-ignore
|
|
||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
||||||
import { allSecondaryDepartsNew, getThirdDepartsNew } from '/@/utils/orgSearchInfo';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
import { render } from '/@/utils/common/renderUtils';
|
|
||||||
import { getName } from '/@/views/interveneNew/compoents/utils';
|
|
||||||
import { queryDepartTreeSync } from '/@/views/system/depart/depart.api';
|
|
||||||
|
|
||||||
const column: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '原单位',
|
|
||||||
dataIndex: 'oldSecondDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '原部门',
|
|
||||||
dataIndex: 'oldThirdDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '员工编号',
|
|
||||||
dataIndex: 'workNo',
|
|
||||||
width: 110,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
dataIndex: 'realName',
|
|
||||||
width: 90,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '性别',
|
|
||||||
dataIndex: 'sex',
|
|
||||||
width: 70,
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return render.renderDict(text, 'sex2');
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '年龄',
|
|
||||||
dataIndex: 'age',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const columns1: BasicColumn[] = [
|
|
||||||
...column,
|
|
||||||
{
|
|
||||||
title: '请求转入单位',
|
|
||||||
dataIndex: 'newSecondDepart',
|
|
||||||
width: 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '请求时间',
|
|
||||||
dataIndex: 'createTime',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作人员',
|
|
||||||
dataIndex: 'opUserName',
|
|
||||||
width: 90,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '接收状态',
|
|
||||||
dataIndex: 'applyStatus',
|
|
||||||
width: 120,
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return getName(text, list);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
export const columns2: BasicColumn[] = [
|
|
||||||
...column,
|
|
||||||
{
|
|
||||||
title: '流动时间',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '请求转入单位',
|
|
||||||
dataIndex: 'newSecondDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '请求时间',
|
|
||||||
dataIndex: 'createTime',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作人员',
|
|
||||||
dataIndex: 'opUserName',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '转往部门',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '接收状态',
|
|
||||||
dataIndex: '',
|
|
||||||
customRender: () => {
|
|
||||||
return '拒绝转入';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '拒绝理由',
|
|
||||||
dataIndex: 'applyReason',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '接收时间',
|
|
||||||
dataIndex: 'applyTime',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作人员',
|
|
||||||
dataIndex: 'applyUserName',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
export const columns3: BasicColumn[] = [
|
|
||||||
...column,
|
|
||||||
{
|
|
||||||
title: '请求信息',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '请求转入单位',
|
|
||||||
dataIndex: 'newSecondDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '请求时间',
|
|
||||||
dataIndex: 'createTime',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作人员',
|
|
||||||
dataIndex: 'opUserName',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '接收信息',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '接收状态',
|
|
||||||
dataIndex: '',
|
|
||||||
customRender: () => {
|
|
||||||
return '同意转入';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '接收单位',
|
|
||||||
dataIndex: 'newSecondDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '接收部门',
|
|
||||||
dataIndex: 'newThirdDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '接收时间',
|
|
||||||
dataIndex: 'applyTime',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作人员',
|
|
||||||
dataIndex: 'applyUserName',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const searchSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '单位',
|
|
||||||
field: 'orgCode1',
|
|
||||||
component: 'ApiSelect',
|
|
||||||
componentProps: ({ formModel }) => {
|
|
||||||
return {
|
|
||||||
api: allSecondaryDepartsNew,
|
|
||||||
resultField: 'result',
|
|
||||||
labelField: 'departName',
|
|
||||||
valueField: 'orgCode',
|
|
||||||
placeholder: '请选择单位',
|
|
||||||
showSearch: true,
|
|
||||||
showDefaultValue: false,
|
|
||||||
filterOption: (input: string, option: any): boolean => {
|
|
||||||
const str: string = input.trim().toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
},
|
|
||||||
onChange: () => {
|
|
||||||
formModel['orgCode2'] = '';
|
|
||||||
},
|
|
||||||
onDeselect: () => {
|
|
||||||
formModel['orgCode1'] = '';
|
|
||||||
formModel['orgCode2'] = '';
|
|
||||||
formModel['orgCode'] = '';
|
|
||||||
},
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '原部门',
|
|
||||||
field: 'orgCode2',
|
|
||||||
component: 'ApiSelect',
|
|
||||||
componentProps: ({ formModel }) => {
|
|
||||||
return {
|
|
||||||
api: getThirdDepartsNew,
|
|
||||||
resultField: 'list',
|
|
||||||
labelField: 'departName',
|
|
||||||
valueField: 'orgCode',
|
|
||||||
placeholder: '请选择部门',
|
|
||||||
showSearch: true,
|
|
||||||
showDefaultValue: false,
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
params: {
|
|
||||||
idOrCode: formModel['orgCode1'] || 'xasd',
|
|
||||||
},
|
|
||||||
onFocus: () => {
|
|
||||||
if (!formModel['orgCode1']) {
|
|
||||||
return message.warn('请先选择单位!');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
filterOption: (input: string, option: any): boolean => {
|
|
||||||
const str: string = input.trim().toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '转往部门',
|
|
||||||
field: 'orgCode3',
|
|
||||||
component: 'ApiSelect',
|
|
||||||
componentProps: ({ formModel }) => {
|
|
||||||
return {
|
|
||||||
api: getThirdDepartsNew,
|
|
||||||
resultField: 'list',
|
|
||||||
labelField: 'departName',
|
|
||||||
valueField: 'orgCode',
|
|
||||||
placeholder: '请选择部门',
|
|
||||||
showSearch: true,
|
|
||||||
showDefaultValue: false,
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
params: {
|
|
||||||
idOrCode: formModel['orgCode1'] || 'xasd',
|
|
||||||
},
|
|
||||||
onFocus: () => {
|
|
||||||
if (!formModel['orgCode1']) {
|
|
||||||
return message.warn('请先选择单位!');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
filterOption: (input: string, option: any): boolean => {
|
|
||||||
const str: string = input.trim().toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '员工编号',
|
|
||||||
field: 'workNo',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
field: 'name',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '性别',
|
|
||||||
field: 'sex',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({ dictCode: 'sex2' }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '员工编号',
|
|
||||||
field: 'workNo',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '员工编号',
|
|
||||||
field: 'workNo',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const searchSchemaModal: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '单位部门',
|
|
||||||
field: 'orgCode',
|
|
||||||
component: 'JlazyTreeSelect',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
api: queryDepartTreeSync,
|
|
||||||
loadApi: queryDepartTreeSync,
|
|
||||||
multiple: false,
|
|
||||||
afterApi: (data) => {
|
|
||||||
data.forEach((item: any) => {
|
|
||||||
item['preTitle'] = item.title;
|
|
||||||
item['key'] = item.orgCode;
|
|
||||||
});
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
preItem: (title, item) => {
|
|
||||||
item['preTitle'] = title + '/' + item.title;
|
|
||||||
item['key'] = item.orgCode;
|
|
||||||
return item;
|
|
||||||
},
|
|
||||||
fieldNamesInfo: {
|
|
||||||
value: 'orgCode',
|
|
||||||
label: 'preTitle',
|
|
||||||
key: 'orgCode',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '员工编号',
|
|
||||||
field: 'workNo',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
field: 'realName',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '性别',
|
|
||||||
field: 'sex',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
dictCode: 'sex2',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '年龄',
|
|
||||||
field: 'nl',
|
|
||||||
component: 'JCascadeInput',
|
|
||||||
componentProps: ({ formModel }) => {
|
|
||||||
return {
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
onChange: (val) => {
|
|
||||||
const data = JSON.parse(val);
|
|
||||||
formModel.ageFindType = data.selectValue;
|
|
||||||
formModel.ageStat = data.inputValue1;
|
|
||||||
if (data.selectValue == '2') {
|
|
||||||
formModel.ageEnd = data.inputValue2;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
optionsType: '2',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'ageFindType',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'ageStat',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'ageEnd',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const list = [
|
|
||||||
{ value: '0', label: '待处理' },
|
|
||||||
{ value: '2', label: '拒绝转入' },
|
|
||||||
{ value: '1', label: '同意转入' },
|
|
||||||
];
|
|
||||||
@@ -1,334 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<BasicTables
|
|
||||||
@register="registerTable"
|
|
||||||
@goAdd="addInside"
|
|
||||||
@go-export="exportExcel"
|
|
||||||
:task-code="activeKey === '0' ? 'userChangeWithoutAcceptTaskCode' : 'userChangeWithoutRollOutTaskCode'"
|
|
||||||
:task-params="{ applyStatus: radioValue }"
|
|
||||||
>
|
|
||||||
<template #btnTop>
|
|
||||||
<div style="padding: 0 5px">
|
|
||||||
<a-tabs v-model:activeKey="activeKey" @change="changeActiveKey">
|
|
||||||
<a-tab-pane key="0" tab="转入" />
|
|
||||||
<a-tab-pane key="1" tab="转出" />
|
|
||||||
</a-tabs>
|
|
||||||
</div>
|
|
||||||
<div class="btn-top-d">
|
|
||||||
本月{{ activeKey === '0' ? '转入' : '转出' }}人员数量:<span>{{ topInfo.currentMonth }}</span> 上月{{
|
|
||||||
activeKey === '0' ? '转入' : '转出'
|
|
||||||
}}人员数量:<span>{{ topInfo.lastMonth }}</span> 本年{{ activeKey === '0' ? '转入' : '转出' }}人员数量:<span>{{
|
|
||||||
topInfo.currentYear
|
|
||||||
}}</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #btn>
|
|
||||||
<a-button type="primary" @click="largePre">{{ activeKey === '0' ? '批量操作' : '新增转出员工' }}</a-button>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #rightCol>
|
|
||||||
<a-radio-group button-style="solid" v-model:value="radioValue" @change="changeRadioValue">
|
|
||||||
<a-radio-button value="0">待接收({{ numStat?.waitNum || 0 }})</a-radio-button>
|
|
||||||
<a-radio-button value="2">已拒绝({{ numStat?.declinedNum || 0 }})</a-radio-button>
|
|
||||||
<a-radio-button value="1">已接收({{ numStat?.acceptNum || 0 }})</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.dataIndex === 'operate'">
|
|
||||||
<a-button @click="editInfo(record)" type="link">{{ `${activeKey === '0' ? '接收操作' : '取消转出'}` }}</a-button>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTables>
|
|
||||||
<div class="inside-modal" ref="outer">
|
|
||||||
<inside-modal @register="registerModal" :activeValue="activeKey" :getContainer="outer" @success="handleSuccess" />
|
|
||||||
<user-info @register="registerModal1" :getContainer="outer" @success="handleSuccess" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicTables from '/@/components/Table/src/BasicTables.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { searchSchema } from '/@/views/archivesManage/employee/archiveFlow/inside/inside.data';
|
|
||||||
import { columns1, columns2, columns3 } from '/@/views/archivesManage/employee/archiveFlow/org/org.data';
|
|
||||||
import InsideModal from '/@/views/archivesManage/employee/archiveFlow/org/components/orgModal.vue';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import {
|
|
||||||
list2Api,
|
|
||||||
listApi,
|
|
||||||
numStatApi,
|
|
||||||
stat2Api,
|
|
||||||
statApi,
|
|
||||||
export1Api,
|
|
||||||
export2Api,
|
|
||||||
cancelApi,
|
|
||||||
} from '/@/views/archivesManage/employee/archiveFlow/org/org.api';
|
|
||||||
import UserInfo from '/@/views/archivesManage/employee/archiveFlow/org/components/userInfo.vue';
|
|
||||||
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
|
||||||
const [registerModal1, { openModal: openModal1 }] = useModal();
|
|
||||||
|
|
||||||
const activeKey = ref('0');
|
|
||||||
const radioValue = ref('0');
|
|
||||||
const outer = ref();
|
|
||||||
const numStat = ref({});
|
|
||||||
const topInfo = ref({
|
|
||||||
currentMonth: 0,
|
|
||||||
currentYear: 0,
|
|
||||||
lastMonth: 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: listApi,
|
|
||||||
pageTitle: '长庆油田单位员工',
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params['applyStatus'] = radioValue.value;
|
|
||||||
},
|
|
||||||
immediate: false,
|
|
||||||
columns: [
|
|
||||||
...columns1,
|
|
||||||
{
|
|
||||||
title: `${activeKey.value === '0' ? '接收' : '转出'}操作`,
|
|
||||||
dataIndex: 'operate',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
canResize: false,
|
|
||||||
btnArr: ['edit', 'delete', 'add', 'exportRecord'],
|
|
||||||
btnArrText: { search: '列表查询', export: '信息导出', print: '信息打印' },
|
|
||||||
formConfig: {
|
|
||||||
schemas: searchSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [['timeInfo', ['timeStart', 'timeEnd']]],
|
|
||||||
},
|
|
||||||
showIndexColumn: true,
|
|
||||||
indexColumnProps: {
|
|
||||||
dataIndex: 'listIndex',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 120,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
reload({ page: 1 });
|
|
||||||
getStat();
|
|
||||||
stat();
|
|
||||||
});
|
|
||||||
|
|
||||||
async function exportExcel() {
|
|
||||||
let form = getForm().getFieldsValue();
|
|
||||||
try {
|
|
||||||
if (activeKey.value === '0') {
|
|
||||||
await export1Api({ ...form, applyStatus: radioValue.value });
|
|
||||||
} else {
|
|
||||||
await export2Api({ ...form, applyStatus: radioValue.value });
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function stat() {
|
|
||||||
statApi({})
|
|
||||||
.then((res) => {
|
|
||||||
topInfo.value = { ...topInfo.value, ...res };
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
topInfo.value = {
|
|
||||||
currentMonth: 0,
|
|
||||||
currentYear: 0,
|
|
||||||
lastMonth: 0,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function stat2() {
|
|
||||||
stat2Api({})
|
|
||||||
.then((res) => {
|
|
||||||
topInfo.value = { ...topInfo.value, ...res };
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
topInfo.value = {
|
|
||||||
currentMonth: 0,
|
|
||||||
currentYear: 0,
|
|
||||||
lastMonth: 0,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeActiveKey() {
|
|
||||||
setProps({
|
|
||||||
columns: [
|
|
||||||
...columns1,
|
|
||||||
{
|
|
||||||
title: `${activeKey.value === '0' ? '接收' : '转出'}操作`,
|
|
||||||
dataIndex: 'operate',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
api: activeKey.value === '0' ? listApi : list2Api,
|
|
||||||
});
|
|
||||||
radioValue.value = '0';
|
|
||||||
reload({ page: 1 });
|
|
||||||
|
|
||||||
if (activeKey.value === '0') {
|
|
||||||
stat();
|
|
||||||
} else {
|
|
||||||
stat2();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function addInside() {
|
|
||||||
openModal(true, {});
|
|
||||||
}
|
|
||||||
|
|
||||||
const [registerTable, { reload, setProps, getForm }, {}] = tableContext;
|
|
||||||
|
|
||||||
function changeRadioValue(v) {
|
|
||||||
switch (v.target.value) {
|
|
||||||
case '0':
|
|
||||||
setProps({
|
|
||||||
columns: [
|
|
||||||
...columns1,
|
|
||||||
{
|
|
||||||
title: `${activeKey.value === '0' ? '接收' : '转出'}操作`,
|
|
||||||
dataIndex: 'operate',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case '2':
|
|
||||||
setProps({ columns: columns2 });
|
|
||||||
break;
|
|
||||||
case '1':
|
|
||||||
setProps({ columns: columns3 });
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
getStat();
|
|
||||||
reload({ page: 1 });
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSuccess() {
|
|
||||||
reload({ page: 1 });
|
|
||||||
getStat();
|
|
||||||
}
|
|
||||||
|
|
||||||
function getStat() {
|
|
||||||
numStatApi({})
|
|
||||||
.then((res) => {
|
|
||||||
numStat.value = res;
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function editInfo(record: Recordable) {
|
|
||||||
if (activeKey.value === '0') {
|
|
||||||
openModal1(true, {
|
|
||||||
userId: record?.userId,
|
|
||||||
secondDepart: record?.oldSecondDepart,
|
|
||||||
thirdDepart: record?.oldThirdDepart,
|
|
||||||
orgCode: record?.newOrgCode,
|
|
||||||
orgName: record?.newSecondDepart,
|
|
||||||
id: record?.id,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
cancelApi({ id: record?.id }, reload);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function largePre() {
|
|
||||||
openModal(true, {});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.btn-top-d {
|
|
||||||
padding: 15px 10px;
|
|
||||||
border-radius: 7px;
|
|
||||||
font-size: 15px;
|
|
||||||
background: #ffffff;
|
|
||||||
|
|
||||||
> span {
|
|
||||||
color: #5087ec;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.inside-modal {
|
|
||||||
:deep(.ant-modal) {
|
|
||||||
top: 10px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-modal-footer) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-modal-body) {
|
|
||||||
height: calc(100vh - 80px);
|
|
||||||
overflow: hidden;
|
|
||||||
.scrollbar__view {
|
|
||||||
height: 100%;
|
|
||||||
> div {
|
|
||||||
height: 100% !important;
|
|
||||||
min-height: 100% !important;
|
|
||||||
max-height: 100% !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-tabs-tab + .ant-tabs-tab) {
|
|
||||||
margin-left: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-radio-button-wrapper) {
|
|
||||||
color: #1684fc !important;
|
|
||||||
border-color: #1684fc !important;
|
|
||||||
&:before {
|
|
||||||
background-color: #1684fc !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-radio-button-wrapper-checked) {
|
|
||||||
color: #ffffff !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-tabs-nav) {
|
|
||||||
&:before {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.inside-modal {
|
|
||||||
:deep(.ant-modal) {
|
|
||||||
top: 10px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-modal-footer) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-modal-body) {
|
|
||||||
height: calc(100vh - 80px);
|
|
||||||
overflow: hidden;
|
|
||||||
.scrollbar__view {
|
|
||||||
height: 100%;
|
|
||||||
> div {
|
|
||||||
height: 100% !important;
|
|
||||||
min-height: 100% !important;
|
|
||||||
max-height: 100% !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-285
@@ -1,285 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicModal @register="registerModal" :title="`新增${info}员工`" width="96%" v-bind="$attrs">
|
|
||||||
<div class="body-inner">
|
|
||||||
<div style="">
|
|
||||||
<div style="padding: 10px 10px 0; font-weight: bold; font-size: 16px">搜索员工</div>
|
|
||||||
<BasicTable @register="registerTable" table-type="1" :row-selection="rowSelection" @selectionChange="changeSelection" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div style="padding: 10px 0; font-weight: bold; font-size: 16px">已选员工</div>
|
|
||||||
<div style="flex: 1; background-color: #f8f8f8; overflow: auto; padding: 10px">
|
|
||||||
<div class="list-item head">
|
|
||||||
<div style="width: 60px">序号</div>
|
|
||||||
<div style="flex: 1">单位</div>
|
|
||||||
<div style="flex: 1">部门</div>
|
|
||||||
<div style="flex: 1">员工编号</div>
|
|
||||||
<div style="width: 80px">姓名</div>
|
|
||||||
<div style="width: 60px">性别</div>
|
|
||||||
<div style="width: 60px">年龄</div>
|
|
||||||
<div style="width: 60px">操作</div>
|
|
||||||
</div>
|
|
||||||
<div class="list-item body" v-for="(item, index) in rows" :key="`data-list-${index}`">
|
|
||||||
<div style="width: 60px">{{ index + 1 }}</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.secondDepart || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.secondDepart || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.thirdDepart || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.thirdDepart || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.workNo || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.workNo || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 80px">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.realname || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.realname || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 60px">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.sex_dictText || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.sex_dictText || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 60px">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span> {{ item?.age || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item?.age || '-' }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div style="width: 60px"><span @click="delItem(index)" style="cursor: pointer; color: #5473e8">移除</span></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="padding: 0 0 10px">
|
|
||||||
<div style="padding: 10px 0; font-weight: bold; font-size: 16px"> 填写${{ info }}原因 </div>
|
|
||||||
<div>
|
|
||||||
<BasicForm @register="registerForm" />
|
|
||||||
</div>
|
|
||||||
<div style="text-align: center; padding: 10px 0">
|
|
||||||
<a-button type="primary" @click="submitInfo" :loading="loading">确认{{ info }}</a-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicModal from '/@/components/Modal/src/BasicModal.vue';
|
|
||||||
import { useModalInner } from '/@/components/Modal';
|
|
||||||
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { employeeColumns, employeeSearchSchema } from '/@/views/archivesManage/employee/archiveFlow/safekeeping/safekeeping.data';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
|
||||||
import { addApi, userListApi } from '/@/views/archivesManage/employee/archiveFlow/safekeeping/safekeeping.api';
|
|
||||||
import BasicForm from '/@/components/Form/src/BasicForm.vue';
|
|
||||||
import { FormSchema, useForm } from '/@/components/Form';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
|
|
||||||
const keys = ref<any[]>([]);
|
|
||||||
const rows = ref<any[]>([]);
|
|
||||||
const loading = ref(false);
|
|
||||||
const type = ref('');
|
|
||||||
const info = ref('');
|
|
||||||
|
|
||||||
const emit = defineEmits(['success']);
|
|
||||||
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner((data) => {
|
|
||||||
rows.value = [];
|
|
||||||
keys.value = [];
|
|
||||||
selectedRowKeys.value = [];
|
|
||||||
getForm().resetFields();
|
|
||||||
reload({ page: 1 });
|
|
||||||
type.value = data?.type;
|
|
||||||
info.value = data?.type === '3' ? '封存' : '注销';
|
|
||||||
setModalProps({ showOkBtn: false, showCancelBtn: false });
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerForm, { validate }] = useForm({
|
|
||||||
labelWidth: 70,
|
|
||||||
schemas: [
|
|
||||||
{
|
|
||||||
label: `${info.value}原因`,
|
|
||||||
field: 'reason',
|
|
||||||
component: 'InputTextArea',
|
|
||||||
required: true,
|
|
||||||
componentProps: () => {
|
|
||||||
return { rows: 5 };
|
|
||||||
},
|
|
||||||
},
|
|
||||||
] as FormSchema[],
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(useUserStore().getUserInfo);
|
|
||||||
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
title: '工具管理列表',
|
|
||||||
api: userListApi,
|
|
||||||
columns: employeeColumns,
|
|
||||||
immediate: false,
|
|
||||||
canResize: false,
|
|
||||||
showIndexColumn: true,
|
|
||||||
clearSelectOnPageChange: false,
|
|
||||||
formConfig: {
|
|
||||||
schemas: employeeSearchSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
labelWidth: 70,
|
|
||||||
submitFunc: async () => {
|
|
||||||
selectedRowKeys.value = keys.value;
|
|
||||||
selectedRows.value = rows.value;
|
|
||||||
await reload({ page: 1 });
|
|
||||||
},
|
|
||||||
baseColProps: {
|
|
||||||
xs: 24,
|
|
||||||
sm: 24,
|
|
||||||
md: 24,
|
|
||||||
lg: 12,
|
|
||||||
xl: 12,
|
|
||||||
xxl: 12,
|
|
||||||
},
|
|
||||||
actionColOptions: {
|
|
||||||
span: 24,
|
|
||||||
offset: 0,
|
|
||||||
style: {
|
|
||||||
marginLeft: '70px',
|
|
||||||
},
|
|
||||||
xs: 12,
|
|
||||||
sm: 12,
|
|
||||||
md: 12,
|
|
||||||
lg: 8,
|
|
||||||
xl: 8,
|
|
||||||
xxl: 8,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 200,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
function changeSelection(v) {
|
|
||||||
console.log(v);
|
|
||||||
console.log(selectedRowKeys.value);
|
|
||||||
rows.value = v.rows;
|
|
||||||
keys.value = v.keys;
|
|
||||||
|
|
||||||
console.log(keys.value);
|
|
||||||
console.log(rows.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function delItem(index: any) {
|
|
||||||
keys.value.splice(index, 1);
|
|
||||||
keys.value = [...keys.value];
|
|
||||||
rows.value.splice(index, 1);
|
|
||||||
rows.value = [...rows.value];
|
|
||||||
selectedRowKeys.value = keys.value;
|
|
||||||
selectedRows.value = rows.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
const [registerTable, { reload, getForm }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
|
|
||||||
|
|
||||||
async function submitInfo() {
|
|
||||||
loading.value = true;
|
|
||||||
try {
|
|
||||||
if (keys.value.length === 0) return message.warn('请至少选择一个员工');
|
|
||||||
let values = await validate();
|
|
||||||
|
|
||||||
await addApi({ type: type.value, ...values, userIds: keys.value });
|
|
||||||
emit('success');
|
|
||||||
closeModal();
|
|
||||||
} catch (e) {
|
|
||||||
} finally {
|
|
||||||
loading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.body-inner {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
> div {
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
padding: 0 10px;
|
|
||||||
width: 50%;
|
|
||||||
&:nth-child(1) {
|
|
||||||
border-right: 1px dashed #cecece;
|
|
||||||
}
|
|
||||||
&:nth-child(2) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.jeecg-basic-table) {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-table-wrapper) {
|
|
||||||
flex: 1;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-table-title) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.list-item) {
|
|
||||||
border-left: 1px solid #f0f0f0;
|
|
||||||
background-color: #ffffff;
|
|
||||||
display: flex;
|
|
||||||
> div {
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
text-align: center;
|
|
||||||
padding: 5px;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
word-break: keep-all;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.head {
|
|
||||||
border-top: 1px solid #f0f0f0;
|
|
||||||
font-weight: bold;
|
|
||||||
position: sticky;
|
|
||||||
z-index: 99;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-select-dropdown) {
|
|
||||||
width: 230px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
list = '/health-system/sys/userFrozen/page',
|
|
||||||
userList = '/health-system/user/info/page',
|
|
||||||
add = '/health-system/sys/userFrozen/add',
|
|
||||||
stat = '/health-system/sys/userFrozen/stat',
|
|
||||||
export = '/health-system/sys/userFrozen/export',
|
|
||||||
}
|
|
||||||
|
|
||||||
export const listApi = (params) => defHttp.get({ url: Api.list, params });
|
|
||||||
export const userListApi = (params) => defHttp.get({ url: Api.userList, params });
|
|
||||||
export const statApi = (params) => defHttp.get({ url: Api.stat, params });
|
|
||||||
export const addApi = (params) => defHttp.post({ url: Api.add, params });
|
|
||||||
export const exportApi = (params) => defHttp.post({ url: Api.export, params });
|
|
||||||
@@ -1,270 +0,0 @@
|
|||||||
// @ts-ignore
|
|
||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
||||||
import { allSecondaryDepartsNew, getThirdDepartsNew } from '/@/utils/orgSearchInfo';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
import { queryDepartTreeSync } from '/@/views/system/depart/depart.api';
|
|
||||||
|
|
||||||
export const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '单位',
|
|
||||||
dataIndex: 'secondDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '部门',
|
|
||||||
dataIndex: 'thirdDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '员工编号',
|
|
||||||
dataIndex: 'workNo',
|
|
||||||
width: 110,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
dataIndex: 'realName',
|
|
||||||
width: 90,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '性别',
|
|
||||||
dataIndex: 'sex_dictText',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '年龄',
|
|
||||||
dataIndex: 'age',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const searchSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '单位',
|
|
||||||
field: 'orgCode1',
|
|
||||||
component: 'ApiSelect',
|
|
||||||
componentProps: ({ formModel }) => {
|
|
||||||
return {
|
|
||||||
api: allSecondaryDepartsNew,
|
|
||||||
resultField: 'result',
|
|
||||||
labelField: 'departName',
|
|
||||||
valueField: 'orgCode',
|
|
||||||
placeholder: '请选择单位',
|
|
||||||
showSearch: true,
|
|
||||||
showDefaultValue: false,
|
|
||||||
filterOption: (input: string, option: any): boolean => {
|
|
||||||
const str: string = input.trim().toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
},
|
|
||||||
onChange: () => {
|
|
||||||
formModel['orgCode2'] = '';
|
|
||||||
},
|
|
||||||
onDeselect: () => {
|
|
||||||
formModel['orgCode1'] = '';
|
|
||||||
formModel['orgCode2'] = '';
|
|
||||||
formModel['orgCode'] = '';
|
|
||||||
},
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '部门',
|
|
||||||
field: 'orgCode2',
|
|
||||||
component: 'ApiSelect',
|
|
||||||
componentProps: ({ formModel }) => {
|
|
||||||
return {
|
|
||||||
api: getThirdDepartsNew,
|
|
||||||
resultField: 'list',
|
|
||||||
labelField: 'departName',
|
|
||||||
valueField: 'orgCode',
|
|
||||||
placeholder: '请选择部门',
|
|
||||||
showSearch: true,
|
|
||||||
showDefaultValue: false,
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
params: {
|
|
||||||
idOrCode: formModel['orgCode1'] || 'xasd',
|
|
||||||
},
|
|
||||||
onFocus: () => {
|
|
||||||
if (!formModel['orgCode1']) {
|
|
||||||
return message.warn('请先选择单位!');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
filterOption: (input: string, option: any): boolean => {
|
|
||||||
const str: string = input.trim().toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '员工编号',
|
|
||||||
field: 'workNo',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
field: 'realName',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '性别',
|
|
||||||
field: 'sex',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({ dictCode: 'sex2' }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '年龄',
|
|
||||||
field: 'nl',
|
|
||||||
component: 'JCascadeInput',
|
|
||||||
componentProps: ({ formModel }) => {
|
|
||||||
return {
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
onChange: (val) => {
|
|
||||||
const data = JSON.parse(val);
|
|
||||||
formModel.ageFindType = data.selectValue;
|
|
||||||
formModel.ageStat = data.inputValue1;
|
|
||||||
if (data.selectValue == '2') {
|
|
||||||
formModel.ageEnd = data.inputValue2;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
optionsType: '2',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'ageFindType',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'age',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'ageB',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const employeeSearchSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '单位部门',
|
|
||||||
field: 'orgCode',
|
|
||||||
component: 'JlazyTreeSelect',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
api: queryDepartTreeSync,
|
|
||||||
loadApi: queryDepartTreeSync,
|
|
||||||
multiple: false,
|
|
||||||
afterApi: (data) => {
|
|
||||||
data.forEach((item: any) => {
|
|
||||||
item['preTitle'] = item.title;
|
|
||||||
item['key'] = item.orgCode;
|
|
||||||
});
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
preItem: (title, item) => {
|
|
||||||
item['preTitle'] = title + '/' + item.title;
|
|
||||||
item['key'] = item.orgCode;
|
|
||||||
return item;
|
|
||||||
},
|
|
||||||
fieldNamesInfo: {
|
|
||||||
value: 'orgCode',
|
|
||||||
label: 'preTitle',
|
|
||||||
key: 'orgCode',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '员工编号',
|
|
||||||
field: 'workNo',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
field: 'realname',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '性别',
|
|
||||||
field: 'sex',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
dictCode: 'sex2',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '年龄',
|
|
||||||
field: 'nl',
|
|
||||||
component: 'JCascadeInput',
|
|
||||||
componentProps: ({ formModel }) => {
|
|
||||||
return {
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
onChange: (val) => {
|
|
||||||
const data = JSON.parse(val);
|
|
||||||
formModel.ageFindType = data.selectValue;
|
|
||||||
formModel.ageStat = data.inputValue1;
|
|
||||||
if (data.selectValue == '2') {
|
|
||||||
formModel.ageEnd = data.inputValue2;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
optionsType: '2',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'ageFindType',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'ageStat',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'ageEnd',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const employeeColumns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '单位',
|
|
||||||
dataIndex: 'secondDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '部门',
|
|
||||||
dataIndex: 'thirdDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '员工编号',
|
|
||||||
dataIndex: 'workNo',
|
|
||||||
width: 110,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
dataIndex: 'realname',
|
|
||||||
width: 90,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '性别',
|
|
||||||
dataIndex: 'sex_dictText',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '年龄',
|
|
||||||
dataIndex: 'age',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
@@ -1,154 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<BasicTables
|
|
||||||
@register="registerTable"
|
|
||||||
@go-add="addInside"
|
|
||||||
@go-export="exportExcel"
|
|
||||||
:task-code="props.taskCode"
|
|
||||||
:task-params="props.taskParams"
|
|
||||||
>
|
|
||||||
<template #btnTop>
|
|
||||||
<div class="btn-top-d">
|
|
||||||
本月{{ info }}人员数量:<span>{{ topInfo?.currentMonth }}</span> 上月{{ info }}人员数量:<span>{{ topInfo?.lastMonth }}</span>
|
|
||||||
本年{{ info }}人员数量:<span>{{ topInfo?.currentYear }}</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</BasicTables>
|
|
||||||
<div class="inside-modal" ref="outer">
|
|
||||||
<inside-modal @register="registerModal" :getContainer="outer" @success="handleSuccess" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicTables from '/@/components/Table/src/BasicTables.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { columns, searchSchema } from '/@/views/archivesManage/employee/archiveFlow/safekeeping/safekeeping.data';
|
|
||||||
import InsideModal from '/@/views/archivesManage/employee/archiveFlow/safekeeping/components/safekeepingModal.vue';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import { exportApi, listApi, statApi } from '/@/views/archivesManage/employee/archiveFlow/safekeeping/safekeeping.api';
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
type: {
|
|
||||||
type: String,
|
|
||||||
default: () => '3',
|
|
||||||
},
|
|
||||||
taskCode: {
|
|
||||||
type: String,
|
|
||||||
default: () => 'userFrozenTaskCode',
|
|
||||||
},
|
|
||||||
taskParams: {
|
|
||||||
type: Object,
|
|
||||||
default: () => {},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
|
||||||
|
|
||||||
const outer = ref();
|
|
||||||
const info = ref(props.type === '3' ? '封存' : '注销');
|
|
||||||
const topInfo = ref({
|
|
||||||
currentMonth: 0,
|
|
||||||
currentYear: 0,
|
|
||||||
lastMonth: 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
const { tableContext, onExportXls } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: listApi,
|
|
||||||
pageTitle: `长庆油田已${info.value}员工`,
|
|
||||||
columns,
|
|
||||||
canResize: false,
|
|
||||||
searchInfo: { type: props.type },
|
|
||||||
btnArr: ['edit', 'delete', 'exportRecord'],
|
|
||||||
btnArrText: { add: `新增${info.value}员工`, search: '列表查询', export: '信息导出', print: '信息打印' },
|
|
||||||
formConfig: {
|
|
||||||
schemas: searchSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
},
|
|
||||||
showIndexColumn: true,
|
|
||||||
indexColumnProps: {
|
|
||||||
dataIndex: 'listIndex',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 120,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerTable, { reload, getForm }, {}] = tableContext;
|
|
||||||
|
|
||||||
function exportExcel() {
|
|
||||||
let form = getForm().getFieldsValue();
|
|
||||||
let optionConfig = {
|
|
||||||
exportConfig: {
|
|
||||||
name: `长庆油田${props.type === '3' ? '封存' : '注销'}员工`,
|
|
||||||
url: exportApi,
|
|
||||||
params: { ...form, isXlsx: true, type: props.type },
|
|
||||||
},
|
|
||||||
};
|
|
||||||
onExportXls(optionConfig);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
initTop();
|
|
||||||
});
|
|
||||||
|
|
||||||
function initTop() {
|
|
||||||
statApi({ type: props.type })
|
|
||||||
.then((res) => {
|
|
||||||
topInfo.value = { ...topInfo.value, ...res };
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function addInside() {
|
|
||||||
openModal(true, { type: props.type });
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSuccess() {
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.btn-top-d {
|
|
||||||
padding: 15px 10px;
|
|
||||||
border-radius: 7px;
|
|
||||||
font-size: 15px;
|
|
||||||
background: #ffffff;
|
|
||||||
|
|
||||||
> span {
|
|
||||||
color: #5087ec;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.inside-modal {
|
|
||||||
:deep(.ant-modal) {
|
|
||||||
top: 10px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-modal-footer) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-modal-body) {
|
|
||||||
height: calc(100vh - 80px);
|
|
||||||
overflow: hidden;
|
|
||||||
.scrollbar__view {
|
|
||||||
height: 100%;
|
|
||||||
> div {
|
|
||||||
height: 100% !important;
|
|
||||||
min-height: 100% !important;
|
|
||||||
max-height: 100% !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,559 +0,0 @@
|
|||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
||||||
import { orgSearchInfo } from '/@/utils/orgSearchInfo';
|
|
||||||
import { checkPassword } from '/@/hooks/checkPassword/checkPassword';
|
|
||||||
|
|
||||||
export const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '单位',
|
|
||||||
dataIndex: 'secondDepart',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
fixed: 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '部门',
|
|
||||||
dataIndex: 'thirdDepart',
|
|
||||||
width: 150,
|
|
||||||
align: 'center',
|
|
||||||
fixed: 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '员工编号',
|
|
||||||
dataIndex: 'workNo',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
fixed: 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
dataIndex: 'realname',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
fixed: 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '性别',
|
|
||||||
dataIndex: 'sex_dictText',
|
|
||||||
width: 70,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '民族',
|
|
||||||
dataIndex: 'empNation_dictText',
|
|
||||||
width: 90,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '出生日期',
|
|
||||||
dataIndex: 'birthday',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '入职时间',
|
|
||||||
dataIndex: 'empWorktime',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '用工形式',
|
|
||||||
dataIndex: 'empType_dictText',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '职位',
|
|
||||||
dataIndex: 'empJob_dictText',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '岗位层级',
|
|
||||||
dataIndex: 'jobLevel_dictText',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '职称',
|
|
||||||
dataIndex: 'postNew_dictText',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: '员工类别',
|
|
||||||
// dataIndex: 'empType_dictText',
|
|
||||||
// width: 100,
|
|
||||||
// align: 'center',
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
title: '学历 ',
|
|
||||||
dataIndex: 'empEducation_dictText',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '婚姻状况',
|
|
||||||
dataIndex: 'empMarriage_dictText',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '手机号',
|
|
||||||
dataIndex: 'phone',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '邮箱',
|
|
||||||
dataIndex: 'email',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '工作地点',
|
|
||||||
dataIndex: 'workSpace',
|
|
||||||
width: 300,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '身份证号',
|
|
||||||
dataIndex: 'idCard',
|
|
||||||
width: 150,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '健康状况',
|
|
||||||
dataIndex: 'userGroup_dictText',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '图片',
|
|
||||||
dataIndex: 'avatar',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
|
||||||
...orgSearchInfo({ orgField: 'orgCode1', orgName: '单位', deptFiled: 'orgCodeThree', deptName: '部门', orgCode: 'orgCode' }),
|
|
||||||
{
|
|
||||||
label: '员工编号',
|
|
||||||
field: 'workNo',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
field: 'realname',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '性别',
|
|
||||||
field: 'sex',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'sex2',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '民族',
|
|
||||||
field: 'empNation',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'nation',
|
|
||||||
showSearch: true,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '出生日期',
|
|
||||||
field: 'rangeDate',
|
|
||||||
component: 'RangePicker',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
showTime: false,
|
|
||||||
valueFormat: 'YYYY-MM-DD',
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '入职时间',
|
|
||||||
field: 'applyTime',
|
|
||||||
component: 'RangePicker',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
showTime: false,
|
|
||||||
valueFormat: 'YYYY-MM-DD',
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '职位',
|
|
||||||
field: 'empJob',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'position_new',
|
|
||||||
showSearch: true,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '岗位层级',
|
|
||||||
field: 'jobLevel',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'job_level',
|
|
||||||
showSearch: true,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '职称',
|
|
||||||
field: 'postNew',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'post_new',
|
|
||||||
showSearch: true,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// label: '员工类别',
|
|
||||||
// field: 'empType',
|
|
||||||
// component: 'JDictSelectTag',
|
|
||||||
// componentProps: () => ({
|
|
||||||
// dictCode: 'emp_type',
|
|
||||||
// }),
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
label: '学历',
|
|
||||||
field: 'empEducation',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'emp_education',
|
|
||||||
showSearch: true,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '婚姻状况',
|
|
||||||
field: 'empMarriage',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'mr_state',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '手机号',
|
|
||||||
field: 'phone',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '邮箱',
|
|
||||||
field: 'email',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '工作地点',
|
|
||||||
field: 'workPlace',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '身份证号',
|
|
||||||
field: 'idCardFind',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '健康状况',
|
|
||||||
field: 'userGroup',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'user_group_desc',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const formSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: 'id',
|
|
||||||
field: 'id',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'username',
|
|
||||||
field: 'username',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'orgCode',
|
|
||||||
field: 'orgCode',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
label: '单位',
|
|
||||||
field: 'secondDepart',
|
|
||||||
component: 'Input',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
disabled: true,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '部门',
|
|
||||||
field: 'thirdDepart',
|
|
||||||
component: 'Input',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
disabled: true,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '员工编号',
|
|
||||||
field: 'workNo',
|
|
||||||
component: 'Input',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
placeholder: '请填写中石油人事系统统一规定的员工编号',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
field: 'realname',
|
|
||||||
component: 'Input',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
placeholder: '请填写员工真实姓名,两个字的名字中间不能空隔',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '性别',
|
|
||||||
field: 'sex',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
required: true,
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'sex2',
|
|
||||||
placeholder: '请选择性别',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '民族',
|
|
||||||
field: 'empNation',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
required: true,
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'nation',
|
|
||||||
placeholder: '请选择民族',
|
|
||||||
showSearch: true,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '出生日期',
|
|
||||||
field: 'birthday',
|
|
||||||
component: 'DatePicker',
|
|
||||||
required: true,
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
showTime: false,
|
|
||||||
value: 'YYYY-MM-DD',
|
|
||||||
valueFormat: 'YYYY-MM-DD',
|
|
||||||
placeholder: '请选输出生时间',
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
style: {
|
|
||||||
width: '100%',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '入职时间',
|
|
||||||
field: 'empWorktime',
|
|
||||||
component: 'DatePicker',
|
|
||||||
required: true,
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
showTime: false,
|
|
||||||
value: 'YYYY-MM-DD',
|
|
||||||
valueFormat: 'YYYY-MM-DD',
|
|
||||||
placeholder: '请选输参加工作时间',
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
style: {
|
|
||||||
width: '100%',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '职位',
|
|
||||||
field: 'empJob',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
required: true,
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'position_new',
|
|
||||||
placeholder: '请选择职位级别,纯专业技术和操作员工的级别为“员工”',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '岗位层级',
|
|
||||||
field: 'jobLevel',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
required: true,
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'job_level',
|
|
||||||
placeholder: '请选择岗位层级',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '职称',
|
|
||||||
field: 'postNew',
|
|
||||||
required: true,
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'post_new',
|
|
||||||
placeholder: '请选择职称,操作员工无职称',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '员工类别',
|
|
||||||
field: 'empType',
|
|
||||||
required: true,
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'contract',
|
|
||||||
placeholder: '请选择员工类别,以长庆油田人事系统规定为准',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '学历',
|
|
||||||
field: 'empEducation',
|
|
||||||
required: true,
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'emp_education',
|
|
||||||
placeholder: '请选择学历,指人事系统承认的员工现学历',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '婚姻状况',
|
|
||||||
field: 'empMarriage',
|
|
||||||
required: true,
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'mr_state',
|
|
||||||
placeholder: '请选择婚否',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '手机号',
|
|
||||||
field: 'phone',
|
|
||||||
component: 'Input',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
placeholder: '请填写手机号码,必须是11位数字',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
rules: [
|
|
||||||
// { required: true, message: '请输入联系电话', trigger: 'blur' },
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
pattern: /^1[3456789]\d{9}$/,
|
|
||||||
message: '手机号码格式有误',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '邮箱',
|
|
||||||
required: true,
|
|
||||||
field: 'email',
|
|
||||||
component: 'Input',
|
|
||||||
rules: [{ required: true, pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, message: '邮箱格式有误' }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '工作地点',
|
|
||||||
field: 'workSpace',
|
|
||||||
required: true,
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '身份证号',
|
|
||||||
field: 'idCardFind',
|
|
||||||
required: true,
|
|
||||||
dynamicRules: ({ model }) => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
pattern: /^(\d{6})(19|20)(\d{2})(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])(\d{3})([\dXx])$|^\d{6}\*{8}\d{4}$/,
|
|
||||||
|
|
||||||
validator: (_) => {
|
|
||||||
const genderDigit = parseInt(model.idCardFind ? model.idCardFind.charAt(16) : '');
|
|
||||||
if (genderDigit % 2 !== model.sex % 2) {
|
|
||||||
return Promise.resolve();
|
|
||||||
} else {
|
|
||||||
return Promise.reject('性别与身份证信息不匹配');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
},
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
pattern: /^(\d{6})(19|20)(\d{2})(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])(\d{3})([\dXx])$|^\d{6}\*{8}\d{4}$/,
|
|
||||||
message: '身份证格式错误',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '健康状况',
|
|
||||||
field: 'userGroup',
|
|
||||||
required: true,
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'user_group_desc',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const formSchemaAvater: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'avatar',
|
|
||||||
component: 'JImageUpload',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
maxCount: 1,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
rules: [{ required: true, message: '请上传头像信息' }],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
export const FieldHolder = [
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
'请填写中石油人事系统统一规定的员工编号',
|
|
||||||
'请填写员工真实姓名,两个字的名字中间不能空隔',
|
|
||||||
'请选择性别',
|
|
||||||
'请选择民族',
|
|
||||||
'请选输出生时间',
|
|
||||||
'请选输参加工作时间',
|
|
||||||
'请选择职位级别,纯专业技术和操作员工的级别为“员工”',
|
|
||||||
'请选择岗位层级',
|
|
||||||
'请选择职称,操作员工无职称',
|
|
||||||
'请选择员工类别,以长庆油田人事系统规定为准',
|
|
||||||
'请选择学历,指人事系统承认的员工现学历',
|
|
||||||
'请选择婚否',
|
|
||||||
'请填写手机号码,必须是11位数字',
|
|
||||||
'请输入邮箱',
|
|
||||||
'请输入工作地点',
|
|
||||||
'请输入身份证号',
|
|
||||||
'请选择健康状况',
|
|
||||||
];
|
|
||||||
@@ -1,144 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicTables @register="registerTable" ref="bbb" :show-total="ifShowTotal" @go-export="exportExcel" :row-selection="rowSelection">
|
|
||||||
<template #btn>
|
|
||||||
<a-button @click="handleEditInfo" type="primary">信息维护</a-button>
|
|
||||||
<a-button @click="handleSearch" type="primary">信息查询</a-button>
|
|
||||||
<!-- <a-button @click="handleSearch" type="primary">信息导入</a-button>-->
|
|
||||||
<a-button @click="exportExcel" type="primary">信息导出</a-button>
|
|
||||||
<a-button @click="handlePrint" type="primary"> 信息打印 </a-button>
|
|
||||||
<a-button @click="handleTotal" type="primary" :loading="buttonLoading">{{ ifShowTotal ? '取消统计' : '信息统计' }}</a-button>
|
|
||||||
</template>
|
|
||||||
<template #header-bottom-s="d" v-if="ifShowTotal">
|
|
||||||
<template v-if="d.dataIndex !== 'sex_dictText' && d.dataIndex !== 'jobLevel_dictText'">
|
|
||||||
{{ d.dataIndex === 'listIndex' ? '统计行' : isNull(titleData[d.dataIndex]) }}
|
|
||||||
</template>
|
|
||||||
<template v-if="d.dataIndex == 'sex_dictText'">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title="">{{ sexTool }}</template>
|
|
||||||
{{ isNull(titleData[d.dataIndex]) }}
|
|
||||||
</a-tooltip>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-if="d.dataIndex == 'jobLevel_dictText'">
|
|
||||||
{{ jobTool }}
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.dataIndex == 'avatar'">
|
|
||||||
<a-button v-if="record?.avatar" type="link" @click="handleAva(record?.avatar)">有</a-button>
|
|
||||||
<span v-else>无</span>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTables>
|
|
||||||
<div style="display: none">
|
|
||||||
<ImagePreviewGroup v-if="imgList && imgList.length > 0" :preview="{ visible, onVisibleChange: (vis) => (visible = vis) }">
|
|
||||||
<Image v-for="(item, index) in imgList" :key="index" :width="200" :fallback="getFamaleDefaultImage()" :src="getFileAccessHttpUrl(item)" />
|
|
||||||
</ImagePreviewGroup>
|
|
||||||
</div>
|
|
||||||
<UserEditModal @register="registerModal" @success="handleSuccess"></UserEditModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { BasicTables } from '/@/components/Table';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { userInfoApi, userInfoExportApi, userInfoStatApi } from '/@/views/information/employeeInformation/basicInformation/database/database.api';
|
|
||||||
import { columns, searchFormSchema } from '/@/views/archivesManage/employee/basicInfo/basicInfo.data';
|
|
||||||
import { nextTick, ref } from 'vue';
|
|
||||||
const imgList = ref<string[]>([]);
|
|
||||||
const visible = ref(false);
|
|
||||||
import UserEditModal from '/@/views/archivesManage/employee/basicInfo/components/userEditModal.vue';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { getFamaleDefaultImage, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
|
||||||
import { Image, ImagePreviewGroup, message } from 'ant-design-vue';
|
|
||||||
import { isNull } from '/@/utils/getEnv';
|
|
||||||
const { tableContext, onExportXls } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
pageTitle: '长庆油田员工名册',
|
|
||||||
api: userInfoApi,
|
|
||||||
columns,
|
|
||||||
canResize: false,
|
|
||||||
btnArr: ['add', 'edit', 'delete', 'search', 'export', 'print'],
|
|
||||||
formConfig: {
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [
|
|
||||||
['rangeDate', ['birthdayStart', 'birthdayEnd'], 'YYYY-MM-DD'],
|
|
||||||
['applyTime', ['workTimeStart', 'workTimeEnd'], 'YYYY-MM-DD'],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
showIndexColumn: true,
|
|
||||||
indexColumnProps: {
|
|
||||||
dataIndex: 'listIndex',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 120,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, getForm }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
|
|
||||||
const [registerModal, { openModal: openUserModal }] = useModal();
|
|
||||||
const bbb = ref();
|
|
||||||
function handleSearch() {
|
|
||||||
bbb.value.openModal();
|
|
||||||
}
|
|
||||||
|
|
||||||
function handlePrint() {
|
|
||||||
bbb.value.handlePrint();
|
|
||||||
}
|
|
||||||
function handleEditInfo() {
|
|
||||||
if (selectedRowKeys.value.length == 0 || selectedRowKeys.value.length > 1) {
|
|
||||||
message.warning('请选择一条数据');
|
|
||||||
}
|
|
||||||
if (selectedRowKeys.value.length == 1) {
|
|
||||||
openUserModal(true, {
|
|
||||||
record: selectedRows.value[0],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function handleAva(images) {
|
|
||||||
nextTick(() => {
|
|
||||||
imgList.value = images?.split(',');
|
|
||||||
visible.value = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function exportExcel() {
|
|
||||||
let form = getForm().getFieldsValue();
|
|
||||||
let optionConfig = {
|
|
||||||
exportConfig: {
|
|
||||||
name: '长庆油田员工名册',
|
|
||||||
url: userInfoExportApi,
|
|
||||||
params: { ...form, isXlsx: true },
|
|
||||||
},
|
|
||||||
};
|
|
||||||
onExportXls(optionConfig);
|
|
||||||
}
|
|
||||||
const titleData = ref({});
|
|
||||||
const ifShowTotal = ref(false);
|
|
||||||
const buttonLoading = ref(false);
|
|
||||||
const sexTool = ref();
|
|
||||||
const jobTool = ref();
|
|
||||||
async function handleTotal() {
|
|
||||||
if (ifShowTotal.value) return (ifShowTotal.value = false);
|
|
||||||
try {
|
|
||||||
buttonLoading.value = true;
|
|
||||||
titleData.value = await userInfoStatApi({ ...getForm().getFieldsValue() });
|
|
||||||
titleData.value['postNew_dictText'] = titleData.value?.postNew;
|
|
||||||
titleData.value['empEducation_dictText'] = titleData.value?.empEducation;
|
|
||||||
titleData.value['userGroup_dictText'] = titleData.value?.userGroup;
|
|
||||||
titleData.value['sex_dictText'] = titleData.value?.sex;
|
|
||||||
sexTool.value = `男${titleData.value?.sex?.split('/')[0]}/女${titleData.value?.sex?.split('/')[1]}`;
|
|
||||||
jobTool.value = titleData.value?.jobLevel;
|
|
||||||
titleData.value['empMarriage_dictText'] = titleData.value?.empMarriage;
|
|
||||||
ifShowTotal.value = !ifShowTotal.value;
|
|
||||||
console.log(jobTool.value, titleData.value);
|
|
||||||
} finally {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function handleSuccess() {
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicModal
|
|
||||||
@register="registerModal"
|
|
||||||
:width="1200"
|
|
||||||
:bodyStyle="{ maxHeight: 'calc(100vh * 0.7)', overflow: 'hidden auto' }"
|
|
||||||
title="员工基本信息维护"
|
|
||||||
@ok="handleOk"
|
|
||||||
>
|
|
||||||
<a-row>
|
|
||||||
<a-col :span="9">
|
|
||||||
<BasicForm @register="registerForm"></BasicForm>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="11">
|
|
||||||
<div class="holder-box" v-for="(item, index) in FieldHolder" :key="index">
|
|
||||||
{{ item ? `(${item})` : '' }}
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="4" style="text-align: center">
|
|
||||||
<BasicForm @register="registerForm2"></BasicForm>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
||||||
import BasicForm from '/@/components/Form/src/BasicForm.vue';
|
|
||||||
import { useForm } from '/@/components/Form';
|
|
||||||
import { formSchema, FieldHolder, formSchemaAvater } from '/@/views/archivesManage/employee/basicInfo/basicInfo.data';
|
|
||||||
import { userInfoEditApi } from '/@/views/information/employeeInformation/basicInformation/database/database.api';
|
|
||||||
const emit = defineEmits();
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
|
||||||
setModalProps({ confirmLoading: false });
|
|
||||||
await setFieldsValue({ ...data.record });
|
|
||||||
await setFieldsValue({ orgCode1: data.record.orgCode.substring(0, 6), orgCodeThree: data.record.orgCode });
|
|
||||||
await setAvaterFieldsValue({ avatar: data.record.avatar });
|
|
||||||
await clearValidate();
|
|
||||||
await clearAvaterValidate();
|
|
||||||
});
|
|
||||||
const [registerForm, { resetFields, setFieldsValue, validate, clearValidate, getFieldsValue }] = useForm({
|
|
||||||
schemas: formSchema,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
});
|
|
||||||
const [
|
|
||||||
registerForm2,
|
|
||||||
{
|
|
||||||
resetFields: resetAvaterFields,
|
|
||||||
setFieldsValue: setAvaterFieldsValue,
|
|
||||||
validate: validateAvater,
|
|
||||||
clearValidate: clearAvaterValidate,
|
|
||||||
getFieldsValue: getAvaterFieldsValue,
|
|
||||||
},
|
|
||||||
] = useForm({
|
|
||||||
schemas: formSchemaAvater,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
});
|
|
||||||
|
|
||||||
async function handleOk() {
|
|
||||||
try {
|
|
||||||
setModalProps({ confirmLoading: true });
|
|
||||||
const value = await validate();
|
|
||||||
const value1 = await validateAvater();
|
|
||||||
if (value.idCard.indexOf('*') != -1) {
|
|
||||||
delete value.idCard;
|
|
||||||
}
|
|
||||||
|
|
||||||
const params = {
|
|
||||||
...value,
|
|
||||||
...value1,
|
|
||||||
};
|
|
||||||
console.log(params);
|
|
||||||
await userInfoEditApi(params);
|
|
||||||
closeModal();
|
|
||||||
emit('success');
|
|
||||||
setModalProps({ confirmLoading: false });
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
setModalProps({ confirmLoading: false });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.holder-box {
|
|
||||||
height: 52px;
|
|
||||||
line-height: 32px;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,161 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicModal @register="registerModal" title="员工健康档案维护" width="90%" :footer="false" @cancel="handleCancel">
|
|
||||||
<div class="outer">
|
|
||||||
<div class="user-info">
|
|
||||||
<img :src="userUrl" alt="" class="user-avatar" />
|
|
||||||
<div class="user-info-content">
|
|
||||||
<div class="user-info-content-item">
|
|
||||||
<span>单位:</span>
|
|
||||||
<span>{{ userInfo?.secondDepart }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="user-info-content-item">
|
|
||||||
<span>部门:</span>
|
|
||||||
<span>{{ userInfo?.thirdDepart }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="user-info-content-item user-basic-info">
|
|
||||||
<p>
|
|
||||||
<span>姓名:</span>
|
|
||||||
<span>{{ userInfo?.realname }}</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<span>性别:</span>
|
|
||||||
<span>{{ userInfo?.sex_dictText }}</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<span>年龄:</span>
|
|
||||||
<span>{{ userInfo?.age }}</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<span>职位:</span>
|
|
||||||
<span>{{ userInfo?.empJob_dictText }}</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
<div style="width: 200px">
|
|
||||||
<a-tabs v-model:activeKey="activeKey" :tab-position="mode" :style="{ height: '100%' }">
|
|
||||||
<a-tab-pane v-for="(item, index) in tabPane" :key="index" :tab="`${index + 1}、${item}`"></a-tab-pane>
|
|
||||||
</a-tabs>
|
|
||||||
</div>
|
|
||||||
<div style="width: calc(100% - 200px); padding: 0 10px; height: 100%; overflow: auto; display: flex; flex-direction: column">
|
|
||||||
<div class="right-top-title">{{ tabPane[activeKey] }} </div>
|
|
||||||
<!-- 1、基本信息 -->
|
|
||||||
<Tab1 :userInfo="userInfo" v-if="userInfo && activeKey == 0" />
|
|
||||||
<!-- 2、健康现状 -->
|
|
||||||
<Tab2 :userInfo="userInfo" v-if="userInfo && activeKey == 1" />
|
|
||||||
<!-- 3、基本体格 -->
|
|
||||||
<Tab3 :userInfo="userInfo" v-if="userInfo && activeKey == 2" />
|
|
||||||
<!-- 4、健康检查 -->
|
|
||||||
<Tab4 :userInfo="userInfo" v-if="userInfo && activeKey == 3" />
|
|
||||||
<!-- 5、个人病史 -->
|
|
||||||
<Tab5 :userInfo="userInfo" v-if="userInfo && activeKey == 4" />
|
|
||||||
<!-- 5、家族病史 -->
|
|
||||||
<Tab6 :userInfo="userInfo" v-if="userInfo && activeKey == 5" />
|
|
||||||
<!-- 8、运动情况-->
|
|
||||||
<Tab8 :userInfo="userInfo" v-if="userInfo && activeKey == 7" />
|
|
||||||
<!-- 9、吸烟饮酒-->
|
|
||||||
<Tab9 :userInfo="userInfo" v-if="userInfo && activeKey == 8" />
|
|
||||||
<!-- 10、睡眠情况-->
|
|
||||||
<Tab10 :userInfo="userInfo" v-if="userInfo && activeKey == 9" />
|
|
||||||
<!-- 12、健康评估-->
|
|
||||||
<Tab12 :userInfo="userInfo" v-if="userInfo && activeKey == 11" />
|
|
||||||
<!-- 15、心理压力-->
|
|
||||||
<Tab15 :userInfo="userInfo" v-if="userInfo && activeKey == 14" />
|
|
||||||
<!-- 16、疫苗接种-->
|
|
||||||
<Tab16 :userInfo="userInfo" v-if="userInfo && activeKey == 15" />
|
|
||||||
<a-empty v-if="[6, 10, 12, 13, 16, 17].includes(activeKey)">
|
|
||||||
<template #description> 开发中,敬请期待... </template>
|
|
||||||
</a-empty>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
||||||
import { tabPane } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import { getFileAccessHttpUrl, getFamaleDefaultImage } from '/@/utils/common/compUtils';
|
|
||||||
import Tab1 from '/@/views/archivesManage/employee/fileMaintenance/components/tab1.vue';
|
|
||||||
import Tab2 from '/@/views/archivesManage/employee/fileMaintenance/components/tab2.vue';
|
|
||||||
import Tab3 from '/@/views/archivesManage/employee/fileMaintenance/components/tab3.vue';
|
|
||||||
import Tab4 from '/@/views/archivesManage/employee/fileMaintenance/components/tab4.vue';
|
|
||||||
import Tab5 from '/@/views/archivesManage/employee/fileMaintenance/components/tab5.vue';
|
|
||||||
import Tab6 from '/@/views/archivesManage/employee/fileMaintenance/components/tab6.vue';
|
|
||||||
import Tab8 from '/@/views/archivesManage/employee/fileMaintenance/components/tab8.vue';
|
|
||||||
import Tab9 from '/@/views/archivesManage/employee/fileMaintenance/components/tab9.vue';
|
|
||||||
import Tab10 from '/@/views/archivesManage/employee/fileMaintenance/components/tab10.vue';
|
|
||||||
import Tab16 from '/@/views/archivesManage/employee/fileMaintenance/components/tab16.vue';
|
|
||||||
import Tab15 from '/@/views/archivesManage/employee/fileMaintenance/components/tab15.vue';
|
|
||||||
import Tab12 from '/@/views/archivesManage/employee/fileMaintenance/components/tab12.vue';
|
|
||||||
const userInfo = ref();
|
|
||||||
const userUrl = ref();
|
|
||||||
const emit = defineEmits(['success']);
|
|
||||||
|
|
||||||
const [registerModal, { closeModal }] = useModalInner((data) => {
|
|
||||||
activeKey.value = 0;
|
|
||||||
userInfo.value = data.record;
|
|
||||||
userUrl.value = data.record?.avatar ? getFileAccessHttpUrl(data.record?.avatar) : getFamaleDefaultImage();
|
|
||||||
});
|
|
||||||
const activeKey = ref(0);
|
|
||||||
const mode = ref('left');
|
|
||||||
onMounted(() => {
|
|
||||||
activeKey.value = 0;
|
|
||||||
});
|
|
||||||
function handleCancel() {
|
|
||||||
emit('success');
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.outer {
|
|
||||||
flex-wrap: wrap;
|
|
||||||
flex-direction: column;
|
|
||||||
height: calc(75vh - 60px);
|
|
||||||
}
|
|
||||||
.user-info {
|
|
||||||
width: 100%;
|
|
||||||
border-bottom: 1px dashed #999;
|
|
||||||
display: flex;
|
|
||||||
padding: 10px;
|
|
||||||
height: 120px;
|
|
||||||
.user-avatar {
|
|
||||||
display: inline-block;
|
|
||||||
width: 100px;
|
|
||||||
height: 100px;
|
|
||||||
}
|
|
||||||
.user-info-content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-around;
|
|
||||||
margin-left: 10px;
|
|
||||||
.user-basic-info {
|
|
||||||
display: flex;
|
|
||||||
p {
|
|
||||||
margin-right: 30px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.content {
|
|
||||||
height: calc(100% - 120px);
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex: 1;
|
|
||||||
.right-top-title {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin: 10px;
|
|
||||||
}
|
|
||||||
:deep(.ant-tabs-nav) {
|
|
||||||
width: 200px !important;
|
|
||||||
}
|
|
||||||
:deep(.ant-tabs-tab-active) {
|
|
||||||
background: #e6f7ff;
|
|
||||||
color: #5087ec;
|
|
||||||
}
|
|
||||||
> div {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="position: relative">
|
|
||||||
<a-row>
|
|
||||||
<a-col :span="9">
|
|
||||||
<BasicForm @register="registerForm"></BasicForm>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="11">
|
|
||||||
<div class="holder-box" v-for="(item, index) in FieldHolder" :key="index">
|
|
||||||
{{ item ? `(${item})` : '' }}
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="4" style="text-align: center">
|
|
||||||
<BasicForm @register="registerForm2"></BasicForm>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-button type="primary" style="position: absolute; right: 10px; bottom: 10px" @click="handleOk" v-if="props.editType !== '1'">保存</a-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import BasicForm from '/@/components/Form/src/BasicForm.vue';
|
|
||||||
import { useForm } from '/@/components/Form';
|
|
||||||
import { formSchema, FieldHolder, formSchemaAvater } from '/@/views/archivesManage/employee/basicInfo/basicInfo.data';
|
|
||||||
import { userInfoEditApi } from '/@/views/information/employeeInformation/basicInformation/database/database.api';
|
|
||||||
import { onMounted, watch } from 'vue';
|
|
||||||
const emit = defineEmits();
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
editType: {
|
|
||||||
type: String,
|
|
||||||
default: () => '0',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
onMounted(async () => {
|
|
||||||
console.log(props.userInfo, '123333');
|
|
||||||
if (Object.keys(props.userInfo).length > 0) {
|
|
||||||
await setFieldsValue({ ...props.userInfo });
|
|
||||||
await setFieldsValue({
|
|
||||||
orgCode1: props.userInfo.orgCode.substring(0, 6),
|
|
||||||
idCardFind: props.userInfo.idCard,
|
|
||||||
orgCodeThree: props.userInfo.orgCode,
|
|
||||||
});
|
|
||||||
await setAvaterFieldsValue({ avatar: props.userInfo.avatar });
|
|
||||||
await clearValidate();
|
|
||||||
await clearAvaterValidate();
|
|
||||||
}
|
|
||||||
if (props.editType === '1') {
|
|
||||||
await setProps({ disabled: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
watch(
|
|
||||||
() => props.userInfo,
|
|
||||||
async () => {
|
|
||||||
await setFieldsValue({ ...props.userInfo });
|
|
||||||
await setFieldsValue({
|
|
||||||
orgCode1: props.userInfo.orgCode.substring(0, 6),
|
|
||||||
orgCodeThree: props.userInfo.orgCode,
|
|
||||||
idCardFind: props.userInfo.idCard,
|
|
||||||
});
|
|
||||||
await setAvaterFieldsValue({ avatar: props.userInfo.avatar });
|
|
||||||
await clearValidate();
|
|
||||||
await clearAvaterValidate();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
const [registerForm, { resetFields, setFieldsValue, validate, clearValidate, getFieldsValue, setProps }] = useForm({
|
|
||||||
schemas: formSchema,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
labelWidth: 100,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
});
|
|
||||||
const [
|
|
||||||
registerForm2,
|
|
||||||
{
|
|
||||||
resetFields: resetAvaterFields,
|
|
||||||
setFieldsValue: setAvaterFieldsValue,
|
|
||||||
validate: validateAvater,
|
|
||||||
clearValidate: clearAvaterValidate,
|
|
||||||
getFieldsValue: getAvaterFieldsValue,
|
|
||||||
},
|
|
||||||
] = useForm({
|
|
||||||
schemas: formSchemaAvater,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
});
|
|
||||||
|
|
||||||
async function handleOk() {
|
|
||||||
try {
|
|
||||||
const value = await validate();
|
|
||||||
const value1 = await validateAvater();
|
|
||||||
if (value.idCard.indexOf('*') != -1) {
|
|
||||||
delete value.idCard;
|
|
||||||
}
|
|
||||||
|
|
||||||
const params = {
|
|
||||||
...value,
|
|
||||||
...value1,
|
|
||||||
};
|
|
||||||
console.log(params);
|
|
||||||
await userInfoEditApi(params);
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.holder-box {
|
|
||||||
height: 52px;
|
|
||||||
line-height: 32px;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div v-show="!showView">
|
|
||||||
<a-radio-group v-model:value="heartType" button-style="solid" @change="hanldChange">
|
|
||||||
<a-radio-button value="0">手表</a-radio-button>
|
|
||||||
<a-radio-button value="1">问卷</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
<Table1 v-if="heartType == '0'" :userInfo="props.userInfo"></Table1>
|
|
||||||
<Table2 v-if="heartType == '1'" @go-detail="goDetail" :userInfo="props.userInfo"></Table2>
|
|
||||||
</div>
|
|
||||||
<Tab10Detail v-show="showView && info" :info="info" @go-back="goBack"></Tab10Detail>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import Table1 from '/@/views/archivesManage/employee/fileMaintenance/components/tab10/table1.vue';
|
|
||||||
import Table2 from '/@/views/archivesManage/employee/fileMaintenance/components/tab10/table2.vue';
|
|
||||||
import Tab10Detail from '/@/views/archivesManage/employee/fileMaintenance/components/tab10/tab10Detail.vue';
|
|
||||||
const heartType = ref('0');
|
|
||||||
const showView = ref(false);
|
|
||||||
const info = ref();
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
function hanldChange() {
|
|
||||||
// async function hanldChange() {
|
|
||||||
// setColumns(tab15Column(heartType.value));
|
|
||||||
// setProps({
|
|
||||||
// api: heartType.value == '0' ? tab15ListApi : psychoList,
|
|
||||||
// });
|
|
||||||
// await reload();
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
function goDetail(record) {
|
|
||||||
info.value = record;
|
|
||||||
showView.value = true;
|
|
||||||
console.log(record, 12322);
|
|
||||||
}
|
|
||||||
function goBack() {
|
|
||||||
showView.value = false;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div class="title">
|
|
||||||
<a-button type="primary" @click="goBack" class="addBtn">返回</a-button>
|
|
||||||
</div>
|
|
||||||
<div class="sleep">
|
|
||||||
<div>{{ info?.surveyName }}</div>
|
|
||||||
<div class="sleep-detail" v-for="(item, index) in info?.questionList" :key="index">
|
|
||||||
<div class="label">{{ item.childrenQuestions[0].title }}</div>
|
|
||||||
<div class="value" v-if="item.childrenQuestions[0].questionCode == 1"> {{ item.childrenQuestions[0].answer }} 小时 </div>
|
|
||||||
<div class="value" v-if="item.childrenQuestions[0].questionCode == 2"> {{ getAnswer(2, item.childrenQuestions[0].answer) }} </div>
|
|
||||||
<div class="value" v-if="item.childrenQuestions[0].questionCode == 3"> {{ getAnswer(3, item.childrenQuestions[0].answer) }} </div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
const emit = defineEmits(['go-back']);
|
|
||||||
const props = defineProps({
|
|
||||||
info: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
function getAnswer(type, value) {
|
|
||||||
if (type == 2) {
|
|
||||||
switch (value) {
|
|
||||||
case '0':
|
|
||||||
return '很好';
|
|
||||||
case '1':
|
|
||||||
return '较好';
|
|
||||||
case '2':
|
|
||||||
return '较差';
|
|
||||||
case '3':
|
|
||||||
return '很差';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (type == 3) {
|
|
||||||
switch (value) {
|
|
||||||
case '0':
|
|
||||||
return '无';
|
|
||||||
case '1':
|
|
||||||
return '< 1次/周';
|
|
||||||
case '2':
|
|
||||||
return '1-2次/周';
|
|
||||||
case '3':
|
|
||||||
return '≥3次/周';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function goBack() {
|
|
||||||
emit('go-back');
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.sleep {
|
|
||||||
margin: 20px;
|
|
||||||
.sleep-detail {
|
|
||||||
.label {
|
|
||||||
font-weight: bold;
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
.value {
|
|
||||||
margin: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,168 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="tab10-table1">
|
|
||||||
<div class="top">
|
|
||||||
<div class="top-left">
|
|
||||||
<a-tabs v-model:activeKey="activeKey" @change="changeTabs">
|
|
||||||
<a-tab-pane key="1" tab="全部"></a-tab-pane>
|
|
||||||
<a-tab-pane key="2" tab="选时"></a-tab-pane>
|
|
||||||
<a-tab-pane key="3" tab="日"></a-tab-pane>
|
|
||||||
<a-tab-pane key="4" tab="周"></a-tab-pane>
|
|
||||||
<a-tab-pane key="5" tab="月"></a-tab-pane>
|
|
||||||
<a-tab-pane key="6" tab="季"></a-tab-pane>
|
|
||||||
<a-tab-pane key="7" tab="年"></a-tab-pane>
|
|
||||||
</a-tabs>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="center" v-if="showPicker">
|
|
||||||
<a-date-picker v-model:value="dateValue" :picker="pickerType" v-if="!showRangePicker" @change="changeDate" />
|
|
||||||
|
|
||||||
<a-range-picker v-model:value="rangeValue" v-if="showRangePicker" @change="changeRange" />
|
|
||||||
</div>
|
|
||||||
<div class="bottom">
|
|
||||||
<BasicTable @register="registerTable" table-type="1">
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<div v-if="column.dataIndex == 'from'">穿戴设备</div>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import { BasicTable } from '/@/components/Table';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import { tab10List1Api } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
import { tab10Column1 } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
const showRangePicker = ref(false);
|
|
||||||
const pickerType = ref('');
|
|
||||||
const dateValue = ref(dayjs(new Date()));
|
|
||||||
const rangeValue = ref([dayjs(new Date().setDate(new Date().getDate() - 7)), dayjs(new Date())]);
|
|
||||||
const showPicker = ref(false);
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const activeKey = ref('1');
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: tab10List1Api,
|
|
||||||
columns: tab10Column1,
|
|
||||||
useSearchForm: false,
|
|
||||||
showActionColumn: false,
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params.userId = props.userInfo?.id;
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, setProps }] = tableContext;
|
|
||||||
function changeTabs() {
|
|
||||||
showRangePicker.value = false;
|
|
||||||
showPicker.value = true;
|
|
||||||
switch (activeKey.value) {
|
|
||||||
case '1':
|
|
||||||
showPicker.value = false;
|
|
||||||
break;
|
|
||||||
case '2':
|
|
||||||
showRangePicker.value = true;
|
|
||||||
break;
|
|
||||||
case '3':
|
|
||||||
pickerType.value = '';
|
|
||||||
break;
|
|
||||||
case '4':
|
|
||||||
pickerType.value = 'week';
|
|
||||||
break;
|
|
||||||
case '5':
|
|
||||||
pickerType.value = 'month';
|
|
||||||
break;
|
|
||||||
case '6':
|
|
||||||
pickerType.value = 'quarter';
|
|
||||||
break;
|
|
||||||
case '7':
|
|
||||||
pickerType.value = 'year';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function changeRange() {
|
|
||||||
updataTable();
|
|
||||||
}
|
|
||||||
function changeDate() {
|
|
||||||
updataTable();
|
|
||||||
}
|
|
||||||
function updataTable() {
|
|
||||||
let startOfWeek;
|
|
||||||
let endOfWeek;
|
|
||||||
if (activeKey.value == '1') {
|
|
||||||
startOfWeek = '';
|
|
||||||
endOfWeek = '';
|
|
||||||
} else if (activeKey.value == '2') {
|
|
||||||
startOfWeek = rangeValue.value ? rangeValue.value[0].format('YYYY-MM-DD') : '';
|
|
||||||
endOfWeek = rangeValue.value ? rangeValue.value[1].format('YYYY-MM-DD') : '';
|
|
||||||
} else {
|
|
||||||
switch (activeKey.value) {
|
|
||||||
case '3':
|
|
||||||
startOfWeek = dayjs(dateValue.value).startOf('day').format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(dateValue.value).endOf('day').format('YYYY-MM-DD');
|
|
||||||
break;
|
|
||||||
case '4':
|
|
||||||
startOfWeek = dayjs(dateValue.value).startOf('week').format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(dateValue.value).endOf('week').format('YYYY-MM-DD');
|
|
||||||
break;
|
|
||||||
case '5':
|
|
||||||
startOfWeek = dayjs(dateValue.value).startOf('month').format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(dateValue.value).endOf('month').format('YYYY-MM-DD');
|
|
||||||
break;
|
|
||||||
case '6':
|
|
||||||
const quarter = dayjs(dateValue.value).quarter();
|
|
||||||
if (quarter === 1) {
|
|
||||||
startOfWeek = dayjs(`${dayjs(dateValue.value).year()}-01-01`).format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(`${dayjs(dateValue.value).year()}-03-31`).format('YYYY-MM-DD');
|
|
||||||
} else if (quarter === 2) {
|
|
||||||
startOfWeek = dayjs(`${dayjs(dateValue.value).year()}-04-01`).format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(`${dayjs(dateValue.value).year()}-06-30`).format('YYYY-MM-DD');
|
|
||||||
} else if (quarter === 3) {
|
|
||||||
startOfWeek = dayjs(`${dayjs(dateValue.value).year()}-07-01`).format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(`${dayjs(dateValue.value).year()}-09-30`).format('YYYY-MM-DD');
|
|
||||||
} else if (quarter === 4) {
|
|
||||||
startOfWeek = dayjs(`${dayjs(dateValue.value).year()}-10-01`).format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(`${dayjs(dateValue.value).year()}-12-31`).format('YYYY-MM-DD');
|
|
||||||
}
|
|
||||||
// startOfWeek = dayjs(dateValue.value).startOf('quarter').format('YYYY-MM-DD');
|
|
||||||
// endOfWeek = dayjs(dateValue.value).endOf('quarter').format('YYYY-MM-DD');
|
|
||||||
break;
|
|
||||||
case '7':
|
|
||||||
startOfWeek = dayjs(dateValue.value).startOf('year').format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(dateValue.value).endOf('year').format('YYYY-MM-DD');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setProps({
|
|
||||||
beforeFetch: (parmas) => {
|
|
||||||
parmas.userId = props.userInfo?.id;
|
|
||||||
parmas.startTime = startOfWeek;
|
|
||||||
parmas.endTime = endOfWeek;
|
|
||||||
return parmas;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
reload({ page: 1 });
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.tab10-table1 {
|
|
||||||
.top {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
.top-left {
|
|
||||||
:deep(.ant-tabs-nav) {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
:deep(.ant-tabs-tab-active) {
|
|
||||||
background: #fff !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<BasicTable @register="registerTable" table-type="1">
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<div v-if="column.dataIndex == 'detail'">
|
|
||||||
<a-button type="link" @click="handleDetail(record)">问卷内容</a-button>
|
|
||||||
<!-- answerContent -->
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { BasicTable } from '/@/components/Table';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import { tab10Column2 } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import { tab10List2Api } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const emit = defineEmits(['go-detail']);
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: tab10List2Api,
|
|
||||||
columns: tab10Column2,
|
|
||||||
useSearchForm: false,
|
|
||||||
showActionColumn: false,
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params.userId = props.userInfo?.id;
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, setProps }] = tableContext;
|
|
||||||
|
|
||||||
function handleDetail(record) {
|
|
||||||
emit('go-detail', record.answerContent);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<BasicTable @register="registerTable">
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<div v-if="column.dataIndex == 'report'">
|
|
||||||
<a-button type="link" @click="handleExportPdf(record)">下载报告</a-button>
|
|
||||||
</div>
|
|
||||||
<div v-if="column.dataIndex == 'detail'">
|
|
||||||
<a-button type="link" @click="handleViewAnalysis(record)">问卷详情</a-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<Tab12Detail @register="registerDrawer" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { BasicTable } from '/@/components/Table';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
|
|
||||||
import { tab12Column } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import { tab12ListApi } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
import { exportPDF } from '/@/views/archive/riskAssessmentStatistics/riskAssessmentStatistics.api';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
|
||||||
import { useDrawer } from '/@/components/Drawer';
|
|
||||||
import Tab12Detail from '/@/views/archivesManage/employee/fileMaintenance/components/tab12/tab12Detail.vue';
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: tab12ListApi,
|
|
||||||
columns: tab12Column,
|
|
||||||
useSearchForm: false,
|
|
||||||
formConfig: {},
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params.userId = props.userInfo.id;
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
showActionColumn: false,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, setColumns, setProps }] = tableContext;
|
|
||||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
|
||||||
function handleViewAnalysis(record) {
|
|
||||||
openDrawer(true, {
|
|
||||||
record,
|
|
||||||
userInfo: props.userInfo,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: false,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出PDF
|
|
||||||
* @param record
|
|
||||||
*/
|
|
||||||
async function handleExportPdf(record: Recordable) {
|
|
||||||
try {
|
|
||||||
const { code, result, message: info } = await exportPDF({ logId: record.logId });
|
|
||||||
if (code !== 200) {
|
|
||||||
message.warn(info || '导出失败');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const url = getFileAccessHttpUrl(result);
|
|
||||||
if (url) {
|
|
||||||
window.open(url);
|
|
||||||
} else {
|
|
||||||
message.warn(info || '获取文件地址失败');
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
message.warn(e?.message || '导出失败');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicDrawer v-bind="$attrs" :showFooter="false" @register="registerDrawer" destroyOnClose title="查看问卷详情" :width="700" :maskClosable="true">
|
|
||||||
<a-descriptions v-if="Object.keys(descriptions).length > 0" title="HMS评估报告" bordered>
|
|
||||||
<a-descriptions-item v-for="(item, k) in descriptions" :key="k" :label="k" :span="4">{{ item }}</a-descriptions-item>
|
|
||||||
</a-descriptions>
|
|
||||||
<a-empty v-else style="margin-top: 150px" />
|
|
||||||
</BasicDrawer>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
|
|
||||||
import { getQsDetail, QsDetail } from '/@/views/archive/riskAssessmentStatistics/riskAssessmentStatistics.api';
|
|
||||||
|
|
||||||
const descriptions = ref({});
|
|
||||||
const userInfo = ref();
|
|
||||||
//表单赋值
|
|
||||||
const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
|
|
||||||
setDrawerProps({
|
|
||||||
confirmLoading: false,
|
|
||||||
showCancelBtn: !!data?.showFooter,
|
|
||||||
showOkBtn: !!data?.showFooter,
|
|
||||||
});
|
|
||||||
descriptions.value = {};
|
|
||||||
userInfo.value = data.userInfo;
|
|
||||||
await getDetail(data.record);
|
|
||||||
});
|
|
||||||
async function getDetail(record: QsDetail) {
|
|
||||||
try {
|
|
||||||
const params = <QsDetail>{ logId: record.logId, realName: userInfo.value.realname, time: record.createTime };
|
|
||||||
let res = await getQsDetail(params);
|
|
||||||
if (res) {
|
|
||||||
descriptions.value = res;
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="less"></style>
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<a-radio-group v-model:value="heartType" button-style="solid" @change="hanldChange">
|
|
||||||
<a-radio-button value="0">心理健康</a-radio-button>
|
|
||||||
<a-radio-button value="1">综合心理</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
<BasicTable @register="registerTable">
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<div v-if="column.dataIndex == 'report'">
|
|
||||||
<a-button type="link" @click="handleExportPdf(record)">下载报告</a-button>
|
|
||||||
</div>
|
|
||||||
<div v-if="column.dataIndex == 'detail'">
|
|
||||||
<a-button type="link" @click="handleViewAnalysis(record)">问卷详情</a-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<AnalysisReportModal @register="analysisReportModal" ref="reportModal"></AnalysisReportModal>
|
|
||||||
<Tab15Detail @register="registerDrawer" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { BasicTable } from '/@/components/Table';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import AnalysisReportModal from '/@/views/interveneNew/psychology/selfdiagnosisAndJudgment/selfDiagnosis/components/analysisReportModal.vue';
|
|
||||||
import { exportPDF } from '/@/views/archive/psychologicalAssessmentStatistics/psychologicalAssessmentStatistics.api';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
import { tab15Column } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import { psychoList, tab15ListApi } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
|
||||||
import { useDrawer } from '/@/components/Drawer';
|
|
||||||
import Tab15Detail from '/@/views/archivesManage/employee/fileMaintenance/components/tab15/tab15Detail.vue';
|
|
||||||
const heartType = ref('0');
|
|
||||||
const [analysisReportModal, { openModal }] = useModal();
|
|
||||||
const reportModal = ref(null);
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: heartType.value == '0' ? tab15ListApi : psychoList,
|
|
||||||
columns: tab15Column(heartType.value),
|
|
||||||
useSearchForm: false,
|
|
||||||
formConfig: {},
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params.userId = props.userInfo.id;
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
showActionColumn: false,
|
|
||||||
// canResize: false,
|
|
||||||
// btnArr: ['add', 'edit', 'delete', 'export', 'print'],
|
|
||||||
// formConfig: {
|
|
||||||
// schemas: searchFormSchema,tab15ListApi
|
|
||||||
// },
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, setColumns, setProps }] = tableContext;
|
|
||||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
|
||||||
async function hanldChange() {
|
|
||||||
setColumns(tab15Column(heartType.value));
|
|
||||||
setProps({
|
|
||||||
api: heartType.value == '0' ? tab15ListApi : psychoList,
|
|
||||||
});
|
|
||||||
await reload();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 导出PDF报告
|
|
||||||
* @param record
|
|
||||||
*/
|
|
||||||
async function handleExportPdf(record: Recordable) {
|
|
||||||
try {
|
|
||||||
const { code, result, message: info } = await exportPDF({ evaluationId: record.evaluationId });
|
|
||||||
if (code !== 200) {
|
|
||||||
message.warn(info || '导出失败');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const url = getFileAccessHttpUrl(result);
|
|
||||||
if (url) {
|
|
||||||
window.open(url);
|
|
||||||
} else {
|
|
||||||
message.warn(info || '获取文件地址失败');
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
message.warn(e?.message || '导出失败');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function handleViewAnalysis(record) {
|
|
||||||
if (heartType.value == '0') {
|
|
||||||
openDrawer(true, {
|
|
||||||
record,
|
|
||||||
userInfo: props.userInfo,
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: false,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
openModal(true, {
|
|
||||||
record,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicDrawer v-bind="$attrs" :showFooter="false" @register="registerDrawer" destroyOnClose title="查看问卷详情" :width="700" :maskClosable="true">
|
|
||||||
<a-descriptions v-if="Object.keys(descriptions).length > 0" title="HMS评估报告" bordered>
|
|
||||||
<a-descriptions-item v-for="(item, k) in descriptions" :key="k" :label="k" :span="4">{{ item }}</a-descriptions-item>
|
|
||||||
</a-descriptions>
|
|
||||||
<a-empty v-else style="margin-top: 150px" />
|
|
||||||
</BasicDrawer>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
|
|
||||||
import { getQsDetail, QsDetail } from '/@/views/archive/psychologicalAssessmentStatistics/psychologicalAssessmentStatistics.api';
|
|
||||||
|
|
||||||
const descriptions = ref({});
|
|
||||||
const userInfo = ref();
|
|
||||||
//表单赋值
|
|
||||||
const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
|
|
||||||
setDrawerProps({
|
|
||||||
confirmLoading: false,
|
|
||||||
showCancelBtn: !!data?.showFooter,
|
|
||||||
showOkBtn: !!data?.showFooter,
|
|
||||||
});
|
|
||||||
descriptions.value = {};
|
|
||||||
userInfo.value = data.userInfo;
|
|
||||||
await getDetail(data.record);
|
|
||||||
});
|
|
||||||
async function getDetail(record: QsDetail) {
|
|
||||||
try {
|
|
||||||
const params = <QsDetail>{ evaluationId: record.evaluationId, realName: userInfo.value.realname, time: record.createTime };
|
|
||||||
let res = await getQsDetail(params);
|
|
||||||
if (res) {
|
|
||||||
descriptions.value = res;
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="less"></style>
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div v-if="!showAddView">
|
|
||||||
<BasicTables @register="registerTable" :row-selection="rowSelection">
|
|
||||||
<template #btn>
|
|
||||||
<a-button type="primary" @click="handleAdd">新增</a-button>
|
|
||||||
<a-button type="primary" @click="handleEdit">修改</a-button>
|
|
||||||
<a-button type="primary" @click="handleDelete">删除</a-button>
|
|
||||||
</template>
|
|
||||||
</BasicTables>
|
|
||||||
</div>
|
|
||||||
<div v-if="showAddView">
|
|
||||||
<tab16Add :update="addOrEdit" :userId="props.userInfo.id" :tab16Info="tab16Info" @go-back="goBack"></tab16Add>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { BasicTables } from '/@/components/Table';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { tab16Column } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import tab16Add from '/@/views/archivesManage/employee/fileMaintenance/components/tab16/tab16Add.vue';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
import { tab16ListApi, tab16DeleteApi } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const tab16Info = ref();
|
|
||||||
const { tableContext, onExportXls } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: tab16ListApi,
|
|
||||||
columns: tab16Column,
|
|
||||||
btnArr: ['add', 'edit', 'delete', 'search', 'export', 'print'],
|
|
||||||
showIndexColumn: true,
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params.userId = props.userInfo.id;
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const showAddView = ref(false);
|
|
||||||
const addOrEdit = ref(false);
|
|
||||||
const [registerTable, { reload, getForm }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
|
|
||||||
function goBack() {
|
|
||||||
showAddView.value = false;
|
|
||||||
selectedRowKeys.value = [];
|
|
||||||
selectedRows.value = [];
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
function handleAdd() {
|
|
||||||
showAddView.value = true;
|
|
||||||
tab16Info.value = {};
|
|
||||||
}
|
|
||||||
function handleEdit() {
|
|
||||||
console.log(selectedRows.value);
|
|
||||||
if (selectedRowKeys.value.length != 1) {
|
|
||||||
message.warning('请选择一条数据');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
tab16Info.value = selectedRows.value[0];
|
|
||||||
addOrEdit.value = true;
|
|
||||||
showAddView.value = true;
|
|
||||||
}
|
|
||||||
function handleDelete() {
|
|
||||||
console.log(selectedRows.value);
|
|
||||||
if (selectedRowKeys.value.length == 0) {
|
|
||||||
message.warning('请选择需要删除的记录');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const idArr = selectedRows.value.map((item) => {
|
|
||||||
return item.id;
|
|
||||||
});
|
|
||||||
tab16DeleteApi({ ids: idArr }, reload);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="add-content">
|
|
||||||
<div class="title">
|
|
||||||
<a-button type="primary" @click="goBack" class="addBtn">返回</a-button>
|
|
||||||
<div class="name"> 个人疫苗接种史-{{ update ? '修改' : '新增' }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="form">
|
|
||||||
<a-row>
|
|
||||||
<a-col :span="8">
|
|
||||||
<BasicForm @register="registerForm" />
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12" class="right-btn">
|
|
||||||
<a-button type="primary" @click="handleSuccess">保存</a-button>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { BasicForm, useForm } from '/@/components/Form/index';
|
|
||||||
import { tab16Schemas } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import { tab16AddApi, tab16EditApi } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
const emit = defineEmits(['go-back']);
|
|
||||||
const props = defineProps({
|
|
||||||
update: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
userId: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
tab16Info: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerForm, { setProps, resetFields, setFieldsValue, validate, updateSchema, clearValidate }] = useForm({
|
|
||||||
labelWidth: 120,
|
|
||||||
schemas: tab16Schemas,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
});
|
|
||||||
const infoId = ref();
|
|
||||||
onMounted(async () => {
|
|
||||||
if (props.update) {
|
|
||||||
infoId.value = props.tab16Info.id;
|
|
||||||
await setFieldsValue(props.tab16Info);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
function goBack() {
|
|
||||||
emit('go-back');
|
|
||||||
}
|
|
||||||
async function handleSuccess() {
|
|
||||||
try {
|
|
||||||
const value = await validate();
|
|
||||||
value.userId = props.userId;
|
|
||||||
console.log(value);
|
|
||||||
if (props.update) {
|
|
||||||
value.id = infoId.value;
|
|
||||||
await tab16EditApi(value);
|
|
||||||
} else {
|
|
||||||
await tab16AddApi(value);
|
|
||||||
}
|
|
||||||
goBack();
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.add-content {
|
|
||||||
.title {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
|
||||||
justify-content: space-around;
|
|
||||||
margin-top: 20px;
|
|
||||||
.addBtn {
|
|
||||||
position: absolute;
|
|
||||||
left: 10px;
|
|
||||||
}
|
|
||||||
.name {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.form {
|
|
||||||
margin-top: 20px;
|
|
||||||
.right-btn {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: end;
|
|
||||||
align-items: flex-end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,714 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="position: relative">
|
|
||||||
<BasicForm @register="registerForm" class="jeecg-form">
|
|
||||||
<template #first>
|
|
||||||
<div class="sub">基本信息:</div>
|
|
||||||
</template>
|
|
||||||
<template #second>
|
|
||||||
<div class="sub">住院信息:</div>
|
|
||||||
</template>
|
|
||||||
<template #third>
|
|
||||||
<div class="sub">分类信息:</div>
|
|
||||||
</template>
|
|
||||||
<template #A>
|
|
||||||
<a-form :model="data1" class="option-form" ref="optionForm">
|
|
||||||
<a-form-item-rest>
|
|
||||||
<div class="table-d">
|
|
||||||
<div class="table-td-d d1">大病名称</div>
|
|
||||||
<div class="table-td-d d1">确诊年份</div>
|
|
||||||
<div class="table-td-d d1">确诊医院</div>
|
|
||||||
<div class="table-td-d d1">大病状态</div>
|
|
||||||
<div class="table-td-d d1">治疗情况</div>
|
|
||||||
<div class="table-td-d d1">
|
|
||||||
<span v-if="props.editType !== '1'" style="color: #1890ff; cursor: pointer" @click="addItem('a')"> 添加 </span>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<template v-for="(item, index) in data1.option" :key="`temp${index}`">
|
|
||||||
<div class="table-d table-d-d">
|
|
||||||
<div class="table-td-d tabled-td-d-d d1">
|
|
||||||
<a-form-item
|
|
||||||
:name="['option', index, 'name']"
|
|
||||||
:rules="{
|
|
||||||
required: true,
|
|
||||||
// message: `请输入第${index}个大病名称`,
|
|
||||||
message: '',
|
|
||||||
}"
|
|
||||||
:disabled="props.editType === '1'"
|
|
||||||
>
|
|
||||||
<JDictSelectTag
|
|
||||||
style="max-width: 100%"
|
|
||||||
v-model:value="item.name"
|
|
||||||
placeholder="请选择大病名称"
|
|
||||||
dictCode="ill_type"
|
|
||||||
:disabled="props.editType === '1'"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d1">
|
|
||||||
<a-form-item :name="['option', index, 'time']">
|
|
||||||
<a-date-picker
|
|
||||||
:disabled="props.editType === '1'"
|
|
||||||
v-model:value="item.time"
|
|
||||||
picker="year"
|
|
||||||
value-format="YYYY"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d1">
|
|
||||||
<a-form-item :name="['option', index, 'hospital']">
|
|
||||||
<a-input :disabled="props.editType === '1'" v-model:value="item.hospital" placeholder="请输入确诊医院" />
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d1 user-group">
|
|
||||||
<a-form-item
|
|
||||||
:name="['option', index, 'status']"
|
|
||||||
:rules="{
|
|
||||||
required: true,
|
|
||||||
// message: `请选择第${index}个大病状态`,
|
|
||||||
message: '',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<JDictSelectTag
|
|
||||||
style="max-width: 100%"
|
|
||||||
v-model:value="item.status"
|
|
||||||
placeholder="请选择大病状态"
|
|
||||||
dictCode="archives_ill_status"
|
|
||||||
:disabled="props.editType === '1'"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d1">
|
|
||||||
<a-form-item :name="['option', index, 'cure']">
|
|
||||||
<a-input :disabled="props.editType === '1'" v-model:value="item.cure" placeholder="请输入治疗情况" />
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d1">
|
|
||||||
<span v-if="props.editType !== '1'" style="color: #1890ff; cursor: pointer" @click="delItem('a', index)">
|
|
||||||
删除
|
|
||||||
</span>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</a-form-item-rest>
|
|
||||||
</a-form>
|
|
||||||
</template>
|
|
||||||
<template #B>
|
|
||||||
<a-form :model="data2" class="option-form" ref="optionForm">
|
|
||||||
<a-form-item-rest>
|
|
||||||
<div class="table-d">
|
|
||||||
<div class="table-td-d d2">慢病名称</div>
|
|
||||||
<div class="table-td-d d2">确诊年份</div>
|
|
||||||
<div class="table-td-d d2">确诊医院</div>
|
|
||||||
<div class="table-td-d d2">治疗情况</div>
|
|
||||||
<div class="table-td-d d2">
|
|
||||||
<span v-if="props.editType !== '1'" style="color: #1890ff; cursor: pointer" @click="addItem('b')"> 添加 </span>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<template v-for="(item, index) in data2.option" :key="`temp${index}`">
|
|
||||||
<div class="table-d table-d-d">
|
|
||||||
<div class="table-td-d tabled-td-d-d d2">
|
|
||||||
<a-form-item
|
|
||||||
:name="['option', index, 'name']"
|
|
||||||
:rules="{
|
|
||||||
required: true,
|
|
||||||
// message: `请输入第${index}个大病名称`,
|
|
||||||
message: '',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<JDictSelectTag
|
|
||||||
style="max-width: 100%"
|
|
||||||
v-model:value="item.name"
|
|
||||||
placeholder="请选择慢病名称"
|
|
||||||
dictCode="hms_disease_type"
|
|
||||||
:disabled="props.editType === '1'"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d2">
|
|
||||||
<a-form-item :name="['option', index, 'time']">
|
|
||||||
<a-date-picker
|
|
||||||
:disabled="props.editType === '1'"
|
|
||||||
v-model:value="item.time"
|
|
||||||
picker="year"
|
|
||||||
value-format="YYYY"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d2">
|
|
||||||
<a-form-item :name="['option', index, 'hospital']">
|
|
||||||
<a-input :disabled="props.editType === '1'" v-model:value="item.hospital" placeholder="请输入确诊医院" />
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d2">
|
|
||||||
<a-form-item :name="['option', index, 'cure']">
|
|
||||||
<a-input :disabled="props.editType === '1'" v-model:value="item.cure" placeholder="请输入治疗情况" />
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d2">
|
|
||||||
<span v-if="props.editType !== '1'" style="color: #1890ff; cursor: pointer" @click="delItem('b', index)">
|
|
||||||
删除
|
|
||||||
</span>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</a-form-item-rest>
|
|
||||||
</a-form>
|
|
||||||
</template>
|
|
||||||
<template #C>
|
|
||||||
<a-form :model="data3" class="option-form" ref="optionForm">
|
|
||||||
<a-form-item-rest>
|
|
||||||
<div class="table-d">
|
|
||||||
<div class="table-td-d d3">指标名称</div>
|
|
||||||
<div class="table-td-d d3">指标值</div>
|
|
||||||
<div class="table-td-d d3">参考范围</div>
|
|
||||||
<div class="table-td-d d3">确诊年份</div>
|
|
||||||
<div class="table-td-d d3">确诊医院</div>
|
|
||||||
<div class="table-td-d d3">
|
|
||||||
<span v-if="props.editType !== '1'" style="color: #1890ff; cursor: pointer" @click="addItem('c')"> 添加 </span>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<template v-for="(item, index) in data3.option" :key="`temp${index}`">
|
|
||||||
<div class="table-d table-d-d">
|
|
||||||
<div class="table-td-d tabled-td-d-d d3">
|
|
||||||
<a-input :disabled="props.editType === '1'" v-model:value="item.name" readonly />
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d3">
|
|
||||||
<a-input :disabled="props.editType === '1'" v-model:value="item.value" readonly />
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d3">
|
|
||||||
<a-input :disabled="props.editType === '1'" v-model:value="item.scope" readonly />
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d3">
|
|
||||||
<a-form-item :name="['option', index, 'hospital']">
|
|
||||||
<a-input :disabled="props.editType === '1'" v-model:value="item.time" readonly />
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d3">
|
|
||||||
<a-form-item :name="['option', index, 'hospital']">
|
|
||||||
<a-input :disabled="props.editType === '1'" v-model:value="item.hospital" readonly />
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d3">
|
|
||||||
<span v-if="props.editType !== '1'" style="color: #1890ff; cursor: pointer" @click="delItem('c', index)">
|
|
||||||
删除
|
|
||||||
</span>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</a-form-item-rest>
|
|
||||||
</a-form>
|
|
||||||
</template>
|
|
||||||
<template #D>
|
|
||||||
<a-form :model="data4" class="option-form" ref="optionForm">
|
|
||||||
<a-form-item-rest>
|
|
||||||
<div class="table-d">
|
|
||||||
<div class="table-td-d d4">疾病名称</div>
|
|
||||||
<div class="table-td-d d4">风险等级</div>
|
|
||||||
<div class="table-td-d d4">评估年份</div>
|
|
||||||
<div class="table-td-d d4">
|
|
||||||
<span v-if="props.editType !== '1'" style="color: #1890ff; cursor: pointer" @click="addItem('d')"> 添加 </span>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<template v-for="(item, index) in data4.option" :key="`temp${index}`">
|
|
||||||
<div class="table-d table-d-d">
|
|
||||||
<div class="table-td-d tabled-td-d-d d4">
|
|
||||||
<a-input :disabled="props.editType === '1'" v-model:value="item.name" readonly />
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d4">
|
|
||||||
<a-input :disabled="props.editType === '1'" v-model:value="item.levelDesc" readonly />
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d4">
|
|
||||||
<a-input :disabled="props.editType === '1'" v-model:value="item.time" readonly />
|
|
||||||
</div>
|
|
||||||
<div class="table-td-d tabled-td-d-d d4">
|
|
||||||
<span v-if="props.editType !== '1'" style="color: #1890ff; cursor: pointer" @click="delItem('d', index)">
|
|
||||||
删除
|
|
||||||
</span>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</a-form-item-rest>
|
|
||||||
</a-form>
|
|
||||||
</template>
|
|
||||||
</BasicForm>
|
|
||||||
<a-button type="primary" @click="handleSubmit" style="position: absolute; right: 10px; bottom: 10px" v-if="props.editType !== '1'"
|
|
||||||
>保存</a-button
|
|
||||||
>
|
|
||||||
<ChooseSome
|
|
||||||
class="choose-some"
|
|
||||||
:width="1000"
|
|
||||||
@register="examinationModal"
|
|
||||||
@select-some="onSelectUserOk"
|
|
||||||
title="体检报告"
|
|
||||||
zIndex="1001"
|
|
||||||
:tableprops="tableProps"
|
|
||||||
selection-type="checkbox"
|
|
||||||
/>
|
|
||||||
<ChooseSome
|
|
||||||
class="choose-some"
|
|
||||||
:width="1000"
|
|
||||||
@register="examinationModal1"
|
|
||||||
@select-some="onSelectUserOk1"
|
|
||||||
title="评估结果"
|
|
||||||
zIndex="1001"
|
|
||||||
:tableprops="tableProps1"
|
|
||||||
selection-type="checkbox"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicForm from '/@/components/Form/src/BasicForm.vue';
|
|
||||||
import { useDrawer, useDrawerInner } from '/@/components/Drawer';
|
|
||||||
import { useForm } from '/@/components/Form';
|
|
||||||
import { mSearchSchema, mColumns, mSearchSchema1, mColumns1 } from '/@/views/archive/fiveClassPeople/index.data';
|
|
||||||
import { onMounted, ref, watch } from 'vue';
|
|
||||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
|
||||||
import {
|
|
||||||
groupUserAApi,
|
|
||||||
groupUserBApi,
|
|
||||||
groupUserCApi,
|
|
||||||
groupUserDApi,
|
|
||||||
groupUserEApi,
|
|
||||||
groupUserCLatestReportApi,
|
|
||||||
groupUserDLatestReportApi,
|
|
||||||
detailAApi,
|
|
||||||
detailBApi,
|
|
||||||
detailCApi,
|
|
||||||
detailDApi,
|
|
||||||
groupUserExtByUserIdApi,
|
|
||||||
editByUserIdApi,
|
|
||||||
} from '/@/views/archive/fiveClassPeople/index.api';
|
|
||||||
import ChooseSome from '/@/views/compoents/chooseSome/index.vue';
|
|
||||||
import { tab2schemas } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
editType: {
|
|
||||||
type: String,
|
|
||||||
default: () => '0',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const data1 = ref<object>({
|
|
||||||
option: [],
|
|
||||||
});
|
|
||||||
const itemA = ref<object>({
|
|
||||||
name: '',
|
|
||||||
time: '',
|
|
||||||
hospital: '',
|
|
||||||
status: '',
|
|
||||||
});
|
|
||||||
const data2 = ref<object>({
|
|
||||||
option: [],
|
|
||||||
});
|
|
||||||
const itemB = ref<object>({
|
|
||||||
name: '',
|
|
||||||
time: '',
|
|
||||||
hospital: '',
|
|
||||||
});
|
|
||||||
const data3 = ref<object>({
|
|
||||||
option: [],
|
|
||||||
});
|
|
||||||
const data4 = ref<object>({
|
|
||||||
option: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
const [examinationModal, { openDrawer }] = useDrawer();
|
|
||||||
const [examinationModal1, { openDrawer: openDrawer1 }] = useDrawer();
|
|
||||||
|
|
||||||
const tableProps = ref({
|
|
||||||
tableProps: {
|
|
||||||
api: groupUserCLatestReportApi,
|
|
||||||
columns: mColumns,
|
|
||||||
canResize: false,
|
|
||||||
immediate: false,
|
|
||||||
clearSelectOnPageChange: false,
|
|
||||||
rowKey: (record: Recordable) => {
|
|
||||||
return JSON.stringify({
|
|
||||||
peItemName: record?.peItemName,
|
|
||||||
peResult: record?.peResult,
|
|
||||||
printContext: record?.printContext,
|
|
||||||
medicalYear: record?.medicalYear,
|
|
||||||
hospitalName: record?.hospitalName,
|
|
||||||
uniItemId: record?.uniItemId,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params['userId'] = props.userInfo.id;
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
afterFetch: (data) => {
|
|
||||||
let result: any[] = [];
|
|
||||||
|
|
||||||
data.length > 0 &&
|
|
||||||
data.map((item) => {
|
|
||||||
if (item?.senResultRes && item?.senResultRes.length > 0) {
|
|
||||||
item?.senResultRes.map((it) => {
|
|
||||||
if (it?.thirdResultRes && it?.thirdResultRes.length > 0) {
|
|
||||||
result = result.concat(it?.thirdResultRes);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return result;
|
|
||||||
},
|
|
||||||
formConfig: {
|
|
||||||
schemas: mSearchSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
labelWidth: 140,
|
|
||||||
baseColProps: {
|
|
||||||
xs: 12,
|
|
||||||
sm: 12,
|
|
||||||
md: 12,
|
|
||||||
lg: 12,
|
|
||||||
xl: 12,
|
|
||||||
xxl: 12,
|
|
||||||
},
|
|
||||||
actionColOptions: {
|
|
||||||
style: {
|
|
||||||
paddingLeft: '144px',
|
|
||||||
},
|
|
||||||
span: 24,
|
|
||||||
offset: 0,
|
|
||||||
xs: 12,
|
|
||||||
sm: 12,
|
|
||||||
md: 12,
|
|
||||||
lg: 12,
|
|
||||||
xl: 12,
|
|
||||||
xxl: 12,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
showActionColumn: false,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const tableProps1 = ref({
|
|
||||||
tableProps: {
|
|
||||||
api: groupUserDLatestReportApi,
|
|
||||||
columns: mColumns1,
|
|
||||||
canResize: false,
|
|
||||||
immediate: false,
|
|
||||||
clearSelectOnPageChange: false,
|
|
||||||
rowKey: (record: Recordable) => {
|
|
||||||
return JSON.stringify({
|
|
||||||
name: record?.name,
|
|
||||||
levelDesc: record?.levelDesc,
|
|
||||||
level: record?.level,
|
|
||||||
year: record?.year + '',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params['userId'] = props.userInfo.id;
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
showTableSetting: true,
|
|
||||||
tableSetting: {
|
|
||||||
redo: true,
|
|
||||||
setting: false,
|
|
||||||
},
|
|
||||||
// afterFetch: (data) => {
|
|
||||||
// let result: any[] = [];
|
|
||||||
//
|
|
||||||
// data.length > 0 &&
|
|
||||||
// data.map((item) => {
|
|
||||||
// if (item?.senResultRes && item?.senResultRes.length > 0) {
|
|
||||||
// item?.senResultRes.map((it) => {
|
|
||||||
// if (it?.thirdResultRes && it?.thirdResultRes.length > 0) {
|
|
||||||
// result = result.concat(it?.thirdResultRes);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
//
|
|
||||||
// return result;
|
|
||||||
// },
|
|
||||||
useSearchForm: false,
|
|
||||||
formConfig: {
|
|
||||||
schemas: mSearchSchema1,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
labelWidth: 120,
|
|
||||||
baseColProps: {
|
|
||||||
xs: 12,
|
|
||||||
sm: 12,
|
|
||||||
md: 12,
|
|
||||||
lg: 12,
|
|
||||||
xl: 12,
|
|
||||||
xxl: 12,
|
|
||||||
},
|
|
||||||
actionColOptions: {
|
|
||||||
style: {
|
|
||||||
paddingLeft: '122px',
|
|
||||||
},
|
|
||||||
span: 24,
|
|
||||||
offset: 0,
|
|
||||||
xs: 12,
|
|
||||||
sm: 12,
|
|
||||||
md: 12,
|
|
||||||
lg: 12,
|
|
||||||
xl: 12,
|
|
||||||
xxl: 12,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
showActionColumn: false,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
onMounted(async () => {
|
|
||||||
await resetFields();
|
|
||||||
data1.value.option = [];
|
|
||||||
data2.value.option = [];
|
|
||||||
data3.value.option = [];
|
|
||||||
data4.value.option = [];
|
|
||||||
await preData();
|
|
||||||
if (props.editType === '1') {
|
|
||||||
await setProps({ disabled: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.userInfo,
|
|
||||||
async () => {
|
|
||||||
await preData();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
async function preData() {
|
|
||||||
let res = {};
|
|
||||||
switch (props.userInfo.userGroup) {
|
|
||||||
case 'a':
|
|
||||||
const { records: r1 } = await detailAApi({ pageNo: 1, pageSize: 9999, userId: props.userInfo.id });
|
|
||||||
res = await groupUserExtByUserIdApi({ pageNo: 1, pageSize: 9999, userId: props.userInfo.id });
|
|
||||||
data1.value.option = r1;
|
|
||||||
break;
|
|
||||||
case 'b':
|
|
||||||
const { records: r2 } = await detailBApi({ pageNo: 1, pageSize: 9999, userId: props.userInfo.id });
|
|
||||||
res = await groupUserExtByUserIdApi({ pageNo: 1, pageSize: 9999, userId: props.userInfo.id });
|
|
||||||
data2.value.option = r2;
|
|
||||||
break;
|
|
||||||
case 'c':
|
|
||||||
const { records: r3 } = await detailCApi({ pageNo: 1, pageSize: 9999, userId: props.userInfo.id });
|
|
||||||
data3.value.option = r3;
|
|
||||||
break;
|
|
||||||
case 'd':
|
|
||||||
const { records: r4 } = await detailDApi({ pageNo: 1, pageSize: 9999, userId: props.userInfo.id });
|
|
||||||
data4.value.option = r4.map((item: any) => ({
|
|
||||||
name: item?.name,
|
|
||||||
levelDesc: item?.levelDesc,
|
|
||||||
level: item?.level,
|
|
||||||
time: item?.time,
|
|
||||||
}));
|
|
||||||
console.log(data4.value.option);
|
|
||||||
break;
|
|
||||||
case 'e':
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
await setFieldsValue({
|
|
||||||
...props.userInfo,
|
|
||||||
...res,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function addItem(type) {
|
|
||||||
console.log(type);
|
|
||||||
switch (type) {
|
|
||||||
case 'a':
|
|
||||||
data1.value?.option.push(JSON.parse(JSON.stringify(itemA.value)));
|
|
||||||
break;
|
|
||||||
case 'b':
|
|
||||||
data2.value?.option.push(JSON.parse(JSON.stringify(itemB.value)));
|
|
||||||
break;
|
|
||||||
case 'c':
|
|
||||||
const list = data3.value.option.map((item: any) => {
|
|
||||||
console.log(item);
|
|
||||||
return JSON.stringify({
|
|
||||||
peItemName: item?.name,
|
|
||||||
peResult: item?.value,
|
|
||||||
printContext: item?.scope,
|
|
||||||
medicalYear: item?.time,
|
|
||||||
hospitalName: item?.hospital,
|
|
||||||
uniItemId: item?.uniItemId,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
openDrawer(true, {
|
|
||||||
selectedRowKeys: list,
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case 'd':
|
|
||||||
const list1 = data4.value.option.map((item: any) => {
|
|
||||||
return JSON.stringify({
|
|
||||||
name: item?.name,
|
|
||||||
levelDesc: item?.levelDesc,
|
|
||||||
level: item?.level,
|
|
||||||
year: item?.time + '',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
console.log(list1, 1);
|
|
||||||
openDrawer1(true, {
|
|
||||||
selectedRowKeys: list1,
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function delItem(type, index) {
|
|
||||||
switch (type) {
|
|
||||||
case 'a':
|
|
||||||
data1.value?.option.splice(index, 1);
|
|
||||||
break;
|
|
||||||
case 'b':
|
|
||||||
data2.value?.option.splice(index, 1);
|
|
||||||
break;
|
|
||||||
case 'c':
|
|
||||||
data3.value?.option.splice(index, 1);
|
|
||||||
break;
|
|
||||||
case 'd':
|
|
||||||
data4.value?.option.splice(index, 1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const [registerForm, { setFieldsValue, resetFields, validate, getFieldsValue, setProps }] = useForm({
|
|
||||||
schemas: tab2schemas,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
labelWidth: 130,
|
|
||||||
});
|
|
||||||
|
|
||||||
const optionForm = ref();
|
|
||||||
|
|
||||||
async function handleSubmit() {
|
|
||||||
try {
|
|
||||||
const values = await validate();
|
|
||||||
let values1;
|
|
||||||
// if (values['userGroup'] != 'e') {
|
|
||||||
if (!['c', 'd', 'e'].includes(values['userGroup'])) {
|
|
||||||
values1 = await optionForm.value.validate();
|
|
||||||
}
|
|
||||||
|
|
||||||
let params =
|
|
||||||
values['userGroup'] == 'e'
|
|
||||||
? { userId: values.userId }
|
|
||||||
: {
|
|
||||||
userId: values.userId,
|
|
||||||
userGroup: values.userGroup,
|
|
||||||
list: values['userGroup'] === 'c' ? data3.value.option : values['userGroup'] === 'd' ? data4.value.option : values1?.option,
|
|
||||||
};
|
|
||||||
|
|
||||||
switch (values['userGroup']) {
|
|
||||||
case 'a':
|
|
||||||
await editByUserIdApi(values);
|
|
||||||
await groupUserAApi(params);
|
|
||||||
break;
|
|
||||||
case 'b':
|
|
||||||
await editByUserIdApi(values);
|
|
||||||
await groupUserBApi(params);
|
|
||||||
break;
|
|
||||||
case 'c':
|
|
||||||
await groupUserCApi(params);
|
|
||||||
break;
|
|
||||||
case 'd':
|
|
||||||
await groupUserDApi(params);
|
|
||||||
break;
|
|
||||||
case 'e':
|
|
||||||
await groupUserEApi(params);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onSelectUserOk(e) {
|
|
||||||
data3.value.option =
|
|
||||||
e.length > 0
|
|
||||||
? e.map((item) => {
|
|
||||||
return {
|
|
||||||
name: JSON.parse(item)?.peItemName,
|
|
||||||
value: JSON.parse(item)?.peResult,
|
|
||||||
scope: JSON.parse(item)?.printContext,
|
|
||||||
time: JSON.parse(item)?.medicalYear,
|
|
||||||
hospital: JSON.parse(item)?.hospitalName,
|
|
||||||
uniItemId: JSON.parse(item)?.uniItemId,
|
|
||||||
};
|
|
||||||
})
|
|
||||||
: [];
|
|
||||||
}
|
|
||||||
|
|
||||||
function onSelectUserOk1(e) {
|
|
||||||
console.log(e);
|
|
||||||
data4.value.option =
|
|
||||||
e.length > 0
|
|
||||||
? e.map((item) => {
|
|
||||||
return {
|
|
||||||
name: JSON.parse(item)?.name,
|
|
||||||
levelDesc: JSON.parse(item)?.levelDesc,
|
|
||||||
level: JSON.parse(item)?.level,
|
|
||||||
time: JSON.parse(item)?.year,
|
|
||||||
};
|
|
||||||
})
|
|
||||||
: [];
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.table-d {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
border-top: 1px solid #f0f0f0;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
.table-td-d {
|
|
||||||
border-left: 1px solid #f0f0f0;
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
background-color: #fafafa;
|
|
||||||
height: 50px;
|
|
||||||
line-height: 50px !important;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.d1 {
|
|
||||||
width: calc(100% / 6);
|
|
||||||
}
|
|
||||||
.d2 {
|
|
||||||
width: 20%;
|
|
||||||
}
|
|
||||||
.d4 {
|
|
||||||
width: 25%;
|
|
||||||
}
|
|
||||||
.d3 {
|
|
||||||
width: calc(100% / 6);
|
|
||||||
}
|
|
||||||
.table-d-d {
|
|
||||||
background-color: #ffffff;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.option-form {
|
|
||||||
.ant-form-item {
|
|
||||||
line-height: 50px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.user-group .ant-select-selector) {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sub {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,368 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="tab3-content" v-if="!showKnowView && !showTrendView">
|
|
||||||
<div v-for="(item, index) in tab3Arr" :key="index" class="tab3-item-content">
|
|
||||||
<!-- {{ item }}-->
|
|
||||||
|
|
||||||
<div class="title">
|
|
||||||
<span class="title-first">{{ index + 1 }})</span>
|
|
||||||
<span> {{ item.name }}:</span>
|
|
||||||
</div>
|
|
||||||
<div class="information">
|
|
||||||
<span class="info-first" ref="infoFirst">
|
|
||||||
<span v-if="bodyType && item.label == '28306490414597017'">
|
|
||||||
{{ bodyType && bodyType.data1 ? bodyType.data1 : '' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="bodyType && item.label == 'tw0006'">
|
|
||||||
{{ bodyType && bodyType.data5 ? bodyType.data5 : '' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="physique && item.label == 'sg0001'">
|
|
||||||
{{ physique.height ? physique.height.toFixed(1) : '' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="physique && item.label == '28306490414597021'">
|
|
||||||
{{ physique.weight ? physique.weight.toFixed(1) : '' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="physique && item.label == 'bmi0002'">
|
|
||||||
{{ physique.bmi ? physique.bmi.toFixed(1) : '' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="physique && item.label == '28306490414597019'">
|
|
||||||
{{ physique.waist ? physique.waist.toFixed(1) : '' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="physique && item.label == 'tw0003'">
|
|
||||||
{{ physique.hip ? physique.hip.toFixed(1) : '' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="physique && item.label == 'ytb0004'">
|
|
||||||
{{ physique.waistHipRatio ? physique.waistHipRatio.toFixed(1) : '' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="physique && item.label == '28441759235178556'">
|
|
||||||
{{ physique.sbp ? physique.sbp.toFixed(1) : '' }}/{{ physique.dbp ? physique.dbp.toFixed(1) : '' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="physique && item.label == 'xx0005'">
|
|
||||||
{{ physique.blood_dictText ? physique.blood_dictText : '' }}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<span class="info-second">{{ item.unit }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="update-time">
|
|
||||||
<span v-if="bodyTime && item.label == '28306490414597017'">
|
|
||||||
更新时间:{{ bodyTime && bodyTime.time1 ? dayjs(bodyTime.time1).format('YYYY-MM-DD') : '--' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="bodyTime && item.label == 'tw0006'">
|
|
||||||
更新时间: {{ bodyTime && bodyTime.time5 ? dayjs(bodyTime.time5).format('YYYY-MM-DD') : '--' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="physique && (item.label == 'sg0001' || item.label == '28306490414597021' || item.label == 'bmi0002')">
|
|
||||||
更新时间: {{ physique && physique.heightLastUpdateTime ? physique.heightLastUpdateTime : '--' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="physique && (item.label == '28306490414597019' || item.label == 'tw0003' || item.label == 'ytb0004')">
|
|
||||||
更新时间: {{ physique && physique.waistLastUpdateTime ? physique.waistLastUpdateTime : '--' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="physique && item.label == '28441759235178556'">
|
|
||||||
更新时间: {{ physique && physique.bpLastUpdateTime ? physique.bpLastUpdateTime : '--' }}
|
|
||||||
</span>
|
|
||||||
<span v-if="physique && item.label == 'xx0005'">
|
|
||||||
更新时间: {{ physique && physique.bloodLastUpdateTime ? physique.bloodLastUpdateTime : '--' }}
|
|
||||||
</span>
|
|
||||||
<!-- <span>更新时间:2023-01-21{{ bodyTime }}</span> heightLastUpdateTime-->
|
|
||||||
</div>
|
|
||||||
<div class="btn-arr">
|
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
:disabled="!item.addBtn"
|
|
||||||
v-if="![2, 5].includes(index) && props.editType !== '1'"
|
|
||||||
@click="handleOpenModal(index, item)"
|
|
||||||
>
|
|
||||||
新增记录
|
|
||||||
</a-button>
|
|
||||||
<a-button type="primary" @click="showKnow(item.name, item.label)">知识查询</a-button>
|
|
||||||
<a-button type="primary" v-if="![0, 8].includes(index)" @click="showTrend(item.name, item.label, item.type)">
|
|
||||||
趋势分析
|
|
||||||
<LineChartOutlined />
|
|
||||||
</a-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Tab3know v-if="showKnowView" :title="knowTitle" :label="knowLabel" @go-back="goBack" />
|
|
||||||
<Tab3trend
|
|
||||||
v-if="showTrendView"
|
|
||||||
:api="trendApi"
|
|
||||||
:pageApi="trendPageApi"
|
|
||||||
:title="knowTitle"
|
|
||||||
:type="trendType"
|
|
||||||
:label="trendValue"
|
|
||||||
@go-back="goBack"
|
|
||||||
:userInfo="userInfo"
|
|
||||||
>
|
|
||||||
<template #chartTop="{ topInfo }">
|
|
||||||
<div v-if="knowTitle !== '血压'" class="chartTop">
|
|
||||||
<div class="chartTop-item">
|
|
||||||
<div class="every">
|
|
||||||
<div class="every-item">
|
|
||||||
<span class="content">{{ topInfo.max ? topInfo.max.toFixed(2) : '--' }}</span>
|
|
||||||
<span class="unit">{{ tab3Arr.find((item) => item.name === knowTitle).unit }}</span>
|
|
||||||
</div>
|
|
||||||
<span class="text">最高{{ knowTitle }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="every">
|
|
||||||
<div class="every-item">
|
|
||||||
<span class="content">{{ topInfo.min ? topInfo.min.toFixed(2) : '--' }}</span>
|
|
||||||
<span class="unit">{{ tab3Arr.find((item) => item.name === knowTitle).unit }}</span>
|
|
||||||
</div>
|
|
||||||
<span class="text">最低{{ knowTitle }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="every">
|
|
||||||
<div class="every-item">
|
|
||||||
<span class="content">{{ topInfo.avg ? topInfo.avg.toFixed(2) : '--' }}</span>
|
|
||||||
<span class="unit">{{ tab3Arr.find((item) => item.name === knowTitle).unit }}</span>
|
|
||||||
</div>
|
|
||||||
<span class="text">平均{{ knowTitle }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="knowTitle == '血压'" class="chartTop-xx">
|
|
||||||
<div class="chartTop-item">
|
|
||||||
<div class="every">
|
|
||||||
<div class="every-item">
|
|
||||||
<span class="content">{{ topInfo.maxSbp }}</span>
|
|
||||||
<span class="unit">mmhg</span>
|
|
||||||
</div>
|
|
||||||
<span class="text">最高收缩压</span>
|
|
||||||
</div>
|
|
||||||
<div class="every">
|
|
||||||
<div class="every-item">
|
|
||||||
<span class="content">{{ topInfo.minSbp }}</span>
|
|
||||||
<span class="unit">mmhg</span>
|
|
||||||
</div>
|
|
||||||
<span class="text">最低收缩压</span>
|
|
||||||
</div>
|
|
||||||
<div class="every">
|
|
||||||
<div class="every-item">
|
|
||||||
<span class="content">{{ topInfo.avgSbp ? topInfo.avgSbp.toFixed(2) : '--' }}</span>
|
|
||||||
<span class="unit">mmhg</span>
|
|
||||||
</div>
|
|
||||||
<span class="text">平均收缩压</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="chartTop-item">
|
|
||||||
<div class="every">
|
|
||||||
<div class="every-item">
|
|
||||||
<span class="content">{{ topInfo.maxDbp }}</span>
|
|
||||||
<span class="unit">mmhg</span>
|
|
||||||
</div>
|
|
||||||
<span class="text">最高舒张压</span>
|
|
||||||
</div>
|
|
||||||
<div class="every">
|
|
||||||
<div class="every-item">
|
|
||||||
<span class="content">{{ topInfo.minDbp }}</span>
|
|
||||||
<span class="unit">mmhg</span>
|
|
||||||
</div>
|
|
||||||
<span class="text">最高舒张压</span>
|
|
||||||
</div>
|
|
||||||
<div class="every">
|
|
||||||
<div class="every-item">
|
|
||||||
<span class="content">{{ topInfo.avgDbp ? topInfo.avgDbp.toFixed(2) : '--' }}</span>
|
|
||||||
<span class="unit">mmhg</span>
|
|
||||||
</div>
|
|
||||||
<span class="text">平均舒张压</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</Tab3trend>
|
|
||||||
|
|
||||||
<tab3-modal @register="registerModal" @success="handleSuccess" />
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { tab3Arr } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import { LineChartOutlined } from '@ant-design/icons-vue';
|
|
||||||
import Tab3know from '/@/views/archivesManage/employee/fileMaintenance/components/tab3/tab3know.vue';
|
|
||||||
import Tab3trend from '/@/views/archivesManage/employee/fileMaintenance/components/tab3/tab3trend.vue';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import Tab3Modal from '/@/views/archivesManage/employee/fileMaintenance/components/tab3/tab3Modal.vue';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { Dict } from '/@/utils/cache/dict';
|
|
||||||
import {
|
|
||||||
tab3BodyTypeAnalysisLineApi,
|
|
||||||
tab3BodyTypeAnalysisListApi,
|
|
||||||
tab3BodyTypeApi,
|
|
||||||
tab3PhysiqueApi,
|
|
||||||
tab3PhysiqueCommonTrendApi,
|
|
||||||
tab3PhysiqueCommonPageApi,
|
|
||||||
tab3PhysiqueBloodTrendApi,
|
|
||||||
tab3PhysiqueBloodPageApi,
|
|
||||||
} from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
editType: {
|
|
||||||
type: String,
|
|
||||||
default: () => '0',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const showKnowView = ref(false);
|
|
||||||
const showTrendView = ref(false);
|
|
||||||
const knowTitle = ref('');
|
|
||||||
const knowLabel = ref('');
|
|
||||||
const trendValue = ref();
|
|
||||||
const bodyType = ref();
|
|
||||||
const bodyTime = ref();
|
|
||||||
const physique = ref();
|
|
||||||
const infoArr = ref();
|
|
||||||
onMounted(async () => {
|
|
||||||
const res = Dict.getDict('archives_body_type');
|
|
||||||
infoArr.value = res;
|
|
||||||
getInfo();
|
|
||||||
});
|
|
||||||
const infoFirst = ref();
|
|
||||||
async function getInfo() {
|
|
||||||
const bodyRes = await tab3BodyTypeApi({ userId: props.userInfo?.id });
|
|
||||||
// bodyType.value = bodyRes;
|
|
||||||
bodyType.value = bodyRes.reduce((acc, item) => {
|
|
||||||
// 根据 type 值动态生成数据键
|
|
||||||
acc[`data${item.type}`] = item.dataValue;
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
bodyTime.value = bodyRes.reduce((acc, item) => {
|
|
||||||
// 根据 type 值动态生成数据键
|
|
||||||
acc[`time${item.type}`] = item.createDate;
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
const phyRes = await tab3PhysiqueApi({ userId: props.userInfo?.id });
|
|
||||||
physique.value = phyRes;
|
|
||||||
}
|
|
||||||
function showKnow(title, label) {
|
|
||||||
knowTitle.value = title;
|
|
||||||
knowLabel.value = label;
|
|
||||||
showKnowView.value = true;
|
|
||||||
}
|
|
||||||
const trendApi = ref();
|
|
||||||
const trendPageApi = ref();
|
|
||||||
const trendType = ref();
|
|
||||||
function showTrend(title, label, type) {
|
|
||||||
knowTitle.value = title;
|
|
||||||
trendValue.value = label;
|
|
||||||
showTrendView.value = true;
|
|
||||||
trendType.value = type;
|
|
||||||
if (label == 'tw0006' || label == '28306490414597017') {
|
|
||||||
trendApi.value = tab3BodyTypeAnalysisLineApi;
|
|
||||||
trendPageApi.value = tab3BodyTypeAnalysisListApi;
|
|
||||||
} else if (label == '28441759235178556') {
|
|
||||||
trendApi.value = tab3PhysiqueBloodTrendApi;
|
|
||||||
trendPageApi.value = tab3PhysiqueBloodPageApi;
|
|
||||||
} else {
|
|
||||||
trendApi.value = tab3PhysiqueCommonTrendApi;
|
|
||||||
trendPageApi.value = tab3PhysiqueCommonPageApi;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function handleOpenModal(index, item) {
|
|
||||||
const innerSpan = infoFirst.value ? infoFirst.value[index].querySelector('span') : null;
|
|
||||||
openModal(true, {
|
|
||||||
field: tab3Arr[index].label,
|
|
||||||
label: item.label,
|
|
||||||
userId: props.userInfo?.id,
|
|
||||||
value: innerSpan ? innerSpan.textContent : '',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function goBack() {
|
|
||||||
showKnowView.value = false;
|
|
||||||
showTrendView.value = false;
|
|
||||||
}
|
|
||||||
function handleSuccess() {
|
|
||||||
getInfo();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.tab3-content {
|
|
||||||
.tab3-item-content {
|
|
||||||
display: flex;
|
|
||||||
height: 50px;
|
|
||||||
align-items: center;
|
|
||||||
.title {
|
|
||||||
width: 100px;
|
|
||||||
font-weight: bold;
|
|
||||||
.title-first {
|
|
||||||
display: inline-block;
|
|
||||||
width: 30px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.information {
|
|
||||||
width: 200px;
|
|
||||||
background: #f5f5f5;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 10px;
|
|
||||||
border-radius: 4px;
|
|
||||||
height: 30px;
|
|
||||||
.info-first {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
.info-second {
|
|
||||||
width: 60px;
|
|
||||||
text-align: center;
|
|
||||||
border-left: 1px solid #ccc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.update-time {
|
|
||||||
margin: 0 25px 0 20px;
|
|
||||||
}
|
|
||||||
.btn-arr {
|
|
||||||
:deep(.is-disabled) {
|
|
||||||
background: #9c9c9c !important;
|
|
||||||
color: #fff !important;
|
|
||||||
border-color: #9c9c9c !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.chartTop {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
.chartTop-item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
width: 40%;
|
|
||||||
.every {
|
|
||||||
text-align: center;
|
|
||||||
.every-item {
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
font-weight: bold;
|
|
||||||
.content {
|
|
||||||
font-size: 32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.text {
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.chartTop-xx {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
.chartTop-item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
width: 40%;
|
|
||||||
border: 1px solid #999;
|
|
||||||
margin: 0 10px;
|
|
||||||
.every {
|
|
||||||
text-align: center;
|
|
||||||
.every-item {
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
font-weight: bold;
|
|
||||||
.content {
|
|
||||||
font-size: 28px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.text {
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,159 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicModal @register="registerModal" title="新增记录" @ok="handleOk">
|
|
||||||
<BasicForm @register="registerForm">
|
|
||||||
<template #xx="{ modal }">
|
|
||||||
<div class="mmhg">
|
|
||||||
<div class="dsbp">舒张压:</div>
|
|
||||||
<a-input v-model:value="dbpValue" suffix="mmHg" />
|
|
||||||
<div class="dsbp">收缩压:</div>
|
|
||||||
<a-input v-model:value="sbpValue" suffix="mmHg" />
|
|
||||||
</div>
|
|
||||||
<!-- 28441759235178556-->
|
|
||||||
</template>
|
|
||||||
</BasicForm>
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicModal from '/@/components/Modal/src/BasicModal.vue';
|
|
||||||
import { useModalInner } from '/@/components/Modal';
|
|
||||||
import BasicForm from '/@/components/Form/src/BasicForm.vue';
|
|
||||||
import { FormSchema, useForm } from '/@/components/Form';
|
|
||||||
import { bloodType, tab3ForSchema } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import { tab3BodyTypeAddApi, tab3PhysiqueAddApi } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
const emit = defineEmits(['success']);
|
|
||||||
const [registerForm, { setProps, validate, setFieldsValue }] = useForm({
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
labelCol: {
|
|
||||||
xs: { span: 24 },
|
|
||||||
sm: { span: 4 },
|
|
||||||
},
|
|
||||||
wrapperCol: {
|
|
||||||
xs: { span: 24 },
|
|
||||||
sm: { span: 18 },
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const label = ref();
|
|
||||||
const userId = ref();
|
|
||||||
const dbpValue = ref();
|
|
||||||
const sbpValue = ref();
|
|
||||||
const [registerModal, { closeModal }] = useModalInner(async (data) => {
|
|
||||||
await setProps({
|
|
||||||
schemas: [
|
|
||||||
tab3ForSchema.find((item) => {
|
|
||||||
return item.field === data.field;
|
|
||||||
}),
|
|
||||||
] as FormSchema[],
|
|
||||||
});
|
|
||||||
await setFieldsValue({
|
|
||||||
[data.field]: data.value,
|
|
||||||
});
|
|
||||||
if (data.label == '28441759235178556') {
|
|
||||||
sbpValue.value = data.value.split('/')[0];
|
|
||||||
dbpValue.value = data.value.split('/')[1];
|
|
||||||
}
|
|
||||||
if (data.label == 'xx0005') {
|
|
||||||
console.log(getValueByLabel(data.value));
|
|
||||||
await setFieldsValue({
|
|
||||||
[data.field]: getValueByLabel(data.value),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
label.value = data.label;
|
|
||||||
userId.value = data.userId;
|
|
||||||
});
|
|
||||||
async function handleOk() {
|
|
||||||
try {
|
|
||||||
const value = await validate();
|
|
||||||
switch (label.value) {
|
|
||||||
case 'tw0006':
|
|
||||||
const params1 = {
|
|
||||||
userId: userId.value,
|
|
||||||
dataValue: value[label.value],
|
|
||||||
type: 5,
|
|
||||||
};
|
|
||||||
await tab3BodyTypeAddApi(params1);
|
|
||||||
break;
|
|
||||||
case '28306490414597017':
|
|
||||||
const params2 = {
|
|
||||||
userId: userId.value,
|
|
||||||
dataValue: value[label.value],
|
|
||||||
type: 1,
|
|
||||||
};
|
|
||||||
await tab3BodyTypeAddApi(params2);
|
|
||||||
break;
|
|
||||||
case 'sg0001':
|
|
||||||
const params3 = {
|
|
||||||
userId: userId.value,
|
|
||||||
value: value[label.value],
|
|
||||||
type: 1,
|
|
||||||
};
|
|
||||||
await tab3PhysiqueAddApi(params3);
|
|
||||||
break;
|
|
||||||
case '28306490414597021':
|
|
||||||
const params4 = {
|
|
||||||
userId: userId.value,
|
|
||||||
value: value[label.value],
|
|
||||||
type: 2,
|
|
||||||
};
|
|
||||||
await tab3PhysiqueAddApi(params4);
|
|
||||||
break;
|
|
||||||
case '28306490414597019':
|
|
||||||
const params5 = {
|
|
||||||
userId: userId.value,
|
|
||||||
value: value[label.value],
|
|
||||||
type: 4,
|
|
||||||
};
|
|
||||||
await tab3PhysiqueAddApi(params5);
|
|
||||||
break;
|
|
||||||
case 'tw0003':
|
|
||||||
const params6 = {
|
|
||||||
userId: userId.value,
|
|
||||||
value: value[label.value],
|
|
||||||
type: 5,
|
|
||||||
};
|
|
||||||
await tab3PhysiqueAddApi(params6);
|
|
||||||
break;
|
|
||||||
case '28441759235178556':
|
|
||||||
console.log(dbpValue.value, sbpValue.value);
|
|
||||||
const params7 = {
|
|
||||||
userId: userId.value,
|
|
||||||
value: dbpValue.value ? dbpValue.value : '',
|
|
||||||
value2: sbpValue.value ? sbpValue.value : '',
|
|
||||||
type: 7,
|
|
||||||
};
|
|
||||||
await tab3PhysiqueAddApi(params7);
|
|
||||||
break;
|
|
||||||
case 'xx0005':
|
|
||||||
const params8 = {
|
|
||||||
userId: userId.value,
|
|
||||||
value: value[label.value],
|
|
||||||
type: 9,
|
|
||||||
};
|
|
||||||
await tab3PhysiqueAddApi(params8);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
closeModal();
|
|
||||||
emit('success');
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getValueByLabel(label) {
|
|
||||||
return bloodType.find((item) => {
|
|
||||||
return item.label == label;
|
|
||||||
})?.value;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.mmhg {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
.dsbp {
|
|
||||||
width: 150px;
|
|
||||||
margin: 0 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
<template>
|
|
||||||
<a-button @click="goBack" type="primary" style="width: 80px">返回</a-button>
|
|
||||||
<div class="know-content">
|
|
||||||
<div class="title"> 知识科普-{{ title }}</div>
|
|
||||||
<div class="detail" v-if="infoValue"> {{ infoValue?.subSynopsis }}</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { tab3ModelApi } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
const emit = defineEmits(['go-back']);
|
|
||||||
const props = defineProps({
|
|
||||||
title: {
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const infoValue = ref();
|
|
||||||
onMounted(async () => {
|
|
||||||
const res = await tab3ModelApi({
|
|
||||||
modeId: props.label,
|
|
||||||
});
|
|
||||||
infoValue.value = res;
|
|
||||||
});
|
|
||||||
function goBack() {
|
|
||||||
emit('go-back');
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.know-content {
|
|
||||||
text-align: center;
|
|
||||||
height: calc(100% - 40px);
|
|
||||||
.title {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.detail {
|
|
||||||
width: 100%;
|
|
||||||
height: calc(100% - 66px);
|
|
||||||
background-color: #fbfdff;
|
|
||||||
border: 1px solid #999;
|
|
||||||
border-radius: 10px;
|
|
||||||
overflow: hidden;
|
|
||||||
overflow-y: auto;
|
|
||||||
padding: 10px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,297 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="trend-detail">
|
|
||||||
<div class="title">
|
|
||||||
<a-button type="primary" @click="goBack" style="position: absolute; left: 0">返回</a-button>
|
|
||||||
<div class="name"> {{ title }}-趋势分析</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="display: flex; width: 100%; justify-content: center; padding-top: 10px">
|
|
||||||
<a-radio-group v-model:value="active" button-style="solid" @change="changeRadio">
|
|
||||||
<a-radio-button :value="1">日</a-radio-button>
|
|
||||||
<a-radio-button :value="2">周</a-radio-button>
|
|
||||||
<a-radio-button :value="3">月</a-radio-button>
|
|
||||||
<a-radio-button :value="4">年</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
</div>
|
|
||||||
<div style="width: 100%; display: flex; font-size: 20px; align-items: center; justify-content: center; padding: 10px">
|
|
||||||
<a-button size="small" @click="changeDate('0')">
|
|
||||||
<LeftOutlined />
|
|
||||||
</a-button>
|
|
||||||
<div style="position: relative">
|
|
||||||
<a-date-picker
|
|
||||||
ref="datePicker"
|
|
||||||
v-model:value="dateInfo"
|
|
||||||
:disabledDate="(current) => current > new Date()"
|
|
||||||
:format="rType()"
|
|
||||||
:picker="getP()"
|
|
||||||
@change="changeValue"
|
|
||||||
:allow-clear="false"
|
|
||||||
style="opacity: 0; z-index: 99; position: absolute; top: 0; left: 0"
|
|
||||||
>
|
|
||||||
<template #dateRender="{ current }">
|
|
||||||
<div class="ant-picker-cell-inner">
|
|
||||||
{{ current.date() }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</a-date-picker>
|
|
||||||
<div style="z-index: 1; min-width: 150px; padding: 0 10px; text-align: center">{{ getDateFormat(dateInfo) }}</div>
|
|
||||||
</div>
|
|
||||||
<a-button :disabled="!isRight" size="small" @click="changeDate('1')">
|
|
||||||
<RightOutlined />
|
|
||||||
</a-button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<slot name="chartTop" v-bind="{ topInfo }"> </slot>
|
|
||||||
|
|
||||||
<div ref="chartRef" class="container" id="container"> </div>
|
|
||||||
|
|
||||||
<BasicTable @register="registerTable" table-type="1" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref, computed, Ref, onMounted, nextTick } from 'vue';
|
|
||||||
import { LeftOutlined, RightOutlined } from '@ant-design/icons-vue';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import { useECharts } from '/@/hooks/web/useECharts';
|
|
||||||
import { getOptions } from '/@/views/archivesManage/employee/fileMaintenance/components/tab3/trend.data';
|
|
||||||
import { tab3TrendColumn1, tab3TrendColumn2 } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
|
|
||||||
const emit = defineEmits(['go-back']);
|
|
||||||
const dateInfo = ref(dayjs());
|
|
||||||
const active = ref(1);
|
|
||||||
const topInfo = ref({});
|
|
||||||
const props = defineProps({
|
|
||||||
title: {
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
api: {
|
|
||||||
type: Function,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
pageApi: {
|
|
||||||
type: Function,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
type: {
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const customWeekStartEndFormat = (value) =>
|
|
||||||
`${dayjs(value).startOf('week').format(weekFormat)} ~ ${dayjs(value).endOf('week').format(weekFormat)}`;
|
|
||||||
const isRight = computed(() => {
|
|
||||||
return dayjs(dateInfo.value).valueOf() - dayjs(new Date()).valueOf() < -86400000;
|
|
||||||
});
|
|
||||||
|
|
||||||
const dateFormat = 'YYYY-MM-DD';
|
|
||||||
const weekFormat = 'YYYY-MM-DD';
|
|
||||||
const monthFormat = 'YYYY-MM';
|
|
||||||
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
immediate: false,
|
|
||||||
pagination: false,
|
|
||||||
showIndexColumn: true,
|
|
||||||
useSearchForm: false,
|
|
||||||
showTableSetting: false,
|
|
||||||
clickToRowSelect: false,
|
|
||||||
showActionColumn: false,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerTable, { reload, setProps }] = tableContext;
|
|
||||||
const startData = ref(dayjs(dateInfo.value).format('YYYY-MM-DD'));
|
|
||||||
const endData = ref(dayjs(dateInfo.value).format('YYYY-MM-DD'));
|
|
||||||
function changeValue() {
|
|
||||||
if (active.value == 1) {
|
|
||||||
startData.value = dayjs(dateInfo.value).format('YYYY-MM-DD');
|
|
||||||
endData.value = dayjs(dateInfo.value).format('YYYY-MM-DD');
|
|
||||||
}
|
|
||||||
if (active.value == 2) {
|
|
||||||
startData.value = dayjs(dateInfo.value).startOf('week').format('YYYY-MM-DD');
|
|
||||||
endData.value = dayjs(dateInfo.value).endOf('week').format('YYYY-MM-DD');
|
|
||||||
}
|
|
||||||
if (active.value == 3) {
|
|
||||||
startData.value = dayjs(dateInfo.value).startOf('month').format('YYYY-MM-DD');
|
|
||||||
endData.value = dayjs(dateInfo.value).endOf('month').format('YYYY-MM-DD');
|
|
||||||
}
|
|
||||||
if (active.value == 4) {
|
|
||||||
startData.value = dayjs(dateInfo.value).startOf('year').format('YYYY-MM-DD');
|
|
||||||
endData.value = dayjs(dateInfo.value).endOf('year').format('YYYY-MM-DD');
|
|
||||||
}
|
|
||||||
getTrandAndPage();
|
|
||||||
}
|
|
||||||
const yearValue = ref([]);
|
|
||||||
const dataValue = ref([]);
|
|
||||||
onMounted(async () => {
|
|
||||||
getTrandAndPage();
|
|
||||||
});
|
|
||||||
|
|
||||||
const chartRef = ref<HTMLDivElement | null>(null);
|
|
||||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);
|
|
||||||
onMounted(() => {});
|
|
||||||
function setData() {
|
|
||||||
setOptions(getOptions(yearValue.value, [dataValue.value]) as any);
|
|
||||||
}
|
|
||||||
async function getTrandAndPage() {
|
|
||||||
setProps({
|
|
||||||
api: props.pageApi,
|
|
||||||
columns: props.label == 'tw0006' || props.label == '28306490414597017' ? tab3TrendColumn1 : tab3TrendColumn2,
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params.userId = props.userInfo.id;
|
|
||||||
params.type = props.type;
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
reload();
|
|
||||||
let data = await props.api({
|
|
||||||
userId: props.userInfo.id,
|
|
||||||
type: props.type,
|
|
||||||
startDate: startData.value,
|
|
||||||
endDate: endData.value,
|
|
||||||
startTime: startData.value,
|
|
||||||
endTime: endData.value,
|
|
||||||
scope: active.value,
|
|
||||||
timeType: active.value,
|
|
||||||
});
|
|
||||||
if (props.label == 'tw0006' || props.label == '28306490414597017') {
|
|
||||||
yearValue.value = data.data ? data.data.map((item) => item.createDate) : [];
|
|
||||||
if (active.value !== 1) {
|
|
||||||
yearValue.value = yearValue.value.map((item) => {
|
|
||||||
return dayjs(item).format('YYYY-MM-DD');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
dataValue.value = data.data ? data.data.map((item) => item.dataValue) : [];
|
|
||||||
topInfo.value = {
|
|
||||||
max: data.dataMax ? data.dataMax : '',
|
|
||||||
min: data.dataMin ? data.dataMin : '',
|
|
||||||
avg: data.dataAvg ? data.dataAvg : '',
|
|
||||||
};
|
|
||||||
nextTick(() => {
|
|
||||||
setData();
|
|
||||||
});
|
|
||||||
} else if (props.label == '28441759235178556') {
|
|
||||||
yearValue.value = data && data.dataList ? data.dataList.map((item) => item.time) : [];
|
|
||||||
|
|
||||||
const a =
|
|
||||||
data && data.dataList
|
|
||||||
? data.dataList.map((item) => {
|
|
||||||
return item.sbp;
|
|
||||||
})
|
|
||||||
: [];
|
|
||||||
const b =
|
|
||||||
data && data.dataList
|
|
||||||
? data.dataList.map((item) => {
|
|
||||||
return item.dbp;
|
|
||||||
})
|
|
||||||
: [];
|
|
||||||
topInfo.value = {
|
|
||||||
maxSbp: data && data.maxSbp ? data.maxSbp : '',
|
|
||||||
minSbp: data && data.minSbp ? data.minSbp : '',
|
|
||||||
avgSbp: data && data.avgSbp ? data.avgSbp : '',
|
|
||||||
maxDbp: data && data.maxDbp ? data.maxDbp : '',
|
|
||||||
minDbp: data && data.minDbp ? data.minDbp : '',
|
|
||||||
avgDbp: data && data.avgDbp ? data.avgDbp : '',
|
|
||||||
};
|
|
||||||
|
|
||||||
dataValue.value = [a, b];
|
|
||||||
setOptions(getOptions(yearValue.value, [...dataValue.value]) as any);
|
|
||||||
console.log(dataValue.value);
|
|
||||||
} else {
|
|
||||||
yearValue.value = data && data.dataList ? data.dataList.map((item) => item.time) : [];
|
|
||||||
dataValue.value = data && data.dataList ? data.dataList.map((item) => item.dataValue) : [];
|
|
||||||
topInfo.value = {
|
|
||||||
max: data && data.maxData ? data.maxData : '',
|
|
||||||
min: data && data.minData ? data.minData : '',
|
|
||||||
avg: data && data.avgData ? data.avgData : '',
|
|
||||||
};
|
|
||||||
nextTick(() => {
|
|
||||||
setData();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function rType() {
|
|
||||||
switch (active.value) {
|
|
||||||
case 1:
|
|
||||||
return dateFormat;
|
|
||||||
case 2:
|
|
||||||
return customWeekStartEndFormat(dateInfo.value);
|
|
||||||
case 3:
|
|
||||||
return monthFormat;
|
|
||||||
case 4:
|
|
||||||
return 'YYYY';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
function getP() {
|
|
||||||
switch (active.value) {
|
|
||||||
case 2:
|
|
||||||
return 'week';
|
|
||||||
case 3:
|
|
||||||
return 'month';
|
|
||||||
case 4:
|
|
||||||
return 'year';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
function getDateFormat(v) {
|
|
||||||
return active.value === 2 ? customWeekStartEndFormat(v) : dayjs(v).format(rType());
|
|
||||||
}
|
|
||||||
|
|
||||||
function weekNext(x, data) {
|
|
||||||
let d = dayjs(getDateFormat(data).substring(getDateFormat(data).indexOf('~') + 2));
|
|
||||||
|
|
||||||
return x.diff(d, 'day') < 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeRadio() {
|
|
||||||
dateInfo.value = dayjs(new Date());
|
|
||||||
changeValue();
|
|
||||||
}
|
|
||||||
function changeDate(type) {
|
|
||||||
switch (active.value) {
|
|
||||||
case 1:
|
|
||||||
dateInfo.value = type === '0' ? dayjs(dateInfo.value).subtract(1, 'day') : dayjs(dateInfo.value).add(1, 'day');
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
dateInfo.value = type === '0' ? dayjs(dateInfo.value).subtract(1, 'week') : dayjs(dateInfo.value).add(1, 'week');
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
dateInfo.value = type === '0' ? dayjs(dateInfo.value).subtract(1, 'month') : dayjs(dateInfo.value).add(1, 'month');
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
dateInfo.value = type === '0' ? dayjs(dateInfo.value).subtract(1, 'year') : dayjs(dateInfo.value).add(1, 'year');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
changeValue();
|
|
||||||
}
|
|
||||||
function goBack() {
|
|
||||||
emit('go-back');
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.trend-detail {
|
|
||||||
.title {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
.name {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
min-height: 300px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
export const getOptions = (xData: any[] = [], yData: any[] = []) => ({
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: xData,
|
|
||||||
},
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: top,
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
},
|
|
||||||
series: getSeries(yData),
|
|
||||||
});
|
|
||||||
|
|
||||||
function getSeries(data) {
|
|
||||||
return data.map((item) => {
|
|
||||||
return {
|
|
||||||
type: 'line',
|
|
||||||
data: item,
|
|
||||||
smooth: true,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,130 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="outer-4">
|
|
||||||
<div v-show="pageValue === '0'" style="height: 100%; display: flex; flex-direction: column">
|
|
||||||
<a-radio-group button-style="solid" class="radio-group-d" v-model:value="radioValue" @change="changeRadioValue">
|
|
||||||
<a-radio-button v-for="(item, index) in unitList.slice(0, unitList.length - 2)" :key="`unit-${index}`" :value="item.id">
|
|
||||||
{{ item.name }}
|
|
||||||
</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
|
|
||||||
<div v-if="radioInfoList.length > 0" class="radio-value-list">
|
|
||||||
<div
|
|
||||||
v-for="(item, index) in radioInfoList"
|
|
||||||
:class="[classItemId === item.id ? 'selected-class' : '']"
|
|
||||||
:key="`radio-value-list-${index}`"
|
|
||||||
@click="clickClassItem(item)"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="flex: 1" v-if="radioValue === '1'"> <examination-report :user-id="userInfo.id" /></div>
|
|
||||||
<div style="flex: 1; overflow: auto" v-if="radioValue !== '1'">
|
|
||||||
<tab4-list :user-id="userInfo.id" :medical-uni-item-class-id="classItemId" @history-info="getHistoryInfo" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="pageValue !== '0'" style="height: 100%; display: flex; flex-direction: column">
|
|
||||||
<histor-info
|
|
||||||
:list-info="listInfo"
|
|
||||||
@go-back="
|
|
||||||
() => {
|
|
||||||
pageValue = '0';
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import { selectMedicalUniItemClassListApi } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
import ExaminationReport from '/@/views/archivesManage/employee/fileMaintenance/components/tab4/examinationReport.vue';
|
|
||||||
import Tab4List from '/@/views/archivesManage/employee/fileMaintenance/components/tab4/tab4List.vue';
|
|
||||||
import HistorInfo from '/@/views/archivesManage/employee/fileMaintenance/components/tab4/historInfo.vue';
|
|
||||||
|
|
||||||
const pageValue = ref('0');
|
|
||||||
|
|
||||||
const listInfo = ref();
|
|
||||||
const radioInfoList = ref<any[]>([]);
|
|
||||||
const radioValue = ref('1');
|
|
||||||
const unitList = ref<any[]>([]);
|
|
||||||
const classItemId = ref('');
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
await getUnitList();
|
|
||||||
});
|
|
||||||
|
|
||||||
function getHistoryInfo(v) {
|
|
||||||
console.log(v);
|
|
||||||
listInfo.value = v;
|
|
||||||
pageValue.value = '1';
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeRadioValue(e) {
|
|
||||||
radioInfoList.value =
|
|
||||||
unitList.value.find((item) => {
|
|
||||||
return item.id === e.target.value;
|
|
||||||
})?.childList || [];
|
|
||||||
|
|
||||||
classItemId.value = radioInfoList.value.length > 0 ? radioInfoList.value[0].id : '';
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getUnitList() {
|
|
||||||
try {
|
|
||||||
unitList.value = await selectMedicalUniItemClassListApi({ sex: props.userInfo?.sex });
|
|
||||||
|
|
||||||
unitList.value.unshift({
|
|
||||||
id: '1',
|
|
||||||
name: '体检报告',
|
|
||||||
childList: [],
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function clickClassItem(item) {
|
|
||||||
classItemId.value = item.id;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.outer-4 {
|
|
||||||
height: calc(100% - 46px);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-radio-button-wrapper) {
|
|
||||||
color: #1684fc !important;
|
|
||||||
border-color: #1684fc !important;
|
|
||||||
&:before {
|
|
||||||
background-color: #1684fc !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-radio-button-wrapper-checked) {
|
|
||||||
color: #ffffff !important;
|
|
||||||
}
|
|
||||||
.radio-value-list {
|
|
||||||
margin-top: 5px;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
> div {
|
|
||||||
cursor: pointer;
|
|
||||||
margin: 0 5px 5px 0;
|
|
||||||
background-color: #b4c7e7;
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.selected-class {
|
|
||||||
background-color: #567aa1 !important;
|
|
||||||
color: #ffffff;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-84
@@ -1,84 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicTable @register="registerTable">
|
|
||||||
<!--操作栏-->
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.dataIndex === 'look'">
|
|
||||||
<a-button type="link" @click="handleDetail(record)">查看</a-button>
|
|
||||||
</template>
|
|
||||||
<template v-if="column.dataIndex === 'downLoad'">
|
|
||||||
<a-button type="link" @click="handleDownLoad(record)">下载</a-button>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<UserReport ref="reportRefs" @register="lookRecordModal" />
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { BasicTable, TableAction } from '/@/components/Table';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import { list, report } from '/@/views/archive/employeeFile/components/examinationReport/examinationReport.api';
|
|
||||||
import UserReport from '/@/views/medical/report/userResult/components/UserReport.vue';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
import { tab4ReportColumns } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import { downReport } from '/@/views/medical/report/userResult/UserResult.api';
|
|
||||||
const reportRefs = ref('');
|
|
||||||
const route = useRoute();
|
|
||||||
const props = defineProps({
|
|
||||||
userId: {
|
|
||||||
type: String,
|
|
||||||
default: () => '',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
// 注册modal
|
|
||||||
const [lookRecordModal, { openModal }] = useModal();
|
|
||||||
// 注册table数据
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
title: '体检报告',
|
|
||||||
columns: tab4ReportColumns,
|
|
||||||
api: list,
|
|
||||||
canResize: false,
|
|
||||||
searchInfo: {
|
|
||||||
userId: props.userId,
|
|
||||||
},
|
|
||||||
tableSetting: {
|
|
||||||
redo: true,
|
|
||||||
setting: false,
|
|
||||||
},
|
|
||||||
showActionColumn: false,
|
|
||||||
useSearchForm: false,
|
|
||||||
actionColumn: {
|
|
||||||
width: 120,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable] = tableContext;
|
|
||||||
async function handleDetail(record: Recordable) {
|
|
||||||
let { medicalYear } = record;
|
|
||||||
try {
|
|
||||||
// let res = await report({ id: medicalId });
|
|
||||||
let res = await report({ userId: props.userId, medicalYear: medicalYear });
|
|
||||||
// let classVoList = replaceProperties(res?.resultItemResList || []);
|
|
||||||
// const result = {
|
|
||||||
// conclusion: res?.conclusion,
|
|
||||||
// recommendation: res?.suggest,
|
|
||||||
// classVoList: classVoList,
|
|
||||||
// };
|
|
||||||
reportRefs.value['handlePhysical'](res);
|
|
||||||
} catch {
|
|
||||||
reportRefs.value['handlePhysical']({});
|
|
||||||
}
|
|
||||||
openModal(true, {
|
|
||||||
isUpdate: true,
|
|
||||||
showFooter: false,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleDownLoad(record: Recordable) {
|
|
||||||
downReport({ id: record.medicalId });
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="less"></style>
|
|
||||||
@@ -1,144 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="d">
|
|
||||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
|
||||||
<a-button
|
|
||||||
type="primary"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
emit('goBack');
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>返回</a-button
|
|
||||||
>
|
|
||||||
<div style="font-size: 18px; font-weight: bold"> {{ props.listInfo?.peItemName }}-历史趋势 </div>
|
|
||||||
<div>
|
|
||||||
<a-range-picker v-model:value="yearInfo" picker="year" @change="changeDate" format="YYYY" value-format="YYYY" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="padding: 10px 0">
|
|
||||||
<div ref="chartRef" class="container" id="container"> </div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="flex: 1; overflow: auto">
|
|
||||||
<div class="table-d">
|
|
||||||
<div style="width: 60px">序号</div>
|
|
||||||
<div style="flex: 1">体检年份</div>
|
|
||||||
<div style="flex: 1">数值</div>
|
|
||||||
<div style="flex: 1">参考值</div>
|
|
||||||
</div>
|
|
||||||
<div class="table-d-1">
|
|
||||||
<template v-if="props?.listInfo?.list && props?.listInfo?.list.length > 0">
|
|
||||||
<template v-for="(item, index) in props?.listInfo?.list.reverse()" :key="`dataList-${index}`">
|
|
||||||
<div style="display: flex">
|
|
||||||
<div style="width: 60px">{{ index + 1 }}</div>
|
|
||||||
<div style="flex: 1">{{ item.peYear }}</div>
|
|
||||||
<div style="flex: 1">{{ item.peResult }}</div>
|
|
||||||
<div style="flex: 1">{{ item.printContext + item.unit }}</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { nextTick, onMounted, Ref, ref } from 'vue';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import { useECharts } from '/@/hooks/web/useECharts';
|
|
||||||
import { getOptions } from '/@/views/archivesManage/employee/fileMaintenance/components/tab3/trend.data';
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
listInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => {},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const emit = defineEmits(['goBack']);
|
|
||||||
|
|
||||||
const yearInfo = ref<any[]>([]);
|
|
||||||
|
|
||||||
const chartRef = ref<HTMLDivElement | null>(null);
|
|
||||||
const { setOptions } = useECharts(chartRef as Ref<HTMLDivElement>);
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
console.log(props.listInfo);
|
|
||||||
let xData: any = [];
|
|
||||||
let yData: any = [];
|
|
||||||
nextTick(() => {
|
|
||||||
yearInfo.value = props.listInfo.list ? [props.listInfo.list[props.listInfo.list.length - 1]?.peYear, props.listInfo.list[0]?.peYear] : [];
|
|
||||||
});
|
|
||||||
console.log(yearInfo.value);
|
|
||||||
props.listInfo.list &&
|
|
||||||
props.listInfo.list.reverse().map((item) => {
|
|
||||||
xData.push(item?.peYear);
|
|
||||||
yData.push(item?.peResult);
|
|
||||||
});
|
|
||||||
setData(xData, yData);
|
|
||||||
});
|
|
||||||
|
|
||||||
function setData(x, y) {
|
|
||||||
setOptions(getOptions(x, [y]) as any);
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeDate(v) {
|
|
||||||
console.log(v);
|
|
||||||
return;
|
|
||||||
let s: any = JSON.parse(v[0]);
|
|
||||||
let e: any = JSON.parse(v[1]);
|
|
||||||
let xData: any = [];
|
|
||||||
let yData: any = [];
|
|
||||||
props.listInfo.list &&
|
|
||||||
props.listInfo.list.reverse().map((item) => {
|
|
||||||
if (s <= JSON.parse(item?.peYear) && e >= JSON.parse(item?.peYear)) {
|
|
||||||
xData.push(item?.peYear);
|
|
||||||
yData.push(item?.peResult);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
setData(xData, yData);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.d {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
min-height: 300px;
|
|
||||||
}
|
|
||||||
.table-d {
|
|
||||||
background-color: #e6f7ff;
|
|
||||||
color: #5c5c5c;
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 99;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
border-top: 1px solid #f0f0f0;
|
|
||||||
border-left: 1px solid #f0f0f0;
|
|
||||||
> div {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
padding: 7px 0;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-d-1 {
|
|
||||||
border-left: 1px solid #f0f0f0;
|
|
||||||
> div {
|
|
||||||
> div {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
padding: 10px 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,173 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="height: 100%" ref="containerRef">
|
|
||||||
<div style="width: 100%; overflow: auto; height: 100%">
|
|
||||||
<div class="table-d">
|
|
||||||
<div style="width: 60px">序号</div>
|
|
||||||
<div style="flex: 1">检查项目名称</div>
|
|
||||||
<div style="width: 100px">异常率</div>
|
|
||||||
<template v-for="(item, index) in lastYears" :key="`lastYears-${index}`">
|
|
||||||
<div style="width: 100px">{{ item }}</div>
|
|
||||||
</template>
|
|
||||||
<div style="flex: 1">参考值</div>
|
|
||||||
<div style="width: 120px">知识查询</div>
|
|
||||||
<div style="width: 120px">历史趋势</div>
|
|
||||||
</div>
|
|
||||||
<div class="table-d-1">
|
|
||||||
<!-- <template v-if="dataList.length > 0">-->
|
|
||||||
<template v-for="(item, index) in dataList" :key="`dataList-${index}`">
|
|
||||||
<div style="display: flex">
|
|
||||||
<div style="width: 60px">{{ index + 1 }}</div>
|
|
||||||
<div style="flex: 1">{{ item.name }}</div>
|
|
||||||
<div style="width: 100px">
|
|
||||||
<span style="color: red">{{ item.yc }}</span>
|
|
||||||
/5
|
|
||||||
</div>
|
|
||||||
<template v-for="(it, index) in lastYears" :key="`lastYears-${index}`">
|
|
||||||
<div style="width: 100px">{{ item[it] }}</div>
|
|
||||||
</template>
|
|
||||||
<div style="flex: 1">{{ item?.printContext + '' + item?.unit }}</div>
|
|
||||||
<div style="width: 120px">
|
|
||||||
<a-button type="link">知识查询</a-button>
|
|
||||||
</div>
|
|
||||||
<div style="width: 120px">
|
|
||||||
<a-button type="link" @click="historyInfo(item)">历史趋势</a-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<!-- </template>-->
|
|
||||||
<template v-if="dataList.length === 0">
|
|
||||||
<a-empty style="padding-top: 10px" description="暂无数据" />
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { onMounted, ref, watch } from 'vue';
|
|
||||||
import { selectMedicalUniItemByClassIdApi, statusApi } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
|
|
||||||
const containerRef = ref();
|
|
||||||
const lastInfo = ref({});
|
|
||||||
const lastYears = ref<any[]>([]);
|
|
||||||
const dataList = ref<any[]>([]);
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
userId: {
|
|
||||||
type: String,
|
|
||||||
default: () => '',
|
|
||||||
},
|
|
||||||
medicalUniItemClassId: {
|
|
||||||
type: String,
|
|
||||||
default: () => '',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const emit = defineEmits(['historyInfo']);
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
await getLastYear();
|
|
||||||
if (lastInfo.value?.reportLastYear) {
|
|
||||||
for (let i = 0; i < 5; i++) {
|
|
||||||
lastYears.value.push(lastInfo.value?.reportLastYear - i + '');
|
|
||||||
}
|
|
||||||
await getList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
async function getLastYear() {
|
|
||||||
try {
|
|
||||||
lastInfo.value = await statusApi({ userId: props.userId });
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function historyInfo(record) {
|
|
||||||
console.log(record);
|
|
||||||
emit('historyInfo', record.listInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.medicalUniItemClassId,
|
|
||||||
() => {
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
async function getList() {
|
|
||||||
try {
|
|
||||||
let data = await selectMedicalUniItemByClassIdApi({ userId: props.userId, medicalUniItemClassId: props.medicalUniItemClassId });
|
|
||||||
let t = {};
|
|
||||||
dataList.value = data.map((item) => {
|
|
||||||
t = { name: item?.peItemName, yc: 0, listInfo: item };
|
|
||||||
lastYears.value.map((it) => {
|
|
||||||
let c = item.list.find((c) => {
|
|
||||||
return c.peYear === it;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (c) {
|
|
||||||
t[it] = c?.peResult;
|
|
||||||
t[it + '-tfRed'] = c?.tfRed;
|
|
||||||
if (c.tfRed) {
|
|
||||||
t['yc'] = t['yc'] + 1;
|
|
||||||
}
|
|
||||||
if (!t['printContext']) {
|
|
||||||
t['printContext'] = c.printContext;
|
|
||||||
}
|
|
||||||
if (!t['unit']) {
|
|
||||||
t['unit'] = c.unit;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
t[it] = '-';
|
|
||||||
t[it + '-tfRed'] = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (!t['printContext']) {
|
|
||||||
t['printContext'] = item.list.length > 0 ? item.list[0].printContext : '';
|
|
||||||
}
|
|
||||||
if (!t['unit']) {
|
|
||||||
t['unit'] = item.list.length > 0 ? item.list[0].unit : '';
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.table-d {
|
|
||||||
background-color: #e6f7ff;
|
|
||||||
color: #5c5c5c;
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 99;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
border-top: 1px solid #f0f0f0;
|
|
||||||
border-left: 1px solid #f0f0f0;
|
|
||||||
> div {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
padding: 7px 0;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-d-1 {
|
|
||||||
border-left: 1px solid #f0f0f0;
|
|
||||||
> div {
|
|
||||||
> div {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
border-right: 1px solid #f0f0f0;
|
|
||||||
padding: 10px 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,168 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="outer-5">
|
|
||||||
<div style="height: 100%; overflow: hidden" v-show="pageValue === '0'">
|
|
||||||
<div>
|
|
||||||
<a-radio-group button-style="solid" style="margin-left: 5px" v-model:value="radioValue" @change="changeRadioValue">
|
|
||||||
<a-radio-button value="0">疾病史</a-radio-button>
|
|
||||||
<a-radio-button value="1">门诊档案</a-radio-button>
|
|
||||||
<a-radio-button value="2">住院档案</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
|
|
||||||
<BasicTable @register="registerTable" :row-selection="rowSelection">
|
|
||||||
<template v-if="radioValue !== '0' && props.editType !== '1'" #tableTitle>
|
|
||||||
<a-button type="primary" @click="add">新增</a-button>
|
|
||||||
<a-button type="primary" @click="edit">修改</a-button>
|
|
||||||
<a-button type="primary" @click="del">删除</a-button>
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.dataIndex === 'diagnosis' || column.dataIndex === 'doctorAdvice'">
|
|
||||||
<a-popover :title="column.customTitle" trigger="click">
|
|
||||||
<template #content>
|
|
||||||
<div style="width: 150px; max-height: 300px; overflow: auto">
|
|
||||||
{{ record[column.dataIndex] }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<a-button type="link" @click.stop="() => {}">查看</a-button>
|
|
||||||
</a-popover>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<tab5-detail
|
|
||||||
ref="tab5Detail"
|
|
||||||
@refresh="
|
|
||||||
() => {
|
|
||||||
pageValue = '0';
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
"
|
|
||||||
v-if="pageValue !== '0'"
|
|
||||||
style="height: 100%; overflow: hidden"
|
|
||||||
@go-back="() => (pageValue = '0')"
|
|
||||||
:id="itemId"
|
|
||||||
:userId="props.userInfo.id"
|
|
||||||
:type="radioValue"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { nextTick, onMounted, ref } from 'vue';
|
|
||||||
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import { tab5ReportColumns1, tab5ReportColumns2, tab5ReportColumns3 } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import { allPageApi, deleteBatchApi, pageApi } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
import Tab5Detail from '/@/views/archivesManage/employee/fileMaintenance/components/tab5/tab5Detail.vue';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
editType: {
|
|
||||||
type: String,
|
|
||||||
default: () => '0',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const pageValue = ref('0');
|
|
||||||
const radioValue = ref('0');
|
|
||||||
const itemId = ref('');
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
setProps({ api: allPageApi });
|
|
||||||
});
|
|
||||||
|
|
||||||
function changeRadioValue(v) {
|
|
||||||
switch (v.target.value) {
|
|
||||||
case '0':
|
|
||||||
setProps({ api: allPageApi, columns: tab5ReportColumns1, searchInfo: { userId: props.userInfo.id } });
|
|
||||||
break;
|
|
||||||
case '1':
|
|
||||||
setProps({
|
|
||||||
api: pageApi,
|
|
||||||
columns: tab5ReportColumns2,
|
|
||||||
searchInfo: { userId: props.userInfo.id, type: '0' },
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case '2':
|
|
||||||
setProps({
|
|
||||||
api: pageApi,
|
|
||||||
columns: tab5ReportColumns3,
|
|
||||||
searchInfo: { userId: props.userInfo.id, type: '1' },
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
selectedRows.value = [];
|
|
||||||
selectedRowKeys.value = [];
|
|
||||||
reload({ page: 1 });
|
|
||||||
}
|
|
||||||
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
title: '体检报告',
|
|
||||||
columns: tab5ReportColumns1,
|
|
||||||
api: allPageApi,
|
|
||||||
canResize: false,
|
|
||||||
searchInfo: {
|
|
||||||
userId: props.userInfo.id,
|
|
||||||
},
|
|
||||||
tableSetting: {
|
|
||||||
redo: true,
|
|
||||||
setting: false,
|
|
||||||
},
|
|
||||||
showActionColumn: false,
|
|
||||||
useSearchForm: false,
|
|
||||||
actionColumn: {
|
|
||||||
width: 120,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { setProps, reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
|
|
||||||
function add() {
|
|
||||||
itemId.value = '';
|
|
||||||
pageValue.value = '1';
|
|
||||||
nextTick(() => {
|
|
||||||
tab5Detail.value.setInfo({ type: radioValue.value === '1' ? '0' : '1' });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
const tab5Detail = ref();
|
|
||||||
function edit() {
|
|
||||||
if (selectedRowKeys.value.length !== 1) return message.warn('请选择一条数据');
|
|
||||||
itemId.value = selectedRowKeys.value[0];
|
|
||||||
pageValue.value = '1';
|
|
||||||
nextTick(() => {
|
|
||||||
tab5Detail.value.setInfo({ ...selectedRows.value[0], type: radioValue.value === '1' ? '0' : '1' });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function del() {
|
|
||||||
if (selectedRowKeys.value.length === 0) return message.warn('请选择一条数据');
|
|
||||||
itemId.value = selectedRowKeys.value[0];
|
|
||||||
deleteBatchApi({ ids: selectedRowKeys.value.join(',') }, reload);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.outer-4 {
|
|
||||||
height: calc(100% - 46px);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-radio-button-wrapper) {
|
|
||||||
color: #1684fc !important;
|
|
||||||
border-color: #1684fc !important;
|
|
||||||
&:before {
|
|
||||||
background-color: #1684fc !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-radio-button-wrapper-checked) {
|
|
||||||
color: #ffffff !important;
|
|
||||||
}
|
|
||||||
.no-select {
|
|
||||||
:deep(.table-selection-column td) {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="display: flex; width: 100%; align-items: center; justify-content: space-between">
|
|
||||||
<div>
|
|
||||||
<a-button type="primary" @click="() => emit('goBack')">返回</a-button>
|
|
||||||
</div>
|
|
||||||
<div style="font-size: 18px; font-weight: bold"> 新增{{ props.type === '1' ? '门诊' : '住院' }}档案 </div>
|
|
||||||
<div> </div>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1; margin-top: 20px">
|
|
||||||
<BasicForm @register="registerForm1" />
|
|
||||||
<BasicForm @register="registerForm2" />
|
|
||||||
</div>
|
|
||||||
<div style="text-align: right; padding-right: 5px">
|
|
||||||
<a-button type="primary" :loading="loading" @click="save">保存</a-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicForm from '/@/components/Form/src/BasicForm.vue';
|
|
||||||
import { useForm } from '/@/components/Form';
|
|
||||||
import { tab5FormSchema1, tab5FormSchema2 } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { saveApi, updateApi } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
id: {
|
|
||||||
type: String,
|
|
||||||
default: () => '',
|
|
||||||
},
|
|
||||||
userId: {
|
|
||||||
type: String,
|
|
||||||
default: () => '',
|
|
||||||
},
|
|
||||||
type: {
|
|
||||||
type: String,
|
|
||||||
default: () => '1',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const loading = ref(false);
|
|
||||||
|
|
||||||
const [registerForm1, { setFieldsValue: setFieldsValue1, validate: validate1, getFieldsValue }] = useForm({
|
|
||||||
schemas: tab5FormSchema1,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 8 },
|
|
||||||
labelWidth: 120,
|
|
||||||
layout: 'inline',
|
|
||||||
});
|
|
||||||
const [registerForm2, { setFieldsValue: setFieldsValue2, validate: validate2 }] = useForm({
|
|
||||||
schemas: tab5FormSchema2,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
labelWidth: 120,
|
|
||||||
});
|
|
||||||
|
|
||||||
function setInfo(record: Recordable) {
|
|
||||||
setFieldsValue1({ ...record, id: props.id });
|
|
||||||
setFieldsValue2({ ...record });
|
|
||||||
}
|
|
||||||
|
|
||||||
async function save() {
|
|
||||||
try {
|
|
||||||
loading.value = true;
|
|
||||||
let v1 = await validate1();
|
|
||||||
let v2 = await validate2();
|
|
||||||
if (props.id) {
|
|
||||||
await updateApi({ ...v1, ...v2, userId: props.userId });
|
|
||||||
} else {
|
|
||||||
await saveApi({ ...v1, ...v2, userId: props.userId });
|
|
||||||
}
|
|
||||||
emit('refresh');
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
} finally {
|
|
||||||
loading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const emit = defineEmits(['goBack', 'refresh']);
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
setInfo,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less"></style>
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="outer-6">
|
|
||||||
<div style="text-align: right" v-if="props.editType !== '1'">
|
|
||||||
<a-button v-show="!isUpdate" type="primary" @click="() => (isUpdate = true)">编辑</a-button>
|
|
||||||
<a-button v-show="isUpdate" type="primary" @click="save">保存</a-button>
|
|
||||||
<a-button style="margin-left: 10px" v-show="isUpdate" type="primary" @click="cancel">取消</a-button>
|
|
||||||
</div>
|
|
||||||
<div class="item-d-outer">
|
|
||||||
<div class="item-d">
|
|
||||||
<div>亲缘关系</div>
|
|
||||||
<div>疾病一</div>
|
|
||||||
<div>疾病二</div>
|
|
||||||
<div>疾病三</div>
|
|
||||||
<div>疾病四</div>
|
|
||||||
<div>疾病五</div>
|
|
||||||
</div>
|
|
||||||
<div class="item-d" v-for="(item, index) in dataList" :key="`item-d-${index}`">
|
|
||||||
<div> {{ item.familyRelation_dictText }} </div>
|
|
||||||
<div>
|
|
||||||
<span v-if="!isUpdate">{{ item['illnessOne'] || '-' }}</span>
|
|
||||||
<a-input v-else v-model:value="item['illnessOne']" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span v-if="!isUpdate">{{ item['illnessTwo'] || '-' }}</span>
|
|
||||||
<a-input v-else v-model:value="item['illnessTwo']" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span v-if="!isUpdate">{{ item['illnessThree'] || '-' }}</span>
|
|
||||||
<a-input v-else v-model:value="item['illnessThree']" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span v-if="!isUpdate">{{ item['illnessFour'] || '-' }}</span>
|
|
||||||
<a-input v-else v-model:value="item['illnessFour']" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span v-if="!isUpdate">{{ item['illnessFive'] || '-' }}</span>
|
|
||||||
<a-input v-else v-model:value="item['illnessFive']" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import { tab6EditApi, tab6PageApi } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
editType: {
|
|
||||||
type: String,
|
|
||||||
default: () => '0',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const dataList = ref();
|
|
||||||
const isUpdate = ref();
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
|
|
||||||
async function getList() {
|
|
||||||
try {
|
|
||||||
dataList.value = (await tab6PageApi({ userId: props.userInfo.id })).records;
|
|
||||||
} catch (e) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function save() {
|
|
||||||
try {
|
|
||||||
dataList.value.map((item) => {
|
|
||||||
item['userId'] = props.userInfo.id;
|
|
||||||
return item;
|
|
||||||
});
|
|
||||||
await tab6EditApi(dataList.value);
|
|
||||||
await getList();
|
|
||||||
isUpdate.value = false;
|
|
||||||
} catch (e) {}
|
|
||||||
}
|
|
||||||
function cancel() {
|
|
||||||
getList();
|
|
||||||
isUpdate.value = false;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.outer-4 {
|
|
||||||
height: calc(100% - 46px);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-d-outer {
|
|
||||||
flex: 1;
|
|
||||||
margin-top: 10px;
|
|
||||||
overflow: auto;
|
|
||||||
border-bottom: 1px solid #c1c1c1;
|
|
||||||
border-left: 1px solid #c1c1c1;
|
|
||||||
> div:nth-child(1) {
|
|
||||||
> div {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-d {
|
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
|
||||||
> div {
|
|
||||||
width: calc(100% / 6);
|
|
||||||
border-top: 1px solid #c1c1c1;
|
|
||||||
border-right: 1px solid #c1c1c1;
|
|
||||||
text-align: center;
|
|
||||||
padding: 10px 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
width: 95%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,199 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="tab8-content">
|
|
||||||
<div class="top">
|
|
||||||
<div class="top-left">
|
|
||||||
<a-tabs v-model:activeKey="activeKey" @change="changeTabs">
|
|
||||||
<a-tab-pane key="1" tab="全部"></a-tab-pane>
|
|
||||||
<a-tab-pane key="2" tab="选时"></a-tab-pane>
|
|
||||||
<a-tab-pane key="3" tab="日"></a-tab-pane>
|
|
||||||
<a-tab-pane key="4" tab="周"></a-tab-pane>
|
|
||||||
<a-tab-pane key="5" tab="月"></a-tab-pane>
|
|
||||||
<a-tab-pane key="6" tab="季"></a-tab-pane>
|
|
||||||
<a-tab-pane key="7" tab="年"></a-tab-pane>
|
|
||||||
</a-tabs>
|
|
||||||
</div>
|
|
||||||
<div class="top-right">
|
|
||||||
<a-radio-group v-model:value="sportType" button-style="solid" @change="handleChange">
|
|
||||||
<a-radio-button value="0">步数</a-radio-button>
|
|
||||||
<a-radio-button value="1">锻炼</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="center" v-if="showPicker">
|
|
||||||
<a-date-picker v-model:value="dateValue" :picker="pickerType" v-if="!showRangePicker" @change="changeDate" />
|
|
||||||
|
|
||||||
<a-range-picker v-model:value="rangeValue" v-if="showRangePicker" @change="changeRange" />
|
|
||||||
</div>
|
|
||||||
<div class="bottom">
|
|
||||||
<BasicTable @register="registerTable" table-type="0">
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<div v-if="column.dataIndex == 'source'">穿戴设备</div>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { BasicTable } from '/@/components/Table';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import { tab8Column } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import { tab8SdsApi, tab8WorkApi } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import weekday from 'dayjs/plugin/weekday';
|
|
||||||
import quarterOfYear from 'dayjs/plugin/quarterOfYear';
|
|
||||||
dayjs.extend(weekday);
|
|
||||||
dayjs.extend(quarterOfYear);
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
editType: {
|
|
||||||
type: String,
|
|
||||||
default: () => '0',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const sportType = ref('0');
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: tab8SdsApi,
|
|
||||||
columns: tab8Column(sportType.value),
|
|
||||||
useSearchForm: false,
|
|
||||||
showActionColumn: false,
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params.userId = props.userInfo?.id;
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, setProps }] = tableContext;
|
|
||||||
const activeKey = ref('1');
|
|
||||||
const pickerType = ref('');
|
|
||||||
const showRangePicker = ref(false);
|
|
||||||
const dateValue = ref(dayjs(new Date()));
|
|
||||||
const rangeValue = ref([dayjs(new Date().setDate(new Date().getDate() - 7)), dayjs(new Date())]);
|
|
||||||
const showPicker = ref(false);
|
|
||||||
function changeTabs() {
|
|
||||||
showRangePicker.value = false;
|
|
||||||
showPicker.value = true;
|
|
||||||
switch (activeKey.value) {
|
|
||||||
case '1':
|
|
||||||
showPicker.value = false;
|
|
||||||
break;
|
|
||||||
case '2':
|
|
||||||
showRangePicker.value = true;
|
|
||||||
break;
|
|
||||||
case '3':
|
|
||||||
pickerType.value = '';
|
|
||||||
break;
|
|
||||||
case '4':
|
|
||||||
pickerType.value = 'week';
|
|
||||||
break;
|
|
||||||
case '5':
|
|
||||||
pickerType.value = 'month';
|
|
||||||
break;
|
|
||||||
case '6':
|
|
||||||
pickerType.value = 'quarter';
|
|
||||||
break;
|
|
||||||
case '7':
|
|
||||||
pickerType.value = 'year';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
updataTable();
|
|
||||||
}
|
|
||||||
function handleChange() {
|
|
||||||
console.log(sportType.value);
|
|
||||||
setProps({
|
|
||||||
columns: tab8Column(sportType.value),
|
|
||||||
api: sportType.value == '0' ? tab8SdsApi : tab8WorkApi,
|
|
||||||
});
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
function changeDate() {
|
|
||||||
updataTable();
|
|
||||||
}
|
|
||||||
function changeRange() {
|
|
||||||
updataTable();
|
|
||||||
}
|
|
||||||
function updataTable() {
|
|
||||||
let startOfWeek;
|
|
||||||
let endOfWeek;
|
|
||||||
if (activeKey.value == '1') {
|
|
||||||
startOfWeek = '';
|
|
||||||
endOfWeek = '';
|
|
||||||
} else if (activeKey.value == '2') {
|
|
||||||
startOfWeek = rangeValue.value ? rangeValue.value[0].format('YYYY-MM-DD') : '';
|
|
||||||
endOfWeek = rangeValue.value ? rangeValue.value[1].format('YYYY-MM-DD') : '';
|
|
||||||
} else {
|
|
||||||
switch (activeKey.value) {
|
|
||||||
case '3':
|
|
||||||
startOfWeek = dayjs(dateValue.value).startOf('day').format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(dateValue.value).endOf('day').format('YYYY-MM-DD');
|
|
||||||
break;
|
|
||||||
case '4':
|
|
||||||
startOfWeek = dayjs(dateValue.value).startOf('week').format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(dateValue.value).endOf('week').format('YYYY-MM-DD');
|
|
||||||
break;
|
|
||||||
case '5':
|
|
||||||
startOfWeek = dayjs(dateValue.value).startOf('month').format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(dateValue.value).endOf('month').format('YYYY-MM-DD');
|
|
||||||
break;
|
|
||||||
case '6':
|
|
||||||
const quarter = dayjs(dateValue.value).quarter();
|
|
||||||
if (quarter === 1) {
|
|
||||||
startOfWeek = dayjs(`${dayjs(dateValue.value).year()}-01-01`).format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(`${dayjs(dateValue.value).year()}-03-31`).format('YYYY-MM-DD');
|
|
||||||
} else if (quarter === 2) {
|
|
||||||
startOfWeek = dayjs(`${dayjs(dateValue.value).year()}-04-01`).format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(`${dayjs(dateValue.value).year()}-06-30`).format('YYYY-MM-DD');
|
|
||||||
} else if (quarter === 3) {
|
|
||||||
startOfWeek = dayjs(`${dayjs(dateValue.value).year()}-07-01`).format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(`${dayjs(dateValue.value).year()}-09-30`).format('YYYY-MM-DD');
|
|
||||||
} else if (quarter === 4) {
|
|
||||||
startOfWeek = dayjs(`${dayjs(dateValue.value).year()}-10-01`).format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(`${dayjs(dateValue.value).year()}-12-31`).format('YYYY-MM-DD');
|
|
||||||
}
|
|
||||||
// startOfWeek = dayjs(dateValue.value).startOf('quarter').format('YYYY-MM-DD');
|
|
||||||
// endOfWeek = dayjs(dateValue.value).endOf('quarter').format('YYYY-MM-DD');
|
|
||||||
break;
|
|
||||||
case '7':
|
|
||||||
startOfWeek = dayjs(dateValue.value).startOf('year').format('YYYY-MM-DD');
|
|
||||||
endOfWeek = dayjs(dateValue.value).endOf('year').format('YYYY-MM-DD');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setProps({
|
|
||||||
beforeFetch: (parmas) => {
|
|
||||||
parmas.userId = props.userInfo?.id;
|
|
||||||
parmas.startTime = startOfWeek;
|
|
||||||
parmas.endTime = endOfWeek;
|
|
||||||
return parmas;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
reload({ page: 1 });
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.tab8-content {
|
|
||||||
.top {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: space-between;
|
|
||||||
.top-left {
|
|
||||||
:deep(.ant-tabs-nav) {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
:deep(.ant-tabs-tab-active) {
|
|
||||||
background: #fff !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.top-right {
|
|
||||||
:deep(.ant-radio-button-wrapper) {
|
|
||||||
width: 100px !important;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div v-show="!showView">
|
|
||||||
<a-radio-group v-model:value="radioType" button-style="solid" @change="changeRadio">
|
|
||||||
<a-radio-button value="0">吸烟</a-radio-button>
|
|
||||||
<a-radio-button value="1">饮酒</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
<BasicTable @register="registerTable">
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<div v-if="column.dataIndex == 'detail'">
|
|
||||||
<a-button type="link" @click="handleDetail(record)">问卷内容</a-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
</div>
|
|
||||||
<Tab9Detail v-show="showView && info" @go-back="goBack" :info="info" :type="radioType"></Tab9Detail>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { BasicTable } from '/@/components/Table';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { tab9ListApi } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.api';
|
|
||||||
import { tab9Column, tab9Column1 } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import Tab9Detail from '/@/views/archivesManage/employee/fileMaintenance/components/tab9/tab9Detail.vue';
|
|
||||||
const radioType = ref('0');
|
|
||||||
const props = defineProps({
|
|
||||||
userInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const showView = ref(false);
|
|
||||||
const { tableContext, onExportXls } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: tab9ListApi,
|
|
||||||
columns: radioType.value == '0' ? tab9Column : tab9Column1,
|
|
||||||
useSearchForm: false,
|
|
||||||
showIndexColumn: true,
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params.userId = props.userInfo.id;
|
|
||||||
params.type = radioType.value;
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, setColumns, setProps }] = tableContext;
|
|
||||||
const info = ref();
|
|
||||||
function changeRadio() {
|
|
||||||
setProps({
|
|
||||||
columns: radioType.value == '0' ? tab9Column : tab9Column1,
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params.userId = props.userInfo.id;
|
|
||||||
params.type = radioType.value;
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
function goBack() {
|
|
||||||
showView.value = false;
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
function handleDetail(record) {
|
|
||||||
info.value = record;
|
|
||||||
showView.value = true;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div class="title">
|
|
||||||
<a-button type="primary" @click="goBack" class="addBtn">返回</a-button>
|
|
||||||
<div class="name">{{ props.type == '0' ? '吸烟' : '喝酒' }}-问卷内容</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="info && type == '0'" class="smoke">
|
|
||||||
<!-- <BasicForm @register="registerForm" />-->
|
|
||||||
<div>
|
|
||||||
<span>调查时间:{{ info?.createTime ? info?.createTime : '--' }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="smoke-detail">
|
|
||||||
<div class="label">(1)吸烟状况</div>
|
|
||||||
<span class="value">
|
|
||||||
<!-- <a-space direction="vertical">-->
|
|
||||||
<!-- <a-radio-group disabled v-model:value="smokingStatus" :options="smokeOptions" />-->
|
|
||||||
<!-- </a-space>-->
|
|
||||||
{{ info?.smokingStatus == 0 ? '吸烟' : info?.smokingStatus == 1 ? '已戒烟' : '从不吸烟' }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="smoke-detail">
|
|
||||||
<div class="label">(2)每天吸几根烟</div>
|
|
||||||
<span class="value">{{ info?.roots ? info?.roots : '--' }}根</span>
|
|
||||||
</div>
|
|
||||||
<div class="smoke-detail">
|
|
||||||
<div class="label">(3)开始吸烟的年龄</div>
|
|
||||||
<span class="value">{{ info?.smokingAge ? info?.smokingAge : '--' }}岁</span>
|
|
||||||
</div>
|
|
||||||
<div class="smoke-detail">
|
|
||||||
<div class="label">(4)和您一起工作的人是否有人吸烟?</div>
|
|
||||||
<span class="value">{{ info?.passiveSmoking == 0 ? '有' : '没有' }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="info && type == '1'" class="wine">
|
|
||||||
<div>
|
|
||||||
<span>调查时间:{{ info?.createTime ? info?.createTime : '--' }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="wine-detail">
|
|
||||||
<div class="label">(1)饮酒状况</div>
|
|
||||||
<span class="value">
|
|
||||||
<!-- <a-space direction="vertical">-->
|
|
||||||
<!-- <a-radio-group disabled v-model:value="smokingStatus" :options="wineOptions" />-->
|
|
||||||
<!-- </a-space>-->
|
|
||||||
{{ info?.drinkStatus == 0 ? '饮酒' : info?.drinkStatus == 1 ? '已戒酒' : '从不饮酒' }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="wine-detail">
|
|
||||||
<div class="label">(2)喝酒的频次和两数</div>
|
|
||||||
<div class="value">
|
|
||||||
<div v-for="(item, index) in beerType" :key="index" class="wine-class">
|
|
||||||
<span> {{ item.label }}</span>
|
|
||||||
<div>
|
|
||||||
<span class="num">{{ info[item.value] ? info[item.value].drinkUnit : '--' }}</span>
|
|
||||||
次/周,
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="num">{{ info[item.value] ? info[item.value].frequency : '--' }}</span>
|
|
||||||
两/次
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import { beerType } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
const props = defineProps({
|
|
||||||
info: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
type: {
|
|
||||||
type: String,
|
|
||||||
default: '0',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const smokeOptions = [
|
|
||||||
{ label: '吸烟', value: 0 },
|
|
||||||
{ label: '已戒烟', value: 1 },
|
|
||||||
{ label: '从不吸烟', value: 2 },
|
|
||||||
];
|
|
||||||
const wineOptions = [
|
|
||||||
{ label: '饮酒', value: 0 },
|
|
||||||
{ label: '已戒酒', value: 1 },
|
|
||||||
{ label: '从不饮酒', value: 2 },
|
|
||||||
];
|
|
||||||
const smokingStatus = ref(2);
|
|
||||||
const emit = defineEmits(['go-back']);
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
smokingStatus.value = props.type == '0' ? props.info?.smokingStatus : props.info?.drinkStatus;
|
|
||||||
});
|
|
||||||
function goBack() {
|
|
||||||
emit('go-back');
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.title {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
|
||||||
justify-content: space-around;
|
|
||||||
.addBtn {
|
|
||||||
position: absolute;
|
|
||||||
left: 10px;
|
|
||||||
}
|
|
||||||
.name {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.smoke {
|
|
||||||
margin: 20px;
|
|
||||||
.smoke-detail {
|
|
||||||
.label {
|
|
||||||
font-weight: bold;
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
.value {
|
|
||||||
margin: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.wine {
|
|
||||||
margin: 20px;
|
|
||||||
.wine-detail {
|
|
||||||
.label {
|
|
||||||
font-weight: bold;
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
.value {
|
|
||||||
margin: 20px;
|
|
||||||
.wine-class {
|
|
||||||
display: flex;
|
|
||||||
margin: 20px;
|
|
||||||
.num {
|
|
||||||
display: inline-block;
|
|
||||||
width: 50px;
|
|
||||||
border: 2px solid rgba(0, 0, 0, 0.5);
|
|
||||||
margin: 0 5px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,119 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
|
||||||
const { createConfirm } = useMessage();
|
|
||||||
enum Api {
|
|
||||||
tab8Sds = '/health-watch/archives/exercise/sdc/page',
|
|
||||||
tab8Work = '/health-watch/archives/exercise/workout/page',
|
|
||||||
tab12List = '/health-archives/archives/assess/risk',
|
|
||||||
tab15List = '/health-archives/archives/assess/mind',
|
|
||||||
psychoList = '/health-intervene/psychology/psychologyDiagnosisReport/list',
|
|
||||||
// tab4接口
|
|
||||||
selectMedicalUniItemClassList = '/health-archives/archives/hmsEvaluation/selectMedicalUniItemClassList',
|
|
||||||
selectMedicalUniItemByClassId = '/health-archives/archives/hmsEvaluation/selectMedicalUniItemByClassId',
|
|
||||||
status = '/health-archives/archives/hmsEvaluation/analysisReport/status',
|
|
||||||
// tab5接口
|
|
||||||
allPage = '/health-archives/archives/self/illness/all-page',
|
|
||||||
page = '/health-archives/archives/self/illness/page',
|
|
||||||
save = '/health-archives/archives/self/illness/save',
|
|
||||||
update = '/health-archives/archives/self/illness/update',
|
|
||||||
deleteBatch = '/health-archives/archives/self/illness/deleteBatch',
|
|
||||||
//tab3
|
|
||||||
tab3BodyType = '/health-watch/archives/bodyType/select',
|
|
||||||
tab3BodyTypeAdd = '/health-watch/archives/bodyType/add',
|
|
||||||
tab3BodyTypeAnalysisList = '/health-watch/archives/bodyType/analysis/list',
|
|
||||||
tab3BodyTypeAnalysisLine = '/health-watch/archives/bodyType/analysis/line',
|
|
||||||
tab3Model = '/health-archives/api/archives/loreCheckSubject/selectLoreCheckSubjectByModelId',
|
|
||||||
tab3Physique = '/health-system/archives/employee/physique/user',
|
|
||||||
tab3PhysiqueAdd = '/health-system/archives/employee/physique/add',
|
|
||||||
tab3PhysiqueCommonTrend = '/health-system/archives/employee/physique/common-trend',
|
|
||||||
tab3PhysiqueCommonPage = '/health-system/archives/employee/physique/common-page',
|
|
||||||
tab3PhysiqueBloodTrend = '/health-system/archives/employee/physique/blood-trend',
|
|
||||||
tab3PhysiqueBloodPage = '/health-system/archives/employee/physique/blood-page',
|
|
||||||
// tab6
|
|
||||||
tab6Page = '/health-archives/archives/familyIllness/page',
|
|
||||||
tab6Edit = '/health-archives/archives/familyIllness/edit',
|
|
||||||
// tab10
|
|
||||||
tab10List1 = '/health-watch/archives/sleep/watch/page',
|
|
||||||
tab10List2 = '/health-intervene/archives/sleep/psychology/page',
|
|
||||||
tab16List = '/health-archives/archives/vaccine/page',
|
|
||||||
tab16Add = '/health-archives/archives/vaccine/save',
|
|
||||||
tab16Edit = '/health-archives/archives/vaccine/update',
|
|
||||||
tab16Delete = '/health-archives/archives/vaccine/deleteBatch',
|
|
||||||
tab9List = '/health-archives/archives/smoking/survey/page',
|
|
||||||
}
|
|
||||||
|
|
||||||
export const tab8SdsApi = (params) => defHttp.get({ url: Api.tab8Sds, params });
|
|
||||||
export const tab8WorkApi = (params) => defHttp.get({ url: Api.tab8Work, params });
|
|
||||||
|
|
||||||
export const tab10List1Api = (params) => defHttp.get({ url: Api.tab10List1, params });
|
|
||||||
export const tab10List2Api = (params) => defHttp.get({ url: Api.tab10List2, params });
|
|
||||||
export const tab12ListApi = (params) => defHttp.get({ url: Api.tab12List, params });
|
|
||||||
export const tab15ListApi = (params) => defHttp.get({ url: Api.tab15List, params });
|
|
||||||
|
|
||||||
export const tab3ModelApi = (params) => defHttp.get({ url: Api.tab3Model, params });
|
|
||||||
export const tab3BodyTypeApi = (params) => defHttp.get({ url: Api.tab3BodyType, params });
|
|
||||||
export const tab3BodyTypeAddApi = (params) => defHttp.post({ url: Api.tab3BodyTypeAdd, params }, { joinParamsToUrl: true });
|
|
||||||
export const tab3BodyTypeAnalysisListApi = (params) => defHttp.post({ url: Api.tab3BodyTypeAnalysisList, params }, { joinParamsToUrl: true });
|
|
||||||
export const tab3BodyTypeAnalysisLineApi = (params) => defHttp.post({ url: Api.tab3BodyTypeAnalysisLine, params }, { joinParamsToUrl: true });
|
|
||||||
|
|
||||||
export const tab3PhysiqueApi = (params) => defHttp.get({ url: Api.tab3Physique, params });
|
|
||||||
|
|
||||||
export const tab3PhysiqueAddApi = (params) => defHttp.post({ url: Api.tab3PhysiqueAdd, params }, { joinParamsToUrl: true });
|
|
||||||
export const tab3PhysiqueCommonTrendApi = (params) => defHttp.get({ url: Api.tab3PhysiqueCommonTrend, params }, { joinParamsToUrl: true });
|
|
||||||
export const tab3PhysiqueCommonPageApi = (params) => defHttp.get({ url: Api.tab3PhysiqueCommonPage, params }, { joinParamsToUrl: true });
|
|
||||||
export const tab3PhysiqueBloodTrendApi = (params) => defHttp.get({ url: Api.tab3PhysiqueBloodTrend, params }, { joinParamsToUrl: true });
|
|
||||||
export const tab3PhysiqueBloodPageApi = (params) => defHttp.get({ url: Api.tab3PhysiqueBloodPage, params }, { joinParamsToUrl: true });
|
|
||||||
|
|
||||||
export const psychoList = (params) => defHttp.get({ url: Api.psychoList, params });
|
|
||||||
|
|
||||||
// tab4
|
|
||||||
export const selectMedicalUniItemClassListApi = (params: any) => defHttp.get({ url: Api.selectMedicalUniItemClassList, params });
|
|
||||||
export const selectMedicalUniItemByClassIdApi = (params: any) => defHttp.get({ url: Api.selectMedicalUniItemByClassId, params });
|
|
||||||
export const statusApi = (params: any) => defHttp.get({ url: Api.status, params });
|
|
||||||
|
|
||||||
// tab5
|
|
||||||
export const allPageApi = (params: any) => defHttp.get({ url: Api.allPage, params });
|
|
||||||
export const pageApi = (params: any) => defHttp.get({ url: Api.page, params });
|
|
||||||
export const saveApi = (params: any) => defHttp.post({ url: Api.save, params });
|
|
||||||
export const updateApi = (params: any) => defHttp.put({ url: Api.update, params });
|
|
||||||
export const deleteBatchApi = (params: any, handleSuccess) => {
|
|
||||||
createConfirm({
|
|
||||||
iconType: 'warning',
|
|
||||||
title: '确认删除',
|
|
||||||
content: '是否删除选中数据',
|
|
||||||
okText: '确认',
|
|
||||||
cancelText: '取消',
|
|
||||||
onOk: () => {
|
|
||||||
return defHttp.delete({ url: Api.deleteBatch, params }, { joinParamsToUrl: true }).then(() => {
|
|
||||||
handleSuccess();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// tab6
|
|
||||||
export const tab6PageApi = (params: any) => defHttp.get({ url: Api.tab6Page, params });
|
|
||||||
export const tab6EditApi = (params: any) => defHttp.put({ url: Api.tab6Edit, params });
|
|
||||||
|
|
||||||
export const tab16ListApi = (params) => defHttp.get({ url: Api.tab16List, params });
|
|
||||||
|
|
||||||
export const tab16AddApi = (params) => defHttp.post({ url: Api.tab16Add, params });
|
|
||||||
|
|
||||||
export const tab16EditApi = (params) => defHttp.put({ url: Api.tab16Edit, params });
|
|
||||||
|
|
||||||
export const tab16DeleteApi = (params, handleSuccess) => {
|
|
||||||
createConfirm({
|
|
||||||
iconType: 'warning',
|
|
||||||
title: '确认删除',
|
|
||||||
content: '是否删除选中数据',
|
|
||||||
okText: '确认',
|
|
||||||
cancelText: '取消',
|
|
||||||
onOk: () => {
|
|
||||||
return defHttp.delete({ url: Api.tab16Delete, params }, { joinParamsToUrl: true }).then(() => {
|
|
||||||
handleSuccess();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const tab9ListApi = (params) => defHttp.get({ url: Api.tab9List, params });
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,145 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicTables @register="registerTable" ref="bbb" :show-total="ifShowTotal" @go-export="exportExcel" :row-selection="rowSelection">
|
|
||||||
<template #btn>
|
|
||||||
<a-button @click="handleEditInfo" type="primary">档案维护</a-button>
|
|
||||||
<a-button @click="handleSearch" type="primary">信息查询</a-button>
|
|
||||||
<!-- <a-button @click="handleSearch" type="primary">信息导入</a-button>-->
|
|
||||||
<a-button @click="exportExcel" type="primary">信息导出</a-button>
|
|
||||||
<a-button @click="handlePrint" type="primary"> 信息打印 </a-button>
|
|
||||||
<a-button @click="handleTotal" type="primary" :loading="buttonLoading">{{ ifShowTotal ? '取消统计' : '信息统计' }}</a-button>
|
|
||||||
</template>
|
|
||||||
<template #header-bottom-s="d" v-if="ifShowTotal">
|
|
||||||
<template v-if="d.dataIndex !== 'sex_dictText' && d.dataIndex !== 'jobLevel_dictText'">
|
|
||||||
{{ d.dataIndex === 'listIndex' ? '统计行' : isNull(titleData[d.dataIndex]) }}
|
|
||||||
</template>
|
|
||||||
<template v-if="d.dataIndex == 'sex_dictText'">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title="">{{ sexTool }}</template>
|
|
||||||
{{ isNull(titleData[d.dataIndex]) }}
|
|
||||||
</a-tooltip>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-if="d.dataIndex == 'jobLevel_dictText'">
|
|
||||||
{{ jobTool }}
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.dataIndex == 'avatar'">
|
|
||||||
<a-button v-if="record?.avatar" type="link" @click="handleAva(record?.avatar)">有</a-button>
|
|
||||||
<span v-else>无</span>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTables>
|
|
||||||
<div style="display: none">
|
|
||||||
<ImagePreviewGroup v-if="imgList && imgList.length > 0" :preview="{ visible, onVisibleChange: (vis) => (visible = vis) }">
|
|
||||||
<Image v-for="(item, index) in imgList" :key="index" :width="200" :fallback="getFamaleDefaultImage()" :src="getFileAccessHttpUrl(item)" />
|
|
||||||
</ImagePreviewGroup>
|
|
||||||
</div>
|
|
||||||
<FileModal @register="registerModal" @success="handleSuccess"></FileModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { BasicTables } from '/@/components/Table';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { userInfoApi, userInfoExportApi, userInfoStatApi } from '/@/views/information/employeeInformation/basicInformation/database/database.api';
|
|
||||||
import { columns, searchFormSchema } from '/@/views/archivesManage/employee/fileMaintenance/maintenance.data';
|
|
||||||
import { nextTick, ref } from 'vue';
|
|
||||||
const imgList = ref<string[]>([]);
|
|
||||||
const visible = ref(false);
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { getFamaleDefaultImage, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
|
||||||
import { Image, ImagePreviewGroup, message } from 'ant-design-vue';
|
|
||||||
import { isNull } from '/@/utils/getEnv';
|
|
||||||
import FileModal from '/@/views/archivesManage/employee/fileMaintenance/components/fileModal.vue';
|
|
||||||
|
|
||||||
const { tableContext, onExportXls } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
pageTitle: '长庆油田员工名册',
|
|
||||||
api: userInfoApi,
|
|
||||||
columns,
|
|
||||||
canResize: false,
|
|
||||||
btnArr: ['add', 'edit', 'delete', 'search', 'export', 'print'],
|
|
||||||
formConfig: {
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [
|
|
||||||
['rangeDate', ['birthdayStart', 'birthdayEnd'], 'YYYY-MM-DD'],
|
|
||||||
['applyTime', ['workTimeStart', 'workTimeEnd'], 'YYYY-MM-DD'],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
showIndexColumn: true,
|
|
||||||
indexColumnProps: {
|
|
||||||
dataIndex: 'listIndex',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 120,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, getForm }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
|
|
||||||
const [registerModal, { openModal: openUserModal }] = useModal();
|
|
||||||
const bbb = ref();
|
|
||||||
function handleSearch() {
|
|
||||||
bbb.value.openModal();
|
|
||||||
}
|
|
||||||
|
|
||||||
function handlePrint() {
|
|
||||||
bbb.value.handlePrint();
|
|
||||||
}
|
|
||||||
function handleEditInfo() {
|
|
||||||
if (selectedRowKeys.value.length == 0 || selectedRowKeys.value.length > 1) {
|
|
||||||
message.warning('请选择一条数据');
|
|
||||||
}
|
|
||||||
if (selectedRowKeys.value.length == 1) {
|
|
||||||
openUserModal(true, {
|
|
||||||
record: selectedRows.value[0],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function handleAva(images) {
|
|
||||||
nextTick(() => {
|
|
||||||
imgList.value = images?.split(',');
|
|
||||||
visible.value = true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function exportExcel() {
|
|
||||||
let form = getForm().getFieldsValue();
|
|
||||||
let optionConfig = {
|
|
||||||
exportConfig: {
|
|
||||||
name: '长庆油田员工名册',
|
|
||||||
url: userInfoExportApi,
|
|
||||||
params: { ...form, isXlsx: true },
|
|
||||||
},
|
|
||||||
};
|
|
||||||
onExportXls(optionConfig);
|
|
||||||
}
|
|
||||||
const titleData = ref({});
|
|
||||||
const ifShowTotal = ref(false);
|
|
||||||
const buttonLoading = ref(false);
|
|
||||||
const sexTool = ref();
|
|
||||||
const jobTool = ref();
|
|
||||||
async function handleTotal() {
|
|
||||||
if (ifShowTotal.value) return (ifShowTotal.value = false);
|
|
||||||
try {
|
|
||||||
buttonLoading.value = true;
|
|
||||||
titleData.value = await userInfoStatApi({ ...getForm().getFieldsValue() });
|
|
||||||
titleData.value['postNew_dictText'] = titleData.value?.postNew;
|
|
||||||
titleData.value['empEducation_dictText'] = titleData.value?.empEducation;
|
|
||||||
titleData.value['userGroup_dictText'] = titleData.value?.userGroup;
|
|
||||||
titleData.value['sex_dictText'] = titleData.value?.sex;
|
|
||||||
sexTool.value = `男${titleData.value?.sex?.split('/')[0]}/女${titleData.value?.sex?.split('/')[1]}`;
|
|
||||||
jobTool.value = titleData.value?.jobLevel;
|
|
||||||
titleData.value['empMarriage_dictText'] = titleData.value?.empMarriage;
|
|
||||||
ifShowTotal.value = !ifShowTotal.value;
|
|
||||||
} finally {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function handleSuccess() {
|
|
||||||
reload();
|
|
||||||
selectedRowKeys.value = [];
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
-145
@@ -1,145 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div ref="wrapRef" class="all-box">
|
|
||||||
<BasicDrawer @register="registerDrawer" :getContainer="() => wrapRef" :width="1000">
|
|
||||||
<template #title>
|
|
||||||
<div class="basic-title">基本信息</div>
|
|
||||||
</template>
|
|
||||||
<div class="basic-info" v-if="basicInfo">
|
|
||||||
<div v-if="basicInfo">
|
|
||||||
<p>基本信息</p>
|
|
||||||
<div class="one-info" v-for="(item, index) in BasicInfo" :key="index">
|
|
||||||
<span class="first">{{ item.label }}:</span>
|
|
||||||
<span>{{ basicInfo[item.field] }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="basicInfo.userGroup !== 'e' && hospitalInfo">
|
|
||||||
<p>住院信息</p>
|
|
||||||
<div class="one-info" v-for="(item, index) in inHospitalInfo" :key="index">
|
|
||||||
<span class="first">{{ item.label }}:</span>
|
|
||||||
<span>{{ hospitalInfo[item.field] }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-if="basicInfo.userGroup !== 'e' && userInfoData">
|
|
||||||
<p>分类信息</p>
|
|
||||||
<div class="one-info class-info">
|
|
||||||
<span class="first">{{ basicInfo.userGroup }}类({{ basicInfo.userGroup_dictText }}信息):</span>
|
|
||||||
<div style="flex: 1">
|
|
||||||
<div class="class-th">
|
|
||||||
<span class="class-th-span" v-for="(item, index) in classInfoColumn" :key="index">
|
|
||||||
{{ item.title }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="class-td" v-for="(item, index) in userInfoData.records" :key="index">
|
|
||||||
<span class="class-td-span" v-for="(item1, index1) in classInfoColumn" :key="index1">
|
|
||||||
{{ item[item1.field] }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</BasicDrawer>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicDrawer from '/@/components/Drawer/src/BasicDrawer.vue';
|
|
||||||
import { useDrawerInner } from '/@/components/Drawer';
|
|
||||||
import {
|
|
||||||
BasicInfo,
|
|
||||||
inHospitalInfo,
|
|
||||||
classInfoColumnD,
|
|
||||||
classInfoColumnA,
|
|
||||||
classInfoColumnB,
|
|
||||||
classInfoColumnC,
|
|
||||||
} from '/@/views/archivesManage/institution/belonging/fivePeople/fivePeople.data';
|
|
||||||
import {
|
|
||||||
detailAApi,
|
|
||||||
detailBApi,
|
|
||||||
detailCApi,
|
|
||||||
detailDApi,
|
|
||||||
groupUserExtByUserIdApi,
|
|
||||||
} from '/@/views/archivesManage/institution/belonging/fivePeople/fivePeople.api';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
const wrapRef = ref(null);
|
|
||||||
const basicInfo = ref();
|
|
||||||
const userInfoData = ref();
|
|
||||||
const classInfoColumn = ref();
|
|
||||||
const hospitalInfo = ref();
|
|
||||||
const [registerDrawer, { closeDrawer, setDrawerProps }] = useDrawerInner(async (data) => {
|
|
||||||
setDrawerProps({ confirmLoading: false });
|
|
||||||
basicInfo.value = data.record;
|
|
||||||
console.log(basicInfo.value.userGroup);
|
|
||||||
hospitalInfo.value = await groupUserExtByUserIdApi({ userId: data.record.id });
|
|
||||||
if (basicInfo.value.userGroup == 'a') {
|
|
||||||
userInfoData.value = await detailAApi({ pageNo: 1, pageSize: 9999, userId: data.record.id });
|
|
||||||
classInfoColumn.value = classInfoColumnA;
|
|
||||||
} else if (basicInfo.value.userGroup == 'b') {
|
|
||||||
userInfoData.value = await detailBApi({ pageNo: 1, pageSize: 9999, userId: data.record.id });
|
|
||||||
classInfoColumn.value = classInfoColumnB;
|
|
||||||
} else if (basicInfo.value.userGroup == 'c') {
|
|
||||||
userInfoData.value = await detailCApi({ pageNo: 1, pageSize: 9999, userId: data.record.id });
|
|
||||||
classInfoColumn.value = classInfoColumnC;
|
|
||||||
} else if (basicInfo.value.userGroup == 'd') {
|
|
||||||
userInfoData.value = await detailDApi({ pageNo: 1, pageSize: 9999, userId: data.record.id });
|
|
||||||
classInfoColumn.value = classInfoColumnD;
|
|
||||||
}
|
|
||||||
console.log(hospitalInfo.value);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.all-box {
|
|
||||||
:deep(.ant-drawer-header) {
|
|
||||||
background: #b4c7e7 !important;
|
|
||||||
}
|
|
||||||
.basic-title {
|
|
||||||
font-weight: bold !important;
|
|
||||||
}
|
|
||||||
.basic-info {
|
|
||||||
p {
|
|
||||||
font-weight: 700;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
.one-info {
|
|
||||||
margin: 10px 0;
|
|
||||||
.first {
|
|
||||||
width: 12%;
|
|
||||||
font-weight: 550;
|
|
||||||
display: inline-block;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.class-info {
|
|
||||||
display: flex;
|
|
||||||
.class-th {
|
|
||||||
display: flex;
|
|
||||||
width: 80%;
|
|
||||||
.class-th-span {
|
|
||||||
flex: 1;
|
|
||||||
border: 1px solid #bbb;
|
|
||||||
text-align: center;
|
|
||||||
border-right: none;
|
|
||||||
line-height: 50px;
|
|
||||||
}
|
|
||||||
.class-th-span:last-child {
|
|
||||||
border-right: 1px solid #bbb;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.class-td {
|
|
||||||
display: flex;
|
|
||||||
width: 80%;
|
|
||||||
.class-td-span {
|
|
||||||
flex: 1;
|
|
||||||
border: 1px solid #bbb;
|
|
||||||
text-align: center;
|
|
||||||
border-right: none;
|
|
||||||
line-height: 50px;
|
|
||||||
border-top: none;
|
|
||||||
}
|
|
||||||
.class-td-span:last-child {
|
|
||||||
border-right: 1px solid #bbb;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
userInfo = '/health-system/user/info/page',
|
|
||||||
userStat = '/health-system/archives/user/stat/group',
|
|
||||||
detailA = '/health-archives/archives/groupUserA/list',
|
|
||||||
detailB = '/health-archives/archives/groupUserB/list',
|
|
||||||
detailC = '/health-archives/archives/groupUserC/list',
|
|
||||||
detailD = '/health-archives/archives/groupUserD/list',
|
|
||||||
groupUserExtByUserId = '/archives/groupUserExt/groupUserExtByUserId',
|
|
||||||
}
|
|
||||||
|
|
||||||
export const userInfoApi = (params) => defHttp.get({ url: Api.userInfo, params });
|
|
||||||
export const userStatApi = (params) => defHttp.get({ url: Api.userStat, params });
|
|
||||||
|
|
||||||
export const detailAApi = (params) => defHttp.get({ url: Api.detailA, params }, { joinParamsToUrl: true });
|
|
||||||
export const detailBApi = (params) => defHttp.get({ url: Api.detailB, params }, { joinParamsToUrl: true });
|
|
||||||
export const detailCApi = (params) => defHttp.get({ url: Api.detailC, params }, { joinParamsToUrl: true });
|
|
||||||
export const detailDApi = (params) => defHttp.get({ url: Api.detailD, params }, { joinParamsToUrl: true });
|
|
||||||
export const groupUserExtByUserIdApi = (params) => defHttp.get({ url: Api.groupUserExtByUserId, params }, { joinParamsToUrl: true });
|
|
||||||
@@ -1,330 +0,0 @@
|
|||||||
import { BasicColumn, formSchema } from '/@/components/Table';
|
|
||||||
import { queryDepartTreeSync } from '/@/views/system/depart/depart.api';
|
|
||||||
|
|
||||||
export const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '单位',
|
|
||||||
dataIndex: 'secondDepart',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '部门',
|
|
||||||
dataIndex: 'thirdDepart',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
dataIndex: 'realname',
|
|
||||||
width: 80,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '员工编号',
|
|
||||||
dataIndex: 'workNo',
|
|
||||||
width: 80,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '性别',
|
|
||||||
dataIndex: 'sex_dictText',
|
|
||||||
width: 80,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '年龄',
|
|
||||||
dataIndex: 'age',
|
|
||||||
width: 80,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '健康分类',
|
|
||||||
dataIndex: 'userGroup_dictText',
|
|
||||||
width: 80,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '职位',
|
|
||||||
dataIndex: 'postNew_dictText',
|
|
||||||
width: 80,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '岗位层级',
|
|
||||||
dataIndex: 'jobLevel_dictText',
|
|
||||||
width: 120,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '政治面貌',
|
|
||||||
dataIndex: 'empPolitical_dictText',
|
|
||||||
width: 100,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '民族',
|
|
||||||
dataIndex: 'empNation_dictText',
|
|
||||||
width: 80,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '婚姻状况',
|
|
||||||
dataIndex: 'empMarriage_dictText',
|
|
||||||
width: 80,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '身份证号',
|
|
||||||
dataIndex: 'idCard',
|
|
||||||
width: 180,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '更新时间',
|
|
||||||
dataIndex: 'userGroupUpdateTime',
|
|
||||||
width: 150,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '详情',
|
|
||||||
dataIndex: 'detail',
|
|
||||||
width: 80,
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const searchFormSchema: formSchema[] = [
|
|
||||||
{
|
|
||||||
label: '单位部门',
|
|
||||||
field: 'orgCode',
|
|
||||||
component: 'JlazyTreeSelect',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
multiple: false,
|
|
||||||
api: queryDepartTreeSync,
|
|
||||||
loadApi: queryDepartTreeSync,
|
|
||||||
afterApi: (data) => {
|
|
||||||
data.forEach((item: any) => {
|
|
||||||
item['preTitle'] = item.title;
|
|
||||||
item['key'] = item['orgCode'];
|
|
||||||
});
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
preItem: (title, item) => {
|
|
||||||
item['preTitle'] = title + '/' + item.title;
|
|
||||||
item['key'] = item['orgCode'];
|
|
||||||
return item;
|
|
||||||
},
|
|
||||||
fieldNamesInfo: {
|
|
||||||
value: 'orgCode',
|
|
||||||
label: 'preTitle',
|
|
||||||
key: 'orgCode',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
show: ({ values }) => {
|
|
||||||
return values.showType !== '1';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
field: 'realname',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '员工编号',
|
|
||||||
field: 'workNo',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '性别',
|
|
||||||
field: 'sex',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
dictCode: 'sex2',
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '年龄',
|
|
||||||
field: 'nianling',
|
|
||||||
component: 'JCascadeInput',
|
|
||||||
componentProps: ({ formModel }) => {
|
|
||||||
return {
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
onChange: (val) => {
|
|
||||||
const data = JSON.parse(val);
|
|
||||||
formModel.ageFindType = data.selectValue;
|
|
||||||
formModel.ageStat = data.inputValue1;
|
|
||||||
if (data.selectValue == '2') {
|
|
||||||
formModel.ageEnd = data.inputValue2;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
optionsType: '2',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'ageFindType',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'ageStat',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'ageEnd',
|
|
||||||
component: 'Input',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '身份证号',
|
|
||||||
field: 'idCard',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '健康现状',
|
|
||||||
field: 'userGroup',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({
|
|
||||||
dictCode: 'user_group_desc',
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const BasicInfo = [
|
|
||||||
{
|
|
||||||
label: '单位',
|
|
||||||
field: 'secondDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '部门',
|
|
||||||
field: 'thirdDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '姓名',
|
|
||||||
field: 'realname',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '身份证号',
|
|
||||||
field: 'idCard',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '健康分类',
|
|
||||||
field: 'userGroup_dictText',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const inHospitalInfo = [
|
|
||||||
{
|
|
||||||
label: '住院状态',
|
|
||||||
field: 'status_dictText',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '所在医院',
|
|
||||||
field: 'hospital',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '住院时间',
|
|
||||||
field: 'hospitalTime',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '住院次数',
|
|
||||||
field: 'hospitalNum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '联系人',
|
|
||||||
field: 'contact',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '联系电话',
|
|
||||||
field: 'contactMobile',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const classInfoColumnA = [
|
|
||||||
{
|
|
||||||
title: '大病名称',
|
|
||||||
field: 'name_dictText',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '确诊年份',
|
|
||||||
field: 'time',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '确诊医院',
|
|
||||||
field: 'hospital',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '大病状态',
|
|
||||||
field: 'status_dictText',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '治疗情况',
|
|
||||||
field: 'cure',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
export const classInfoColumnB = [
|
|
||||||
{
|
|
||||||
title: '慢病名称',
|
|
||||||
field: 'name_dictText',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '确诊年份',
|
|
||||||
field: 'time',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '确诊医院',
|
|
||||||
field: 'hospital',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '治疗情况',
|
|
||||||
field: 'cure',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
export const classInfoColumnC = [
|
|
||||||
{
|
|
||||||
title: '指标名称',
|
|
||||||
field: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '指标值',
|
|
||||||
field: 'value',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '参考范围',
|
|
||||||
field: 'scope',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '确诊年份',
|
|
||||||
field: 'time',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '确诊医院',
|
|
||||||
field: 'hospital',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
export const classInfoColumnD = [
|
|
||||||
{
|
|
||||||
title: '疾病名称',
|
|
||||||
field: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '风险等级',
|
|
||||||
field: 'levelDesc',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '评估年份',
|
|
||||||
field: 'time',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicTables @register="registerTable">
|
|
||||||
<template #btnTop>
|
|
||||||
<div class="btn-top">
|
|
||||||
{{ statInfo?.year }}年,{{ statInfo?.names.join(',') }}总计{{ statInfo?.total }}人,
|
|
||||||
<span v-for="(item, index) in statInfo?.types" :key="index">
|
|
||||||
{{ item.name }}({{ item.type }})人群{{ item.num }}人,占比{{ Math.round(item.ratio * 10000) / 100 }}%。
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<div v-if="column.dataIndex == 'detail'">
|
|
||||||
<a-button type="link" @click="handleDetail(record)">查看</a-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</BasicTables>
|
|
||||||
<DetailDrawer @register="registerDrawer"></DetailDrawer>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicTables from '/@/components/Table/src/BasicTables.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { userInfoApi, userStatApi } from '/@/views/archivesManage/institution/belonging/fivePeople/fivePeople.api';
|
|
||||||
import { columns, searchFormSchema } from '/@/views/archivesManage/institution/belonging/fivePeople/fivePeople.data';
|
|
||||||
import DetailDrawer from '/@/views/archivesManage/institution/belonging/fivePeople/components/detailDrawer.vue';
|
|
||||||
import { useDrawer } from '/@/components/Drawer';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
pageTitle: '五类人群名册',
|
|
||||||
btnArr: ['add', 'edit', 'delete', 'export', 'total', 'print'],
|
|
||||||
api: userInfoApi,
|
|
||||||
columns: columns,
|
|
||||||
canResize: false,
|
|
||||||
formConfig: {
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
},
|
|
||||||
showIndexColumn: true,
|
|
||||||
indexColumnProps: {
|
|
||||||
dataIndex: 'listIndex',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 120,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerTable, {}, {}] = tableContext;
|
|
||||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
|
||||||
const statInfo = ref();
|
|
||||||
onMounted(async () => {
|
|
||||||
statInfo.value = await userStatApi({});
|
|
||||||
console.log(statInfo.value);
|
|
||||||
});
|
|
||||||
function handleDetail(record) {
|
|
||||||
console.log(record);
|
|
||||||
openDrawer(true, {
|
|
||||||
record,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.btn-top {
|
|
||||||
background-color: #fff;
|
|
||||||
padding: 10px;
|
|
||||||
border: 1px solid #bbbbbb;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-68
@@ -1,68 +0,0 @@
|
|||||||
<template>
|
|
||||||
<template v-if="props.parentCode && props.parentCode?.childNum > 0 && props.listType === '0'">
|
|
||||||
<BasicTable @register="registerTable" tableType="1" @expand="expandedRowKeys">
|
|
||||||
<template #expandedRowRender>
|
|
||||||
<table-list :parent-code="parentInfo" />
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
</template>
|
|
||||||
<template v-if="props.listType === '1'">
|
|
||||||
<BasicTable @register="registerTable" tableType="1"> </BasicTable>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { listApi } from '/@/views/archivesManage/institution/institutionInfomation/depart/depart.api';
|
|
||||||
import { getColumn } from '/@/views/archivesManage/institution/institutionInfomation/depart/depart.data';
|
|
||||||
import { searchFormSchema } from '/@/views/intervene24/meals/weight/signUpManage/signUp.data';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
const props = defineProps({
|
|
||||||
parentCode: {
|
|
||||||
type: String,
|
|
||||||
default: () => null,
|
|
||||||
},
|
|
||||||
listType: {
|
|
||||||
type: String,
|
|
||||||
default: () => '0',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const parentInfo = ref(null);
|
|
||||||
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: listApi,
|
|
||||||
columns: getColumn(props.listType),
|
|
||||||
canResize: false,
|
|
||||||
searchInfo: { parentCode: props.parentCode.orgCode },
|
|
||||||
useSearchForm: false,
|
|
||||||
formConfig: {
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
},
|
|
||||||
showIndexColumn: true,
|
|
||||||
indexColumnProps: {
|
|
||||||
dataIndex: 'listIndex',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 120,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerTable, {}, {}] = tableContext;
|
|
||||||
|
|
||||||
function expandedRowKeys(expanded, record) {
|
|
||||||
parentInfo.value = record;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
:deep(.ant-pagination) {
|
|
||||||
margin-top: 30px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
list = '/health-system/archives/depart/page',
|
|
||||||
map = '/health-system/archives/depart/map',
|
|
||||||
}
|
|
||||||
|
|
||||||
export const listApi = (params: any) => defHttp.get({ url: Api.list, params });
|
|
||||||
export const mapApi = (params: any) => defHttp.get({ url: Api.map, params });
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
||||||
|
|
||||||
export const getColumn = (type = '0') => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
title: '单位名称',
|
|
||||||
dataIndex: 'name',
|
|
||||||
width: 200,
|
|
||||||
fixed: 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '详细地址',
|
|
||||||
dataIndex: 'address',
|
|
||||||
align: 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '电话',
|
|
||||||
dataIndex: '',
|
|
||||||
width: 150,
|
|
||||||
ifShow: type === '0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '下级机构数量',
|
|
||||||
dataIndex: 'childNum',
|
|
||||||
width: 120,
|
|
||||||
ifShow: type === '0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '员工数量',
|
|
||||||
dataIndex: 'userNum',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
] as BasicColumn[];
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getSearchFormSchema = (type = '0') => {
|
|
||||||
console.log(type);
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: '单位',
|
|
||||||
field: 'parentCode',
|
|
||||||
component: 'Input',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
slot: 'parentCodeSlot',
|
|
||||||
},
|
|
||||||
] as FormSchema[];
|
|
||||||
};
|
|
||||||
@@ -1,177 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicTables
|
|
||||||
@register="registerTable"
|
|
||||||
page-title="长庆油田单位"
|
|
||||||
:show-table="radioValue === '0'"
|
|
||||||
@expand="expandedRowKeys"
|
|
||||||
@handle-ok="changeSearchForm"
|
|
||||||
@handle-cancel="changeSearchForm"
|
|
||||||
>
|
|
||||||
<template #rightCol>
|
|
||||||
<a-radio-group class="radio-d" v-model:value="radioValue" button-style="solid" @change="changeRadioValue">
|
|
||||||
<a-radio-button value="0">表格</a-radio-button>
|
|
||||||
<a-radio-button value="1">地图</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
</template>
|
|
||||||
<template #form-parentCodeSlot="{ model, filed }">
|
|
||||||
<a-select
|
|
||||||
v-model:value="model[filed]"
|
|
||||||
:showSearch="true"
|
|
||||||
label-in-value
|
|
||||||
:filter-option="(input: string, option: any): boolean => {
|
|
||||||
const str: string = input.toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
}"
|
|
||||||
placeholder="请选择单位"
|
|
||||||
@select="selectInfoValue"
|
|
||||||
>
|
|
||||||
<a-select-option v-for="(item, index) in mapList" :label="item.name" :value="JSON.stringify(item)" :key="item.name + '-lo-' + index">
|
|
||||||
{{ item.name }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</template>
|
|
||||||
<template #expandedRowRender>
|
|
||||||
<table-list :parent-code="parentCode" list-type="0" />
|
|
||||||
</template>
|
|
||||||
<template #tableInnerSlot>
|
|
||||||
<list-map ref="listMap" :map-list="mapList" :drawer-width="800">
|
|
||||||
<template #mapDrawer="{ data }">
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">单位名称:</div>
|
|
||||||
<div class="drawer-value">{{ data?.name }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label" style="width: 85px">详细地址:</div>
|
|
||||||
<div class="drawer-value" style="width: calc(100% - 85px)">{{ data?.address }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">员工人数:</div>
|
|
||||||
<div class="drawer-value">{{ data?.userNum }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">部门信息:</div>
|
|
||||||
<div class="drawer-value">{{ data?.childNum }}</div>
|
|
||||||
</div>
|
|
||||||
<table-list :parent-code="data" list-type="1" :key="data" />
|
|
||||||
</template>
|
|
||||||
</list-map>
|
|
||||||
</template>
|
|
||||||
</BasicTables>
|
|
||||||
<LineTableModal @register="registerModal" />
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicTables from '/@/components/Table/src/BasicTables.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import LineTableModal from '/@/views/archivesManage/components/lineTableModal.vue';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { nextTick, ref } from 'vue';
|
|
||||||
import ListMap from '/@/views/archivesManage/components/listMap.vue';
|
|
||||||
import { listApi, mapApi } from '/@/views/archivesManage/institution/institutionInfomation/depart/depart.api';
|
|
||||||
import { getColumn, getSearchFormSchema } from '/@/views/archivesManage/institution/institutionInfomation/depart/depart.data';
|
|
||||||
import TableList from '/@/views/archivesManage/institution/institutionInfomation/depart/components/tableList.vue';
|
|
||||||
|
|
||||||
const radioValue = ref('0');
|
|
||||||
const parentCode = ref('');
|
|
||||||
const mapList = ref<any[]>([]);
|
|
||||||
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
pageTitle: '长庆油田单位',
|
|
||||||
btnArr: ['add', 'edit', 'delete', 'export', 'total', 'search'],
|
|
||||||
api: listApi,
|
|
||||||
columns: getColumn('0'),
|
|
||||||
canResize: false,
|
|
||||||
isNeedSearch: false,
|
|
||||||
formConfig: {
|
|
||||||
schemas: getSearchFormSchema(),
|
|
||||||
submitOnReset: false,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
},
|
|
||||||
showIndexColumn: true,
|
|
||||||
indexColumnProps: {
|
|
||||||
dataIndex: 'listIndex',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 120,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
|
||||||
|
|
||||||
function expandedRowKeys(expanded, record) {
|
|
||||||
parentCode.value = record;
|
|
||||||
}
|
|
||||||
const selectValue = ref('');
|
|
||||||
const listMap = ref('');
|
|
||||||
async function changeRadioValue(v) {
|
|
||||||
radioValue.value = v.target.value;
|
|
||||||
if (v.target.value === '1') {
|
|
||||||
if (mapList.value.length === 0) {
|
|
||||||
mapList.value = await mapApi({});
|
|
||||||
}
|
|
||||||
const filteredData = mapList.value.filter((item) => item.longitude !== null && item.latitude !== null);
|
|
||||||
|
|
||||||
await nextTick(() => {
|
|
||||||
listMap.value.initMap(filteredData);
|
|
||||||
});
|
|
||||||
setProps({
|
|
||||||
btnArr: ['add', 'edit', 'delete', 'export', 'total', 'print'],
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setProps({
|
|
||||||
btnArr: ['add', 'edit', 'delete', 'export', 'total', 'print', 'search'],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectInfoValue(v) {
|
|
||||||
selectValue.value = v.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function changeSearchForm() {
|
|
||||||
listMap.value.selectInfo(selectValue.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
const [registerTable, { setProps }, {}] = tableContext;
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
:deep(.ant-radio-button-wrapper) {
|
|
||||||
padding: 0 30px;
|
|
||||||
}
|
|
||||||
:deep(.ant-drawer-header) {
|
|
||||||
background-color: #b4c7e7 !important;
|
|
||||||
}
|
|
||||||
:deep(.jeecg-basic-title) {
|
|
||||||
font-weight: bold !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer-d {
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0 0 10px 6px;
|
|
||||||
font-size: 16px;
|
|
||||||
display: flex;
|
|
||||||
.drawer-label {
|
|
||||||
//width: 90px;
|
|
||||||
}
|
|
||||||
.drawer-value {
|
|
||||||
//width: calc(100% - 90px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-table-expanded-row-fixed) {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media print {
|
|
||||||
.radio-d,
|
|
||||||
:deep(.ant-table-measure-row) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-12
@@ -1,12 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
page = '/health-emergency/archives/page',
|
|
||||||
yearsStatistic = '/health-emergency/archives/years-statistic',
|
|
||||||
geo = '/health-emergency/archives/geo',
|
|
||||||
}
|
|
||||||
|
|
||||||
export const pageApi = (params) => defHttp.get({ url: Api.page, params });
|
|
||||||
export const geoApi = (params) => defHttp.get({ url: Api.geo, params });
|
|
||||||
|
|
||||||
export const yearsStatisticApi = (params) => defHttp.get({ url: Api.yearsStatistic, params });
|
|
||||||
-114
@@ -1,114 +0,0 @@
|
|||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import moment from 'moment/moment';
|
|
||||||
|
|
||||||
export const getColumns = (date: any) => {
|
|
||||||
const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '医院名称',
|
|
||||||
dataIndex: 'name',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '医院等级',
|
|
||||||
dataIndex: 'level_dictText',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '详细地址',
|
|
||||||
dataIndex: 'address',
|
|
||||||
align: 'left',
|
|
||||||
width: 200,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '在院派驻人员数量',
|
|
||||||
dataIndex: 'address',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
customRender: () => {
|
|
||||||
return '-';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: `今年服务人次(${dayjs(date).format('YYYY')})`,
|
|
||||||
dataIndex: 'thisYearSum',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '累计服务人次',
|
|
||||||
dataIndex: 'allSum',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '历年服务人次变化',
|
|
||||||
dataIndex: 'notThisYear',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
return columns;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '医院名称',
|
|
||||||
field: 'resourceName',
|
|
||||||
component: 'Input',
|
|
||||||
show: ({ values }) => {
|
|
||||||
return values.showType !== '1';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '医院等级',
|
|
||||||
field: 'level',
|
|
||||||
component: 'JDictSelectTag',
|
|
||||||
componentProps: () => ({ dictCode: 'hospital_level' }),
|
|
||||||
show: ({ values }) => {
|
|
||||||
return values.showType !== '1';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// label: '专家人数',
|
|
||||||
// field: '',
|
|
||||||
// component: 'Input',
|
|
||||||
// show: ({ values }) => {
|
|
||||||
// return values.showType !== '1';
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
label: '查询年份',
|
|
||||||
field: 'year',
|
|
||||||
component: 'DatePicker',
|
|
||||||
show: ({ values }) => {
|
|
||||||
return values.showType !== '1';
|
|
||||||
},
|
|
||||||
componentProps: {
|
|
||||||
showTime: false,
|
|
||||||
valueFormat: 'YYYY',
|
|
||||||
picker: 'year',
|
|
||||||
allowClear: false,
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
},
|
|
||||||
defaultValue: moment(new Date()).format('YYYY'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'showType',
|
|
||||||
component: 'Input',
|
|
||||||
defaultValue: '0',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '医院名称',
|
|
||||||
field: 'resourceName',
|
|
||||||
component: 'Input',
|
|
||||||
slot: 'resourceName',
|
|
||||||
show: ({ values }) => {
|
|
||||||
return values.showType === '1';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
-246
@@ -1,246 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicTables
|
|
||||||
@register="registerTable"
|
|
||||||
page-title="长庆油田专家医院"
|
|
||||||
@handle-ok="handleModal"
|
|
||||||
@handle-cancel="handleCancel"
|
|
||||||
:show-table="radioValue === '0'"
|
|
||||||
>
|
|
||||||
<template #rightCol>
|
|
||||||
<a-radio-group v-model:value="radioValue" button-style="solid" @change="changeRadioValue">
|
|
||||||
<a-radio-button value="0">表格</a-radio-button>
|
|
||||||
<a-radio-button value="1">地图</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
</template>
|
|
||||||
<template #btnTop>
|
|
||||||
<a-tabs v-model:activeKey="activeKey" @change="changeTabs">
|
|
||||||
<a-tab-pane key="1" tab="油田医院" />
|
|
||||||
<a-tab-pane key="2" tab="合作医院" />
|
|
||||||
</a-tabs>
|
|
||||||
</template>
|
|
||||||
<template #form-resourceName="{ model, filed }">
|
|
||||||
<a-select
|
|
||||||
v-model:value="model[filed]"
|
|
||||||
:showSearch="true"
|
|
||||||
label-in-value
|
|
||||||
:filter-option="(input: string, option: any): boolean => {
|
|
||||||
const str: string = input.toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
}"
|
|
||||||
placeholder="请选择单位"
|
|
||||||
@select="selectInfoValue"
|
|
||||||
>
|
|
||||||
<a-select-option v-for="(item, index) in mapList" :label="item.name" :value="JSON.stringify(item)" :key="item.name + '-lo-' + index">
|
|
||||||
{{ item.name }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</template>
|
|
||||||
<template #tableInnerSlot>
|
|
||||||
<list-map ref="listMap" :map-list="mapList" :drawer-width="500" map-type="1" class="list-outer-map">
|
|
||||||
<template #mapDrawer="{ data }">
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">医院名称:</div>
|
|
||||||
<div class="drawer-value">{{ data?.name }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">医院等级:</div>
|
|
||||||
<div class="drawer-value">{{ data?.level_dictText }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label" style="width: 85px">详细地址:</div>
|
|
||||||
<div class="drawer-value" style="width: calc(100% - 85px)">{{ data?.address }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">在院派驻人员数量:</div>
|
|
||||||
<div class="drawer-value"> - </div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">{{ `今年服务人次(${data?.year}):` }}</div>
|
|
||||||
<div class="drawer-value">{{ data?.thisYearSum }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">累计服务人次:</div>
|
|
||||||
<div class="drawer-value">{{ data?.allSum }}</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bottom-button">
|
|
||||||
<a-button type="primary" @click="handleYear(data)">历年诊疗人数变化</a-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</list-map>
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.dataIndex === 'notThisYear'">
|
|
||||||
<a-button type="link" @click="handleYear(record)">历年变化</a-button>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTables>
|
|
||||||
<LineTableModal @register="registerModal"></LineTableModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicTables from '/@/components/Table/src/BasicTables.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { getColumns, searchFormSchema } from '/@/views/archivesManage/institution/institutionInfomation/emergencyHospital/emergencyHospital.data';
|
|
||||||
import { nextTick, ref } from 'vue';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import {
|
|
||||||
geoApi,
|
|
||||||
pageApi,
|
|
||||||
yearsStatisticApi,
|
|
||||||
} from '/@/views/archivesManage/institution/institutionInfomation/emergencyHospital/emergencyHospital.api';
|
|
||||||
import ListMap from '/@/views/archivesManage/components/listMap.vue';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import LineTableModal from '/@/views/archivesManage/components/lineTableModal.vue';
|
|
||||||
const yearData = ref(dayjs(new Date()));
|
|
||||||
const radioValue = ref('0');
|
|
||||||
const activeKey = ref('1');
|
|
||||||
const mapList = ref<any[]>([]);
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
pageTitle: '长庆油田应急医院',
|
|
||||||
api: pageApi,
|
|
||||||
btnArr: ['add', 'edit', 'delete', 'export', 'total', 'print'],
|
|
||||||
canResize: false,
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params['type'] = activeKey.value;
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
showIndexColumn: true,
|
|
||||||
columns: getColumns(yearData.value),
|
|
||||||
formConfig: {
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, getForm, setProps }, {}] = tableContext;
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
|
||||||
const selectValue = ref('');
|
|
||||||
const listMap = ref('');
|
|
||||||
function handleModal(value) {
|
|
||||||
if (radioValue.value === '1') {
|
|
||||||
listMap.value.selectInfo(selectValue.value);
|
|
||||||
}
|
|
||||||
if (value.year) {
|
|
||||||
yearData.value = value.year;
|
|
||||||
setProps({ columns: getColumns(yearData.value) });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleCancel(v) {
|
|
||||||
listMap.value.selectInfo(selectValue.value);
|
|
||||||
}
|
|
||||||
async function handleYear(record) {
|
|
||||||
const ddd = await yearsStatisticApi({ id: record.id });
|
|
||||||
const chartsName = ddd.map((item) => {
|
|
||||||
return item.year;
|
|
||||||
});
|
|
||||||
const chartsValue = ddd.map((item) => {
|
|
||||||
return item.sums;
|
|
||||||
});
|
|
||||||
openModal(true, {
|
|
||||||
title: '历年服务人次变化',
|
|
||||||
record,
|
|
||||||
chartsName,
|
|
||||||
chartsValue,
|
|
||||||
dataSource: ddd,
|
|
||||||
sumsName: '服务人次',
|
|
||||||
titleInfo: [
|
|
||||||
{
|
|
||||||
name: '医院名称',
|
|
||||||
value: record.name,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '医院等级',
|
|
||||||
value: record.level_dictText,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '再院派驻人员数量',
|
|
||||||
value: '-',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '今年服务人次',
|
|
||||||
year: record.year,
|
|
||||||
value: record.thisYearSum,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '累计服务人次',
|
|
||||||
value: record.allSum,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function changeTabs() {
|
|
||||||
mapList.value = [];
|
|
||||||
await changeRadioValue({ target: { value: radioValue.value } });
|
|
||||||
await getForm().resetFields();
|
|
||||||
await reload({ page: 1 });
|
|
||||||
}
|
|
||||||
|
|
||||||
async function changeRadioValue(v) {
|
|
||||||
if (v.target.value === '1') {
|
|
||||||
if (mapList.value.length === 0) {
|
|
||||||
mapList.value = await geoApi({ type: activeKey.value });
|
|
||||||
}
|
|
||||||
|
|
||||||
await nextTick(() => {
|
|
||||||
listMap.value.initMap(mapList.value);
|
|
||||||
});
|
|
||||||
setProps({
|
|
||||||
isNeedSearch: false,
|
|
||||||
});
|
|
||||||
await getForm().updateSchema({
|
|
||||||
field: 'showType',
|
|
||||||
defaultValue: '1',
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setProps({
|
|
||||||
isNeedSearch: true,
|
|
||||||
});
|
|
||||||
await getForm().updateSchema({
|
|
||||||
field: 'showType',
|
|
||||||
defaultValue: '0',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectInfoValue(v) {
|
|
||||||
selectValue.value = v.value;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.drawer-d {
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0 0 10px 6px;
|
|
||||||
font-size: 16px;
|
|
||||||
display: flex;
|
|
||||||
.drawer-label {
|
|
||||||
//width: 180px;
|
|
||||||
text-align: right;
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
.drawer-value {
|
|
||||||
//width: calc(100% - 140px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom-button {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
bottom: 30px;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
button {
|
|
||||||
font-weight: bold !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-tabs-tab + .ant-tabs-tab) {
|
|
||||||
margin-left: 80px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-110
@@ -1,110 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="all-box" ref="wrapRef">
|
|
||||||
<BasicModal v-bind="$attrs" :getContainer="() => wrapRef" @register="registerModal" :footer="false" width="60%">
|
|
||||||
<template #title>
|
|
||||||
<div class="basic-title">专家列表</div>
|
|
||||||
</template>
|
|
||||||
<BasicTable @register="registerTable">
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.dataIndex == 'noThisYear'">
|
|
||||||
<a-button type="link" @click="handleYear(record)">历年变化</a-button>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<LineTableModal @register="registerLineTable"></LineTableModal>
|
|
||||||
</BasicModal>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
|
|
||||||
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import {
|
|
||||||
specialistPageApi,
|
|
||||||
specialistYearStatApi,
|
|
||||||
} from '/@/views/archivesManage/institution/institutionInfomation/expertHospital/expertHospital.api';
|
|
||||||
import { specialColumns } from '/@/views/archivesManage/institution/institutionInfomation/expertHospital/expertHospital.data';
|
|
||||||
import LineTableModal from '/@/views/archivesManage/components/lineTableModal.vue';
|
|
||||||
|
|
||||||
import { ref } from 'vue';
|
|
||||||
const wrapRef = ref(null);
|
|
||||||
const hospitalId = ref();
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
|
||||||
setModalProps({ confirmLoading: false });
|
|
||||||
hospitalId.value = data.record.id;
|
|
||||||
await reload();
|
|
||||||
});
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
columns: specialColumns(new Date()),
|
|
||||||
api: specialistPageApi,
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params.hospitalId = hospitalId.value;
|
|
||||||
return params;
|
|
||||||
},
|
|
||||||
canResize: false,
|
|
||||||
useSearchForm: false,
|
|
||||||
showIndexColumn: true,
|
|
||||||
showActionColumn: false,
|
|
||||||
tableSetting: {
|
|
||||||
size: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { reload }] = tableContext;
|
|
||||||
const [registerLineTable, { openModal }] = useModal();
|
|
||||||
async function handleYear(record) {
|
|
||||||
const ddd = await specialistYearStatApi({ specialistId: record.id });
|
|
||||||
const chartsName = ddd.map((item) => {
|
|
||||||
return item.years;
|
|
||||||
});
|
|
||||||
const chartsValue = ddd.map((item) => {
|
|
||||||
return item.sums;
|
|
||||||
});
|
|
||||||
ddd.forEach((item) => {
|
|
||||||
item.year = item.years;
|
|
||||||
});
|
|
||||||
openModal(true, {
|
|
||||||
title: '专家历年服务人次变化',
|
|
||||||
chartsName,
|
|
||||||
chartsValue,
|
|
||||||
dataSource: ddd,
|
|
||||||
titleInfo: [
|
|
||||||
{
|
|
||||||
name: '专家姓名',
|
|
||||||
value: record.doctorName,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '性别',
|
|
||||||
value: record.sex_dictText,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '年龄',
|
|
||||||
value: record.age,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '科室',
|
|
||||||
value: record.departmentName,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '职称',
|
|
||||||
value: record.doctorTitle_dictText,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '累计服务人次',
|
|
||||||
value: record.allSessionSum,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.all-box {
|
|
||||||
:deep(.ant-modal-header) {
|
|
||||||
background: #b4c7e7 !important;
|
|
||||||
}
|
|
||||||
.basic-title {
|
|
||||||
font-weight: bold !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
hospitalList = '/health-consultation/archives/hospital/page',
|
|
||||||
archivesYearStat = '/health-consultation/archives/hospital/years-statistic',
|
|
||||||
specialistPage = '/health-consultation/archives/specialist/page',
|
|
||||||
specialistYearStat = '/health-consultation/archives/specialist/years-statistic',
|
|
||||||
geo = '/health-consultation/archives/hospital/geo',
|
|
||||||
}
|
|
||||||
|
|
||||||
export const hospitalListApi = (params) => defHttp.get({ url: Api.hospitalList, params });
|
|
||||||
export const geoApi = (params) => defHttp.get({ url: Api.geo, params });
|
|
||||||
|
|
||||||
export const archivesYearStatApi = (params) => defHttp.get({ url: Api.archivesYearStat, params });
|
|
||||||
|
|
||||||
export const specialistPageApi = (params) => defHttp.get({ url: Api.specialistPage, params });
|
|
||||||
export const specialistYearStatApi = (params) => defHttp.get({ url: Api.specialistYearStat, params });
|
|
||||||
-164
@@ -1,164 +0,0 @@
|
|||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import moment from 'moment/moment';
|
|
||||||
|
|
||||||
export const getColumns = (date: any) => {
|
|
||||||
const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '医院名称',
|
|
||||||
dataIndex: 'resourceName',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '医院等级',
|
|
||||||
dataIndex: 'level_dictText',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '详细地址',
|
|
||||||
dataIndex: 'address',
|
|
||||||
align: 'center',
|
|
||||||
width: 200,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '专家人数',
|
|
||||||
dataIndex: 'specialistSum',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: `今年服务人次(${dayjs(date).format('YYYY')})`,
|
|
||||||
dataIndex: 'thisYearSessionSum',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '累计服务人次',
|
|
||||||
dataIndex: 'allSessionSum',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '历年服务人次变化',
|
|
||||||
dataIndex: 'notThisYear',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
return columns;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '医院名称',
|
|
||||||
field: 'resourceName',
|
|
||||||
component: 'Input',
|
|
||||||
show: ({ values }) => {
|
|
||||||
return values.showType !== '1';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '医院等级',
|
|
||||||
field: 'orgCode',
|
|
||||||
component: 'Input',
|
|
||||||
show: ({ values }) => {
|
|
||||||
return values.showType !== '1';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// label: '专家人数',
|
|
||||||
// field: 'specialistSum',
|
|
||||||
// component: 'Input',
|
|
||||||
// show: ({ values }) => {
|
|
||||||
// return values.showType !== '1';
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
label: '查询年份',
|
|
||||||
field: 'year',
|
|
||||||
component: 'DatePicker',
|
|
||||||
show: ({ values }) => {
|
|
||||||
return values.showType !== '1';
|
|
||||||
},
|
|
||||||
componentProps: {
|
|
||||||
showTime: false,
|
|
||||||
valueFormat: 'YYYY',
|
|
||||||
picker: 'year',
|
|
||||||
allowClear: false,
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
},
|
|
||||||
defaultValue: moment(new Date()).format('YYYY'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'showType',
|
|
||||||
component: 'Input',
|
|
||||||
defaultValue: '0',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '医院名称',
|
|
||||||
field: 'resourceName',
|
|
||||||
component: 'Input',
|
|
||||||
slot: 'resourceName',
|
|
||||||
show: ({ values }) => {
|
|
||||||
return values.showType === '1';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const specialColumns = (date: any) => {
|
|
||||||
const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
dataIndex: 'doctorName',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '性别',
|
|
||||||
dataIndex: 'sex_dictText',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '年龄',
|
|
||||||
dataIndex: 'age',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '科室',
|
|
||||||
dataIndex: 'departmentName',
|
|
||||||
align: 'center',
|
|
||||||
width: 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '职称',
|
|
||||||
dataIndex: 'doctorTitle_dictText',
|
|
||||||
align: 'center',
|
|
||||||
width: 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: `今年服务人次(${dayjs(date).format('YYYY')})`,
|
|
||||||
dataIndex: 'thisYearSessionSum',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '累计服务人次',
|
|
||||||
dataIndex: 'allSessionSum',
|
|
||||||
align: 'center',
|
|
||||||
width: 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '历年服务人次变化',
|
|
||||||
dataIndex: 'noThisYear',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
return columns;
|
|
||||||
};
|
|
||||||
-235
@@ -1,235 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicTables @register="registerTable" page-title="长庆油田专家医院" @handle-ok="handleModal" :show-table="radioValue === '0'">
|
|
||||||
<template #rightCol>
|
|
||||||
<a-radio-group v-model:value="radioValue" button-style="solid" @change="changeRadioValue">
|
|
||||||
<a-radio-button value="0">表格</a-radio-button>
|
|
||||||
<a-radio-button value="1">地图</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
</template>
|
|
||||||
<template #form-resourceName="{ model, filed }">
|
|
||||||
<a-select
|
|
||||||
v-model:value="model[filed]"
|
|
||||||
:showSearch="true"
|
|
||||||
label-in-value
|
|
||||||
:filter-option="(input: string, option: any): boolean => {
|
|
||||||
const str: string = input.toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
}"
|
|
||||||
placeholder="请选择单位"
|
|
||||||
@select="selectInfoValue"
|
|
||||||
>
|
|
||||||
<a-select-option
|
|
||||||
v-for="(item, index) in mapList"
|
|
||||||
:label="item.resourceName"
|
|
||||||
:value="JSON.stringify(item)"
|
|
||||||
:key="item.resourceName + '-lo-' + index"
|
|
||||||
>
|
|
||||||
{{ item.resourceName }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</template>
|
|
||||||
<template #tableInnerSlot>
|
|
||||||
<list-map ref="listMap" :map-list="mapList" :drawer-width="500" filed="resourceName">
|
|
||||||
<template #mapDrawer="{ data }">
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">医疗点名称:</div>
|
|
||||||
<div class="drawer-value">{{ data?.name }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">所属单位:</div>
|
|
||||||
<div class="drawer-value">{{ data?.departName }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label" style="width: 85px">详细地址:</div>
|
|
||||||
<div class="drawer-value" style="width: calc(100% - 85px)">{{ data?.address }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">医护人数:</div>
|
|
||||||
<div class="drawer-value">{{ data?.medicalStaffNum }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">救护车数量:</div>
|
|
||||||
<div class="drawer-value">{{ data?.ambulanceNum }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">{{ `今年诊疗人次(${data?.year}):` }}</div>
|
|
||||||
<div class="drawer-value">{{ data?.thisYearDiagnosisSum }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">累计诊疗人次:</div>
|
|
||||||
<div class="drawer-value">{{ data?.allDiagnosisSum }}</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bottom-button">
|
|
||||||
<a-button type="primary" @click="handleYear(data)">历年诊疗人数变化</a-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</list-map>
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.dataIndex === 'specialistSum'">
|
|
||||||
<a-button type="link" @click="handleSpecial(record)">{{ record.specialistSum }}</a-button>
|
|
||||||
</template>
|
|
||||||
<template v-if="column.dataIndex === 'notThisYear'">
|
|
||||||
<a-button type="link" @click="handleYear(record)">历年变化</a-button>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTables>
|
|
||||||
<LineTableModal @register="registerModal"></LineTableModal>
|
|
||||||
<SpecialModal @register="registerSpecial"></SpecialModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicTables from '/@/components/Table/src/BasicTables.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { getColumns, searchFormSchema } from '/@/views/archivesManage/institution/institutionInfomation/expertHospital/expertHospital.data';
|
|
||||||
import { nextTick, ref } from 'vue';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import {
|
|
||||||
geoApi,
|
|
||||||
hospitalListApi,
|
|
||||||
archivesYearStatApi,
|
|
||||||
} from '/@/views/archivesManage/institution/institutionInfomation/expertHospital/expertHospital.api';
|
|
||||||
import ListMap from '/@/views/archivesManage/components/listMap.vue';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import LineTableModal from '/@/views/archivesManage/components/lineTableModal.vue';
|
|
||||||
import SpecialModal from '/@/views/archivesManage/institution/institutionInfomation/expertHospital/component/specialModal.vue';
|
|
||||||
const yearData = ref(dayjs(new Date()));
|
|
||||||
const radioValue = ref('0');
|
|
||||||
const mapList = ref<any[]>([]);
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
pageTitle: '长庆油田专家医院',
|
|
||||||
api: hospitalListApi,
|
|
||||||
btnArr: ['add', 'edit', 'delete', 'export', 'total', 'print'],
|
|
||||||
canResize: false,
|
|
||||||
|
|
||||||
showIndexColumn: true,
|
|
||||||
columns: getColumns(yearData.value),
|
|
||||||
formConfig: {
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, getForm, setProps }, {}] = tableContext;
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
|
||||||
const [registerSpecial, { openModal: openSpecialModal }] = useModal();
|
|
||||||
function handleModal(value) {
|
|
||||||
if (value.year) {
|
|
||||||
yearData.value = value.year;
|
|
||||||
setProps({ columns: getColumns(yearData.value) });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async function handleYear(record) {
|
|
||||||
console.log(record);
|
|
||||||
const ddd = await archivesYearStatApi({ hospitalId: record.id });
|
|
||||||
const chartsName = ddd.map((item) => {
|
|
||||||
return item.years;
|
|
||||||
});
|
|
||||||
const chartsValue = ddd.map((item) => {
|
|
||||||
return item.sums;
|
|
||||||
});
|
|
||||||
ddd.forEach((item) => {
|
|
||||||
item.year = item.years;
|
|
||||||
});
|
|
||||||
openModal(true, {
|
|
||||||
title: '历年服务人次变化',
|
|
||||||
record,
|
|
||||||
chartsName,
|
|
||||||
chartsValue,
|
|
||||||
dataSource: ddd,
|
|
||||||
titleInfo: [
|
|
||||||
{
|
|
||||||
name: '医院名称',
|
|
||||||
value: record.resourceName,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '医院等级',
|
|
||||||
value: record.level_dictText,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '专家人数',
|
|
||||||
value: record.specialistSum,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '今年服务人次',
|
|
||||||
year: record.years,
|
|
||||||
value: record.thisYearSessionSum,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '累计服务人次',
|
|
||||||
value: record.allSessionSum,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function handleSpecial(record) {
|
|
||||||
openSpecialModal(true, {
|
|
||||||
record,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
const selectValue = ref('');
|
|
||||||
const listMap = ref('');
|
|
||||||
|
|
||||||
async function changeRadioValue(v) {
|
|
||||||
if (v.target.value === '1') {
|
|
||||||
if (mapList.value.length === 0) {
|
|
||||||
mapList.value = await geoApi({});
|
|
||||||
}
|
|
||||||
|
|
||||||
await nextTick(() => {
|
|
||||||
listMap.value.initMap(mapList.value);
|
|
||||||
});
|
|
||||||
setProps({
|
|
||||||
isNeedSearch: false,
|
|
||||||
});
|
|
||||||
await getForm().updateSchema({
|
|
||||||
field: 'showType',
|
|
||||||
defaultValue: '1',
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setProps({
|
|
||||||
isNeedSearch: true,
|
|
||||||
});
|
|
||||||
await getForm().updateSchema({
|
|
||||||
field: 'showType',
|
|
||||||
defaultValue: '0',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectInfoValue(v) {
|
|
||||||
selectValue.value = v.value;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.drawer-d {
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0 0 10px 6px;
|
|
||||||
font-size: 16px;
|
|
||||||
display: flex;
|
|
||||||
.drawer-label {
|
|
||||||
//width: 180px;
|
|
||||||
text-align: right;
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
.drawer-value {
|
|
||||||
//width: calc(100% - 140px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom-button {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
bottom: 30px;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
button {
|
|
||||||
font-weight: bold !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-12
@@ -1,12 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
archivesPage = '/medical-center/archives/page',
|
|
||||||
archivesYearStat = '/medical-center/archives/years-statistic',
|
|
||||||
archivesGeo = '/medical-center/archives/geo',
|
|
||||||
}
|
|
||||||
|
|
||||||
export const archivesPageApi = (params) => defHttp.get({ url: Api.archivesPage, params });
|
|
||||||
export const archivesYearStatApi = (params) => defHttp.get({ url: Api.archivesYearStat, params });
|
|
||||||
|
|
||||||
export const archivesGeoApi = (params) => defHttp.get({ url: Api.archivesGeo, params });
|
|
||||||
-134
@@ -1,134 +0,0 @@
|
|||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
||||||
import { queryDepartTreeSync } from '/@/views/system/depart/depart.api';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import moment from 'moment/moment';
|
|
||||||
|
|
||||||
export const getColumns = (date: any) => {
|
|
||||||
const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '医疗点名称',
|
|
||||||
dataIndex: 'name',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '所属单位',
|
|
||||||
dataIndex: 'departName',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '详细地址',
|
|
||||||
dataIndex: 'address',
|
|
||||||
align: 'center',
|
|
||||||
width: 200,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '医护人员数量',
|
|
||||||
dataIndex: 'medicalStaffNum',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '救护车数量',
|
|
||||||
dataIndex: 'ambulanceNum',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: `当年诊疗人次(${dayjs(date).format('YYYY')})`,
|
|
||||||
dataIndex: 'thisYearDiagnosisSum',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '累计诊疗人次',
|
|
||||||
dataIndex: 'allDiagnosisSum',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '历年诊疗人次变化',
|
|
||||||
dataIndex: 'notThisYear',
|
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
return columns;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '',
|
|
||||||
field: 'showType',
|
|
||||||
component: 'Input',
|
|
||||||
defaultValue: '0',
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '医疗点名称',
|
|
||||||
field: 'medicalResourceName',
|
|
||||||
component: 'Input',
|
|
||||||
show: ({ values }) => {
|
|
||||||
return values.showType !== '1';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '单位部门',
|
|
||||||
field: 'orgCode',
|
|
||||||
component: 'JlazyTreeSelect',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
multiple: false,
|
|
||||||
api: queryDepartTreeSync,
|
|
||||||
loadApi: queryDepartTreeSync,
|
|
||||||
afterApi: (data) => {
|
|
||||||
data.forEach((item: any) => {
|
|
||||||
item['preTitle'] = item.title;
|
|
||||||
item['key'] = item['orgCode'];
|
|
||||||
});
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
preItem: (title, item) => {
|
|
||||||
item['preTitle'] = title + '/' + item.title;
|
|
||||||
item['key'] = item['orgCode'];
|
|
||||||
return item;
|
|
||||||
},
|
|
||||||
fieldNamesInfo: {
|
|
||||||
value: 'orgCode',
|
|
||||||
label: 'preTitle',
|
|
||||||
key: 'orgCode',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
show: ({ values }) => {
|
|
||||||
return values.showType !== '1';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '查询年份',
|
|
||||||
field: 'year',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: false,
|
|
||||||
valueFormat: 'YYYY',
|
|
||||||
picker: 'year',
|
|
||||||
allowClear: false,
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
},
|
|
||||||
defaultValue: moment(new Date()).format('YYYY'),
|
|
||||||
show: ({ values }) => {
|
|
||||||
return values.showType !== '1';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '医疗点名称',
|
|
||||||
field: 'medicalName',
|
|
||||||
component: 'Input',
|
|
||||||
slot: 'medicalNameSlot',
|
|
||||||
show: ({ values }) => {
|
|
||||||
return values.showType === '1';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
-222
@@ -1,222 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicTables
|
|
||||||
@register="registerTable"
|
|
||||||
page-title="长庆油田一线医疗点"
|
|
||||||
@handle-ok="handleModal"
|
|
||||||
@handle-cancel="handleCancel"
|
|
||||||
:show-table="radioValue === '0'"
|
|
||||||
>
|
|
||||||
<template #rightCol>
|
|
||||||
<a-radio-group v-model:value="radioValue" button-style="solid" @change="changeRadioValue">
|
|
||||||
<a-radio-button value="0">表格</a-radio-button>
|
|
||||||
<a-radio-button value="1">地图</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
</template>
|
|
||||||
<template #form-medicalNameSlot="{ model, filed }">
|
|
||||||
<a-select
|
|
||||||
v-model:value="model[filed]"
|
|
||||||
:showSearch="true"
|
|
||||||
label-in-value
|
|
||||||
:filter-option="(input: string, option: any): boolean => {
|
|
||||||
const str: string = input.toLowerCase();
|
|
||||||
return option.label.toLowerCase().indexOf(str) >= 0;
|
|
||||||
}"
|
|
||||||
placeholder="请选择单位"
|
|
||||||
@select="selectInfoValue"
|
|
||||||
>
|
|
||||||
<a-select-option v-for="(item, index) in mapList" :label="item.name" :value="JSON.stringify(item)" :key="item.name + '-lo-' + index">
|
|
||||||
{{ item.name }}
|
|
||||||
</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</template>
|
|
||||||
<template #tableInnerSlot>
|
|
||||||
<list-map ref="listMap" :map-list="mapList" :drawer-width="500">
|
|
||||||
<template #mapDrawer="{ data }">
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">医疗点名称:</div>
|
|
||||||
<div class="drawer-value">{{ data?.name }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">所属单位:</div>
|
|
||||||
<div class="drawer-value">{{ data?.departName }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label" style="width: 85px">详细地址:</div>
|
|
||||||
<div class="drawer-value" style="width: calc(100% - 85px)">{{ data?.address }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">医护人数:</div>
|
|
||||||
<div class="drawer-value">{{ data?.medicalStaffNum }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">救护车数量:</div>
|
|
||||||
<div class="drawer-value">{{ data?.ambulanceNum }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">{{ `今年诊疗人次(${data?.year}):` }}</div>
|
|
||||||
<div class="drawer-value">{{ data?.thisYearDiagnosisSum }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="drawer-d">
|
|
||||||
<div class="drawer-label">累计诊疗人次:</div>
|
|
||||||
<div class="drawer-value">{{ data?.allDiagnosisSum }}</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bottom-button">
|
|
||||||
<a-button type="primary" @click="handleYear(data)">历年诊疗人数变化</a-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</list-map>
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.dataIndex == 'notThisYear'">
|
|
||||||
<a-button type="link" @click="handleYear(record)">历年变化</a-button>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTables>
|
|
||||||
<LineTableModal @register="registerModal" />
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicTables from '/@/components/Table/src/BasicTables.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import { getColumns, searchFormSchema } from '/@/views/archivesManage/institution/institutionInfomation/frontlineMedical/frontlineMedical.data';
|
|
||||||
import { ref, nextTick } from 'vue';
|
|
||||||
import {
|
|
||||||
archivesGeoApi,
|
|
||||||
archivesPageApi,
|
|
||||||
archivesYearStatApi,
|
|
||||||
} from '/@/views/archivesManage/institution/institutionInfomation/frontlineMedical/frontlineMedical.api';
|
|
||||||
import LineTableModal from '/@/views/archivesManage/components/lineTableModal.vue';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import ListMap from '/@/views/archivesManage/components/listMap.vue';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
|
||||||
const yearData = ref(dayjs(new Date()));
|
|
||||||
const radioValue = ref('0');
|
|
||||||
const mapList = ref<any[]>([]);
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
pageTitle: '长庆油田一线医疗点',
|
|
||||||
btnArr: ['add', 'edit', 'delete', 'export', 'total', 'print'],
|
|
||||||
canResize: false,
|
|
||||||
api: archivesPageApi,
|
|
||||||
showIndexColumn: true,
|
|
||||||
columns: getColumns(yearData.value),
|
|
||||||
formConfig: {
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showAdvancedButton: false,
|
|
||||||
fieldMapToNumber: [],
|
|
||||||
fieldMapToTime: [],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const selectValue = ref('');
|
|
||||||
const listMap = ref('');
|
|
||||||
function handleModal(value) {
|
|
||||||
console.log(selectValue.value);
|
|
||||||
if (radioValue.value === '1') listMap.value.selectInfo(selectValue.value);
|
|
||||||
if (value.year) {
|
|
||||||
yearData.value = value.year;
|
|
||||||
setProps({ columns: getColumns(yearData.value) });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleCancel(v) {
|
|
||||||
listMap.value.selectInfo(selectValue.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function changeRadioValue(v) {
|
|
||||||
if (v.target.value === '1') {
|
|
||||||
if (mapList.value.length === 0) {
|
|
||||||
mapList.value = await archivesGeoApi({});
|
|
||||||
}
|
|
||||||
|
|
||||||
await nextTick(() => {
|
|
||||||
listMap.value.initMap(mapList.value);
|
|
||||||
});
|
|
||||||
setProps({
|
|
||||||
isNeedSearch: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
await getForm().updateSchema({
|
|
||||||
field: 'showType',
|
|
||||||
defaultValue: '1',
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
setProps({
|
|
||||||
isNeedSearch: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
await getForm().updateSchema({
|
|
||||||
field: 'showType',
|
|
||||||
defaultValue: '0',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function selectInfoValue(v) {
|
|
||||||
selectValue.value = v.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleYear(record) {
|
|
||||||
const ddd = await archivesYearStatApi({ id: record.id });
|
|
||||||
const chartsName = ddd.map((item) => {
|
|
||||||
return item.year;
|
|
||||||
});
|
|
||||||
const chartsValue = ddd.map((item) => {
|
|
||||||
return item.sums;
|
|
||||||
});
|
|
||||||
openModal(true, {
|
|
||||||
title: '历年诊疗人数变化',
|
|
||||||
record,
|
|
||||||
chartsName,
|
|
||||||
chartsValue,
|
|
||||||
dataSource: ddd,
|
|
||||||
sumsName: '诊疗人次',
|
|
||||||
titleInfo: [
|
|
||||||
{
|
|
||||||
name: '医院名称',
|
|
||||||
value: record.name,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '今年体检人数',
|
|
||||||
value: record.thisYearDiagnosisSum,
|
|
||||||
year: record.year,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '累计体检人数',
|
|
||||||
value: record.allDiagnosisSum,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
const [registerTable, { reload, getForm, setProps }, {}] = tableContext;
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.drawer-d {
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0 0 10px 6px;
|
|
||||||
font-size: 16px;
|
|
||||||
display: flex;
|
|
||||||
.drawer-label {
|
|
||||||
//width: 180px;
|
|
||||||
text-align: right;
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
.drawer-value {
|
|
||||||
//width: calc(100% - 140px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom-button {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
bottom: 30px;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
button {
|
|
||||||
font-weight: bold !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-41
@@ -1,41 +0,0 @@
|
|||||||
import { BasicColumn } from '/@/components/Table';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
|
|
||||||
export const getColumns = (date: any) => {
|
|
||||||
const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
dataIndex: 'id',
|
|
||||||
width: 80,
|
|
||||||
customRender: ({ index }) => {
|
|
||||||
return index + 1;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '医院名称',
|
|
||||||
dataIndex: 'name',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '医院地址',
|
|
||||||
dataIndex: 'address',
|
|
||||||
width: 160,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: `今年体检人数(${dayjs(date).format('YYYY')})`,
|
|
||||||
dataIndex: 'address',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '累计体检人数',
|
|
||||||
dataIndex: 'address',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '历年承检人数变化',
|
|
||||||
dataIndex: 'yearAll',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
return columns;
|
|
||||||
};
|
|
||||||
-94
@@ -1,94 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="hospital-full">
|
|
||||||
<div style="font-size: 20px; margin-bottom: 10px; text-align: center; letter-spacing: 2px">长庆油田体检医院</div>
|
|
||||||
<BasicTable @register="registerTable">
|
|
||||||
<template #tableTitle>
|
|
||||||
<div class="tab-search">
|
|
||||||
<a-tabs v-model:activeKey="activeKey" @change="changeTabs">
|
|
||||||
<a-tab-pane key="1" tab="常规体检"></a-tab-pane>
|
|
||||||
<a-tab-pane key="2" tab="消化道体检"></a-tab-pane>
|
|
||||||
</a-tabs>
|
|
||||||
<div>
|
|
||||||
<span>体检年份:</span>
|
|
||||||
<a-space direction="vertical" :size="12">
|
|
||||||
<a-date-picker v-model:value="yearData" picker="year" :allow-clear="false" @openChange="handleDate" />
|
|
||||||
</a-space>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="hospital-info">
|
|
||||||
<div>2024年,长庆油田健康体检承检医院为:**医院、**医院、**医院。</div>
|
|
||||||
<div>本年度累计已完成**人健康体检,其中**医院**人、**医院**人、**医院**人。</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { BasicTable } from '/@/components/Table';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import { getColumns } from '/@/views/archivesManage/institution/institutionInfomation/medicalHospital/medicalHospital.data';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
const activeKey = ref('1');
|
|
||||||
const yearData = ref(dayjs(new Date()));
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
title: '油田医院',
|
|
||||||
|
|
||||||
columns: getColumns(yearData.value),
|
|
||||||
canResize: false,
|
|
||||||
showIndexColumn: false,
|
|
||||||
useSearchForm: false,
|
|
||||||
tableSetting: {
|
|
||||||
setting: false,
|
|
||||||
},
|
|
||||||
showActionColumn: false,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { reload, setProps }] = tableContext;
|
|
||||||
function changeTabs() {
|
|
||||||
console.log(activeKey.value);
|
|
||||||
}
|
|
||||||
function handleDate(value) {
|
|
||||||
if (!value) {
|
|
||||||
setProps({ columns: getColumns(yearData.value) });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.hospital-full {
|
|
||||||
background: #f7f7f7;
|
|
||||||
:deep(.ant-table) {
|
|
||||||
background: #f7f7f7 !important;
|
|
||||||
}
|
|
||||||
:deep(.jeecg-basic-table) {
|
|
||||||
background: #f7f7f7 !important;
|
|
||||||
}
|
|
||||||
:deep(.ant-table-wrapper) {
|
|
||||||
background: #f7f7f7 !important;
|
|
||||||
}
|
|
||||||
:deep(.ant-table-tbody) {
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
:deep(.ant-table-thead) {
|
|
||||||
.ant-table-cell {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
:deep(.items-center) {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.tab-search {
|
|
||||||
background: #f7f7f7;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
.hospital-info {
|
|
||||||
width: 100%;
|
|
||||||
padding: 15px 10px;
|
|
||||||
font-weight: bold;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-62
@@ -1,62 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
import { stServerUrl } from '/@/utils/http/stRequestToken/serverUrl';
|
|
||||||
import { getStToken } from '/@/utils/http/stRequestToken';
|
|
||||||
|
|
||||||
export enum Api {
|
|
||||||
recordTreeDepartSecondAndThree = '/sys/sysDepart/recordTreeDepartSecondAndThree',
|
|
||||||
restaurantList = '/foodNourishmentReport/getRestaurantList',
|
|
||||||
views = '/foodNourishmentReport/getEquipmentReportListDetailView/v3',
|
|
||||||
}
|
|
||||||
|
|
||||||
// 所有部门
|
|
||||||
export const getTreeDepartSecondAndThree = async (params) => {
|
|
||||||
const token = await getStToken({});
|
|
||||||
return defHttp.get(
|
|
||||||
{
|
|
||||||
url: Api.recordTreeDepartSecondAndThree,
|
|
||||||
params,
|
|
||||||
headers: {
|
|
||||||
'X-Access-Token': token,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
apiUrl: stServerUrl,
|
|
||||||
withToken: false,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 所有食堂
|
|
||||||
export const getRestaurantList = async (params) => {
|
|
||||||
const token = await getStToken({});
|
|
||||||
return defHttp.get(
|
|
||||||
{
|
|
||||||
url: Api.restaurantList,
|
|
||||||
params,
|
|
||||||
headers: {
|
|
||||||
'X-Access-Token': token,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
apiUrl: stServerUrl,
|
|
||||||
withToken: false,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getViews = async (params) => {
|
|
||||||
const token = await getStToken({});
|
|
||||||
return defHttp.post(
|
|
||||||
{
|
|
||||||
url: Api.views,
|
|
||||||
params,
|
|
||||||
headers: {
|
|
||||||
'X-Access-Token': token,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
apiUrl: stServerUrl,
|
|
||||||
withToken: false,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
-105
@@ -1,105 +0,0 @@
|
|||||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
||||||
import { h } from 'vue';
|
|
||||||
|
|
||||||
//列表数据
|
|
||||||
export const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '设备名称',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'equipmentName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '设备编号',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'deviceNumber',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '设备状态',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'deviceStatus',
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
const txt = text === '1' ? `<span style="color:#49D148">正常</span>` : ` <span style="color:#ff0000">离线 </span>`;
|
|
||||||
return h('div', {
|
|
||||||
innerHTML: txt,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '使用时间',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'days',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '餐次',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'dinnerType',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '使用时间段',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'useTime',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '使用时长(分钟)',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'useMin',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '使用人次',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'useManTime',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '设备名称',
|
|
||||||
field: '1',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '设备编号',
|
|
||||||
field: '2',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '设备状态',
|
|
||||||
field: 'sex',
|
|
||||||
component: 'Select',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
options: [
|
|
||||||
{ label: '离线', value: '1' },
|
|
||||||
{ label: '正常', value: '2' },
|
|
||||||
],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '餐次',
|
|
||||||
field: 'sex',
|
|
||||||
component: 'Select',
|
|
||||||
componentProps: () => {
|
|
||||||
return {
|
|
||||||
options: [
|
|
||||||
{ label: '早餐', value: '早餐' },
|
|
||||||
{ label: '午餐', value: '午餐' },
|
|
||||||
{ label: '晚餐', value: '晚餐' },
|
|
||||||
{ label: '加餐', value: '加餐' },
|
|
||||||
],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '总使用时长(分钟)',
|
|
||||||
field: 'useMinAndUseMinType',
|
|
||||||
component: 'InputGroup',
|
|
||||||
slot: 'useMinAndUseMinType',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '总使用人次',
|
|
||||||
field: 'useManTimeAndUseManTimeType',
|
|
||||||
component: 'InputGroup',
|
|
||||||
slot: 'useManTimeAndUseManTimeType',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
-580
@@ -1,580 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="gui">
|
|
||||||
<div class="guiBox">
|
|
||||||
<a-spin :spinning="guiDataLading">
|
|
||||||
<a-descriptions :column="4">
|
|
||||||
<a-descriptions-item label="所属单位" :span="1">
|
|
||||||
<a-cascader
|
|
||||||
style="width: 100%; max-width: 200px"
|
|
||||||
:show-search="{ filter }"
|
|
||||||
:options="departData"
|
|
||||||
changeOnSelect
|
|
||||||
expandTrigger="hover"
|
|
||||||
:allowClear="false"
|
|
||||||
v-model:value="departIds"
|
|
||||||
@change="getRestaurantListRequest(true)"
|
|
||||||
placeholder="请选择单位部门"
|
|
||||||
/>
|
|
||||||
</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="选择食堂" :span="1">
|
|
||||||
<a-select v-model:value="canteenId" placeholder="请选择食堂" style="width: 100%; max-width: 240px" @change="canteenIdChange">
|
|
||||||
<template v-for="item in canteenData">
|
|
||||||
<a-select-option :value="item.id">{{ item.restName }}</a-select-option>
|
|
||||||
</template>
|
|
||||||
</a-select>
|
|
||||||
</a-descriptions-item>
|
|
||||||
<a-descriptions-item />
|
|
||||||
<a-descriptions-item />
|
|
||||||
</a-descriptions>
|
|
||||||
<template v-if="guiData">
|
|
||||||
<div class="guiBoxTitle">{{ secondDepartName }} {{ restName }} 营养监控设备管理</div>
|
|
||||||
<div class="guiBoxTimes">{{ guiData.stDeviceDinnerTypeVo.days }}({{ guiData.stDeviceDinnerTypeVo.dinnerType }})</div>
|
|
||||||
<div class="guiBoxTotal">
|
|
||||||
<template v-for="item in guiData.stDeviceTypeVoList" :key="item.deviceId">
|
|
||||||
<div>{{ item.equipmentName }}:{{ item.equipmentNum }}</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
<div class="guiBoxContent">
|
|
||||||
<template v-for="item in guiData.candao">
|
|
||||||
<div class="deviceBox">
|
|
||||||
<a-divider>{{ item.name }}</a-divider>
|
|
||||||
<div class="deviceBoxDom">
|
|
||||||
<template v-for="(item_, index_) in item.device">
|
|
||||||
<div
|
|
||||||
:class="[
|
|
||||||
'deviceBoxDomList',
|
|
||||||
guiBoxIndex.includes(index_) ? 'floatRight' : 'floatLeft',
|
|
||||||
index_ === 7 || index_ === 23 ? 'borderRight' : '',
|
|
||||||
index_ === 15 || index_ === 31 ? 'borderLeft' : '',
|
|
||||||
]"
|
|
||||||
>
|
|
||||||
<div class="listStatusText" :style="{ color: item_.deviceStatus === '1' ? '#66CC66' : '#F24439' }">{{
|
|
||||||
item_.deviceStatus === '1' ? '在线' : '离线'
|
|
||||||
}}</div>
|
|
||||||
<div class="listStatus">
|
|
||||||
<template v-if="item_.deviceStatus === '1'">
|
|
||||||
<img :src="openIcon" alt="" />
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<img :src="closeIcon" alt="" />
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
<div class="listBox">
|
|
||||||
<div class="listBoxFoodName">
|
|
||||||
<template v-if="item_.equipmentCode !== 'com.sw.bindrfid' && item_.equipmentCode !== 'com.sw.smartscreen'">
|
|
||||||
<template v-if="item_.foodNameLeft || item_.foodNameRight">
|
|
||||||
<template v-if="item_.foodNameLeft">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span>{{ item_.foodNameLeft }}</span>
|
|
||||||
</template>
|
|
||||||
<div>{{ item_.foodNameLeft }}</div>
|
|
||||||
</a-tooltip>
|
|
||||||
</template>
|
|
||||||
<template v-if="item_.foodNameRight">
|
|
||||||
<div></div>
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span>{{ item_.foodNameRight }}</span>
|
|
||||||
</template>
|
|
||||||
<div>{{ item_.foodNameRight }}</div>
|
|
||||||
</a-tooltip>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<p>暂无餐品</p>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
<div :class="['listBoxIcon', item_.equipmentClass]"></div>
|
|
||||||
<div class="listBoxName">
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span>{{ item_.equipmentName }}({{ item_.deviceNumber }})</span>
|
|
||||||
</template>
|
|
||||||
{{ item_.equipmentName }}({{ item_.deviceNumber }})
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<template v-if="item_.equipmentCode === 'com.sw.smartscreen'">
|
|
||||||
<div class="listBoxNums"></div>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<div class="listBoxNum">
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span>{{ item_.useManTimeNow ? item_.useManTimeNow : 0 }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item_.useManTimeNow ? item_.useManTimeNow : 0 }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span>当餐人次</span>
|
|
||||||
</template>
|
|
||||||
当餐人次
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div></div>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span>{{ item_.useManTime ? item_.useManTime : 0 }}</span>
|
|
||||||
</template>
|
|
||||||
{{ item_.useManTime ? item_.useManTime : 0 }}
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<a-tooltip>
|
|
||||||
<template #title>
|
|
||||||
<span>累计人次</span>
|
|
||||||
</template>
|
|
||||||
累计人次
|
|
||||||
</a-tooltip>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pageBtn">
|
|
||||||
<a-button type="primary" @click="closePage">返回</a-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<a-result status="404" title="暂无数据" sub-title="当前所在的单位暂无设备数据">
|
|
||||||
<template #extra>
|
|
||||||
<a-button type="primary" @click="closePage">返回</a-button>
|
|
||||||
</template>
|
|
||||||
</a-result>
|
|
||||||
</template>
|
|
||||||
</a-spin>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { ref, onMounted } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
const route = useRoute();
|
|
||||||
const router = useRouter();
|
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
|
||||||
import { getTreeDepartSecondAndThree, getRestaurantList, getViews } from './gui.api';
|
|
||||||
import closeIcon from '/@/assets/images/nutritionManagement/close.png';
|
|
||||||
import openIcon from '/@/assets/images/nutritionManagement/open.png';
|
|
||||||
|
|
||||||
const secondDepartName = ref<any>('');
|
|
||||||
const restName = ref<any>('');
|
|
||||||
const departData = ref<any>([]);
|
|
||||||
const departIds = ref<any>([]);
|
|
||||||
const canteenData = ref<any>([]);
|
|
||||||
const canteenId = ref<any>(null);
|
|
||||||
const guiData = ref<any>(null);
|
|
||||||
const guiDataLading = ref<any>(true);
|
|
||||||
const guiBoxIndex = ref<any>([8, 9, 10, 11, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31]);
|
|
||||||
onMounted(() => {
|
|
||||||
departIds.value = [...new Set([route.query.secondDepartId, route.query.departId])];
|
|
||||||
canteenId.value = route.query.canteenId;
|
|
||||||
getTreeDepartSecondAndThreeRequest(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
const getTreeDepartSecondAndThreeRequest = (bol) => {
|
|
||||||
let params = {
|
|
||||||
orgCode: useUserStore()?.getUserInfo.orgCode,
|
|
||||||
};
|
|
||||||
getTreeDepartSecondAndThree(params).then((res) => {
|
|
||||||
departData.value = res;
|
|
||||||
getRestaurantListRequest(bol);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const getRestaurantListRequest = (bol) => {
|
|
||||||
let depart = departIds.value;
|
|
||||||
let params = {
|
|
||||||
departId: depart[depart.length - 1],
|
|
||||||
};
|
|
||||||
getRestaurantList(params).then((res) => {
|
|
||||||
canteenData.value = res;
|
|
||||||
if (res && res.length) {
|
|
||||||
if (bol) {
|
|
||||||
canteenId.value = res[0].id;
|
|
||||||
}
|
|
||||||
canteenIdChange();
|
|
||||||
} else {
|
|
||||||
canteenId.value = null;
|
|
||||||
guiData.value = null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const canteenIdChange = () => {
|
|
||||||
guiData.value = null;
|
|
||||||
guiDataLading.value = true;
|
|
||||||
getViewsRequest();
|
|
||||||
};
|
|
||||||
|
|
||||||
const getViewsRequest = () => {
|
|
||||||
let params = {
|
|
||||||
canteenId: canteenId.value,
|
|
||||||
};
|
|
||||||
getViews(params).then((res) => {
|
|
||||||
guiDataLading.value = false;
|
|
||||||
if (res.deviceAndFoodDetailViewVoList && res.deviceAndFoodDetailViewVoList.length) {
|
|
||||||
let list: any = [];
|
|
||||||
const maxItem = res.deviceAndFoodDetailViewVoList[0].stDeviceAndFoodDetailNumVoList.reduce((prev, current) =>
|
|
||||||
prev.owningTrack > current.owningTrack ? prev : current
|
|
||||||
);
|
|
||||||
for (let i = 0; i <= maxItem.owningTrack; i++) {
|
|
||||||
list.push({
|
|
||||||
index: i,
|
|
||||||
name: i + 1 + '号智能餐线',
|
|
||||||
device: [],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
res.deviceAndFoodDetailViewVoList[0].stDeviceAndFoodDetailNumVoList.map((item) => {
|
|
||||||
let imgName = item.equipmentCode.split('.');
|
|
||||||
item.equipmentClass = imgName[imgName.length - 1];
|
|
||||||
list[item.owningTrack].device.push(item);
|
|
||||||
});
|
|
||||||
list.map((item) => {
|
|
||||||
item.device = item.device.sort(compare('owningTrackOrder'));
|
|
||||||
});
|
|
||||||
res.deviceAndFoodDetailViewVoList[0].stFloorScreenDeviceVoList.map((item, index) => {
|
|
||||||
if (list.length > index) {
|
|
||||||
let imgName = item.equipmentCode.split('.');
|
|
||||||
item.equipmentClass = imgName[imgName.length - 1];
|
|
||||||
list[index].device.unshift(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
secondDepartName.value = list[0].device[0].secondDepartName;
|
|
||||||
restName.value = list[0].device[0].restName;
|
|
||||||
res.deviceAndFoodDetailViewVoList[0].candao = list;
|
|
||||||
guiData.value = res.deviceAndFoodDetailViewVoList[0];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const compare = (property) => {
|
|
||||||
return (a, b) => {
|
|
||||||
let value1 = a[property];
|
|
||||||
let value2 = b[property];
|
|
||||||
return value1 - value2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const closePage = () => {
|
|
||||||
router.push({
|
|
||||||
path: route.path,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="less">
|
|
||||||
.gui {
|
|
||||||
padding: 10px;
|
|
||||||
overflow: hidden;
|
|
||||||
zoom: 1;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: #ffffff;
|
|
||||||
|
|
||||||
.guiBox {
|
|
||||||
width: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
zoom: 1;
|
|
||||||
min-height: 600px;
|
|
||||||
|
|
||||||
:deep(.ant-descriptions-item-container) {
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.guiBoxTitle {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
height: 16px;
|
|
||||||
line-height: 16px;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.guiBoxTimes {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
height: 16px;
|
|
||||||
line-height: 16px;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.guiBoxTotal {
|
|
||||||
width: 100%;
|
|
||||||
padding: 0 30px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
justify-content: space-between;
|
|
||||||
background-color: #eaecf1;
|
|
||||||
|
|
||||||
> div {
|
|
||||||
color: #77849e;
|
|
||||||
font-size: 16px;
|
|
||||||
height: 48px;
|
|
||||||
line-height: 48px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.guiBoxContent {
|
|
||||||
width: 100%;
|
|
||||||
padding: 0 30px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.deviceBox {
|
|
||||||
width: 100%;
|
|
||||||
margin-bottom: 50px;
|
|
||||||
|
|
||||||
.deviceBoxDom {
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.deviceBoxDomList {
|
|
||||||
width: calc(100% / 8);
|
|
||||||
padding: 0 10px;
|
|
||||||
position: relative;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin-bottom: 40px;
|
|
||||||
|
|
||||||
.listStatusText {
|
|
||||||
color: #66cc66;
|
|
||||||
width: 100%;
|
|
||||||
height: 14px;
|
|
||||||
font-size: 14px;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 14px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.listStatus {
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
border-radius: 50%;
|
|
||||||
margin: 0 auto 10px;
|
|
||||||
|
|
||||||
img {
|
|
||||||
position: relative;
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.listBox {
|
|
||||||
border-radius: 8px;
|
|
||||||
padding-top: 15px;
|
|
||||||
border: 2px solid #e6eaf1;
|
|
||||||
|
|
||||||
.listBoxFoodName {
|
|
||||||
height: 12px;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
> div:nth-of-type(1),
|
|
||||||
> div:nth-of-type(3) {
|
|
||||||
color: #252535;
|
|
||||||
height: 12px;
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 12px;
|
|
||||||
text-align: center;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
> div:nth-of-type(2) {
|
|
||||||
width: 2px;
|
|
||||||
height: 12px;
|
|
||||||
margin: 0 6px;
|
|
||||||
background-color: #e6eaf1;
|
|
||||||
}
|
|
||||||
|
|
||||||
> p {
|
|
||||||
color: #b6b6b6;
|
|
||||||
font-size: 12px;
|
|
||||||
height: 12px;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.listBoxIcon {
|
|
||||||
width: 56%;
|
|
||||||
height: 100px;
|
|
||||||
margin: 0 auto 8px;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: center;
|
|
||||||
background-size: contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
.smartscreen {
|
|
||||||
background-image: url(/@/assets/images/nutritionManagement/ldp_close.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.canteenstall {
|
|
||||||
background-image: url(/@/assets/images/nutritionManagement/canteenstall.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.wb {
|
|
||||||
background-image: url(/@/assets/images/nutritionManagement/wb.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.wbd {
|
|
||||||
background-image: url(/@/assets/images/nutritionManagement/wbd.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.wbv {
|
|
||||||
background-image: url(/@/assets/images/nutritionManagement/wbv.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.bindrfid {
|
|
||||||
background-image: url(/@/assets/images/nutritionManagement/bindrfid.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.wbfaceh {
|
|
||||||
background-image: url(/@/assets/images/nutritionManagement/wbfaceh.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.wbfacef {
|
|
||||||
background-image: url(/@/assets/images/nutritionManagement/wbfacef.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.wbfaced {
|
|
||||||
background-image: url(/@/assets/images/nutritionManagement/wbfaced.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
.listBoxName {
|
|
||||||
color: #b6b6b6;
|
|
||||||
height: 12px;
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 12px;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.listBoxNums {
|
|
||||||
width: 100%;
|
|
||||||
height: 56px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.listBoxNum {
|
|
||||||
padding: 10px 0;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
align-items: center;
|
|
||||||
border-top: 2px solid #e6eaf1;
|
|
||||||
|
|
||||||
> div:nth-of-type(1),
|
|
||||||
> div:nth-of-type(3) {
|
|
||||||
flex: 1;
|
|
||||||
width: 0;
|
|
||||||
|
|
||||||
> div:nth-of-type(1) {
|
|
||||||
color: #252535;
|
|
||||||
height: 14px;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 14px;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 6px;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
> div:nth-of-type(2) {
|
|
||||||
color: #77849e;
|
|
||||||
height: 14px;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 14px;
|
|
||||||
text-align: center;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
> div:nth-of-type(2) {
|
|
||||||
width: 2px;
|
|
||||||
height: 28px;
|
|
||||||
border: 1.5px solid #e6eaf1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 30px;
|
|
||||||
left: -10px;
|
|
||||||
right: -10px;
|
|
||||||
height: 5px;
|
|
||||||
background-color: #e6eaf1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.floatRight {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.floatLeft {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.borderRight {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&:after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 30px;
|
|
||||||
right: -10px;
|
|
||||||
bottom: -75px;
|
|
||||||
width: 5px;
|
|
||||||
background-color: #e6eaf1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.borderLeft {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&:after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 30px;
|
|
||||||
left: -10px;
|
|
||||||
bottom: -75px;
|
|
||||||
width: 5px;
|
|
||||||
background-color: #e6eaf1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.pageBtn {
|
|
||||||
position: fixed;
|
|
||||||
right: 30px;
|
|
||||||
bottom: 25px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
import { stServerUrl } from '/@/utils/http/stRequestToken/serverUrl';
|
|
||||||
import { getStToken } from '/@/utils/http/stRequestToken';
|
|
||||||
|
|
||||||
export enum Api {
|
|
||||||
list = '/foodNourishmentReport/getBaseRestaurantAddressInfo',
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表接口
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const list = async (params) => {
|
|
||||||
const token = await getStToken({});
|
|
||||||
return defHttp.get(
|
|
||||||
{
|
|
||||||
url: Api.list,
|
|
||||||
params,
|
|
||||||
headers: {
|
|
||||||
'X-Access-Token': token,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
apiUrl: stServerUrl,
|
|
||||||
withToken: false,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
-202
@@ -1,202 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="mapPage">
|
|
||||||
<div>
|
|
||||||
<a-spin :spinning="loading">
|
|
||||||
<div id="maps"></div>
|
|
||||||
</a-spin>
|
|
||||||
|
|
||||||
<search-modal @register="registerSearchModal" @search="submitSearch" />
|
|
||||||
|
|
||||||
<map-drawer ref="mapDrawerRef" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" name="staff-canteen-map" setup>
|
|
||||||
import { nextTick, onMounted, ref } from 'vue';
|
|
||||||
import mapKey from '/@/utils/mapKey';
|
|
||||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
|
||||||
import { list } from './mapPage.api';
|
|
||||||
import MapDrawer from '../mapDrawer/mapDrawer.vue';
|
|
||||||
import canteenIcon from '/@/assets/images/canteenIcon.png';
|
|
||||||
import SearchModal from '../mapSearch/mapSearch.vue';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
|
|
||||||
const [registerSearchModal, { openModal: openSearchModal }] = useModal();
|
|
||||||
|
|
||||||
const loading = ref<any>(true);
|
|
||||||
const maps = ref<any>(null);
|
|
||||||
let selfMap = null;
|
|
||||||
const markerList = ref<any>([]);
|
|
||||||
const searchInfos = ref<any>({});
|
|
||||||
const mapDrawerRef = ref<any>(null);
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
|
|
||||||
const openSearch = () => {
|
|
||||||
openSearchModal(true, {
|
|
||||||
searchParams: searchInfos.value,
|
|
||||||
isUpdate: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const submitSearch = (params) => {
|
|
||||||
searchInfos.value = params;
|
|
||||||
getList();
|
|
||||||
};
|
|
||||||
|
|
||||||
const getList = () => {
|
|
||||||
list(searchInfos.value).then((res) => {
|
|
||||||
markerList.value = res;
|
|
||||||
loading.value = false;
|
|
||||||
nextTick(() => {
|
|
||||||
initMap();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const initMap = () => {
|
|
||||||
AMapLoader.load({
|
|
||||||
key: mapKey,
|
|
||||||
version: '2.0',
|
|
||||||
plugins: ['AMap.ToolBar', 'AMap.Scale', 'AMap.ControlBar', 'AMap.Geocoder', 'AMap.Geolocation'],
|
|
||||||
})
|
|
||||||
.then((AMap) => {
|
|
||||||
selfMap = AMap;
|
|
||||||
let lng: any = [];
|
|
||||||
let lat: any = [];
|
|
||||||
let center: any = null;
|
|
||||||
if (markerList.value && markerList.value.length) {
|
|
||||||
markerList.value.map((item) => {
|
|
||||||
lng.push(Number(item.addressLongitude));
|
|
||||||
lat.push(Number(item.addressLatitude));
|
|
||||||
});
|
|
||||||
if (markerList.value.length === 1) {
|
|
||||||
center = [lng[0], lat[0]];
|
|
||||||
} else {
|
|
||||||
center = getCenter(
|
|
||||||
lng.sort((a, b) => {
|
|
||||||
return a - b;
|
|
||||||
}),
|
|
||||||
lat.sort((a, b) => {
|
|
||||||
return a - b;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
maps.value = new AMap.Map('maps', {
|
|
||||||
center: center,
|
|
||||||
zoom: 9,
|
|
||||||
viewMode: '3D',
|
|
||||||
resizeEnable: true,
|
|
||||||
pitchEnable: true,
|
|
||||||
convert: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
maps.value.addControl(new AMap.ToolBar());
|
|
||||||
maps.value.addControl(new AMap.Scale());
|
|
||||||
maps.value.addControl(new AMap.ControlBar());
|
|
||||||
|
|
||||||
addMarkerList();
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const addMarkerList = () => {
|
|
||||||
if (markerList.value.length === 0) {
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
let marker: any;
|
|
||||||
markerList.value = markerList.value.map((item) => {
|
|
||||||
marker = new selfMap.Marker({
|
|
||||||
position: new selfMap.LngLat(Number(item.addressLongitude), Number(item.addressLatitude)),
|
|
||||||
icon: new selfMap.Icon({
|
|
||||||
image: canteenIcon,
|
|
||||||
size: new selfMap.Size(0, 0),
|
|
||||||
imageSize: new selfMap.Size(0, 0),
|
|
||||||
}),
|
|
||||||
label: {
|
|
||||||
content: `<div style="display: flex; cursor: pointer;">
|
|
||||||
<img src="${canteenIcon}" style="height: 15px;width: 15px; margin-right: 3px" alt=""/>
|
|
||||||
<div>${item.restName}</div>
|
|
||||||
</div>`,
|
|
||||||
icon: null,
|
|
||||||
offset: new selfMap.Pixel(0, 27),
|
|
||||||
direction: 'top',
|
|
||||||
},
|
|
||||||
maxZoom: 8,
|
|
||||||
});
|
|
||||||
marker.info = item;
|
|
||||||
marker.on('click', markerClick);
|
|
||||||
return marker;
|
|
||||||
});
|
|
||||||
maps.value.add(markerList.value);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const getCenter = (lng, lat) => {
|
|
||||||
let lngCenter = (lng[0] + lng[lng.length - 1]) / 2;
|
|
||||||
let latCenter = (lat[0] + lat[lat.length - 1]) / 2;
|
|
||||||
return [lngCenter, latCenter];
|
|
||||||
};
|
|
||||||
|
|
||||||
const markerClick = (e) => {
|
|
||||||
if (mapDrawerRef.value) {
|
|
||||||
mapDrawerRef.value.openDrawer(e.target.info.id);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// const removeMarker = () => {
|
|
||||||
// markerList.value.map((item) => {
|
|
||||||
// item.setMap(null);
|
|
||||||
// });
|
|
||||||
// markerList.value = [];
|
|
||||||
// };
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
openSearch,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.mapPage {
|
|
||||||
position: absolute;
|
|
||||||
left: 10px;
|
|
||||||
width: calc(100% - 20px);
|
|
||||||
height: calc(100% - 135px);
|
|
||||||
top: 125px;
|
|
||||||
|
|
||||||
:deep(.ant-spin-nested-loading),
|
|
||||||
:deep(.ant-spin-container) {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
> div {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 8px;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
position: relative;
|
|
||||||
background-color: #ffffff;
|
|
||||||
|
|
||||||
#maps {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
:deep(.amap-marker-label) {
|
|
||||||
background-color: #58a55c !important;
|
|
||||||
padding: 5px 10px !important;
|
|
||||||
border-radius: 5px !important;
|
|
||||||
color: #ffffff !important;
|
|
||||||
border-color: #58a55c !important;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
import { stServerUrl } from '/@/utils/http/stRequestToken/serverUrl';
|
|
||||||
import { getStToken } from '/@/utils/http/stRequestToken';
|
|
||||||
|
|
||||||
export enum Api {
|
|
||||||
info = '/foodNourishmentReport/oneCanteenInfo',
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表接口
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const getInfo = async (params) => {
|
|
||||||
const token = await getStToken({});
|
|
||||||
return defHttp.get(
|
|
||||||
{
|
|
||||||
url: Api.info,
|
|
||||||
params,
|
|
||||||
headers: {
|
|
||||||
'X-Access-Token': token,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
apiUrl: stServerUrl,
|
|
||||||
withToken: false,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
-162
@@ -1,162 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="canteenDom" v-if="isExpanded">
|
|
||||||
<div class="domRelative">
|
|
||||||
<div class="bg" @click="close"></div>
|
|
||||||
<div class="info">
|
|
||||||
<div class="infoHead">
|
|
||||||
<div>食堂信息</div>
|
|
||||||
<div @click="close">X</div>
|
|
||||||
</div>
|
|
||||||
<a-spin :spinning="loading">
|
|
||||||
<div class="infoBody">
|
|
||||||
<template v-if="canteenInfo">
|
|
||||||
<p>食堂名称:{{ canteenInfo.restName }}</p>
|
|
||||||
<p>详细地址:{{ canteenInfo.restAddr }}</p>
|
|
||||||
<p>营养监控设备台数:{{ canteenInfo.deviceNum }}</p>
|
|
||||||
<p
|
|
||||||
>设备运行状态(异常/正常):<span style="color: red">{{ canteenInfo.abnormalNum }}</span
|
|
||||||
>/<span style="color: green">{{ canteenInfo.normalNum }}</span></p
|
|
||||||
>
|
|
||||||
<p>开展营养监控人数:{{ canteenInfo.eatPersonNum }}</p>
|
|
||||||
<p>食堂用餐人数:{{ canteenInfo.userNum }}</p>
|
|
||||||
<p>每日平均热量(kcal):{{ canteenInfo.energy }}</p>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
<div class="infoFoot">
|
|
||||||
<a-button type="primary" @click="openGui">查看食堂设备</a-button>
|
|
||||||
</div>
|
|
||||||
</a-spin>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
const route = useRoute();
|
|
||||||
const router = useRouter();
|
|
||||||
import { getInfo } from './mapDrawer.api';
|
|
||||||
|
|
||||||
const loading = ref<any>(true);
|
|
||||||
const isExpanded = ref<any>(false);
|
|
||||||
const canteenId = ref<any>(null);
|
|
||||||
const canteenInfo = ref<any>(null);
|
|
||||||
const openDrawer = (id) => {
|
|
||||||
canteenInfo.value = null;
|
|
||||||
canteenId.value = id;
|
|
||||||
isExpanded.value = true;
|
|
||||||
open();
|
|
||||||
};
|
|
||||||
|
|
||||||
const open = () => {
|
|
||||||
loading.value = true;
|
|
||||||
let params = {
|
|
||||||
canteenId: canteenId.value,
|
|
||||||
};
|
|
||||||
getInfo(params).then((res) => {
|
|
||||||
loading.value = false;
|
|
||||||
canteenInfo.value = res;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const close = () => {
|
|
||||||
isExpanded.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
const openGui = () => {
|
|
||||||
router.push({
|
|
||||||
path: route.path,
|
|
||||||
query: {
|
|
||||||
pageType: 'gui',
|
|
||||||
secondDepartId: canteenInfo.value.secondDepartId,
|
|
||||||
departId: canteenInfo.value.departId,
|
|
||||||
canteenId: canteenInfo.value.canteenId,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
openDrawer,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
#canteenDom {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
position: absolute;
|
|
||||||
|
|
||||||
.domRelative {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.bg {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background-color: rgba(0, 0, 0,.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.info {
|
|
||||||
width: 400px;
|
|
||||||
position: absolute;
|
|
||||||
transition: width 0.5s ease;
|
|
||||||
z-index: 3;
|
|
||||||
top: 15px;
|
|
||||||
bottom: 15px;
|
|
||||||
//right: -415px;
|
|
||||||
right: 15px;
|
|
||||||
overflow: hidden;
|
|
||||||
border-radius: 10px;
|
|
||||||
background-color: #ffffff;
|
|
||||||
|
|
||||||
.infoHead {
|
|
||||||
width: 100%;
|
|
||||||
height: 60px;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding-left: 20px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: rgba(180, 199, 231);
|
|
||||||
|
|
||||||
> div:nth-of-type(1) {
|
|
||||||
height: 60px;
|
|
||||||
font-size: 18px;
|
|
||||||
line-height: 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
> div:nth-of-type(2) {
|
|
||||||
height: 60px;
|
|
||||||
font-size: 18px;
|
|
||||||
line-height: 60px;
|
|
||||||
padding: 0 20px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.infoBody {
|
|
||||||
width: 100%;
|
|
||||||
min-height: 200px;
|
|
||||||
padding: 20px 30px 50px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.infoFoot {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-expanded {
|
|
||||||
right: 15px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
import { stServerUrl } from '/@/utils/http/stRequestToken/serverUrl';
|
|
||||||
import { getStToken } from '/@/utils/http/stRequestToken';
|
|
||||||
|
|
||||||
export enum Api {
|
|
||||||
canteenDepartNameList = '/foodNourishmentReport/getCanteenDepartNameList',
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 部门
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const getCanteenDepartNameList = async (params) => {
|
|
||||||
const token = await getStToken({});
|
|
||||||
return defHttp.get(
|
|
||||||
{
|
|
||||||
url: Api.canteenDepartNameList,
|
|
||||||
params,
|
|
||||||
headers: {
|
|
||||||
'X-Access-Token': token,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
apiUrl: stServerUrl,
|
|
||||||
withToken: false,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
import { FormSchema } from '/@/components/Table';
|
|
||||||
import { getCanteenDepartNameList } from './mapSearch.api';
|
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '单位部门',
|
|
||||||
required: true,
|
|
||||||
field: 'departId',
|
|
||||||
component: 'ApiSelect',
|
|
||||||
componentProps: {
|
|
||||||
api: getCanteenDepartNameList,
|
|
||||||
params: {
|
|
||||||
orgCode: useUserStore()?.getUserInfo.orgCode,
|
|
||||||
},
|
|
||||||
labelField: 'departName',
|
|
||||||
valueField: 'departId',
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
-63
@@ -1,63 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<BasicModal
|
|
||||||
v-bind="$attrs"
|
|
||||||
title="员工食堂 - 基本查询"
|
|
||||||
@register="registerModal"
|
|
||||||
:width="600"
|
|
||||||
:minHeight="100"
|
|
||||||
:maskClosable="true"
|
|
||||||
@cancel="handleCancel"
|
|
||||||
cancelText="重置"
|
|
||||||
@ok="handleSubmit"
|
|
||||||
okText="查询"
|
|
||||||
>
|
|
||||||
<BasicForm ref="formRef" @register="registerForm" />
|
|
||||||
|
|
||||||
<template #footer>
|
|
||||||
<a-button @click="handleReset">重置</a-button>
|
|
||||||
<a-button type="primary" @click="handleSubmit">查询</a-button>
|
|
||||||
</template>
|
|
||||||
</BasicModal>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
||||||
import { useForm, BasicForm } from '/@/components/Form';
|
|
||||||
import { searchFormSchema } from './mapSearch.data';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
const emit = defineEmits(['search']);
|
|
||||||
|
|
||||||
const [registerModal, { closeModal }] = useModalInner(async (data) => {
|
|
||||||
if (data.searchParams) {
|
|
||||||
await setFieldsValue(data.searchParams);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerForm, { getFieldsValue, setFieldsValue, resetFields }] = useForm({
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
const handleCancel = () => {
|
|
||||||
closeModal();
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleReset = () => {
|
|
||||||
resetFields();
|
|
||||||
emit('search', {});
|
|
||||||
closeModal();
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleSubmit = () => {
|
|
||||||
let data = getFieldsValue();
|
|
||||||
if (JSON.stringify(data) === '{}') {
|
|
||||||
message.warning('查询条件不能为空');
|
|
||||||
} else {
|
|
||||||
emit('search', data);
|
|
||||||
closeModal();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
-72
@@ -1,72 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
import { stServerUrl } from '/@/utils/http/stRequestToken/serverUrl';
|
|
||||||
import { getStToken } from '/@/utils/http/stRequestToken';
|
|
||||||
|
|
||||||
export enum Api {
|
|
||||||
list = '/foodNourishmentReport/userCanteenDepart',
|
|
||||||
total = '/foodNourishmentReport/totalCanteenNum',
|
|
||||||
canteenOneDepartList = '/foodNourishmentReport/userCanteenOneDepartList',
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表接口
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const list = async (params) => {
|
|
||||||
const token = await getStToken({});
|
|
||||||
return defHttp.get(
|
|
||||||
{
|
|
||||||
url: Api.list,
|
|
||||||
params,
|
|
||||||
headers: {
|
|
||||||
'X-Access-Token': token,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
apiUrl: stServerUrl,
|
|
||||||
withToken: false,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表接口
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const totalCanteenNum = async (params) => {
|
|
||||||
const token = await getStToken({});
|
|
||||||
return defHttp.get(
|
|
||||||
{
|
|
||||||
url: Api.total,
|
|
||||||
params,
|
|
||||||
headers: {
|
|
||||||
'X-Access-Token': token,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
apiUrl: stServerUrl,
|
|
||||||
withToken: false,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 列表接口
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const userCanteenOneDepartList = async (params) => {
|
|
||||||
const token = await getStToken({});
|
|
||||||
return defHttp.get(
|
|
||||||
{
|
|
||||||
url: Api.canteenOneDepartList,
|
|
||||||
params,
|
|
||||||
headers: {
|
|
||||||
'X-Access-Token': token,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
apiUrl: stServerUrl,
|
|
||||||
withToken: false,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
-59
@@ -1,59 +0,0 @@
|
|||||||
import { BasicColumn } from '/@/components/Table';
|
|
||||||
|
|
||||||
//列表数据
|
|
||||||
export const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'index',
|
|
||||||
width: 80,
|
|
||||||
customRender: ({ index }): any => {
|
|
||||||
return index + 1;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '单位',
|
|
||||||
align: 'left',
|
|
||||||
width: 300,
|
|
||||||
dataIndex: 'departName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'canteenNum',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
//列表数据
|
|
||||||
export const columns_: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '食堂名称',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'restName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '管理部门',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'departName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '营养监控设备台数',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'deviceNum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '设备运行状态(异常/正常)',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'deviceStatus',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '开展营养监控人数',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'eatPersonNum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '食堂就餐人数',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'personNum',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
-183
@@ -1,183 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<BasicTable @register="registerTable">
|
|
||||||
<template #headerCell="{ column }">
|
|
||||||
<div class="headerTitle">
|
|
||||||
<template v-if="column.dataIndex === 'canteenNum'"> 食堂数量(总数量:{{ total }}) </template>
|
|
||||||
<template v-else>{{ column.customTitle }}</template>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.dataIndex === 'departName'">
|
|
||||||
<div style="display: flex; align-items: center">
|
|
||||||
<Icon
|
|
||||||
:style="{
|
|
||||||
color: expandedRowKeys.includes(record.departId) ? '#1890ff' : '#333333',
|
|
||||||
cursor: 'pointer',
|
|
||||||
padding: '0 5px',
|
|
||||||
}"
|
|
||||||
:icon="expandedRowKeys.includes(record.departId) ? 'ant-design:minus-circle-outlined' : 'ant-design:plus-circle-outlined'"
|
|
||||||
/>
|
|
||||||
{{ record.departName }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<template #expandedRowRender="{ record }">
|
|
||||||
<div class="expandedRow">
|
|
||||||
<a-table bordered :columns="columns_" :dataSource="record.childrens" :indentSize="0" :pagination="false">
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.dataIndex === 'deviceNum'">
|
|
||||||
<a>{{ record.deviceNum }}</a>
|
|
||||||
</template>
|
|
||||||
<template v-if="column.dataIndex === 'deviceStatus'">
|
|
||||||
<span style="color: red">{{ record.abnormalNum }}</span
|
|
||||||
>/<span style="color: green">{{ record.normalNum }}</span>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</a-table>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
|
|
||||||
<search-modal @register="registerSearchModal" @search="submitSearch" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" name="staff-canteen-table" setup>
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import { BasicTable } from '/@/components/Table';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import { columns, columns_ } from './tablePage.data';
|
|
||||||
import { list, totalCanteenNum, userCanteenOneDepartList } from './tablePage.api';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
|
||||||
import SearchModal from '../tableSearch/tableSearch.vue';
|
|
||||||
|
|
||||||
const total = ref<any>(0);
|
|
||||||
const searchInfos = ref<any>({});
|
|
||||||
const expandedRowKeys = ref<any>([]);
|
|
||||||
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
title: '员工食堂Table',
|
|
||||||
api: list,
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
params.orgCode = useUserStore()?.getUserInfo.orgCode;
|
|
||||||
},
|
|
||||||
afterFetch: async (data) => {
|
|
||||||
data.map((item, index) => {
|
|
||||||
item.i = index;
|
|
||||||
item.childrens = [];
|
|
||||||
});
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
columns,
|
|
||||||
rowKey: 'departId',
|
|
||||||
useSearchForm: false,
|
|
||||||
showTableSetting: false,
|
|
||||||
clickToRowSelect: false,
|
|
||||||
showActionColumn: false,
|
|
||||||
isTreeTable: true,
|
|
||||||
expandRowByClick: true,
|
|
||||||
expandIconColumnIndex: -1,
|
|
||||||
onExpand(expand, record) {
|
|
||||||
if (expand) {
|
|
||||||
setLoading(true);
|
|
||||||
getCanteenOneDepartList(record);
|
|
||||||
} else {
|
|
||||||
let i = expandedRowKeys.value.indexOf(record.departId);
|
|
||||||
expandedRowKeys.value.splice(i, 1);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerTable, { reload, setProps, collapseAll, setLoading, getDataSource }] = tableContext;
|
|
||||||
|
|
||||||
const [registerSearchModal, { openModal: openSearchModal }] = useModal();
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
getTotalCanteenNum();
|
|
||||||
});
|
|
||||||
|
|
||||||
const openSearch = () => {
|
|
||||||
openSearchModal(true, {
|
|
||||||
searchParams: searchInfos.value,
|
|
||||||
isUpdate: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const submitSearch = (params) => {
|
|
||||||
clearExpanded();
|
|
||||||
searchInfos.value = params;
|
|
||||||
setProps({
|
|
||||||
searchInfo: searchInfos.value,
|
|
||||||
});
|
|
||||||
reload({
|
|
||||||
page: 1,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const getTotalCanteenNum = () => {
|
|
||||||
let params = {};
|
|
||||||
totalCanteenNum(params).then((res) => {
|
|
||||||
total.value = res;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const getCanteenOneDepartList = (record) => {
|
|
||||||
let data = getDataSource();
|
|
||||||
data[record.i].childrens = [];
|
|
||||||
let params = {
|
|
||||||
departId: record.departId,
|
|
||||||
};
|
|
||||||
userCanteenOneDepartList(params).then((res) => {
|
|
||||||
setLoading(false);
|
|
||||||
data[record.i].childrens = res;
|
|
||||||
expandedRowKeys.value.push(record.departId);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const clearExpanded = () => {
|
|
||||||
expandedRowKeys.value = [];
|
|
||||||
collapseAll();
|
|
||||||
};
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
openSearch,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.headerTitle {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.jeecg-basic-table .ant-table-wrapper .ant-table-title) {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-table-expanded-row > .ant-table-cell) {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-table.ant-table-middle .ant-table-tbody .ant-table-wrapper:only-child .ant-table) {
|
|
||||||
margin: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.expandedRow {
|
|
||||||
padding-left: 79px;
|
|
||||||
|
|
||||||
:deep(.ant-table-wrapper) {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table) {
|
|
||||||
border-top: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table > tbody > .ant-table-row:last-of-type > td) {
|
|
||||||
border-bottom: none !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
import { stServerUrl } from '/@/utils/http/stRequestToken/serverUrl';
|
|
||||||
import { getStToken } from '/@/utils/http/stRequestToken';
|
|
||||||
|
|
||||||
export enum Api {
|
|
||||||
canteenDepartNameList = '/foodNourishmentReport/getCanteenDepartNameList',
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 部门
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
export const getCanteenDepartNameList = async (params) => {
|
|
||||||
const token = await getStToken({});
|
|
||||||
return defHttp.get(
|
|
||||||
{
|
|
||||||
url: Api.canteenDepartNameList,
|
|
||||||
params,
|
|
||||||
headers: {
|
|
||||||
'X-Access-Token': token,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
apiUrl: stServerUrl,
|
|
||||||
withToken: false,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
import { FormSchema } from '/@/components/Table';
|
|
||||||
import { getCanteenDepartNameList } from './tableSearch.api';
|
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
|
||||||
{
|
|
||||||
label: '单位部门',
|
|
||||||
required: true,
|
|
||||||
field: 'departId',
|
|
||||||
component: 'ApiSelect',
|
|
||||||
componentProps: {
|
|
||||||
api: getCanteenDepartNameList,
|
|
||||||
params: {
|
|
||||||
orgCode: useUserStore()?.getUserInfo.orgCode,
|
|
||||||
},
|
|
||||||
labelField: 'departName',
|
|
||||||
valueField: 'departId',
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '食堂数量',
|
|
||||||
field: 'canteenNumAndCanteenNumType',
|
|
||||||
component: 'InputGroup',
|
|
||||||
slot: 'canteenNumAndCanteenNumType',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
-123
@@ -1,123 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<BasicModal
|
|
||||||
v-bind="$attrs"
|
|
||||||
title="员工食堂 - 基本查询"
|
|
||||||
@register="registerModal"
|
|
||||||
:width="600"
|
|
||||||
:minHeight="100"
|
|
||||||
:maskClosable="true"
|
|
||||||
@cancel="handleCancel"
|
|
||||||
cancelText="重置"
|
|
||||||
@ok="handleSubmit"
|
|
||||||
okText="查询"
|
|
||||||
>
|
|
||||||
<BasicForm ref="formRef" @register="registerForm">
|
|
||||||
<template #canteenNumAndCanteenNumType="{ model }">
|
|
||||||
<a-form-item :auto-link="false" style="margin-bottom: 0">
|
|
||||||
<a-input-group style="display: flex">
|
|
||||||
<a-select
|
|
||||||
allowClear
|
|
||||||
placeholder="请选择"
|
|
||||||
@change="selectChange(model, 'canteenNum')"
|
|
||||||
v-model:value="model['canteenNumType']"
|
|
||||||
style="min-width: 100px"
|
|
||||||
>
|
|
||||||
<a-select-option :value="2">大于</a-select-option>
|
|
||||||
<a-select-option :value="3">小于</a-select-option>
|
|
||||||
<a-select-option :value="6">范围</a-select-option>
|
|
||||||
<a-select-option :value="1">等于</a-select-option>
|
|
||||||
<a-select-option :value="4">大于等于</a-select-option>
|
|
||||||
<a-select-option :value="5">小于等于</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
<template v-if="model['canteenNumType'] === 6">
|
|
||||||
<a-input-group style="display: flex; align-items: center">
|
|
||||||
<a-input v-model:value="model['canteenNumMin']" style="flex: 1" placeholder="请输入最小值" />
|
|
||||||
<Icon style="color: rgba(0, 0, 0, 0.25); padding: 0 8px" icon="ant-design:line-outlined" />
|
|
||||||
<a-input v-model:value="model['canteenNumMax']" style="flex: 1" placeholder="请输入最大值" />
|
|
||||||
</a-input-group>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<a-input v-model:value="model['canteenNumMin']" style="flex: 1" placeholder="请输入食堂数量" />
|
|
||||||
</template>
|
|
||||||
</a-input-group>
|
|
||||||
</a-form-item>
|
|
||||||
</template>
|
|
||||||
</BasicForm>
|
|
||||||
|
|
||||||
<template #footer>
|
|
||||||
<a-button @click="handleReset">重置</a-button>
|
|
||||||
<a-button type="primary" @click="handleSubmit">查询</a-button>
|
|
||||||
</template>
|
|
||||||
</BasicModal>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
||||||
import { useForm, BasicForm } from '/@/components/Form';
|
|
||||||
import { searchFormSchema } from './tableSearch.data';
|
|
||||||
import { message } from 'ant-design-vue';
|
|
||||||
const emit = defineEmits(['search']);
|
|
||||||
|
|
||||||
const [registerModal, { closeModal }] = useModalInner(async (data) => {
|
|
||||||
if (data.searchParams) {
|
|
||||||
await setFieldsValue(data.searchParams);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerForm, { getFieldsValue, setFieldsValue, resetFields }] = useForm({
|
|
||||||
schemas: searchFormSchema,
|
|
||||||
autoSubmitOnEnter: true,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
const handleCancel = () => {
|
|
||||||
closeModal();
|
|
||||||
};
|
|
||||||
|
|
||||||
const selectChange = (model: any, key: string) => {
|
|
||||||
model[key + 'Min'] = '';
|
|
||||||
model[key + 'Max'] = '';
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleReset = () => {
|
|
||||||
resetFields();
|
|
||||||
emit('search', {});
|
|
||||||
closeModal();
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleSubmit = () => {
|
|
||||||
let data = getFieldsValue();
|
|
||||||
if (JSON.stringify(data) === '{}') {
|
|
||||||
message.warning('查询条件不能为空');
|
|
||||||
} else {
|
|
||||||
let canteenNum = verifyValue(data, 'canteenNumType', 'canteenNum', '摄入热量');
|
|
||||||
if (canteenNum) {
|
|
||||||
emit('search', data);
|
|
||||||
closeModal();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const verifyValue = (data, type, key, text) => {
|
|
||||||
if (data[type]) {
|
|
||||||
if (data[type] === 6) {
|
|
||||||
if (!data[key + 'Min']) {
|
|
||||||
message.warning('请输入查询' + text + '的区间范围最小值');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!data[key + 'Max']) {
|
|
||||||
message.warning('请输入查询' + text + '的区间范围最大值');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!data[key + 'Min']) {
|
|
||||||
message.warning('请输入查询' + text + '值');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
-92
@@ -1,92 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="page">
|
|
||||||
<template v-if="pageType === 'list'">
|
|
||||||
<div class="pageTitle">长庆油田营养监控食堂</div>
|
|
||||||
|
|
||||||
<div class="pageBtn">
|
|
||||||
<a-space :size="12">
|
|
||||||
<a-button type="primary" @click="search">查询</a-button>
|
|
||||||
</a-space>
|
|
||||||
|
|
||||||
<a-input-group style="width: auto; display: flex">
|
|
||||||
<a-radio-group v-model:value="type" button-style="solid">
|
|
||||||
<a-radio-button value="tablePageRef">表格</a-radio-button>
|
|
||||||
<a-radio-button value="mapPageRef">地图</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
</a-input-group>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<template v-if="type === 'tablePageRef'">
|
|
||||||
<table-page ref="tablePageRef" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-if="type === 'mapPageRef'">
|
|
||||||
<map-page ref="mapPageRef" />
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<template v-if="pageType === 'gui'">
|
|
||||||
<gui-modal />
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" name="staff-canteen" setup>
|
|
||||||
import { ref, watch } from 'vue';
|
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
const route = useRoute();
|
|
||||||
import TablePage from './components/table/tablePage.vue';
|
|
||||||
import MapPage from './components/map/mapPage.vue';
|
|
||||||
import GuiModal from './components/gui/gui.vue';
|
|
||||||
|
|
||||||
const pageType = ref<any>('list');
|
|
||||||
|
|
||||||
const type = ref<any>('tablePageRef');
|
|
||||||
const tablePageRef = ref<any>(null);
|
|
||||||
const mapPageRef = ref<any>(null);
|
|
||||||
|
|
||||||
const search = () => {
|
|
||||||
let typeFun = eval(type.value);
|
|
||||||
if (typeFun.value) {
|
|
||||||
typeFun.value.openSearch();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => route,
|
|
||||||
() => {
|
|
||||||
pageType.value = Boolean(route.query.pageType) ? route.query.pageType : 'list';
|
|
||||||
},
|
|
||||||
{ deep: true, immediate: true }
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.page {
|
|
||||||
height: 100%;
|
|
||||||
padding: 10px;
|
|
||||||
|
|
||||||
.pageTitle {
|
|
||||||
color: #252535;
|
|
||||||
width: 100%;
|
|
||||||
height: 72px;
|
|
||||||
font-size: 26px;
|
|
||||||
line-height: 72px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pageBtn {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.headerTitle {
|
|
||||||
height: 48px;
|
|
||||||
line-height: 48px;
|
|
||||||
padding: 0 8px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicModal
|
|
||||||
@register="registerModal"
|
|
||||||
title="监测数据"
|
|
||||||
width="80%"
|
|
||||||
destoryOnClose
|
|
||||||
@cancel="closeModal"
|
|
||||||
:bodyStyle="{ height: 'calc(100vh * 0.7)', overflow: 'hidden auto' }"
|
|
||||||
>
|
|
||||||
<indoor-page style="height: calc(80vh - 160px)" v-if="typeId == 0 && meterCode" :meter-code="meterCode" />
|
|
||||||
<outer-page style="height: calc(80vh - 160px)" v-if="typeId == 1 && meterCode" :meterCode="meterCode" />
|
|
||||||
<water-page style="height: calc(80vh - 160px)" v-if="typeId == 3 && meterCode" :meterCode="meterCode" />
|
|
||||||
<pollen-page style="height: calc(80vh - 160px)" v-if="typeId == 2 && meterCode" :meterCode="meterCode" />
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicModal from '/@/components/Modal/src/BasicModal.vue';
|
|
||||||
import indoorPage from '/@/views/interveneNew/environment/inner/dataAnalysis/indexSon.vue';
|
|
||||||
import outerPage from '/@/views/interveneNew/environment/outer/dataAnalysis/indexSon.vue';
|
|
||||||
import waterPage from '/@/views/interveneNew/environment/water/dataAnalysis/indexSon.vue';
|
|
||||||
import pollenPage from '/@/views/interveneNew/environment/pollen/dataAnalysis/indexSon.vue';
|
|
||||||
import { useModalInner } from '/@/components/Modal';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
const typeId = ref(0);
|
|
||||||
const meterCode = ref('');
|
|
||||||
const emit = defineEmits(['closeModal']);
|
|
||||||
|
|
||||||
const [registerModal, { setModalProps }] = useModalInner(async (data) => {
|
|
||||||
setModalProps({ showOkBtn: false, showCancelBtn: false });
|
|
||||||
typeId.value = data.typeId;
|
|
||||||
meterCode.value = data.meterCode;
|
|
||||||
});
|
|
||||||
|
|
||||||
function closeModal() {
|
|
||||||
typeId.value = -1;
|
|
||||||
emit('closeModal');
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
:deep(.ant-modal-header) {
|
|
||||||
background-color: red;
|
|
||||||
}
|
|
||||||
:deep(.container) {
|
|
||||||
overflow: hidden !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,235 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="container" style="position: relative"> </div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
|
||||||
import mapKey from '/@/utils/mapKey';
|
|
||||||
import { onMounted, ref, watch } from 'vue';
|
|
||||||
|
|
||||||
const emit = defineEmits(['getMarkerInfo', 'getDetail']);
|
|
||||||
|
|
||||||
const record = ref({});
|
|
||||||
|
|
||||||
let BasicMap = null;
|
|
||||||
let SelfMap = null;
|
|
||||||
let marker = null;
|
|
||||||
const props = defineProps({
|
|
||||||
mapList: {
|
|
||||||
type: Array<any>,
|
|
||||||
default: () => [],
|
|
||||||
},
|
|
||||||
centerPosition: {
|
|
||||||
type: Array<any>,
|
|
||||||
default: () => [108.95, 34.33],
|
|
||||||
},
|
|
||||||
markerContent: {
|
|
||||||
type: String,
|
|
||||||
default: () =>
|
|
||||||
'<div><img style="width: 20px;height: 20px" src="//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png" alt=""></div>',
|
|
||||||
},
|
|
||||||
labelContent: {
|
|
||||||
type: String,
|
|
||||||
default: () => '<div></div>',
|
|
||||||
},
|
|
||||||
field: {
|
|
||||||
type: String,
|
|
||||||
default: () => '',
|
|
||||||
},
|
|
||||||
id: {
|
|
||||||
type: String,
|
|
||||||
default: () => 'id',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.mapList,
|
|
||||||
(nV) => {
|
|
||||||
if (SelfMap) {
|
|
||||||
addMarker(nV);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ immediate: true }
|
|
||||||
);
|
|
||||||
|
|
||||||
function initMap(mapList) {
|
|
||||||
AMapLoader.load({
|
|
||||||
key: mapKey, // 申请好的Web端开发者Key,首次调用 load 时必填
|
|
||||||
// version: '1.4.15', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
||||||
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
||||||
plugins: ['AMap.Geocoder'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
|
||||||
})
|
|
||||||
.then((AMap) => {
|
|
||||||
SelfMap = AMap;
|
|
||||||
|
|
||||||
//设置地图容器id
|
|
||||||
BasicMap = new AMap.Map('container', {
|
|
||||||
viewMode: '3D', //是否为3D地图模式
|
|
||||||
zoom: 8, //初始化地图级别
|
|
||||||
center: getCenterP(mapList), //初始化地图中心点位置
|
|
||||||
resizeEnable: true,
|
|
||||||
});
|
|
||||||
addMarker(mapList);
|
|
||||||
|
|
||||||
let logo1 = document.getElementsByClassName('amap-logo')[0];
|
|
||||||
if (logo1) {
|
|
||||||
// 将logo位置设置在视野之外
|
|
||||||
logo1.style.position = 'absolute';
|
|
||||||
logo1.style.left = '-1000px';
|
|
||||||
}
|
|
||||||
let logo2 = document.getElementsByClassName('amap-copyright')[0];
|
|
||||||
if (logo2) {
|
|
||||||
// 将logo位置设置在视野之外
|
|
||||||
logo2.style.position = 'absolute';
|
|
||||||
logo2.style.left = '-1000px';
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function getCenterP(mapList) {
|
|
||||||
let lng = [];
|
|
||||||
let lat = [];
|
|
||||||
mapList.map((item: any) => {
|
|
||||||
lng.push(item.longitude * 1);
|
|
||||||
lat.push(item.latitude * 1);
|
|
||||||
});
|
|
||||||
if (mapList.length === 1) {
|
|
||||||
return [lng[0], lat[0]];
|
|
||||||
}
|
|
||||||
if (mapList.length > 1) {
|
|
||||||
return getCenter(
|
|
||||||
lng.sort((a, b) => {
|
|
||||||
return a - b;
|
|
||||||
}),
|
|
||||||
lat.sort((a, b) => {
|
|
||||||
return a - b;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return props.centerPosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectInfo(v) {
|
|
||||||
try {
|
|
||||||
if (v && Object.keys(JSON.parse(v)).length > 0) {
|
|
||||||
const { longitude, latitude } = JSON.parse(v);
|
|
||||||
record.value = JSON.parse(v);
|
|
||||||
if (latitude && latitude) {
|
|
||||||
let lngLat = new SelfMap.LngLat(longitude, latitude);
|
|
||||||
BasicMap.setCenter(lngLat);
|
|
||||||
BasicMap.setZoom(12);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let markerList = [];
|
|
||||||
function addMarker(list) {
|
|
||||||
removeMarker();
|
|
||||||
if (list.length === 0) return;
|
|
||||||
BasicMap.setCenter(getCenterP(list));
|
|
||||||
let marker = null;
|
|
||||||
markerList = list.map((item: any) => {
|
|
||||||
marker = new SelfMap.Marker({
|
|
||||||
position: new SelfMap.LngLat(item.longitude * 1, item.latitude * 1),
|
|
||||||
content: props.markerContent ? props.markerContent.replace('^&', item[props.field]) : item?.markerContent,
|
|
||||||
// icon: medicalResource,
|
|
||||||
maxZoom: 8,
|
|
||||||
});
|
|
||||||
marker.info = item;
|
|
||||||
marker.on('click', markerClick);
|
|
||||||
return marker;
|
|
||||||
});
|
|
||||||
BasicMap.add(markerList);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.getDetail = () => {
|
|
||||||
event?.stopPropagation();
|
|
||||||
emit('getDetail', record.value);
|
|
||||||
};
|
|
||||||
function getCenter(lng, lat) {
|
|
||||||
let lngCenter = (lng[0] + lng[lng.length - 1]) / 2;
|
|
||||||
let latCenter = (lat[0] + lat[lat.length - 1]) / 2;
|
|
||||||
return [lngCenter, latCenter];
|
|
||||||
// let centerLngLat = new SelfMap.LngLat(lngCenter, latCenter);
|
|
||||||
// BasicMap.setCenter(centerLngLat); // 设置地图中心点坐标
|
|
||||||
}
|
|
||||||
function markerClick(e) {
|
|
||||||
if (marker?.info[props.id] !== e.target?.info[props.id]) {
|
|
||||||
if (marker) {
|
|
||||||
marker.setLabel({ content: ``, direction: 'right' });
|
|
||||||
|
|
||||||
marker.setzIndex(1);
|
|
||||||
}
|
|
||||||
marker = e.target;
|
|
||||||
emit('getMarkerInfo', e.target.info);
|
|
||||||
|
|
||||||
record.value = e.target.info;
|
|
||||||
}
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
function setLabel(labelContent) {
|
|
||||||
marker.setzIndex(999);
|
|
||||||
marker.setLabel({
|
|
||||||
content: labelContent,
|
|
||||||
direction: 'right',
|
|
||||||
});
|
|
||||||
|
|
||||||
let logo1 = document.getElementsByClassName('amap-marker-label')[0];
|
|
||||||
if (logo1) {
|
|
||||||
logo1.style.left = marker._style.width;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeMarker() {
|
|
||||||
for (let i = 0; i < markerList.length; i++) {
|
|
||||||
markerList[i].setMap(null);
|
|
||||||
}
|
|
||||||
markerList = []; // 清空数组
|
|
||||||
marker = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function destroyMap() {
|
|
||||||
BasicMap.destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
selectInfo,
|
|
||||||
initMap,
|
|
||||||
setLabel,
|
|
||||||
destroyMap,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
#container {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
:deep(.ant-drawer) {
|
|
||||||
position: absolute !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-drawer-header) {
|
|
||||||
background-color: #b4c7e7;
|
|
||||||
}
|
|
||||||
:deep(.jeecg-basic-title) {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.amap-marker-label) {
|
|
||||||
background-color: transparent !important;
|
|
||||||
padding: 0 !important;
|
|
||||||
border: none !important;
|
|
||||||
cursor: pointer;
|
|
||||||
top: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-drawer-content-wrapper) {
|
|
||||||
height: 90%;
|
|
||||||
margin-top: 2.5%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicModal @register="registerModal" title="咨询数据" width="80%">
|
|
||||||
<div class="top-d-outer">
|
|
||||||
<div class="top-d">
|
|
||||||
<div>医院名称:{{ hospitalInfo?.resourceName || '-' }}</div>
|
|
||||||
<div>医院级别:{{ hospitalInfo?.level || '-' }}</div>
|
|
||||||
<div>专家人数:{{ hospitalInfo?.specialistSum }}</div>
|
|
||||||
<div>当年咨询人次:{{ hospitalInfo?.thisYearSessionSum }}</div>
|
|
||||||
<div>累计咨询人次:{{ hospitalInfo?.allSessionSum }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="display: flex; justify-content: flex-end; padding-right: 5px">
|
|
||||||
<a-radio-group v-model:value="radioValue" button-style="solid" class="radio-group-d" @change="changeRadio">
|
|
||||||
<a-radio-button value="0">专家数据</a-radio-button>
|
|
||||||
<a-radio-button value="1">员工咨询数据</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<BasicTable @register="registerTable" table-type="1" />
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicModal from '/@/components/Modal/src/BasicModal.vue';
|
|
||||||
import { useModalInner } from '/@/components/Modal';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import { userPageApi, yearPageApi } from '/@/views/archivesManage/institution/timeService/consult/consult.api';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import { columns1, columns2 } from '/@/views/archivesManage/institution/timeService/consult/consult.data';
|
|
||||||
|
|
||||||
const radioValue = ref('0');
|
|
||||||
const hospitalInfo = ref({});
|
|
||||||
|
|
||||||
const [registerModal, { setModalProps }] = useModalInner(async (data) => {
|
|
||||||
radioValue.value = '0';
|
|
||||||
setModalProps({ showCancelBtn: false, showOkBtn: false });
|
|
||||||
hospitalInfo.value = data.record;
|
|
||||||
|
|
||||||
setProps({ api: yearPageApi, columns: columns1, searchInfo: { hospitalId: hospitalInfo.value.id, year: dayjs().format('YYYY') } });
|
|
||||||
await reload({ page: 1 });
|
|
||||||
});
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
canResize: false,
|
|
||||||
orderFlag: false,
|
|
||||||
immediate: false,
|
|
||||||
showIndexColumn: true,
|
|
||||||
useSearchForm: false,
|
|
||||||
showTableSetting: false,
|
|
||||||
showActionColumn: false,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { setProps, reload }] = tableContext;
|
|
||||||
|
|
||||||
async function changeRadio(v) {
|
|
||||||
if (v.target.value === '0') {
|
|
||||||
setProps({ api: yearPageApi, columns: columns1 });
|
|
||||||
await reload({ page: 1 });
|
|
||||||
} else {
|
|
||||||
setProps({ api: userPageApi, columns: columns2 });
|
|
||||||
await reload({ page: 1 });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.top-d-outer {
|
|
||||||
padding: 10px;
|
|
||||||
.top-d {
|
|
||||||
border-bottom: 1px dashed #cecece;
|
|
||||||
display: flex;
|
|
||||||
padding: 0 0 10px;
|
|
||||||
> div {
|
|
||||||
margin-right: 50px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
:deep(.ant-radio-button-wrapper) {
|
|
||||||
color: #1684fc !important;
|
|
||||||
border-color: #1684fc !important;
|
|
||||||
&:before {
|
|
||||||
background-color: #1684fc !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.ant-radio-button-wrapper-checked) {
|
|
||||||
color: #ffffff !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
list = '/health-consultation/archives/hospital/geo',
|
|
||||||
statistics = '/health-consultation/archives/consultation/statistics',
|
|
||||||
userPage = '/health-consultation/archives/consultation/user-page',
|
|
||||||
yearPage = '/health-consultation/archives/specialist/page',
|
|
||||||
}
|
|
||||||
|
|
||||||
export const listApi = (params: any) => defHttp.get({ url: Api.list, params });
|
|
||||||
export const statisticsApi = (params: any) => defHttp.get({ url: Api.statistics, params });
|
|
||||||
export const userPageApi = (params: any) => defHttp.get({ url: Api.userPage, params });
|
|
||||||
export const yearPageApi = (params: any) => defHttp.get({ url: Api.yearPage, params });
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
import { BasicColumn } from '/@/components/Table';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import { render } from '/@/utils/common/renderUtils';
|
|
||||||
|
|
||||||
export const columns1: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
dataIndex: 'doctorName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '性别',
|
|
||||||
dataIndex: 'sex',
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return render.renderDict(text, 'sex2');
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '年龄',
|
|
||||||
dataIndex: 'age',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '科室',
|
|
||||||
dataIndex: 'departmentName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '职称',
|
|
||||||
dataIndex: 'doctorJob_dictText',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: `当年服务人次(${dayjs().format('YYYY')})`,
|
|
||||||
dataIndex: 'thisYearSessionSum',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '累计服务人次',
|
|
||||||
dataIndex: 'allSessionSum',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
export const columns2: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '单位',
|
|
||||||
dataIndex: 'secondDeptName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '部门',
|
|
||||||
dataIndex: 'thirdDeptName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
dataIndex: 'realName',
|
|
||||||
width: 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '工号',
|
|
||||||
dataIndex: 'workNo',
|
|
||||||
width: 100,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '性别',
|
|
||||||
dataIndex: 'sex',
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return render.renderDict(text, 'sex2');
|
|
||||||
},
|
|
||||||
width: 80,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '年龄',
|
|
||||||
dataIndex: 'age',
|
|
||||||
width: 80,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '最近咨询时间',
|
|
||||||
dataIndex: 'lastSessionDate',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '累计咨询次数',
|
|
||||||
dataIndex: 'sessionCount',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
@@ -1,178 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="outer-d">
|
|
||||||
<div class="top-title"> 长庆油田咨询医院 </div>
|
|
||||||
<div class="map-d">
|
|
||||||
<template v-if="!loading">
|
|
||||||
<service-map
|
|
||||||
ref="serviceMap"
|
|
||||||
:marker-content="markerContent"
|
|
||||||
:label-content="labelContent"
|
|
||||||
field="resourceName"
|
|
||||||
@get-marker-info="getMarkerInfo"
|
|
||||||
@get-detail="getDetail"
|
|
||||||
/>
|
|
||||||
<div class="bottom-d">
|
|
||||||
<div
|
|
||||||
class="bottom-d-item"
|
|
||||||
v-for="(item, index) in statisticsInfo"
|
|
||||||
:key="`bottom-d-item-${index}`"
|
|
||||||
:style="{ margin: index === 1 ? '0 25px 0 50px' : index === 2 ? '0 50px 0 25px' : 0 }"
|
|
||||||
>
|
|
||||||
<div>{{ item.value }}</div>
|
|
||||||
<div>{{ item.name }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<div style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center">
|
|
||||||
<a-spin size="large" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<consult-modal @register="registerModal" />
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import ServiceMap from '/@/views/archivesManage/institution/timeService/components/serviceMap.vue';
|
|
||||||
import { nextTick, onBeforeUnmount, onMounted, ref } from 'vue';
|
|
||||||
import { listApi, statisticsApi } from '/@/views/archivesManage/institution/timeService/consult/consult.api';
|
|
||||||
import ConsultModal from '/@/views/archivesManage/institution/timeService/consult/components/consultModal.vue';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import consult from '/@/assets/images/consult/consult.png';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
|
||||||
|
|
||||||
const loading = ref(true);
|
|
||||||
const serviceMap = ref();
|
|
||||||
const statisticsInfo = ref();
|
|
||||||
const mapList = ref();
|
|
||||||
const orgCode = ref();
|
|
||||||
const markerContent = ref(`<div style="white-space: nowrap;display: flex;background-color: #58a55c;padding: 5px 10px;border-radius: 10px;
|
|
||||||
align-items: center;">
|
|
||||||
<img src="${consult}" alt="" style="width: 20px;height: 20px; margin-right: 5px"/>
|
|
||||||
<span style="color: #ffffff">^&</span>
|
|
||||||
</div>`);
|
|
||||||
const labelContent = ref('');
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
await initList();
|
|
||||||
await statistics();
|
|
||||||
});
|
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
|
||||||
serviceMap.value.destroyMap();
|
|
||||||
});
|
|
||||||
|
|
||||||
async function statistics() {
|
|
||||||
const info = await statisticsApi({});
|
|
||||||
statisticsInfo.value = [
|
|
||||||
{ value: info?.hospitalSum, name: '医院数量' },
|
|
||||||
{ value: info?.specialistSum, name: '专家人数' },
|
|
||||||
{ value: info?.thisYearSessionSum, name: `${dayjs().format('YYYY')}年咨询人次` },
|
|
||||||
{ value: info?.allSessionSum, name: `2023年至今累计咨询人次` },
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
async function initList() {
|
|
||||||
try {
|
|
||||||
mapList.value = await listApi({ orgCode: orgCode.value === '1' ? '' : orgCode.value });
|
|
||||||
loading.value = false;
|
|
||||||
await nextTick(() => {
|
|
||||||
serviceMap.value.initMap(mapList.value);
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
loading.value = false;
|
|
||||||
await nextTick(() => {
|
|
||||||
serviceMap.value.initMap([]);
|
|
||||||
});
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getMarkerInfo(e) {
|
|
||||||
let r = JSON.stringify(e);
|
|
||||||
console.log(r);
|
|
||||||
labelContent.value = `
|
|
||||||
<div style="padding: 10px;background-color: #ffffff;border-radius: 10px">
|
|
||||||
<div style="padding-top: 8px;font-weight: bold;font-size: 14px">专家人数:${e.specialistSum} </div>
|
|
||||||
<div style="padding-top: 8px;font-weight: bold;font-size: 14px">当年咨询人次:${e.thisYearSessionSum} </div>
|
|
||||||
<div style="padding-top: 8px;font-weight: bold;font-size: 14px">累计咨询人次:${e.allSessionSum} </div>
|
|
||||||
<div style="padding-top: 8px;text-align: center;color: #5087ec" onclick="getDetail()">查看咨询数据></div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
serviceMap.value.setLabel(labelContent.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getDetail(e) {
|
|
||||||
console.log(e);
|
|
||||||
openModal(true, {
|
|
||||||
record: e,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.outer-d {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-title {
|
|
||||||
padding: 10px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-d {
|
|
||||||
box-shadow: 2px 2px 0 0 rgba(0, 0, 0, 0.35);
|
|
||||||
border-radius: 5px;
|
|
||||||
background-color: #ffffff;
|
|
||||||
padding: 10px 20px;
|
|
||||||
position: absolute;
|
|
||||||
top: 10px;
|
|
||||||
left: 10px;
|
|
||||||
z-index: 99;
|
|
||||||
> :nth-child(n + 1) {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.bottom-d {
|
|
||||||
border-radius: 5px;
|
|
||||||
width: 100%;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 8%;
|
|
||||||
left: 0;
|
|
||||||
z-index: 99;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
.bottom-d-item {
|
|
||||||
border-radius: 5px;
|
|
||||||
box-shadow: 2px 2px 4px 1px rgba(0, 0, 0, 0.35);
|
|
||||||
background-color: #ffffff;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0 50px;
|
|
||||||
> div {
|
|
||||||
text-align: center;
|
|
||||||
&:nth-child(1) {
|
|
||||||
font-size: 18px;
|
|
||||||
padding: 10px 0 5px 0;
|
|
||||||
}
|
|
||||||
&:nth-child(2) {
|
|
||||||
padding: 5px 0 10px 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.map-d {
|
|
||||||
position: absolute;
|
|
||||||
width: calc(100% - 20px);
|
|
||||||
height: calc(100% - 70px);
|
|
||||||
top: 50px;
|
|
||||||
left: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-62
@@ -1,62 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicModal @register="registerModal" title="服务数据" width="80%">
|
|
||||||
<div class="top-d-outer">
|
|
||||||
<div class="top-d">
|
|
||||||
<div>应急中心名称:{{ hospitalInfo?.centerName || '-' }}</div>
|
|
||||||
<div>专业人员数量:{{ hospitalInfo?.majNum }}</div>
|
|
||||||
<div>操作人员数量:{{ hospitalInfo?.opNum }}</div>
|
|
||||||
<div>当年服务人次:{{ hospitalInfo?.thisYearNum }}</div>
|
|
||||||
<div>累计服务人次:{{ hospitalInfo?.totalYearNum }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<BasicTable @register="registerTable" table-type="1" />
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicModal from '/@/components/Modal/src/BasicModal.vue';
|
|
||||||
import { useModalInner } from '/@/components/Modal';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import { listInfoApi } from '/@/views/archivesManage/institution/timeService/emergency/emergency.api';
|
|
||||||
import { columns } from '/@/views/archivesManage/institution/timeService/emergency/emergency.data';
|
|
||||||
|
|
||||||
const hospitalInfo = ref({});
|
|
||||||
|
|
||||||
const [registerModal, { setModalProps }] = useModalInner(async (data) => {
|
|
||||||
setModalProps({ showCancelBtn: false, showOkBtn: false });
|
|
||||||
hospitalInfo.value = data.record;
|
|
||||||
|
|
||||||
setProps({ searchInfo: { centerId: hospitalInfo.value.centerId } });
|
|
||||||
await reload({ page: 1 });
|
|
||||||
});
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: listInfoApi,
|
|
||||||
columns,
|
|
||||||
canResize: false,
|
|
||||||
orderFlag: false,
|
|
||||||
immediate: false,
|
|
||||||
showIndexColumn: true,
|
|
||||||
useSearchForm: false,
|
|
||||||
showTableSetting: false,
|
|
||||||
showActionColumn: false,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const [registerTable, { setProps, reload }] = tableContext;
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.top-d-outer {
|
|
||||||
padding: 10px;
|
|
||||||
.top-d {
|
|
||||||
border-bottom: 1px dashed #cecece;
|
|
||||||
display: flex;
|
|
||||||
padding: 0 0 10px;
|
|
||||||
> div {
|
|
||||||
margin-right: 50px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
list = '/health-emergency/archives/emergency/centers',
|
|
||||||
listInfo = '/health-emergency/emergency/order/list',
|
|
||||||
}
|
|
||||||
|
|
||||||
export const listApi = (params: any) => defHttp.get({ url: Api.list, params });
|
|
||||||
export const listInfoApi = (params: any) => defHttp.get({ url: Api.listInfo, params });
|
|
||||||
@@ -1,170 +0,0 @@
|
|||||||
import { BasicColumn } from '/@/components/Table';
|
|
||||||
import { render } from '/@/utils/common/renderUtils';
|
|
||||||
|
|
||||||
export const columns: BasicColumn[] = [
|
|
||||||
{
|
|
||||||
title: '被救助人',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'salvageUserName',
|
|
||||||
fixed: 'left',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '单位',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'salvageUserSecondDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '部门',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'salvageUserDepart',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '所属应急中心',
|
|
||||||
dataIndex: 'centerName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '求助方式',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'initiatorType',
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return text == '0' ? '120' : text == '1' ? '应急就医' : '';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '求助时间',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'createTime',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '员工位置',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'initiatorLongitude',
|
|
||||||
customRender: ({ record }) => {
|
|
||||||
// @ts-ignore
|
|
||||||
const { initiatorLongitude, initiatorLatitude } = record;
|
|
||||||
if (!initiatorLongitude || !initiatorLatitude) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
return `${initiatorLongitude.toFixed(4)},${initiatorLatitude.toFixed(4)}`;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '专业人员',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'majorUserName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作人员',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'operationUserName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '驻场人员',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'stationUserName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '工单状态',
|
|
||||||
align: 'center',
|
|
||||||
dataIndex: 'orderStatus',
|
|
||||||
customRender: ({ text }) => render.renderDict(text, 'emergency_order_status'),
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: '派单状态',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'isDispatch',
|
|
||||||
// customRender: ({ text }) => render.renderDict(text, 'emergency_order_send_status').children,
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '操作人员电话',
|
|
||||||
// align:"center",
|
|
||||||
// dataIndex: 'operationUserMobile'
|
|
||||||
// },
|
|
||||||
|
|
||||||
// {
|
|
||||||
// title: '专业人员电话',
|
|
||||||
// align:"center",
|
|
||||||
// dataIndex: 'majorUserMobile'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '驻场人员',
|
|
||||||
// align: 'center',
|
|
||||||
// dataIndex: 'stationUserName',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '驻场人员部门',
|
|
||||||
// align:"center",
|
|
||||||
// dataIndex: 'stationUserDepart'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '驻场人员派单业务',
|
|
||||||
// align:"center",
|
|
||||||
// dataIndex: 'stationBusiness'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '操作人员响应时间',
|
|
||||||
// align:"center",
|
|
||||||
// dataIndex: 'operationResponseTime',
|
|
||||||
// customRender:({text}) =>{
|
|
||||||
// return !text?"":(text.length>10?text.substr(0,10):text)
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '操作人员派单时间',
|
|
||||||
// align:"center",
|
|
||||||
// dataIndex: 'operationSendOrderTime',
|
|
||||||
// customRender:({text}) =>{
|
|
||||||
// return !text?"":(text.length>10?text.substr(0,10):text)
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '专业人员响应时间',
|
|
||||||
// align:"center",
|
|
||||||
// dataIndex: 'majorResponseTime',
|
|
||||||
// customRender:({text}) =>{
|
|
||||||
// return !text?"":(text.length>10?text.substr(0,10):text)
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '驻场人员响应时间',
|
|
||||||
// align:"center",
|
|
||||||
// dataIndex: 'stationResponseTime',
|
|
||||||
// customRender:({text}) =>{
|
|
||||||
// return !text?"":(text.length>10?text.substr(0,10):text)
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '驻场人员拒单时间',
|
|
||||||
// align:"center",
|
|
||||||
// dataIndex: 'stationRejectionTime',
|
|
||||||
// customRender:({text}) =>{
|
|
||||||
// return !text?"":(text.length>10?text.substr(0,10):text)
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '专业人员救助意见',
|
|
||||||
// align:"center",
|
|
||||||
// dataIndex: 'majorSalvageOpinion'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '派单医院',
|
|
||||||
// align:"center",
|
|
||||||
// dataIndex: 'sendOrderHospital'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '应急单状态',
|
|
||||||
// align:"center",
|
|
||||||
// dataIndex: 'orderStatus',
|
|
||||||
// customRender: ({ text }) => {
|
|
||||||
// return render.renderDict(text, 'emergency_order_status');
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '是否派单',
|
|
||||||
// align:"center",
|
|
||||||
// dataIndex: 'isDispatch',
|
|
||||||
// customRender: ({ text }) => {
|
|
||||||
// return text == false ? '否' : text == true ? '是' : '';
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
];
|
|
||||||
@@ -1,181 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="outer-d">
|
|
||||||
<div class="top-title"> 长庆油田应急中心 </div>
|
|
||||||
<div class="map-d">
|
|
||||||
<template v-if="!loading">
|
|
||||||
<service-map
|
|
||||||
ref="serviceMap"
|
|
||||||
:marker-content="markerContent"
|
|
||||||
:label-content="labelContent"
|
|
||||||
field="centerName"
|
|
||||||
@get-marker-info="getMarkerInfo"
|
|
||||||
@get-detail="getDetail"
|
|
||||||
id="centerId"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div class="bottom-d">
|
|
||||||
<div class="bottom-d-item" v-for="(item, index) in statisticsInfo" :key="`bottom-d-item-${index}`">
|
|
||||||
<div>{{ item.value }}</div>
|
|
||||||
<div>{{ item.name }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<div style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center">
|
|
||||||
<a-spin size="large" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<consult-modal @register="registerModal" />
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import ServiceMap from '/@/views/archivesManage/institution/timeService/components/serviceMap.vue';
|
|
||||||
import { onMounted, ref, nextTick, onBeforeUnmount } from 'vue';
|
|
||||||
import { listApi } from '/@/views/archivesManage/institution/timeService/emergency/emergency.api';
|
|
||||||
import ConsultModal from '/@/views/archivesManage/institution/timeService/emergency/components/emergencyModal.vue';
|
|
||||||
import { useModal } from '/@/components/Modal';
|
|
||||||
import emergency from '/@/assets/images/emergency.png';
|
|
||||||
|
|
||||||
const [registerModal, { openModal }] = useModal();
|
|
||||||
|
|
||||||
const loading = ref(true);
|
|
||||||
const serviceMap = ref();
|
|
||||||
const statisticsInfo = ref<any[]>([]);
|
|
||||||
const mapList = ref();
|
|
||||||
const markerContent = ref(`<div style="white-space: nowrap;display: flex;background-color: #58a55c;padding: 5px 10px;border-radius: 10px;
|
|
||||||
align-items: center;">
|
|
||||||
<img src="${emergency}" alt="" style="width: 20px;height: 20px; margin-right: 5px"/>
|
|
||||||
<span style="color: #ffffff">^&</span>
|
|
||||||
</div>`);
|
|
||||||
const labelContent = ref('');
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
await initList();
|
|
||||||
});
|
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
|
||||||
serviceMap.value.destroyMap();
|
|
||||||
});
|
|
||||||
|
|
||||||
async function initList() {
|
|
||||||
try {
|
|
||||||
let majNum = 0;
|
|
||||||
let opNum = 0;
|
|
||||||
let thisYearNum = 0;
|
|
||||||
let totalYearNum = 0;
|
|
||||||
mapList.value = (await listApi({})).map((item) => {
|
|
||||||
majNum += item.majNum;
|
|
||||||
opNum += item.opNum;
|
|
||||||
thisYearNum += item.thisYearNum;
|
|
||||||
totalYearNum += item.totalYearNum;
|
|
||||||
return item;
|
|
||||||
});
|
|
||||||
statisticsInfo.value = [
|
|
||||||
{ value: mapList.value.length, name: '应急中心数量' },
|
|
||||||
{ value: majNum, name: '专业人员数量' },
|
|
||||||
{ value: opNum, name: '操作人员数量' },
|
|
||||||
{ value: thisYearNum, name: '当年应急人次' },
|
|
||||||
{ value: totalYearNum, name: '累计应急人次' },
|
|
||||||
];
|
|
||||||
|
|
||||||
loading.value = false;
|
|
||||||
await nextTick(() => {
|
|
||||||
serviceMap.value.initMap(mapList.value);
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
loading.value = false;
|
|
||||||
await nextTick(() => {
|
|
||||||
serviceMap.value.initMap([]);
|
|
||||||
});
|
|
||||||
console.log(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getMarkerInfo(e) {
|
|
||||||
labelContent.value = `
|
|
||||||
<div style="padding: 10px;background-color: #ffffff;border-radius: 10px">
|
|
||||||
<div style="padding-top: 8px;font-weight: bold;font-size: 14px">专业人员数量:${e.majNum} </div>
|
|
||||||
<div style="padding-top: 8px;font-weight: bold;font-size: 14px">操作人员数量:${e.opNum} </div>
|
|
||||||
<div style="padding-top: 8px;font-weight: bold;font-size: 14px">当年应急人次:${e.thisYearNum} </div>
|
|
||||||
<div style="padding-top: 8px;font-weight: bold;font-size: 14px">累计应急人次:${e.totalYearNum} </div>
|
|
||||||
<div style="padding-top: 8px;text-align: center;color: #5087ec" onclick="getDetail()">查看应急数据></div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
serviceMap.value.setLabel(labelContent.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getDetail(e) {
|
|
||||||
openModal(true, {
|
|
||||||
record: e,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.outer-d {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-title {
|
|
||||||
padding: 10px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-d {
|
|
||||||
box-shadow: 2px 2px 0 0 rgba(0, 0, 0, 0.35);
|
|
||||||
border-radius: 5px;
|
|
||||||
background-color: #ffffff;
|
|
||||||
padding: 10px 20px;
|
|
||||||
position: absolute;
|
|
||||||
top: 10px;
|
|
||||||
left: 10px;
|
|
||||||
z-index: 99;
|
|
||||||
> :nth-child(n + 1) {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.bottom-d {
|
|
||||||
border-radius: 5px;
|
|
||||||
width: 100%;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 8%;
|
|
||||||
left: 0;
|
|
||||||
z-index: 99;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
> :nth-child(n + 1) {
|
|
||||||
margin-left: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom-d-item {
|
|
||||||
border-radius: 5px;
|
|
||||||
box-shadow: 2px 2px 4px 1px rgba(0, 0, 0, 0.35);
|
|
||||||
background-color: #ffffff;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0 50px;
|
|
||||||
> div {
|
|
||||||
text-align: center;
|
|
||||||
&:nth-child(1) {
|
|
||||||
font-size: 18px;
|
|
||||||
padding: 10px 0 5px 0;
|
|
||||||
}
|
|
||||||
&:nth-child(2) {
|
|
||||||
padding: 5px 0 5px 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.map-d {
|
|
||||||
position: absolute;
|
|
||||||
width: calc(100% - 20px);
|
|
||||||
height: calc(100% - 70px);
|
|
||||||
top: 50px;
|
|
||||||
left: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
-48
@@ -1,48 +0,0 @@
|
|||||||
<template>
|
|
||||||
<BasicModal @register="registerModal" :title="title" width="80%">
|
|
||||||
<BasicTable @register="registerTable" />
|
|
||||||
</BasicModal>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import BasicModal from '/@/components/Modal/src/BasicModal.vue';
|
|
||||||
import { useModalInner } from '/@/components/Modal';
|
|
||||||
import { useListPage } from '/@/hooks/system/useListPages';
|
|
||||||
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
|
||||||
import { abnormalApi } from '/@/views/archivesManage/institution/timeService/environment/environment.api';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { columns } from '/@/views/archivesManage/institution/timeService/environment/environment.data';
|
|
||||||
|
|
||||||
const title = ref('');
|
|
||||||
|
|
||||||
const [registerModal, { setModalProps }] = useModalInner(async (data) => {
|
|
||||||
setModalProps({ showOkBtn: false, cancelText: '关闭' });
|
|
||||||
setProps({ searchInfo: { type: data?.type, orgCode: data?.orgCode } });
|
|
||||||
title.value = data.title;
|
|
||||||
await reload();
|
|
||||||
});
|
|
||||||
|
|
||||||
const { tableContext } = useListPage({
|
|
||||||
tableProps: {
|
|
||||||
api: abnormalApi,
|
|
||||||
pageTitle: '长庆油田已封存员工',
|
|
||||||
columns,
|
|
||||||
canResize: false,
|
|
||||||
immediate: false,
|
|
||||||
btnArr: ['edit', 'delete'],
|
|
||||||
btnArrText: { add: '新增封存员工', search: '列表查询', export: '信息导出', print: '信息打印' },
|
|
||||||
useSearchForm: false,
|
|
||||||
showIndexColumn: true,
|
|
||||||
indexColumnProps: {
|
|
||||||
dataIndex: 'listIndex',
|
|
||||||
width: 70,
|
|
||||||
},
|
|
||||||
actionColumn: {
|
|
||||||
width: 120,
|
|
||||||
fixed: 'right',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const [registerTable, { setProps, reload }, {}] = tableContext;
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less"></style>
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
|
||||||
|
|
||||||
enum Api {
|
|
||||||
list = '/health-intervene/archive/environment/map-list',
|
|
||||||
statistics = '/health-intervene/archive/environment/statistics',
|
|
||||||
abnormal = '/health-intervene/archive/environment/abnormal/page',
|
|
||||||
}
|
|
||||||
|
|
||||||
export const listApi = (params: any) => defHttp.get({ url: Api.list, params });
|
|
||||||
export const statisticsApi = (params: any) => defHttp.get({ url: Api.statistics, params });
|
|
||||||
export const abnormalApi = (params: any) => defHttp.get({ url: Api.abnormal, params });
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user