Browse Source

任务:YT-182,执行失败和执行成功的代码重写

syhx
ljlong_2630 2 months ago
parent
commit
b156026a1c
  1. 55
      src/api/infra/apiMqDetail/index.ts
  2. 55
      src/api/infra/apiMqError/index.ts
  3. 54
      src/api/infra/apiMqHis/index.ts
  4. 53
      src/api/infra/apiMqMain/index.ts
  5. 75
      src/views/infra/apiMqError/apiMqError.data.ts
  6. 54
      src/views/infra/apiMqError/index.vue
  7. 63
      src/views/infra/apiMqHis/apiMqHis.data.ts
  8. 81
      src/views/infra/apiMqHis/index.vue

55
src/api/infra/apiMqDetail/index.ts

@ -1,55 +0,0 @@
import request from '@/config/axios'
export interface ApiMqDetailVO {
id: number
masterId: number
number: string
type: string
content: string
times: number
available: string
departmentCode: string
extraProperties: string
siteId: string
}
// 查询mq执行记录子列表
export const getApiMqDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/infra/api-mq-detail/senior', data })
} else {
return await request.get({ url: `/infra/api-mq-detail/page`, params })
}
}
// 查询mq执行记录子详情
export const getApiMqDetail = async (id: number) => {
return await request.get({ url: `/infra/api-mq-detail/get?id=` + id })
}
// 新增mq执行记录子
export const createApiMqDetail = async (data: ApiMqDetailVO) => {
return await request.post({ url: `/infra/api-mq-detail/create`, data })
}
// 修改mq执行记录子
export const updateApiMqDetail = async (data: ApiMqDetailVO) => {
return await request.put({ url: `/infra/api-mq-detail/update`, data })
}
// 删除mq执行记录子
export const deleteApiMqDetail = async (id: number) => {
return await request.delete({ url: `/infra/api-mq-detail/delete?id=` + id })
}
// 导出mq执行记录子 Excel
export const exportApiMqDetail = async (params) => {
return await request.download({ url: `/infra/api-mq-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/infra/api-mq-detail/get-import-template' })
}

55
src/api/infra/apiMqError/index.ts

@ -0,0 +1,55 @@
import request from '@/config/axios'
export interface ApiMqErrorVO {
id: number
number: string
type: string
content: string
times: number
available: string
departmentCode: string
extraProperties: string
siteId: string
concurrencyStamp: number
}
// 查询mq执行异常记录列表
export const getApiMqErrorPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/infra/api-mq-error/senior', data })
} else {
return await request.get({ url: `/infra/api-mq-error/page`, params })
}
}
// 查询mq执行异常记录详情
export const getApiMqError = async (id: number) => {
return await request.get({ url: `/infra/api-mq-error/get?id=` + id })
}
// 新增mq执行异常记录
export const createApiMqError = async (data: ApiMqErrorVO) => {
return await request.post({ url: `/infra/api-mq-error/create`, data })
}
// 修改mq执行异常记录
export const updateApiMqError = async (data: ApiMqErrorVO) => {
return await request.put({ url: `/infra/api-mq-error/update`, data })
}
// 删除mq执行异常记录
export const deleteApiMqError = async (id: number) => {
return await request.delete({ url: `/infra/api-mq-error/delete?id=` + id })
}
// 导出mq执行异常记录 Excel
export const exportApiMqError = async (params) => {
return await request.download({ url: `/infra/api-mq-error/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/infra/api-mq-error/get-import-template' })
}

54
src/api/infra/apiMqHis/index.ts

@ -0,0 +1,54 @@
import request from '@/config/axios'
export interface ApiMqHisVO {
id: number
number: string
type: string
times: number
available: string
departmentCode: string
extraProperties: string
siteId: string
concurrencyStamp: number
}
// 查询mq执行历史记录列表
export const getApiMqHisPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/infra/api-mq-his/senior', data })
} else {
return await request.get({ url: `/infra/api-mq-his/page`, params })
}
}
// 查询mq执行历史记录详情
export const getApiMqHis = async (id: number) => {
return await request.get({ url: `/infra/api-mq-his/get?id=` + id })
}
// 新增mq执行历史记录
export const createApiMqHis = async (data: ApiMqHisVO) => {
return await request.post({ url: `/infra/api-mq-his/create`, data })
}
// 修改mq执行历史记录
export const updateApiMqHis = async (data: ApiMqHisVO) => {
return await request.put({ url: `/infra/api-mq-his/update`, data })
}
// 删除mq执行历史记录
export const deleteApiMqHis = async (id: number) => {
return await request.delete({ url: `/infra/api-mq-his/delete?id=` + id })
}
// 导出mq执行历史记录 Excel
export const exportApiMqHis = async (params) => {
return await request.download({ url: `/infra/api-mq-his/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/infra/api-mq-his/get-import-template' })
}

53
src/api/infra/apiMqMain/index.ts

@ -1,53 +0,0 @@
import request from '@/config/axios'
export interface ApiMqMainVO {
id: number
number: string
type: string
times: number
available: string
departmentCode: string
extraProperties: string
siteId: string
}
// 查询mq执行记录主列表
export const getApiMqMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/infra/api-mq-main/senior', data })
} else {
return await request.get({ url: `/infra/api-mq-main/page`, params })
}
}
// 查询mq执行记录主详情
export const getApiMqMain = async (id: number) => {
return await request.get({ url: `/infra/api-mq-main/get?id=` + id })
}
// 新增mq执行记录主
export const createApiMqMain = async (data: ApiMqMainVO) => {
return await request.post({ url: `/infra/api-mq-main/create`, data })
}
// 修改mq执行记录主
export const updateApiMqMain = async (data: ApiMqMainVO) => {
return await request.put({ url: `/infra/api-mq-main/update`, data })
}
// 删除mq执行记录主
export const deleteApiMqMain = async (id: number) => {
return await request.delete({ url: `/infra/api-mq-main/delete?id=` + id })
}
// 导出mq执行记录主 Excel
export const exportApiMqMain = async (params) => {
return await request.download({ url: `/infra/api-mq-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/infra/api-mq-main/get-import-template' })
}

75
src/views/infra/apiMqMain/apiMqMain.data.ts → src/views/infra/apiMqError/apiMqError.data.ts

@ -2,16 +2,16 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ApiMqMainRules = reactive({
export const ApiMqErrorRules = reactive({
number: [required],
type: [required],
times: [required]
})
export const ApiMqMain = useCrudSchemas(reactive<CrudSchema[]>([
export const ApiMqError = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '业务编号',
label: '编号',
field: 'number',
sort: 'custom',
isSearch: true
@ -26,32 +26,45 @@ export const ApiMqMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '执行次数',
field: 'times',
label: '内容',
field: 'content',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
}
},
{
label: '是否可用',
field: 'available',
label: '执行次数',
field: 'times',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
component: 'InputNumber',
value: 0
}
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: true,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
// {
// label: '部门',
// field: 'departmentCode',
// sort: 'custom',
@ -73,17 +86,27 @@ export const ApiMqMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false
},
// // {
// // label: '扩展属性',
// // field: 'extraProperties',
// // sort: 'custom',
// // isSearch: true
// // },
// // {
// // label: '地点ID',
// // field: 'siteId',
// // sort: 'custom',
// // isSearch: true
// // },
// {
// label: '扩展属性',
// field: 'extraProperties',
// label: '乐观锁',
// field: 'concurrencyStamp',
// sort: 'custom',
// isSearch: true
// },
// {
// label: '地点ID',
// field: 'siteId',
// sort: 'custom',
// isSearch: true
// isSearch: true,
// form: {
// component: 'InputNumber',
// value: 0
// }
// },
// {
// label: '操作',

54
src/views/infra/apiMqDetail/index.vue → src/views/infra/apiMqError/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ApiMqDetail.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="ApiMqError.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -11,7 +11,7 @@
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ApiMqDetail.allSchemas"
:allSchemas="ApiMqError.allSchemas"
/>
<!-- 列表 -->
@ -42,31 +42,31 @@
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ApiMqDetailRules"
:formAllSchemas="ApiMqDetail.allSchemas"
:apiUpdate="ApiMqDetailApi.updateApiMqDetail"
:apiCreate="ApiMqDetailApi.createApiMqDetail"
:rules="ApiMqErrorRules"
:formAllSchemas="ApiMqError.allSchemas"
:apiUpdate="ApiMqErrorApi.updateApiMqError"
:apiCreate="ApiMqErrorApi.createApiMqError"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ApiMqDetail.allSchemas" />
<Detail ref="detailRef" :isBasic="true" :allSchemas="ApiMqError.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/infra/api-mq-detail/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm ref="importFormRef" url="/infra/api-mq-error/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ApiMqDetail,ApiMqDetailRules } from './apiMqDetail.data'
import * as ApiMqDetailApi from '@/api/infra/apiMqDetail'
import { ApiMqError,ApiMqErrorRules } from './apiMqError.data'
import * as ApiMqErrorApi from '@/api/infra/apiMqError'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'ApiMqDetail' })
defineOptions({ name: 'ApiMqError' })
const message = useMessage() //
const { t } = useI18n() //
@ -74,7 +74,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ApiMqDetail.allSchemas.tableColumns)
const tableColumns = ref(ApiMqError.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
@ -91,7 +91,7 @@ const updataTableColumns = (val) => {
}
const { tableObject, tableMethods } = useTable({
getListApi: ApiMqDetailApi.getApiMqDetailPage //
getListApi: ApiMqErrorApi.getApiMqErrorPage //
})
//
@ -99,9 +99,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'infra:api-mq-detail:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'infra:api-mq-detail:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'infra:api-mq-detail:export'}), //
// defaultButtons.defaultAddBtn({hasPermi:'wms:apiMqError:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:apiMqError:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:apiMqError:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -133,8 +133,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'infra:api-mq-detail:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'infra:api-mq-detail:delete'}), //
// defaultButtons.mainListEditBtn({hasPermi:'wms:apiMqError:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:apiMqError:delete'}), //
]
// -
@ -154,7 +154,7 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType,data) => {
var isHave =ApiMqDetail.allSchemas.formSchema.some(function (item) {
var isHave =ApiMqError.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
@ -166,10 +166,10 @@ const formsSuccess = async (formType,data) => {
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await ApiMqDetailApi.createApiMqDetail(data)
await ApiMqErrorApi.createApiMqError(data)
message.success(t('common.createSuccess'))
} else {
await ApiMqDetailApi.updateApiMqDetail(data)
await ApiMqErrorApi.updateApiMqError(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
@ -179,7 +179,7 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicApiMqDetail')
detailRef.value.openDetail(row, titleName, titleValue, 'basicApiMqError')
}
/** 删除按钮操作 */
@ -188,7 +188,7 @@ const handleDelete = async (id: number) => {
//
await message.delConfirm()
//
await ApiMqDetailApi.deleteApiMqDetail(id)
await ApiMqErrorApi.deleteApiMqError(id)
message.success(t('common.delSuccess'))
//
await getList()
@ -203,8 +203,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await ApiMqDetailApi.exportApiMqDetail(tableObject.params)
download.excel(data, 'mq执行记录.xlsx')
const data = await ApiMqErrorApi.exportApiMqError(tableObject.params)
download.excel(data, 'mq执行异常记录.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -219,7 +219,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'mq执行记录导入模版.xlsx'
templateTitle: 'mq执行异常记录导入模版.xlsx'
})
//
const importSuccess = () => {
@ -238,7 +238,7 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ApiMqDetailApi.importTemplate()
importTemplateData.templateUrl = await ApiMqErrorApi.importTemplate()
})
</script>

63
src/views/infra/apiMqDetail/apiMqDetail.data.ts → src/views/infra/apiMqHis/apiMqHis.data.ts

@ -2,17 +2,21 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ApiMqDetailRules = reactive({
masterId: [required],
export const ApiMqHisRules = reactive({
number: [required],
type: [required],
times: [required]
})
export const ApiMqDetail = useCrudSchemas(reactive<CrudSchema[]>([
export const ApiMqHis = useCrudSchemas(reactive<CrudSchema[]>([
// {
// label: '编号',
// field: 'id',
// sort: 'custom',
// isForm: false
// },
{
label: '主业务编号编号',
label: '编号',
field: 'number',
sort: 'custom',
isSearch: true
@ -27,20 +31,7 @@ export const ApiMqDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '内容',
field: 'content',
sort: 'custom',
isSearch: true,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
}
},
{
label: '执行次数(默认1)',
label: '执行次数',
field: 'times',
sort: 'custom',
isSearch: true,
@ -49,14 +40,22 @@ export const ApiMqDetail = useCrudSchemas(reactive<CrudSchema[]>([
value: 0
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: true,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
// {
// label: '部门',
// field: 'departmentCode',
@ -92,6 +91,16 @@ export const ApiMqDetail = useCrudSchemas(reactive<CrudSchema[]>([
// isSearch: true
// },
// {
// label: '乐观锁',
// field: 'concurrencyStamp',
// sort: 'custom',
// isSearch: true,
// form: {
// component: 'InputNumber',
// value: 0
// }
// },
// {
// label: '操作',
// field: 'action',
// isForm: false,

81
src/views/infra/apiMqMain/index.vue → src/views/infra/apiMqHis/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ApiMqMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="ApiMqHis.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -11,7 +11,7 @@
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ApiMqMain.allSchemas"
:allSchemas="ApiMqHis.allSchemas"
/>
<!-- 列表 -->
@ -27,9 +27,9 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '业务编号', row.number)">
<span>{{ row.number }}</span>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
@ -42,46 +42,31 @@
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ApiMqMainRules"
:formAllSchemas="ApiMqMain.allSchemas"
:searchTableParams="searchTableParams"
:tableAllSchemas="ApiMqDetail.allSchemas"
:tableFormRules="ApiMqDetailRules"
:apiUpdate="ApiMqMainApi.updateApiMqMain"
:apiCreate="ApiMqMainApi.createApiMqMain"
:isBusiness="true"
:rules="ApiMqHisRules"
:formAllSchemas="ApiMqHis.allSchemas"
:apiUpdate="ApiMqHisApi.updateApiMqHis"
:apiCreate="ApiMqHisApi.createApiMqHis"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ApiMqMain.allSchemas" />
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="ApiMqMain.allSchemas"
:detailAllSchemas="ApiMqDetail.allSchemas"
:detailAllSchemasRules="ApiMqDetailRules"
:searchTableParams="searchTableParams"
:apiPage="ApiMqDetailApi.getApiMqDetailPage"
/>
<Detail ref="detailRef" :isBasic="true" :allSchemas="ApiMqHis.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/infra/api-mq-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm ref="importFormRef" url="/infra/api-mq-his/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ApiMqMain,ApiMqMainRules } from './apiMqMain.data'
import * as ApiMqMainApi from '@/api/infra/apiMqMain'
import { ApiMqDetail,ApiMqDetailRules } from '../apiMqDetail/apiMqDetail.data'
import * as ApiMqDetailApi from '@/api/infra/apiMqDetail'
import { ApiMqHis,ApiMqHisRules } from './apiMqHis.data'
import * as ApiMqHisApi from '@/api/infra/apiMqHis'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'ApiMqMain' })
defineOptions({ name: 'ApiMqHis' })
const message = useMessage() //
const { t } = useI18n() //
@ -89,7 +74,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...ApiMqMain.allSchemas.tableColumns,...ApiMqDetail.allSchemas.tableMainColumns])
const tableColumns = ref(ApiMqHis.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
@ -100,17 +85,13 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
})
}
//
const searchTableParams = ref([
])
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ApiMqMainApi.getApiMqMainPage //
getListApi: ApiMqHisApi.getApiMqHisPage //
})
//
@ -118,9 +99,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'infra:api-mq-main:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'infra:api-mq-main:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'infra:api-mq-main:export'}), //
// defaultButtons.defaultAddBtn({hasPermi:'wms:apiMqHis:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:apiMqHis:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:apiMqHis:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -152,8 +133,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'infra:api-mq-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'infra:api-mq-main:delete'}), //
// defaultButtons.mainListEditBtn({hasPermi:'wms:apiMqHis:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:apiMqHis:delete'}), //
]
// -
@ -173,7 +154,7 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType,data) => {
var isHave =ApiMqMain.allSchemas.formSchema.some(function (item) {
var isHave =ApiMqHis.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
@ -185,10 +166,10 @@ const formsSuccess = async (formType,data) => {
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await ApiMqMainApi.createApiMqMain(data)
await ApiMqHisApi.createApiMqHis(data)
message.success(t('common.createSuccess'))
} else {
await ApiMqMainApi.updateApiMqMain(data)
await ApiMqHisApi.updateApiMqHis(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
@ -198,7 +179,7 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicApiMqMain')
detailRef.value.openDetail(row, titleName, titleValue, 'basicApiMqHis')
}
/** 删除按钮操作 */
@ -207,7 +188,7 @@ const handleDelete = async (id: number) => {
//
await message.delConfirm()
//
await ApiMqMainApi.deleteApiMqMain(id)
await ApiMqHisApi.deleteApiMqHis(id)
message.success(t('common.delSuccess'))
//
await getList()
@ -222,8 +203,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await ApiMqMainApi.exportApiMqMain(tableObject.params)
download.excel(data, 'mq执行记录.xlsx')
const data = await ApiMqHisApi.exportApiMqHis(tableObject.params)
download.excel(data, 'mq执行历史记录.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -238,7 +219,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'mq执行记录导入模版.xlsx'
templateTitle: 'mq执行历史记录导入模版.xlsx'
})
//
const importSuccess = () => {
@ -257,7 +238,7 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ApiMqMainApi.importTemplate()
importTemplateData.templateUrl = await ApiMqHisApi.importTemplate()
})
</script>
Loading…
Cancel
Save