列表优化
parent
161a2a3e9a
commit
1f43402454
|
|
@ -64,7 +64,7 @@
|
|||
:row-height="100" :customRow="rowClick" :sortDirections="['descend', 'ascend', '']"
|
||||
:rowClassName="setRowClassName" @resizeColumn="handleResizeColumn">
|
||||
<!--列搜索组件封装-->
|
||||
<template #filterDropdown="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }">
|
||||
<template #customFilterDropdown="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }">
|
||||
<div style="padding: 8px">
|
||||
<a-input ref="searchInput" :placeholder="'请输入'" :value="selectedKeys[0]"
|
||||
style="width: 188px; margin-bottom: 8px; display: block"
|
||||
|
|
@ -117,7 +117,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<!--列排序组件封装-->
|
||||
<template #filterIcon="filtered">
|
||||
<template #customFilterIcon="filtered">
|
||||
<search-outlined :style="{ color: filtered ? '#108ee9' : undefined }" />
|
||||
</template>
|
||||
|
||||
|
|
@ -154,7 +154,8 @@
|
|||
<!-- 单个操作 -->
|
||||
<pro-authority :value="item.code ? item.code : false" v-else>
|
||||
<a-popconfirm v-if="item.isDel" title="确认删除?" ok-text="确认" cancel-text="取消"
|
||||
@confirm="item.delEvent(record)" @cancel="item.cancelEvent(record)">
|
||||
@confirm="item.delEvent && item.delEvent(record)"
|
||||
@cancel="item.cancelEvent ? item.cancelEvent(record) : null">
|
||||
<a-button type="text" danger >{{ item.label || '删除' }}</a-button>
|
||||
</a-popconfirm>
|
||||
<div style="display: inline-block" v-else>
|
||||
|
|
@ -568,7 +569,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
/// 为所有 column 新增默认 customRender 属性
|
||||
/// 初始化列:设置字典/过滤等;兼容 antdv4 新 API(customFilterDropdown/customFilterIcon),避免 column.slots 警告
|
||||
state.columns.forEach(async (column) => {
|
||||
//因为列过滤的渲染优先于dictionary组件的渲染,所以字典的初始化放在table列初始化中
|
||||
let dict = [];
|
||||
|
|
@ -583,11 +584,8 @@
|
|||
column.filters = dict;
|
||||
column.filterSearch = true;
|
||||
}
|
||||
// 绑定列级过滤插槽(显示放大镜图标 + 下拉内容)
|
||||
column.slots = Object.assign({}, column.slots || {}, {
|
||||
filterDropdown: 'filterDropdown',
|
||||
filterIcon: 'filterIcon'
|
||||
})
|
||||
// 新 API:使用 customFilterDropdown 开启自定义下拉,图标使用插槽或默认样式
|
||||
column.customFilterDropdown = true;
|
||||
}
|
||||
// 兼容:若非 showSearch 但需要显示自定义过滤图标/下拉,可在外部传入 column.slots 自定义
|
||||
});
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
checkStrictly
|
||||
show-line="true"
|
||||
:tree-data="state.powers"
|
||||
:replace-fields="state.powerReplaceFields"
|
||||
:fieldNames="state.powerReplaceFields"
|
||||
v-model:checkedKeys="state.checkedPowerIds"
|
||||
/>
|
||||
</a-tab-pane>
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
show-line="true"
|
||||
v-if="state.showDept"
|
||||
:tree-data="state.depts"
|
||||
:replace-fields="state.deptReplaceFields"
|
||||
:fieldNames="state.deptReplaceFields"
|
||||
v-model:checkedKeys="state.checkedDeptIds"
|
||||
/>
|
||||
</a-tab-pane>
|
||||
|
|
|
|||
|
|
@ -79,19 +79,12 @@
|
|||
console.log("1 TaskStatistics")
|
||||
//当前仓库的信息汇总
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
const columns = [
|
||||
{
|
||||
title: "日期",
|
||||
dataIndex: "dayTime",
|
||||
key: "dayTime",
|
||||
width:100
|
||||
width:120
|
||||
},
|
||||
{
|
||||
title: "方向标志",
|
||||
|
|
|
|||
|
|
@ -79,19 +79,12 @@
|
|||
console.log("1 TaskStatistics")
|
||||
//当前仓库的信息汇总
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
const columns = [
|
||||
{
|
||||
title: "日期",
|
||||
dataIndex: "dayTime",
|
||||
key: "dayTime",
|
||||
width: 100
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: "业务类型",
|
||||
|
|
|
|||
|
|
@ -3,9 +3,20 @@
|
|||
<template #search>
|
||||
<pro-query :searchParam="searchParam" @on-search="search"></pro-query>
|
||||
</template>
|
||||
<pro-table 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
|
||||
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>
|
||||
|
|
@ -31,121 +42,122 @@ export default {
|
|||
components: {},
|
||||
|
||||
setup() {
|
||||
|
||||
const tableRef = ref()
|
||||
|
||||
const columns = [{
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
dataIndex: "requestCode",
|
||||
key: "requestCode",
|
||||
title: "请求编号",
|
||||
width: 200,
|
||||
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: "index",
|
||||
key: "index",
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: 'left',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
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: 150,
|
||||
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: 150,
|
||||
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,
|
||||
},
|
||||
];
|
||||
|
||||
/// 数据来源 [模拟]
|
||||
|
|
@ -305,46 +317,51 @@ export default {
|
|||
};
|
||||
|
||||
/// 工具栏
|
||||
const toolbar = [{
|
||||
label: "删除",
|
||||
code: 'wms:request:delete',
|
||||
icon: 'DeleteOutlined',
|
||||
event: function () {
|
||||
removeBatchMethod(state.selectedRowKeys)
|
||||
const toolbar = [
|
||||
{
|
||||
label: "删除",
|
||||
code: "wms:request:delete",
|
||||
event: function () {
|
||||
removeBatchMethod(state.selectedRowKeys);
|
||||
},
|
||||
icon: 'DeleteOutlined',
|
||||
danger: true,
|
||||
},
|
||||
];
|
||||
|
||||
/// 行操作
|
||||
const operate = [{
|
||||
label: "删除",
|
||||
code: 'wms:request:delete',
|
||||
isDel: true,
|
||||
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 = {
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ export default {
|
|||
dataIndex: "createBy",
|
||||
key: "createBy",
|
||||
title: "录入人",
|
||||
width: 100,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
dataIndex: "createTime",
|
||||
|
|
@ -148,7 +148,7 @@ export default {
|
|||
dataIndex: "updateBy",
|
||||
key: "updateBy",
|
||||
title: "修改人",
|
||||
width: 100,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
dataIndex: "updateTime",
|
||||
|
|
|
|||
|
|
@ -217,14 +217,14 @@ export default {
|
|||
dataIndex: "sourceLoc",
|
||||
key: "sourceLoc",
|
||||
title: "源位置",
|
||||
width: 150,
|
||||
width: 170,
|
||||
showSearch: true,
|
||||
},
|
||||
{
|
||||
dataIndex: "targetLoc",
|
||||
key: "targetLoc",
|
||||
title: "目标位置",
|
||||
width: 120,
|
||||
width: 170,
|
||||
showSearch: true,
|
||||
},
|
||||
// {
|
||||
|
|
|
|||
|
|
@ -380,21 +380,21 @@ export default {
|
|||
];
|
||||
|
||||
/// 行操作
|
||||
const operate = [{
|
||||
label: "修改",
|
||||
code: 'wms:loc:edit',
|
||||
event: function (record) {
|
||||
state.visibleEdit = true, state.recordEdit = record
|
||||
}
|
||||
},
|
||||
{
|
||||
const operate = [ {
|
||||
label: "删除",
|
||||
code: 'wms:loc:delete',
|
||||
isDel: true,
|
||||
delEvent: function (record) {
|
||||
removeMethod(record)
|
||||
}
|
||||
},{
|
||||
label: "修改",
|
||||
code: 'wms:loc:edit',
|
||||
event: function (record) {
|
||||
state.visibleEdit = true, state.recordEdit = record
|
||||
}
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
/// 分页参数
|
||||
|
|
|
|||
Loading…
Reference in New Issue