From 51f72af404a37ce4f712594c974b53be7f173122 Mon Sep 17 00:00:00 2001
From: "1378012178@qq.com" <1378012178@qq.com>
Date: Wed, 30 Jul 2025 13:40:04 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=8C=87=E4=BB=A4=E5=90=8C?=
=?UTF-8?q?=E6=AD=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../directive/orgCom/OrgListCom.vue | 22 +-
.../ConfigServiceDirective.api.ts | 12 +-
.../ConfigServiceDirective.data.ts | 246 +++++++++++-
.../serviceDirective/DirectiveChooseCom.vue | 264 +++++++++++--
.../DirectiveChooseCom分步骤版本.vue | 373 ++++++++++++++++++
.../directive/syncStep/SyncStepList.vue | 328 +++++++++++++--
6 files changed, 1155 insertions(+), 90 deletions(-)
create mode 100644 src/views/synchronization/directive/serviceDirective/DirectiveChooseCom分步骤版本.vue
diff --git a/src/views/synchronization/directive/orgCom/OrgListCom.vue b/src/views/synchronization/directive/orgCom/OrgListCom.vue
index 399644b..95babf6 100644
--- a/src/views/synchronization/directive/orgCom/OrgListCom.vue
+++ b/src/views/synchronization/directive/orgCom/OrgListCom.vue
@@ -1,6 +1,7 @@
-
+
+
@@ -29,7 +30,7 @@
机构地址:{{ item.comRegisterAddress }}
-
+

详情
@@ -51,7 +52,7 @@
+ v-show="props.layout == 'full' && pageSize != -1">
共 {{ orgTableList.total }} 条数据
@@ -66,6 +67,8 @@ import { getOrgInfo } from '/@/views/admin/orgapplyinfo/OrgApplyInfo.api'
const props = defineProps({
showChoose: { type: Boolean, default: false },
+ pageSize: { type: Number, default: 8 },
+ showDetail: { type: Boolean, default: false },
title: { type: String, default: '' },
allowMultipleSelection: { type: Boolean, default: false }, // 多选控制
layout: { type: String, default: 'full' }, // 控制布局: 'full' 或 'half'
@@ -76,7 +79,7 @@ const emit = defineEmits(['handleOrgDetail', 'handleOrgChoose'])
const orgTableList = ref
({ records: [], total: 0 })
const queryParam = reactive({})
-const pageParams = ref({ pageNo: 1, pageSize: 8 })
+const pageParams = ref({ pageNo: 1, pageSize: props.pageSize })
// 当前选中的卡片 ID 数组
const selectedOrgs = ref([])
@@ -95,10 +98,12 @@ function handleCardClick(item: any) {
// 单选模式:直接选中该卡片
selectedOrgs.value = [item] // 只保留当前选中的机构
}
- emit('handleOrgChoose', selectedOrgs.value) // 传递完整的选中机构信息
+ // emit('handleOrgChoose', selectedOrgs.value) // 传递完整的选中机构信息
}
}
-
+function commitOrgsInfo() {
+ emit('handleOrgChoose', selectedOrgs.value) // 传递完整的选中机构信息
+}
/** 点击详情 */
function handleDetail(item: any) {
emit('handleOrgDetail', item)
@@ -148,6 +153,9 @@ function checkAllOrEmpty(isCheckAll = true) {
emit('handleOrgChoose', selectedOrgs.value);
}
+function resetSeleted(orgs) {
+ selectedOrgs.value = [...orgs]
+}
// 初始化
onMounted(() => {
@@ -159,6 +167,8 @@ defineExpose({
searchReset,
selectedOrgs,
checkAllOrEmpty,
+ commitOrgsInfo,
+ resetSeleted
})
diff --git a/src/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api.ts b/src/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api.ts
index be0673f..62bd7ef 100644
--- a/src/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api.ts
+++ b/src/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api.ts
@@ -1,5 +1,5 @@
import { defHttp } from '/@/utils/http/axios';
-import { useMessage } from "/@/hooks/web/useMessage";
+import { useMessage } from '/@/hooks/web/useMessage';
const { createConfirm } = useMessage();
@@ -25,9 +25,9 @@ export const listByDS = (params) => defHttp.get({ url: Api.listByDS, params });
/**
* 同步
- * @param params
- * @returns
+ * @param params
+ * @returns
*/
-export const syncDirective = (params) => {
- return defHttp.get({ url: Api.syncDirective, params });
-};
\ No newline at end of file
+export const syncDirective = (dataSourceCode: string, params: any) => {
+ return defHttp.post({ url: `${Api.syncDirective}?dataSourceCode=${encodeURIComponent(dataSourceCode)}`, params });
+};
diff --git a/src/views/synchronization/directive/serviceDirective/ConfigServiceDirective.data.ts b/src/views/synchronization/directive/serviceDirective/ConfigServiceDirective.data.ts
index 970dc5f..a6708d9 100644
--- a/src/views/synchronization/directive/serviceDirective/ConfigServiceDirective.data.ts
+++ b/src/views/synchronization/directive/serviceDirective/ConfigServiceDirective.data.ts
@@ -106,6 +106,13 @@ export const columns: BasicColumn[] = [
];
export const sourceColumns: BasicColumn[] = [
+ {
+ title: '状态',
+ align: 'center',
+ dataIndex: 'izExist',
+ width: 70,
+ fixed: 'left',
+ },
{
title: '分类标签',
align: 'center',
@@ -146,28 +153,28 @@ export const sourceColumns: BasicColumn[] = [
align: 'center',
dataIndex: 'bodyTagList',
ellipsis: false,
- defaultHidden: true,
- // format(text, record, index) {
- // if (!!text) {
- // return text.map((item) => item.tagName).join('、');
- // } else {
- // return '-';
- // }
- // },
+ // defaultHidden: true,
+ format(text, record, index) {
+ if (!!text) {
+ return text.map((item) => item.tagName).join('、');
+ } else {
+ return '-';
+ }
+ },
},
{
title: '情绪标签',
align: 'center',
dataIndex: 'emotionTagList',
ellipsis: false,
- defaultHidden: true,
- // format(text, record, index) {
- // if (!!text) {
- // return text.map((item) => item.tagName).join('、');
- // } else {
- // return '-';
- // }
- // },
+ // defaultHidden: true,
+ format(text, record, index) {
+ if (!!text) {
+ return text.map((item) => item.tagName).join('、');
+ } else {
+ return '-';
+ }
+ },
},
{
title: '收费价格',
@@ -205,6 +212,213 @@ export const sourceColumns: BasicColumn[] = [
},
];
+export const targetSourceColumns: BasicColumn[] = [
+ {
+ title: '分类标签',
+ align: 'center',
+ dataIndex: 'instructionTagId_dictText',
+ customCell: (record, index, column) => {
+ if (record.instructionRowSpan != null) {
+ return { rowSpan: record.instructionRowSpan };
+ }
+ },
+ },
+ {
+ title: '服务类别',
+ align: 'center',
+ dataIndex: 'categoryId_dictText',
+ customCell: (record, index, column) => {
+ if (record.categoryRowSpan != null) {
+ return { rowSpan: record.categoryRowSpan };
+ }
+ },
+ },
+ {
+ title: '服务类型',
+ align: 'center',
+ dataIndex: 'typeId_dictText',
+ customCell: (record, index, column) => {
+ if (record.typeRowSpan != null) {
+ return { rowSpan: record.typeRowSpan };
+ }
+ },
+ },
+ {
+ title: '服务指令',
+ align: 'center',
+ dataIndex: 'directiveName',
+ },
+ {
+ title: '体型标签',
+ align: 'center',
+ dataIndex: 'bodyTagList',
+ ellipsis: false,
+ // defaultHidden: true,
+ format(text, record, index) {
+ if (!!text) {
+ return text.map((item) => item.tagName).join('、');
+ } else {
+ return '-';
+ }
+ },
+ },
+ {
+ title: '情绪标签',
+ align: 'center',
+ dataIndex: 'emotionTagList',
+ ellipsis: false,
+ // defaultHidden: true,
+ format(text, record, index) {
+ if (!!text) {
+ return text.map((item) => item.tagName).join('、');
+ } else {
+ return '-';
+ }
+ },
+ },
+ {
+ title: '收费价格',
+ align: 'center',
+ dataIndex: 'tollPrice',
+ defaultHidden: true,
+ },
+ {
+ title: '提成价格',
+ align: 'center',
+ dataIndex: 'comPrice',
+ defaultHidden: true,
+ },
+ {
+ title: '医保报销',
+ align: 'center',
+ dataIndex: 'izReimbursement_dictText',
+ defaultHidden: true,
+ },
+ {
+ title: '机构优惠',
+ align: 'center',
+ dataIndex: 'izPreferential_dictText',
+ defaultHidden: true,
+ },
+ {
+ title: '周期类型',
+ align: 'center',
+ dataIndex: 'cycleType_dictText',
+ },
+ {
+ title: '服务时长(分钟)',
+ align: 'center',
+ dataIndex: 'serviceDuration',
+ },
+];
+
+export const targetColumns: BasicColumn[] = [
+ {
+ title: '分类标签',
+ align: 'center',
+ dataIndex: 'instructionTagId_dictText',
+ customCell: (record, index, column) => {
+ if (record.instructionRowSpan != null) {
+ return { rowSpan: record.instructionRowSpan };
+ }
+ },
+ },
+ {
+ title: '服务类别',
+ align: 'center',
+ dataIndex: 'categoryId_dictText',
+ customCell: (record, index, column) => {
+ if (record.categoryRowSpan != null) {
+ return { rowSpan: record.categoryRowSpan };
+ }
+ },
+ },
+ {
+ title: '服务类型',
+ align: 'center',
+ dataIndex: 'typeId_dictText',
+ customCell: (record, index, column) => {
+ if (record.typeRowSpan != null) {
+ return { rowSpan: record.typeRowSpan };
+ }
+ },
+ },
+ {
+ title: '服务指令',
+ align: 'center',
+ dataIndex: 'directiveName',
+ },
+ {
+ title: '体型标签',
+ align: 'center',
+ dataIndex: 'bodyTagList',
+ ellipsis: false,
+ // defaultHidden: true,
+ format(text, record, index) {
+ if (!!text) {
+ return text.map((item) => item.tagName).join('、');
+ } else {
+ return '-';
+ }
+ },
+ },
+ {
+ title: '情绪标签',
+ align: 'center',
+ dataIndex: 'emotionTagList',
+ ellipsis: false,
+ // defaultHidden: true,
+ format(text, record, index) {
+ if (!!text) {
+ return text.map((item) => item.tagName).join('、');
+ } else {
+ return '-';
+ }
+ },
+ },
+ {
+ title: '收费价格',
+ align: 'center',
+ dataIndex: 'tollPrice',
+ defaultHidden: true,
+ },
+ {
+ title: '提成价格',
+ align: 'center',
+ dataIndex: 'comPrice',
+ defaultHidden: true,
+ },
+ {
+ title: '医保报销',
+ align: 'center',
+ dataIndex: 'izReimbursement_dictText',
+ defaultHidden: true,
+ },
+ {
+ title: '机构优惠',
+ align: 'center',
+ dataIndex: 'izPreferential_dictText',
+ defaultHidden: true,
+ },
+ {
+ title: '周期类型',
+ align: 'center',
+ dataIndex: 'cycleType_dictText',
+ },
+ {
+ title: '服务时长(分钟)',
+ align: 'center',
+ dataIndex: 'serviceDuration',
+ },
+ {
+ title: '同步类型',
+ align: 'center',
+ dataIndex: 'izExist',
+ width: 80,
+ fixed: 'right',
+ },
+];
+
// 高级查询数据
export const superQuerySchema = {
categoryId: { title: '服务类别', order: 0, view: 'list', type: 'string', dictCode: '' },
diff --git a/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom.vue b/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom.vue
index 4289ce6..4cdc7c9 100644
--- a/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom.vue
+++ b/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom.vue
@@ -5,7 +5,7 @@
-
+
分类标签
-
+
服务类别
-
+
服务类型
-
+
服务指令
@@ -63,7 +63,7 @@
:ignoreDisabled="true" placeholder="请选择是否启用" allowClear @select="reload()" />
-->
-
+
@@ -75,67 +75,130 @@
-
-
- 一键全选
- 全部移除
-
-
- 源数据 - {{ sourceOrgInfo.departName }}
+ 源平台 - {{ sourceOrgInfo.departName }}
+
全部
- 未选择
+ 可同步
+
+ 一键全选
+ :columns="targetChooseType == 'one' ? sourceColumns : targetSourceColumns" :scroll="{ y: '57vh' }">
-
+
+
+ 已存在
+ 可新增
+
选择
+
移除
- 已选择 {{ rightList.length }} 条
-
+
+ 目标平台 - {{ targetOrgs[0]?.departName }} - 已选择 {{ rightNeedAddList.length }} 条
+
+
+ 已选择 {{ rightNeedAddList.length }} 条
+
+
+
+ 已有
+ 待同步
+
+
+ 全部移除
+
+ 同步
+
+
+
+ 更新
+ 新增
+
+
+
-
+
+
+
+
目标机构 :{{ targetOrg?.departName }}
+
新增服务指令: {{ getNewCount() }} 条
+
更新服务指令: {{ getUpdateCount() }} 条
+
请选择"新增指令"需要同步的内容:
+
+ 全部
+ 业务字段
+ 指令资源
+
+
+
+
+
同步服务指令: {{ rightNeedAddList.length }} 条
+
请选择"服务指令"需要同步的内容:
+
+ 全部
+ 业务字段
+ 指令资源
+
+
+
diff --git a/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom分步骤版本.vue b/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom分步骤版本.vue
new file mode 100644
index 0000000..4289ce6
--- /dev/null
+++ b/src/views/synchronization/directive/serviceDirective/DirectiveChooseCom分步骤版本.vue
@@ -0,0 +1,373 @@
+
+
+
+
+
+
+ 一键全选
+ 全部移除
+
+
+
+
+
+ 源数据 - {{ sourceOrgInfo.departName }}
+
+ 全部
+ 未选择
+
+
+
+
+
+ {{text.map((item) =>
+ item.tagName).join('、')}}
+
+
+ {{text.map((item) =>
+ item.tagName).join('、')}}
+
+
+
+ 选择
+ 移除
+
+
+
+
+ 已选择 {{ rightList.length }} 条
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/synchronization/directive/syncStep/SyncStepList.vue b/src/views/synchronization/directive/syncStep/SyncStepList.vue
index fd9d40e..e6c5eab 100644
--- a/src/views/synchronization/directive/syncStep/SyncStepList.vue
+++ b/src/views/synchronization/directive/syncStep/SyncStepList.vue
@@ -3,46 +3,255 @@
+
+
+
+
+
+
+ {{ orgInfo[0]?.departName }}
+
+
+
+ {{ orgInfo[0]?.orgCode }}
+
+
+
+ 加盟时间:{{ orgInfo[0]?.franchiseTime?.substring(0, 10) }}
+ 机构负责人:{{ orgInfo[0]?.orgLeader }}
+ 负责人电话:{{ orgInfo[0]?.orgLeaderPhone }}
+ 机构地址:{{ orgInfo[0]?.comRegisterAddress
+ }}
+
+
+
+
+
+
+
+
+
+ {{ orgItem?.departName }}
+ 已选择
+
+
+
+ {{ orgItem?.orgCode }}
+
+
+
+ 加盟时间:{{ orgItem?.franchiseTime?.substring(0, 10) }}
+ 机构负责人:{{ orgItem?.orgLeader }}
+ 负责人电话:{{ orgItem?.orgLeaderPhone }}
+ 机构地址:{{ orgItem?.comRegisterAddress
+ }}
+
+
+
-
@@ -96,19 +305,43 @@ function handleOrgChoose(orgInfo_) {
justify-content: space-between;
}
+.zljx-platform {
+ display: flex;
+ flex-direction: column;
+ /* 改为垂直排列 */
+ gap: 8px;
+ /* 添加间距 */
+
+ .section-title {
+ font-size: 14px;
+ font-weight: 600;
+ color: #333;
+ position: relative;
+ padding-left: 12px;
+ }
+
+ .directive-choose-wrapper {
+ width: 100%;
+ /* 可以根据需要添加其他样式 */
+ }
+}
+
+.section-title {
+ font-size: 14px;
+ font-weight: 600;
+ color: #333;
+ position: relative;
+ padding-left: 12px;
+}
+
.left .top {
flex: 0 0 28%;
margin-bottom: 1%;
- //background-color: lightblue;
- /* 可根据需要修改 */
}
.left .bottom {
flex: 1;
- /* 占剩余部分 */
margin-bottom: 1%;
- //background-color: lightgreen;
- /* 可根据需要修改 */
}
.right {
@@ -117,7 +350,50 @@ function handleOrgChoose(orgInfo_) {
max-height: 85vh;
}
-:deep .ant-card-body{
- padding:8px;
+:deep .ant-card-body {
+ padding: 12px;
+}
+
+.step-content {
+ overflow: auto;
+ height: 70vh;
+}
+
+.zxClass {
+ font-size: 12px;
+ background: linear-gradient(to right, #1ea0fa, #017de9);
+ border-radius: 8px;
+ height: 25px;
+ color: white;
+ line-height: 25px;
+}
+
+.tbClass {
+ background: #f6f6f6;
+ padding: 8px;
+ border-radius: 5px;
+}
+
+.antTitle {
+ margin-top: 10px;
+ display: block;
+ font-size: 12px;
+}
+
+.ellipsis-one-lines {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.selected-card {
+ border: 2px solid #1890ff;
+ box-shadow: 0 0 2px rgba(24, 144, 255, 0.3);
+}
+
+.org-card {
+ margin-top: 8px;
}
\ No newline at end of file