Compare commits

...

2 Commits

11 changed files with 1704 additions and 28 deletions

View File

@ -18,7 +18,7 @@
<span v-if="hasSearchConditions" style="font-size: 16px;font-weight: bold;color:#E86A6A">
有筛选条件未重置
</span>
<span style="font-size: 16px;font-weight: bold;color:#ABACAD">点击展开更多操作区域</span>
<span style="font-size: 16px;font-weight: bold;color:#ABACAD">{{ topTipText }}</span>
</a-col>
</a-row>
<div class="org-info-card" v-show="(!toggleSearchStatus && orgSelectedCon) || toggleSearchStatus">
@ -124,21 +124,21 @@
<a-card>
<a-row>
<a-col :span="sourceScreenSpan">
<div style="height: 16px;margin-left: 15px;">
<a-tag color="#2DB7F5">源数据</a-tag>
<a-radio-group v-model:value="viewType" size="small" style="margin-left: 10px;"
@change="emit('viewTypeChanged', viewType)">
<div style="height: 16px;" :style="{ marginLeft: leftTableML }">
<a-tag color="#2DB7F5">{{ leftListTipText }}</a-tag>
<a-radio-group v-show="showSelectedArea" v-model:value="viewType" size="small"
style="margin-left: 10px;" @change="emit('viewTypeChanged', viewType)">
<a-radio-button value="all">全部</a-radio-button>
<a-radio-button value="selected">已选择</a-radio-button>
<a-radio-button value="unselected">未选择</a-radio-button>
</a-radio-group>
</div>
<slot name="sourceTableSlot"></slot>
<slot name="sourceTableSlot"></slot>
</a-col>
<a-col :span="selectedScreenSpan">
<div style="height: 31px;margin-left: 4px;">
<div style="height: 31px;" :style="{ marginLeft: rightTableML }">
<a-tag color="#2db7f5">
已选择
{{ rightListTipText }}
<span style="font-size: 13px;font-weight: bold;">
{{ ' ' + selectedSize + ' ' }}
</span>
@ -152,7 +152,8 @@
</a-card>
</a-tab-pane>
<a-tab-pane key="asyncHistory" tab="同步历史">
<AsyncListComponent ref="asyncHistoryRef" :orgCode="orgData.orgCode"></AsyncListComponent>
<AsyncListComponent ref="asyncHistoryRef" :type="syncType" :orgCode="orgData.orgCode">
</AsyncListComponent>
</a-tab-pane>
</a-tabs>
<div class="toggle-button-container">
@ -162,20 +163,39 @@
</a-button>
<a-button type="warning" size="small" @click.stop="handleAsync()"
style="margin-left: 5px;margin-right: 5px;" v-show="tabActiveKey == 'dataAsync'">
<span>同步数据</span>
<span>{{ syncTipText }}</span>
</a-button>
<a-divider type="vertical" style="background-color: #CDCDCF" />
<a-button type="primary" size="small" @click="handleSelectAll" v-show="tabActiveKey == 'dataAsync'"
style="margin-left: 8px">全部添加</a-button>
<a-divider type="vertical" style="background-color: #CDCDCF" v-show="tabActiveKey == 'dataAsync'" />
<a-button type="primary" size="small" @click="handleRemoveAll" v-show="tabActiveKey == 'dataAsync'"
style="margin-left: 8px">全部移除</a-button>
<a-divider type="vertical" style="background-color: #CDCDCF" v-show="tabActiveKey == 'dataAsync'" />
<a-button type="primary" size="small" @click="handleAdd"
v-show="showAddBtn && tabActiveKey == 'dataAsync'" style="margin-left: 8px">新增</a-button>
<a-divider type="vertical" style="background-color: #CDCDCF"
v-show="showAddBtn && tabActiveKey == 'dataAsync'" />
<a-button type="primary" size="small" @click="handleBatchAdd"
v-show="showBatchAddBtn && tabActiveKey == 'dataAsync'" style="margin-left: 8px">批量新增</a-button>
<a-divider type="vertical" style="background-color: #CDCDCF"
v-show="showBatchAddBtn && tabActiveKey == 'dataAsync'" />
<a-button type="primary" size="small" @click="handleSelectAll"
v-show="showAddAllBtn && tabActiveKey == 'dataAsync'" style="margin-left: 8px">全部添加</a-button>
<a-divider type="vertical" style="background-color: #CDCDCF"
v-show="showAddAllBtn && tabActiveKey == 'dataAsync'" />
<a-button type="primary" size="small" @click="handleRemoveAll"
v-show="showRemoveAllBtn && tabActiveKey == 'dataAsync'" style="margin-left: 8px">{{
batchRemoveText
}}</a-button>
<a-divider type="vertical" style="background-color: #CDCDCF"
v-show="showRemoveAllBtn && tabActiveKey == 'dataAsync'" />
<a-button type="primary" size="small" @click.stop="handleRestore"
v-show="tabActiveKey == 'dataAsync'" style="margin-left: 8px">
v-show="showResetDataBtn && tabActiveKey == 'dataAsync'" style="margin-left: 8px">
<span>还原数据</span>
</a-button>
<a-divider type="vertical" style="background-color: #CDCDCF" v-show="tabActiveKey == 'dataAsync'" />
<a-divider type="vertical" style="background-color: #CDCDCF"
v-show="showResetDataBtn && tabActiveKey == 'dataAsync'" />
<a-button type="primary" size="small" @click.stop="handleReload"
v-show="showReloadBtn && tabActiveKey == 'dataAsync'" style="margin-left: 8px">
<span>刷新</span>
</a-button>
<a-divider type="vertical" style="background-color: #CDCDCF"
v-show="showReloadBtn && tabActiveKey == 'dataAsync'" />
<a-radio-group v-model:value="splitVal" button-style="solid" size="small"
@change="splitScreenChanged" style="margin-left: 5px;margin-right: 5px;"
v-show="tabActiveKey == 'dataAsync'">
@ -218,8 +238,66 @@ import AsyncListComponent from '@/components/dataAsync/AsyncMainList.vue'
const props = defineProps({
selectedSize: 0,
hasSearchConditions: false,
syncType: '',//'directive'
platType: '',// ywjg syjg
topTipText: {
type: String,
default: '点击展开更多操作区域'
},//
showSelectedArea: {
type: Boolean,
default: true
},//
syncTipText: {
type: String,
default: '同步数据'
},//
leftListTipText: {
type: String,
default: '源数据'
},//
rightListTipText: {
type: String,
default: '已选择'
},//
leftTableML: {
type: String,
default: '15px'
},//margin-left
rightTableML: {
type: String,
default: '4px'
},//margin-left
showAddBtn: {
type: Boolean,
default: false
},//
showBatchAddBtn: {
type: Boolean,
default: false
},//
showAddAllBtn: {
type: Boolean,
default: true
},//
showRemoveAllBtn: {
type: Boolean,
default: true
},//
showResetDataBtn: {
type: Boolean,
default: true
},//
showReloadBtn: {
type: Boolean,
default: true
},//
batchRemoveText: {
type: String,
default: '全部移除'
},//
});
const emit = defineEmits(['viewTypeChanged', 'orgChanged', 'handleAsync', 'handleAddAll', 'handleRemoveAll']);
const emit = defineEmits(['viewTypeChanged', 'orgChanged', 'handleAsync', 'handleAdd', 'handleBatchAdd', 'handleReload', 'handleAddAll', 'handleRemoveAll']);
interface OrganizationData {
id?: string;
@ -332,6 +410,23 @@ const refreshHistory = () => {
//
const viewType = ref('all')
//
const handleAdd = async () => {
if (!orgData.value) {
createMessage.warning("请先选择机构");
return;
}
emit('handleAdd', null)
};
//
const handleBatchAdd = async () => {
if (!orgData.value) {
createMessage.warning("请先选择机构");
return;
}
emit('handleBatchAdd', null)
};
//
const handleSelectAll = async () => {
if (!orgData.value) {
@ -341,6 +436,7 @@ const handleSelectAll = async () => {
emit('handleAddAll', null)
};
//
const handleRemoveAll = () => {
Modal.confirm({
@ -379,12 +475,21 @@ const handleRestore = async () => {
});
};
//
const handleReload = () => {
emit('handleReload', null)
}
onMounted(() => {
queryDepartTreeSync({ platType: 'ywjg' }).then(res => {
orgTable.value = res;
});
if (!props.platType) {
queryDepartTreeSync().then(res => {
orgTable.value = res;
});
} else {
queryDepartTreeSync({ platType: props.platType }).then(res => {
orgTable.value = res;
});
}
});
defineExpose({

View File

@ -0,0 +1,568 @@
<template>
<div class="p-2 base-class">
<a-card @click="toggleSearchStatus = true" :class="{ 'base-con-class': toggleSearchStatus == false }">
<a-row v-show="!toggleSearchStatus && !orgSelectedCon">
<a-col :span="10">
<span style="font-size: 15px;font-weight: bold;color: #333;">机构信息:</span>
<span v-if="!orgData" class="base-info-dn" style="color: red;"> 请先选择机构</span>
<template v-else>
<span class="base-info-dn"
style="margin-left: 10px;font-size: 15px;font-weight: 400;color: #333;"> {{
orgData?.departName }}</span>
<a-button type="primary" size="small" @click.stop="handleResetOrg" style="margin-left: 10px;">
<span class="base-info-dn">重新选择</span>
</a-button>
</template>
</a-col>
<a-col :span="5">
<span style="font-size: 16px;font-weight: bold;color:#ABACAD">点击查看机构详情</span>
</a-col>
</a-row>
<div class="org-info-card" v-show="(!toggleSearchStatus && orgSelectedCon) || toggleSearchStatus">
<div class="org-info-header">
<div class="org-title">
<span class="base-info-label">机构信息:</span>
<span v-if="!orgData" class="base-info-dn" style="color: #ff4d4f;"> 请先选择机构</span>
<span v-else class="org-name">{{ orgData?.departName }}</span>
</div>
<a-button v-if="!orgSelectedCon" class="reset-btn" type="primary" @click.stop="handleResetOrg">
<span>重新选择</span>
</a-button>
</div>
<div class="org-info-content">
<div class="info-row">
<div class="info-item">
<span class="label">机构编码</span>
<span class="value">{{ orgData?.orgCode || '-' }}</span>
</div>
<div class="info-item">
<span class="label">运营时间</span>
<span class="value">
{{ orgData?.operationStartTime?.substring(0, 10) || '-' }}
{{ orgData?.operationEndTime?.substring(0, 10) || '-' }}
</span>
</div>
<div class="info-item">
<span class="label">合同时间</span>
<span class="value">
{{ orgData?.contractStartTime?.substring(0, 10) || '-' }}
{{ orgData?.contractEndTime?.substring(0, 10) || '-' }}
</span>
</div>
</div>
<div class="info-row">
<div class="info-item">
<span class="label">电话</span>
<span class="value">{{ orgData?.mobile || '-' }}</span>
</div>
<div class="info-item">
<span class="label">传真</span>
<span class="value">{{ orgData?.fax || '-' }}</span>
</div>
<div class="info-item">
<span class="label">地址</span>
<span class="value">{{ orgData?.address || '-' }}</span>
</div>
</div>
</div>
</div>
<a-divider v-show="toggleSearchStatus && orgData && !orgSelectedCon" style="margin: 0px;margin-top: 8px;" />
<a-col :span="24" v-show="toggleSearchStatus && orgData && !orgSelectedCon">
<div class="jeecg-basic-table-form-container">
<slot name="searchFormSlot"></slot>
</div>
</a-col>
</a-card>
</div>
<div class="p-2 con-class" style="margin-top: -10px;">
<a-card>
<a-card v-show="orgSelectedCon" :bordered="false" class="org-container">
<a-row :gutter="[16, 16]">
<a-col :span="8" v-for="org in orgTable" :key="org.id">
<div class="org-card" :class="{ 'active': org.id == orgData?.id }"
@click="handleOrgSelected(org)">
<div class="org-header">
<a-tag color="blue" v-if="org.id == orgData?.id">当前选择</a-tag>
<h3 class="org-title">{{ org.departName }}</h3>
</div>
<a-descriptions size="default" :column="2" bordered>
<a-descriptions-item label="机构编码">{{ org.orgCode || '-' }}</a-descriptions-item>
<a-descriptions-item label="运营时间">
{{ org.operationStartTime?.substring(0, 10) || '-' }}
{{ org.operationEndTime?.substring(0, 10) || '-' }}
</a-descriptions-item>
<a-descriptions-item label="电话">
<div class="contact-line">
<span><phone-outlined /> {{ org.mobile || '-' }}</span>
</div>
</a-descriptions-item>
<a-descriptions-item label="传真">
<div class="contact-line">
<span><printer-outlined /> {{ org.fax || '-' }}</span>
</div>
</a-descriptions-item>
<a-descriptions-item label="地址">
<ellipsis :length="26" tooltip>{{ org.address || '-' }}</ellipsis>
</a-descriptions-item>
</a-descriptions>
</div>
</a-col>
</a-row>
</a-card>
<a-card v-show="orgSelectedCon && (!orgTable || orgTable?.length == 0)">
<a-empty description="暂无数据" :image="simpleImage" />
</a-card>
<div class="tab-header-container" v-show="!orgSelectedCon">
<a-tabs v-model:activeKey="tabActiveKey" class="tabs-container">
<a-tab-pane key="dataAsync" tab="数据同步">
<a-card>
<a-row>
<a-col :span="24">
<slot name="tableSlot"></slot>
</a-col>
</a-row>
</a-card>
</a-tab-pane>
<a-tab-pane key="asyncHistory" tab="同步历史">
<AsyncListComponent ref="asyncHistoryRef" :type="syncType" :orgCode="orgData.orgCode">
</AsyncListComponent>
</a-tab-pane>
</a-tabs>
<div class="toggle-button-container">
<a-button type="primary" size="small" @click.stop="refreshHistory()" style="margin-right: 10px;"
v-show="tabActiveKey == 'asyncHistory'">
<span>刷新</span>
</a-button>
<a-button type="warning" size="small" @click.stop="handleAsync()"
style="margin-left: 5px;margin-right: 5px;" v-show="showSyncBtn && tabActiveKey == 'dataAsync'">
<span>同步数据</span>
</a-button>
<a-divider type="vertical" style="background-color: #CDCDCF" v-show="tabActiveKey == 'dataAsync'" />
<a @click="toggleSearchStatus = !toggleSearchStatus" class="toggle-button"
style="margin-left: 5px;margin-right: 5px;">
{{ toggleSearchStatus ? '拉伸' : '压缩' }}
<Icon
:icon="toggleSearchStatus ? 'humbleicons:align-objects-top' : 'humbleicons:align-objects-bottom'" />
</a>
</div>
</div>
</a-card>
</div>
</template>
<script lang="ts" name="synchronization-directive" setup>
import { ref, onMounted, computed, toRaw } from 'vue';
import { queryDepartTreeSync } from '/@/api/common/api';
import { Empty } from 'ant-design-vue';
import { Modal } from 'ant-design-vue';
import { useMessage } from "/@/hooks/web/useMessage";
import AsyncListComponent from '@/components/dataAsync/AsyncMainList.vue'
const props = defineProps({
syncType: '',//'nuBaseInfo'
showSyncBtn: true,
});
const emit = defineEmits(['orgChanged', 'handleAsync']);
interface OrganizationData {
id?: string;
departName: string;
orgCode: string;
operationStartTime?: string;
operationEndTime?: string;
contractStartTime?: string;
contractEndTime?: string;
mobile?: string;
fax?: string;
address?: string;
}
const { createMessage } = useMessage();
const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
const toggleSearchStatus = ref<boolean>(true);
const sourceScreenSpan = ref(12);
const selectedScreenSpan = ref(12);
const orgTable = ref<OrganizationData[]>([]);
const orgData = ref<OrganizationData | null>(null);
const showVideoModal = ref(false);
const videoUrl = ref('');
const orgSelectedCon = ref(true)
const tabActiveKey = ref('dataAsync')
const asyncHistoryRef = ref(null)
const handleOrgSelected = async (org) => {
if (!!orgData.value && orgData.value.id != org.id) {
Modal.confirm({
title: '变更机构提醒',
content: '是否变更机构!',
okText: '确认',
cancelText: '取消',
onOk: async () => {
await loadOrgData(org);
refreshHistory()
},
});
} else {
await loadOrgData(org);
}
};
const loadOrgData = async (org) => {
//
orgData.value = toRaw(org);
emit('orgChanged', org)
};
const handleResetOrg = () => {
orgSelectedCon.value = true
}
const resetOrgSelectedCon = (v_) => {
orgSelectedCon.value = v_
}
//
const handleAsync = () => {
Modal.confirm({
title: '数据同步',
content: '是否确认同步',
okText: '确认',
cancelText: '取消',
onOk: async () => {
//
emit('handleAsync', null);
},
});
};
//
const refreshHistory = () => {
asyncHistoryRef.value?.searchQuery()
}
onMounted(() => {
queryDepartTreeSync({}).then(res => {
orgTable.value = res;
});
});
defineExpose({
orgData,
resetOrgSelectedCon,
refreshHistory,
});
</script>
<style lang="less" scoped>
.base-con-class {
background: white;
border-radius: 8px;
cursor: pointer;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
transform: translateY(-2px);
border: 1px solid rgba(0, 0, 0, 0.05);
}
.selected-list-container {
height: calc(100vh - 310px);
overflow: auto;
:deep(.ant-table) {
width: 100% !important;
max-width: 100%;
}
}
/* 新增的机构卡片样式 */
.org-cards-container {
max-height: 75vh;
overflow-y: auto;
padding: 8px;
}
.org-card {
margin-bottom: 16px;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
height: 100%;
&:hover {
transform: translateY(-4px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
background: radial-gradient(circle at center, #c7e6ff 0%, #d4eeff 70%, #e4f0ff 100%);
}
:deep(.ant-card-head) {
border-bottom: 1px solid #f0f0f0;
padding: 0 16px;
min-height: 48px;
.ant-card-head-title {
padding: 12px 0;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.org-info-item {
display: flex;
margin-bottom: 12px;
font-size: 13px;
line-height: 1.4;
&:last-child {
margin-bottom: 0;
}
.label {
font-weight: 500;
color: #666;
min-width: 70px;
flex-shrink: 0;
}
.value {
color: #333;
word-break: break-word;
flex: 1;
&.address-text {
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.selected {
position: relative;
border: 1px solid #1890ff;
&::after {
content: '';
position: absolute;
right: 8px;
bottom: 8px;
width: 24px;
height: 24px;
background: url("@/assets/icons/success.svg") no-repeat center;
background-size: contain;
}
}
.tab-header-container {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.tabs-container {
width: 100%;
:deep(.ant-tabs-content) {
height: calc(100% - 40px); // tab
overflow: auto;
}
}
.toggle-button-container {
position: absolute;
right: 16px;
top: 8px;
z-index: 1;
}
.toggle-button {
display: inline-flex;
align-items: center;
gap: 4px;
color: rgba(0, 0, 0, 0.65);
transition: all 0.3s;
&:hover {
color: #1890ff;
}
}
.con-class {
:deep(.ant-card .ant-card-body) {
// padding-left: 10px !important;
// padding-right: 10px !important;
// padding-bottom: 0px !important;
// padding-bottom: 0px !important;
padding: 3px 10px 3px 10px !important;
}
}
.base-class {
:deep(.ant-card .ant-card-body) {
padding-top: 10px !important;
padding-bottom: 10px !important;
}
}
.con-class {
:deep(.css-dev-only-do-not-override-9m98ij .ant-table-wrapper .ant-table-pagination.ant-pagination) {
margin: 10px !important;
}
}
.org-info-card {
background: linear-gradient(135deg, #f8f9fa 0%, #d0eaff 100%);
border-radius: 8px;
padding: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
border: 1px solid #e8e8e8;
transition: all 0.3s ease;
// &:hover {
// box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
// transform: translateY(-1px);
// }
}
.org-info-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 5px;
padding-bottom: 5px;
border-bottom: 1px solid #f0f0f0;
}
.org-title {
display: flex;
align-items: center;
.base-info-label {
font-weight: 600;
color: #595959;
font-size: 15px;
}
.org-name {
margin-left: 10px;
font-weight: 600;
color: #262626;
font-size: 16px;
}
}
.reset-btn {
background-color: #1890ff;
border-color: #1890ff;
height: 32px;
border-radius: 4px;
font-weight: 500;
// &:hover {
// background-color: #40a9ff;
// border-color: #40a9ff;
// }
}
.org-info-content {
.info-row {
display: flex;
margin-bottom: 5px;
&:last-child {
margin-bottom: 0;
}
}
.info-item {
flex: 1;
padding: 0 8px;
.label {
color: #8c8c8c;
font-size: 13px;
margin-right: 8px;
}
.value {
color: #262626;
font-size: 13px;
word-break: break-all;
}
}
}
.org-container {
background: transparent;
.org-card {
padding: 16px;
border: 1px solid #f0f0f0;
border-radius: 4px;
transition: all 0.3s;
background: white;
&:hover {
border-color: #1890ff;
box-shadow: 0 2px 12px rgba(24, 144, 255, 0.2);
}
&.active {
border: 1px solid #1890ff;
background: #f0f8ff;
}
.org-header {
display: flex;
align-items: center;
margin-bottom: 12px;
.org-title {
margin: 0 0 0 8px;
font-size: 16px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.contact-line {
display: flex;
justify-content: space-between;
>span {
display: inline-flex;
align-items: center;
.anticon {
margin-right: 4px;
color: #8c8c8c;
}
}
}
:deep(.ant-descriptions) {
.ant-descriptions-item-label {
width: 80px;
color: #666;
}
}
}
}
// padding
.org-card {
:deep(.ant-descriptions-item-content) {
padding: 20px;
}
}
</style>

View File

@ -52,7 +52,8 @@ import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Asyn
import AsyncMainModal from './components/AsyncMainModal.vue'
const props = defineProps({
orgCode: 'orgCode'
orgCode: 'orgCode',
type:'',
});
const queryParam = reactive<any>({});
const registerModal = ref();
@ -67,7 +68,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
showTableSetting: false,
showActionColumn: false,
beforeFetch: async (params) => {
queryParam.type = 'directive'
queryParam.type = props.type
queryParam.orgCode = props.orgCode
return Object.assign(params, queryParam);
},

View File

@ -1,5 +1,6 @@
<template>
<!--
platType:只查询对应机构类型的机构 业务机构ywjg 试验机构syjg
selectedSize已选择条数
hasSearchConditions是否存在搜索条件
viewTypeChanged源数据全部已选择未选择变更时的钩子函数
@ -8,8 +9,8 @@
handleAddAll全部添加按钮
handleRemoveAll全部移除按钮
-->
<SyncComponent ref="syncComRef" :selectedSize="Array.from(selectedItems.values()).length"
:hasSearchConditions="hasSearchConditions" @viewTypeChanged="viewTypeChanged" @orgChanged="orgChanged"
<SyncComponent ref="syncComRef" :platType="'ywjg'" :syncType="'directive'" :selectedSize="Array.from(selectedItems.values()).length"
:hasSearchConditions="hasSearchConditions" :showReloadBtn="false" @viewTypeChanged="viewTypeChanged" @orgChanged="orgChanged"
@handleAsync="handleAsync" @handleAddAll="handleAddAll" @handleRemoveAll="handleRemoveAll">
<!-- 表单 -->
<template #searchFormSlot>
@ -164,7 +165,7 @@ import { getOrgInfo } from '/@/api/common/api';
import { list, asyncFunc } from '@/views/services/serviceDirective/ConfigServiceDirective.api';
import ConfigServiceDirectiveList from '@/views/services/serviceDirective/ConfigServiceDirectiveList.vue'
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'
import { selectedColumns } from './org.data';
import { selectedColumns } from './directive.data';

View File

@ -0,0 +1,96 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
const { createConfirm } = useMessage();
enum Api {
list = '/nuBaseInfo/nuBaseInfo/list',
save = '/nuBaseInfo/nuBaseInfo/add',
sync = '/nuBaseInfo/nuBaseInfo/sync',
batchAdd = '/nuBaseInfo/nuBaseInfo/batchAdd',
edit = '/nuBaseInfo/nuBaseInfo/edit',
deleteOne = '/nuBaseInfo/nuBaseInfo/delete',
deleteBatch = '/nuBaseInfo/nuBaseInfo/deleteBatch',
importExcel = '/nuBaseInfo/nuBaseInfo/importExcel',
exportXls = '/nuBaseInfo/nuBaseInfo/exportXls',
listByOrgCode = '/nuBaseInfo/nuBaseInfo/listByOrgCode',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
*
* @param params
*/
export const listByOrgCode = (params) => defHttp.get({ url: Api.listByOrgCode, params });
/**
*
* @param params
* @param isUpdate
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
};
/**
*
* @param params
*/
export const batchAdd = (params) => {
return defHttp.post({ url: Api.batchAdd, params });
};
/**
*
* @param params
* @param handleSuccess
*/
export const deleteOne = (params, handleSuccess) => {
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
handleSuccess();
});
};
/**
*
* @param params
* @param handleSuccess
*/
export const batchDelete = (params, handleSuccess) => {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
handleSuccess();
});
},
});
};
/**
*
* @param params orgCode机构编码
*/
export const asyncFunc = (params) => {
return defHttp.post({ url: Api.sync, params });
};

View File

@ -0,0 +1,65 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '护理单元名称',
align: "center",
dataIndex: 'nuName'
},
{
title: '护理单元编码',
align: "center",
dataIndex: 'nuId'
},
{
title: '区域标签',
align: "center",
dataIndex: 'areaFlag_dictText'
},
// {
// title: '使用状态',
// align: "center",
// dataIndex: 'status_dictText',
// width:100
// },
];
//已选择列表数据
export const selectedColumns: BasicColumn[] = [
{
title: '护理单元名称',
align: "center",
dataIndex: 'nuName'
},
{
title: '护理单元编码',
align: "center",
dataIndex: 'nuId'
},
{
title: '区域标签',
align: "center",
dataIndex: 'areaFlag_dictText'
},
// {
// title: '使用状态',
// align: "center",
// dataIndex: 'status_dictText'
// },
// {
// title: '操作',
// dataIndex: 'action',
// key: 'action',
// width: 60,
// fixed: 'right',
// },
];
// 高级查询数据
export const superQuerySchema = {
nuName: {title: '护理单元名称',order: 0,view: 'text', type: 'string',},
areaFlag: {title: '区域标签',order: 1,view: 'list', type: 'string',dictCode: 'nu_type',},
status: {title: '使用状态',order: 2,view: 'list', type: 'string',dictCode: 'nu_status',},
};

View File

@ -0,0 +1,289 @@
<template>
<div class="p-2">
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> -->
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
<!-- 表单区域 -->
<NuBaseInfoModal ref="registerModal" :orgCode="orgCode" @success="handleSuccess"></NuBaseInfoModal>
<!-- 批量新增 -->
<a-modal v-model:open="batchAddOpen" title="批量新增" :ok-text="'确认'" :cancel-text="'取消'" @ok="handleOk">
<a-form layout="horizontal" :label-col="{ span: 8 }" :wrapper-col="{ span: 12 }" style="margin-top: 20px;">
<template v-for="item in nuTypeOptions" :key="item.value">
<a-form-item :label="item.text || item.label">
<a-input-number v-model:value="numberValues[item.value]" :min="0" style="width: 100%" />
</a-form-item>
</template>
</a-form>
</a-modal>
</div>
</template>
<script lang="ts" name="nuBaseInfo-nuBaseInfo" setup>
import { ref, reactive, onMounted } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './NuBaseInfo.data';
import { list, deleteOne, batchDelete, listByOrgCode, batchAdd } from './NuBaseInfo.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import NuBaseInfoModal from './components/NuBaseInfoModal.vue'
import { useUserStore } from '/@/store/modules/user';
import { JInput } from '/@/components/Form';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
import { useMessage } from "/@/hooks/web/useMessage";
import { initDictOptions } from '/@/utils/dict';
const { createMessage } = useMessage();
const nuTypeOptions = ref([
]);
const numberValues = ref({});
// numberValues
onMounted(async () => {
const dictData = await initDictOptions('nu_type', '');
nuTypeOptions.value = dictData.reduce((prev, next) => {
if (next && next['status'] == 0) {
prev.push({
text: next['text'] || next['label'],
value: next['value'],
});
}
return prev;
}, []);
nuTypeOptions.value.forEach(item => {
numberValues.value[item.value] = 0;
});
});
const props = defineProps({
orgCode: '',
});
const formRef = ref();
const batchAddOpen = ref(false)//
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '护理单元',
api: list,
columns,
canResize: false,
useSearchForm: false,
showIndexColumn: true,
showTableSetting: false,
pagination: false,
size: 'small',
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: async (params) => {
queryParam.izSync = '1'//
queryParam.orgCode = props.orgCode //
queryParam.pageSize = -1 //
queryParam.column = 'nuId' //
return Object.assign(params, queryParam);
},
}
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs: 24,
sm: 6,
xl: 6,
xxl: 6
});
const wrapperCol = reactive({
xs: 24,
sm: 18,
});
//
const superQueryConfig = reactive(superQuerySchema);
/**
* 高级查询事件
*/
function handleSuperQuery(params) {
Object.keys(params).map((k) => {
queryParam[k] = params[k];
});
searchQuery();
}
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 移除
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 批量移除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
},
{
label: '移除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
}
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
//
function handleBatchAdd() {
batchAddOpen.value = true
}
//
function handleOk() {
let arr = []
for (const key in numberValues.value) {
if (Object.hasOwnProperty.call(numberValues.value, key)) {
const value = numberValues.value[key];
arr.push({
type: key,
num: value
})
}
}
batchAdd({
orgCode: props.orgCode,
batchAddList: arr
}).then(res => {
batchAddOpen.value = false
reload()
})
}
defineExpose({
searchQuery,
batchHandleDelete,
handleAdd,
getDataSource,
handleBatchAdd,
reload,
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust {
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help) {
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
:deep(.ant-table-title) {
display: none !important;
}
</style>

View File

@ -0,0 +1,173 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="NuBaseInfoForm">
<a-row>
<a-col :span="24">
<a-form-item label="护理单元名称" v-bind="validateInfos.nuName" id="NuBaseInfoForm-nuName" name="nuName">
<a-input v-model:value="formData.nuName" placeholder="护理单元名称自动生成" allow-clear
:disabled="true"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="护理单元编码" v-bind="validateInfos.nuId" id="NuBaseInfoForm-nuId" name="nuId">
<a-input v-model:value="formData.nuId" placeholder="编码自动生成" allow-clear
:disabled="true"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="区域标签" v-bind="validateInfos.areaFlag" id="NuBaseInfoForm-areaFlag" name="areaFlag">
<j-dict-select-tag v-model:value="formData.areaFlag" dictCode="nu_type" placeholder="请选择区域标签ID"
allow-clear />
</a-form-item>
</a-col>
<!-- <a-col :span="24">
<a-form-item label="使用状态 0未使用 1占用 2入住 3退住 4留床" v-bind="validateInfos.status" id="NuBaseInfoForm-status" name="status">
<j-dict-select-tag v-model:value="formData.status" dictCode="nu_status" placeholder="请选择使用状态 0未使用 1占用 2入住 3退住 4留床" allow-clear />
</a-form-item>
</a-col> -->
</a-row>
</a-form>
</template>
</JFormContainer>
</a-spin>
</template>
<script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../NuBaseInfo.api';
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true },
orgCode: ''
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
nuName: '',
nuId: '',
areaFlag: '',
status: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = reactive({
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const disabled = computed(() => {
if (props.formBpm === true) {
if (props.formData.disabled === false) {
return false;
} else {
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
*/
function edit(record) {
nextTick(() => {
resetFields();
const tmpData = {};
Object.keys(formData).forEach((key) => {
if (record.hasOwnProperty(key)) {
tmpData[key] = record[key]
}
})
//
Object.assign(formData, tmpData);
});
}
/**
* 提交数据
*/
async function submitForm() {
try {
//
await validate();
} catch ({ errorFields }) {
if (errorFields) {
const firstField = errorFields[0];
if (firstField) {
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
}
}
return Promise.reject(errorFields);
}
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = formData;
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
if (!model.id) {
model.status = "0";
}
model.orgCode = props.orgCode
await saveOrUpdate(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success("暂存成功!");
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
padding: 14px;
}
</style>

View File

@ -0,0 +1,82 @@
<template>
<j-modal :title="title" :width="width" :maxHeight="`200px`" :visible="visible" @ok="handleOk"
:okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" okText="保存" cancelText="关闭">
<NuBaseInfoForm ref="registerForm" @ok="submitCallback" :orgCode="orgCode" :formDisabled="disableSubmit"
:formBpm="false"></NuBaseInfoForm>
</j-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import NuBaseInfoForm from './NuBaseInfoForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
const props = defineProps({
orgCode: ''
});
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style lang="less">
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>
<style lang="less" scoped></style>

View File

@ -0,0 +1,296 @@
<template>
<!--
selectedSize已选择条数
topTipText机构信息卡片收起时提示文字
showAddBtn:是否展示新增按钮
showSelectedArea:是否展示全部已选择未选择区域
hasSearchConditions是否存在搜索条件
viewTypeChanged源数据全部已选择未选择变更时的钩子函数
orgChanged机构变更钩子
handleAsync同步数据按钮
handleBatchAdd批量新增
-->
<SyncComponent ref="syncComRef" :syncType="'nuBaseInfo'" :selectedSize="listComRef?.getDataSource()?.length" :syncTipText="'同步(全部)'"
:leftTableML="'1px'" :rightTableML="'22px'" :batchRemoveText="'移除选中'" :showBatchAddBtn="true"
:leftListTipText="'已同步'" :rightListTipText="'待同步'" :showAddAllBtn="false" :showAddBtn="true"
:showResetDataBtn="false" :hasSearchConditions="hasSearchConditions" :topTipText="'点击展开机构详情'"
:showSelectedArea="false" @viewTypeChanged="viewTypeChanged" @orgChanged="orgChanged" @handleAdd="handleAdd"
@handleBatchAdd="handleBatchAdd" @handleRemoveAll="handleRemoveAll" @handleAsync="handleAsync"
@handleReload="handleReload">
<!-- 业务机构数据列表 -->
<template #sourceTableSlot>
<a-table style="margin-top: 8px;" size="small" :columns="selectedColumns"
:dataSource="Array.from(selectedItems.values())" :pagination="false" :scroll="{ y: '55vh' }">
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'action'">
<a-popconfirm placement="left" ok-text="确认" cancel-text="取消"
@confirm="handleRemoveFromRight(record.id)">
<template #title>
<span>是否确认移除</span>
</template>
<a-button type="link" danger size="small"
:disabled="initialDataIds.includes(record.id)">移除</a-button>
</a-popconfirm>
</template>
<template v-else-if="column.dataIndex === 'mp3File'">
<span v-if="!record.mp3File" style="font-size: 12px;font-style: italic;">无文件</span>
<audio controls v-else style="width: 100%; max-width: 300px; height: 40px;">
<source :src="getFileAccessHttpUrl(record.mp3File)">
</audio>
</template>
<template v-else-if="column.dataIndex === 'mp4File'">
<span v-if="!record.mp4File" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else type="primary" size="small" @click="openVideoModal(record.mp4File)">
播放视频
</a-button>
</template>
<template v-else-if="column.dataIndex === 'bodyTagList'">
<span v-if="!record.bodyTagList || record.bodyTagList.length === 0"
style="font-size: 12px;font-style: italic;">-</span>
<template v-else>
{{record.bodyTagList.map(item => item.tagName).join('、')}}
</template>
</template>
<template v-else-if="column.dataIndex === 'emotionTagList'">
<span v-if="!record.emotionTagList || record.emotionTagList.length === 0"
style="font-size: 12px;font-style: italic;">-</span>
<template v-else>
{{record.emotionTagList.map(item => item.tagName).join('、')}}
</template>
</template>
<template v-else-if="column.dataIndex === 'previewFileMedia'">
<span v-if="!record.previewFileMedia" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="testOrgInfo.url + record.previewFileMedia"
style="max-width: 50px; max-height: 50px;" />
</template>
<template v-else-if="column.dataIndex === 'immediateFileMedia'">
<span v-if="!record.immediateFileMedia" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="testOrgInfo.url + record.immediateFileMedia"
style="max-width: 50px; max-height: 50px;" />
</template>
</template>
</a-table>
</template>
<!-- 业务平台数据列表 -->
<template #businessTableSlot>
<NuBaseInfoList style="margin-top: -18px;" ref="listComRef" v-if="syncComRef?.orgData?.orgCode"
:key="syncComRef?.orgData?.orgCode" :orgCode="syncComRef?.orgData?.orgCode"></NuBaseInfoList>
</template>
</SyncComponent>
<a-modal v-model:visible="showVideoModal" title="视频播放" :footer="null" @cancel="closeVideoModal"
:bodyStyle="{ padding: '0', maxHeight: '80vh', overflow: 'auto' }">
<video controls style="width: 100%; max-height: '70vh'; display: block; margin: 0 auto;">
<source :src="videoUrl">
您的浏览器不支持视频播放
</video>
</a-modal>
</template>
<script setup name="synchronization-nubaseinfo" lang="ts">
/**
*说明
* 如何获取当前机构信息 syncComRef?.value?.orgData
*/
import { ref, reactive, computed, onBeforeMount } from 'vue'
import SyncComponent from '/@/components/Sync/SyncComponent.vue'
import { useMessage } from "/@/hooks/web/useMessage";
import { getOrgInfo } from '/@/api/common/api';
//
import { list, asyncFunc, listByOrgCode } from './NuBaseInfo.api';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'
import { selectedColumns } from './NuBaseInfo.data'
import NuBaseInfoList from './NuBaseInfoList.vue'
// >>>>>>>>>>>>>
const { createMessage } = useMessage();
const syncComRef = ref(null)
const sourceOrgCode = import.meta.env.VITE_SYTJGBM
const labelCol = reactive({
xs: 24,
sm: 4,
xl: 6,
xxl: 5
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
const testOrgInfo = ref({})
// <<<<<<<<<<<<<
// >>>>>>>>>>>>>
const listComRef = ref();
const initialDataIds = ref<string[]>([]);//
const selectedItems = ref(new Map<string | number, any>());//
const queryParam = ref({ viewType: 'all' })//
const showVideoModal = ref(false);
const videoUrl = ref('');
//
const hasSearchConditions = computed(() => {
return Object.keys(queryParam.value).some(key =>
key !== 'viewType' && queryParam.value[key] !== undefined && queryParam.value[key] !== ''
);
});
/**
* 机构变更
*/
const orgChanged = async (org) => {
//
selectedItems.value.clear();
//
initialDataIds.value = [];
try {
//
const res = await listByOrgCode({ dataSourceCode: org.orgCode, pageNo: 1, pageSize: -1 });
//
if (res.records && res.records.length > 0) {
const newRecords = res.records;
newRecords.forEach(record => {
selectedItems.value.set(record.id, record);
if (!syncComRef?.value?.orgData?.operationStartTime || new Date() >= new Date(syncComRef?.value?.orgData?.operationStartTime)) {
initialDataIds.value.push(record.id);
}
});
//
listComRef.value?.updateSelection?.(newRecords);
} else {
//
selectedItems.value.clear();
listComRef.value?.updateSelection?.([]);
}
//
syncComRef?.value?.resetOrgSelectedCon(false);
} catch (err) {
createMessage.error('机构数据查询失败');
//
selectedItems.value.clear();
listComRef.value?.updateSelection?.([]);
}
}
/**
* 查询
*/
function searchQuery() {
listComRef.value.reload();
}
/**
* 重置
* 子组件代码会自动触发reload方法
* watch(() => props.queryParams, (newParams) => {
reload();
}, { deep: true });
*/
function searchReset() {
let vt = queryParam.value.viewType
queryParam.value = { viewType: vt }
}
/**
* 源数据的全部已选择未选择变更时触发
* @param v_ allselectedunselected
*/
const viewTypeChanged = (v_) => {
queryParam.value.viewType = v_
//queryParam
}
const handleSelectChange = (items: Map<string | number, any>) => {
selectedItems.value = new Map(items);
};
const handleRemoveFromRight = (key: string | number) => {
selectedItems.value.delete(key);
listComRef.value?.removeSelectedItem?.(key);
};
const openVideoModal = (url: string) => {
videoUrl.value = getFileAccessHttpUrl(url);
showVideoModal.value = true;
};
const closeVideoModal = () => {
showVideoModal.value = false;
videoUrl.value = '';
};
//
const handleReload = () => {
listComRef?.value?.reload();
orgChanged(syncComRef?.value?.orgData)
}
//
const handleAsync = async () => {
await asyncFunc({ orgCode: syncComRef?.value?.orgData?.orgCode });
//
syncComRef?.value?.refreshHistory()
createMessage.success("同步结果请在同步历史中查看!");
};
//
const handleAdd = () => {
listComRef.value.handleAdd();
}
//
const handleBatchAdd = () => {
listComRef.value.handleBatchAdd();
}
//
const handleRemoveAll = () => {
listComRef?.value?.batchHandleDelete()
}
// <<<<<<<<<<<<<
onBeforeMount(() => {
getOrgInfo({ orgCode: import.meta.env.VITE_SYTJGBM }).then(res => {
testOrgInfo.value = res
})
})
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust {
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help) {
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
.selected-list-container {
:deep(.ant-table) {
width: 100% !important;
max-width: 100%;
}
}
</style>