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);
}
......@@ -190,4 +190,4 @@ export function getImpossibleInfo(params) {
*/
export function getKqalert(params) {
return http.get(`${BASEURL}/admin/kqalert/list`, params);
}
\ No newline at end of file
}
<template>
<div class="reportForm-Container">
<div class="header_box">
<div>
<a-button type="success" @click="exportTable">
<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-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> -->
<div class="reportForm-Container">
<div class="header_box">
<div>
<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-icon slot="prefix" type="search" />
</a-input>
<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">
{{ item }}
</a-select-option>
</a-select>
<a-select-option value="001"> 窗口001 </a-select-option>
<a-select-option value="002"> 窗口002 </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"
v-model="Query.time">
</a-range-picker>
<a-range-picker
format="YYYY年MM月DD日"
class="range_picker_style"
@change="rangePickerChange"
v-model="Query.time"
>
</a-range-picker>
<a-button type="primary">搜索</a-button>
</span>
</div>
<div class="main">
<a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
<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="{
selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange,
}"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="operation" slot-scope="text, record">
<a-button type="link" @click="openDetails"
>查看详情{{ record.id }}</a-button
>
</template>
</a-table>
</div>
</div>
}" :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>
</template>
</a-table>
</div>
</div>
</template>
<script>
import table from "@/mixins/table";
import {getKqalert} from "@/api/dataAdmin"
const warn_alert = {
1:'离岗',
2:'离开',
4:'玩手机',
5:'扶头',
6:'趴桌',
}
export default {
mixins: [table],
name: "PortalAdminVueReportForm",
data() {
return {
warn_alert,
Query:{
have_process:"",//只看未处理 0
warn_alert:"",//1离岗,2离开 4:玩手机 5:扶头 6:趴桌
window_id:"",//窗口ID
workman_name:"",//工作人员姓名
time:[],//时间段
},//查询条件
checkboxVALUE: [],
BegindAndEndTime: [],
checkboxOptions: [
{
label: "只看未处理",
value: "0",
},
],
tableHeaders: [
{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "报警类型",
dataIndex: "warn_alert",
customRender:(text, record)=>text?text:'--'
},
{
title: "发生窗口",
dataIndex: "window_name",
customRender:(text, record)=>text?text:'--'
},
{
title: "工作人员",
dataIndex: "workman_name",
customRender:(text, record)=>text?text:'--'
},
{
title: "所属部门",
dataIndex: "section_name",
customRender:(text, record)=>text?text:'--'
},
{
title: "手机号",
dataIndex: "workman_phone",
customRender:(text, record)=>text?text:'--'
},
{
title: "发生时间",
dataIndex: "out_time",
customRender:(text, record)=>text?text:'--'
},
{
title: "时长",
dataIndex: "duration",
customRender:(text, record)=>text?text:'--'
},
{
title: "是否准确",
dataIndex: "isaccuracy",
customRender:(text, record)=>text?text:'--'
},
{
title: "是否处理",
dataIndex: "have_process_name",
customRender:(text, record)=>text?text:'--'
},
{
title: "操作",
align: "center",
width: "110px",
dataIndex: "operation",
scopedSlots: {
customRender: "operation",
},
},
],
searchName: undefined,
};
},
components: {},
mounted() {
this.onGetKqalert()
this.setMoment();
},
methods: {
// 报表接口
onGetKqalert(){
getKqalert(this.Query).then(res=>{
const {code,data} = res
if(code == 1){
this.tableSourceData = data.data
this.tablePagination.total = data.total
}
console.log(res)
})
},
openDetails() {
console.log("跳转网页");
},
rangePickerChange(val) {
console.log(val);
},
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";
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: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
}, //查询条件
checkboxVALUE: [],
BegindAndEndTime: [],
checkboxOptions: [{
label: "只看未处理",
value: "0",
}, ],
tableHeaders: [{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "报警类型",
dataIndex: "warn_alert",
customRender: (text, record) => warn_alert[text]
},
{
title: "发生窗口",
dataIndex: "window_name",
customRender: (text, record) => text ? text : '--'
},
{
title: "工作人员",
dataIndex: "workman_name",
customRender: (text, record) => text ? text : '--'
},
{
title: "所属部门",
dataIndex: "section_name",
customRender: (text, record) => text ? text : '--'
},
{
title: "手机号",
dataIndex: "workman_phone",
customRender: (text, record) => text ? text : '--'
},
{
title: "发生时间",
dataIndex: "out_time",
customRender: (text, record) => text ? text : '--'
},
{
title: "时长",
dataIndex: "duration",
customRender: (text, record) => text ? text : '--'
},
{
title: "是否准确",
dataIndex: "isaccuracy",
customRender: (text, record) => text == 1 ? '准确' : '--'
},
{
title: "是否处理",
dataIndex: "have_process_name",
customRender: (text, record) => text ? text : '--'
},
{
title: "操作",
align: "center",
width: "110px",
dataIndex: "operation",
scopedSlots: {
customRender: "operation",
},
},
],
searchName: undefined,
};
},
components: {},
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,
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";
}
},
},
};
default:
return "type0";
}
},
},
};
</script>
<style lang="less" scoped>
/deep/.ant-spin-container {
display: block;
}
/deep/.ant-checkbox-group{
width: 220px;
}
</style>
/deep/.ant-spin-container {
display: block;
}
/deep/.ant-checkbox-group {
width: 220px;
}
.range_picker_style {
margin-right: 20px;
}
</style>
\ No newline at end of file
<template>
<div class="PoliticsShow-Container">
<div class="header_box">
<div>
<a-button type="success" @click="exportTable">
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<b>用户总数:<i>3人</i></b>
<b>试用客户:<i>2人</i></b>
<b>VIP:<i>1人</i></b>
<b>设计师:<i>0人</i></b>
<b>图片作品数:<i>36个</i></b>
<b>视频作品数:<i>0个</i></b>
</div>
<span class="topBoxFlex">
<a-input allowClear v-model="searchName" placeholder="请输入用户姓名/手机号搜索">
<a-icon slot="prefix" type="search" />
</a-input>
<a-select default-value="001">
<!-- <a-select-option
<div class="PoliticsShow-Container">
<div class="header_box">
<div>
<a-button type="success" @click="exportTable">
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<b>用户总数:<i>3人</i></b>
<b>试用客户:<i>2人</i></b>
<b>VIP:<i>1人</i></b>
<b>设计师:<i>0人</i></b>
<b>图片作品数:<i>36个</i></b>
<b>视频作品数:<i>0个</i></b>
</div>
<span class="topBoxFlex">
<a-input allowClear v-model="searchName" placeholder="请输入用户姓名/手机号搜索">
<a-icon slot="prefix" type="search" />
</a-input>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
......@@ -25,149 +25,169 @@
{{ 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>
<a-button type="primary" >搜索</a-button>
</span>
</div>
<div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{
<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>
</span>
</div>
<div class="main">
<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">
<template slot="zhenshixingming" slot-scope="text, record, index">
<a-button type="link" @click="openUserDetails">{{ text }}</a-button>
</template>
<template slot="tupianzuopinshuliang" slot-scope="text, record, index">
<a-button type="link" @click="openPicWorks">{{ text }}</a-button>
</template>
</a-table>
<PicWorks ref="PicWorks" />
<UserDetails ref="UserDetails" @openPicWorks="openPicWorks" />
</div>
</div>
:columns="tableHeaders" :dataSource="tableSourceData">
<template slot="zhenshixingming" slot-scope="text, record, index">
<a-button type="link" @click="openUserDetails">{{ text }}</a-button>
</template>
<template slot="tupianzuopinshuliang" slot-scope="text, record, index">
<a-button type="link" @click="openPicWorks">{{ text }}</a-button>
</template>
</a-table>
<PicWorks ref="PicWorks" />
<UserDetails ref="UserDetails" @openPicWorks="openPicWorks" />
</div>
</div>
</template>
<script>
import table from "@/mixins/table";
import UserDetails from "./components/UserDetails.vue";
import PicWorks from "./components/PicWorks.vue";
export default {
mixins: [table],
name: "PortalAdminVuePoliticsShow",
data() {
return {
tableHeaders: [
{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "真实姓名",
align: "center",
dataIndex: "zhenshixingming",
scopedSlots: {
customRender: "zhenshixingming",
},
},
{
title: "联系电话",
align: "center",
dataIndex: "lianxidianhua",
},
{
title: "单位名称",
align: "center",
dataIndex: "danweimingcheng",
},
{
title: "图片作品数量",
align: "center",
dataIndex: "tupianzuopinshuliang",
scopedSlots: {
customRender: "tupianzuopinshuliang",
},
},
{
title: "视频作品数量",
align: "center",
dataIndex: "shipinzuopinshuliang",
},
{
title: "会员等级",
align: "center",
dataIndex: "huiyuandengji",
},
{
title: "最近登录时间",
align: "center",
dataIndex: "zuijingdenglushijian",
},
{
title: "使用状态",
align: "center",
dataIndex: "shiyongzhuangtai",
},
],
searchName: undefined,
};
},
components: {
UserDetails,
PicWorks,
},
mounted() {
this.setMoment();
for (let key = 0; key < 20; key++) {
this.tableSourceData.push({
id: `00${key + 1}`,
zhenshixingming: `陈飞云${key + 1}`,
lianxidianhua: `13880888888`,
danweimingcheng: `宜宾人力资源与社保管理局${key + 1}`,
tupianzuopinshuliang: `1${key + 1}`,
shipinzuopinshuliang: `-- ${key + 1}`,
huiyuandengji: `vip ${key + 1}`,
zuijingdenglushijian: `2020-09-09 19:19:19`,
shiyongzhuangtai: `正常 ${key + 1}`,
});
}
},
methods: {
QueueState(type) {
switch (type) {
case 0:
return "type1";
case 1:
return "type2";
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: [{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "真实姓名",
align: "center",
dataIndex: "zhenshixingming",
scopedSlots: {
customRender: "zhenshixingming",
},
},
{
title: "联系电话",
align: "center",
dataIndex: "lianxidianhua",
},
{
title: "单位名称",
align: "center",
dataIndex: "danweimingcheng",
},
{
title: "图片作品数量",
align: "center",
dataIndex: "tupianzuopinshuliang",
scopedSlots: {
customRender: "tupianzuopinshuliang",
},
},
{
title: "视频作品数量",
align: "center",
dataIndex: "shipinzuopinshuliang",
},
{
title: "会员等级",
align: "center",
dataIndex: "huiyuandengji",
},
{
title: "最近登录时间",
align: "center",
dataIndex: "zuijingdenglushijian",
},
{
title: "使用状态",
align: "center",
dataIndex: "shiyongzhuangtai",
},
],
searchName: undefined,
};
},
components: {
UserDetails,
PicWorks,
},
mounted() {
this.setMoment();
for (let key = 0; key < 20; key++) {
this.tableSourceData.push({
id: `00${key + 1}`,
zhenshixingming: `陈飞云${key + 1}`,
lianxidianhua: `13880888888`,
danweimingcheng: `宜宾人力资源与社保管理局${key + 1}`,
tupianzuopinshuliang: `1${key + 1}`,
shipinzuopinshuliang: `-- ${key + 1}`,
huiyuandengji: `vip ${key + 1}`,
zuijingdenglushijian: `2020-09-09 19:19:19`,
shiyongzhuangtai: `正常 ${key + 1}`,
});
}
},
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:
return "type1";
case 1:
return "type2";
default:
return "type0";
}
},
openPicWorks() {
this.$refs.PicWorks.modalInfo.title = "作品数量";
this.$refs.PicWorks.modalInfo.visible = true;
this.$refs.PicWorks.modalInfo.width = "32%";
},
openUserDetails() {
this.$refs.UserDetails.modalInfo.title = "客户详情";
this.$refs.UserDetails.modalInfo.visible = true;
},
},
};
default:
return "type0";
}
},
openPicWorks() {
this.$refs.PicWorks.modalInfo.title = "作品数量";
this.$refs.PicWorks.modalInfo.visible = true;
this.$refs.PicWorks.modalInfo.width = "32%";
},
openUserDetails() {
this.$refs.UserDetails.modalInfo.title = "客户详情";
this.$refs.UserDetails.modalInfo.visible = true;
},
},
};
</script>
<style lang="less" scoped>
/deep/.ant-spin-container {
display: block;
}
</style>
/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