fix: 页面字段/接口调整
This commit is contained in:
@@ -39,11 +39,11 @@ let queryParams = reactive({
|
||||
/**操作模块 */
|
||||
title: '',
|
||||
/**操作人员 */
|
||||
operName: '',
|
||||
operaBy: '',
|
||||
/**业务类型 */
|
||||
businessType: undefined,
|
||||
/**操作状态 */
|
||||
status: undefined,
|
||||
statusFlag: undefined,
|
||||
/**开始时间 */
|
||||
beginTime: '',
|
||||
/**结束时间 */
|
||||
@@ -58,9 +58,9 @@ let queryParams = reactive({
|
||||
function fnQueryReset() {
|
||||
queryParams = Object.assign(queryParams, {
|
||||
title: '',
|
||||
operName: '',
|
||||
operaBy: '',
|
||||
businessType: undefined,
|
||||
status: undefined,
|
||||
statusFlag: undefined,
|
||||
beginTime: '',
|
||||
endTime: '',
|
||||
pageNum: 1,
|
||||
@@ -99,8 +99,8 @@ let tableState: TabeStateType = reactive({
|
||||
let tableColumns: ColumnsType = [
|
||||
{
|
||||
title: t('views.system.log.operate.operId'),
|
||||
dataIndex: 'operId',
|
||||
align: 'center',
|
||||
dataIndex: 'id',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
@@ -118,33 +118,33 @@ let tableColumns: ColumnsType = [
|
||||
},
|
||||
{
|
||||
title: t('views.system.log.operate.operUser'),
|
||||
dataIndex: 'operName',
|
||||
dataIndex: 'operaBy',
|
||||
align: 'left',
|
||||
width: 120,
|
||||
},
|
||||
// {
|
||||
// title: t('views.system.log.operate.requestMe'),
|
||||
// dataIndex: 'requestMethod',
|
||||
// dataIndex: 'operaUrlMethod',
|
||||
// align: 'left',
|
||||
// width: 150,
|
||||
// },
|
||||
{
|
||||
title: t('views.system.log.operate.host'),
|
||||
dataIndex: 'operIp',
|
||||
align: 'center',
|
||||
dataIndex: 'operaIp',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: t('views.system.log.operate.operStatus'),
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
dataIndex: 'statusFlag',
|
||||
key: 'statusFlag',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: t('views.system.log.operate.operDate'),
|
||||
dataIndex: 'operTime',
|
||||
align: 'center',
|
||||
dataIndex: 'operaTime',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
customRender(opt) {
|
||||
if (+opt.value <= 0) return '';
|
||||
@@ -163,7 +163,7 @@ let tableColumns: ColumnsType = [
|
||||
},
|
||||
{
|
||||
title: t('common.operate'),
|
||||
key: 'operId',
|
||||
key: 'id',
|
||||
align: 'left',
|
||||
},
|
||||
];
|
||||
@@ -221,20 +221,19 @@ let modalState: ModalStateType = reactive({
|
||||
openByView: false,
|
||||
title: '操作日志',
|
||||
from: {
|
||||
operId: undefined,
|
||||
id: undefined,
|
||||
businessType: 0,
|
||||
deptName: '',
|
||||
method: '',
|
||||
operIp: '',
|
||||
operLocation: '',
|
||||
operMsg: '',
|
||||
operName: '',
|
||||
operParam: '',
|
||||
operTime: 0,
|
||||
operUrl: '',
|
||||
operType: 1,
|
||||
requestMethod: 'PUT',
|
||||
status: 1,
|
||||
operaMethod: '',
|
||||
operaIp: '',
|
||||
operaLocation: '',
|
||||
operaMsg: '',
|
||||
operaBy: '',
|
||||
operaParam: '',
|
||||
operaTime: 0,
|
||||
operaUrl: '',
|
||||
operaUrlMethod: 'PUT',
|
||||
statusFlag: 1,
|
||||
title: '',
|
||||
},
|
||||
});
|
||||
@@ -356,13 +355,14 @@ function fnGetList(pageNum?: number) {
|
||||
queryParams.beginTime = queryRangePicker.value[0];
|
||||
queryParams.endTime = queryRangePicker.value[1];
|
||||
listSysLogOperate(toRaw(queryParams)).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// 取消勾选
|
||||
if (tableState.selectedRowKeys.length > 0) {
|
||||
tableState.selectedRowKeys = [];
|
||||
}
|
||||
tablePagination.total = res.total;
|
||||
tableState.data = res.rows;
|
||||
const { total, rows } = res.data;
|
||||
tablePagination.total = total;
|
||||
tableState.data = rows;
|
||||
if (
|
||||
tablePagination.total <=
|
||||
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
||||
@@ -415,10 +415,10 @@ onMounted(() => {
|
||||
<a-col :lg="8" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.log.operate.operUser')"
|
||||
name="operName"
|
||||
name="operaBy"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="queryParams.operName"
|
||||
v-model:value="queryParams.operaBy"
|
||||
allow-clear
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
@@ -439,10 +439,10 @@ onMounted(() => {
|
||||
<a-col :lg="8" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.log.operate.operStatus')"
|
||||
name="status"
|
||||
name="statusFlag"
|
||||
>
|
||||
<a-select
|
||||
v-model:value="queryParams.status"
|
||||
v-model:value="queryParams.statusFlag"
|
||||
allow-clear
|
||||
:options="dict.sysCommonStatus"
|
||||
>
|
||||
@@ -565,7 +565,7 @@ onMounted(() => {
|
||||
<!-- 表格列表 -->
|
||||
<a-table
|
||||
class="table"
|
||||
row-key="operId"
|
||||
row-key="id"
|
||||
:columns="tableColumns"
|
||||
:loading="tableState.loading"
|
||||
:data-source="tableState.data"
|
||||
@@ -585,10 +585,13 @@ onMounted(() => {
|
||||
:value="record.businessType"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="column.key === 'status'">
|
||||
<DictTag :options="dict.sysCommonStatus" :value="record.status" />
|
||||
<template v-if="column.key === 'statusFlag'">
|
||||
<DictTag
|
||||
:options="dict.sysCommonStatus"
|
||||
:value="record.statusFlag"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="column.key === 'operId'">
|
||||
<template v-if="column.key === 'id'">
|
||||
<a-space :size="8" align="center">
|
||||
<a-tooltip>
|
||||
<template #title>{{ t('common.viewText') }}</template>
|
||||
@@ -619,22 +622,22 @@ onMounted(() => {
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.log.operate.operId')"
|
||||
name="operId"
|
||||
name="id"
|
||||
>
|
||||
{{ modalState.from.operId }}
|
||||
{{ modalState.from.id }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.log.operate.operStatus')"
|
||||
name="status"
|
||||
name="statusFlag"
|
||||
>
|
||||
<a-tag :color="+modalState.from.status ? 'success' : 'error'">
|
||||
<a-tag :color="+modalState.from.statusFlag ? 'success' : 'error'">
|
||||
{{
|
||||
[
|
||||
t('views.system.log.operate.fail'),
|
||||
t('views.system.log.operate.suss'),
|
||||
][+modalState.from.status]
|
||||
][+modalState.from.statusFlag]
|
||||
}}
|
||||
</a-tag>
|
||||
</a-form-item>
|
||||
@@ -656,9 +659,9 @@ onMounted(() => {
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.log.operate.operUser')"
|
||||
name="operName"
|
||||
name="operaBy"
|
||||
>
|
||||
{{ modalState.from.operName }} / {{ modalState.from.operIp }}
|
||||
{{ modalState.from.operaBy }} / {{ modalState.from.operaIp }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -666,19 +669,19 @@ onMounted(() => {
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.log.operate.RequestIp')"
|
||||
name="operUrl"
|
||||
name="operaUrl"
|
||||
>
|
||||
{{ modalState.from.requestMethod }} -
|
||||
{{ modalState.from.operUrl }}
|
||||
{{ modalState.from.operaUrlMethod }} -
|
||||
{{ modalState.from.operaUrl }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.log.operate.operTime')"
|
||||
name="operTime"
|
||||
name="operaTime"
|
||||
>
|
||||
<span v-if="+modalState.from.operTime > 0">
|
||||
{{ parseDateToStr(+modalState.from.operTime) }}
|
||||
<span v-if="+modalState.from.operaTime > 0">
|
||||
{{ parseDateToStr(+modalState.from.operaTime) }}
|
||||
</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -695,32 +698,32 @@ onMounted(() => {
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<!-- <a-form-item
|
||||
:label="t('views.system.log.operate.operMe')"
|
||||
name="method"
|
||||
name="operaMethod"
|
||||
>
|
||||
{{ modalState.from.method }}
|
||||
{{ modalState.from.operaMethod }}
|
||||
</a-form-item> -->
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-form-item
|
||||
:label="t('views.system.log.operate.reqParam')"
|
||||
name="operParam"
|
||||
name="operaParam"
|
||||
:label-col="{ span: 3 }"
|
||||
:label-wrap="true"
|
||||
>
|
||||
<a-textarea
|
||||
v-model:value="modalState.from.operParam"
|
||||
v-model:value="modalState.from.operaParam"
|
||||
:auto-size="{ minRows: 2, maxRows: 6 }"
|
||||
:disabled="true"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
:label="t('views.system.log.operate.operInfo')"
|
||||
name="operMsg"
|
||||
name="operaMsg"
|
||||
:label-col="{ span: 3 }"
|
||||
:label-wrap="true"
|
||||
>
|
||||
<a-textarea
|
||||
v-model:value="modalState.from.operMsg"
|
||||
v-model:value="modalState.from.operaMsg"
|
||||
:auto-size="{ minRows: 2, maxRows: 6 }"
|
||||
:disabled="true"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user