服务指令-镜像码管理-增加镜像码使用日志 镜像码-日志

This commit is contained in:
1378012178@qq.com 2025-12-29 10:00:29 +08:00
parent 1b2a703e07
commit 57e04e3b83
10 changed files with 907 additions and 13 deletions

View File

@ -2,7 +2,7 @@
VITE_USE_MOCK = false VITE_USE_MOCK = false
# 发布路径 # 发布路径
VITE_PUBLIC_PATH = /biz101 VITE_PUBLIC_PATH = /biz102
# 是否启用gzip或brotli压缩 # 是否启用gzip或brotli压缩
# 选项值: gzip | brotli | none # 选项值: gzip | brotli | none
@ -13,10 +13,10 @@ VITE_BUILD_COMPRESS = 'gzip'
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
#后台接口父地址(必填) #后台接口父地址(必填)
VITE_GLOB_API_URL=/nursingunit101 VITE_GLOB_API_URL=/nursingunit102
#后台接口全路径地址(必填) #后台接口全路径地址(必填)
VITE_GLOB_DOMAIN_URL=https://www.focusnu.com/nursingunit101 VITE_GLOB_DOMAIN_URL=https://www.focusnu.com/nursingunit102
# VITE_GLOB_DOMAIN_URL=http://115.175.20.152/nursingunit104 # VITE_GLOB_DOMAIN_URL=http://115.175.20.152/nursingunit104
# 接口父路径前缀 # 接口父路径前缀

View File

@ -262,9 +262,9 @@
服务指令库 服务指令库
</a-button> </a-button>
<span style="margin-top:5px;margin-left: 5px;z-index: 999;"> <span style="margin-top:5px;margin-left: 5px;z-index: 999;">
<a-tooltip placement="right" :overlayInnerStyle="{'width':'500px'}"> <a-tooltip placement="right" :overlayInnerStyle="{ 'width': '500px' }">
<template #title> <template #title>
<span > <span>
镜像码是用于跨平台同步服务指令的凭证 镜像码是用于跨平台同步服务指令的凭证
<br /> <br />
使用服务指令库中输入其他平台的镜像码即可查看并选择性地将其服务指令同步至本平台 使用服务指令库中输入其他平台的镜像码即可查看并选择性地将其服务指令同步至本平台
@ -369,24 +369,36 @@
</a-drawer> </a-drawer>
<!-- 镜像码管理 --> <!-- 镜像码管理 -->
<a-drawer v-model:visible="syncCodeVisible" title="镜像码管理" width="40vw" :footer-style="{ textAlign: 'right' }" <a-drawer v-model:visible="syncCodeVisible" title="镜像码管理" width="80vw" :footer-style="{ textAlign: 'right' }"
:bodyStyle="{ height: '100%', display: 'flex', padding: '14px', flexDirection: 'column', overflow: 'auto' }" :bodyStyle="{
wrapClassName="org-list-modal" @cancel="syncCodeVisible = false"> height: '100%',
display: 'flex',
padding: '14px',
flexDirection: 'column',
overflow: 'auto'
}" wrapClassName="org-list-modal" @cancel="syncCodeVisible = false">
<template #footer> <template #footer>
<a-button @click="syncCodeVisible = false" type="primary">关闭</a-button> <a-button @click="syncCodeVisible = false" type="primary">关闭</a-button>
</template> </template>
<a-spin :spinning="!syncCode"> <a-spin :spinning="!syncCode" style="display: flex; flex-direction: column; height: 100%;">
<div style="padding: 14px; background-color: white; display: flex; align-items: center;"> <div style="padding: 14px; background-color: white; display: flex; align-items: center; flex-shrink: 0;">
<a-row style="width: 100%;"> <a-row style="width: 100%;">
<a-col :span="16" style="display: flex; align-items: center;"> <a-col :span="6" style="display: flex; align-items: center;">
<span style="font-weight: bold;">镜像码{{ syncCode }}</span><span></span> <span style="font-weight: bold;font-size: 16px;">镜像码<span style="color: #1890FF;">{{ syncCode }}</span></span>
</a-col> </a-col>
<a-col :push="3" :span="5" style="display: flex; align-items: center;"> <a-col :span="3" :push="15" style="display: flex; align-items: center; justify-content: flex-end;">
<a-button @click="copySyncCodeFunc()" type="primary" style="margin-right: 8px;">复制</a-button> <a-button @click="copySyncCodeFunc()" type="primary" style="margin-right: 8px;">复制</a-button>
<a-button @click="updateSyncCodeFunc()" type="primary">更新</a-button> <a-button @click="updateSyncCodeFunc()" type="primary">更新</a-button>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
<div style="flex: 1; min-height: 0; width: 100%;margin-top: 14px;">
<a-row style="width: 100%; height: 100%; margin: 0;">
<a-col :span="24" style="width: 100%; height: 100%; padding: 0;">
<DirectiveSyncLogMainList style="width: 100%; height: 100%;" />
</a-col>
</a-row>
</div>
</a-spin> </a-spin>
</a-drawer> </a-drawer>
@ -438,6 +450,7 @@ import CompareDirectiveList from './components/CompareDirectiveList.vue'
import { idListByDS } from './ConfigServiceDirective.api'; import { idListByDS } from './ConfigServiceDirective.api';
import CanAddDirectiveList from '/@/views/services/canadddirective/CanAddDirectiveList.vue' import CanAddDirectiveList from '/@/views/services/canadddirective/CanAddDirectiveList.vue'
import { QuestionCircleOutlined } from '@ant-design/icons-vue'; import { QuestionCircleOutlined } from '@ant-design/icons-vue';
import DirectiveSyncLogMainList from './directivesynclog/DirectiveSyncLogMainList.vue'
const { createMessage, createConfirm } = useMessage(); const { createMessage, createConfirm } = useMessage();

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/directivesynclog/directiveSyncLogMain/list',
save='/directivesynclog/directiveSyncLogMain/add',
edit='/directivesynclog/directiveSyncLogMain/edit',
deleteOne = '/directivesynclog/directiveSyncLogMain/delete',
deleteBatch = '/directivesynclog/directiveSyncLogMain/deleteBatch',
importExcel = '/directivesynclog/directiveSyncLogMain/importExcel',
exportXls = '/directivesynclog/directiveSyncLogMain/exportXls',
}
/**
* 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
* @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
* @param isUpdate
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

View File

@ -0,0 +1,47 @@
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: 'opeOrgCode_dictText',
},
{
title: '镜像日期',
align: 'center',
dataIndex: 'createTime',
},
{
title: '镜像码',
align: 'center',
dataIndex: 'orgDirectiveCode',
},
];
// 高级查询数据
export const superQuerySchema = {
opeOrgCode: {
title: '哪个机构镜像的',
order: 0,
view: 'list',
type: 'string',
dictTable: 'sys_depart',
dictCode: 'org_code',
dictText: 'depart_name',
},
targetOrgCode: {
title: '镜像的哪个机构的指令',
order: 1,
view: 'list',
type: 'string',
dictTable: 'sys_depart',
dictCode: 'org_code',
dictText: 'depart_name',
},
orgDirectiveCode: { title: '指令镜像码', order: 2, view: 'text', type: 'string' },
createTime: { title: '创建日期', order: 3, view: 'datetime', type: 'string' },
};

View File

@ -0,0 +1,224 @@
<template>
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="opeOrgCode">
<template #label><span title="镜像机构">镜像机构</span></template>
<j-dict-select-tag v-model:value="queryParam.opeOrgCode" dictCode="sys_depart,depart_name,org_code"
placeholder="请选择镜像机构" allowClear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="createTime">
<template #label><span title="镜像日期">镜像日期</span></template>
<a-range-picker value-format="YYYY-MM-DD" v-model:value="queryParam.createTime"
class="query-group-cust" />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="orgDirectiveCode">
<template #label><span title="镜像码">镜像码</span></template>
<JInput placeholder="请输入镜像码" v-model:value="queryParam.orgDirectiveCode" allow-clear></JInput>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<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:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
<span style="font-size: 15px;font-weight: bold;margin-left: 8px;">被镜像日志</span>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
<!-- 表单区域 -->
<DirectiveSyncLogInfoModal ref="registerModal" @success="handleSuccess"></DirectiveSyncLogInfoModal>
</div>
</template>
<script lang="ts" name="directivesynclog-directiveSyncLogMain" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './DirectiveSyncLogMain.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './DirectiveSyncLogMain.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import DirectiveSyncLogInfoModal from './components/DirectiveSyncLogInfoModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
import { cloneDeep } from "lodash-es";
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
const formRef = ref();
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,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: async (params) => {
let rangerQuery = await setRangeQuery();
return Object.assign(params, rangerQuery);
},
},
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: 5
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
];
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
let rangeField = 'createTime,'
/**
* 设置范围查询条件
*/
async function setRangeQuery() {
let queryParamClone = cloneDeep(queryParam);
if (rangeField) {
let fieldsValue = rangeField.split(',');
fieldsValue.forEach(item => {
if (queryParamClone[item]) {
let range = queryParamClone[item];
queryParamClone[item + '_begin'] = range[0];
queryParamClone[item + '_end'] = range[1];
delete queryParamClone[item];
} else {
queryParamClone[item + '_begin'] = '';
queryParamClone[item + '_end'] = '';
}
})
}
return queryParamClone;
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0px;
.table-page-search-submitButtons {
display: block;
margin-bottom: 14px;
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: 14px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
</style>

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/directivesynclog/directiveSyncLogInfo/list',
save='/directivesynclog/directiveSyncLogInfo/add',
edit='/directivesynclog/directiveSyncLogInfo/edit',
deleteOne = '/directivesynclog/directiveSyncLogInfo/delete',
deleteBatch = '/directivesynclog/directiveSyncLogInfo/deleteBatch',
importExcel = '/directivesynclog/directiveSyncLogInfo/importExcel',
exportXls = '/directivesynclog/directiveSyncLogInfo/exportXls',
}
/**
* 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
* @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
* @param isUpdate
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

View File

@ -0,0 +1,42 @@
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: 'instructionTagName'
},
{
title: '服务类别名称',
align: "center",
dataIndex: 'categoryName'
},
{
title: '服务类型名称',
align: "center",
dataIndex: 'typeName'
},
{
title: '服务指令名称',
align: "center",
dataIndex: 'directiveName'
},
{
title: '周期类型',
align: "center",
dataIndex: 'cycleType_dictText'
},
];
// 高级查询数据
export const superQuerySchema = {
instructionTagName: {title: '分类标签名称',order: 0,view: 'text', type: 'string',},
categoryName: {title: '服务类别名称',order: 1,view: 'text', type: 'string',},
typeName: {title: '服务类型名称',order: 2,view: 'text', type: 'string',},
directiveName: {title: '服务指令名称',order: 3,view: 'text', type: 'string',},
cycleType: {title: '周期类型 1日常护理 2周期护理 3即时护理',order: 6,view: 'text', type: 'string',},
};

View File

@ -0,0 +1,195 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="DirectiveSyncLogInfoForm">
<a-row>
<a-col :span="24">
<a-form-item label="分类标签名称" v-bind="validateInfos.instructionTagName"
id="DirectiveSyncLogInfoForm-instructionTagName" name="instructionTagName">
<a-input v-model:value="formData.instructionTagName" placeholder="请输入分类标签名称" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="服务类别名称" v-bind="validateInfos.categoryName" id="DirectiveSyncLogInfoForm-categoryName"
name="categoryName">
<a-input v-model:value="formData.categoryName" placeholder="请输入服务类别名称" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="服务类型名称" v-bind="validateInfos.typeName" id="DirectiveSyncLogInfoForm-typeName"
name="typeName">
<a-input v-model:value="formData.typeName" placeholder="请输入服务类型名称" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="服务指令名称" v-bind="validateInfos.directiveName"
id="DirectiveSyncLogInfoForm-directiveName" name="directiveName">
<a-input v-model:value="formData.directiveName" placeholder="请输入服务指令名称" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="收费价格" v-bind="validateInfos.tollPrice" id="DirectiveSyncLogInfoForm-tollPrice"
name="tollPrice">
<a-input-number v-model:value="formData.tollPrice" placeholder="请输入收费价格" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="提成价格" v-bind="validateInfos.comPrice" id="DirectiveSyncLogInfoForm-comPrice"
name="comPrice">
<a-input-number v-model:value="formData.comPrice" placeholder="请输入提成价格" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="周期类型 1日常护理 2周期护理 3即时护理" v-bind="validateInfos.cycleType"
id="DirectiveSyncLogInfoForm-cycleType" name="cycleType">
<a-input v-model:value="formData.cycleType" placeholder="请输入周期类型 1日常护理 2周期护理 3即时护理"
allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="服务说明" v-bind="validateInfos.serviceContent"
id="DirectiveSyncLogInfoForm-serviceContent" name="serviceContent">
<a-input v-model:value="formData.serviceContent" placeholder="请输入服务说明" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="服务时长(分钟)" v-bind="validateInfos.serviceDuration"
id="DirectiveSyncLogInfoForm-serviceDuration" name="serviceDuration">
<a-input v-model:value="formData.serviceDuration" placeholder="请输入服务时长(分钟)" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="语音文件" v-bind="validateInfos.mp3File" id="DirectiveSyncLogInfoForm-mp3File"
name="mp3File">
<a-input v-model:value="formData.mp3File" placeholder="请输入语音文件" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="视频文件" v-bind="validateInfos.mp4File" id="DirectiveSyncLogInfoForm-mp4File"
name="mp4File">
<a-input v-model:value="formData.mp4File" placeholder="请输入视频文件" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="服务指令图片大图" v-bind="validateInfos.previewFile" id="DirectiveSyncLogInfoForm-previewFile"
name="previewFile">
<a-input v-model:value="formData.previewFile" placeholder="请输入服务指令图片大图" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="服务指令图片小图" v-bind="validateInfos.previewFileSmall"
id="DirectiveSyncLogInfoForm-previewFileSmall" name="previewFileSmall">
<a-input v-model:value="formData.previewFileSmall" placeholder="请输入服务指令图片小图" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="即时指令图片" v-bind="validateInfos.immediateFile"
id="DirectiveSyncLogInfoForm-immediateFile" name="immediateFile">
<a-input v-model:value="formData.immediateFile" placeholder="请输入即时指令图片" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="即时指令焦点图片" v-bind="validateInfos.immediateFileFocus"
id="DirectiveSyncLogInfoForm-immediateFileFocus" name="immediateFileFocus">
<a-input v-model:value="formData.immediateFileFocus" placeholder="请输入即时指令焦点图片" allow-clear></a-input>
</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 { getValueType } from '/@/utils';
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 }
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
instructionTagName: '',
categoryName: '',
typeName: '',
directiveName: '',
tollPrice: undefined,
comPrice: undefined,
cycleType: '',
serviceContent: '',
serviceDuration: '',
mp3File: '',
mp4File: '',
previewFile: '',
previewFileSmall: '',
immediateFile: '',
immediateFileFocus: '',
});
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);
});
}
defineExpose({
add,
edit,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
padding: 14px;
}
</style>

View File

@ -0,0 +1,146 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
<!-- 表单区域 -->
<DirectiveSyncLogInfoModal ref="registerModal" @success="handleSuccess"></DirectiveSyncLogInfoModal>
</div>
</template>
<script lang="ts" name="directivesynclog-directiveSyncLogInfo" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './DirectiveSyncLogInfo.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './DirectiveSyncLogInfo.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import DirectiveSyncLogInfoModal from './DirectiveSyncLogInfoModal.vue'
import { useUserStore } from '/@/store/modules/user';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
const mainInfo = ref({ id: '' })
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '服务指令镜像日志详情表',
api: list,
columns,
canResize: false,
useSearchForm: false,
showActionColumn: false,
immediate: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: async (params) => {
queryParam.pkId = mainInfo.value.id
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
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
];
}
function init(mainInfo_) {
mainInfo.value = mainInfo_;
reload()
}
defineExpose({
init
});
</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%;
}
}
</style>

View File

@ -0,0 +1,83 @@
<template>
<a-drawer :title="title" width="80vw" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel"
:bodyStyle="{ background: 'linear-gradient(135deg, #f1f7ff 0%, #f1f7ff 100%)', padding: '14px' }">
<DirectiveSyncLogInfoList v-if="visible" ref="registerForm" @ok="submitCallback" :formBpm="false">
</DirectiveSyncLogInfoList>
<template #footer>
<a-button @click="handleCancel" style="margin-right: 8px;">关闭</a-button>
</template>
</a-drawer>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import DirectiveSyncLogInfoList from './DirectiveSyncLogInfoList.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']);
/**
* 新增
*/
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.init(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>