服务指令同步页面样式调整

This commit is contained in:
1378012178@qq.com 2025-07-29 09:09:15 +08:00
parent 59117b9a27
commit b9c088fba4
5 changed files with 362 additions and 235 deletions

View File

@ -50,13 +50,13 @@
placeholder="请选择情绪标签" allowClear /> placeholder="请选择情绪标签" allowClear />
</a-form-item> </a-form-item>
</a-col> --> </a-col> -->
<a-col :lg="6"> <!-- <a-col :lg="6">
<a-form-item name="izEnabled"> <a-form-item name="izEnabled">
<template #label><span title="是否启用">是否启用</span></template> <template #label><span title="是否启用">是否启用</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.izEnabled" dictCode="iz_enabled" <j-dict-select-tag type='list' v-model:value="queryParam.izEnabled" dictCode="iz_enabled"
:ignoreDisabled="true" placeholder="请选择是否启用" allowClear /> :ignoreDisabled="true" placeholder="请选择是否启用" allowClear />
</a-form-item> </a-form-item>
</a-col> </a-col> -->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6"> <a-col :lg="6">
@ -122,6 +122,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
pageSizeOptions: ['10', '20', '50', '100'], pageSizeOptions: ['10', '20', '50', '100'],
}, },
beforeFetch: async (params) => { beforeFetch: async (params) => {
queryParam.izEnabled = '0'
return Object.assign(params, queryParam); return Object.assign(params, queryParam);
}, },
actionColumn: { actionColumn: {
@ -163,9 +164,7 @@ function searchReset() {
function init(record) { function init(record) {
console.log("🚀 ~ init ~ record:", record)
queryParam.dataSourceCode = record.orgCode; queryParam.dataSourceCode = record.orgCode;
console.log("🚀 ~ init ~ queryParam:", queryParam)
reload(); reload();
} }

View File

@ -17,7 +17,12 @@
style="margin-left: 8px">重置</a-button> style="margin-left: 8px">重置</a-button>
</a-col> </a-col>
<a-col :lg="12" style="text-align: right;"> <a-col :lg="12" style="text-align: right;">
<a-button type="primary" preIcon="ant-design:cloud-sync-outlined" @click="handleJingxiang">镜像</a-button> <a-button type="primary" preIcon="ant-design:cloud-sync-outlined" @click="handleJingxiang"
style="margin-right: 10px;">镜像</a-button>
<a-badge :count="609" style="margin-right: 10px;">
<a-button type="primary" preIcon="ant-design:eye-outlined" style="margin-right: 10px;"
@click="handleJingxiang">查看可新增指令</a-button>
</a-badge>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>

View File

@ -1,255 +1,123 @@
<template> <template>
<div class="p-2" style="padding: 10px;"> <div class="container2 jeecg-basic-table-form-container">
<a-steps v-model:current="stepVal" size="small" style="margin: 0; width: 95%; margin: 0 auto;"> <div class="left">
<a-step title="功能说明" disabled /> <a-card class="top">
<a-step title="选择源数据业务平台" disabled /> <div class="source-platform">
<a-step title="选择服务指令" disabled /> <span>源平台</span>
<a-step title="选择目标业务平台" disabled /> <a-button type="primary" preIcon="ant-design:plus-outlined" @click="showOrgListModal"
</a-steps> size="small">请选择</a-button>
</div> </div>
</a-card>
<!-- 第一步功能说明 --> <a-card class="bottom">
<div v-show="stepVal === 0" class="step1-container"> <div class="source-platform">
<div class="step1-box"> <span>目标平台</span>
<InfoCircleOutlined class="step1-icon" /> <a-button type="primary" preIcon="ant-design:plus-outlined" @click="showOrgListModal"
<h3 class="step1-heading">服务指令同步 · 镜像功能</h3> size="small">请选择</a-button>
<ul class="step1-points">
<li><b>作用</b>服务指令分发至业务平台</li>
<li><b>流程</b>选择源数据业务平台 选择服务指令 选择目标业务平台</li>
<li><b>确认</b>点击右下角确认按钮开始自动同步</li>
<li><b>注意</b>如有不熟悉功能按键可在对应界面上方查看操作指引</li>
</ul>
</div> </div>
</a-card>
</div> </div>
<!-- 第二步选择源数据机构 --> <a-card class="right">
<div v-show="stepVal === 1"> <div class="source-platform">
<div style="margin: 10px 0 16px 100px; display: flex; align-items: center; font-size: 16px; color: #8B0000;"> <span>指令镜像</span>
<InfoCircleOutlined style="color: #1890ff; margin-right: 6px;" />
<span
style="padding-right: 60px;">操作指引1如何选择源数据平台点击对应机构卡片即可2如何进入服务指令选择页面请点击页面右下方下一步按钮3详情按钮查看对应平台现有服务指令</span>
</div> </div>
<OrgListCom class="step-content" ref="orgListComRef" :showChoose="true" @handleOrgDetail="handleDetail" </a-card>
@handleOrgChoose="orgSourceChangedFunc" /> <a-modal v-model:visible="orgListVisible" title="选择源平台" width="800px" :footer="null">
<OrgListCom class="step-content" ref="orgListComRef" :showChoose="true" @handleOrgChoose="handleOrgChoose" />
</a-modal>
</div> </div>
<!-- 第三步选择服务指令 -->
<div v-show="stepVal === 2">
<div style="margin: 10px 0 16px 100px; display: flex; align-items: center; font-size: 16px; color: #8B0000;">
<InfoCircleOutlined style="color: #1890ff; margin-right: 6px;" />
<span
style="padding-right: 60px;">操作指引1如何选择服务指令将需要同步的服务指令通过选择一键全选按钮添加至右侧已选择列表中,如需移除请点击移除全部移除按钮2搜索区域可对左侧列表进行筛选3左侧列表上方全部/未选择可快速切换源数据列表便于更清晰的查看需要处理的服务指令</span>
</div>
<DirectiveChooseCom ref="directiveChooseRef"></DirectiveChooseCom>
</div>
<!-- 第四步选择目标机构 -->
<div v-show="stepVal === 3" style="overflow-x: hidden;">
<div style="margin: 10px 0 16px 100px; display: flex; align-items: center; font-size: 16px; color: #8B0000;">
<InfoCircleOutlined style="color: #1890ff; margin-right: 6px;" />
<span
style="padding-right: 60px;">操作指引1如何选择目标业务平台在右侧卡片中通过点击卡片方式选择需要同步指令的目标平台可多选也可通过全选/清空功能按钮进行快捷操作2左侧列表为待同步服务指令3点击右下方确认按钮开始自动同步同步只会将对应平台未有指令进行新增不会改变其原有指令字段</span>
</div>
<a-row :gutter="24" style="padding-left: 20px;padding-right: 20px;">
<a-col :lg="12" :sm="24">
<!-- 引用表格 -->
<a-tag color="green" style="margin-left: 10px;margin-top: 10px;">待同步 {{ leftList?.length }} </a-tag>
<BasicTable :dataSource="leftList" :columns="columns" size="small" :scroll="{ y: '61vh' }"
:showIndexColumn="false"
:pagination="{ current: 1, pageSize: 50, total: leftList.length, showSizeChanger: true, pageSizeOptions: ['10', '20', '50', '100'] }">
</BasicTable>
</a-col>
<a-col :lg="12" :sm="24">
<div style="display: flex; justify-content: space-between; align-items: center; margin-top: 10px;">
<!-- 目标平台标签保持在当前位置 -->
<a-tag color="orange" style="margin-left: 20px;">
目标平台 - 已选择 {{ targetOrgListComRef?.selectedOrgs?.length }}
</a-tag>
<!-- 两个按钮靠右显示 -->
<div style="margin-right: 30px;">
<a-button type="primary" size="small" style="margin-left: 10px;"
@click="targetOrgListComRef?.checkAllOrEmpty(true)">全选</a-button>
<a-button type="primary" size="small" style="margin-left: 10px;"
@click="targetOrgListComRef?.checkAllOrEmpty(false)">清空</a-button>
</div>
</div>
<OrgListCom ref="targetOrgListComRef" :layout="'half'" :excludeOrgCode="orgInfo[0]?.orgCode"
:allowMultipleSelection="true" :showChoose="true" @handleOrgDetail="handleDetail"
@handleOrgChoose="orgTargetChangedFunc" />
</a-col>
</a-row>
</div>
<ConfigServiceDirectiveListModal class="step-content" ref="configServiceDirectiveListModal" />
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watch, toRaw } from 'vue'; import { ref } from 'vue';
import { InfoCircleOutlined } from '@ant-design/icons-vue';
import OrgListCom from '/@/views/synchronization/directive/orgCom/OrgListCom.vue'; import OrgListCom from '/@/views/synchronization/directive/orgCom/OrgListCom.vue';
import ConfigServiceDirectiveListModal from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirectiveListModal.vue';
import DirectiveChooseCom from '/@/views/synchronization/directive/serviceDirective/DirectiveChooseCom.vue'
import { useMessage } from '/@/hooks/web/useMessage';
import { columns } from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirective.data';
import { BasicTable } from '/@/components/Table';
import { syncDirective } from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api';
const emit = defineEmits(['closeModal']); const orgListVisible = ref(false);
const stepVal = ref(0); const orgListComRef = ref();
const configServiceDirectiveListModal = ref();
const orgInfo = ref([])
const { createMessage } = useMessage();
const directiveChooseRef = ref()
const leftList = ref<any[]>([]);
const targetOrgListComRef = ref()
const syncOrgs = ref([])
function init(record: any) {
//
function showOrgListModal() {
orgListVisible.value = true;
} }
function handleDetail(record: any) { //
configServiceDirectiveListModal.value.init(record); function handleOrgChoose(orgInfo_) {
configServiceDirectiveListModal.value.disableSubmit = true; orgListVisible.value = false;
//
} }
function changeStepVal(isAdd) {
if (isAdd) {
if (stepVal.value == 1 && orgInfo.value.length < 1) {
createMessage.warning('请选择源数据机构!');
return
}
if (stepVal.value == 2) {
if (toRaw(directiveChooseRef.value?.rightList).length == 0) {
createMessage.warning('请选择服务指令!');
return
} else {
leftList.value = [...directiveChooseRef.value?.rightList];
}
}
stepVal.value = stepVal.value + 1
} else {
stepVal.value = stepVal.value - 1
}
}
///
function orgSourceChangedFunc(orgInfo_) {
orgInfo.value = orgInfo_
directiveChooseRef.value?.controlShowJSCom()
targetOrgListComRef.value?.reload()
directiveChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
}
///
function orgTargetChangedFunc(orgInfo_) {
syncOrgs.value = orgInfo_
}
watch(
() => stepVal.value,
(newstepVal, oldValue) => {
if (newstepVal == 2 && oldValue == 1) {
// targetOrgListComRef.value?.reload()
// directiveChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
}
if (newstepVal == 3) {
targetOrgListComRef.value?.checkAllOrEmpty(false)
}
}
);
//
function syncFunc() {
if (!targetOrgListComRef.value?.selectedOrgs?.length) {
createMessage.warning('请选择业务平台')
} else {
syncDirective({
dataSourceCode: orgInfo.value[0].orgCode,
syncIds: leftList.value.map(d => d.id).join(','),
syncOrgCodes: syncOrgs.value.map(o => o.orgCode).join(','),
})
createMessage.success('已开始自动同步')
emit('closeModal')
}
}
defineExpose({
init,
stepVal,
changeStepVal,
syncFunc,
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.step1-container { .jeecg-basic-table-form-container {
display: flex; padding: 0;
justify-content: center;
align-items: center; .table-page-search-submitButtons {
margin-top: 120px; display: block;
margin-bottom: 24px;
white-space: nowrap;
} }
.step1-box { .query-group-cust {
background: #fff; min-width: 100px !important;
padding: 24px; }
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); .query-group-split-cust {
text-align: center; width: 30px;
max-width: 500px; 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%; width: 100%;
} }
.step1-icon {
font-size: 48px;
color: #1890FF;
margin-bottom: 16px;
} }
.step1-heading { .container2 {
font-size: 22px; display: flex;
margin-bottom: 16px; margin: 1%;
color: #333; max-height: 85vh;
} }
.step1-points { .left {
list-style: none; display: flex;
padding: 0; flex-direction: column;
margin: 0; width: 18%;
text-align: left; margin-right: 1%;
} }
.step1-points li { .source-platform {
font-size: 16px; display: flex;
line-height: 1.8; align-items: center;
padding-left: 24px; justify-content: space-between;
position: relative;
margin-bottom: 12px;
} }
.step1-points li::before { .left .top {
content: counter(item) "."; flex: 0 0 28%;
counter-increment: item; margin-bottom: 1%;
position: absolute; //background-color: lightblue;
left: 0; /* 可根据需要修改 */
top: 0;
font-weight: bold;
color: #1890FF;
} }
ul.step1-points { .left .bottom {
counter-reset: item; flex: 1;
/* 占剩余部分 */
margin-bottom: 1%;
//background-color: lightgreen;
/* 可根据需要修改 */
} }
.step-content { .right {
padding: 0 100px; flex: 1;
width: 80%;
max-height: 85vh;
} }
/* 步骤条样式 */ :deep .ant-card-body{
:deep(.ant-steps) { padding:8px;
padding: 0;
}
:deep(.ant-steps-item) {
margin: 0;
} }
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<j-modal :title="title" :visible="visible" :fullscreen="true" width="80vw" :bodyStyle="{ padding: 0 }" <j-modal :title="title" :visible="visible" :fullscreen="true" width="100vw" :bodyStyle="{ padding: 0 }"
:maskClosable="false" :keyboard="false" wrapClassName="modal-fullscreen" @cancel="handleCancel"> :maskClosable="false" :keyboard="false" wrapClassName="modal-fullscreen" @cancel="handleCancel">
<template #footer> <template #footer>
<a-button @click="handleCancel">关闭</a-button> <a-button @click="handleCancel">关闭</a-button>
@ -34,7 +34,7 @@ const registerForm = ref<InstanceType<typeof SyncStepList>>();
* 编辑或初始化弹窗 * 编辑或初始化弹窗
*/ */
function init(record: any) { function init(record: any) {
title.value = '详情'; title.value = '镜像';
visible.value = true; visible.value = true;
nextTick(() => { nextTick(() => {
registerForm.value?.init(record); registerForm.value?.init(record);

View File

@ -0,0 +1,255 @@
<template>
<div class="p-2" style="padding: 10px;">
<a-steps v-model:current="stepVal" size="small" style="margin: 0; width: 95%; margin: 0 auto;">
<a-step title="功能说明" disabled />
<a-step title="选择源数据业务平台" disabled />
<a-step title="选择服务指令" disabled />
<a-step title="选择目标业务平台" disabled />
</a-steps>
</div>
<!-- 第一步功能说明 -->
<div v-show="stepVal === 0" class="step1-container">
<div class="step1-box">
<InfoCircleOutlined class="step1-icon" />
<h3 class="step1-heading">服务指令同步 · 镜像功能</h3>
<ul class="step1-points">
<li><b>作用</b>服务指令分发至业务平台</li>
<li><b>流程</b>选择源数据业务平台 选择服务指令 选择目标业务平台</li>
<li><b>确认</b>点击右下角确认按钮开始自动同步</li>
<li><b>注意</b>如有不熟悉功能按键可在对应界面上方查看操作指引</li>
</ul>
</div>
</div>
<!-- 第二步选择源数据机构 -->
<div v-show="stepVal === 1">
<div style="margin: 10px 0 16px 100px; display: flex; align-items: center; font-size: 16px; color: #8B0000;">
<InfoCircleOutlined style="color: #1890ff; margin-right: 6px;" />
<span
style="padding-right: 60px;">操作指引1如何选择源数据平台点击对应机构卡片即可2如何进入服务指令选择页面请点击页面右下方下一步按钮3详情按钮查看对应平台现有服务指令</span>
</div>
<OrgListCom class="step-content" ref="orgListComRef" :showChoose="true" @handleOrgDetail="handleDetail"
@handleOrgChoose="orgSourceChangedFunc" />
</div>
<!-- 第三步选择服务指令 -->
<div v-show="stepVal === 2">
<div style="margin: 10px 0 16px 100px; display: flex; align-items: center; font-size: 16px; color: #8B0000;">
<InfoCircleOutlined style="color: #1890ff; margin-right: 6px;" />
<span
style="padding-right: 60px;">操作指引1如何选择服务指令将需要同步的服务指令通过选择一键全选按钮添加至右侧已选择列表中,如需移除请点击移除全部移除按钮2搜索区域可对左侧列表进行筛选3左侧列表上方全部/未选择可快速切换源数据列表便于更清晰的查看需要处理的服务指令</span>
</div>
<DirectiveChooseCom ref="directiveChooseRef"></DirectiveChooseCom>
</div>
<!-- 第四步选择目标机构 -->
<div v-show="stepVal === 3" style="overflow-x: hidden;">
<div style="margin: 10px 0 16px 100px; display: flex; align-items: center; font-size: 16px; color: #8B0000;">
<InfoCircleOutlined style="color: #1890ff; margin-right: 6px;" />
<span
style="padding-right: 60px;">操作指引1如何选择目标业务平台在右侧卡片中通过点击卡片方式选择需要同步指令的目标平台可多选也可通过全选/清空功能按钮进行快捷操作2左侧列表为待同步服务指令3点击右下方确认按钮开始自动同步同步只会将对应平台未有指令进行新增不会改变其原有指令字段</span>
</div>
<a-row :gutter="24" style="padding-left: 20px;padding-right: 20px;">
<a-col :lg="12" :sm="24">
<!-- 引用表格 -->
<a-tag color="green" style="margin-left: 10px;margin-top: 10px;">待同步 {{ leftList?.length }} </a-tag>
<BasicTable :dataSource="leftList" :columns="columns" size="small" :scroll="{ y: '61vh' }"
:showIndexColumn="false"
:pagination="{ current: 1, pageSize: 50, total: leftList.length, showSizeChanger: true, pageSizeOptions: ['10', '20', '50', '100'] }">
</BasicTable>
</a-col>
<a-col :lg="12" :sm="24">
<div style="display: flex; justify-content: space-between; align-items: center; margin-top: 10px;">
<!-- 目标平台标签保持在当前位置 -->
<a-tag color="orange" style="margin-left: 20px;">
目标平台 - 已选择 {{ targetOrgListComRef?.selectedOrgs?.length }}
</a-tag>
<!-- 两个按钮靠右显示 -->
<div style="margin-right: 30px;">
<a-button type="primary" size="small" style="margin-left: 10px;"
@click="targetOrgListComRef?.checkAllOrEmpty(true)">全选</a-button>
<a-button type="primary" size="small" style="margin-left: 10px;"
@click="targetOrgListComRef?.checkAllOrEmpty(false)">清空</a-button>
</div>
</div>
<OrgListCom ref="targetOrgListComRef" :layout="'half'" :excludeOrgCode="orgInfo[0]?.orgCode"
:allowMultipleSelection="true" :showChoose="true" @handleOrgDetail="handleDetail"
@handleOrgChoose="orgTargetChangedFunc" />
</a-col>
</a-row>
</div>
<ConfigServiceDirectiveListModal class="step-content" ref="configServiceDirectiveListModal" />
</template>
<script lang="ts" setup>
import { ref, watch, toRaw } from 'vue';
import { InfoCircleOutlined } from '@ant-design/icons-vue';
import OrgListCom from '/@/views/synchronization/directive/orgCom/OrgListCom.vue';
import ConfigServiceDirectiveListModal from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirectiveListModal.vue';
import DirectiveChooseCom from '/@/views/synchronization/directive/serviceDirective/DirectiveChooseCom.vue'
import { useMessage } from '/@/hooks/web/useMessage';
import { columns } from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirective.data';
import { BasicTable } from '/@/components/Table';
import { syncDirective } from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api';
const emit = defineEmits(['closeModal']);
const stepVal = ref(0);
const configServiceDirectiveListModal = ref();
const orgInfo = ref([])
const { createMessage } = useMessage();
const directiveChooseRef = ref()
const leftList = ref<any[]>([]);
const targetOrgListComRef = ref()
const syncOrgs = ref([])
function init(record: any) {
}
function handleDetail(record: any) {
configServiceDirectiveListModal.value.init(record);
configServiceDirectiveListModal.value.disableSubmit = true;
}
function changeStepVal(isAdd) {
if (isAdd) {
if (stepVal.value == 1 && orgInfo.value.length < 1) {
createMessage.warning('请选择源数据机构!');
return
}
if (stepVal.value == 2) {
if (toRaw(directiveChooseRef.value?.rightList).length == 0) {
createMessage.warning('请选择服务指令!');
return
} else {
leftList.value = [...directiveChooseRef.value?.rightList];
}
}
stepVal.value = stepVal.value + 1
} else {
stepVal.value = stepVal.value - 1
}
}
///
function orgSourceChangedFunc(orgInfo_) {
orgInfo.value = orgInfo_
directiveChooseRef.value?.controlShowJSCom()
targetOrgListComRef.value?.reload()
directiveChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
}
///
function orgTargetChangedFunc(orgInfo_) {
syncOrgs.value = orgInfo_
}
watch(
() => stepVal.value,
(newstepVal, oldValue) => {
if (newstepVal == 2 && oldValue == 1) {
// targetOrgListComRef.value?.reload()
// directiveChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
}
if (newstepVal == 3) {
targetOrgListComRef.value?.checkAllOrEmpty(false)
}
}
);
//
function syncFunc() {
if (!targetOrgListComRef.value?.selectedOrgs?.length) {
createMessage.warning('请选择业务平台')
} else {
syncDirective({
dataSourceCode: orgInfo.value[0].orgCode,
syncIds: leftList.value.map(d => d.id).join(','),
syncOrgCodes: syncOrgs.value.map(o => o.orgCode).join(','),
})
createMessage.success('已开始自动同步')
emit('closeModal')
}
}
defineExpose({
init,
stepVal,
changeStepVal,
syncFunc,
});
</script>
<style lang="less" scoped>
.step1-container {
display: flex;
justify-content: center;
align-items: center;
margin-top: 120px;
}
.step1-box {
background: #fff;
padding: 24px;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
text-align: center;
max-width: 500px;
width: 100%;
}
.step1-icon {
font-size: 48px;
color: #1890FF;
margin-bottom: 16px;
}
.step1-heading {
font-size: 22px;
margin-bottom: 16px;
color: #333;
}
.step1-points {
list-style: none;
padding: 0;
margin: 0;
text-align: left;
}
.step1-points li {
font-size: 16px;
line-height: 1.8;
padding-left: 24px;
position: relative;
margin-bottom: 12px;
}
.step1-points li::before {
content: counter(item) ".";
counter-increment: item;
position: absolute;
left: 0;
top: 0;
font-weight: bold;
color: #1890FF;
}
ul.step1-points {
counter-reset: item;
}
.step-content {
padding: 0 100px;
}
/* 步骤条样式 */
:deep(.ant-steps) {
padding: 0;
}
:deep(.ant-steps-item) {
margin: 0;
}
</style>