|
@@ -1,21 +1,20 @@
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { useCalculatingHeight } from '@/hooks/calculatingHeight'
|
|
import { useCalculatingHeight } from '@/hooks/calculatingHeight'
|
|
|
import TableView from './components/TableView'
|
|
import TableView from './components/TableView'
|
|
|
-import LogDialog from '@/views/AIApiLog/src/components/LogDialog.vue'
|
|
|
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
|
|
|
|
|
|
const filterRef: Ref<HTMLElement | null> = ref(null)
|
|
const filterRef: Ref<HTMLElement | null> = ref(null)
|
|
|
const containerHeight = useCalculatingHeight(document.documentElement, 290, [filterRef])
|
|
const containerHeight = useCalculatingHeight(document.documentElement, 290, [filterRef])
|
|
|
const searchData = ref({
|
|
const searchData = ref({
|
|
|
text_search: '',
|
|
text_search: '',
|
|
|
- question_time_start: '',
|
|
|
|
|
- question_time_end: '',
|
|
|
|
|
|
|
+ question_date_start: '',
|
|
|
|
|
+ question_date_end: '',
|
|
|
user_type: '',
|
|
user_type: '',
|
|
|
- questionType: '',
|
|
|
|
|
- answerType: '',
|
|
|
|
|
|
|
+ question_type: '',
|
|
|
|
|
+ answer_type: '',
|
|
|
answer_satisfication: '',
|
|
answer_satisfication: '',
|
|
|
- response_duration_type: 'thanOrEqual',
|
|
|
|
|
- response_duration_num: 0
|
|
|
|
|
|
|
+ response_duration_type: '',
|
|
|
|
|
+ response_duration_num: null
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const userTypeList = [
|
|
const userTypeList = [
|
|
@@ -59,15 +58,15 @@ const AnswerTypeList = [
|
|
|
const answerSatisfactionList = [
|
|
const answerSatisfactionList = [
|
|
|
{
|
|
{
|
|
|
label: 'Null',
|
|
label: 'Null',
|
|
|
- value: 'null'
|
|
|
|
|
|
|
+ value: 'Null'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
label: 'Good',
|
|
label: 'Good',
|
|
|
- value: 'good'
|
|
|
|
|
|
|
+ value: 'Good'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
label: 'Not Good',
|
|
label: 'Not Good',
|
|
|
- value: 'notGood'
|
|
|
|
|
|
|
+ value: 'Not Good'
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
|
|
|
|
@@ -91,15 +90,15 @@ const Search = () => {
|
|
|
tableRef.value.searchTableData(searchData.value)
|
|
tableRef.value.searchTableData(searchData.value)
|
|
|
}
|
|
}
|
|
|
const DateChange = (date: any) => {
|
|
const DateChange = (date: any) => {
|
|
|
- searchData.value.question_time_start = dayjs(date[0]).format('YYYY-MM-DD')
|
|
|
|
|
- searchData.value.question_time_end = dayjs(date[1]).format('YYYY-MM-DD')
|
|
|
|
|
|
|
+ if (!date) {
|
|
|
|
|
+ searchData.value.question_date_start = ''
|
|
|
|
|
+ searchData.value.question_date_end = ''
|
|
|
|
|
+ } else {
|
|
|
|
|
+ searchData.value.question_date_start = dayjs(date[0]).format('DD/MM/YYYY')
|
|
|
|
|
+ searchData.value.question_date_end = dayjs(date[1]).format('DD/MM/YYYY')
|
|
|
|
|
+ }
|
|
|
tableRef.value.searchTableData(searchData.value)
|
|
tableRef.value.searchTableData(searchData.value)
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-const logDialogRef = ref()
|
|
|
|
|
-const openDialog = () => {
|
|
|
|
|
- logDialogRef.value.openDialog()
|
|
|
|
|
-}
|
|
|
|
|
</script>
|
|
</script>
|
|
|
<template>
|
|
<template>
|
|
|
<div class="dashboard">
|
|
<div class="dashboard">
|
|
@@ -110,6 +109,7 @@ const openDialog = () => {
|
|
|
<el-input
|
|
<el-input
|
|
|
placeholder="Search Question ID、User"
|
|
placeholder="Search Question ID、User"
|
|
|
v-model="searchData.text_search"
|
|
v-model="searchData.text_search"
|
|
|
|
|
+ clearable
|
|
|
class="log_input"
|
|
class="log_input"
|
|
|
>
|
|
>
|
|
|
<template #prefix>
|
|
<template #prefix>
|
|
@@ -126,7 +126,7 @@ const openDialog = () => {
|
|
|
<CalendarDate @DateChange="DateChange"></CalendarDate>
|
|
<CalendarDate @DateChange="DateChange"></CalendarDate>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="tips_filter">
|
|
<div class="tips_filter">
|
|
|
- <el-select v-model="searchData.user_type" placeholder="User Type">
|
|
|
|
|
|
|
+ <el-select v-model="searchData.user_type" clearable placeholder="User Type">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in userTypeList"
|
|
v-for="item in userTypeList"
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -136,7 +136,7 @@ const openDialog = () => {
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="tips_filter">
|
|
<div class="tips_filter">
|
|
|
- <el-select v-model="searchData.questionType" placeholder="Question Type">
|
|
|
|
|
|
|
+ <el-select clearable v-model="searchData.question_type" placeholder="Question Type">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in questionTypeList"
|
|
v-for="item in questionTypeList"
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -147,7 +147,7 @@ const openDialog = () => {
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="tips_filter">
|
|
<div class="tips_filter">
|
|
|
- <el-select v-model="searchData.answerType" placeholder="Answer Type">
|
|
|
|
|
|
|
+ <el-select clearable v-model="searchData.answer_type" placeholder="Answer Type">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in AnswerTypeList"
|
|
v-for="item in AnswerTypeList"
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -158,7 +158,11 @@ const openDialog = () => {
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="tips_filter">
|
|
<div class="tips_filter">
|
|
|
- <el-select v-model="searchData.answer_satisfication" placeholder="Answer Satisfaction">
|
|
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ clearable
|
|
|
|
|
+ v-model="searchData.answer_satisfication"
|
|
|
|
|
+ placeholder="Answer Satisfaction"
|
|
|
|
|
+ >
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in answerSatisfactionList"
|
|
v-for="item in answerSatisfactionList"
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -170,7 +174,12 @@ const openDialog = () => {
|
|
|
</div>
|
|
</div>
|
|
|
<div class="response_duration_type-tips_filter">
|
|
<div class="response_duration_type-tips_filter">
|
|
|
<span>Response Duration</span>
|
|
<span>Response Duration</span>
|
|
|
- <el-select v-model="searchData.response_duration_type" style="width: 70px; margin: 0 6px">
|
|
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ clearable
|
|
|
|
|
+ v-model="searchData.response_duration_type"
|
|
|
|
|
+ style="width: 70px; margin: 0 6px"
|
|
|
|
|
+ placeholder=""
|
|
|
|
|
+ >
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in response_duration_typeList"
|
|
v-for="item in response_duration_typeList"
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
@@ -181,17 +190,16 @@ const openDialog = () => {
|
|
|
</el-select>
|
|
</el-select>
|
|
|
<el-input-number
|
|
<el-input-number
|
|
|
v-model="searchData.response_duration_num"
|
|
v-model="searchData.response_duration_num"
|
|
|
- placeholder="s"
|
|
|
|
|
|
|
+ placeholder=""
|
|
|
:controls="false"
|
|
:controls="false"
|
|
|
:min="0"
|
|
:min="0"
|
|
|
- style="width: 60px"
|
|
|
|
|
|
|
+ style="width: 60px; height: 34px"
|
|
|
></el-input-number>
|
|
></el-input-number>
|
|
|
</div>
|
|
</div>
|
|
|
<el-button class="el-button--dark" @click="Search">Search</el-button>
|
|
<el-button class="el-button--dark" @click="Search">Search</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<TableView :height="containerHeight" :searchData="searchData" ref="tableRef"></TableView>
|
|
<TableView :height="containerHeight" :searchData="searchData" ref="tableRef"></TableView>
|
|
|
- <LogDialog ref="logDialogRef" />
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|