指令同步日志
This commit is contained in:
parent
062e223529
commit
c184017f4f
|
@ -5,30 +5,52 @@ import { render } from '/@/utils/common/renderUtils';
|
||||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||||
//主列表数据
|
//主列表数据
|
||||||
export const asyncMaincolumns: BasicColumn[] = [
|
export const asyncMaincolumns: BasicColumn[] = [
|
||||||
// {
|
|
||||||
// title: '类型',
|
|
||||||
// align: "center",
|
|
||||||
// dataIndex: 'type'
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
title: '同步备注信息',
|
title: '同步时间',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'descr',
|
dataIndex: 'createTime',
|
||||||
|
width: '150px'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '同步人',
|
title: '同步人',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'createBy_dictText',
|
dataIndex: 'createBy_dictText',
|
||||||
|
width: '120px'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '开始同步时间',
|
title: '源平台',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'orgName',
|
||||||
|
width: '150px'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '同步状态',
|
title: '目标平台',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'asyncStatusList',
|
dataIndex: 'targetOrgName',
|
||||||
|
width: '150px',
|
||||||
|
customRender: ({ record }) => {
|
||||||
|
return record.asyncStatusList?.[0]?.zorgName || '-';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '业务字段',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'dataStatus',
|
||||||
|
width: '120px',
|
||||||
|
customRender: ({ record }) => {
|
||||||
|
const dataItem = record.asyncStatusList?.find(item => item.code === 'data');
|
||||||
|
return dataItem ? (dataItem.status === '200' ? '成功' : '失败') : '-';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '指令资源',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'fileStatus',
|
||||||
|
width: '120px',
|
||||||
|
customRender: ({ record }) => {
|
||||||
|
const fileItem = record.asyncStatusList?.find(item => item.code === 'file');
|
||||||
|
return fileItem ? (fileItem.status === '200' ? '成功' : '失败') : '-';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
//子列表数据
|
//子列表数据
|
||||||
|
|
|
@ -0,0 +1,183 @@
|
||||||
|
<template>
|
||||||
|
<div class="p-2">
|
||||||
|
<!--引用表格-->
|
||||||
|
<BasicTable @register="registerTable" class="darkened-table">
|
||||||
|
<!--插槽:table标题-->
|
||||||
|
<template #tableTitle>
|
||||||
|
<a-button type="primary" v-auth="'asyncmain:nu_async_main:add'" @click="handleAdd"
|
||||||
|
preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
|
<a-button type="primary" v-auth="'asyncmain:nu_async_main:exportXls'" preIcon="ant-design:export-outlined"
|
||||||
|
@click="onExportXls"> 导出</a-button>
|
||||||
|
<j-upload-button type="primary" v-auth="'asyncmain:nu_async_main:importExcel'"
|
||||||
|
preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||||
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
|
<template #overlay>
|
||||||
|
<a-menu>
|
||||||
|
<a-menu-item key="1" @click="batchHandleDelete">
|
||||||
|
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||||
|
删除
|
||||||
|
</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
</template>
|
||||||
|
<a-button v-auth="'asyncmain:nu_async_main:deleteBatch'">批量操作
|
||||||
|
<Icon icon="mdi:chevron-down"></Icon>
|
||||||
|
</a-button>
|
||||||
|
</a-dropdown>
|
||||||
|
</template>
|
||||||
|
<template #bodyCell="{ column, record }">
|
||||||
|
<template v-if="column.dataIndex === 'targetOrgName'">
|
||||||
|
<span>{{ record.asyncStatusList?.[0]?.zorgName || '-' }}</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 业务字段列 -->
|
||||||
|
<!-- 业务字段列 -->
|
||||||
|
<template v-if="column.dataIndex === 'dataStatus'">
|
||||||
|
<span v-if="record.asyncStatusList?.find(item => item.code === 'data')?.status === '200'"
|
||||||
|
class="status-success">
|
||||||
|
<strong>成功</strong>
|
||||||
|
</span>
|
||||||
|
<span v-else-if="record.asyncStatusList?.find(item => item.code === 'data')" class="status-error">
|
||||||
|
<strong>失败</strong>
|
||||||
|
</span>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 指令资源列 -->
|
||||||
|
<template v-if="column.dataIndex === 'fileStatus'">
|
||||||
|
<span v-if="record.asyncStatusList?.find(item => item.code === 'file')?.status === '200'"
|
||||||
|
class="status-success">
|
||||||
|
<strong>成功</strong>
|
||||||
|
</span>
|
||||||
|
<span v-else-if="record.asyncStatusList?.find(item => item.code === 'file')" class="status-error">
|
||||||
|
<strong>失败</strong>
|
||||||
|
</span>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
<!-- 表单区域 -->
|
||||||
|
<AsyncMainModal ref="registerModal" @success="handleSuccess"></AsyncMainModal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" name="asyncmain-asyncMain" setup>
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { BasicTable, useTable } from '/@/components/Table';
|
||||||
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
|
import { asyncMaincolumns } from './AsyncMain.data';
|
||||||
|
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './AsyncMain.api';
|
||||||
|
import AsyncMainModal from './components/AsyncMainModal.vue'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
orgCode: 'orgCode',
|
||||||
|
type: '',
|
||||||
|
});
|
||||||
|
const queryParam = reactive<any>({});
|
||||||
|
const registerModal = ref();
|
||||||
|
//注册table数据
|
||||||
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
|
tableProps: {
|
||||||
|
title: '数据同步主表',
|
||||||
|
api: list,
|
||||||
|
columns: asyncMaincolumns,
|
||||||
|
canResize: false,
|
||||||
|
useSearchForm: false,
|
||||||
|
showTableSetting: false,
|
||||||
|
showActionColumn: false,
|
||||||
|
beforeFetch: async (params) => {
|
||||||
|
queryParam.type = props.type
|
||||||
|
queryParam.orgCode = props.orgCode
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增事件
|
||||||
|
*/
|
||||||
|
function handleAdd() {
|
||||||
|
registerModal.value.disableSubmit = false;
|
||||||
|
registerModal.value.add();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除事件
|
||||||
|
*/
|
||||||
|
async function batchHandleDelete() {
|
||||||
|
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成功回调
|
||||||
|
*/
|
||||||
|
function handleSuccess() {
|
||||||
|
(selectedRowKeys.value = []) && reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*/
|
||||||
|
function searchQuery() {
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
searchQuery
|
||||||
|
});
|
||||||
|
</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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-success {
|
||||||
|
color: #27ae60; // 现代绿色
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-error {
|
||||||
|
color: #e74c3c; // 现代红色
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -154,22 +154,22 @@
|
||||||
<p>目标机构 :{{ targetOrg?.departName }}</p>
|
<p>目标机构 :{{ targetOrg?.departName }}</p>
|
||||||
<p>新增服务指令: {{ getNewCount() }} 条</p>
|
<p>新增服务指令: {{ getNewCount() }} 条</p>
|
||||||
<p>更新服务指令: {{ getUpdateCount() }} 条</p>
|
<p>更新服务指令: {{ getUpdateCount() }} 条</p>
|
||||||
<span>请选择"新增指令"需要同步的内容:</span>
|
<!-- <span>请选择"新增指令"需要同步的内容:</span>
|
||||||
<a-radio-group v-model:value="syncOption">
|
<a-radio-group v-model:value="syncOption">
|
||||||
<a-radio value="all">全部</a-radio>
|
<a-radio value="all">全部</a-radio>
|
||||||
<a-radio value="business">业务字段</a-radio>
|
<a-radio value="business">业务字段</a-radio>
|
||||||
<a-radio value="media">指令资源</a-radio>
|
<a-radio value="media">指令资源</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- 批量同步 -->
|
<!-- 批量同步 -->
|
||||||
<div style="padding: 20px;" v-else>
|
<div style="padding: 20px;" v-else>
|
||||||
<p>同步服务指令: {{ rightNeedAddList.length }} 条</p>
|
<p>同步服务指令: {{ rightNeedAddList.length }} 条</p>
|
||||||
<span>请选择"服务指令"需要同步的内容:</span>
|
<!-- <span>请选择"服务指令"需要同步的内容:</span>
|
||||||
<a-radio-group v-model:value="syncOption">
|
<a-radio-group v-model:value="syncOption">
|
||||||
<a-radio value="all">全部</a-radio>
|
<a-radio value="all">全部</a-radio>
|
||||||
<a-radio value="business">业务字段</a-radio>
|
<a-radio value="business">业务字段</a-radio>
|
||||||
<a-radio value="media">指令资源</a-radio>
|
<a-radio value="media">指令资源</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group> -->
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -19,9 +19,11 @@
|
||||||
<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 type="primary" preIcon="ant-design:cloud-sync-outlined" @click="handleJingxiang"
|
||||||
style="margin-right: 10px;">镜像</a-button>
|
style="margin-right: 10px;">镜像</a-button>
|
||||||
|
<a-button type="primary" preIcon="ant-design:file-text-twotone" @click="handleViewLogs"
|
||||||
|
style="margin-right: 10px;">日志</a-button>
|
||||||
<a-badge :count="609" style="margin-right: 10px;">
|
<a-badge :count="609" style="margin-right: 10px;">
|
||||||
<a-button type="primary" preIcon="ant-design:eye-outlined" style="margin-right: 10px;"
|
<a-button type="primary" preIcon="ant-design:eye-outlined" style="margin-right: 10px;"
|
||||||
@click="handleLookNewDirectives">查看可新增指令</a-button>
|
@click="handleLookNewDirectives">新增指令</a-button>
|
||||||
</a-badge>
|
</a-badge>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
@ -33,6 +35,14 @@
|
||||||
|
|
||||||
<ConfigServiceDirectiveListModal ref="configServiceDirectiveListModal" />
|
<ConfigServiceDirectiveListModal ref="configServiceDirectiveListModal" />
|
||||||
<SyncStepListModal ref="syncStepListModal" />
|
<SyncStepListModal ref="syncStepListModal" />
|
||||||
|
<a-modal v-model:visible="logsVisible" title="日志" width="90vw"
|
||||||
|
:bodyStyle="{ padding: '0', height: '70vh', display: 'flex', flexDirection: 'column', overflow: 'hidden' }"
|
||||||
|
wrapClassName="org-list-modal" @cancel="handleCancelLogs">
|
||||||
|
<template #footer>
|
||||||
|
<a-button @click="handleCancelLogs" type="primary">关闭</a-button>
|
||||||
|
</template>
|
||||||
|
<AsyncListComponent></AsyncListComponent>
|
||||||
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -49,6 +59,7 @@ import { getOrgInfo } from '/@/views/admin/orgapplyinfo/OrgApplyInfo.api';
|
||||||
//机构列表
|
//机构列表
|
||||||
import OrgListCom from '/@/views/synchronization/directive/orgCom/OrgListCom.vue'
|
import OrgListCom from '/@/views/synchronization/directive/orgCom/OrgListCom.vue'
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
import AsyncListComponent from '@/components/dataAsync/AsyncMainList0731.vue'
|
||||||
|
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
@ -58,6 +69,7 @@ const orgTableList = ref<any>([]);
|
||||||
const queryParam = reactive<any>({});
|
const queryParam = reactive<any>({});
|
||||||
const pageParams = ref({ pageNo: 1, pageSize: 8 })
|
const pageParams = ref({ pageNo: 1, pageSize: 8 })
|
||||||
const orgListComRef = ref()
|
const orgListComRef = ref()
|
||||||
|
const logsVisible = ref(false)
|
||||||
|
|
||||||
const labelCol = reactive({
|
const labelCol = reactive({
|
||||||
xs: 24,
|
xs: 24,
|
||||||
|
@ -109,9 +121,22 @@ function searchReset() {
|
||||||
orgListComRef.value?.searchReset()
|
orgListComRef.value?.searchReset()
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleLookNewDirectives(){
|
/**
|
||||||
|
* 日志
|
||||||
|
*/
|
||||||
|
function handleViewLogs() {
|
||||||
|
logsVisible.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleLookNewDirectives() {
|
||||||
createMessage.warning('功能开发中')
|
createMessage.warning('功能开发中')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//关闭日志模态框
|
||||||
|
function handleCancelLogs() {
|
||||||
|
logsVisible.value = false
|
||||||
|
}
|
||||||
|
|
||||||
// 自动请求并暴露内部方法
|
// 自动请求并暴露内部方法
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
reload();
|
reload();
|
||||||
|
|
|
@ -78,6 +78,10 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
|
||||||
field: 'url',
|
field: 'url',
|
||||||
show: !isChild,
|
show: !isChild,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'contextPath',
|
||||||
|
show: !isChild,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'orgCategory',
|
field: 'orgCategory',
|
||||||
componentProps: { options: categoryOptions },
|
componentProps: { options: categoryOptions },
|
||||||
|
|
|
@ -50,6 +50,17 @@ export function useBasicFormSchema() {
|
||||||
placeholder: '请输入协议域名',
|
placeholder: '请输入协议域名',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'contextPath',
|
||||||
|
label: '项目访问路径',
|
||||||
|
component: 'Input',
|
||||||
|
ifShow: (v_) => {
|
||||||
|
return !v_.values.parentId;
|
||||||
|
},
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请输入项目访问路径',
|
||||||
|
},
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// field: 'province',
|
// field: 'province',
|
||||||
// label: '省份',
|
// label: '省份',
|
||||||
|
|
Loading…
Reference in New Issue