Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
a597f97d
Commit
a597f97d
authored
May 31, 2023
by
姬鋆屾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改ai数据报表显示和到处功能
parent
75de4e66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
313 additions
and
252 deletions
+313
-252
portal-manager-ui/admin/src/views/dataAdmin/components/AIEfficiency/reportForm.vue
...rc/views/dataAdmin/components/AIEfficiency/reportForm.vue
+313
-252
No files found.
portal-manager-ui/admin/src/views/dataAdmin/components/AIEfficiency/reportForm.vue
View file @
a597f97d
<
template
>
<
template
>
<div
class=
"reportForm-Container"
>
<div
class=
"reportForm-Container"
>
<div
class=
"header_box"
>
<div
class=
"header_box"
>
<div>
<div>
<a-button
type=
"primary"
class=
"addclass"
@
click=
"handleExportTable"
>
<a-button
type=
"primary"
class=
"addclass"
@
click=
"handleExportTable"
>
<span>
{{
tableSelectedRows
.
length
?
"
导出
"
:
"
导出全部
"
}}
</span>
<span>
{{
tableSelectedRows
.
length
?
"
导出
"
:
"
导出全部
"
}}
</span>
</a-button>
</a-button>
</div>
</div>
<span>
<span>
<a-checkbox-group
:options=
"checkboxOptions"
v-model=
"checkboxVALUE"
@
change=
"checkboxonChange"
/>
<a-checkbox-group
<a-input
allowClear
v-model=
"Query.workman_name"
placeholder=
"请输入工作人员姓名查询 "
>
:options=
"checkboxOptions"
<a-icon
slot=
"prefix"
type=
"search"
/>
v-model=
"checkboxVALUE"
</a-input>
@
change=
"checkboxonChange"
<a-select
v-model=
"Query.window_id"
placeholder=
"请选择窗口"
>
/>
<a-select-option
value=
""
>
全部
</a-select-option>
<a-input
<a-select-option
v-for=
"(item, index) of windowData"
:key=
"index"
:value=
"item.id"
>
allowClear
{{
item
.
englishName
}}
-
{{
item
.
fromnum
}}
v-model=
"Query.workman_name"
</a-select-option>
placeholder=
"请输入工作人员姓名查询 "
</a-select>
>
<a-select
v-model=
"Query.warn_alert"
placeholder=
"请选择类型"
>
<a-icon
slot=
"prefix"
type=
"search"
/>
<a-select-option
value=
""
>
全部
</a-select-option>
</a-input>
<a-select-option
v-for=
"(item,i) in warn_alert"
:key=
"i"
:value=
"i"
>
<a-select
v-model=
"Query.window_id"
placeholder=
"请选择窗口"
>
{{
item
}}
<a-select-option
value=
""
>
全部
</a-select-option>
</a-select-option>
<a-select-option
</a-select>
v-for=
"(item, index) of windowData"
:key=
"index"
:value=
"item.id"
>
{{
item
.
englishName
}}
-
{{
item
.
fromnum
}}
</a-select-option>
</a-select>
<a-select
v-model=
"Query.warn_alert"
placeholder=
"请选择类型"
>
<a-select-option
value=
""
>
全部
</a-select-option>
<a-select-option
v-for=
"(item, i) in warn_alert"
:key=
"i"
:value=
"i"
>
{{
item
}}
</a-select-option>
</a-select>
<a-range-picker
format=
"YYYY年MM月DD日"
valueFormat=
"yyyy-MM-DD"
class=
"range_picker_style"
<a-range-picker
v-model=
"Query.time"
>
format=
"YYYY年MM月DD日"
</a-range-picker>
valueFormat=
"yyyy-MM-DD"
class=
"range_picker_style"
v-model=
"Query.time"
>
</a-range-picker>
<a-button
type=
"primary"
class=
"addclass"
@
click=
"onGetKqalert"
>
搜索
</a-button>
<a-button
type=
"primary"
class=
"addclass"
@
click=
"onGetKqalert"
</span>
>
搜索
</a-button
</div>
>
<div
class=
"main"
>
</span>
<a-table
size=
"small"
bordered
:row-key=
"(record) => record.id"
:row-selection=
"
{
</div>
<div
class=
"main"
>
<a-table
size=
"small"
bordered
:row-key=
"(record) => record.id"
:row-selection=
"
{
selectedRowKeys: tableSelectedKeys,
selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange,
onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="changeTablePage" :loading="tableLoading"
}"
:columns="tableHeaders" :dataSource="tableSourceData">
:scroll="{ y: 590 }"
<template
slot=
"operation"
slot-scope=
"text, record"
>
:pagination="tablePagination"
<a-button
type=
"link"
@
click=
"openDetails"
>
查看详情
{{
record
.
id
}}
</a-button>
@change="changeTablePage"
</
template
>
:loading="tableLoading"
</a-table>
:columns="tableHeaders"
</div>
:dataSource="tableSourceData"
</div>
>
<template
slot=
"operation"
slot-scope=
"text, record"
>
<a-button
type=
"link"
@
click=
"openDetails"
>
查看详情
{{
record
.
id
}}
</a-button
>
</
template
>
</a-table>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
table
from
"
@/mixins/table
"
;
import
table
from
"
@/mixins/table
"
;
import
{
import
{
export2Excel
}
from
"
@/utils/js/exportExcel
"
;
export2Excel
import
{
getKqalert
}
from
"
@/api/dataAdmin
"
;
}
from
"
@/utils/js/exportExcel
"
;
import
{
windowList
}
from
"
@/api/customer
"
;
import
{
import
moment
from
"
moment
"
;
getKqalert
const
warn_alert
=
{
}
from
"
@/api/dataAdmin
"
1
:
"
离岗
"
,
import
{
2
:
"
离开
"
,
windowList
4
:
"
玩手机
"
,
}
from
"
@/api/customer
"
5
:
"
扶头
"
,
import
moment
from
"
moment
"
;
6
:
"
趴桌
"
,
const
warn_alert
=
{
};
1
:
'
离岗
'
,
const
tHeader
=
[
2
:
'
离开
'
,
"
序号
"
,
4
:
'
玩手机
'
,
"
报警类型
"
,
5
:
'
扶头
'
,
"
发生窗口
"
,
6
:
'
趴桌
'
,
"
工作人员
"
,
}
"
所属部门
"
,
export
default
{
"
手机号
"
,
mixins
:
[
table
],
"
发生时间
"
,
name
:
"
PortalAdminVueReportForm
"
,
"
时长
"
,
data
()
{
"
是否准确
"
,
return
{
];
windowData
:
[],
const
filterVal
=
[
warn_alert
,
"
index
"
,
Query
:
{
"
warn_alert
"
,
have_process
:
""
,
//只看未处理 0
"
window_name
"
,
warn_alert
:
""
,
//1离岗,2离开 4:玩手机 5:扶头 6:趴桌
"
workman_name
"
,
window_id
:
""
,
//窗口ID
"
section_name
"
,
workman_name
:
""
,
//工作人员姓名
"
workman_phone
"
,
time
:
[
moment
().
format
(
"
YYYY-MM-DD
"
),
moment
().
format
(
"
YYYY-MM-DD
"
)],
// 时间区间
"
out_time
"
,
},
//查询条件
"
duration
"
,
checkboxVALUE
:
[],
"
isaccuracy
"
,
BegindAndEndTime
:
[],
"
have_process_name
"
,
checkboxOptions
:
[{
];
label
:
"
只看未处理
"
,
export
default
{
value
:
"
0
"
,
mixins
:
[
table
],
},
],
name
:
"
PortalAdminVueReportForm
"
,
tableHeaders
:
[{
data
()
{
title
:
"
序号
"
,
return
{
dataIndex
:
"
index
"
,
windowData
:
[],
width
:
"
60px
"
,
warn_alert
,
key
:
"
index
"
,
Query
:
{
align
:
"
center
"
,
have_process
:
""
,
//只看未处理 0
customRender
:
(
text
,
record
,
index
)
=>
`
${
index
+
1
}
`
,
warn_alert
:
""
,
//1离岗,2离开 4:玩手机 5:扶头 6:趴桌
},
window_id
:
""
,
//窗口ID
{
workman_name
:
""
,
//工作人员姓名
title
:
"
报警类型
"
,
time
:
[
moment
().
format
(
"
YYYY-MM-DD
"
),
moment
().
format
(
"
YYYY-MM-DD
"
)],
// 时间区间
dataIndex
:
"
warn_alert
"
,
},
//查询条件
customRender
:
(
text
,
record
)
=>
warn_alert
[
text
]
checkboxVALUE
:
[],
},
BegindAndEndTime
:
[],
{
checkboxOptions
:
[
title
:
"
发生窗口
"
,
{
dataIndex
:
"
window_name
"
,
label
:
"
只看未处理
"
,
customRender
:
(
text
,
record
)
=>
text
?
text
:
'
--
'
value
:
"
0
"
,
},
},
{
],
title
:
"
工作人员
"
,
tableHeaders
:
[
dataIndex
:
"
workman_name
"
,
{
customRender
:
(
text
,
record
)
=>
text
?
text
:
'
--
'
title
:
"
序号
"
,
},
dataIndex
:
"
index
"
,
{
width
:
"
60px
"
,
title
:
"
所属部门
"
,
key
:
"
index
"
,
dataIndex
:
"
section_name
"
,
align
:
"
center
"
,
customRender
:
(
text
,
record
)
=>
text
?
text
:
'
--
'
customRender
:
(
text
,
record
,
index
)
=>
`
${
index
+
1
}
`
,
},
},
{
{
title
:
"
手机号
"
,
title
:
"
报警类型
"
,
dataIndex
:
"
workman_phone
"
,
dataIndex
:
"
warn_alert
"
,
customRender
:
(
text
,
record
)
=>
text
?
text
:
'
--
'
customRender
:
(
text
,
record
)
=>
warn_alert
[
text
],
},
},
{
{
title
:
"
发生时间
"
,
title
:
"
发生窗口
"
,
dataIndex
:
"
out_time
"
,
dataIndex
:
"
window_name
"
,
customRender
:
(
text
,
record
)
=>
text
?
text
:
'
--
'
customRender
:
(
text
,
record
)
=>
(
text
?
text
:
"
--
"
),
},
},
{
{
title
:
"
时长
"
,
title
:
"
工作人员
"
,
dataIndex
:
"
duration
"
,
dataIndex
:
"
workman_name
"
,
customRender
:
(
text
,
record
)
=>
text
?
text
:
'
--
'
customRender
:
(
text
,
record
)
=>
(
text
?
text
:
"
--
"
),
},
},
{
{
title
:
"
是否准确
"
,
title
:
"
所属部门
"
,
dataIndex
:
"
isaccuracy
"
,
dataIndex
:
"
section_name
"
,
customRender
:
(
text
,
record
)
=>
text
==
1
?
'
准确
'
:
'
--
'
customRender
:
(
text
,
record
)
=>
(
text
?
text
:
"
--
"
),
},
},
{
{
title
:
"
是否处理
"
,
title
:
"
手机号
"
,
dataIndex
:
"
have_process_name
"
,
dataIndex
:
"
workman_phone
"
,
customRender
:
(
text
,
record
)
=>
text
?
text
:
'
--
'
customRender
:
(
text
,
record
)
=>
(
text
?
text
:
"
--
"
),
},
},
// {
{
// title: "操作",
title
:
"
发生时间
"
,
// align: "center",
dataIndex
:
"
out_time
"
,
// width: "110px",
customRender
:
(
text
,
record
)
=>
// dataIndex: "operation",
text
?
this
.
timestampToTime
(
text
)
:
"
--
"
,
// scopedSlots: {
},
// customRender: "operation",
{
// },
title
:
"
时长
"
,
// },
dataIndex
:
"
duration
"
,
],
customRender
:
(
text
,
record
)
=>
(
text
?
text
:
"
--
"
),
searchName
:
undefined
,
},
};
{
},
title
:
"
是否准确
"
,
components
:
{},
dataIndex
:
"
isaccuracy
"
,
mounted
()
{
customRender
:
(
text
,
record
)
=>
(
text
==
1
?
"
准确
"
:
"
--
"
),
this
.
onGetKqalert
()
},
this
.
setMoment
();
{
this
.
getWindowList
();
title
:
"
是否处理
"
,
},
dataIndex
:
"
have_process_name
"
,
methods
:
{
customRender
:
(
text
,
record
)
=>
(
text
?
text
:
"
--
"
),
// 导出
},
async
handleExportTable
()
{
// {
if
(
this
.
tableSelectedKeys
.
length
&&
this
.
tableSelectedRows
.
length
)
{
// title: "操作",
export2Excel
(
// align: "center",
this
.
tHeader
,
// width: "110px",
this
.
filterVal
,
// dataIndex: "operation",
this
.
tableSelectedRows
,
// scopedSlots: {
"
AI效能监察异常行为数据报表
"
+
this
.
$moment
().
format
(
"
YYYYMMDDHHmmss
"
)
// customRender: "operation",
);
// },
}
else
{
// },
getKqalert
({
],
...
this
.
Query
,
searchName
:
undefined
,
page
:
1
,
};
size
:
-
1
,
},
}).
then
(
res
=>
{
components
:
{},
const
{
mounted
()
{
code
,
this
.
onGetKqalert
();
data
this
.
setMoment
();
}
=
res
;
this
.
getWindowList
();
if
(
code
==
1
)
{
},
if
(
!
data
.
data
.
length
)
return
;
methods
:
{
export2Excel
(
// 时间戳转换为日期
this
.
tHeader
,
timestampToTime
(
timestamp
)
{
this
.
filterVal
,
var
date
=
new
Date
(
timestamp
*
1000
);
data
.
data
,
var
Y
=
date
.
getFullYear
()
+
"
-
"
;
"
AI效能监察异常行为数据报表
"
+
this
.
$moment
().
format
(
"
YYYYMMDDHHmmss
"
)
var
M
=
);
(
date
.
getMonth
()
+
1
<
10
}
?
"
0
"
+
(
date
.
getMonth
()
+
1
)
})
:
date
.
getMonth
()
+
1
)
+
"
-
"
;
}
var
D
=
},
(
date
.
getDate
()
<
10
?
"
0
"
+
date
.
getDate
()
:
date
.
getDate
())
+
"
"
;
// 报表接口
var
h
=
date
.
getHours
()
+
"
:
"
;
onGetKqalert
()
{
var
m
=
date
.
getMinutes
()
+
"
:
"
;
getKqalert
({
var
s
=
date
.
getSeconds
();
...
this
.
Query
,
return
Y
+
M
+
D
+
h
+
m
+
s
;
page
:
this
.
tablePagination
.
current
,
},
size
:
this
.
tablePagination
.
pageSize
,
// 导出
}).
then
(
res
=>
{
async
handleExportTable
()
{
const
{
let
data
=
[];
code
,
if
(
this
.
tableSelectedKeys
.
length
&&
this
.
tableSelectedRows
.
length
)
{
data
// 深度克隆避免影响页面表格展示
}
=
res
data
=
this
.
$_
.
cloneDeep
(
this
.
tableSelectedRows
);
if
(
code
==
1
)
{
}
else
{
this
.
tableSourceData
=
data
.
data
let
datas
=
this
.
$_
.
cloneDeep
(
this
.
tablePagination
.
total
=
data
.
total
await
getKqalert
({
}
...
this
.
Query
,
console
.
log
(
res
)
page
:
1
,
})
size
:
-
1
,
},
})
getWindowList
()
{
);
windowList
({
data
=
datas
.
data
.
data
;
page
:
1
,
data
.
forEach
((
text
,
i
)
=>
{
size
:
-
1
,
text
.
index
=
i
+
1
;
siteId
:
JSON
.
parse
(
localStorage
.
getItem
(
"
siteId
"
))
text
.
isaccuracy
=
text
.
isaccuracy
==
1
?
"
准确
"
:
"
--
"
;
}).
then
(
res
=>
{
text
.
out_time
=
text
.
out_time
const
{
?
this
.
timestampToTime
(
text
.
out_time
)
code
,
:
"
--
"
;
data
});
}
=
res
if
(
!
data
.
length
)
return
;
if
(
code
==
1
)
{
this
.
windowData
=
data
.
data
}
})
},
openDetails
()
{
console
.
log
(
"
跳转网页
"
);
},
//分页
changeTablePage
(
page
)
{
this
.
pagTableChange
(
page
);
this
.
onGetKqalert
();
},
checkboxonChange
(
val
)
{
if
(
val
.
length
==
0
)
{
this
.
Query
.
have_process
=
""
}
else
{
this
.
Query
.
have_process
=
"
0
"
}
},
QueueState
(
type
)
{
switch
(
type
)
{
case
0
:
return
"
type1
"
;
case
1
:
return
"
type2
"
;
default
:
export2Excel
(
return
"
type0
"
;
tHeader
,
}
filterVal
,
},
data
,
},
"
AI效能监察异常行为数据报表
"
+
this
.
$moment
().
format
(
"
YYYYMMDDHHmmss
"
)
};
);
}
},
// 报表接口
onGetKqalert
()
{
getKqalert
({
...
this
.
Query
,
page
:
this
.
tablePagination
.
current
,
size
:
this
.
tablePagination
.
pageSize
,
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
1
)
{
this
.
tableSourceData
=
data
.
data
;
this
.
tablePagination
.
total
=
data
.
total
;
}
console
.
log
(
res
);
});
},
getWindowList
()
{
windowList
({
page
:
1
,
size
:
-
1
,
siteId
:
JSON
.
parse
(
localStorage
.
getItem
(
"
siteId
"
)),
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
1
)
{
this
.
windowData
=
data
.
data
;
}
});
},
openDetails
()
{
console
.
log
(
"
跳转网页
"
);
},
//分页
changeTablePage
(
page
)
{
this
.
pagTableChange
(
page
);
this
.
onGetKqalert
();
},
checkboxonChange
(
val
)
{
if
(
val
.
length
==
0
)
{
this
.
Query
.
have_process
=
""
;
}
else
{
this
.
Query
.
have_process
=
"
0
"
;
}
},
QueueState
(
type
)
{
switch
(
type
)
{
case
0
:
return
"
type1
"
;
case
1
:
return
"
type2
"
;
default
:
return
"
type0
"
;
}
},
},
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
/deep/.ant-spin-container {
/deep/.ant-spin-container {
display: block;
display: block;
}
}
/deep/.ant-checkbox-group {
/deep/.ant-checkbox-group {
width: 250px;
width: 250px;
}
}
.range_picker_style {
.range_picker_style {
margin-right: 20px;
margin-right: 20px;
}
}
</
style
>
</
style
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment