Commit 19461e87 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents da48e855 d32d8ca5
import http from "../request/http";
let baseURL = process.env.VUE_APP_API_PRP_RUL
// http://8.136.255.30/eas/customer/list
// 查询客户管理列表
export function getCustomer(params) {
return http.post(`${baseURL}/eas/customer/list`, params);
}
// http://112.19.80.237:11007/basics_api/base/window/list
// 窗口列表
export function windowList(params) {
return http.post(`${baseURL}/basics_api/base/window/list`, params);
}
......@@ -2,77 +2,43 @@
<div class="reportForm-Container">
<div class="header_box">
<div>
<a-button type="success" @click="exportTable">
<a-button type="success" @click="handleExportTable">
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
</div>
<span>
<a-checkbox-group
:options="checkboxOptions"
v-model="checkboxVALUE"
@change="checkboxonChange"
/>
<a-input
allowClear
v-model="Query.workman_name"
placeholder="请输入工作人员姓名查询 "
>
<a-checkbox-group :options="checkboxOptions" v-model="checkboxVALUE" @change="checkboxonChange" />
<a-input allowClear v-model="Query.workman_name" placeholder="请输入工作人员姓名查询 ">
<a-icon slot="prefix" type="search" />
</a-input>
<a-select default-value="001" placeholder="请选择窗口">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
>
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 窗口001 </a-select-option>
<a-select-option value="002"> 窗口002 </a-select-option>
<a-select v-model="Query.window_id" placeholder="请选择窗口">
<a-select-option value=""> 全部 </a-select-option>
<a-select-option 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"
>
<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日"
class="range_picker_style"
@change="rangePickerChange"
v-model="Query.time"
>
<a-range-picker format="YYYY年MM月DD日" valueFormat="yyyy-MM-DD" class="range_picker_style"
v-model="Query.time">
</a-range-picker>
<a-button type="primary">搜索</a-button>
<a-button type="primary" @click="onGetKqalert">搜索</a-button>
</span>
</div>
<div class="main">
<a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{
selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange,
}"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="changeTablePage" :loading="tableLoading"
:columns="tableHeaders" :dataSource="tableSourceData">
<template slot="operation" slot-scope="text, record">
<a-button type="link" @click="openDetails"
>查看详情{{ record.id }}</a-button
>
<a-button type="link" @click="openDetails">查看详情{{ record.id }}</a-button>
</template>
</a-table>
</div>
......@@ -80,38 +46,45 @@
</template>
<script>
import table from "@/mixins/table";
import {getKqalert} from "@/api/dataAdmin"
const warn_alert = {
1:'离岗',
2:'离开',
4:'玩手机',
5:'扶头',
6:'趴桌',
}
export default {
import table from "@/mixins/table";
import {
export2Excel
} from "@/utils/js/exportExcel";
import {
getKqalert
} from "@/api/dataAdmin"
import {
windowList
} from "@/api/customer"
import moment from "moment";
const warn_alert = {
1: '离岗',
2: '离开',
4: '玩手机',
5: '扶头',
6: '趴桌',
}
export default {
mixins: [table],
name: "PortalAdminVueReportForm",
data() {
return {
windowData: [],
warn_alert,
Query:{
have_process:"",//只看未处理 0
warn_alert:"",//1离岗,2离开 4:玩手机 5:扶头 6:趴桌
window_id:"",//窗口ID
workman_name:"",//工作人员姓名
time:[],//时间段
},//查询条件
Query: {
have_process: "", //只看未处理 0
warn_alert: "", //1离岗,2离开 4:玩手机 5:扶头 6:趴桌
window_id: "", //窗口ID
workman_name: "", //工作人员姓名
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
}, //查询条件
checkboxVALUE: [],
BegindAndEndTime: [],
checkboxOptions: [
{
checkboxOptions: [{
label: "只看未处理",
value: "0",
},
],
tableHeaders: [
{
}, ],
tableHeaders: [{
title: "序号",
dataIndex: "index",
width: "60px",
......@@ -122,47 +95,47 @@ export default {
{
title: "报警类型",
dataIndex: "warn_alert",
customRender:(text, record)=>text?text:'--'
customRender: (text, record) => warn_alert[text]
},
{
title: "发生窗口",
dataIndex: "window_name",
customRender:(text, record)=>text?text:'--'
customRender: (text, record) => text ? text : '--'
},
{
title: "工作人员",
dataIndex: "workman_name",
customRender:(text, record)=>text?text:'--'
customRender: (text, record) => text ? text : '--'
},
{
title: "所属部门",
dataIndex: "section_name",
customRender:(text, record)=>text?text:'--'
customRender: (text, record) => text ? text : '--'
},
{
title: "手机号",
dataIndex: "workman_phone",
customRender:(text, record)=>text?text:'--'
customRender: (text, record) => text ? text : '--'
},
{
title: "发生时间",
dataIndex: "out_time",
customRender:(text, record)=>text?text:'--'
customRender: (text, record) => text ? text : '--'
},
{
title: "时长",
dataIndex: "duration",
customRender:(text, record)=>text?text:'--'
customRender: (text, record) => text ? text : '--'
},
{
title: "是否准确",
dataIndex: "isaccuracy",
customRender:(text, record)=>text?text:'--'
customRender: (text, record) => text == 1 ? '准确' : '--'
},
{
title: "是否处理",
dataIndex: "have_process_name",
customRender:(text, record)=>text?text:'--'
customRender: (text, record) => text ? text : '--'
},
{
title: "操作",
......@@ -181,29 +154,85 @@ export default {
mounted() {
this.onGetKqalert()
this.setMoment();
this.getWindowList();
},
methods: {
// 导出
async handleExportTable() {
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"AI效能监察异常行为数据报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
getKqalert({
...this.Query,
page: 1,
size: -1,
}).then(res => {
const {
code,
data
} = res;
if (code == 1) {
if (!data.data.length) return;
export2Excel(
this.tHeader,
this.filterVal,
data.data,
"AI效能监察异常行为数据报表" + this.$moment().format("YYYYMMDDHHmmss")
);
}
})
}
},
// 报表接口
onGetKqalert(){
getKqalert(this.Query).then(res=>{
const {code,data} = res
if(code == 1){
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("跳转网页");
},
rangePickerChange(val) {
console.log(val);
//分页
changeTablePage(page) {
this.pagTableChange(page);
this.onGetKqalert();
},
checkboxonChange(val) {
if(val.length == 0){
if (val.length == 0) {
this.Query.have_process = ""
}else{
} else {
this.Query.have_process = "0"
}
},
......@@ -219,16 +248,19 @@ export default {
}
},
},
};
};
</script>
<style lang="less" scoped>
/deep/.ant-spin-container {
/deep/.ant-spin-container {
display: block;
}
/deep/.ant-checkbox-group{
width: 220px;
}
</style>
}
/deep/.ant-checkbox-group {
width: 220px;
}
.range_picker_style {
margin-right: 20px;
}
</style>
\ No newline at end of file
......@@ -28,7 +28,7 @@
<a-select-option value="001"> 等级001 </a-select-option>
<a-select-option value="002"> 等级002 </a-select-option>
</a-select>
<a-button type="primary" >搜索</a-button>
<a-button type="primary">搜索</a-button>
</span>
</div>
<div class="main">
......@@ -51,16 +51,18 @@
</template>
<script>
import table from "@/mixins/table";
import UserDetails from "./components/UserDetails.vue";
import PicWorks from "./components/PicWorks.vue";
export default {
import table from "@/mixins/table";
import UserDetails from "./components/UserDetails.vue";
import PicWorks from "./components/PicWorks.vue";
import {
getCustomer
} from "@/api/customer";
export default {
mixins: [table],
name: "PortalAdminVuePoliticsShow",
data() {
return {
tableHeaders: [
{
tableHeaders: [{
title: "序号",
dataIndex: "index",
width: "60px",
......@@ -138,7 +140,28 @@ export default {
});
}
},
created() {
this.getList();
},
methods: {
// 获取列表数据
async getList(search = {}) {
let res = await getCustomer({
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
...this.searchForm,
...search,
});
if (res.code == 1) {
let {
data,
total
} = res.data;
this.tableList = data;
this.tablePagination.total = total;
return data;
}
},
QueueState(type) {
switch (type) {
case 0:
......@@ -160,14 +183,11 @@ export default {
this.$refs.UserDetails.modalInfo.visible = true;
},
},
};
};
</script>
<style lang="less" scoped>
/deep/.ant-spin-container {
/deep/.ant-spin-container {
display: block;
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment