Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
罗鑫霖
/
vion-tools
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6578b62b
authored
Jul 23, 2025
by
陈岩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 调整抓拍聚类年龄选项
1 parent
a32b352b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
383 additions
and
241 deletions
src/views/DataRepair/DataRepairApi.js
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
src/views/SnapshotCluster/ClusterResult/components/AddEditSnapshotClusterDialog.vue
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi.js
src/views/SystemLog/index.vue
src/views/DataRepair/DataRepairApi.js
View file @
6578b62
...
...
@@ -47,6 +47,7 @@ class DataRepairApi {
{
method
:
'POST'
,
url
:
`/simulation/reid`
,
timeout
:
5
*
60
*
1000
,
data
}
)
...
...
src/views/SnapshotCluster/ClusterResult/ClusterResult.vue
View file @
6578b62
...
...
@@ -119,9 +119,9 @@
style=
"width: 240px"
>
<a-select-option
v-for=
"item in childAdultAgeOptions"
:key=
"item.value
"
:value=
"item.value
"
>
{{
item
.
label
}}
</a-select-option>
:key=
"item.ageStr
"
:value=
"item.ageStr
"
>
{{
item
.
nameCn
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"性别:"
style=
"padding: 5px 0"
>
...
...
@@ -336,6 +336,7 @@ import PersonGroupDialog from "./PersonGroupDialog.vue";
import
PersonGroupMover
from
"./PersonGroupMover.vue"
;
import
AddPersonnelPool
from
"./AddPersonnelPool.vue"
;
import
AddEditSnapshotClusterDialog
from
'./components/AddEditSnapshotClusterDialog.vue'
import
snapshotRecordApi
from
"@/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi"
;
export
default
{
components
:{
...
...
@@ -490,6 +491,7 @@ export default {
const
onAccountChange
=
function
()
{
getProductList
(
1
)
getPlazaList
(
1
)
getChildAdultAgeOptions
()
}
const
onPlazaChange
=
function
()
{
...
...
@@ -685,6 +687,7 @@ export default {
}
getPlazaList
()
getProductList
()
getChildAdultAgeOptions
()
}
}
}
...
...
@@ -727,7 +730,7 @@ export default {
maxPic
:
rawData
.
maxPic
,
page
:
pageNum
.
value
-
1
,
pageSize
:
pageSize
.
value
,
age
:
rawData
.
childAdult
?
rawData
.
childAdult
.
toString
():
''
,
age
Dis
:
rawData
.
childAdult
?
rawData
.
childAdult
.
toString
():
''
,
gender
:
rawData
.
gender
?
rawData
.
gender
.
toString
():
''
,
receptionType
:
rawData
.
receptionType
?
rawData
.
receptionType
:
0
,
sortType
:
rawData
.
sortType
?
rawData
.
sortType
:
0
,
...
...
@@ -796,14 +799,27 @@ export default {
return
(
personTypeList
.
value
.
filter
(
v
=>
v
.
value
==
val
)[
0
]
||
{
label
:
'--'
}).
label
}
const
childAdultAgeOptions
=
ref
([
{
value
:
0
,
label
:
'婴儿'
},
{
value
:
1
,
label
:
'儿童'
},
{
value
:
2
,
label
:
'少年'
},
{
value
:
3
,
label
:
'青年'
},
{
value
:
4
,
label
:
'中年'
},
{
value
:
5
,
label
:
'老年'
},
{
value
:
-
1
,
label
:
'未知'
},
//
{ value: 0, label: '婴儿' },
//
{ value: 1, label: '儿童' },
//
{ value: 2, label: '少年' },
//
{ value: 3, label: '青年' },
//
{ value: 4, label: '中年' },
//
{ value: 5, label: '老年' },
//
{ value: -1, label: '未知' },
])
const
getChildAdultAgeOptions
=
async
()
=>
{
try
{
queryForm
.
childAdult
=
[]
const
res
=
await
snapshotRecordApi
.
getAgeDistributionConfig
(
queryForm
.
account_id
)
childAdultAgeOptions
.
value
=
res
||
[]
}
catch
(
e
)
{
console
.
log
(
e
)
}
}
const
childAdultOptions
=
ref
([
{
value
:
0
,
label
:
'儿童'
},
{
value
:
1
,
label
:
'成人'
},
...
...
src/views/SnapshotCluster/ClusterResult/components/AddEditSnapshotClusterDialog.vue
View file @
6578b62
...
...
@@ -59,13 +59,23 @@
</a-col>
<a-col
:span=
"12"
>
<a-form-item
label=
"年龄"
name=
"age"
>
<a-select
v-model:value=
"submitForm.age"
placeholder=
"请选择"
optionFilterProp=
"label"
<a-select
v-model:value=
"submitForm.age"
show-search
:options=
"optionsMap['ageList']"
/>
placeholder=
"请选择"
style=
"width: 240px"
>
<a-select-option
v-for=
"item in optionsMap['ageList']"
:key=
"item.ageStr"
:value=
"item.minAge"
>
{{
item
.
nameCn
}}
</a-select-option>
</a-select>
<!--
<a-select-->
<!-- v-model:value="submitForm.age"-->
<!-- optionFilterProp="label"-->
<!-- -->
<!-- :options=""-->
<!-- />-->
</a-form-item>
</a-col>
<a-col
:span=
"12"
>
...
...
@@ -159,6 +169,7 @@ const handleSubmitData = async () => {
const
initDialog
=
(
form
,
selectOptionsMap
)
=>
{
submitForm
.
value
=
cloneDeep
(
form
)
optionsMap
.
value
=
selectOptionsMap
console
.
log
(
optionsMap
,
'-=s=s=s==s'
)
visible
.
value
=
true
}
...
...
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecord.vue
View file @
6578b62
...
...
@@ -117,9 +117,9 @@
style=
"width: 240px"
>
<a-select-option
v-for=
"item in childAdultAgeOptions"
:key=
"item.value
"
:value=
"item.value
"
>
{{
item
.
label
}}
</a-select-option>
:key=
"item.ageStr
"
:value=
"item.ageStr
"
>
{{
item
.
nameCn
}}
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"性别:"
style=
"padding: 5px 0"
>
...
...
@@ -358,6 +358,8 @@ export default {
const
onAccountChange
=
function
()
{
getPlazaList
(
1
)
getProductList
(
1
)
// 获取当前集团的年龄分裂
getChildAdultAgeOptions
()
}
const
onPlazaChange
=
function
()
{
...
...
@@ -551,6 +553,7 @@ export default {
}
getPlazaList
()
getProductList
()
getChildAdultAgeOptions
()
}
}
}
...
...
@@ -599,7 +602,7 @@ export default {
endTime
:
formatDate
(
rawData
.
date
)
+
' '
+
rawData
.
endTime
,
page
:
pageNum
.
value
-
1
,
pageSize
:
pageSize
.
value
,
age
:
rawData
.
childAdult
?
rawData
.
childAdult
.
toString
():
''
,
age
Dis
:
rawData
.
childAdult
?
rawData
.
childAdult
.
toString
():
''
,
gender
:
rawData
.
gender
?
rawData
.
gender
.
toString
():
''
,
}
)
...
...
@@ -663,14 +666,25 @@ export default {
return
(
positionList
.
value
.
filter
(
v
=>
v
.
value
==
val
)[
0
]
||
{
label
:
'--'
}).
label
}
const
childAdultAgeOptions
=
ref
([
{
value
:
0
,
label
:
'婴儿'
},
{
value
:
1
,
label
:
'儿童'
},
{
value
:
2
,
label
:
'少年'
},
{
value
:
3
,
label
:
'青年'
},
{
value
:
4
,
label
:
'中年'
},
{
value
:
5
,
label
:
'老年'
},
{
value
:
-
1
,
label
:
'未知'
},
//
{ value: 0, label: '婴儿' },
//
{ value: 1, label: '儿童' },
//
{ value: 2, label: '少年' },
//
{ value: 3, label: '青年' },
//
{ value: 4, label: '中年' },
//
{ value: 5, label: '老年' },
//
{ value: -1, label: '未知' },
])
const
getChildAdultAgeOptions
=
async
()
=>
{
try
{
queryForm
.
childAdult
=
[]
const
res
=
await
snapshotRecordApi
.
getAgeDistributionConfig
(
queryForm
.
account_id
)
childAdultAgeOptions
.
value
=
res
||
[]
}
catch
(
e
)
{
console
.
log
(
e
)
}
}
const
childAdultOptions
=
ref
([
{
value
:
0
,
label
:
'儿童'
},
{
value
:
1
,
label
:
'成人'
},
...
...
@@ -1591,6 +1605,7 @@ export default {
genderOptions
,
loadAllImages
,
allImagesLoading
,
getChildAdultAgeOptions
}
}
}
...
...
src/views/SnapshotCluster/SnapshotRecord/SnapshotRecordApi.js
View file @
6578b62
...
...
@@ -135,6 +135,15 @@ class SnapshotRecordApi {
}
)
}
// 获取集团配置下年龄分类
getAgeDistributionConfig
(
id
)
{
return
axiosInstance
.
request
(
{
method
:
'GET'
,
url
:
`/accounts/ageDistributionConfig?accountId=
${
id
}
`
,
}
)
}
}
const
snapshotRecordApi
=
new
SnapshotRecordApi
()
...
...
src/views/SystemLog/index.vue
View file @
6578b62
...
...
@@ -88,218 +88,308 @@
/>
<!-- <moreDialog ref='moreDialogRef'></moreDialog> -->
</template>
<!--<template>-->
<!-- <a-form :model="queryForm" layout="inline" :label-col="{ style: { width: '80px' } }">-->
<!-- <!– <a-form-item label="apptype:" style="padding: 5px 0">-->
<!-- <a-select v-model:value="queryForm.apptype"-->
<!-- style="width: 280px"-->
<!-- :options="apptypeList"-->
<!-- optionFilterProp="label"-->
<!-- >-->
<!-- </a-select>-->
<!-- </a-form-item> –>-->
<!-- <a-form-item label="服务名称:" style="padding: 5px 0">-->
<!-- <a-select v-model:value="queryForm.appname"-->
<!-- style="width: 280px"-->
<!-- :options="appnameList"-->
<!-- optionFilterProp="label"-->
<!-- >-->
<!-- </a-select>-->
<!-- </a-form-item>-->
<!-- <a-form-item label="日志等级:" style="padding: 5px 0">-->
<!-- <a-select v-model:value="queryForm.levels"-->
<!-- style="width: 280px"-->
<!-- mode="multiple"-->
<!-- :maxTagCount="1"-->
<!-- :options="levelList"-->
<!-- optionFilterProp="label"-->
<!-- >-->
<!-- </a-select>-->
<!-- </a-form-item>-->
<!-- -->
<!-- <a-form-item label="选择日期:" style="padding: 5px 0">-->
<!-- <a-date-picker v-model:value="queryForm.date" :format="'YYYY-MM-DD'" style="width: 280px"/>-->
<!-- </a-form-item>-->
<!-- <a-form-item label="选择时间:" style="padding: 5px 0">-->
<!-- <a-time-picker v-model:value="queryForm.startTime" style="width: 140px"/>-->
<!-- <a-time-picker v-model:value="queryForm.endTime" style="width: 140px"/>-->
<!-- </a-form-item>-->
<!-- <a-form-item label="内容:" style="padding: 5px 0">-->
<!-- <a-input v-model:value="queryForm.content_like" placeholder="请输入内容" style="width: 280px"/>-->
<!-- </a-form-item>-->
<!-- <a-form-item style="padding: 5px 0">-->
<!-- <a-button type="primary" @click="confirmSearch(1)" :loading="isLoading">查询</a-button>-->
<!-- <!– <a-button type="primary" @click="confirmSearch1">弹框</a-button> –>-->
<!-- </a-form-item>-->
<!-- </a-form>-->
<!-- <!– <a-table :dataSource="dataList" v-loading="isLoading" :rowKey="dataList => dataList.id" :columns="columns" :pagination="false" :scroll="{ y: contentHeight }">-->
<!-- -->
<!-- </a-table> –>-->
<!-- <el-table-->
<!-- :data="dataList"-->
<!-- v-loading="isLoading"-->
<!-- :rowKey="id"-->
<!-- :height="contentHeight"-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- prop="time"-->
<!-- label="时间"-->
<!-- width="180">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="thread"-->
<!-- label="线程号"-->
<!-- width="180">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="location"-->
<!-- label="日志位置"-->
<!-- width="300">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="content"-->
<!-- label="日志内容">-->
<!-- <template #default="{ row }">-->
<!-- <p v-html="stringFormatter(row.content)"></p>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <a-pagination-->
<!-- v-model:current="pageNum"-->
<!-- v-model:pageSize="pageSize"-->
<!-- :total="total"-->
<!-- :show-total="total => `共 ${total} 条`"-->
<!-- :pageSizeOptions="['20', '50', '100']"-->
<!-- @change="onPageNumChange"-->
<!-- @showSizeChange="onPageSizeChange"-->
<!-- show-size-changer-->
<!-- show-quick-jumper-->
<!-- style="text-align:center"-->
<!-- />-->
<!-- <!– <moreDialog ref='moreDialogRef'></moreDialog> –>-->
<!--</template>-->
<
script
>
import
{
reactive
,
ref
,
toRaw
}
from
'vue'
import
moment
from
'moment'
import
SystemLogApi
from
'@/views/SystemLog/SystemLog.js'
import
{
isArray
}
from
'@/PublicUtil/Judgment'
import
{
filterEmptyValueInObject
,
formatDate
,
formatTime
}
from
'@/PublicUtil/PublicUtil'
import
{
PlusOutlined
}
from
'@ant-design/icons-vue'
import
moreDialog
from
'./moreDialog.vue'
export
default
{
components
:
{
PlusOutlined
,
VNodes
:
(
_
,
{
attrs
})
=>
{
return
attrs
.
vnodes
},
moreDialog
},
setup
()
{
const
columns
=
ref
([
{
title
:
'时间'
,
dataIndex
:
'time'
,
align
:
'center'
,
width
:
220
},
{
title
:
'线程号'
,
dataIndex
:
'thread'
,
align
:
'center'
,
width
:
120
},
{
title
:
'日志位置'
,
dataIndex
:
'location'
,
align
:
'center'
,
width
:
300
},
{
title
:
'日志内容'
,
dataIndex
:
'content'
,
align
:
'center'
,
customRender
:({
text
,
record
})
=>
{
const
rawData
=
toRaw
(
queryForm
)
if
(
rawData
.
content_like
&&
rawData
.
content_like
!==
''
)
{
text
=
text
.
split
(
rawData
.
content_like
).
join
(
"<span style='color:red;'>"
+
rawData
.
content_like
+
"</span>"
)
// console.log(str)
// let pHtml = document.createElement("p");
return
(
<
p
v
-
html
=
'str'
>
{
text
}
<
/p>
)
}
else
{
return
text
}
}
},
// {
// title: '日志标识',
// dataIndex: 'id',
// align: 'center',
// }
])
//ref
const
moreDialogRef
=
ref
()
// scalar
const
isLoading
=
ref
(
false
)
const
isSuspended
=
ref
(
false
)
const
pageNum
=
ref
(
1
)
const
pageSize
=
ref
(
20
)
const
total
=
ref
()
// sequence
const
dataList
=
ref
([])
const
apptypeList
=
ref
([{
value
:
'store'
,
label
:
'store'
,
},{
value
:
'mall'
,
label
:
'mall'
,
}])
const
appnameList
=
ref
([{
value
:
'process'
,
label
:
'process'
,
},{
value
:
'receive'
,
label
:
'receive'
,
},{
value
:
'report'
,
label
:
'report'
,
},{
value
:
'openapi'
,
label
:
'openapi'
,
}])
const
levelList
=
ref
([{
value
:
'info'
,
label
:
'info'
,
},{
value
:
'error'
,
label
:
'error'
,
},{
value
:
'debug'
,
label
:
'debug'
,
},{
value
:
'warn'
,
label
:
'warn'
,
}])
const
queryForm
=
reactive
(
{
// apptype:'store',
appname
:
'process'
,
levels
:
[
'info'
,
'error'
,
'debug'
,
'warn'
],
content_like
:
''
,
date
:
moment
(
moment
().
format
(
'YYYY-MM-DD'
),
'YYYY-MM-DD'
),
startTime
:
moment
(
'00:00:00'
,
'HH:mm:ss'
),
endTime
:
moment
(
'23:59:59'
,
'HH:mm:ss'
),
}
)
const
onPageNumChange
=
function
(
num
)
{
pageNum
.
value
=
num
confirmSearch
()
}
<!--<script>-->
<!--import {reactive, ref, toRaw} from 'vue'-->
<!--import moment from 'moment'-->
<!--import SystemLogApi from '@/views/SystemLog/SystemLog.js'-->
<!--import {isArray} from '@/PublicUtil/Judgment'-->
<!--import {filterEmptyValueInObject, formatDate, formatTime} from '@/PublicUtil/PublicUtil'-->
<!--import {PlusOutlined} from '@ant-design/icons-vue'-->
<!--import moreDialog from './moreDialog.vue'-->
<!--export default {-->
<!-- components: {-->
<!-- PlusOutlined,-->
<!-- VNodes: (_, {attrs}) => {-->
<!-- return attrs.vnodes-->
<!-- },-->
<!-- moreDialog-->
<!-- },-->
<!-- setup() {-->
<!-- const columns = ref([-->
<!-- {-->
<!-- title: '时间',-->
<!-- dataIndex: 'time',-->
<!-- align: 'center',-->
<!-- width: 220-->
<!-- },-->
<!-- {-->
<!-- title: '线程号',-->
<!-- dataIndex: 'thread',-->
<!-- align: 'center',-->
<!-- width: 120-->
<!-- },-->
<!-- {-->
<!-- title: '日志位置',-->
<!-- dataIndex: 'location',-->
<!-- align: 'center',-->
<!-- width: 300-->
<!-- },-->
<!-- {-->
<!-- title: '日志内容',-->
<!-- dataIndex: 'content',-->
<!-- align: 'center',-->
<!-- customRender:({text,record})=>{-->
<!-- const rawData = toRaw(queryForm)-->
<!-- if (rawData.content_like && rawData.content_like !== '') {-->
<!-- text = text.split(rawData.content_like).join("<span style='color:red;'>" + rawData.content_like + "</span>")-->
<!-- // console.log(str)-->
<!-- // let pHtml = document.createElement("p");-->
<!-- return (<p v-html='str'>{text}</p>)-->
<!-- }else{-->
<!-- return text-->
<!-- }-->
<!-- }-->
<!-- },-->
<!-- // {-->
<!-- // title: '日志标识',-->
<!-- // dataIndex: 'id',-->
<!-- // align: 'center',-->
<!-- // }-->
<!-- ])-->
<!-- //ref-->
<!-- const moreDialogRef = ref()-->
<!-- // scalar-->
<!-- const isLoading = ref(false)-->
<!-- const isSuspended = ref(false)-->
<!-- const pageNum = ref(1)-->
<!-- const pageSize = ref(20)-->
<!-- const total = ref()-->
<!-- // sequence-->
<!-- const dataList = ref([])-->
<!-- const apptypeList = ref([{-->
<!-- value: 'store',-->
<!-- label: 'store',-->
<!-- },{-->
<!-- value: 'mall',-->
<!-- label: 'mall',-->
<!-- }])-->
<!-- const appnameList = ref([{-->
<!-- value: 'process',-->
<!-- label: 'process',-->
<!-- },{-->
<!-- value: 'receive',-->
<!-- label: 'receive',-->
<!-- },{-->
<!-- value: 'report',-->
<!-- label: 'report',-->
<!-- },{-->
<!-- value: 'openapi',-->
<!-- label: 'openapi',-->
<!-- }])-->
<!-- const levelList = ref([{-->
<!-- value: 'info',-->
<!-- label: 'info',-->
<!-- },{-->
<!-- value: 'error',-->
<!-- label: 'error',-->
<!-- },{-->
<!-- value: 'debug',-->
<!-- label: 'debug',-->
<!-- },{-->
<!-- value: 'warn',-->
<!-- label: 'warn',-->
<!-- }])-->
<!-- const queryForm = reactive(-->
<!-- {-->
<!-- // apptype:'store',-->
<!-- appname: 'process',-->
<!-- levels: ['info','error','debug','warn'],-->
<!-- content_like: '',-->
<!-- date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),-->
<!-- startTime: moment('00:00:00', 'HH:mm:ss'),-->
<!-- endTime: moment('23:59:59', 'HH:mm:ss'),-->
<!-- }-->
<!-- )-->
<!-- const onPageNumChange = function(num) {-->
<!-- pageNum.value = num-->
<!-- confirmSearch()-->
<!-- }-->
<!-- -->
<!-- const onPageSizeChange = function(current, size) {-->
<!-- pageNum.value = 1-->
<!-- pageSize.value = size-->
<!-- confirmSearch()-->
<!-- }-->
<!-- const confirmSearch = function(val){-->
<!-- isLoading.value = true-->
<!-- const rawData = toRaw(queryForm)-->
<!-- pageNum.value = val?1:pageNum.value-->
<!-- const data = filterEmptyValueInObject(-->
<!-- {-->
<!-- // apptype: rawData.apptype,-->
<!-- appname: rawData.appname,-->
<!-- levels: rawData.levels?rawData.levels.toString():null,-->
<!-- content_like: rawData.content_like,-->
<!-- startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime),-->
<!-- endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime),-->
<!-- page: pageNum.value,-->
<!-- pageSize: pageSize.value,-->
<!-- }-->
<!-- )-->
<!-- SystemLogApi.getLogSelect(data).then(-->
<!-- (r) => {-->
<!-- isLoading.value = false-->
<!-- dataList.value = []-->
<!-- if(r.code==200){-->
<!-- // r.forEach((item,index)=>{-->
<!-- // item.index = index+1-->
<!-- // })-->
<!-- if(r.data){-->
<!-- dataList.value = r.data.list-->
<!-- total.value = r.data.total-->
<!-- }-->
<!-- -->
<!-- }-->
<!-- -->
<!-- }-->
<!-- )-->
<!-- }-->
<!-- const stringFormatter = function(text){-->
<!-- const rawData = toRaw(queryForm)-->
<!-- if (rawData.content_like && rawData.content_like !== '') {-->
<!-- let str = text.split(rawData.content_like).join("<span style='color:red;'>" + rawData.content_like + "</span>")-->
<!-- return str-->
<!-- }else{-->
<!-- return text-->
<!-- }-->
<!-- }-->
<!-- const contentHeight = ref(0)-->
<!-- const __main = function() {-->
<!-- contentHeight.value = window.innerHeight - 230-->
<!-- // confirmSearch()-->
<!-- }-->
<!-- const confirmSearch1 = function(){-->
<!-- moreDialogRef.value.initDialog();-->
<!-- }-->
<!-- __main()-->
<!-- return {-->
<!-- // scalar-->
<!-- isLoading,-->
<!-- pageNum,-->
<!-- pageSize,-->
<!-- total,-->
<!-- contentHeight,-->
<!-- // sequence-->
<!-- apptypeList,-->
<!-- appnameList,-->
<!-- levelList,-->
<!-- dataList,-->
<!-- queryForm,-->
<!-- columns,-->
<!-- // function-->
<!-- confirmSearch,-->
<!-- confirmSearch1,-->
<!-- stringFormatter,-->
<!-- onPageNumChange,-->
<!-- onPageSizeChange,-->
<!-- //ref-->
<!-- moreDialogRef-->
<!-- }-->
<!-- }-->
<!--}-->
<!--</script>-->
const
onPageSizeChange
=
function
(
current
,
size
)
{
pageNum
.
value
=
1
pageSize
.
value
=
size
confirmSearch
()
}
const
confirmSearch
=
function
(
val
){
isLoading
.
value
=
true
const
rawData
=
toRaw
(
queryForm
)
pageNum
.
value
=
val
?
1
:
pageNum
.
value
const
data
=
filterEmptyValueInObject
(
{
// apptype: rawData.apptype,
appname
:
rawData
.
appname
,
levels
:
rawData
.
levels
?
rawData
.
levels
.
toString
():
null
,
content_like
:
rawData
.
content_like
,
startTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
startTime
),
endTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
endTime
),
page
:
pageNum
.
value
,
pageSize
:
pageSize
.
value
,
}
)
SystemLogApi
.
getLogSelect
(
data
).
then
(
(
r
)
=>
{
isLoading
.
value
=
false
dataList
.
value
=
[]
if
(
r
.
code
==
200
){
// r.forEach((item,index)=>{
// item.index = index+1
// })
if
(
r
.
data
){
dataList
.
value
=
r
.
data
.
list
total
.
value
=
r
.
data
.
total
}
}
}
)
}
const
stringFormatter
=
function
(
text
){
const
rawData
=
toRaw
(
queryForm
)
if
(
rawData
.
content_like
&&
rawData
.
content_like
!==
''
)
{
let
str
=
text
.
split
(
rawData
.
content_like
).
join
(
"<span style='color:red;'>"
+
rawData
.
content_like
+
"</span>"
)
return
str
}
else
{
return
text
}
}
const
contentHeight
=
ref
(
0
)
const
__main
=
function
()
{
contentHeight
.
value
=
window
.
innerHeight
-
230
// confirmSearch()
}
const
confirmSearch1
=
function
(){
moreDialogRef
.
value
.
initDialog
();
}
__main
()
return
{
// scalar
isLoading
,
pageNum
,
pageSize
,
total
,
contentHeight
,
// sequence
apptypeList
,
appnameList
,
levelList
,
dataList
,
queryForm
,
columns
,
// function
confirmSearch
,
confirmSearch1
,
stringFormatter
,
onPageNumChange
,
onPageSizeChange
,
//ref
moreDialogRef
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.success
{
color
:
#26ff29
;
}
//
/
deep
/
.el-table
{
//
th,tr{
//
background-color
:
#fafafa
;
//
}
//
}
.failed
{
color
:
red
;
}
</
style
>
<!--<style lang="less" scoped>-->
<!-- .success {-->
<!-- color: #26ff29;-->
<!-- }-->
<!-- // /deep/.el-table{-->
<!-- // th,tr{-->
<!-- // background-color: #fafafa;-->
<!-- // }-->
<!-- // }-->
<!-- .failed {-->
<!-- color: red;-->
<!-- }-->
<!--</style>-->
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment