Commit 36919f4f authored by 王启林's avatar 王启林
parents 54996eef b07298a3
......@@ -77,7 +77,40 @@
<div class="department_right_add">
<div class="department_manage">窗口管理</div>
<div class="flex aic jcb pdr6">
<a-button type="primary" @click="addModal">新增窗口</a-button>
<a-space>
<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
placeholder="请输入窗口编号搜索"
v-model="windowSearch"
......@@ -190,79 +223,15 @@ import adddepartment from "./components/adddepartment.vue";
import addwindow from "./components/addwindow.vue";
import addWindowBusiness from "./components/addWindowBusiness.vue";
import local from "@/utils/local";
import { mapGetters } from "vuex";
import {
getDeptList,
delDept,
getWindowList,
delWindow,
getWindowTemplate,
} from "@/services/dept";
const columns = [
{
title: "序号",
width: "6%",
scopedSlots: {
customRender: "number",
},
},
{
title: "窗口名称",
dataIndex: "name",
width: "10%",
},
{
title: "编号",
dataIndex: "fromnum",
width: "10%",
},
{
title: "所属部门",
width: "10%",
dataIndex: "deptName",
},
{
title: "工作人员",
width: "10%",
scopedSlots: {
customRender: "workmanList",
},
},
{
title: "所属楼栋",
width: "6%",
scopedSlots: {
customRender: "building",
},
},
{
title: "所属楼层",
width: "6%",
scopedSlots: {
customRender: "level",
},
},
{
title: "备注",
ellipsis: true,
scopedSlots: {
customRender: "summary",
},
},
{
title: "创建时间",
scopedSlots: {
customRender: "createTime",
},
},
{
title: "操作",
width: "100px",
scopedSlots: {
customRender: "action",
},
},
];
export default {
components: {
adddepartment,
......@@ -270,7 +239,78 @@ export default {
addWindowBusiness,
},
data() {
const columns = [
{
title: "序号",
width: "6%",
scopedSlots: {
customRender: "number",
},
},
{
title: "窗口名称",
dataIndex: "name",
width: "10%",
},
{
title: "编号",
width: "10%",
customRender: (text) => {
return text.fromnum || "--";
},
},
{
title: "所属部门",
width: "10%",
customRender: (text) => {
return text.deptName || "--";
},
},
{
title: "工作人员",
width: "10%",
scopedSlots: {
customRender: "workmanList",
},
},
{
title: "所属楼栋",
width: "6%",
scopedSlots: {
customRender: "building",
},
},
{
title: "所属楼层",
width: "6%",
scopedSlots: {
customRender: "level",
},
},
{
title: "备注",
ellipsis: true,
scopedSlots: {
customRender: "summary",
},
},
{
title: "创建时间",
scopedSlots: {
customRender: "createTime",
},
},
{
title: "操作",
width: "100px",
scopedSlots: {
customRender: "action",
},
},
];
return {
spinning: false,
api: process.env.VUE_APP_API_BASE_URL + "/",
loading: false,
deptLoading: false,
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
......@@ -342,6 +382,9 @@ export default {
this.$route.meta.isBack = false;
}
},
computed: {
...mapGetters("site", ["token"]),
},
created() {},
methods: {
// 去掉空children
......@@ -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>
......
......@@ -56,7 +56,7 @@
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<!-- <a-col :span="12">
<a-form-model-item label="所属窗口" prop="windowId">
<a-select
v-model="form.windowId"
......@@ -79,14 +79,14 @@
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
</a-col> -->
<a-col :span="12">
<a-form-model-item label="经办人Id" prop="operatorId">
<a-input v-model="form.operatorId" placeholder="请输入经办人Id" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="星级" prop="starlevel">
<a-select
......@@ -102,27 +102,27 @@
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="职务" prop="userpost">
<a-input v-model="form.userpost" placeholder="请输入职务" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="职称" prop="posttitle">
<a-input v-model="form.posttitle" placeholder="请输入职称" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="称号" prop="dangyuan">
<a-form-model-item label="政治面貌" prop="politicalstatus">
<a-select
allowClear
v-model="form.dangyuan"
placeholder="请选择称号"
v-model="form.politicalstatus"
placeholder="请选择政治面貌"
>
<a-select-option
v-for="(value, key) in designationDict"
v-for="(value, key) in politicalDict"
:key="key"
:value="Number(key)"
>{{ value }}</a-select-option
......@@ -130,15 +130,17 @@
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="政治面貌" prop="politicalstatus">
<a-form-model-item label="称号" prop="dangyuan">
<a-select
allowClear
v-model="form.politicalstatus"
placeholder="请选择政治面貌"
v-model="form.dangyuan"
placeholder="请选择称号"
>
<a-select-option
v-for="(value, key) in politicalDict"
v-for="(value, key) in designationDict"
:key="key"
:value="Number(key)"
>{{ value }}</a-select-option
......@@ -151,11 +153,6 @@
<a-input v-model="form.phone" placeholder="请输入电话" />
</a-form-model-item>
</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 v-if="form.dangyuan === 99">
<!-- <a-col :span="12"> </a-col> -->
......@@ -166,6 +163,11 @@
</a-col>
</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-form-model-item label="身份证" prop="idCard">
<a-input v-model="form.idCard" placeholder="请输入身份证号码" />
......@@ -494,15 +496,15 @@ export default {
// 部门选择
async handleDeptSelect(val, node) {
this.form.windowId = undefined;
this.form.windowName = "";
// this.form.windowId = undefined;
// this.form.windowName = "";
if (val) {
let { text } = node.componentOptions.children[0];
this.form.deptName = text;
this.windowData = await this.getWindowList(val);
// this.windowData = await this.getWindowList(val);
} else {
this.form.deptName = "";
this.windowData = [];
// this.windowData = [];
}
},
//编辑获取窗口
......@@ -535,7 +537,7 @@ export default {
},
// 编辑
onEdit(data) {
this.editWindow(data.deptId);
// this.editWindow(data.deptId);
this.form = { ...data };
this.form.loginName && this.$delete(this.form, "loginName");
this.form.loginPwd && this.$delete(this.form, "loginPwd");
......@@ -554,15 +556,16 @@ export default {
},
// 关闭对话框
handleClose() {
this.$refs.formData.resetFields();
this.fileList = [];
this.loading = false;
this.Visible = false;
this.form.windowName = "";
this.fileList = [];
this.$refs.formData.resetFields();
// this.windowData = [];
// this.form.windowName = "";
},
// 重置
handleReset() {
this.form.windowName = "";
// this.form.windowName = "";
this.$refs.formData.resetFields();
},
// 照片上传
......
......@@ -56,7 +56,7 @@
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<!-- <a-col :span="12">
<a-form-model-item label="所属窗口" prop="windowId">
<a-select
v-model="form.windowId"
......@@ -79,14 +79,14 @@
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
</a-col> -->
<a-col :span="12">
<a-form-model-item label="经办人Id" prop="operatorId">
<a-input v-model="form.operatorId" placeholder="请输入经办人Id" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="星级" prop="starlevel">
<a-select
......@@ -102,27 +102,27 @@
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="职务" prop="userpost">
<a-input v-model="form.userpost" placeholder="请输入职务" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="职称" prop="posttitle">
<a-input v-model="form.posttitle" placeholder="请输入职称" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="称号" prop="dangyuan">
<a-form-model-item label="政治面貌" prop="politicalstatus">
<a-select
allowClear
v-model="form.dangyuan"
placeholder="请选择称号"
v-model="form.politicalstatus"
placeholder="请选择政治面貌"
>
<a-select-option
v-for="(value, key) in designationDict"
v-for="(value, key) in politicalDict"
:key="key"
:value="Number(key)"
>{{ value }}</a-select-option
......@@ -130,15 +130,17 @@
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="政治面貌" prop="politicalstatus">
<a-form-model-item label="称号" prop="dangyuan">
<a-select
allowClear
v-model="form.politicalstatus"
placeholder="请选择政治面貌"
v-model="form.dangyuan"
placeholder="请选择称号"
>
<a-select-option
v-for="(value, key) in politicalDict"
v-for="(value, key) in designationDict"
:key="key"
:value="Number(key)"
>{{ value }}</a-select-option
......@@ -151,11 +153,6 @@
<a-input v-model="form.phone" placeholder="请输入电话" />
</a-form-model-item>
</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 v-if="form.dangyuan === 99">
<!-- <a-col :span="12"> </a-col> -->
......@@ -166,6 +163,11 @@
</a-col>
</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-form-model-item label="身份证" prop="idCard">
<a-input v-model="form.idCard" placeholder="请输入身份证号码" />
......@@ -528,15 +530,15 @@ export default {
},
// 部门选择
async handleDeptSelect(val, node) {
this.form.windowId = undefined;
this.form.windowName = "";
// this.form.windowId = undefined;
// this.form.windowName = "";
if (val) {
let { text } = node.componentOptions.children[0];
this.form.deptName = text;
this.windowData = await this.getWindowList(val);
// this.windowData = await this.getWindowList(val);
} else {
this.form.deptName = "";
this.windowData = [];
// this.windowData = [];
}
},
//编辑获取窗口
......@@ -572,7 +574,7 @@ export default {
},
// 重置
handleReset() {
this.form.windowName = "";
// this.form.windowName = "";
this.$refs.formData.resetFields();
},
// 新增
......@@ -583,7 +585,7 @@ export default {
// 编辑
onEdit(data) {
this.form = { ...data };
this.editWindow(data.deptId);
// this.editWindow(data.deptId);
if (this.form.photoPath) {
this.fileList = [
{
......@@ -599,9 +601,9 @@ export default {
// 关闭对话框
handleClose() {
// this.$refs.formData.resetFields();
this.windowData = [];
// this.windowData = [];
this.fileList = [];
this.form.windowName = "";
// this.form.windowName = "";
this.loading = false;
this.Visible = false;
},
......
......@@ -136,7 +136,9 @@
:multiple="false"
:action="api + 'base/workman/importData'"
:showUploadList="false"
:headers="headers"
:headers="{
Authorization: token,
}"
@change="handleChange"
:data="{
siteId,
......@@ -160,7 +162,9 @@
:multiple="false"
:action="api + 'base/file/commonupload'"
:showUploadList="false"
:headers="headers"
:headers="{
Authorization: token,
}"
@change="handleChangeImg"
accept="application/x-zip-compressed"
>
......@@ -242,9 +246,9 @@
{{ text.createTime | dateFormat }}
</template>
<!-- 最后登录时间 -->
<template slot="logintime" slot-scope="text">
<span v-if="text.logintime">{{
text.logintime | dateFormat
<template slot="lastLoginTime" slot-scope="text">
<span v-if="text.lastLoginTime">{{
text.lastLoginTime | dateFormat
}}</span>
<span v-else>--</span>
</template>
......@@ -296,6 +300,7 @@ import EditPersonel from "./components/EditPersonel.vue";
import local from "@/utils/local";
import { Empty } from "ant-design-vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
import { mapGetters } from "vuex";
// import axios from "axios";
import {
getDeptList,
......@@ -364,7 +369,7 @@ const columns = [
{
title: "最后登录时间",
scopedSlots: {
customRender: "logintime",
customRender: "lastLoginTime",
},
},
......@@ -384,9 +389,6 @@ export default {
},
data() {
return {
headers: {
Authorization: local.getLocal("token"),
},
spinning: false,
columns,
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
......@@ -413,6 +415,9 @@ export default {
curWindow: "", // 当前选中窗口
};
},
computed: {
...mapGetters("site", ["token"]),
},
created() {
this.getDeptList();
this.getWindowData();
......
......@@ -158,7 +158,8 @@ module.exports = {
info: `${BASE_URL}/base/window/info`,
save: `${BASE_URL}/base/window/save`,
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`, // 查询当前站点所有没有在大厅配置的过的窗口
},
// 工作人员
......
......@@ -51,6 +51,14 @@ export async function delWindow(data) {
export async function getSubHalllist(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);
}
/**
* 窗口业务
......
......@@ -45,27 +45,27 @@ public class WindowEntity extends WindowVo {
/**
* 区域
*/
@Excel(name = "用户名")
@Excel(name = "区域")
private String region;
/**
* 英语区域
*/
@Excel(name = "用户名")
@Excel(name = "英语区域")
private String englishRegion;
/**
* 窗口编号
*/
@Excel(name = "用户名")
@Excel(name = "窗口编号")
private String fromnum;
/**
* 红旗窗口 (1.是,0.否)
*/
//@Excel(name = "红旗窗口",combo={"是","否"}, readConverterExp = "1=是,0=否")
@Excel(name = "红旗窗口",combo={"是","否"}, readConverterExp = "1=是,0=否")
private Integer hongqi;
/**
* 无人值守(1.是)
*/
//@Excel(name = "无人值守",combo={"是","否"}, readConverterExp = "1=是,0=否")
@Excel(name = "无人值守",combo={"是","否"}, readConverterExp = "1=是,0=否")
private Integer duty;
/**
* 显示内容
......@@ -84,12 +84,12 @@ public class WindowEntity extends WindowVo {
/**
* 楼栋
*/
@Excel(name = "楼栋")
@Excel(name = "楼栋",cellType= Excel.ColumnType.NUMERIC)
private Integer building;
/**
* 楼层
*/
@Excel(name = "楼层")
@Excel(name = "楼层",cellType= Excel.ColumnType.NUMERIC)
private Integer level;
/**
* 名称描述
......
......@@ -59,6 +59,15 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
super.setModuleDesc("站点部门窗口");
}
/**
*
*/
@Override
@UnAuth
public void downloadTemplate() {
super.downloadTemplate();
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "hongqi", paramService.getParamBySecondOrganize("Window", "hongqi"));
......
......@@ -84,6 +84,16 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
super.init(model, context);
}
/**
*
*/
@Override
@UnAuth
public void downloadTemplate() {
super.downloadTemplate();
}
/**
* 工作人员登录
*/
......
......@@ -67,7 +67,12 @@ export default {
data() {
return {
searchVal: "",
stepsList: [],
stepsList: [
{
id:'',
productName:'全部',
}
],
isSearch: false,
active: 0,
......@@ -86,13 +91,22 @@ export default {
getProduct({
page: 1,
size: -1, //每页条数
productName: `%${this.searchVal}%`,
// productName: `%${this.searchVal}%`,
}).then((res) => {
let { code, data } = res;
if (code == 1) {
if (data.data.length) {
this.stepsList = data.data;
this.getApiDetail(data.data[0]);
let arr = [
{
id:'',
productName:'全部',
}
]
data.data.forEach(item => {
arr.push(item)
});
this.stepsList = arr
this.getApiDetail(this.stepsList[0]);
} else {
this.curApiInfo = {};
}
......@@ -101,7 +115,7 @@ export default {
},
getApiDetail(item) {
getInterfaceList({ page: 1, size: -1, productId: item.id }).then(
getInterfaceList({ page: 1, size: -1, productId: item.id , interfaceName: `%${this.searchVal}%`,}).then(
(res) => {
let { code, data } = res;
if (code == 1) {
......@@ -115,8 +129,9 @@ export default {
);
},
handleSearch() {
this.active = 0;
this.getServiceApiList();
// this.active = 0;
// this.getServiceApiList();
this.getApiDetail(this.stepsList[this.active])
// this.isSearch = !this.isSearch;
// if (this.isSearch) {
......
......@@ -218,10 +218,12 @@ export default {
// 搜索
async searchData() {
if (this.searchForm.parentId || this.searchForm.name) {
let obj = {...this.searchForm}
obj.name = '%'+this.searchForm.name+'%'
let res = await menuList({
page: this.tablePagination.current,
size: -1,
...this.searchForm,
...obj,
});
let { data, total } = res.data;
this.tablePagination.total = total;
......
......@@ -116,6 +116,7 @@ export default {
this.$refs.AddEditAppName.appInfoFome.id = item.id;
this.$refs.AddEditAppName.appInfoFome.productName = item.productName;
} else {
this.$refs.AddEditAppName.appInfoFome.id = '';
this.$refs.AddEditAppName.VisibleTitle = "新增产品";
}
this.$refs.AddEditAppName.Visible = true;
......
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