dev
This commit is contained in:
parent
9c7894a28f
commit
18c4572dc8
|
|
@ -31,7 +31,13 @@
|
|||
<el-table-column prop="createDatetime" label="时间" width="200"></el-table-column>
|
||||
<el-table-column prop="params" label="请求参数">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.params"></el-input>
|
||||
<el-input v-model="scope.row.params" class="input-with-select" disabled>
|
||||
<template #prepend>
|
||||
<el-icon @click="copy(scope.row.params)" style="cursor: pointer;font-size: 20px">
|
||||
<CopyDocument/>
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -53,6 +59,8 @@
|
|||
import {onMounted, ref} from 'vue'
|
||||
import {post} from '@/utils/request.ts'
|
||||
import {formatDateArray, getEndOfDay} from "@/utils/dateUtils.ts";
|
||||
import {CopyDocument} from "@element-plus/icons-vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
|
||||
const tableData = ref<any>([])
|
||||
onMounted(() => {
|
||||
|
|
@ -74,8 +82,8 @@ const getData = () => {
|
|||
pageNum: currentPage.value,
|
||||
pageSize: pageSize.value,
|
||||
...searchModel.value,
|
||||
beginTime: selectedDate.value?selectedDate.value[0]:null,
|
||||
endTime: selectedDate.value?selectedDate.value[1]:null
|
||||
beginTime: selectedDate.value ? selectedDate.value[0] : null,
|
||||
endTime: selectedDate.value ? selectedDate.value[1] : null
|
||||
}
|
||||
post("common/log/page", {query: params}).then((res: any) => {
|
||||
tableData.value = res.list
|
||||
|
|
@ -85,13 +93,16 @@ const getData = () => {
|
|||
const searchModel = ref<any>({})
|
||||
const selectedDate = ref<any>([])
|
||||
const handleDateChange = (date: any[]) => {
|
||||
if (selectedDate.value){
|
||||
if (selectedDate.value) {
|
||||
selectedDate.value = formatDateArray(date)
|
||||
selectedDate.value[1] = getEndOfDay(selectedDate.value[1]); // 输出今天 23:59
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const copy = (text: any) => {
|
||||
ElMessage.success('复制成功')
|
||||
navigator.clipboard.writeText(text)
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.container-wrapper {
|
||||
|
|
@ -129,7 +140,8 @@ const handleDateChange = (date: any[]) => {
|
|||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
:deep(.el-input__wrapper){
|
||||
|
||||
:deep(.el-input__wrapper) {
|
||||
height: 42px;
|
||||
margin-right: 24px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue