|
|
@@ -3,6 +3,8 @@
|
|
|
<template #filter>
|
|
|
<ElInput v-model="searchUserId" @input="userIdSearch()" placeholder="请输入用户id" style="width: 240px"
|
|
|
clearable />
|
|
|
+ <ElInput v-model="searchDescription" @input="descriptionSearch()" placeholder="描述" style="width: 240px"
|
|
|
+ clearable />
|
|
|
<ElButton :icon="Refresh" @click="table.refresh()"></ElButton>
|
|
|
</template>
|
|
|
<ElTableColumn prop="id" label="#" width="80" />
|
|
|
@@ -31,6 +33,7 @@ const timeFormatter = useTimeFormatter()
|
|
|
const where = ref({})
|
|
|
const table = ref(null)
|
|
|
const searchUserId = ref('')
|
|
|
+const searchDescription = ref('')
|
|
|
|
|
|
function userIdSearch() {
|
|
|
if (searchUserId.value) {
|
|
|
@@ -40,6 +43,14 @@ function userIdSearch() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function descriptionSearch(){
|
|
|
+ if (searchDescription.value) {
|
|
|
+ where.value.description = searchDescription.value
|
|
|
+ } else {
|
|
|
+ where.value.description = null
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
function showRaw(row) {
|
|
|
const raw = JSON.parse(row.details)
|
|
|
ElMessageBox.alert(`<div class="whitespace-pre">${JSON.stringify(raw, null, 4)}</div>`, '详细信息', {
|