hgwms-2098 fix alert修改

hwork-master
A0066811 2025-11-07 15:21:59 +08:00
parent e0d6edfd58
commit 67d68d29a8
3 changed files with 620 additions and 377 deletions

View File

@ -1,63 +1,152 @@
<template>
<a-list-layout
ref="pageRef"
>
<a-list-layout ref="pageRef">
<template #search>
<!-- 查询参数 -->
<pro-query
:searchParam="searchParam"
@on-search ="search"
></pro-query>
<!-- 查询参数 -->
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
</template>
<!-- 列表 -->
<pro-table
:fetch="fetch"
:columns="columns"
:toolbar="toolbar"
:param="state.param"
:pagination="pagination"
:operate="operate"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
>
<!-- 继承至 a-table 的默认插槽 -->
</pro-table>
</a-list-layout>
<!-- 列表 -->
<pro-table
:fetch="fetch"
:columns="columns"
:toolbar="toolbar"
:param="state.param"
:pagination="pagination"
:operate="operate"
:row-selection="{
selectedRowKeys: state.selectedRowKeys,
onChange: onSelectChange,
}"
>
<!-- 继承至 a-table 的默认插槽 -->
</pro-table>
</a-list-layout>
<a-modal v-model:open="visible" :footer="null" title="查看详情">{{
text
}}</a-modal>
</template>
<script>
import { message , Modal as modal} from '@hwork/ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { message, Modal as modal } from "@hwork/ant-design-vue";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import { page, clean } from "@/api/module/log";
import { reactive, createVNode } from 'vue';
import { reactive, createVNode, ref } from "vue";
const cleanKey = "clean";
export default {
setup() {
const text = ref("");
const visible = ref(false);
///
const converFormat = [{label:"成功", value:true},{label:"失败", value:false}];
const converFormat = [
{ label: "成功", value: true },
{ label: "失败", value: false },
];
///
const columns = [
{ dataIndex: "title", key: "title", title: "标题" ,width:120,showSearch: true},
{ dataIndex: "describe", key: "describe", title: "描述" ,width:120,showSearch: true},
{ dataIndex: "action", key: "action", title: "动作",width:100},
{ dataIndex: "type", key: "type", title: "方式",width:120},
{ dataIndex: "browser", key: "browser", title: "浏览器" ,width:120,ellipsis: true},
{ dataIndex: "system", key: "system", title: "系统" ,width:120,ellipsis: true},
{ dataIndex: "address", key: "address", title: "操作地" ,width:120,showSearch: true,ellipsis: true},
{ dataIndex: "createBy", key: "createBy", title: "创建人" ,width:120,ellipsis: true,showSearch: true},
{ dataIndex: "createUsername", key: "createUsername", title: "创建人" ,width:120,ellipsis: true,showSearch: true},
{ dataIndex: "createNickname", key: "createNickname", title: "创建人昵称" ,width:120,ellipsis: true},
{ dataIndex: "createTime", key: "createTime", title: "操作时间" ,width:180,ellipsis: true},
{ dataIndex: "state", key: "state", title: "状态", conver: converFormat ,width:120,ellipsis: true},
{ dataIndex: "params", key: "params", title: "参数",showSearch: true ,width:300,ellipsis: true},
{ dataIndex: "result", key: "result", title: "返回结果", showSearch: true ,width:300,ellipsis: true},
{
dataIndex: "title",
key: "title",
title: "标题",
width: 120,
showSearch: true,
},
{
dataIndex: "describe",
key: "describe",
title: "描述",
width: 120,
showSearch: true,
},
{ dataIndex: "action", key: "action", title: "动作", width: 100 },
{ dataIndex: "type", key: "type", title: "方式", width: 120 },
{
dataIndex: "browser",
key: "browser",
title: "浏览器",
width: 120,
ellipsis: true,
},
{
dataIndex: "system",
key: "system",
title: "系统",
width: 120,
ellipsis: true,
},
{
dataIndex: "address",
key: "address",
title: "操作地",
width: 120,
showSearch: true,
ellipsis: true,
},
{
dataIndex: "createBy",
key: "createBy",
title: "创建人",
width: 120,
ellipsis: true,
showSearch: true,
},
{
dataIndex: "createUsername",
key: "createUsername",
title: "创建人",
width: 120,
ellipsis: true,
showSearch: true,
},
{
dataIndex: "createNickname",
key: "createNickname",
title: "创建人昵称",
width: 120,
ellipsis: true,
},
{
dataIndex: "createTime",
key: "createTime",
title: "操作时间",
width: 180,
ellipsis: true,
},
{
dataIndex: "state",
key: "state",
title: "状态",
conver: converFormat,
width: 120,
ellipsis: true,
},
{
dataIndex: "params",
key: "params",
title: "参数",
showSearch: true,
width: 300,
ellipsis: true,
},
{
dataIndex: "result",
key: "result",
title: "返回结果",
showSearch: true,
width: 300,
ellipsis: true,
},
];
const operate = [
{ label: "查看", event: function (record) { alert("查看详情:" + JSON.stringify(record))}},
{
label: "查看",
event: function (record) {
text.value = JSON.stringify(record);
visible.value = true;
},
},
];
/// []
@ -72,59 +161,76 @@ export default {
///
const cleanMethod = (record) => {
modal.confirm({
title: '您是否确定要清空日志?',
title: "您是否确定要清空日志?",
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
okText: "确定",
cancelText: "取消",
onOk() {
message.loading({ content: "提交中...", key: cleanKey });
clean({"isAuth":true}).then((response) => {
if(response.success){
message.success({content: "清空成功", key: cleanKey, duration: 1})
}else{
message.error({content: "清空失败", key: cleanKey, duration: 1})
clean({ isAuth: true }).then((response) => {
if (response.success) {
message.success({
content: "清空成功",
key: cleanKey,
duration: 1,
});
} else {
message.error({
content: "清空失败",
key: cleanKey,
duration: 1,
});
}
})
}
});
},
});
}
};
///
const toolbar = [
{ label: "备份", event: function () { }},
{ label: "清空", event: function () { cleanMethod(); }},
{ label: "备份", event: function () {} },
{
label: "清空",
event: function () {
cleanMethod();
},
},
];
///
const pagination = {
pageNum: 1,
pageSize: 10,
}
};
/// - , fetch
const state = reactive({
selectedRowKeys: [],
param: { name: "", code: "", isAuth: true }
})
param: { name: "", code: "", isAuth: true },
});
///
const searchParam = [
{ key: "title", type: "input", label: "标题"},
{ key: "state", type: "select", label: "状态", value: "",
options: [
{ text: "全部", value: ""},
{ text: "成功", value: true},
{ text: "失败", value: false}
]
}
]
{ key: "title", type: "input", label: "标题" },
{
key: "state",
type: "select",
label: "状态",
value: "",
options: [
{ text: "全部", value: "" },
{ text: "成功", value: true },
{ text: "失败", value: false },
],
},
];
///
const search = function(value) {
state.param.title = value.title
state.param.state = value.state
}
const search = function (value) {
state.param.title = value.title;
state.param.state = value.state;
};
const onSelectChange = selectedRowKeys => {
const onSelectChange = (selectedRowKeys) => {
state.selectedRowKeys = selectedRowKeys;
};
@ -135,10 +241,10 @@ export default {
columns,
operate,
pagination,
visible,
search,
searchParam,
text,
onSelectChange,
};
},

View File

@ -5,51 +5,152 @@
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
</template>
<!-- 列表 -->
<pro-table ref="tableRef" :fetch="fetch" :columns="columns" :operate="operater" :toolbar="toolbar"
:param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
<pro-table
ref="tableRef"
:fetch="fetch"
:columns="columns"
:operate="operater"
:toolbar="toolbar"
:param="state.param"
:pagination="pagination"
:row-selection="{
selectedRowKeys: state.selectedRowKeys,
onChange: onSelectChange,
}"
>
<!-- 继承至 a-table 的默认插槽 -->
</pro-table>
</a-list-layout>
<a-modal v-model:open="visible" :footer="null" title="查看详情">{{
text
}}</a-modal>
</template>
<script>
import { message, Modal as modal } from '@hwork/ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { message, Modal as modal } from "@hwork/ant-design-vue";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import { page, clean, exportExcel } from "@/api/module/log";
import { reactive, createVNode, ref } from 'vue';
import { reactive, createVNode, ref } from "vue";
const cleanKey = "clean";
export default {
setup() {
const tableRef = ref()
const text = ref("");
const visible = ref(false);
const tableRef = ref();
///
const converFormat = [{ label: "成功", value: true }, { label: "失败", value: false }];
const converFormat = [
{ label: "成功", value: true },
{ label: "失败", value: false },
];
///
const columns = [
{ dataIndex: "title", key: "title", title: "标题", width: 120, showSearch: true },
{ dataIndex: "describe", key: "describe", title: "描述", width: 120, showSearch: true },
{
dataIndex: "title",
key: "title",
title: "标题",
width: 120,
showSearch: true,
},
{
dataIndex: "describe",
key: "describe",
title: "描述",
width: 120,
showSearch: true,
},
{ dataIndex: "action", key: "action", title: "动作", width: 100 },
{ dataIndex: "type", key: "type", title: "方式", width: 120 },
{ dataIndex: "browser", key: "browser", title: "浏览器", width: 120, ellipsis: true },
{ dataIndex: "system", key: "system", title: "系统", width: 120, ellipsis: true },
{ dataIndex: "address", key: "address", title: "操作地", width: 120, showSearch: true, ellipsis: true },
{
dataIndex: "browser",
key: "browser",
title: "浏览器",
width: 120,
ellipsis: true,
},
{
dataIndex: "system",
key: "system",
title: "系统",
width: 120,
ellipsis: true,
},
{
dataIndex: "address",
key: "address",
title: "操作地",
width: 120,
showSearch: true,
ellipsis: true,
},
{ dataIndex: "operator", key: "operator", title: "操作人", width: 100 },
{ dataIndex: "createBy", key: "createBy", title: "创建人", width: 120, ellipsis: true, showSearch: true },
{ dataIndex: "createUsername", key: "createUsername", title: "创建人", width: 120, ellipsis: true, showSearch: true },
{ dataIndex: "createNickname", key: "createNickname", title: "创建人昵称", width: 120, ellipsis: true },
{ dataIndex: "createTime", key: "createTime", title: "操作时间", width: 180, ellipsis: true },
{ dataIndex: "state", key: "state", title: "状态", conver: converFormat, width: 120, ellipsis: true },
{ dataIndex: "params", key: "params", title: "参数", showSearch: true, width: 300, ellipsis: true },
{ dataIndex: "result", key: "result", title: "返回结果", showSearch: true, width: 300, ellipsis: true },
{
dataIndex: "createBy",
key: "createBy",
title: "创建人",
width: 120,
ellipsis: true,
showSearch: true,
},
{
dataIndex: "createUsername",
key: "createUsername",
title: "创建人",
width: 120,
ellipsis: true,
showSearch: true,
},
{
dataIndex: "createNickname",
key: "createNickname",
title: "创建人昵称",
width: 120,
ellipsis: true,
},
{
dataIndex: "createTime",
key: "createTime",
title: "操作时间",
width: 180,
ellipsis: true,
},
{
dataIndex: "state",
key: "state",
title: "状态",
conver: converFormat,
width: 120,
ellipsis: true,
},
{
dataIndex: "params",
key: "params",
title: "参数",
showSearch: true,
width: 300,
ellipsis: true,
},
{
dataIndex: "result",
key: "result",
title: "返回结果",
showSearch: true,
width: 300,
ellipsis: true,
},
];
const operater = [
{ label: "查看", event: function (record) { alert("查看详情:" + JSON.stringify(record)) } },
{
label: "查看",
event: function (record) {
text.value = JSON.stringify(record);
visible.value = true;
},
},
];
/// []
@ -64,62 +165,83 @@ export default {
///
const cleanMethod = (record) => {
modal.confirm({
title: '您是否确定要清空日志?',
title: "您是否确定要清空日志?",
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
okText: "确定",
cancelText: "取消",
onOk() {
message.loading({ content: "提交中...", key: cleanKey });
clean({ "isAuth": false }).then((response) => {
clean({ isAuth: false }).then((response) => {
if (response.success) {
message.success({ content: "清空成功", key: cleanKey, duration: 1 })
tableRef.value.reload()
message.success({
content: "清空成功",
key: cleanKey,
duration: 1,
});
tableRef.value.reload();
} else {
message.error({ content: "清空失败", key: cleanKey, duration: 1 })
message.error({
content: "清空失败",
key: cleanKey,
duration: 1,
});
}
})
}
});
},
});
}
};
///
const toolbar = [
{ label: "备份", event: function () { exportExcel(); } },
{ label: "清空", event: function () { cleanMethod(); } },
{
label: "备份",
event: function () {
exportExcel();
},
},
{
label: "清空",
event: function () {
cleanMethod();
},
},
];
///
const pagination = {
pageNum: 1,
pageSize: 10,
}
};
/// - , fetch
const state = reactive({
selectedRowKeys: [],
param: { isAuth: false }
})
param: { isAuth: false },
});
///
const searchParam = [
{ key: "title", type: "input", label: "标题" },
{
key: "state", type: "select", label: "状态", value: "",
key: "state",
type: "select",
label: "状态",
value: "",
options: [
{ text: "全部", value: "" },
{ text: "成功", value: true },
{ text: "失败", value: false }
]
}
]
{ text: "失败", value: false },
],
},
];
///
const search = function (value) {
state.param.title = value.title
state.param.state = value.state
}
state.param.title = value.title;
state.param.state = value.state;
};
const onSelectChange = selectedRowKeys => {
const onSelectChange = (selectedRowKeys) => {
state.selectedRowKeys = selectedRowKeys;
};
@ -131,12 +253,12 @@ export default {
columns,
operater,
pagination,
visible,
search,
searchParam,
text,
onSelectChange,
tableRef
tableRef,
};
},
};

View File

@ -3,156 +3,160 @@
<template #search>
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
</template>
<pro-table style="margin-top: 10px" rowKey="id" ref="tableRef" :fetch="fetch" :columns="columns" :toolbar="toolbar"
:operate="operate" :param="state.param" :pagination="pagination"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
<pro-table
style="margin-top: 10px"
rowKey="id"
ref="tableRef"
:fetch="fetch"
:columns="columns"
:toolbar="toolbar"
:operate="operate"
:param="state.param"
:pagination="pagination"
:row-selection="{
selectedRowKeys: state.selectedRowKeys,
onChange: onSelectChange,
}"
>
</pro-table>
</a-list-layout>
<a-modal v-model:open="visible" :footer="null" title="查看详情">{{text}}</a-modal>
</template>
<script>
import {
message,
Modal as modal
} from '@hwork/ant-design-vue';
import {
ExclamationCircleOutlined
} from '@ant-design/icons-vue';
import { message, Modal as modal } from "@hwork/ant-design-vue";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import {
reActivate,
page,
remove,
cancel,
removeBatch
removeBatch,
} from "@/api/wms/request";
import {
reactive,
createVNode,
ref,
} from 'vue';
import { reactive, createVNode, ref } from "vue";
const reActivateKey = "reActivate";
const removeKey = "remove";
const cancelKey = "cancel";
const removeBatchKey = "removeBatch";
export default {
name: 'WmsRequestIndex',
name: "WmsRequestIndex",
components: {},
setup() {
const tableRef = ref()
const columns = [{
dataIndex: "requestCode",
key: "requestCode",
title: "请求编号",
width: 150,
showSearch: true,
},
{
dataIndex: "status",
key: "status",
title: "状态",
width: 100,
dictionary: {
type: 'tag',
code: 'TaskStatus'
const tableRef = ref();
const text = ref('')
const visible = ref(false)
const columns = [
{
dataIndex: "requestCode",
key: "requestCode",
title: "请求编号",
width: 150,
showSearch: true,
},
{
dataIndex: "status",
key: "status",
title: "状态",
width: 100,
dictionary: {
type: "tag",
code: "TaskStatus",
},
showSearch: true,
},
{
dataIndex: "paramType",
key: "paramType",
title: "请求类型",
width: 100,
showSearch: true,
},
{
dataIndex: "processClass",
key: "processClass",
title: "处理类",
width: 160,
showSearch: true,
},
{
dataIndex: "requestDate",
key: "requestDate",
title: "请求时间",
width: 180,
},
{
dataIndex: "respondDate",
key: "respondDate",
title: "响应时间",
width: 180,
},
{
dataIndex: "request",
key: "request",
title: "请求数据",
width: 900,
showSearch: true,
},
{
dataIndex: "response",
key: "response",
title: "响应信息",
width: 900,
showSearch: true,
},
{
dataIndex: "createBy",
key: "createBy",
title: "录入人",
width: 120,
},
{
dataIndex: "createTime",
key: "createTime",
title: "录入时间",
width: 200,
},
{
dataIndex: "updateBy",
key: "updateBy",
title: "修改人",
width: 120,
},
{
dataIndex: "updateTime",
key: "updateTime",
title: "修改时间",
width: 200,
},
{
dataIndex: "preRequestCode",
key: "preRequestCode",
title: "前置请求编号",
width: 120,
},
{
dataIndex: "priority",
key: "priority",
title: "优先级",
width: 120,
dictionary: {
type: "tag",
code: "priority",
},
},
{
dataIndex: "remark",
key: "remark",
title: "备注",
width: 300,
},
showSearch: true
},
{
dataIndex: "paramType",
key: "paramType",
title: "请求类型",
width: 100,
showSearch: true,
},
{
dataIndex: "processClass",
key: "processClass",
title: "处理类",
width: 160,
showSearch: true,
},
{
dataIndex: "requestDate",
key: "requestDate",
title: "请求时间",
width: 180,
},
{
dataIndex: "respondDate",
key: "respondDate",
title: "响应时间",
width: 180,
},
{
dataIndex: "request",
key: "request",
title: "请求数据",
width: 900,
showSearch: true,
},
{
dataIndex: "response",
key: "response",
title: "响应信息",
width: 900,
showSearch: true,
},
{
dataIndex: "createBy",
key: "createBy",
title: "录入人",
width: 120,
},
{
dataIndex: "createTime",
key: "createTime",
title: "录入时间",
width: 200,
},
{
dataIndex: "updateBy",
key: "updateBy",
title: "修改人",
width: 120,
},
{
dataIndex: "updateTime",
key: "updateTime",
title: "修改时间",
width: 200,
},
{
dataIndex: "preRequestCode",
key: "preRequestCode",
title: "前置请求编号",
width: 120,
},
{
dataIndex: "priority",
key: "priority",
title: "优先级",
width: 120,
dictionary: {
type: 'tag',
code: 'priority'
}
},
{
dataIndex: "remark",
key: "remark",
title: "备注",
width: 300,
},
];
/// []
const fetch = async (param) => {
var response = await page(param);
console.log("response", response)
console.log("response", response);
return {
total: response.data.total,
data: response.data.record,
@ -162,17 +166,17 @@ export default {
//
const reActivateMethod = (record) => {
modal.confirm({
title: '您是否确认重置该请求?',
title: "您是否确认重置该请求?",
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
okText: "确定",
cancelText: "取消",
onOk() {
message.loading({
content: "重置中...",
key: reActivateKey
key: reActivateKey,
});
reActivate({
'id': record.id,
id: record.id,
//"status": record.status,
// "processClass": record.processClass,
//data: record.data,
@ -181,167 +185,175 @@ export default {
message.success({
content: "重置成功",
key: reActivateKey,
duration: 1
})
tableRef.value.reload()
duration: 1,
});
tableRef.value.reload();
} else {
message.error({
content: "重置失败:" + response.msg,
key: reActivateKey,
duration: 3
})
duration: 3,
});
}
})
}
});
},
});
}
};
//
const cancelMethod = (record) => {
const confirmMsg = modal.confirm({
title: '您是否确认取消该请求?',
title: "您是否确认取消该请求?",
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
okText: "确定",
cancelText: "取消",
onOk() {
message.loading({
content: "取消中...",
key: cancelKey
key: cancelKey,
});
cancel({
'id': record.id,
'status': record.status,
id: record.id,
status: record.status,
}).then((response) => {
if (response.success) {
message.success({
content: "取消成功",
key: cancelKey,
duration: 1
})
tableRef.value.reload()
duration: 1,
});
tableRef.value.reload();
} else {
message.destroy()
message.destroy();
message.error({
message: '请求取消失败',
description: response.msg
})
message: "请求取消失败",
description: response.msg,
});
}
})
confirmMsg.destroy()
}
});
confirmMsg.destroy();
},
});
}
};
//
const removeMethod = (record) => {
modal.confirm({
title: '您是否确定要删除?',
title: "您是否确定要删除?",
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
okText: "确定",
cancelText: "取消",
onOk() {
message.loading({
content: "提交中...",
key: removeKey
key: removeKey,
});
remove({
"id": record.id,
id: record.id,
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
message
.success({
content: "删除成功",
key: removeKey,
duration: 1,
})
.then(() => {
tableRef.value.reload();
});
} else {
message.error({
content: response.msg,
key: removeKey,
duration: 1
})
duration: 1,
});
}
})
}
});
},
});
}
};
//
const removeBatchMethod = (ids) => {
modal.confirm({
title: '您是否确定要删除?',
title: "您是否确定要删除?",
icon: createVNode(ExclamationCircleOutlined),
okText: '确定',
cancelText: '取消',
okText: "确定",
cancelText: "取消",
onOk() {
message.loading({
content: "提交中...",
key: removeBatchKey
key: removeBatchKey,
});
removeBatch({
"ids": ids
ids: ids,
}).then((response) => {
if (response.success) {
message.success({
content: "删除成功",
key: removeBatchKey,
duration: 1
}).then(() => {
tableRef.value.reload()
})
message
.success({
content: "删除成功",
key: removeBatchKey,
duration: 1,
})
.then(() => {
tableRef.value.reload();
});
} else {
message.error({
content: "删除失败",
key: removeBatchKey,
duration: 1
})
duration: 1,
});
}
})
}
});
},
});
}
};
///
const toolbar = [{
label: "删除",
code: 'wms:request:delete',
event: function () {
removeBatchMethod(state.selectedRowKeys)
const toolbar = [
{
label: "删除",
code: "wms:request:delete",
event: function () {
removeBatchMethod(state.selectedRowKeys);
},
type: "danger",
},
type: 'danger'
},];
];
///
const operate = [{
label: "删除",
code: 'wms:request:delete',
event: function (record) {
removeMethod(record)
}
},
{
label: "重置",
code: 'wms:request:reactivate',
isRes: true,
event: function (record) {
reActivateMethod(record)
}
},
{
label: "取消",
code: 'wms:request:cancel',
isRes: true,
event: function (record) {
cancelMethod(record)
}
},
{
label: "查看",
event: function (record) {
alert("查看详情:" + JSON.stringify(record))
}
},
const operate = [
{
label: "删除",
code: "wms:request:delete",
event: function (record) {
removeMethod(record);
},
},
{
label: "重置",
code: "wms:request:reactivate",
isRes: true,
event: function (record) {
reActivateMethod(record);
},
},
{
label: "取消",
code: "wms:request:cancel",
isRes: true,
event: function (record) {
cancelMethod(record);
},
},
{
label: "查看",
event: function (record) {
// alert(":" + JSON.stringify(record));
text.value = JSON.stringify(record)
visible.value = true
},
},
];
const pagination = {
@ -349,8 +361,8 @@ export default {
pageSize: 20,
showSizeChanger: true, //
pageSizeOptions: ["10", "20", "50", "100"], //
showTotal: total => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize) //
showTotal: (total) => `${total} 条记录`, //
showSizeChange: (current, pageSize) => (this.pageSize = pageSize), //
};
const state = reactive({
@ -358,33 +370,35 @@ export default {
param: {},
});
const searchParam = [{
key: "request",
type: "input",
label: "请求消息"
},
{
key: "response",
type: "input",
label: "响应消息"
}, {
key: "requestCode",
type: "input",
label: "请求编号"
},
{
key: "preRequestCode",
type: "input",
label: "前置请求编号"
}
]
const searchParam = [
{
key: "request",
type: "input",
label: "请求消息",
},
{
key: "response",
type: "input",
label: "响应消息",
},
{
key: "requestCode",
type: "input",
label: "请求编号",
},
{
key: "preRequestCode",
type: "input",
label: "前置请求编号",
},
];
const search = function (value) {
console.log("search", value)
state.param = value
}
console.log("search", value);
state.param = value;
};
const onSelectChange = selectedRowKeys => {
const onSelectChange = (selectedRowKeys) => {
state.selectedRowKeys = selectedRowKeys;
};
@ -399,8 +413,9 @@ export default {
searchParam,
onSelectChange,
tableRef,
visible,
text
};
}
}
},
};
</script>