6969 clearable
7070 />
7171 </div >
72- <el-button @click =" exportLog" style =" margin-left : 10px "
73- v-hasPermission ="
74- new ComplexPermission([RoleConst.ADMIN],
75- [PermissionConst.OPERATION_LOG_EXPORT],
76- [EditionConst.IS_EE, EditionConst.IS_PE], 'OR')"
77- >{{ $t('common.export') }}
72+ <el-button
73+ @click =" exportLog"
74+ style =" margin-left : 10px "
75+ v-hasPermission ="
76+ new ComplexPermission(
77+ [RoleConst.ADMIN],
78+ [PermissionConst.OPERATION_LOG_EXPORT],
79+ [EditionConst.IS_EE, EditionConst.IS_PE],
80+ 'OR',
81+ )
82+ "
83+ >{{ $t('common.export') }}
7884 </el-button >
79- <el-button @click =" dialogVisible = true"
80- v-hasPermission ="
81- new ComplexPermission([RoleConst.ADMIN],
82- [PermissionConst.OPERATION_LOG_CLEAR_POLICY],
83- [EditionConst.IS_EE, EditionConst.IS_PE], 'OR')" >
85+ <el-button
86+ @click =" dialogVisible = true"
87+ v-hasPermission ="
88+ new ComplexPermission(
89+ [RoleConst.ADMIN],
90+ [PermissionConst.OPERATION_LOG_CLEAR_POLICY],
91+ [EditionConst.IS_EE, EditionConst.IS_PE],
92+ 'OR',
93+ )
94+ "
95+ >
8496 {{ $t('views.chatLog.buttons.clearStrategy') }}
8597 </el-button >
8698 </div >
107119 @click =" popoverVisible = !popoverVisible"
108120 >
109121 <el-icon >
110- <Filter />
122+ <Filter />
111123 </el-icon >
112124 </el-button >
113125 </template >
132144 </div >
133145 <div class =" text-right" >
134146 <el-button size =" small" @click =" filterChange('clear')"
135- >{{ $t('common.clear') }}
147+ >{{ $t('common.clear') }}
136148 </el-button >
137149 <el-button type =" primary" @click =" filterChange" size =" small"
138- >{{ $t('common.confirm') }}
150+ >{{ $t('common.confirm') }}
139151 </el-button >
140152 </div >
141153 </el-popover >
184196 @click =" workspaceVisible = !workspaceVisible"
185197 >
186198 <el-icon >
187- <Filter />
199+ <Filter />
188200 </el-icon >
189201 </el-button >
190202 </template >
209221 </div >
210222 <div class =" text-right" >
211223 <el-button size =" small" @click =" filterWorkspaceChange('clear')"
212- >{{ $t('common.clear') }}
224+ >{{ $t('common.clear') }}
213225 </el-button >
214226 <el-button type =" primary" @click =" filterWorkspaceChange" size =" small"
215- >{{ $t('common.confirm') }}
227+ >{{ $t('common.confirm') }}
216228 </el-button >
217229 </div >
218230 </el-popover >
226238 >
227239 <template #default =" { row } " >
228240 <span v-if =" row.status === 200" >{{
229- $t('views.operateLog.table.status.success')
230- }}</span >
241+ $t('views.operateLog.table.status.success')
242+ }}</span >
231243 <span v-else style =" color : red " >{{ $t('views.operateLog.table.status.fail') }}</span >
232244 </template >
233245 </el-table-column >
244256 <el-table-column :label =" $t('common.operation')" width =" 60" align =" left" fixed =" right" >
245257 <template #default =" { row } " >
246258 <span class =" mr-4" >
247- <el-tooltip effect =" dark" :content =" $t('views.operateLog.table.opt.label')"
248- placement =" top" >
259+ <el-tooltip
260+ effect =" dark"
261+ :content =" $t('views.operateLog.table.opt.label')"
262+ placement =" top"
263+ >
249264 <el-button type =" primary" text @click.stop =" showDetails(row)" class =" text-button" >
250265 <AppIcon iconName =" app-operate-log" ></AppIcon >
251266 </el-button >
255270 </el-table-column >
256271 </app-table >
257272 </div >
258- <DetailDialog ref =" DetailDialogRef" />
273+ <DetailDialog ref =" DetailDialogRef" />
259274 </el-card >
275+ <el-dialog
276+ :title =" $t('views.chatLog.buttons.clearStrategy')"
277+ v-model =" dialogVisible"
278+ width =" 25%"
279+ :close-on-click-modal =" false"
280+ :close-on-press-escape =" false"
281+ >
282+ <span >{{ $t('common.delete') }}</span >
283+ <el-input-number
284+ v-model =" days"
285+ controls-position =" right"
286+ :min =" 1"
287+ :max =" 100000"
288+ :value-on-clear =" 0"
289+ step-strictly
290+ style =" width : 110px ; margin-left : 8px ; margin-right : 8px "
291+ ></el-input-number >
292+ <span >{{ $t('views.chatLog.daysText') }}</span >
293+ <template #footer >
294+ <div class =" dialog-footer" style =" margin-top : 16px " >
295+ <el-button @click =" dialogVisible = false" >{{ $t('common.cancel') }}</el-button >
296+ <el-button type =" primary" @click =" saveCleanTime" >
297+ {{ $t('common.save') }}
298+ </el-button >
299+ </div >
300+ </template >
301+ </el-dialog >
260302 </div >
261- <el-dialog
262- :title =" $t('views.chatLog.buttons.clearStrategy')"
263- v-model =" dialogVisible"
264- width =" 25%"
265- :close-on-click-modal =" false"
266- :close-on-press-escape =" false"
267- >
268- <span >{{ $t('common.delete') }}</span >
269- <el-input-number
270- v-model =" days"
271- controls-position =" right"
272- :min =" 1"
273- :max =" 100000"
274- :value-on-clear =" 0"
275- step-strictly
276- style =" width : 110px ; margin-left : 8px ; margin-right : 8px "
277- ></el-input-number >
278- <span >{{ $t('views.chatLog.daysText') }}</span >
279- <template #footer >
280- <div class =" dialog-footer" style =" margin-top : 16px " >
281- <el-button @click =" dialogVisible = false" >{{ $t('common.cancel') }}</el-button >
282- <el-button type =" primary" @click =" saveCleanTime" >
283- {{ $t('common.save') }}
284- </el-button >
285- </div >
286- </template >
287- </el-dialog >
288303</template >
289304
290305<script setup lang="ts">
291- import {ref , onMounted , reactive } from ' vue'
306+ import { ref , onMounted , reactive } from ' vue'
292307import operateLog from ' @/api/system/operate-log'
293308import DetailDialog from ' ./component/DetailDialog.vue'
294- import {t } from ' @/locales'
295- import {beforeDay , datetimeFormat , nowDate } from ' @/utils/time'
309+ import { t } from ' @/locales'
310+ import { beforeDay , datetimeFormat , nowDate } from ' @/utils/time'
296311import useStore from ' @/stores'
297312import WorkspaceApi from ' @/api/system/workspace.ts'
298- import {hasPermission } from " @/utils/permission" ;
299- import {EditionConst , PermissionConst , RoleConst } from " @/utils/permission/data.ts" ;
300- import {ComplexPermission } from " @/utils/permission/type.ts" ;
301- import {loadSharedApi } from " @/utils/dynamics-api/shared-api.ts" ;
302- import {MsgSuccess } from " @/utils/message.ts" ;
313+ import { hasPermission } from ' @/utils/permission'
314+ import { EditionConst , PermissionConst , RoleConst } from ' @/utils/permission/data.ts'
315+ import { ComplexPermission } from ' @/utils/permission/type.ts'
316+ import { loadSharedApi } from ' @/utils/dynamics-api/shared-api.ts'
317+ import { MsgSuccess } from ' @/utils/message.ts'
303318
304- const {user} = useStore ()
319+ const { user } = useStore ()
305320const popoverVisible = ref (false )
306321const operateTypeArr = ref <any []>([])
307322const workspaceVisible = ref (false )
@@ -458,7 +473,7 @@ function getMenuList() {
458473 arr
459474 .filter ((item , index , self ) => index === self .findIndex ((i ) => i [' menu' ] === item [' menu' ]))
460475 .forEach ((ele ) => {
461- operateOptions .value .push ({label: ele .menu_label , value: ele .menu })
476+ operateOptions .value .push ({ label: ele .menu_label , value: ele .menu })
462477 })
463478 })
464479}
@@ -481,17 +496,18 @@ function saveCleanTime() {
481496 const obj = {
482497 clean_time: days .value ,
483498 }
484- operateLog .saveCleanTime (obj , loading ).then (() => {
485- MsgSuccess (t (' common.saveSuccess' ))
486- dialogVisible .value = false
487- getCleanTime ()
488- })
499+ operateLog
500+ .saveCleanTime (obj , loading )
501+ .then (() => {
502+ MsgSuccess (t (' common.saveSuccess' ))
503+ dialogVisible .value = false
504+ getCleanTime ()
505+ })
489506 .catch (() => {
490507 dialogVisible .value = false
491508 })
492509}
493510
494-
495511function getCleanTime() {
496512 operateLog .getCleanTime ().then ((res ) => {
497513 days .value = res .data
0 commit comments