Commit 9201a420 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 50f1882f dec872c0
......@@ -97,7 +97,9 @@ export default {
},
{
title: "地址",
dataIndex: "address",
customRender: (text) => {
return text.address || "--";
},
},
{
title: "楼栋",
......@@ -215,6 +217,7 @@ export default {
let { code, msg } = res.data;
if (code == 1) {
_this.$message.success(msg);
_this.selectedRowKeys = [];
_this.getHallList();
}
},
......
......@@ -105,7 +105,6 @@ export default {
// 关闭弹窗
handleClose() {
this.$refs.form.resetFields();
console.log(this.form);
this.Visible = false;
},
// 保存
......@@ -130,7 +129,7 @@ export default {
};
</script>
<style lang="less" scoped>
<style lang="less" scoped>
.ant-input-number {
width: 100%;
}
......
......@@ -7,10 +7,28 @@
<a-button type="danger" @click="handleDelAll"> 批量移除 </a-button>
<div class="business-control">
<a-space>
<a-select
style="min-width: 120px"
v-model="leftHallSearch"
showSearch
optionFilterProp="label"
>
<a-select-option value="" label="全部大厅">
全部大厅
</a-select-option>
<a-select-option
v-for="v in hallList"
:key="v.id"
:value="v.id"
:label="v.hallName"
>
{{ v.hallName }}
</a-select-option>
</a-select>
<a-input-search
placeholder="请输入窗口名称搜索"
enter-button="搜索"
v-model="serchSiteBusiness"
v-model="leftSearchVal"
@search="onSearchLeft"
allowClear
/>
......@@ -37,39 +55,22 @@
onShowSizeChange: showSizeChange,
}"
:columns="leftColumns"
:expandIconColumnIndex="2"
:data-source="businessData"
:data-source="hallWindowData"
:row-selection="{
selectedRowKeys: selectedLeftRowKeys,
onChange: onSelectChange,
onSelect: onSelectLeftRow,
}"
:rowKey="(record) => record.id"
>
<template
slot="num"
v-if="record.parentId === 0"
slot-scope="text, record, index"
>
<template slot="num" slot-scope="text, record, index">
<span>
{{ (leftCurrent - 1) * leftSize + index + 1 }}
</span>
</template>
<template slot="businessName" slot-scope="text">
{{ text.businessName }}
</template>
<template slot="action" slot-scope="text">
<a-space size="middle">
<a href="javascript:;" class="edit" @click="handleEdit(text)"
>编辑</a
<a href="javascript:;" class="delete" @click="handleDel(text.id)"
>移除</a
>
<a
href="javascript:;"
class="delete"
@click="handleDel(text.id, text)"
>删除</a
>
</a-space>
</template>
</a-table>
</div>
......@@ -83,13 +84,33 @@
<a-button type="primary" @click="handleAddAll"> 批量加入 </a-button>
</div>
<div class="business-control">
<a-space>
<a-select
style="min-width: 120px"
v-model="deptSearch"
showSearch
optionFilterProp="label"
>
<a-select-option value="" label="全部部门">
全部部门
</a-select-option>
<a-select-option
v-for="v in deptList"
:key="v.id"
:value="v.id"
:label="v.name"
>
{{ v.name }}
</a-select-option>
</a-select>
<a-input-search
placeholder="请输入窗口名称搜索"
placeholder="请输入窗口编号搜索"
enter-button="搜索"
v-model="serchData"
v-model="rightSearchVal"
@search="onSearch"
allowClear
/>
</a-space>
</div>
</div>
</div>
......@@ -111,48 +132,43 @@
onShowSizeChange: showSizeChangeRight,
}"
size="middle"
:expandIconColumnIndex="2"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onRightSelectChange,
}"
:columns="rightColumns"
:data-source="businessDataList"
:data-source="siteWindowData"
:rowKey="(record) => record.id"
>
<template
v-if="record.parentId === 0"
slot="num"
slot-scope="text, record, index"
>
<template slot="num" slot-scope="text, record, index">
<span>
{{ (rightCurrent - 1) * rightSize + index + 1 }}
</span>
</template>
<template slot="name" slot-scope="text">
{{ text.name }}
</template>
<template slot="action" slot-scope="text">
<a-space size="middle">
<a class="jion" @click="handleIn(text.id)">加入</a>
<a
href="javascript:;"
class="delete"
@click="handleDelRight(+text.id)"
>删除</a
>
<a class="jion" @click="handleIn([text])">加入大厅</a>
</a-space>
</template>
</a-table>
</div>
</div>
<!-- 添加大厅窗口 -->
<WindowToHall
ref="WindowToHall"
:addVisile.sync="visible"
:hallList="hallList"
@addSuccess="addSuccess"
></WindowToHall>
</div>
</template>
<script>
import { getHallList } from "@/services/hall";
import { getHallList, getWindowHallList, delWindowHall } from "@/services/hall";
import WindowToHall from "./modal/WindowToHall.vue";
import local from "@/utils/local";
import { getDeptList, getSubHalllist } from "@/services/dept";
const leftColumns = [
{
title: "序号",
......@@ -164,12 +180,12 @@ const leftColumns = [
dataIndex: "windowName",
},
{
title: "所属大厅",
dataIndex: "hallName",
title: "窗口编号",
dataIndex: "fromnum",
},
{
title: "创建时间",
dataIndex: "createTime",
title: "所属大厅",
dataIndex: "hallName",
},
{
title: "操作",
......@@ -209,16 +225,22 @@ const rightColumns = [
];
export default {
components: {},
components: { WindowToHall },
data() {
return {
leftColumns,
rightColumns,
hallList: [], // 大厅列表
deptList: [], // 部门列表
leftHallSearch: "",
deptSearch: "",
leftSearchVal: "",
rightSearchVal: "",
leftLoading: false,
rightLoading: false,
selectedRowKeys: [],
selectedLeftRowKeys: [],
selectedRowKeys: [],
selectedRows: [],
visible: false,
leftCurrent: 1,
rightCurrent: 1,
......@@ -228,10 +250,15 @@ export default {
rightSize: 10,
pageSizeOptions: ["10", "30", "50", "100"],
siteId: local.getLocal("siteId"), // 站点id
hallWindowData: [], // 大厅窗口数据
siteWindowData: [], // 站点窗口数据
};
},
created() {
this.getHallList();
this.getDeptList();
this.getWindowHallList();
this.getSubHalllist();
},
methods: {
// 获取大厅列表
......@@ -244,98 +271,164 @@ export default {
if (res.data.code == 1) {
let { data } = res.data.data;
this.hallList = data;
console.log(data);
}
},
// 获取部门列表
async getDeptList() {
let res = await getDeptList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.data.code == 1) {
let { data } = res.data.data;
this.deptList = data;
}
},
// 获取大厅窗口列表
async getWindowHallList() {
this.leftLoading = true;
let res = await getWindowHallList({
page: this.leftCurrent,
size: this.leftSize,
siteId: this.siteId,
windowName: `%${this.leftSearchVal}%`,
hallId: this.leftHallSearch,
});
if (res.data.code == 1) {
let { data, total } = res.data.data;
if (!data.length && this.leftCurrent > 1) {
this.leftCurrent -= 1;
this.getWindowHallList();
}
this.hallWindowData = data;
this.leftTotal = total;
}
this.leftLoading = false;
},
// 获取站点差集窗口列表
async getSubHalllist() {
this.rightLoading = true;
let res = await getSubHalllist({
page: this.rightCurrent,
size: this.rightSize,
siteId: this.siteId,
fromnum: `%${this.rightSearchVal}%`,
deptId: this.deptSearch,
});
if (res.data.code == 1) {
let { data, total } = res.data.data;
this.siteWindowData = data;
this.rightTotal = total;
}
this.rightLoading = false;
},
// 左边搜索
onSearchLeft() {
this.leftCurrent = 1;
this.selectedLeftRowKeys = [];
this.getWindowHallList();
},
// 删除
handleDel() {
// let _this = this;
handleDel(id) {
let _this = this;
this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
content: "确定要移除所选窗口吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {},
async onOk() {
let res = await delWindowHall({ id });
let { code, msg } = res.data;
if (code == 1) {
_this.$message.success(msg);
_this.selectedLeftRowKeys = [];
_this.getWindowHallList();
_this.getSubHalllist();
}
},
onCancel() {
console.log("Cancel");
},
});
},
// 左边选中
onSelectChange(key) {
this.selectedLeftRowKeys = key;
},
// 批量删除
handleDelAll() {
if (this.deleteData.length <= 0) {
if (!this.selectedLeftRowKeys.length) {
this.$message.warning("请先勾选数据");
return;
}
let ids = this.selectedLeftRowKeys.join(",");
this.handleDel(ids);
},
// 获取批量加入id
onRightSelectChange(key) {
this.selectedRowKeys = key;
onRightSelectChange(keys, rows) {
this.selectedRowKeys = keys;
const res = new Map();
this.selectedRows = [...this.selectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.selectedRowKeys.some((val) => v.id == val);
});
},
// 批量加入
handleAddAll() {},
handleAddAll() {
if (!this.selectedRows.length) {
this.$message.warning("请先勾选数据");
return;
}
this.handleIn(this.selectedRows);
},
// 左翻页
changeLeft(num) {
this.leftCurrent = num;
changeLeft(cur) {
this.leftCurrent = cur;
this.getWindowHallList();
},
// 左边改变每页显示数量
showSizeChange(current, size) {
this.leftCurrent = current;
this.leftSize = size;
this.getWindowHallList();
},
// 右翻页
changeRight(num) {
this.rightCurrent = num;
changeRight(cur) {
this.rightCurrent = cur;
this.getSubHalllist();
},
// 右边改变显示数量
showSizeChangeRight(current, size) {
this.rightCurrent = current;
this.rightSize = size;
this.getSubHalllist();
},
// 编辑
async handleEdit() {},
// 搜索
async onSearch() {
this.rightCurrent = 1;
this.getSubHalllist();
},
// 加入
async handleIn() {
if (!this.siteId) {
this.$message.warning("请先选择站点");
return;
}
handleIn(rows) {
this.$refs.WindowToHall.onAdd(rows);
this.visible = true;
},
// 删除-右
handleDelRight() {
this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
maskClosable: true,
icon: "exclamation-circle",
async onOk() {},
onCancel() {
console.log("Cancel");
},
});
// 加入成功
addSuccess() {
this.selectedRowKeys = [];
this.selectedRows = [];
this.getWindowHallList();
this.getSubHalllist();
},
},
};
......
<template>
<div>
<a-modal
v-model="Visible"
:maskClosable="false"
title="新增大厅窗口"
@cancel="handleClose"
destroyOnClose
centered
>
<template slot="footer">
<a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</template>
<a-form-model
ref="form"
:model="form"
:rules="rules"
:label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }"
>
<a-form-model-item label="所属大厅" prop="hallName">
<a-select
@change="handleChange"
labelInValue
placeholder="请选择所属大厅"
v-model="selectInfo"
>
<a-select-option v-for="v in hallList" :key="v.id" :value="v.id">
{{ v.hallName }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-form-model>
</a-modal>
</div>
</template>
<script>
import {
// saveWindowHall,
batchSaveWindowHall,
} from "@/services/hall";
export default {
props: {
addVisile: {
type: Boolean,
require: true,
default: false,
},
hallList: {
type: Array,
require: true,
default: () => {
return [];
},
},
},
components: {},
data() {
return {
selectInfo: undefined,
form: {
windowId: "", // 窗口id
windowName: "", // 窗口名称
hallId: "", // 大厅id
hallName: "", // 大厅名称
// sort: "", // 排序
// remark: "", // 备注
},
windowList: [], // 选择窗口列表
rules: {
hallName: [
{ required: true, message: "请选择所属大厅", trigger: "change" },
],
},
};
},
computed: {
Visible: {
get() {
return this.addVisile;
},
set(val) {
this.$emit("update:addVisile", val);
},
},
},
methods: {
// 切换选择
handleChange(row) {
this.form.hallId = row.key;
this.form.hallName = row.label;
},
// 新增
onAdd(rows) {
this.windowList = rows;
// this.form.windowId = rows.id;
// this.form.windowName = rows.name;
},
// 关闭弹窗
handleClose() {
this.selectInfo = undefined;
this.$refs.form.resetFields();
this.Visible = false;
},
// 保存
handleOk() {
this.$refs.form.validate(async (valid) => {
if (valid) {
let arr = this.windowList.map((v) => {
return {
windowId: v.id, // 窗口id
windowName: v.name, // 窗口名称
hallId: this.form.hallId, // 大厅id
hallName: this.form.hallName, // 大厅名称
};
});
let res = await batchSaveWindowHall(arr);
let { code, msg } = res.data;
if (code == 1) {
this.$message.success(msg);
this.$emit("addSuccess");
this.handleClose();
}
}
});
},
// 重置
handleReset() {
this.selectInfo = undefined;
this.$refs.form.resetFields();
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
......@@ -149,35 +149,35 @@ const options = {
},
],
},
// {
// path: "hall",
// name: "大厅管理",
// meta: {
// icon: "gateway",
// },
// component: () => import("@/pages/basicset/hall/Hall"),
// redirect: "/hall/hallmanage",
// children: [
// {
// path: "hallmanage",
// name: "",
// component: () =>
// import("@/pages/basicset/hall/hallmanage/HallManage.vue"),
// meta: {
// invisible: true,
// },
// },
// {
// path: "hallwindow",
// name: "大厅窗口管理",
// meta: {
// invisible: true,
// },
// component: () =>
// import("@/pages/basicset/hall/hallwindow/HallWindow.vue"),
// },
// ],
// },
{
path: "hall",
name: "大厅管理",
meta: {
icon: "gateway",
},
component: () => import("@/pages/basicset/hall/Hall"),
redirect: "/hall/hallmanage",
children: [
{
path: "hallmanage",
name: "",
component: () =>
import("@/pages/basicset/hall/hallmanage/HallManage.vue"),
meta: {
invisible: true,
},
},
{
path: "hallwindow",
name: "大厅窗口管理",
meta: {
invisible: true,
},
component: () =>
import("@/pages/basicset/hall/hallwindow/HallWindow.vue"),
},
],
},
{
path: "personnel",
name: "工作人员管理",
......
......@@ -352,6 +352,7 @@ module.exports = {
list: `${BASE_URL}/base/window/hall/list`,
info: `${BASE_URL}/base/window/hall/info`,
save: `${BASE_URL}/base/window/hall/save`,
batchSave: `${BASE_URL}/base/window/hall/batchSave`,
delete: `${BASE_URL}/base/window/hall/delete`,
},
};
......@@ -47,6 +47,10 @@ export async function addWindow(data) {
export async function delWindow(data) {
return request(window.delete, METHOD.GET, data);
}
// 获取差集窗口列表
export async function getSubHalllist(data) {
return request(window.subList, METHOD.POST, data);
}
/**
* 窗口业务
......
......@@ -46,6 +46,11 @@ export const saveWindowHall = (data) => {
return request(windowHall.save, METHOD.POST, data);
};
// 批量保存大厅窗口
export const batchSaveWindowHall = (data) => {
return request(windowHall.batchSave, METHOD.POST, data);
};
// 删除大厅窗口
export const delWindowHall = (data) => {
return request(windowHall.delete, METHOD.get, data);
......
......@@ -185,3 +185,9 @@ export function getCountImpossible(params) {
export function getImpossibleInfo(params) {
return http.get(`${BASEURL}/admin/impossible/impossibleInfo`, params);
}
/**
* AI效能监察异常行为数据报表
*/
export function getKqalert(params) {
return http.get(`${BASEURL}/admin/kqalert/list`, params);
}
\ No newline at end of file
......@@ -14,12 +14,12 @@
/>
<a-input
allowClear
v-model="searchName"
v-model="Query.workman_name"
placeholder="请输入工作人员姓名查询 "
>
<a-icon slot="prefix" type="search" />
</a-input>
<a-select default-value="001">
<a-select default-value="001" placeholder="请选择窗口">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
......@@ -31,24 +31,22 @@
<a-select-option value="001"> 窗口001 </a-select-option>
<a-select-option value="002"> 窗口002 </a-select-option>
</a-select>
<a-select default-value="001">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
:value="item.value"
<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.label }}
</a-select-option> -->
<a-select-option value="001"> 类型001 </a-select-option>
<a-select-option value="002"> 类型002 </a-select-option>
{{ item }}
</a-select-option>
</a-select>
<a-range-picker
format="YYYY年MM月DD日"
class="range_picker_style"
@change="rangePickerChange"
v-model="BegindAndEndTime"
v-model="Query.time"
>
</a-range-picker>
......@@ -71,7 +69,7 @@
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="operation" slot-scope="text, record, index">
<template slot="operation" slot-scope="text, record">
<a-button type="link" @click="openDetails"
>查看详情{{ record.id }}</a-button
>
......@@ -83,17 +81,33 @@
<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: "ID001",
value: "0",
},
],
tableHeaders: [
......@@ -107,48 +121,48 @@ export default {
},
{
title: "报警类型",
align: "center",
dataIndex: "报警类型",
dataIndex: "warn_alert",
customRender:(text, record)=>text?text:'--'
},
{
title: "发生窗口",
align: "center",
dataIndex: "发生窗口",
dataIndex: "window_name",
customRender:(text, record)=>text?text:'--'
},
{
title: "工作人员",
align: "center",
dataIndex: "工作人员",
dataIndex: "workman_name",
customRender:(text, record)=>text?text:'--'
},
{
title: "所属部门",
align: "center",
dataIndex: "所属部门",
dataIndex: "section_name",
customRender:(text, record)=>text?text:'--'
},
{
title: "手机号",
align: "center",
dataIndex: "手机号",
dataIndex: "workman_phone",
customRender:(text, record)=>text?text:'--'
},
{
title: "发生时间",
align: "center",
dataIndex: "发生时间",
dataIndex: "out_time",
customRender:(text, record)=>text?text:'--'
},
{
title: "时长",
align: "center",
dataIndex: "时长",
dataIndex: "duration",
customRender:(text, record)=>text?text:'--'
},
{
title: "是否准确",
align: "center",
dataIndex: "是否准确",
dataIndex: "isaccuracy",
customRender:(text, record)=>text?text:'--'
},
{
title: "是否处理",
align: "center",
dataIndex: "是否处理",
dataIndex: "have_process_name",
customRender:(text, record)=>text?text:'--'
},
{
title: "操作",
......@@ -165,23 +179,21 @@ export default {
},
components: {},
mounted() {
this.onGetKqalert()
this.setMoment();
for (let key = 0; key < 20; key++) {
this.tableSourceData.push({
id: `00${key + 1}`,
报警类型: `离岗${key + 1}`,
发生窗口: `001号窗口${key + 1}`,
工作人员: `刘德华${key + 1}`,
所属部门: `网络理政办${key + 1}`,
手机号: `13080888888${key + 1}`,
发生时间: `2022-07-03 18:00:00${key + 1}`,
时长: `15分32秒${key + 1}`,
是否准确: `准确${key + 1}`,
是否处理: `未处理${key + 1}`,
});
}
},
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("跳转网页");
},
......@@ -189,8 +201,11 @@ export default {
console.log(val);
},
checkboxonChange(val) {
console.log(val);
console.log(this.checkboxVALUE);
if(val.length == 0){
this.Query.have_process = ""
}else{
this.Query.have_process = "0"
}
},
QueueState(type) {
switch (type) {
......
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