fix: Fix operate log page error
parent
f5f88b3db2
commit
a4330e30a8
|
|
@ -316,7 +316,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-center" v-if="applicationDetails.disclaimer" style="margin-top: 8px">
|
<div class="text-center mt-8" v-if="applicationDetails.disclaimer">
|
||||||
<el-text type="info" v-if="applicationDetails.disclaimer" style="font-size: 12px">
|
<el-text type="info" v-if="applicationDetails.disclaimer" style="font-size: 12px">
|
||||||
<auto-tooltip :content="applicationDetails.disclaimer_value">
|
<auto-tooltip :content="applicationDetails.disclaimer_value">
|
||||||
{{ applicationDetails.disclaimer_value }}
|
{{ applicationDetails.disclaimer_value }}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
:class="type"
|
:class="type"
|
||||||
:style="{
|
:style="{
|
||||||
height: firsUserInput ? '100%' : undefined,
|
height: firsUserInput ? '100%' : undefined,
|
||||||
paddingBottom: applicationDetails.disclaimer ? '20px' : 0,
|
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -69,18 +69,30 @@
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<el-button @click="exportLog" style="margin-left: 10px"
|
<el-button
|
||||||
v-hasPermission="
|
@click="exportLog"
|
||||||
new ComplexPermission([RoleConst.ADMIN],
|
style="margin-left: 10px"
|
||||||
[PermissionConst.OPERATION_LOG_EXPORT],
|
v-hasPermission="
|
||||||
[EditionConst.IS_EE, EditionConst.IS_PE], 'OR')"
|
new ComplexPermission(
|
||||||
>{{ $t('common.export') }}
|
[RoleConst.ADMIN],
|
||||||
|
[PermissionConst.OPERATION_LOG_EXPORT],
|
||||||
|
[EditionConst.IS_EE, EditionConst.IS_PE],
|
||||||
|
'OR',
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>{{ $t('common.export') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="dialogVisible = true"
|
<el-button
|
||||||
v-hasPermission="
|
@click="dialogVisible = true"
|
||||||
new ComplexPermission([RoleConst.ADMIN],
|
v-hasPermission="
|
||||||
[PermissionConst.OPERATION_LOG_CLEAR_POLICY],
|
new ComplexPermission(
|
||||||
[EditionConst.IS_EE, EditionConst.IS_PE], 'OR')">
|
[RoleConst.ADMIN],
|
||||||
|
[PermissionConst.OPERATION_LOG_CLEAR_POLICY],
|
||||||
|
[EditionConst.IS_EE, EditionConst.IS_PE],
|
||||||
|
'OR',
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ $t('views.chatLog.buttons.clearStrategy') }}
|
{{ $t('views.chatLog.buttons.clearStrategy') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -107,7 +119,7 @@
|
||||||
@click="popoverVisible = !popoverVisible"
|
@click="popoverVisible = !popoverVisible"
|
||||||
>
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Filter/>
|
<Filter />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -132,10 +144,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<el-button size="small" @click="filterChange('clear')"
|
<el-button size="small" @click="filterChange('clear')"
|
||||||
>{{ $t('common.clear') }}
|
>{{ $t('common.clear') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="filterChange" size="small"
|
<el-button type="primary" @click="filterChange" size="small"
|
||||||
>{{ $t('common.confirm') }}
|
>{{ $t('common.confirm') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|
@ -184,7 +196,7 @@
|
||||||
@click="workspaceVisible = !workspaceVisible"
|
@click="workspaceVisible = !workspaceVisible"
|
||||||
>
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Filter/>
|
<Filter />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -209,10 +221,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<el-button size="small" @click="filterWorkspaceChange('clear')"
|
<el-button size="small" @click="filterWorkspaceChange('clear')"
|
||||||
>{{ $t('common.clear') }}
|
>{{ $t('common.clear') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="filterWorkspaceChange" size="small"
|
<el-button type="primary" @click="filterWorkspaceChange" size="small"
|
||||||
>{{ $t('common.confirm') }}
|
>{{ $t('common.confirm') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|
@ -226,8 +238,8 @@
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span v-if="row.status === 200">{{
|
<span v-if="row.status === 200">{{
|
||||||
$t('views.operateLog.table.status.success')
|
$t('views.operateLog.table.status.success')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else style="color: red">{{ $t('views.operateLog.table.status.fail') }}</span>
|
<span v-else style="color: red">{{ $t('views.operateLog.table.status.fail') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -244,8 +256,11 @@
|
||||||
<el-table-column :label="$t('common.operation')" width="60" align="left" fixed="right">
|
<el-table-column :label="$t('common.operation')" width="60" align="left" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span class="mr-4">
|
<span class="mr-4">
|
||||||
<el-tooltip effect="dark" :content="$t('views.operateLog.table.opt.label')"
|
<el-tooltip
|
||||||
placement="top">
|
effect="dark"
|
||||||
|
:content="$t('views.operateLog.table.opt.label')"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
<el-button type="primary" text @click.stop="showDetails(row)" class="text-button">
|
<el-button type="primary" text @click.stop="showDetails(row)" class="text-button">
|
||||||
<AppIcon iconName="app-operate-log"></AppIcon>
|
<AppIcon iconName="app-operate-log"></AppIcon>
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -255,53 +270,53 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</app-table>
|
</app-table>
|
||||||
</div>
|
</div>
|
||||||
<DetailDialog ref="DetailDialogRef"/>
|
<DetailDialog ref="DetailDialogRef" />
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-dialog
|
||||||
|
:title="$t('views.chatLog.buttons.clearStrategy')"
|
||||||
|
v-model="dialogVisible"
|
||||||
|
width="25%"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
>
|
||||||
|
<span>{{ $t('common.delete') }}</span>
|
||||||
|
<el-input-number
|
||||||
|
v-model="days"
|
||||||
|
controls-position="right"
|
||||||
|
:min="1"
|
||||||
|
:max="100000"
|
||||||
|
:value-on-clear="0"
|
||||||
|
step-strictly
|
||||||
|
style="width: 110px; margin-left: 8px; margin-right: 8px"
|
||||||
|
></el-input-number>
|
||||||
|
<span>{{ $t('views.chatLog.daysText') }}</span>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer" style="margin-top: 16px">
|
||||||
|
<el-button @click="dialogVisible = false">{{ $t('common.cancel') }}</el-button>
|
||||||
|
<el-button type="primary" @click="saveCleanTime">
|
||||||
|
{{ $t('common.save') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog
|
|
||||||
:title="$t('views.chatLog.buttons.clearStrategy')"
|
|
||||||
v-model="dialogVisible"
|
|
||||||
width="25%"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
:close-on-press-escape="false"
|
|
||||||
>
|
|
||||||
<span>{{ $t('common.delete') }}</span>
|
|
||||||
<el-input-number
|
|
||||||
v-model="days"
|
|
||||||
controls-position="right"
|
|
||||||
:min="1"
|
|
||||||
:max="100000"
|
|
||||||
:value-on-clear="0"
|
|
||||||
step-strictly
|
|
||||||
style="width: 110px; margin-left: 8px; margin-right: 8px"
|
|
||||||
></el-input-number>
|
|
||||||
<span>{{ $t('views.chatLog.daysText') }}</span>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer" style="margin-top: 16px">
|
|
||||||
<el-button @click="dialogVisible = false">{{ $t('common.cancel') }}</el-button>
|
|
||||||
<el-button type="primary" @click="saveCleanTime">
|
|
||||||
{{ $t('common.save') }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref, onMounted, reactive} from 'vue'
|
import { ref, onMounted, reactive } from 'vue'
|
||||||
import operateLog from '@/api/system/operate-log'
|
import operateLog from '@/api/system/operate-log'
|
||||||
import DetailDialog from './component/DetailDialog.vue'
|
import DetailDialog from './component/DetailDialog.vue'
|
||||||
import {t} from '@/locales'
|
import { t } from '@/locales'
|
||||||
import {beforeDay, datetimeFormat, nowDate} from '@/utils/time'
|
import { beforeDay, datetimeFormat, nowDate } from '@/utils/time'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
import WorkspaceApi from '@/api/system/workspace.ts'
|
import WorkspaceApi from '@/api/system/workspace.ts'
|
||||||
import {hasPermission} from "@/utils/permission";
|
import { hasPermission } from '@/utils/permission'
|
||||||
import {EditionConst, PermissionConst, RoleConst} from "@/utils/permission/data.ts";
|
import { EditionConst, PermissionConst, RoleConst } from '@/utils/permission/data.ts'
|
||||||
import {ComplexPermission} from "@/utils/permission/type.ts";
|
import { ComplexPermission } from '@/utils/permission/type.ts'
|
||||||
import {loadSharedApi} from "@/utils/dynamics-api/shared-api.ts";
|
import { loadSharedApi } from '@/utils/dynamics-api/shared-api.ts'
|
||||||
import {MsgSuccess} from "@/utils/message.ts";
|
import { MsgSuccess } from '@/utils/message.ts'
|
||||||
|
|
||||||
const {user} = useStore()
|
const { user } = useStore()
|
||||||
const popoverVisible = ref(false)
|
const popoverVisible = ref(false)
|
||||||
const operateTypeArr = ref<any[]>([])
|
const operateTypeArr = ref<any[]>([])
|
||||||
const workspaceVisible = ref(false)
|
const workspaceVisible = ref(false)
|
||||||
|
|
@ -458,7 +473,7 @@ function getMenuList() {
|
||||||
arr
|
arr
|
||||||
.filter((item, index, self) => index === self.findIndex((i) => i['menu'] === item['menu']))
|
.filter((item, index, self) => index === self.findIndex((i) => i['menu'] === item['menu']))
|
||||||
.forEach((ele) => {
|
.forEach((ele) => {
|
||||||
operateOptions.value.push({label: ele.menu_label, value: ele.menu})
|
operateOptions.value.push({ label: ele.menu_label, value: ele.menu })
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -481,17 +496,18 @@ function saveCleanTime() {
|
||||||
const obj = {
|
const obj = {
|
||||||
clean_time: days.value,
|
clean_time: days.value,
|
||||||
}
|
}
|
||||||
operateLog.saveCleanTime(obj, loading).then(() => {
|
operateLog
|
||||||
MsgSuccess(t('common.saveSuccess'))
|
.saveCleanTime(obj, loading)
|
||||||
dialogVisible.value = false
|
.then(() => {
|
||||||
getCleanTime()
|
MsgSuccess(t('common.saveSuccess'))
|
||||||
})
|
dialogVisible.value = false
|
||||||
|
getCleanTime()
|
||||||
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getCleanTime() {
|
function getCleanTime() {
|
||||||
operateLog.getCleanTime().then((res) => {
|
operateLog.getCleanTime().then((res) => {
|
||||||
days.value = res.data
|
days.value = res.data
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue