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