长者标签
This commit is contained in:
parent
a0a069be47
commit
80dc18b7f3
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<div>
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
|
||||
|
@ -38,7 +38,7 @@
|
|||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<BasicTable @register="registerTable">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
</template>
|
||||
|
@ -66,11 +66,13 @@ import { useUserStore } from '/@/store/modules/user';
|
|||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { syncElderTag } from '/@/views/synchronization/eldertag/eldertag/ElderTag.api';
|
||||
|
||||
const props = defineProps({
|
||||
elderTagMainOrgInfo: {},
|
||||
existETIds: [],
|
||||
})
|
||||
const emit = defineEmits(['refreshExistIds']);
|
||||
const { createMessage, createConfirm } = useMessage();
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
|
@ -90,6 +92,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
queryParam.existElderTagIds = props.existETIds.map(item => item.id).join(',')
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
|
@ -136,20 +139,20 @@ function handlePull(record) {
|
|||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
// syncDirective(
|
||||
// record.orgCode,
|
||||
// {
|
||||
// syncIds: record.directiveId,
|
||||
// upIds: '',
|
||||
// syncOrgCodes: props.elderTagMainOrgInfo.orgCode,
|
||||
// syncOption: 'all',
|
||||
// }
|
||||
// ).then(res => {
|
||||
// createMessage.success('已开始自动同步,可在日志中查看同步结果!')
|
||||
// emit('refreshExistIds', props.elderTagMainOrgInfo)
|
||||
// }).catch(() => {
|
||||
// createMessage.error('镜像失败,请稍后再试')
|
||||
// })
|
||||
syncElderTag(
|
||||
record.sysOrgCode,
|
||||
{
|
||||
syncIds: record.tagId,
|
||||
upIds: '',
|
||||
syncOrgCodes: props.elderTagMainOrgInfo.orgCode,
|
||||
syncOption: 'all',
|
||||
}
|
||||
).then(res => {
|
||||
createMessage.success('已开始自动同步,可在日志中查看同步结果!')
|
||||
emit('refreshExistIds', props.elderTagMainOrgInfo)
|
||||
}).catch(() => {
|
||||
createMessage.error('镜像失败,请稍后再试')
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -197,17 +200,21 @@ function searchReset() {
|
|||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
searchReset,
|
||||
reload,
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
margin-bottom: 14px;
|
||||
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
margin-bottom: 0px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
@ -222,7 +229,7 @@ function searchReset() {
|
|||
}
|
||||
|
||||
.ant-form-item:not(.ant-form-item-with-help) {
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 14px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/elder/elderTag/list',
|
||||
save='/elder/elderTag/add',
|
||||
edit='/elder/elderTag/edit',
|
||||
save = '/elder/elderTag/add',
|
||||
edit = '/elder/elderTag/edit',
|
||||
deleteOne = '/elder/elderTag/delete',
|
||||
deleteBatch = '/elder/elderTag/deleteBatch',
|
||||
importExcel = '/elder/elderTag/importExcel',
|
||||
|
@ -38,11 +38,11 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
|
|||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
export const deleteOne = (params, handleSuccess) => {
|
||||
return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
|
@ -57,12 +57,12 @@ export const batchDelete = (params, handleSuccess) => {
|
|||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
|
@ -72,7 +72,7 @@ export const batchDelete = (params, handleSuccess) => {
|
|||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 列表接口 - 变更数据源
|
||||
|
@ -94,4 +94,4 @@ export const idListByDS = (params) => defHttp.get({ url: Api.idListByDS, params
|
|||
*/
|
||||
export const syncElderTag = (dataSourceCode: string, params: any) => {
|
||||
return defHttp.post({ url: `${Api.syncElderTag}?sourceOrgCode=${encodeURIComponent(dataSourceCode)}`, params });
|
||||
};
|
||||
};
|
||||
|
|
|
@ -20,12 +20,12 @@ export const columns: BasicColumn[] = [
|
|||
align: 'center',
|
||||
dataIndex: 'price',
|
||||
},
|
||||
{
|
||||
title: '图标',
|
||||
align: 'center',
|
||||
dataIndex: 'pic',
|
||||
customRender: render.renderImage,
|
||||
},
|
||||
// {
|
||||
// title: '图标',
|
||||
// align: 'center',
|
||||
// dataIndex: 'pic',
|
||||
// customRender: render.renderImage,
|
||||
// },
|
||||
{
|
||||
title: '排序',
|
||||
align: 'center',
|
||||
|
@ -66,6 +66,104 @@ export const columnsNoMedia: BasicColumn[] = [
|
|||
},
|
||||
];
|
||||
|
||||
export const sourceColumns: BasicColumn[] = [
|
||||
{
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
dataIndex: 'izExist',
|
||||
width: 70,
|
||||
fixed: 'left',
|
||||
},
|
||||
{
|
||||
title: '标签类型',
|
||||
align: 'center',
|
||||
dataIndex: 'type_dictText',
|
||||
},
|
||||
{
|
||||
title: '标签名称',
|
||||
align: 'center',
|
||||
dataIndex: 'tagName',
|
||||
},
|
||||
{
|
||||
title: '价格(元)',
|
||||
align: 'center',
|
||||
dataIndex: 'price',
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
align: 'center',
|
||||
dataIndex: 'sort',
|
||||
},
|
||||
{
|
||||
title: '是否启用',
|
||||
align: 'center',
|
||||
dataIndex: 'izEnabled_dictText',
|
||||
},
|
||||
];
|
||||
|
||||
export const targetSourceColumns: BasicColumn[] = [
|
||||
{
|
||||
title: '标签类型',
|
||||
align: 'center',
|
||||
dataIndex: 'type_dictText',
|
||||
},
|
||||
{
|
||||
title: '标签名称',
|
||||
align: 'center',
|
||||
dataIndex: 'tagName',
|
||||
},
|
||||
{
|
||||
title: '价格(元)',
|
||||
align: 'center',
|
||||
dataIndex: 'price',
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
align: 'center',
|
||||
dataIndex: 'sort',
|
||||
},
|
||||
{
|
||||
title: '是否启用',
|
||||
align: 'center',
|
||||
dataIndex: 'izEnabled_dictText',
|
||||
},
|
||||
];
|
||||
|
||||
export const targetColumns: BasicColumn[] = [
|
||||
{
|
||||
title: '标签类型',
|
||||
align: 'center',
|
||||
dataIndex: 'type_dictText',
|
||||
},
|
||||
{
|
||||
title: '标签名称',
|
||||
align: 'center',
|
||||
dataIndex: 'tagName',
|
||||
},
|
||||
{
|
||||
title: '价格(元)',
|
||||
align: 'center',
|
||||
dataIndex: 'price',
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
align: 'center',
|
||||
dataIndex: 'sort',
|
||||
},
|
||||
{
|
||||
title: '是否启用',
|
||||
align: 'center',
|
||||
dataIndex: 'izEnabled_dictText',
|
||||
},
|
||||
{
|
||||
title: '同步类型',
|
||||
align: 'center',
|
||||
dataIndex: 'izExist',
|
||||
width: 80,
|
||||
fixed: 'right',
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
type: { title: '标签类型', order: 0, view: 'text', type: 'string' },
|
||||
|
|
|
@ -59,7 +59,7 @@ import { ref, reactive, onMounted } from 'vue';
|
|||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './ElderTag.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ElderTag.api';
|
||||
import { listByDS } from './ElderTag.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import ElderTagModal from './components/ElderTagModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
@ -78,10 +78,18 @@ const mainOrgCode = ref()//标准标签库编码
|
|||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '长者标签',
|
||||
api: list,
|
||||
api: async (params) => {
|
||||
if (!queryParam.dataSourceCode) {
|
||||
return null
|
||||
}
|
||||
Object.assign(params, queryParam)
|
||||
const result = await listByDS(params);
|
||||
return result;
|
||||
},
|
||||
columns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
showActionColumn: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
|
@ -94,57 +102,24 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "长者标签",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: 24,
|
||||
sm: 4,
|
||||
xl: 6,
|
||||
xxl: 4
|
||||
xxl: 5
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
xl: 18,
|
||||
xxl: 19
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
|
@ -153,20 +128,6 @@ function handleDetail(record: Recordable) {
|
|||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
|
@ -203,17 +164,20 @@ function searchReset() {
|
|||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看指令库
|
||||
*/
|
||||
function handleDirectiveMainOpen() {
|
||||
registerModal.value?.openDM(mainOrgCode.value)
|
||||
function init(orgCode_) {
|
||||
searchReset()
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
queryParam.dataSourceCode = orgCode_
|
||||
}
|
||||
|
||||
// 添加音频结束监听
|
||||
onMounted(() => {
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
init
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
|
@ -36,23 +36,16 @@
|
|||
:showDMTip="true">
|
||||
</OrgListCom>
|
||||
|
||||
<ElderTagModal ref="configServiceDirectiveListModal" />
|
||||
<ElderTagModal ref="elderTagModal" />
|
||||
<SyncStepListModal ref="syncStepListModal" />
|
||||
<!-- <a-modal v-model:visible="logsVisible" title="日志" width="90vw"
|
||||
<a-drawer title="详情" width="85vw" v-model:visible="listVisible"
|
||||
:bodyStyle="{ height: '70vh', display: 'flex', flexDirection: 'column', overflow: 'auto' }"
|
||||
wrapClassName="org-list-modal" @cancel="handleCancelLogs">
|
||||
<a-row>
|
||||
<a-col :span="2" :push="22" style="margin-top: 15px;margin-left: 60px;">
|
||||
<a-button type="primary" @click="handleRefreshLogs" title="刷新">
|
||||
刷新
|
||||
</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
wrapClassName="org-list-modal" @cancel="handleCancelList">
|
||||
<ElderTagList ref="listRef"></ElderTagList>
|
||||
<template #footer>
|
||||
<a-button @click="handleCancelLogs" type="primary">关闭</a-button>
|
||||
<a-button @click="handleCancelLogs" type="primary" style="float:right;">关闭</a-button>
|
||||
</template>
|
||||
<AsyncListComponent ref="logsRef"></AsyncListComponent>
|
||||
</a-modal> -->
|
||||
</a-drawer>
|
||||
<a-drawer title="日志" width="85vw" v-model:visible="logsVisible"
|
||||
:bodyStyle="{ height: '70vh', display: 'flex', flexDirection: 'column', overflow: 'auto' }"
|
||||
wrapClassName="org-list-modal" @cancel="handleCancelLogs">
|
||||
|
@ -98,7 +91,7 @@
|
|||
</template>
|
||||
|
||||
<script setup name="synchronization-directive2" lang="ts">
|
||||
import { ref, reactive, computed, onMounted, watch } from 'vue'
|
||||
import { ref, reactive, computed, onMounted, watch, nextTick } from 'vue'
|
||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||
// 以下为服务指令引用:
|
||||
import { list, asyncFunc, departList } from '@/views/services/serviceDirective/ConfigServiceDirective.api';
|
||||
|
@ -115,7 +108,7 @@ import AsyncListComponent from '@/components/dataAsync/AsyncMainList0731.vue'
|
|||
import { getElderTagMain, changeElderTagMain } from '/@/api/common/api'
|
||||
import { idListByDS } from '/@/views/synchronization/eldertag/eldertag/ElderTag.api';
|
||||
import CanAddElderTagList from '/@/views/synchronization/eldertag/canaddet/CanAddElderTagList.vue'
|
||||
import { nextTick } from 'process';
|
||||
import ElderTagList from '/@/views/synchronization/eldertag/eldertag/ElderTagList.vue'
|
||||
|
||||
const { createMessage } = useMessage()
|
||||
const canAddElderTagRef = ref()
|
||||
|
@ -124,7 +117,7 @@ const elderTagMainComRef = ref();
|
|||
const newDirectiveRef = ref()
|
||||
const logsRef = ref()
|
||||
const formRef = ref();
|
||||
const configServiceDirectiveListModal = ref();
|
||||
const elderTagModal = ref();
|
||||
const syncStepListModal = ref();
|
||||
const orgTableList = ref<any>([]);
|
||||
const queryParam = reactive<any>({});
|
||||
|
@ -135,6 +128,8 @@ const elderTagMainVisible = ref(false)
|
|||
const { createConfirm } = useMessage();
|
||||
const existETIds = ref([])//指令库已存在指令id
|
||||
const elderTagMainOrgInfo = ref()
|
||||
const listVisible = ref(false)
|
||||
const listRef = ref(false)
|
||||
|
||||
const labelCol = reactive({
|
||||
xs: 24,
|
||||
|
@ -159,9 +154,16 @@ function handleJingxiang() {
|
|||
* @param record
|
||||
*/
|
||||
function handleDetail(record) {
|
||||
configServiceDirectiveListModal.value.init(record);
|
||||
configServiceDirectiveListModal.value.disableSubmit = true;
|
||||
listVisible.value = true
|
||||
nextTick(() => {
|
||||
listRef.value.init(record.orgCode)
|
||||
})
|
||||
}
|
||||
|
||||
function handleCancelList() {
|
||||
listVisible.value = false
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
|
|
|
@ -5,69 +5,23 @@
|
|||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
|
||||
:wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="5">
|
||||
<a-form-item name="instructionTagId">
|
||||
<template #label><span title="分类标签">分类标签</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.instructionTagId" :disabled="!showJSCom"
|
||||
:orgCode="sourceOrgInfo?.orgCode"
|
||||
:dictCode="`nu_config_service_instruction_tag,instruction_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`"
|
||||
placeholder="请选择分类标签" allowClear :ignoreDisabled="true" @select="reload()" />
|
||||
<!-- <span v-else>请选择源平台</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :lg="5">
|
||||
<a-form-item name="categoryId">
|
||||
<template #label><span title="服务类别">服务类别</span></template>
|
||||
<j-dict-select-tag type="list" v-model:value="queryParam.categoryId" :disabled="!showJSCom"
|
||||
:orgCode="sourceOrgInfo?.orgCode"
|
||||
:dictCode="`nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 and instruction_id = '${queryParam.instructionTagId || ''}' order by sort asc`"
|
||||
placeholder="请选择服务类别" allowClear :ignoreDisabled="true" @select="reload()" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :lg="5">
|
||||
<a-form-item name="typeId">
|
||||
<template #label><span title="服务类型">服务类型</span></template>
|
||||
<j-dict-select-tag type="list" v-model:value="queryParam.typeId" :disabled="!showJSCom"
|
||||
:orgCode="sourceOrgInfo?.orgCode"
|
||||
:dictCode="`nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${queryParam.categoryId || ''}' order by sort asc`"
|
||||
placeholder="请选择服务类型" allowClear :ignoreDisabled="true" @select="reload()" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="5">
|
||||
<a-form-item name="directiveName">
|
||||
<template #label><span title="服务指令">服务指令</span></template>
|
||||
<JInput v-model:value="queryParam.directiveName" placeholder="请输入服务指令名称" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :lg="6">
|
||||
<a-form-item name="bodyTags">
|
||||
<template #label><span title="体型标签">体型标签</span></template>
|
||||
<j-dict-select-tag type='list' v-model:value="queryParam.bodyTags"
|
||||
:dictCode="`nu_config_body_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`" :ignoreDisabled="true"
|
||||
placeholder="请选择体型标签" allowClear />
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="type">
|
||||
<template #label><span title="标签类型">标签类型</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.type" dictCode="elder_tag_type" placeholder="请选择标签类型"
|
||||
allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="emotionTags">
|
||||
<template #label><span title="情绪标签">情绪标签</span></template>
|
||||
<j-dict-select-tag type="list" v-model:value="queryParam.emotionTags"
|
||||
:dictCode="`nu_config_emotion_tag,tag_name,id,del_flag = '0' and iz_enabled = 0 order by sort asc`" :ignoreDisabled="true"
|
||||
placeholder="请选择情绪标签" allowClear />
|
||||
<a-form-item name="tagName">
|
||||
<template #label><span title="标签名称">标签名称</span></template>
|
||||
<JInput v-model:value="queryParam.tagName" placeholder="请输入标签名称" allowClear />
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
<!-- <a-col :lg="6">
|
||||
<a-form-item name="izEnabled">
|
||||
<template #label><span title="是否启用">是否启用</span></template>
|
||||
<j-dict-select-tag type='list' v-model:value="queryParam.izEnabled" dictCode="iz_enabled"
|
||||
:ignoreDisabled="true" placeholder="请选择是否启用" allowClear @select="reload()" />
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
</a-col>
|
||||
<a-col :xl="4" :lg="4" :md="4" :sm="4">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<!-- <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button> -->
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
|
||||
style="margin-left: 8px">重置</a-button>
|
||||
</a-col>
|
||||
|
@ -121,7 +75,8 @@
|
|||
<a-tag v-else color="green" style="margin-left: 10px;margin-top: 10px;">
|
||||
已选择 {{ rightNeedAddList.length }} 条
|
||||
</a-tag>
|
||||
<a-divider v-if="targetChooseType == 'one'" type="vertical" style="background-color: #CDCDCF;margin-left:5px;margin-right:10px;" />
|
||||
<a-divider v-if="targetChooseType == 'one'" type="vertical"
|
||||
style="background-color: #CDCDCF;margin-left:5px;margin-right:10px;" />
|
||||
<a-radio-group v-if="targetChooseType == 'one'" v-model:value="targetType" size="small"
|
||||
@change="targetTypeChanged">
|
||||
<a-radio-button value="exist">已有</a-radio-button>
|
||||
|
@ -134,8 +89,8 @@
|
|||
<BasicTable bordered
|
||||
:dataSource="targetChooseType == 'one' ? (targetType == 'needsync' ? rightNeedAddList : rightSourceList) : rightNeedAddList"
|
||||
:columns="targetChooseType == 'one' ? (targetType == 'needsync' ? targetColumns : targetSourceColumns) : targetSourceColumns"
|
||||
size="small" :scroll="{ y: '57vh' }"
|
||||
:pagination="{ current: 1, pageSize: 15, total: targetType == 'needsync' ? rightNeedAddList.length :rightSourceList.length, showSizeChanger: true, pageSizeOptions: ['15', '50', '70', '100'] }">
|
||||
size="small" :scroll="{ y: '57vh' }"
|
||||
:pagination="{ current: 1, pageSize: 15, total: targetType == 'needsync' ? rightNeedAddList.length : rightSourceList.length, showSizeChanger: true, pageSizeOptions: ['15', '50', '70', '100'] }">
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
<template v-if="column.dataIndex === 'izExist'">
|
||||
<a-tag v-if="rightSourceList.some(item => item.id === record.id)" color="orange">更新</a-tag>
|
||||
|
@ -153,8 +108,8 @@
|
|||
<!-- 指定机构同步 -->
|
||||
<div style="padding: 20px;" v-if="targetChooseType == 'one'">
|
||||
<p>目标机构 :{{ targetOrg?.departName }}</p>
|
||||
<p>新增服务指令: {{ getNewCount() }} 条</p>
|
||||
<p>更新服务指令: {{ getUpdateCount() }} 条</p>
|
||||
<p>新增长者标签: {{ getNewCount() }} 条</p>
|
||||
<p>更新长者标签: {{ getUpdateCount() }} 条</p>
|
||||
<!-- <span>请选择"新增指令"需要同步的内容:</span>
|
||||
<a-radio-group v-model:value="syncOption">
|
||||
<a-radio value="all">全部</a-radio>
|
||||
|
@ -164,8 +119,8 @@
|
|||
</div>
|
||||
<!-- 批量同步 -->
|
||||
<div style="padding: 20px;" v-else>
|
||||
<p>同步服务指令: {{ rightNeedAddList.length }} 条</p>
|
||||
<!-- <span>请选择"服务指令"需要同步的内容:</span>
|
||||
<p>同步长者标签: {{ rightNeedAddList.length }} 条</p>
|
||||
<!-- <span>请选择"长者标签"需要同步的内容:</span>
|
||||
<a-radio-group v-model:value="syncOption">
|
||||
<a-radio value="all">全部</a-radio>
|
||||
<a-radio value="business">业务字段</a-radio>
|
||||
|
@ -175,19 +130,18 @@
|
|||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="serviceDirective-configServiceDirective" setup>
|
||||
import { ref, reactive, onMounted, watch } from 'vue';
|
||||
<script lang="ts" name="elderTagChoose-elderTagChoose" setup>
|
||||
import { ref, reactive, } from 'vue';
|
||||
import { BasicTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, sourceColumns, superQuerySchema, targetSourceColumns, targetColumns } from './ConfigServiceDirective.data';
|
||||
import { listByDS } from './ConfigServiceDirective.api';
|
||||
import { columns, sourceColumns, targetSourceColumns, targetColumns } from '/@/views/synchronization/eldertag/eldertag/ElderTag.data';
|
||||
import { listByDS, syncElderTag } from '/@/views/synchronization/eldertag/eldertag/ElderTag.api';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { syncDirective } from '/@/views/synchronization/directive/serviceDirective/ConfigServiceDirective.api';
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
const props = defineProps({
|
||||
|
@ -214,7 +168,7 @@ const syncOption = ref('all');
|
|||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '服务指令',
|
||||
title: '长者标签',
|
||||
api: listByDS,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
|
@ -398,13 +352,6 @@ function targetTypeChanged(val_) {
|
|||
}
|
||||
|
||||
|
||||
watch(
|
||||
() => queryParam.directiveName,
|
||||
(newVal) => {
|
||||
reload()
|
||||
}
|
||||
);
|
||||
|
||||
function controlShowJSCom() {
|
||||
showJSCom.value = false
|
||||
setTimeout(() => {
|
||||
|
@ -463,8 +410,7 @@ function handleOk() {
|
|||
syncOption: syncOption.value,
|
||||
}
|
||||
}
|
||||
|
||||
syncDirective(sourceOrgInfo.value.orgCode, params)
|
||||
syncElderTag(sourceOrgInfo.value.orgCode, params)
|
||||
createMessage.success('已开始自动同步!')
|
||||
visible.value = false
|
||||
}
|
|
@ -75,9 +75,9 @@
|
|||
<div class="zljx-platform">
|
||||
<span class="section-title">指令镜像</span>
|
||||
<div class="directive-choose-wrapper">
|
||||
<!-- <DirectiveChooseCom v-show="!!orgInfo.length" ref="directiveChooseRef" :targetChooseType="targetChooseType"
|
||||
<ElderTagChooseCom v-show="!!orgInfo.length" ref="elderTagChooseRef" :targetChooseType="targetChooseType"
|
||||
:targetOrgs="selectedTargetOrgs">
|
||||
</DirectiveChooseCom> -->
|
||||
</ElderTagChooseCom>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
|
@ -106,7 +106,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { ref, nextTick, watch } from 'vue';
|
||||
import OrgListCom from '/@/views/synchronization/eldertag/orgCom/OrgListCom.vue';
|
||||
// import DirectiveChooseCom from '/@/views/synchronization/eldertag/serviceDirective/DirectiveChooseCom.vue'
|
||||
import ElderTagChooseCom from './ElderTagChooseCom.vue'
|
||||
|
||||
const sourceOrgListVisible = ref(false);
|
||||
const targetOrgListVisible = ref(false);
|
||||
|
@ -114,7 +114,7 @@ const sourceOrgListComRef = ref();
|
|||
const targetOrgListComRef = ref();
|
||||
const orgInfo = ref([])
|
||||
const syncOrgs = ref([])
|
||||
const directiveChooseRef = ref()
|
||||
const elderTagChooseRef = ref()
|
||||
const selectedTargetOrgs = ref([])//已选择目标平台
|
||||
const targetChooseType = ref('one')
|
||||
const selectedOrgsContainer = ref<HTMLElement>();
|
||||
|
@ -175,15 +175,15 @@ function handleSourceOrgChoose(orgInfo_) {
|
|||
orgInfo.value = orgInfo_
|
||||
//重置目标平台数据
|
||||
targetOrgListComRef.value?.resetSeleted(syncOrgs.value)
|
||||
directiveChooseRef.value?.controlShowJSCom()
|
||||
elderTagChooseRef.value?.controlShowJSCom()
|
||||
//是否已选择目标平台 否则为初始化原平台
|
||||
if (selectedTargetOrgs.value.length) {
|
||||
if (targetChooseType.value == 'one') {
|
||||
directiveChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
|
||||
directiveChooseRef.value?.initTargetList(selectedTargetOrgs.value[0])
|
||||
elderTagChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
|
||||
elderTagChooseRef.value?.initTargetList(selectedTargetOrgs.value[0])
|
||||
}
|
||||
} else {
|
||||
directiveChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
|
||||
elderTagChooseRef?.value?.init({ orgInfo: orgInfo.value[0] })
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ function handleTargetOrgChoose(orgInfo_) {
|
|||
if (!syncOrgs.value || syncOrgs.value.length == 0) {
|
||||
if (targetChooseType.value == 'one' && orgInfo_.length > 0) {
|
||||
selectedTargetOrgs.value = [{ ...orgInfo_[0] }]
|
||||
directiveChooseRef.value?.initTargetList(orgInfo_[0])
|
||||
elderTagChooseRef.value?.initTargetList(orgInfo_[0])
|
||||
}
|
||||
}
|
||||
syncOrgs.value = orgInfo_
|
||||
|
@ -212,7 +212,7 @@ function handleCancelTarget() {
|
|||
function handleTargetOrgChange(org_) {
|
||||
if (targetChooseType.value == 'one') {
|
||||
selectedTargetOrgs.value = [{ ...org_ }]
|
||||
directiveChooseRef.value?.initTargetList(org_)
|
||||
elderTagChooseRef.value?.initTargetList(org_)
|
||||
} else {
|
||||
// 检查是否已存在该机构
|
||||
const index = selectedTargetOrgs.value.findIndex(
|
||||
|
@ -228,7 +228,7 @@ function handleTargetOrgChange(org_) {
|
|||
}
|
||||
//响应式刷新
|
||||
selectedTargetOrgs.value = [...selectedTargetOrgs.value];
|
||||
// directiveChooseRef.value?.cleanTargetSourceData()
|
||||
// elderTagChooseRef.value?.cleanTargetSourceData()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ function handleGetTarget() {
|
|||
}
|
||||
|
||||
function syncFunc() {
|
||||
directiveChooseRef.value?.syncFunc()
|
||||
elderTagChooseRef.value?.syncFunc()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
|
Loading…
Reference in New Issue