Commit a17bbfba authored by 王晓旭's avatar 王晓旭
parents 646c1ac0 d35053f5
...@@ -77,7 +77,40 @@ ...@@ -77,7 +77,40 @@
<div class="department_right_add"> <div class="department_right_add">
<div class="department_manage">窗口管理</div> <div class="department_manage">窗口管理</div>
<div class="flex aic jcb pdr6"> <div class="flex aic jcb pdr6">
<a-space>
<a-button type="primary" @click="addModal">新增窗口</a-button> <a-button type="primary" @click="addModal">新增窗口</a-button>
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1">
<a-upload
name="file"
:multiple="false"
:action="api + 'base/window/importData'"
:showUploadList="false"
:headers="{
Authorization: token,
}"
@change="handleChange"
:data="{
siteId,
}"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
>
<div style="color: #1890ff">批量导入</div>
</a-upload>
</a-menu-item>
<a-menu-item key="2">
<a style="color: #1890ff" @click="handleDownload">
模板下载</a
>
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
更多操作 <a-icon type="down" />
</a-button>
</a-dropdown>
</a-space>
<a-input-search <a-input-search
placeholder="请输入窗口编号搜索" placeholder="请输入窗口编号搜索"
v-model="windowSearch" v-model="windowSearch"
...@@ -190,14 +223,23 @@ import adddepartment from "./components/adddepartment.vue"; ...@@ -190,14 +223,23 @@ import adddepartment from "./components/adddepartment.vue";
import addwindow from "./components/addwindow.vue"; import addwindow from "./components/addwindow.vue";
import addWindowBusiness from "./components/addWindowBusiness.vue"; import addWindowBusiness from "./components/addWindowBusiness.vue";
import local from "@/utils/local"; import local from "@/utils/local";
import { mapGetters } from "vuex";
import { import {
getDeptList, getDeptList,
delDept, delDept,
getWindowList, getWindowList,
delWindow, delWindow,
getWindowTemplate,
} from "@/services/dept"; } from "@/services/dept";
const columns = [ export default {
components: {
adddepartment,
addwindow,
addWindowBusiness,
},
data() {
const columns = [
{ {
title: "序号", title: "序号",
width: "6%", width: "6%",
...@@ -212,13 +254,17 @@ const columns = [ ...@@ -212,13 +254,17 @@ const columns = [
}, },
{ {
title: "编号", title: "编号",
dataIndex: "fromnum",
width: "10%", width: "10%",
customRender: (text) => {
return text.fromnum || "--";
},
}, },
{ {
title: "所属部门", title: "所属部门",
width: "10%", width: "10%",
dataIndex: "deptName", customRender: (text) => {
return text.deptName || "--";
},
}, },
{ {
title: "工作人员", title: "工作人员",
...@@ -261,16 +307,10 @@ const columns = [ ...@@ -261,16 +307,10 @@ const columns = [
customRender: "action", customRender: "action",
}, },
}, },
]; ];
export default {
components: {
adddepartment,
addwindow,
addWindowBusiness,
},
data() {
return { return {
spinning: false,
api: process.env.VUE_APP_API_BASE_URL + "/",
loading: false, loading: false,
deptLoading: false, deptLoading: false,
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE, simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
...@@ -342,6 +382,9 @@ export default { ...@@ -342,6 +382,9 @@ export default {
this.$route.meta.isBack = false; this.$route.meta.isBack = false;
} }
}, },
computed: {
...mapGetters("site", ["token"]),
},
created() {}, created() {},
methods: { methods: {
// 去掉空children // 去掉空children
...@@ -552,6 +595,35 @@ export default { ...@@ -552,6 +595,35 @@ export default {
}, },
}); });
}, },
// 批量导入窗口模板下载
async handleDownload() {
let res = await getWindowTemplate({}, { responseType: "blob" });
const blob = new Blob([res.data], {
type: "application/octet-stream",
});
let fileName = "批量导入窗口模板";
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.setAttribute("download", `${fileName}.xlsx`); // 设置下载文件名称
document.body.appendChild(link);
link.click();
document.body.appendChild(link);
},
// 导入窗口
handleChange({ file }) {
this.spinning = true;
if (file.status === "done") {
let { code, msg } = file.response;
if (code == 1) {
this.$message.success(msg);
this.getWindowListData();
} else {
this.$message.error(msg);
}
this.spinning = false;
}
},
}, },
}; };
</script> </script>
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <!-- <a-col :span="12">
<a-form-model-item label="所属窗口" prop="windowId"> <a-form-model-item label="所属窗口" prop="windowId">
<a-select <a-select
v-model="form.windowId" v-model="form.windowId"
...@@ -79,14 +79,14 @@ ...@@ -79,14 +79,14 @@
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col> -->
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="经办人Id" prop="operatorId"> <a-form-model-item label="经办人Id" prop="operatorId">
<a-input v-model="form.operatorId" placeholder="请输入经办人Id" /> <a-input v-model="form.operatorId" placeholder="请输入经办人Id" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="星级" prop="starlevel"> <a-form-model-item label="星级" prop="starlevel">
<a-select <a-select
...@@ -102,27 +102,27 @@ ...@@ -102,27 +102,27 @@
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="职务" prop="userpost"> <a-form-model-item label="职务" prop="userpost">
<a-input v-model="form.userpost" placeholder="请输入职务" /> <a-input v-model="form.userpost" placeholder="请输入职务" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="职称" prop="posttitle"> <a-form-model-item label="职称" prop="posttitle">
<a-input v-model="form.posttitle" placeholder="请输入职称" /> <a-input v-model="form.posttitle" placeholder="请输入职称" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="称号" prop="dangyuan"> <a-form-model-item label="政治面貌" prop="politicalstatus">
<a-select <a-select
allowClear allowClear
v-model="form.dangyuan" v-model="form.politicalstatus"
placeholder="请选择称号" placeholder="请选择政治面貌"
> >
<a-select-option <a-select-option
v-for="(value, key) in designationDict" v-for="(value, key) in politicalDict"
:key="key" :key="key"
:value="Number(key)" :value="Number(key)"
>{{ value }}</a-select-option >{{ value }}</a-select-option
...@@ -130,15 +130,17 @@ ...@@ -130,15 +130,17 @@
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="政治面貌" prop="politicalstatus"> <a-form-model-item label="称号" prop="dangyuan">
<a-select <a-select
allowClear allowClear
v-model="form.politicalstatus" v-model="form.dangyuan"
placeholder="请选择政治面貌" placeholder="请选择称号"
> >
<a-select-option <a-select-option
v-for="(value, key) in politicalDict" v-for="(value, key) in designationDict"
:key="key" :key="key"
:value="Number(key)" :value="Number(key)"
>{{ value }}</a-select-option >{{ value }}</a-select-option
...@@ -151,11 +153,6 @@ ...@@ -151,11 +153,6 @@
<a-input v-model="form.phone" placeholder="请输入电话" /> <a-input v-model="form.phone" placeholder="请输入电话" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12">
<a-form-model-item label="手机" prop="mobile">
<a-input v-model="form.mobile" placeholder="请输入手机" />
</a-form-model-item>
</a-col>
</a-row> </a-row>
<a-row v-if="form.dangyuan === 99"> <a-row v-if="form.dangyuan === 99">
<!-- <a-col :span="12"> </a-col> --> <!-- <a-col :span="12"> </a-col> -->
...@@ -166,6 +163,11 @@ ...@@ -166,6 +163,11 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">
<a-form-model-item label="手机" prop="mobile">
<a-input v-model="form.mobile" placeholder="请输入手机" />
</a-form-model-item>
</a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="身份证" prop="idCard"> <a-form-model-item label="身份证" prop="idCard">
<a-input v-model="form.idCard" placeholder="请输入身份证号码" /> <a-input v-model="form.idCard" placeholder="请输入身份证号码" />
...@@ -494,15 +496,15 @@ export default { ...@@ -494,15 +496,15 @@ export default {
// 部门选择 // 部门选择
async handleDeptSelect(val, node) { async handleDeptSelect(val, node) {
this.form.windowId = undefined; // this.form.windowId = undefined;
this.form.windowName = ""; // this.form.windowName = "";
if (val) { if (val) {
let { text } = node.componentOptions.children[0]; let { text } = node.componentOptions.children[0];
this.form.deptName = text; this.form.deptName = text;
this.windowData = await this.getWindowList(val); // this.windowData = await this.getWindowList(val);
} else { } else {
this.form.deptName = ""; this.form.deptName = "";
this.windowData = []; // this.windowData = [];
} }
}, },
//编辑获取窗口 //编辑获取窗口
...@@ -535,7 +537,7 @@ export default { ...@@ -535,7 +537,7 @@ export default {
}, },
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
this.editWindow(data.deptId); // this.editWindow(data.deptId);
this.form = { ...data }; this.form = { ...data };
this.form.loginName && this.$delete(this.form, "loginName"); this.form.loginName && this.$delete(this.form, "loginName");
this.form.loginPwd && this.$delete(this.form, "loginPwd"); this.form.loginPwd && this.$delete(this.form, "loginPwd");
...@@ -554,15 +556,16 @@ export default { ...@@ -554,15 +556,16 @@ export default {
}, },
// 关闭对话框 // 关闭对话框
handleClose() { handleClose() {
this.$refs.formData.resetFields();
this.fileList = [];
this.loading = false; this.loading = false;
this.Visible = false; this.Visible = false;
this.form.windowName = ""; // this.windowData = [];
this.fileList = []; // this.form.windowName = "";
this.$refs.formData.resetFields();
}, },
// 重置 // 重置
handleReset() { handleReset() {
this.form.windowName = ""; // this.form.windowName = "";
this.$refs.formData.resetFields(); this.$refs.formData.resetFields();
}, },
// 照片上传 // 照片上传
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <!-- <a-col :span="12">
<a-form-model-item label="所属窗口" prop="windowId"> <a-form-model-item label="所属窗口" prop="windowId">
<a-select <a-select
v-model="form.windowId" v-model="form.windowId"
...@@ -79,14 +79,14 @@ ...@@ -79,14 +79,14 @@
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col> -->
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="经办人Id" prop="operatorId"> <a-form-model-item label="经办人Id" prop="operatorId">
<a-input v-model="form.operatorId" placeholder="请输入经办人Id" /> <a-input v-model="form.operatorId" placeholder="请输入经办人Id" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="星级" prop="starlevel"> <a-form-model-item label="星级" prop="starlevel">
<a-select <a-select
...@@ -102,27 +102,27 @@ ...@@ -102,27 +102,27 @@
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="职务" prop="userpost"> <a-form-model-item label="职务" prop="userpost">
<a-input v-model="form.userpost" placeholder="请输入职务" /> <a-input v-model="form.userpost" placeholder="请输入职务" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="职称" prop="posttitle"> <a-form-model-item label="职称" prop="posttitle">
<a-input v-model="form.posttitle" placeholder="请输入职称" /> <a-input v-model="form.posttitle" placeholder="请输入职称" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="称号" prop="dangyuan"> <a-form-model-item label="政治面貌" prop="politicalstatus">
<a-select <a-select
allowClear allowClear
v-model="form.dangyuan" v-model="form.politicalstatus"
placeholder="请选择称号" placeholder="请选择政治面貌"
> >
<a-select-option <a-select-option
v-for="(value, key) in designationDict" v-for="(value, key) in politicalDict"
:key="key" :key="key"
:value="Number(key)" :value="Number(key)"
>{{ value }}</a-select-option >{{ value }}</a-select-option
...@@ -130,15 +130,17 @@ ...@@ -130,15 +130,17 @@
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row>
<a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="政治面貌" prop="politicalstatus"> <a-form-model-item label="称号" prop="dangyuan">
<a-select <a-select
allowClear allowClear
v-model="form.politicalstatus" v-model="form.dangyuan"
placeholder="请选择政治面貌" placeholder="请选择称号"
> >
<a-select-option <a-select-option
v-for="(value, key) in politicalDict" v-for="(value, key) in designationDict"
:key="key" :key="key"
:value="Number(key)" :value="Number(key)"
>{{ value }}</a-select-option >{{ value }}</a-select-option
...@@ -151,11 +153,6 @@ ...@@ -151,11 +153,6 @@
<a-input v-model="form.phone" placeholder="请输入电话" /> <a-input v-model="form.phone" placeholder="请输入电话" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12">
<a-form-model-item label="手机" prop="mobile">
<a-input v-model="form.mobile" placeholder="请输入手机" />
</a-form-model-item>
</a-col>
</a-row> </a-row>
<a-row v-if="form.dangyuan === 99"> <a-row v-if="form.dangyuan === 99">
<!-- <a-col :span="12"> </a-col> --> <!-- <a-col :span="12"> </a-col> -->
...@@ -166,6 +163,11 @@ ...@@ -166,6 +163,11 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="12">
<a-form-model-item label="手机" prop="mobile">
<a-input v-model="form.mobile" placeholder="请输入手机" />
</a-form-model-item>
</a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="身份证" prop="idCard"> <a-form-model-item label="身份证" prop="idCard">
<a-input v-model="form.idCard" placeholder="请输入身份证号码" /> <a-input v-model="form.idCard" placeholder="请输入身份证号码" />
...@@ -528,15 +530,15 @@ export default { ...@@ -528,15 +530,15 @@ export default {
}, },
// 部门选择 // 部门选择
async handleDeptSelect(val, node) { async handleDeptSelect(val, node) {
this.form.windowId = undefined; // this.form.windowId = undefined;
this.form.windowName = ""; // this.form.windowName = "";
if (val) { if (val) {
let { text } = node.componentOptions.children[0]; let { text } = node.componentOptions.children[0];
this.form.deptName = text; this.form.deptName = text;
this.windowData = await this.getWindowList(val); // this.windowData = await this.getWindowList(val);
} else { } else {
this.form.deptName = ""; this.form.deptName = "";
this.windowData = []; // this.windowData = [];
} }
}, },
//编辑获取窗口 //编辑获取窗口
...@@ -572,7 +574,7 @@ export default { ...@@ -572,7 +574,7 @@ export default {
}, },
// 重置 // 重置
handleReset() { handleReset() {
this.form.windowName = ""; // this.form.windowName = "";
this.$refs.formData.resetFields(); this.$refs.formData.resetFields();
}, },
// 新增 // 新增
...@@ -583,7 +585,7 @@ export default { ...@@ -583,7 +585,7 @@ export default {
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
this.form = { ...data }; this.form = { ...data };
this.editWindow(data.deptId); // this.editWindow(data.deptId);
if (this.form.photoPath) { if (this.form.photoPath) {
this.fileList = [ this.fileList = [
{ {
...@@ -599,9 +601,9 @@ export default { ...@@ -599,9 +601,9 @@ export default {
// 关闭对话框 // 关闭对话框
handleClose() { handleClose() {
// this.$refs.formData.resetFields(); // this.$refs.formData.resetFields();
this.windowData = []; // this.windowData = [];
this.fileList = []; this.fileList = [];
this.form.windowName = ""; // this.form.windowName = "";
this.loading = false; this.loading = false;
this.Visible = false; this.Visible = false;
}, },
......
...@@ -136,7 +136,9 @@ ...@@ -136,7 +136,9 @@
:multiple="false" :multiple="false"
:action="api + 'base/workman/importData'" :action="api + 'base/workman/importData'"
:showUploadList="false" :showUploadList="false"
:headers="headers" :headers="{
Authorization: token,
}"
@change="handleChange" @change="handleChange"
:data="{ :data="{
siteId, siteId,
...@@ -160,7 +162,9 @@ ...@@ -160,7 +162,9 @@
:multiple="false" :multiple="false"
:action="api + 'base/file/commonupload'" :action="api + 'base/file/commonupload'"
:showUploadList="false" :showUploadList="false"
:headers="headers" :headers="{
Authorization: token,
}"
@change="handleChangeImg" @change="handleChangeImg"
accept="application/x-zip-compressed" accept="application/x-zip-compressed"
> >
...@@ -242,9 +246,9 @@ ...@@ -242,9 +246,9 @@
{{ text.createTime | dateFormat }} {{ text.createTime | dateFormat }}
</template> </template>
<!-- 最后登录时间 --> <!-- 最后登录时间 -->
<template slot="logintime" slot-scope="text"> <template slot="lastLoginTime" slot-scope="text">
<span v-if="text.logintime">{{ <span v-if="text.lastLoginTime">{{
text.logintime | dateFormat text.lastLoginTime | dateFormat
}}</span> }}</span>
<span v-else>--</span> <span v-else>--</span>
</template> </template>
...@@ -296,6 +300,7 @@ import EditPersonel from "./components/EditPersonel.vue"; ...@@ -296,6 +300,7 @@ import EditPersonel from "./components/EditPersonel.vue";
import local from "@/utils/local"; import local from "@/utils/local";
import { Empty } from "ant-design-vue"; import { Empty } from "ant-design-vue";
import { pageSizeOptions } from "@/config/pageConfig.js"; import { pageSizeOptions } from "@/config/pageConfig.js";
import { mapGetters } from "vuex";
// import axios from "axios"; // import axios from "axios";
import { import {
getDeptList, getDeptList,
...@@ -364,7 +369,7 @@ const columns = [ ...@@ -364,7 +369,7 @@ const columns = [
{ {
title: "最后登录时间", title: "最后登录时间",
scopedSlots: { scopedSlots: {
customRender: "logintime", customRender: "lastLoginTime",
}, },
}, },
...@@ -384,9 +389,6 @@ export default { ...@@ -384,9 +389,6 @@ export default {
}, },
data() { data() {
return { return {
headers: {
Authorization: local.getLocal("token"),
},
spinning: false, spinning: false,
columns, columns,
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE, simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
...@@ -413,6 +415,9 @@ export default { ...@@ -413,6 +415,9 @@ export default {
curWindow: "", // 当前选中窗口 curWindow: "", // 当前选中窗口
}; };
}, },
computed: {
...mapGetters("site", ["token"]),
},
created() { created() {
this.getDeptList(); this.getDeptList();
this.getWindowData(); this.getWindowData();
......
...@@ -158,7 +158,8 @@ module.exports = { ...@@ -158,7 +158,8 @@ module.exports = {
info: `${BASE_URL}/base/window/info`, info: `${BASE_URL}/base/window/info`,
save: `${BASE_URL}/base/window/save`, save: `${BASE_URL}/base/window/save`,
delete: `${BASE_URL}/base/window/delete`, delete: `${BASE_URL}/base/window/delete`,
exportExcel: `${BASE_URL}/base/window/exportExcel`, template: `${BASE_URL}/base/window/downloadTemplate`, // 导入模板下载
importData: `${BASE_URL}/base/window/importData`,
subList: `${BASE_URL}/base/window/subHalllist`, // 查询当前站点所有没有在大厅配置的过的窗口 subList: `${BASE_URL}/base/window/subHalllist`, // 查询当前站点所有没有在大厅配置的过的窗口
}, },
// 工作人员 // 工作人员
......
...@@ -51,6 +51,14 @@ export async function delWindow(data) { ...@@ -51,6 +51,14 @@ export async function delWindow(data) {
export async function getSubHalllist(data) { export async function getSubHalllist(data) {
return request(window.subList, METHOD.POST, data); return request(window.subList, METHOD.POST, data);
} }
// 批量导入窗口模板下载
export async function getWindowTemplate(data, config) {
return request(window.template, METHOD.POST, data, config);
}
// 批量导入窗口
export async function importWindowData(data) {
return request(window.importData, METHOD.POST, data);
}
/** /**
* 窗口业务 * 窗口业务
......
...@@ -149,14 +149,6 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -149,14 +149,6 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
deptEntity.setCreateUserId(1L); deptEntity.setCreateUserId(1L);
deptService.save(deptEntity, context); deptService.save(deptEntity, context);
} }
/* else {
//更新
deptEntity.setName(deptName);
deptEntity.setSource(SourceEnum.政务网.getValue());
deptEntity.setUpdateTime(new Date());
deptEntity.setUpdateUserId(1L);
deptService.update(deptEntity, context);
}*/
sortN++; sortN++;
} }
} else { } else {
......
...@@ -185,6 +185,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -185,6 +185,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
@Override @Override
protected void saveAfter(SiteEntity entity, Context context) throws AppException { protected void saveAfter(SiteEntity entity, Context context) throws AppException {
super.saveAfter(entity, context);
//刷新站点树 //刷新站点树
//ThreadPool.getInstance().execute(new SyncTreeSiteThread(this,context)); //ThreadPool.getInstance().execute(new SyncTreeSiteThread(this,context));
Rest<String> rest = userFeign.synchSiteAuth(); Rest<String> rest = userFeign.synchSiteAuth();
...@@ -200,7 +201,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -200,7 +201,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
//更新同步部门相关 //更新同步部门相关
deptService.syncDeptBySiteId(entity, context); deptService.syncDeptBySiteId(entity, context);
log.info("站点更新4"); log.info("站点更新4");
super.saveAfter(entity, context);
} }
...@@ -324,6 +325,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -324,6 +325,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
@Override @Override
protected void updateAfter(SiteEntity entity, Context context) throws AppException { protected void updateAfter(SiteEntity entity, Context context) throws AppException {
super.updateAfter(entity,context);
//刷新站点树 //刷新站点树
log.info("update1"); log.info("update1");
Rest<String> rest = userFeign.synchSiteAuth(); Rest<String> rest = userFeign.synchSiteAuth();
......
...@@ -45,17 +45,17 @@ public class WindowEntity extends WindowVo { ...@@ -45,17 +45,17 @@ public class WindowEntity extends WindowVo {
/** /**
* 区域 * 区域
*/ */
@Excel(name = "用户名") @Excel(name = "区域")
private String region; private String region;
/** /**
* 英语区域 * 英语区域
*/ */
@Excel(name = "用户名") @Excel(name = "英语区域")
private String englishRegion; private String englishRegion;
/** /**
* 窗口编号 * 窗口编号
*/ */
@Excel(name = "用户名") @Excel(name = "窗口编号")
private String fromnum; private String fromnum;
/** /**
* 红旗窗口 (1.是,0.否) * 红旗窗口 (1.是,0.否)
......
...@@ -69,13 +69,9 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W ...@@ -69,13 +69,9 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
Map<Long, List<WorkmanEntity>> workmanCollect = workmanService.find(new WorkmanQuery()).stream().filter(f -> f.getWindowId() != null).collect(Collectors.groupingBy(x -> x.getWindowId())); Map<Long, List<WorkmanEntity>> workmanCollect = workmanService.find(new WorkmanQuery()).stream().filter(f -> f.getWindowId() != null).collect(Collectors.groupingBy(x -> x.getWindowId()));
Map<Long, List<WindowBusinessEntity>> windowBusinessCollect = windowBusinessService.find(new WindowBusinessQuery()) Map<Long, List<WindowBusinessEntity>> windowBusinessCollect = windowBusinessService.find(new WindowBusinessQuery())
.stream().filter(f -> f.getWindowId() != null).collect(Collectors.groupingBy(x -> x.getWindowId())); .stream().filter(f -> f.getWindowId() != null).collect(Collectors.groupingBy(x -> x.getWindowId()));
Map<Long, List<WindowMatterEntity>> windowMatterCollect = windowMatterService.find(new WindowMatterQuery()) Map<Long, List<WindowMatterEntity>> windowMatterCollect = windowMatterService.find(new WindowMatterQuery())
.stream().filter(f -> f.getWindowId() != null).collect(Collectors.groupingBy(x -> x.getWindowId())); .stream().filter(f -> f.getWindowId() != null).collect(Collectors.groupingBy(x -> x.getWindowId()));
Map<Long, WindowHallEntity> windowHallMap = windowHallService.find(new WindowHallQuery()).parallelStream().collect(Collectors.toMap(x -> x.getWindowId(), y -> y, (o, n) -> n)); Map<Long, WindowHallEntity> windowHallMap = windowHallService.find(new WindowHallQuery()).parallelStream().collect(Collectors.toMap(x -> x.getWindowId(), y -> y, (o, n) -> n));
list.stream().peek(item -> { list.stream().peek(item -> {
if (!ObjectUtils.isEmpty(workmanCollect.get(item.getId()))) { if (!ObjectUtils.isEmpty(workmanCollect.get(item.getId()))) {
item.setWorkmanList(workmanCollect.get(item.getId())); item.setWorkmanList(workmanCollect.get(item.getId()));
...@@ -83,7 +79,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W ...@@ -83,7 +79,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
if (!ObjectUtils.isEmpty(windowBusinessCollect.get(item.getId()))) { if (!ObjectUtils.isEmpty(windowBusinessCollect.get(item.getId()))) {
item.setWindowBusinessList(windowBusinessCollect.get(item.getId())); item.setWindowBusinessList(windowBusinessCollect.get(item.getId()));
} }
if (!ObjectUtils.isEmpty(windowMatterCollect.get(item.getId()))) { if (!ObjectUtils.isEmpty(windowMatterCollect.get(item.getId()))) {
item.setWindowMatterList(windowMatterCollect.get(item.getId())); item.setWindowMatterList(windowMatterCollect.get(item.getId()));
} }
...@@ -92,7 +87,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W ...@@ -92,7 +87,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
item.setHallId(windowHallEntity.getHallId()); item.setHallId(windowHallEntity.getHallId());
item.setHallName(windowHallEntity.getHallName()); item.setHallName(windowHallEntity.getHallName());
} }
}).count(); }).count();
super.findAfter(params, pageInfo, context, list); super.findAfter(params, pageInfo, context, list);
} }
...@@ -109,7 +103,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W ...@@ -109,7 +103,6 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
} }
WindowBusinessQuery windowBusinessQuery = new WindowBusinessQuery(); WindowBusinessQuery windowBusinessQuery = new WindowBusinessQuery();
//windowBusinessQuery.setSiteBusinessIdList(businessIdList); //windowBusinessQuery.setSiteBusinessIdList(businessIdList);
//先删除后再新增 //先删除后再新增
windowBusinessQuery.setWindowId(windowId); windowBusinessQuery.setWindowId(windowId);
Long[] ids = windowBusinessService.find(windowBusinessQuery).stream() Long[] ids = windowBusinessService.find(windowBusinessQuery).stream()
...@@ -215,6 +208,13 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W ...@@ -215,6 +208,13 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
@Override @Override
protected void saveAfter(WindowEntity entity, Context context) throws AppException { protected void saveAfter(WindowEntity entity, Context context) throws AppException {
super.saveAfter(entity, context); super.saveAfter(entity, context);
//判断是否存在id,如果不存在 查询后获取
if(entity.newEntity()){
WindowEntity windowEntity = this.selectOne(new WindowQuery().siteId(entity.getSiteId()).fromnum(entity.getFromnum()));
if(!ObjectUtils.isEmpty(windowEntity)){
entity.setId(windowEntity.getId());
}
}
pushChangeMsg(entity.getId()); pushChangeMsg(entity.getId());
} }
......
...@@ -167,10 +167,8 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe ...@@ -167,10 +167,8 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
*/ */
@Override @Override
public void doImportDataBefore(List<WindowEntity> list, boolean updateSupport, Context context) throws AppException { public void doImportDataBefore(List<WindowEntity> list, boolean updateSupport, Context context) throws AppException {
String siteId = request.getParameter("siteId"); String siteId = request.getParameter("siteId");
String deptId = request.getParameter("deptId"); String deptId = request.getParameter("deptId");
log.info("siteId:{}", siteId);
SiteEntity siteEntity = null; SiteEntity siteEntity = null;
DeptEntity deptEntity = null; DeptEntity deptEntity = null;
if (!ObjectUtils.isEmpty(siteId)) { if (!ObjectUtils.isEmpty(siteId)) {
......
...@@ -9,32 +9,18 @@ import com.mortals.framework.annotation.UnAuth; ...@@ -9,32 +9,18 @@ import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.FileUtil; import com.mortals.framework.util.FileUtil;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.framework.web.BasePhpCRUDJsonMappingController;
import com.mortals.xhx.base.framework.annotation.Operlog;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.role.model.RoleQuery;
import com.mortals.xhx.base.system.role.model.RoleUserEntity;
import com.mortals.xhx.base.system.role.model.RoleUserQuery;
import com.mortals.xhx.base.system.role.service.RoleService;
import com.mortals.xhx.base.system.role.service.RoleUserService;
import com.mortals.xhx.base.system.upload.service.UploadService; import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.OnlineEnum; import com.mortals.xhx.common.code.OnlineEnum;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.model.model.ModelQuery;
import com.mortals.xhx.module.model.service.ModelService;
import com.mortals.xhx.module.site.model.SiteEntity; import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.service.SiteService; import com.mortals.xhx.module.site.service.SiteService;
import com.mortals.xhx.module.window.model.WindowEntity; import com.mortals.xhx.module.window.model.WindowEntity;
import com.mortals.xhx.module.window.service.WindowService; import com.mortals.xhx.module.window.service.WindowService;
import com.mortals.xhx.module.workman.model.WorkmanEntity; import com.mortals.xhx.module.workman.model.WorkmanEntity;
import com.mortals.xhx.module.workman.model.WorkmanQuery;
import com.mortals.xhx.module.workman.service.WorkmanService; import com.mortals.xhx.module.workman.service.WorkmanService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -45,7 +31,6 @@ import java.io.IOException; ...@@ -45,7 +31,6 @@ import java.io.IOException;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* 工作人员 * 工作人员
...@@ -107,6 +92,13 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman ...@@ -107,6 +92,13 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
WorkmanEntity workmanEntity = this.service.doLogin(query.getLoginName(), query.getLoginPwd(), ip); WorkmanEntity workmanEntity = this.service.doLogin(query.getLoginName(), query.getLoginPwd(), ip);
workmanEntity.setLastLoginAddress(ip); workmanEntity.setLastLoginAddress(ip);
workmanEntity.setLastLoginTime(new Date()); workmanEntity.setLastLoginTime(new Date());
if(query.getWindowId()!=null) {
workmanEntity.setWindowId(query.getWindowId());
WindowEntity windowEntity = windowService.get(query.getWindowId());
if(windowEntity!=null){
workmanEntity.setWindowName(windowEntity.getName());
}
}
this.service.getDao().update(workmanEntity); this.service.getDao().update(workmanEntity);
if (query.getSiteId() != workmanEntity.getSiteId()) { if (query.getSiteId() != workmanEntity.getSiteId()) {
throw new AppException("当前工作人员不在当前站点下!"); throw new AppException("当前工作人员不在当前站点下!");
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<div> <div>
<a-button <a-button
:loading="btnLoading" :loading="btnLoading"
type="primary" class="addclass" type="primary"
class="addclass"
@click="handleExportTable" @click="handleExportTable"
> >
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
...@@ -28,7 +29,11 @@ ...@@ -28,7 +29,11 @@
v-model="searchForm.time" v-model="searchForm.time"
> >
</a-range-picker> </a-range-picker>
<a-select v-model="searchForm.sectionid" showSearch :option-filter-prop="'label'"> <a-select
v-model="searchForm.sectionid"
showSearch
:option-filter-prop="'label'"
>
<a-select-option value="" label="全部"> 全部部门 </a-select-option> <a-select-option value="" label="全部"> 全部部门 </a-select-option>
<a-select-option <a-select-option
v-for="(v, key) in depList" v-for="(v, key) in depList"
...@@ -43,14 +48,15 @@ ...@@ -43,14 +48,15 @@
<a-select-option value=""> 全部 </a-select-option> <a-select-option value=""> 全部 </a-select-option>
<a-select-option <a-select-option
v-for="(v, key) in statusItem" v-for="(v, key) in statusItem"
:key="key" :key="key"
:value="Number(key)" :value="Number(key)"
> >
{{ v }} {{ v }}
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-button type="primary" class="addclass" @click="handleSearch">搜索</a-button> <a-button type="primary" class="addclass" @click="handleSearch"
>搜索</a-button
>
<a-button @click="handleReset">重置</a-button> <a-button @click="handleReset">重置</a-button>
</a-space> </a-space>
</span> </span>
...@@ -91,28 +97,28 @@ ...@@ -91,28 +97,28 @@
v-if="text.status == 0" v-if="text.status == 0"
color="#108ee9" color="#108ee9"
> >
{{statusItem[text.status]}} {{ statusItem[text.status] }}
</a-tag> </a-tag>
<a-tag <a-tag
@click="openDetails(text.id)" @click="openDetails(text.id)"
v-else-if="text.status == 1" v-else-if="text.status == 1"
color="#2db7f5" color="#2db7f5"
> >
{{statusItem[text.status]}} {{ statusItem[text.status] }}
</a-tag> </a-tag>
<a-tag <a-tag
@click="openDetails(text.id)" @click="openDetails(text.id)"
v-else-if="text.status == 2" v-else-if="text.status == 2"
color="#f50" color="#f50"
> >
{{statusItem[text.status]}} {{ statusItem[text.status] }}
</a-tag> </a-tag>
<a-tag <a-tag
@click="openDetails(text.id)" @click="openDetails(text.id)"
v-else-if="text.status == 3" v-else-if="text.status == 3"
color="red" color="red"
> >
{{statusItem[text.status]}} {{ statusItem[text.status] }}
</a-tag> </a-tag>
</template> </template>
</a-table> </a-table>
...@@ -121,7 +127,7 @@ ...@@ -121,7 +127,7 @@
</template> </template>
<script> <script>
import { getOrderList,getDeptList } from "@/api/dataAdmin"; import { getOrderList, getDeptList } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel"; import { export2Excel } from "@/utils/js/exportExcel";
let tHeader = [ let tHeader = [
// 导出的表头名信息 // 导出的表头名信息
...@@ -162,7 +168,7 @@ const style = { ...@@ -162,7 +168,7 @@ const style = {
2: "办理中", 2: "办理中",
3: "办理中", 3: "办理中",
4: "办理完成", 4: "办理完成",
} };
export default { export default {
name: "PortalAdminVueMakeRecordReport", name: "PortalAdminVueMakeRecordReport",
data() { data() {
...@@ -206,17 +212,31 @@ export default { ...@@ -206,17 +212,31 @@ export default {
title: "办理地点", title: "办理地点",
align: "center", align: "center",
dataIndex: "address", dataIndex: "address",
customRender: (text, row) => {
return row.address || "--";
},
}, },
{ {
title: "预约编号", title: "预约编号",
align: "center", align: "center",
dataIndex: "number", dataIndex: "number",
customRender: (text,row) => {
return row.number || "--";
},
},
{
title: "排号编码",
align: "center",
dataIndex: "flownum",
customRender: (text,row) => {
return row.flownum || "--";
},
}, },
{ {
title: "预约时间", title: "预约时间",
align: "center", align: "center",
dataIndex: "starttime", dataIndex: "starttime",
customRender: (text,row) => { customRender: (text, row) => {
return `${row.starttime}-${row.endtime}` || "--"; return `${row.starttime}-${row.endtime}` || "--";
}, },
}, },
...@@ -230,8 +250,8 @@ export default { ...@@ -230,8 +250,8 @@ export default {
{ {
title: "取消时间", title: "取消时间",
align: "center", align: "center",
customRender: (text) => { customRender: (text,row) => {
return text.canceltime || "--"; return row.canceltime || "--";
}, },
}, },
{ {
...@@ -271,7 +291,7 @@ export default { ...@@ -271,7 +291,7 @@ export default {
searchForm: { searchForm: {
status: "", status: "",
title: "", title: "",
sectionid:"", sectionid: "",
time: [ time: [
this.$moment(new Date()).format("YYYY-MM-DD"), this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"), this.$moment(new Date()).format("YYYY-MM-DD"),
...@@ -284,22 +304,22 @@ export default { ...@@ -284,22 +304,22 @@ export default {
tableSelectedKeys: [], tableSelectedKeys: [],
tableSelectedRows: [], tableSelectedRows: [],
tableSourceData: [], tableSourceData: [],
depList:[]//部门列表 depList: [], //部门列表
}; };
}, },
created() { created() {
this.getOrderList(); this.getOrderList();
this.getDeptList() this.getDeptList();
}, },
methods: { methods: {
// 部门列表 // 部门列表
getDeptList(){ getDeptList() {
getDeptList({page:1,size:-1}).then(res=>{ getDeptList({ page: 1, size: -1 }).then((res) => {
const {data} = res.data const { data } = res.data;
if(res.code == 1){ if (res.code == 1) {
this.depList = data this.depList = data;
} }
}) });
}, },
// 获取报表数据 // 获取报表数据
async getOrderList(search = {}) { async getOrderList(search = {}) {
...@@ -388,7 +408,10 @@ export default { ...@@ -388,7 +408,10 @@ export default {
for (let item of data) { for (let item of data) {
Object.keys(this.statusItem).forEach((key) => { Object.keys(this.statusItem).forEach((key) => {
if (item.status == key) { if (item.status == key) {
item.status = item.status==1?this.style[item.style]:this.statusItem[key]; item.status =
item.status == 1
? this.style[item.style]
: this.statusItem[key];
} }
}); });
} }
...@@ -400,7 +423,10 @@ export default { ...@@ -400,7 +423,10 @@ export default {
for (let item of data) { for (let item of data) {
Object.keys(this.statusItem).forEach((key) => { Object.keys(this.statusItem).forEach((key) => {
if (item.status == key) { if (item.status == key) {
item.status = item.status==1?this.style[item.style]:this.statusItem[key]; item.status =
item.status == 1
? this.style[item.style]
: this.statusItem[key];
} }
}); });
} }
...@@ -425,5 +451,3 @@ export default { ...@@ -425,5 +451,3 @@ export default {
cursor: pointer; cursor: pointer;
} }
</style> </style>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</div> </div>
<div class="description_box" slot="description"> <div class="description_box" slot="description">
<div class="details"> <div class="details">
<span><i class="lable">办理窗口:</i>{{ dataList.window_name || "--" }}</span> <span><i class="lable">办理窗口:</i>{{ dataList.window_name + '-' + dataList.window_fromnum || "--" }}</span>
<span><i class="lable">办理开始时间:</i>{{ dataList.calltime || "--" }}</span> <span><i class="lable">办理开始时间:</i>{{ dataList.calltime || "--" }}</span>
<span><i class="lable">工作人员:</i>{{ dataList.workman_name || "--" }}</span> <span><i class="lable">工作人员:</i>{{ dataList.workman_name || "--" }}</span>
<span><i class="lable">叫号设备:</i>{{ dataList.call_name || "--" }}</span> <span><i class="lable">叫号设备:</i>{{ dataList.call_name || "--" }}</span>
......
...@@ -317,8 +317,8 @@ export default { ...@@ -317,8 +317,8 @@ export default {
style: "", // 状态 style: "", // 状态
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间 time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码 flownum: "", // 排号编码
hallid:"", hallid: "",
sectionid:"" sectionid: ""
}, },
//状态 //状态
style: [ style: [
...@@ -345,9 +345,9 @@ export default { ...@@ -345,9 +345,9 @@ export default {
tableSelectedKeys: [], tableSelectedKeys: [],
tableSelectedRows: [], tableSelectedRows: [],
// 大厅列表 // 大厅列表
datingList:[], datingList: [],
// 部门列表 // 部门列表
bumenList:[], bumenList: [],
}; };
}, },
components: { components: {
......
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