Commit 16a1f1e6 authored by 姬鋆屾's avatar 姬鋆屾
parents 2a93a96b b3df15f5
......@@ -9,5 +9,5 @@ VUE_APP_TBAS_KEY=admin.tabs
VUE_APP_TBAS_TITLES_KEY=admin.tabs.titles
#VUE_APP_API_BASE_URL=http://api.iczer.com
#门户
#VUE_APP_API_portal_URL=http://192.168.0.98:11072
VUE_APP_API_portal_URL=http://10.12.185.213:11072
\ No newline at end of file
VUE_APP_API_portal_URL=http://192.168.0.98:11072
# VUE_APP_API_portal_URL=http://10.12.185.213:11072
\ No newline at end of file
......@@ -3,7 +3,7 @@
color:#1890FF;
}
.delete{
color:#FF4D4F;
color:#FA4D4C;
}
.green{
color:#1BBC9B;
......@@ -15,7 +15,7 @@
color:#fff;
}
.bgdel{
background-color: #FF4D4F;
background-color: #FA4D4C;
}
.bgpr{
background-color: #1890FF;
......@@ -150,6 +150,9 @@
.pdl20{
padding-left:20px;
}
.pdr6{
padding-right:6px;
}
.pdr10{
padding-right:10px;
}
......@@ -220,3 +223,6 @@
.empty {
height: 100%;
}
.pointer{
cursor: pointer;
}
\ No newline at end of file
@import './common.less';
@import '../../theme/default/color.less';
@import "./common.less";
@import "../../theme/default/color.less";
// 字体大小
@fz18: 18px;
@fz16: 16px;
......@@ -10,13 +10,13 @@
@cl999: #999;
@cl000: #000; //表头
@cl333: #333; //表体
@cl8B: #8B96A6;
@dlecl: #FA4D4C; //表格删除
@redact: #1890FF; //表格编辑
@cl8B: #8b96a6;
@dlecl: #fa4d4c; //表格删除
@redact: #1890ff; //表格编辑
// 按钮背景色
@addbg: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%); //新增
@delbg: #FA4D4C; //删除
@qubg: #E1F0FE; //取消 重置
@delbg: #fa4d4c; //删除
@qubg: #e1f0fe; //取消 重置
// 分页显示位置
.pagination {
......@@ -24,6 +24,10 @@
margin-right: 10px;
text-align: right;
}
.ant-tabs-nav-container {
border-bottom: 1px solid rgb(224, 224, 224) !important;
}
/* 溢出表格滚动条 */
/* 表格 */
......@@ -36,22 +40,32 @@
overflow: hidden !important;
margin-bottom: 0 !important;
padding-right: 6px;
tr:only-child > th:last-child {
border-right-color: #f0f0f0 !important;
}
}
.ant-table-placeholder{
width:calc(100% - 6px)
}
.ant-table-header {
background: #fff;
}
::-webkit-scrollbar {
width: 6px;
height:6px;
height: 6px;
overflow-y: auto;
}
::-webkit-scrollbar-thumb {
border-radius: 6px;
background-color: rgba(144, 147, 153, .5);
background-color: rgba(144, 147, 153, 0.5);
}
::-webkit-scrollbar-track {
border-radius: 6px;
background: #fff;
background: rgba(144, 147, 153, 0);
}
.color_title {
......@@ -65,18 +79,30 @@
position: absolute;
top: 1px;
left: -16px;
background-color: rgba(5, 149, 253, 1);
background-color: #1890ff;
}
}
.ant-input{
.ant-input {
resize: none;
}
.ant-btn-primary {
background: linear-gradient(90deg, #5ab6ff, #2e9aff) !important;
border: none !important;
border-color: transparent !important;
}
.ant-form-explain{
position:absolute
.ant-form-explain {
position: absolute;
}
.ant-form-item {
display: flex;
align-items: center;
margin-bottom: 20px;
}
// .table-header{
// padding-right:6px;
// display: flex;
// align-items: center;
// justify-content:space-between;
// margin-bottom: 20px;
// }
\ No newline at end of file
.ant-modal {
box-shadow: none !important;
}
.ant-form-item {
margin-bottom: 0;
display: flex;
align-items: center;
}
.ant-form-item-children {
display: flex;
align-items: center;
}
.ant-form-item-children input,
.ant-form-item-children textarea {
font-size: 14px;
font-weight: 400;
color: #999;
}
.ant-form-item-label label {
font-size: 14px;
font-weight: 400;
color: #8B96A6;
}
.ant-modal {
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
}
.ant-modal-title {
color: #1890FF !important;
font-size: 18px;
font-weight: bold;
}
.ant-modal-close {
color: #188fff !important;
}
.ant-modal-close svg {
font-size: 26px !important;
}
.ant-vue-dark .ant-table-thead .ant-table-column-title {
font-size: 16px;
font-weight: 500;
color: #000;
}
.ant-vue-dark .ant-table-tbody {
font-size: 14px;
font-weight: 400;
color: #333;
}
.ant-vue-light .ant-table-thead .ant-table-column-title {
font-size: 16px;
font-weight: 500;
color: #000;
}
.ant-vue-light .ant-table-tbody {
font-size: 14px;
font-weight: 400;
color: #333;
}
.del {
color: #FA4D4C;
padding: 0 4px;
display: inline-block;
}
.del:hover {
color: #FA4D4C;
cursor: pointer;
}
.redact {
color: #1890FF;
padding: 0 4px;
display: inline-block;
}
.redact:hover {
color: #1890FF;
cursor: pointer;
}
.search input {
font-size: 14px;
color: #BFBFBF;
}
.search .chaxun {
color: #fff;
border: 1px solid #5ab6ff;
padding: 0 14px;
background: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%);
}
.btn {
margin-top: 20px;
}
.btnclass {
font-size: 14px;
border-radius: 4px;
border: none;
margin-right: 12px;
}
.delclass {
background: #FA4D4C !important;
color: #fff !important;
}
.addclass {
background: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%) !important;
color: #fff !important;
}
.quclass {
background: #E1F0FE !important;
color: #42A5FA !important;
border: 1px solid #E1F0FE;
}
/**
* 上传图片、文件父级添加class
* 文字和控件将向上对齐
*/
.up_load_file .ant-form-item {
align-items: flex-start;
}
.up_load_file .ant-form-item-label {
position: relative;
top: -4px;
}
.up_load_pic .ant-form-item {
align-items: flex-start;
}
.up_load_pic .ant-upload-list {
float: left;
}
th {
text-align: center !important;
}
td {
text-align: center;
}
.btn_box {
display: flex;
align-items: center;
justify-content: center;
}
.search_block {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
}
.card_title {
font-size: 16px;
font-weight: 600;
color: #464646;
padding-left: 10px;
position: relative;
margin-bottom: 15px;
}
.card_title::before {
content: '';
position: absolute;
background: #1890ff;
border-color: #1890FF;
border-style: solid;
border-width: 2px;
height: 15px;
top: 4px;
left: 0;
}
.ant-tabs-nav-wrap {
background: #fff;
}
.ant-tabs-bar {
background: #fff;
padding-right: 20px !important;
}
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {
border-left: none !important;
border-top: none !important;
border-right: none !important;
border-bottom: none !important;
color: #999 !important;
}
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active {
border-left: none !important;
border-top: none !important;
border-right: none !important;
}
.tabs-view-content {
background: #fff;
margin: 0 24px;
padding: 20px 24px;
min-height: 80vh;
}
.admin-layout .admin-layout-content {
padding: 20px 0 0 !important;
background: #F0F2F5;
}
.ant-pagination-item-active {
background: #1890FF;
border-radius: 4px;
}
.ant-pagination-item-active a {
color: #fff;
}
......@@ -223,22 +223,22 @@ td{
background: #fff;
}
.ant-tabs-bar{
background: #fff;
padding-right: 20px !important;
}
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
border-left: none !important;
border-top: none !important;
border-right: none !important;
border-bottom: none !important;
color: #999 !important;
}
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
border-left: none !important;
border-top: none !important;
border-right: none !important;
}
// .ant-tabs-bar{
// background: #fff;
// padding-right: 20px !important;
// }
// .ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
// border-left: none !important;
// border-top: none !important;
// border-right: none !important;
// border-bottom: none !important;
// color: #999 !important;
// }
// .ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
// border-left: none !important;
// border-top: none !important;
// border-right: none !important;
// }
// 内容
.tabs-view-content{
// background: #fff;
......
......@@ -5,6 +5,7 @@
<a-tree
:load-data="onLoadData"
:tree-data="treeData"
:expandedKeys.sync="expandedKeys"
:replaceFields="{ title: 'label', key: 'id' }"
@select="onSelect"
>
......@@ -26,6 +27,7 @@ export default {
return {
treeData: [], //树结构
id: "",
expandedKeys: [],
};
},
......@@ -40,6 +42,13 @@ export default {
const { data, code } = res.data;
if (code === 1) {
this.treeData = data.data;
// let obj = {
// dataRef: {
// id: data.data[0].id,
// },
// };
// this.onLoadData(obj);
this.expandedKeys = [data.data[0].id];
}
},
......
export const pageSizeOptions = ["10", "30", "50", "100", "200"]; // 翻页-每页显示数量
import local from "@/utils/local";
// import local from "@/utils/local";
import store from "@/store/index";
// 皮肤模板页面权限
export const permission = {
inserted: function(el, binding) {
const { value } = binding;
const roles = local.getLocal("baseUserInfo").id;
// const roles = local.getLocal("baseUserInfo").id;
const roles = store.getters["site/userInfo"].id;
if (value) {
const permissionRoles = value;
const hasPermission = permissionRoles.includes(roles);
......
......@@ -5,7 +5,7 @@
<div class="flex aic">
<router-link to="/" class="flex aic">
<img class="mr10" width="32" src="@/assets/img/logo.png" />
<h1 class="title">基础设置平台</h1>
<h1 class="title">基础设置系统</h1>
</router-link>
<HeaderSite class="ml20"></HeaderSite>
</div>
......@@ -28,7 +28,7 @@
<a-layout-sider width="200" style="background: #fff">
<i-menu theme="light" :options="menuData" class="menu" />
</a-layout-sider>
<a-layout class="main" style="padding: 0 24px 24px">
<a-layout class="main">
<a-layout-content>
<keep-alive>
<!-- 需要缓存的视图组件 -->
......@@ -93,7 +93,23 @@ export default {
}
.main {
height: calc(100vh - 64px);
padding: 0px 24px 24px;
overflow-y: auto;
&::-webkit-scrollbar {
width: 6px;
height: 6px;
overflow-y: auto;
}
&::-webkit-scrollbar-thumb {
border-radius: 6px;
background-color: rgba(144, 147, 153, 0.5);
}
&::-webkit-scrollbar-track {
border-radius: 6px;
background: rgba(144, 147, 153, 0);
}
}
.ant-layout-content {
height: 100%;
......
......@@ -29,14 +29,12 @@
>
</div>
<div class="site-btn">
<a-button
type="primary"
style="margin-right: 10px"
@click="onSucessSite"
:disabled="isSite"
<a-button style="margin-right: 10px" @click="visible = false"
>取消</a-button
>
<a-button type="primary" @click="onSucessSite" :disabled="isSite"
>确定</a-button
>
<a-button @click="visible = false">取消</a-button>
</div>
</div>
</template>
......@@ -45,6 +43,7 @@
</template>
<script>
import { getSiteTree } from "@/services/basicsetFun";
import { mapMutations } from "vuex";
import local from "@/utils/local";
// import Cookie from "js-cookie";
export default {
......@@ -65,6 +64,7 @@ export default {
},
mounted() {},
methods: {
...mapMutations("site", ["SET_SITE_ID", "SET_siteName"]),
// 确认站点
onSucessSite() {
if (this.checkarr.length == 0) return;
......@@ -114,7 +114,7 @@ export default {
const { siteTree } = data;
this.sitelist = siteTree;
let arr = [];
const treeFn = function (e) {
const treeFn = function(e) {
e.forEach((element) => {
arr.push(element);
if (element.children && element.children.length > 0) {
......@@ -137,6 +137,8 @@ export default {
// };
local.setLocal("siteId", obj.id);
local.setLocal("siteName", obj.label);
this.SET_SITE_ID(obj.id);
this.SET_siteName(obj.label);
this.show = false;
if (location.href.search(/token/gi) >= 0) {
setTimeout(() => {
......
......@@ -30,9 +30,11 @@
</span>
</template>
<template slot="active" slot-scope="text">
<a class="look-more" @click="lookMore(text.content)">查看详情</a>
<a class="edit" @click="editAccept(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a>
<span class="primary pointer" @click="lookMore(text.content)"
>查看详情</span
>
<span class="primary pointer" @click="editAccept(text)">编辑</span>
<span class="delete pointer" @click="handleDel(text.id)">删除</span>
</template>
</a-table>
</div>
......@@ -85,6 +87,7 @@ import {
// getSiteMatterList,
} from "@/services/matter";
import local from "@/utils/local";
import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [
{
title: "序号",
......@@ -121,7 +124,7 @@ export default {
source: 1,
},
loading: false,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
rules: {
content: [
{ required: true, message: "受理条件不能为空", trigger: "blur" },
......@@ -251,13 +254,6 @@ export default {
.header {
margin-bottom: 20px;
}
.edit {
color: #03d76f;
margin: 0 15px;
}
.delete {
color: #fa6464;
}
}
/deep/.ant-form-item {
display: block !important;
......
......@@ -39,9 +39,17 @@
>
</template>
<template slot="operate" slot-scope="text">
<span class="look_more mr" @click="readMore(text)">查看更多</span>
<span class="edit mr" @click="editMaterial(text)">编辑</span>
<span class="del" @click="delMaterial(text.id)">删除</span>
<a-space>
<span class="primary pointer" @click="readMore(text)"
>查看更多</span
>
<span class="primary pointer" @click="editMaterial(text)"
>编辑</span
>
<span class="delete pointer" @click="delMaterial(text.id)"
>删除</span
>
</a-space>
</template>
</a-table>
</div>
......@@ -73,6 +81,7 @@ import addmaterials from "../group/addmaterials.vue";
import materialDetails from "../group/materialDetails.vue";
import downloadTable from "../group/downloadTable.vue";
import { getMatterDatumList, delMatterDatum } from "@/services/matter";
import { pageSizeOptions } from "@/config/pageConfig.js";
let columns = [
{
title: "序号",
......@@ -121,7 +130,7 @@ export default {
columns,
dict: {}, // 材料字典
loading: false,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
dataSource: [],
selectedRows: [], // 选中数据
formVisible: false,
......@@ -258,12 +267,5 @@ export default {
border-radius: 2px;
cursor: pointer;
}
.edit {
color: #03d76f;
cursor: pointer;
}
.look_more {
cursor: pointer;
}
}
</style>
......@@ -31,8 +31,8 @@
</template>
<template slot="active" slot-scope="text">
<a-space size="middle">
<a class="edit" @click="handleEdit(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a>
<span class="primary pointer" @click="handleEdit(text)">编辑</span>
<span class="delete pointer" @click="handleDel(text.id)">删除</span>
</a-space>
</template>
</a-table>
......@@ -49,6 +49,7 @@
<script>
import { getMatterflowlimitList, delMatterflowlimit } from "@/services/matter";
import { pageSizeOptions } from "@/config/pageConfig.js";
import addFlow from "../group/addFlow.vue";
import local from "@/utils/local";
......@@ -103,7 +104,7 @@ export default {
current: 1,
size: 10,
total: 0,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
title: "新增流程",
visible: false,
};
......
......@@ -37,8 +37,8 @@
</template>
<template slot="active" slot-scope="text">
<a-space size="middle">
<a class="edit" @click="handleEdit(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a>
<span class="primary pointer" @click="handleEdit(text)">编辑</span>
<span class="delete pointer" @click="handleDel(text.id)">删除</span>
</a-space>
</template>
</a-table>
......@@ -64,6 +64,7 @@
<script>
import local from "@/utils/local";
import { pageSizeOptions } from "@/config/pageConfig.js";
import addPursuant from "../group/addPursuant.vue";
import { getMattersetbase, delMattersetbase } from "@/services/matter";
const columns = [
......@@ -103,7 +104,7 @@ export default {
data() {
return {
loading: false,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
columns,
tableData: [],
current: 1,
......@@ -221,13 +222,7 @@ export default {
.header {
margin-bottom: 20px;
}
.edit {
color: #03d76f;
margin: 0 10px;
}
.delete {
color: #fa6464;
}
.ant-pagination {
margin: 10px 0;
}
......
......@@ -30,9 +30,11 @@
<template slot="active" slot-scope="text">
<a-space size="middle">
<a class="look-more" @click="handleMore(text)">查看详情</a>
<a class="edit" @click="handleEdit(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a>
<span class="primary pointer" @click="handleMore(text)"
>查看详情</span
>
<span class="primary pointer" @click="handleEdit(text)">编辑</span>
<span class="delete pointer" @click="handleDel(text.id)">删除</span>
</a-space>
</template>
</a-table>
......@@ -41,8 +43,8 @@
<!-- 新增问题 -->
<a-modal v-model="visible" :title="title" @cancel="handleClose">
<template slot="footer">
<a-button type="primary" @click="handleOk">确定</a-button>
<a-button @click="handleInit">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</template>
<a-form-model
......@@ -87,6 +89,7 @@
</template>
<script>
import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [
{
title: "序号",
......@@ -124,7 +127,7 @@ export default {
return {
columns,
loading: false,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
tableData: [],
siteId: "",
matterList: [],
......@@ -270,13 +273,7 @@ export default {
.header {
margin-bottom: 20px;
}
.edit {
color: #03d76f;
margin: 0 15px;
}
.delete {
color: #fa6464;
}
.ant-pagination {
margin: 10px 0;
}
......
......@@ -9,7 +9,7 @@
>
<template slot="footer">
<a-button @click="handleInit">重置</a-button>
<a-button @click="handleOk" type="primary">保存</a-button>
<a-button @click="handleOk" type="primary">确定</a-button>
</template>
<a-form-model
:label-col="{ span: 4 }"
......
......@@ -8,7 +8,7 @@
>
<template slot="footer">
<a-button @click="handleInit">重置</a-button>
<a-button @click="handleOk" type="primary">保存</a-button>
<a-button @click="handleOk" type="primary">确定</a-button>
</template>
<a-form-model
:model="form"
......
......@@ -12,6 +12,7 @@
<a-tab-pane key="/appmarket/terminalapp" tab="终端应用"> </a-tab-pane>
<a-tab-pane key="/appmarket/moveapp" tab="移动端应用"> </a-tab-pane>
<a-tab-pane key="/appmarket/blackapp" tab="应用黑名单"> </a-tab-pane>
<a-tab-pane key="/appmarket/appTheme" tab="应用主题"> </a-tab-pane>
</a-tabs>
<div class="app-out-box flex1">
<router-view></router-view>
......@@ -131,6 +132,9 @@ export default {
overflow-y: auto;
}
}
/deep/.ant-tabs-extra-content {
padding-right: 20px;
}
/deep/.ant-form-item {
align-items: flex-start;
}
......
......@@ -87,13 +87,15 @@
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<a
class="primary"
<span
class="primary pointer"
:disabled="text.used ? true : false"
@click="handleUse(text.id)"
>使用</a
>使用</span
>
<span class="primary pointer" @click="handlePreview(text.id)"
>预览</span
>
<a class="primary" @click="handlePreview(text.id)">预览</a>
</a-space>
</template>
</a-table>
......@@ -117,6 +119,7 @@ import {
previewVersion,
} from "@/services/market";
import CheckSite from "../modal/CheckSite.vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex";
export default {
......@@ -178,7 +181,7 @@ export default {
size: 10,
total: 0,
loading: false,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
form: {},
tableData: [],
siteVisible: false,
......
<template>
<div class="app-category">
<div class="header flex aic jcb mb20 pdr6">
<a-space>
<a-button type="primary" @click="handleAdd"> 新增主题 </a-button>
<a-button type="danger" @click="handleDelAll"> 批量移除 </a-button>
</a-space>
<a-input-search
style="width: 300px"
placeholder="请输入主题名称搜索"
enter-button="搜索"
v-model="searchVal"
allowClear
@search="onSearch"
/>
</div>
<!-- 表格 -->
<div class="table-content">
<a-table
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:loading="loading"
bordered
:scroll="{ y: 580 }"
:columns="columns"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
total: total,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: handleChange,
onShowSizeChange: showSizeChange,
}"
:data-source="tableData"
:rowKey="(record) => record.id"
>
<!-- 序号 -->
<span slot="num" slot-scope="text, record, index">{{
(current - 1) * size + index + 1
}}</span>
<!-- 创建时间 -->
<template slot="createTime" slot-scope="text">
{{ text.createTime | dateFormat }}
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<span class="primary pointer" @click="handleEdit(text)">编辑</span>
<span class="delete pointer" @click="handleDel(text.id)">删除</span>
</a-space>
</template>
</a-table>
</div>
<!-- 新增、编辑分类 -->
<AddTheme
ref="AddTheme"
:title="title"
:addVisile.sync="addVisile"
@addSuccess="getCategoryList"
></AddTheme>
</div>
</template>
<script>
import { getCategoryList, deleteCategory } from "@/services/market";
import AddTheme from "../modal/AddTheme";
import local from "@/utils/local";
import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [
{
title: "序号",
dataIndex: "num",
width: "65px",
scopedSlots: {
customRender: "num",
},
},
{
title: "站点名称",
dataIndex: "siteName",
},
{
title: "主题名称",
dataIndex: "categoryName",
},
{
title: "主题编码",
dataIndex: "categoryCode",
},
{
title: "排序",
dataIndex: "sort",
},
{
title: "创建时间",
scopedSlots: {
customRender: "createTime",
},
},
{
title: "操作",
width: "150px",
scopedSlots: { customRender: "action" },
},
];
export default {
components: {
AddTheme,
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
columns,
siteId: local.getLocal("siteId"),
tableData: [], // 表格数据
loading: false,
searchVal: "", // 搜索
current: 1,
size: 10,
total: 0,
pageSizeOptions,
selectedRowKeys: [], // 表格勾选数据
AddVisible: false,
title: "新增主题",
addVisile: false,
};
},
created() {
this.getCategoryList();
},
methods: {
// 获取分类列表
async getCategoryList() {
this.loading = true;
let res = await getCategoryList({
page: this.current,
size: this.size,
siteId: this.siteId,
categoryName: `%${this.searchVal}%`,
});
this.loading = false;
let { data, total } = res.data.data;
if (res.data.code === 1) {
if (!data.length && this.current > 1) {
this.current -= 1;
this.getCategoryList();
}
this.tableData = data;
this.total = total;
}
},
// 新增
handleAdd() {
this.title = "新增主题";
this.$refs.AddTheme.onAdd();
this.addVisile = true;
},
// 搜索
onSearch() {
this.current = 1;
this.selectedRowKeys = [];
this.getCategoryList();
},
// 翻页
handleChange(cur) {
this.current = cur;
this.getCategoryList();
},
// 改变每页显示数量
showSizeChange(current, size) {
this.current = current;
this.size = size;
this.getCategoryList();
},
// 勾选表格
onSelectChange(keys) {
this.selectedRowKeys = keys;
},
// 编辑
handleEdit(row) {
this.title = "编辑主题";
this.$refs.AddTheme.onEdit(row);
this.addVisile = true;
},
// 批量移除
handleDelAll() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选数据");
return;
}
let ids = this.selectedRowKeys.join(",");
this.handleDel(ids);
},
// 删除
handleDel(id) {
let _this = this;
_this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {
let res = await deleteCategory({ id });
let { code, msg } = res.data;
if (code === 1) {
_this.$message.success(msg);
this.selectedRowKeys = [];
_this.getCategoryList();
}
},
onCancel() {
console.log("Cancel");
},
});
},
},
};
</script>
<style lang="less" scoped></style>
......@@ -2,8 +2,8 @@
<div class="black-app">
<div class="left">
<div class="header">
<h3 class="titel">设备应用黑名单</h3>
<div class="control">
<div class="titel">设备应用黑名单</div>
<div class="control pdr6">
<a-button type="danger" @click="handleDelAll"> 批量移除 </a-button>
<div class="business-control">
<a-space>
......@@ -66,8 +66,11 @@
</span>
</template>
<template slot="action" slot-scope="text">
<a href="javascript:;" class="delete" @click="handleDel(text.id)"
>移除</a
<span
href="javascript:;"
class="delete pointer"
@click="handleDel(text.id)"
>移除</span
>
</template>
</a-table>
......@@ -76,12 +79,12 @@
<!-- 右 -->
<div class="right">
<div class="header">
<h3 class="titel">站点设备</h3>
<div class="titel">站点设备</div>
<div class="control">
<div>
<!-- <a-button type="primary" @click="handleAddAll"> 批量加入 </a-button> -->
</div>
<div class="business-control">
<div class="business-control pdr6">
<a-space>
<a-select
style="min-width: 120px"
......@@ -149,7 +152,9 @@
<template slot="action" slot-scope="text">
<a-space size="middle">
<a class="jion" @click="handleIn(text)">加入黑名单</a>
<span class="primary pointer" @click="handleIn(text)"
>加入黑名单</span
>
</a-space>
</template>
</a-table>
......@@ -164,7 +169,7 @@
</div>
</template>
<script>
<script>
import {
getDeviceList,
getBlackAppList,
......@@ -172,6 +177,7 @@ import {
} from "@/services/market";
import local from "@/utils/local";
import DevToBlack from "../modal/DevToBlack.vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
const devType = [
"排队机",
"窗口屏",
......@@ -279,7 +285,7 @@ export default {
rightTotal: 0,
leftSize: 10,
rightSize: 10,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
siteId: local.getLocal("siteId"), // 站点id
deviceList: [], // 站点设备列表
blackApp: [], // 应用黑名单列表
......@@ -324,7 +330,6 @@ export default {
let { data, total } = res.data.data;
this.deviceList = data;
this.rightTotal = total;
console.log(data);
}
this.rightLoading = false;
},
......@@ -438,7 +443,7 @@ export default {
};
</script>
<style lang="less" scoped>
<style lang="less" scoped>
.black-app {
width: 100%;
height: 100%;
......@@ -459,6 +464,7 @@ export default {
.header {
height: 100px;
.titel {
font-size: 18px;
margin-bottom: 15px;
}
}
......@@ -475,9 +481,4 @@ export default {
justify-content: space-between;
}
}
.add-btn {
background-color: #04cb8f;
color: #fff;
}
</style>
<template>
<div class="data-update">
<!-- 头部 -->
<div class="header flex aic jcb mb20">
<div class="header flex aic jcb mb20 pdr6">
<a-button type="primary" @click="handleAdd">新增</a-button>
<div class="search-box">
<a-input-group compact>
......@@ -84,8 +84,8 @@
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<a class="edit" @click="handleEdit(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a>
<span class="primary pointer" @click="handleEdit(text)">编辑</span>
<span class="delete pointer" @click="handleDel(text.id)">删除</span>
</a-space>
</template>
</a-table>
......@@ -107,6 +107,7 @@
<script>
import AddData from "../modal/AddData.vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
import {
getDatasetList,
deleteDataset,
......@@ -137,7 +138,7 @@ export default {
current: 1,
size: 10,
total: 0,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
searchVal: "",
tableData: [],
AddVisible: false,
......
<template>
<div class="field-config">
<!-- 头部 -->
<div class="header flex aic jcb mb20">
<div class="header flex aic jcb mb20 pdr6">
<a-button type="primary" @click="handleAdd">新增字段</a-button>
<a-input-search
style="width: 300px"
......@@ -43,8 +43,8 @@
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<a class="edit" @click="handleEdit(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a>
<span class="primary pointer" @click="handleEdit(text)">编辑</span>
<span class="delete pointer" @click="handleDel(text.id)">删除</span>
</a-space>
</template>
</a-table>
......@@ -62,7 +62,7 @@
<script>
import AddField from "../modal/AddField.vue";
import { getTempleteList, deleteTemplete } from "@/services/market";
import { pageSizeOptions } from "@/config/pageConfig.js";
export default {
// props: {
// // 应用信息
......@@ -126,7 +126,7 @@ export default {
current: 1,
size: 10,
total: 0,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
searchVal: "",
tableData: [],
fieldVisible: false,
......
<template>
<div class="terminal">
<div class="header flex aic jcb mb20">
<div class="header flex aic jcb mb20 pdr6">
<a-space>
<a-button type="primary" @click="handleAdd"> 新增应用 </a-button>
<a-button type="primary" @click="handleClone"> 克隆 </a-button>
......@@ -55,7 +55,7 @@
</template>
<!-- 主题类型 -->
<template slot="appThemeName" slot-scope="text">
{{ filterItems(text.appThemeName, dict.appThemeName) }}
{{ filterItems(text.appThemeName) }}
</template>
<!-- 简介 -->
<template slot="summary" slot-scope="text">
......@@ -83,13 +83,15 @@
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<a class="edit" @click="handleEdit(text)">编辑</a>
<a class="primary" @click="handleCheck(text.id)">查看</a>
<a
class="delete"
<span class="primary pointer" @click="handleEdit(text)">编辑</span>
<span class="primary pointer" @click="handleCheck(text.id)"
>查看</span
>
<span
class="delete pointer"
:class="{ unDelete: text.distribute }"
@click="handleDel(text.distribute, text.id)"
>删除</a
>删除</span
>
</a-space>
</template>
......@@ -98,7 +100,7 @@
<!-- 新增应用 -->
<AddApp
ref="AddApp"
:dict="dict"
:categoryList="categoryList"
@success="getAppList"
:AddVisible.sync="AddVisible"
:title="title"
......@@ -115,11 +117,16 @@
<script>
import YSwitch from "../../../../components/yswitch/YSwitch.vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
import AddApp from "../modal/AddApp.vue";
import CheckSite from "../modal/CheckSite.vue";
import { getAppList, deleteApp, saveApp } from "@/services/market";
import {
getAppList,
deleteApp,
saveApp,
getCategoryList,
} from "@/services/market";
import { mapMutations } from "vuex";
import { filterItems } from "@/utils";
import local from "@/utils/local";
const columns = [
{
......@@ -178,7 +185,6 @@ export default {
},
data() {
return {
filterItems,
api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
columns,
......@@ -189,12 +195,13 @@ export default {
current: 1,
size: 10,
total: 0,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
selectedRowKeys: [], // 表格勾选数据
AddVisible: false,
title: "新增应用",
siteVisible: false,
dict: {}, // 字典
categoryList: [], // 应用分类列表
};
},
// 进入路由前
......@@ -216,10 +223,24 @@ export default {
// }
// },
created() {
this.getCategoryList();
this.getAppList();
},
methods: {
...mapMutations("site", ["SET_appDict"]),
// 获取分类列表
async getCategoryList() {
this.loading = true;
let res = await getCategoryList({
page: 1,
size: -1,
siteId: this.siteId,
});
let { data } = res.data.data;
if (res.data.code === 1) {
this.categoryList = data;
}
},
// 获取应用列表
async getAppList() {
this.loading = true;
......@@ -351,6 +372,12 @@ export default {
this.getAppList();
}
},
// 过滤分类展示
filterItems(appThemeName) {
return (
this.categoryList.find((v) => v.id == appThemeName).categoryName || "--"
);
},
},
};
</script>
......
<template>
<div class="terminal">
<div class="header flex aic jcb mb20">
<div class="header flex aic jcb mb20 pdr6">
<a-space>
<a-button type="primary" @click="handleAdd"> 新增应用 </a-button>
<a-button type="primary" @click="handleClone"> 克隆 </a-button>
......@@ -55,7 +55,7 @@
</template>
<!-- 主题类型 -->
<template slot="appThemeName" slot-scope="text">
{{ filterItems(text.appThemeName, dict.appThemeName) }}
{{ filterItems(text.appThemeName) }}
</template>
<!-- 简介 -->
<template slot="summary" slot-scope="text">
......@@ -83,13 +83,15 @@
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<a class="edit" @click="handleEdit(text)">编辑</a>
<a class="primary" @click="handleCheck(text.id)">查看</a>
<a
class="delete"
<span class="primary pointer" @click="handleEdit(text)">编辑</span>
<span class="primary pointer" @click="handleCheck(text.id)"
>查看</span
>
<span
class="delete pointer"
:class="{ unDelete: text.distribute }"
@click="handleDel(text.distribute, text.id)"
>删除</a
>删除</span
>
</a-space>
</template>
......@@ -98,7 +100,7 @@
<!-- 新增应用 -->
<AddApp
ref="AddApp"
:dict="dict"
:categoryList="categoryList"
@success="getAppList"
:AddVisible.sync="AddVisible"
:title="title"
......@@ -117,10 +119,15 @@
import YSwitch from "../../../../components/yswitch/YSwitch.vue";
import AddApp from "../modal/AddApp.vue";
import CheckSite from "../modal/CheckSite.vue";
import { getAppList, deleteApp, saveApp } from "@/services/market";
import {
getAppList,
deleteApp,
saveApp,
getCategoryList,
} from "@/services/market";
import local from "@/utils/local";
import { mapMutations } from "vuex";
import { filterItems } from "@/utils";
import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [
{
title: "序号",
......@@ -178,7 +185,6 @@ export default {
},
data() {
return {
filterItems,
api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
columns,
......@@ -189,20 +195,36 @@ export default {
current: 1,
size: 10,
total: 0,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
selectedRowKeys: [], // 表格勾选数据
AddVisible: false,
title: "新增应用",
siteVisible: false,
dict: {}, // 字典
categoryList: [], // 应用分类列表
};
},
created() {
this.getCategoryList();
this.getAppList();
},
methods: {
...mapMutations("site", ["SET_appDict"]),
// 获取分类列表
async getCategoryList() {
this.loading = true;
let res = await getCategoryList({
page: 1,
size: -1,
siteId: this.siteId,
});
let { data } = res.data.data;
if (res.data.code === 1) {
this.categoryList = data;
}
},
// 获取应用列表
async getAppList() {
this.loading = true;
......@@ -335,6 +357,12 @@ export default {
this.getAppList();
}
},
// 过滤分类展示
filterItems(appThemeName) {
return (
this.categoryList.find((v) => v.id == appThemeName).categoryName || "--"
);
},
},
};
</script>
......
......@@ -24,11 +24,11 @@
<a-form-model-item label="应用主题" prop="appThemeName">
<a-select v-model="form.appThemeName" placeholder="请选择应用主题">
<a-select-option
v-for="(v, key) in dict.appThemeName"
:value="key"
:key="key"
v-for="v in categoryList"
:value="'' + v.id"
:key="v.id"
>
{{ v }}
{{ v.categoryName }}
</a-select-option>
</a-select>
</a-form-model-item>
......@@ -163,7 +163,7 @@
>
<a-space size="middle">
<a-button @click="onClose"> 取消 </a-button>
<a-button type="primary" @click="onSubmit"> 保存 </a-button>
<a-button type="primary" @click="onSubmit"> 确定 </a-button>
</a-space>
</div>
<!-- 预览 -->
......@@ -180,6 +180,7 @@ import YSwitch from "../../../../components/yswitch/YSwitch.vue";
import { saveApp } from "@/services/market";
import { mapGetters } from "vuex";
import { changeCodeNumber } from "@/utils/validate";
// import local from "@/utils/local";
import PrevieModal from "@/components/PrevieModal.vue";
export default {
components: {
......@@ -197,12 +198,10 @@ export default {
required: true,
default: false,
},
dict: {
type: Object,
categoryList: {
type: Array,
required: true,
default: () => {
return {};
},
default: () => [],
},
},
data() {
......
<template>
<div>
<a-modal
v-model="Visible"
:maskClosable="false"
:title="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="categoryName">
<a-input v-model="form.categoryName" placeholder="请输入主题名称" />
</a-form-model-item>
<a-form-model-item label="主题编码" prop="categoryCode">
<a-input v-model="form.categoryCode" placeholder="请输入主题编码" />
</a-form-model-item>
<a-form-model-item label="排序" prop="sort">
<a-input-number v-model="form.sort" :min="1" />
</a-form-model-item>
</a-form-model>
</a-modal>
</div>
</template>
<script>
import { saveCategory } from "@/services/market";
import local from "@/utils/local";
export default {
props: {
addVisile: {
type: Boolean,
require: true,
default: false,
},
title: {
require: true,
default: "新增分类",
},
},
components: {},
data() {
return {
form: {
siteId: local.getLocal("siteId"), // 站点id
siteName: local.getLocal("siteName"), // 站点名称
categoryName: "", // 分类名称
categoryCode: "", // 分类编码
sort: 99, // 排序
},
rules: {
categoryName: [
{ required: true, message: "请输入分类名称", trigger: "blur" },
],
categoryCode: [
{ required: true, message: "请输入分类编码", trigger: "blur" },
],
},
};
},
computed: {
Visible: {
get() {
return this.addVisile;
},
set(val) {
this.$emit("update:addVisile", val);
},
},
},
created() {},
methods: {
// 新增
onAdd() {
Object.assign(this.form, this.$options.data().form);
this.form.id && this.$delete(this.form, "id");
},
// 编辑
onEdit(data) {
this.form = { ...data };
},
// 关闭弹窗
handleClose() {
this.$refs.form.resetFields();
this.Visible = false;
},
// 保存
handleOk() {
this.$refs.form.validate(async (valid) => {
if (valid) {
let res = await saveCategory(this.form);
let { code, msg } = res.data;
if (code == 1) {
this.$message.success(msg);
this.$emit("addSuccess");
this.handleClose();
}
}
});
},
// 重置
handleReset() {
this.$refs.form.resetFields();
},
},
};
</script>
<style lang="less" scoped></style>
......@@ -2,11 +2,15 @@
<div class="basicset-tab1">
<div class="left">
<div class="header">
<h3 class="titel">站点业务列表</h3>
<div class="control">
<div class="titel">站点业务列表</div>
<div class="control pdr6">
<div>
<a-button type="danger" @click="handleDelAll"> 批量移除 </a-button>
<a-button class="add-btn" @click="showModal"> 新增业务 </a-button>
<a-space size="middle">
<a-button type="primary" @click="showModal"> 新增业务 </a-button>
<a-button type="danger" @click="handleDelAll">
批量移除
</a-button>
</a-space>
</div>
<div class="business-control">
<a-input-search
......@@ -60,15 +64,20 @@
{{ text.businessName }}
</template>
<template slot="action" slot-scope="text">
<a href="javascript:;" class="edit" @click="handleEdit(text)"
>编辑</a
<a-space size="middle">
<span
href="javascript:;"
class="primary pointer"
@click="handleEdit(text)"
>编辑</span
>
<a
<span
href="javascript:;"
class="delete"
class="delete pointer"
@click="handleDel(text.id, text)"
>删除</a
>删除</span
>
</a-space>
</template>
</a-table>
</div>
......@@ -76,8 +85,8 @@
<!-- 右 -->
<div class="right">
<div class="header">
<h3 class="titel">一体化业务列表</h3>
<div class="control">
<div class="titel">一体化业务列表</div>
<div class="control pdr6">
<div>
<a-button type="primary" @click="handleAddAll"> 批量加入 </a-button>
</div>
......@@ -132,13 +141,17 @@
{{ text.name }}
</template>
<template slot="action" slot-scope="text">
<a class="jion" @click="handleIn(text.id)">加入</a>
<a
<a-space size="middle">
<span class="primary pointer" @click="handleIn(text.id)"
>加入</span
>
<span
href="javascript:;"
class="delete"
class="delete pointer"
@click="handleDelRight(+text.id)"
>删除</a
>删除</span
>
</a-space>
</template>
</a-table>
</div>
......@@ -156,6 +169,7 @@
<script>
import addprofession from "../group/addprofession.vue";
import local from "@/utils/local";
import { pageSizeOptions } from "@/config/pageConfig.js";
import {
getBusinessList,
delSiteBusiness,
......@@ -234,7 +248,7 @@ export default {
rightTotal: 0,
leftSize: 10,
rightSize: 10,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
serchData: "",
siteId: local.getLocal("siteId"), // 站点id
businessIds: "", // 业务id
......@@ -542,24 +556,12 @@ export default {
.header {
height: 100px;
.titel {
font-size: 18px;
margin-bottom: 15px;
}
.ant-btn {
margin-right: 19px;
}
}
}
.edit {
color: #03d76f;
margin-right: 10px;
}
.delete {
color: #f94545;
}
.jion {
color: #67b6ff;
margin-right: 10px;
}
// .ant-pagination {
// margin-top: 20px;
// }
......@@ -572,10 +574,7 @@ export default {
// .table-content {
// height: 500px;
// }
.add-btn {
background-color: #04cb8f;
color: #fff;
}
// .table-name {
// width: 92%;
// text-align: center;
......
......@@ -2,8 +2,8 @@
<div class="basicset-tab2">
<div class="left">
<div class="header">
<h3 class="titel">站点事项列表</h3>
<div class="header-bottom">
<div class="titel">站点事项列表</div>
<div class="header-bottom pdr6">
<div class="left-btn">
<a-button type="danger" @click="handleDelAll"> 批量移除 </a-button>
</div>
......@@ -11,14 +11,34 @@
<a-space>
<a-select
style="width: 120px"
allowClear
v-model="leftSource"
class="select-department"
placeholder="事项来源"
>
<a-select-option value=""> 全部来源 </a-select-option>
<a-select-option :value="0"> 一体化添加 </a-select-option>
<a-select-option :value="1"> 手动添加 </a-select-option>
</a-select>
<a-select
showSearch
style="min-width: 120px"
v-model="leftDept"
class="select-department"
placeholder="部门搜索"
optionFilterProp="label"
>
<a-select-option value="" label="全部部门">
全部部门
</a-select-option>
<a-select-option
v-for="v in deptList"
:key="v.id"
:value="v.deptNumber"
:label="v.name"
>
{{ v.name }}
</a-select-option>
</a-select>
<a-input-search
v-model="searchLeftVal"
placeholder="请输入事项名称搜索"
......@@ -87,18 +107,18 @@
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space>
<a
<span
href="javascript:;"
v-if="text.source == 1"
class="edit"
class="primary pointer"
@click="handleSiteEdit(text)"
>编辑</a
>编辑</span
>
<a
<span
href="javascript:;"
class="delete"
class="delete pointer"
@click="handleDel(text.id, text)"
>移除</a
>移除</span
>
</a-space>
</template>
......@@ -108,24 +128,48 @@
<!-- 右 -->
<div class="right">
<div class="header">
<h3 class="titel">基础事项列表</h3>
<div class="control">
<div class="titel">基础事项列表</div>
<div class="control pdr6">
<div>
<a-button type="primary" @click="handleAddAll"> 批量加入 </a-button>
<a-button class="add-btn" @click="addMatter"> 新增事项 </a-button>
<a-space size="middle">
<a-button type="primary" @click="handleAddAll">
批量加入
</a-button>
<a-button type="primary" @click="addMatter"> 新增事项 </a-button>
</a-space>
</div>
<div>
<a-space>
<a-select
style="width: 120px"
allowClear
v-model="rightSource"
class="select-department"
placeholder="事项来源"
>
<a-select-option value=""> 全部来源 </a-select-option>
<a-select-option :value="0"> 一体化事项 </a-select-option>
<a-select-option :value="1"> 自建事项 </a-select-option>
</a-select>
<a-select
showSearch
style="min-width: 120px"
v-model="rightDept"
class="select-department"
placeholder="部门搜索"
optionFilterProp="label"
>
<a-select-option value="" label="全部部门">
全部部门
</a-select-option>
<a-select-option
v-for="v in deptList"
:key="v.id"
:value="v.deptNumber"
:label="v.name"
>
{{ v.name }}
</a-select-option>
</a-select>
<a-input-search
v-model="searchRightVal"
placeholder="请输入事项名称搜索"
......@@ -185,22 +229,24 @@
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a href="javascript:;" class="jion" @click="handleIn(text.id)"
<a-space size="middle">
<a href="javascript:;" class="primary" @click="handleIn(text.id)"
>加入</a
>
<a
<span
href="javascript:;"
v-if="text.source == 1"
class="edit"
class="primary pointer"
@click="handleEdit(text.id)"
>编辑</a
>编辑</span
>
<a
<span
href="javascript:;"
class="delete"
class="delete pointer"
@click="handleDelRight(text.id)"
>删除</a
>删除</span
>
</a-space>
</template>
</a-table>
</div>
......@@ -223,8 +269,9 @@ import {
delMatter,
} from "@/services/matter";
import { getBusinessMatterList, delBusinessMatter } from "@/services/business";
import { getDeptList } from "@/services/dept";
import EditSiteMatter from "../group/EditSiteMatter.vue";
// import { getDeptList } from "@/services/dept";
import { pageSizeOptions } from "@/config/pageConfig.js";
import local from "@/utils/local";
import { mapMutations } from "vuex";
const leftColumns = [
......@@ -286,7 +333,7 @@ const rightColumns = [
},
{
title: "操作",
width: "130px",
width: "140px",
scopedSlots: {
customRender: "action",
},
......@@ -303,8 +350,10 @@ export default {
rightColumns,
leftLoading: false,
rightLoading: false,
leftSource: undefined, // 左边来源
rightSource: undefined, // 右边来源
leftSource: "", // 左边来源
leftDept: "", // 左边部门搜索
rightDept: "", // 右边部门搜索
rightSource: "", // 右边来源
selectedRowKeys: [],
matterSiteData: [], // 站点事项
matterDataList: [], //事项列表数据
......@@ -317,7 +366,7 @@ export default {
rightTotal: 0,
leftSize: 10,
rightSize: 10,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
siteId: local.getLocal("siteId"), // 站点id
matterIds: "", // 事项id
deptList: [], // 站点部门
......@@ -329,12 +378,28 @@ export default {
};
},
created() {
this.getDeptListData();
this.getMatterSiteData();
this.getMatterListData();
},
methods: {
...mapMutations("site", ["SET_matterDict"]),
// 获取部门列表
async getDeptListData(obj = {}) {
this.deptLoading = true;
let res = await getDeptList({
siteId: this.siteId,
page: 1,
size: -1,
...obj,
});
this.deptLoading = false;
let { code, data } = res.data;
if (code === 1) {
this.deptList = data.data;
}
},
// 获取站点事项
async getMatterSiteData(search = {}) {
this.leftLoading = true;
......@@ -344,6 +409,7 @@ export default {
siteId: this.siteId,
source: this.leftSource,
matterName: `%${this.searchLeftVal}%`,
deptCode: this.leftDept,
...search,
});
let { pageInfo, data } = res.data.data;
......@@ -364,6 +430,7 @@ export default {
size: this.rightSize,
matterName: this.searchRightVal,
source: this.rightSource,
deptCode: this.rightDept,
...search,
});
if (res.data.code === 1) {
......@@ -602,11 +669,9 @@ export default {
.header {
height: 100px;
.titel {
font-size: 18px;
margin-bottom: 15px;
}
.ant-btn {
margin-right: 19px;
}
}
.matter-name {
margin-bottom: 10px;
......@@ -625,17 +690,6 @@ export default {
}
}
}
.edit {
color: #03d76f;
margin-right: 10px;
}
.delete {
color: #f94545;
}
.jion {
color: #67b6ff;
margin-right: 10px;
}
.control {
display: flex;
......@@ -647,10 +701,10 @@ export default {
margin-left: 10px;
}
}
.add-btn {
background-color: #04cb8f;
color: #fff;
}
// .add-btn {
// background-color: #04cb8f;
// color: #fff;
// }
// .table-content {
// height: 500px;
// }
......
......@@ -2,8 +2,8 @@
<div class="basicset-tab3">
<div class="left">
<div class="header">
<h3 class="titel">站点业务列表</h3>
<div class="header-bottom">
<div class="titel">站点业务列表</div>
<div class="header-bottom pdr6">
<div class="left-btn">
<a-button type="danger" @click="handleDelAll"> 批量解除 </a-button>
</div>
......@@ -49,11 +49,11 @@
<template slot="action" slot-scope="text">
<a-tooltip>
<template slot="title"> 解除查看 </template>
<a
<span
href="javascript:;"
class="delete"
class="delete pointer"
@click="handleisUnbound(text)"
>解除</a
>解除</span
>
</a-tooltip>
</template>
......@@ -63,12 +63,33 @@
<!-- 右 -->
<div class="right">
<div class="header">
<h3 class="titel">站点事项列表</h3>
<div class="control">
<div class="titel">站点事项列表</div>
<div class="control pdr6">
<div>
<a-button type="primary" @click="handleAddAll"> 批量关联 </a-button>
</div>
<div>
<a-space>
<a-select
showSearch
style="min-width: 120px"
v-model="deptSearch"
class="select-department"
placeholder="部门搜索"
optionFilterProp="label"
>
<a-select-option value="" label="全部部门">
全部部门
</a-select-option>
<a-select-option
v-for="v in deptList"
:key="v.id"
:value="v.deptNumber"
:label="v.name"
>
{{ v.name }}
</a-select-option>
</a-select>
<a-input-search
v-model="rightSearchVal"
placeholder="请输入事项名称搜索"
......@@ -76,6 +97,7 @@
@search="onSearchRight"
allowClear
/>
</a-space>
</div>
</div>
</div>
......@@ -127,7 +149,12 @@
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a href="javascript:;" class="jion" @click="handleIn(text)">关联</a>
<span
href="javascript:;"
class="primary pointer"
@click="handleIn(text)"
>关联</span
>
</template>
</a-table>
</div>
......@@ -154,7 +181,7 @@
<a-select
style="width: 85%"
show-search
:filter-option="filterOption"
optionFilterProp="label"
allowClear
placeholder="请选择业务"
:showArrow="false"
......@@ -165,6 +192,7 @@
v-for="v in SiteBusinessData"
:key="v.id"
:value="v.businessId"
:label="v.businessName"
>
{{ v.businessName }}
</a-select-option>
......@@ -251,6 +279,8 @@
<script>
import { getSiteMatterList } from "@/services/matter";
import { pageSizeOptions } from "@/config/pageConfig.js";
import { getDeptList } from "@/services/dept";
import {
getSiteBusinessList,
// addBusinessMatter,
......@@ -260,7 +290,6 @@ import {
addBatchSave,
// getMatterlistData,
} from "@/services/business";
// import { getDeptList } from "@/services/dept";
import local from "@/utils/local";
const leftColumns = [
{
......@@ -323,6 +352,7 @@ export default {
Leftloading: false,
rightloading: false,
leftSearchVal: "", // 左边搜索
deptSearch: "", // 右边
rightSearchVal: "", // 右边搜索
SiteBusinessData: [], // 站点业务
SiteMatterData: [], //站点事项
......@@ -338,10 +368,10 @@ export default {
rightTotal: 0,
leftSize: 10,
rightSize: 10,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
siteId: local.getLocal("siteId"), // 站点id
matterIds: "", // 业务id
// deptList: [], // 站点部门
deptList: [], // 站点部门
rightSearch: "", // 事项搜索
businessMatterData: [], // 业务关联事项列表数据
unboundBusinessData: {}, // 解除-业务数据
......@@ -363,6 +393,7 @@ export default {
};
},
created() {
this.getDeptListData();
this.getBusinessMatterData();
this.getMatterlistData();
this.getSiteBusinessData();
......@@ -370,6 +401,21 @@ export default {
},
methods: {
// 获取部门列表
async getDeptListData(obj = {}) {
this.deptLoading = true;
let res = await getDeptList({
siteId: this.siteId,
page: 1,
size: -1,
...obj,
});
this.deptLoading = false;
let { code, data } = res.data;
if (code === 1) {
this.deptList = data.data;
}
},
// 获取站点业务关联列表
async getBusinessMatterData(search = {}) {
this.Leftloading = true;
......@@ -432,6 +478,7 @@ export default {
size: this.rightSize,
matterName: `%${this.rightSearchVal}%`,
siteId: this.siteId,
deptCode: this.leftDept,
...search,
});
let { pageInfo, data } = res.data.data;
......@@ -653,8 +700,8 @@ export default {
},
// 关闭关联对话框
handleclose() {
this.selectedRowKeys = [];
this.allCorrelationData = [];
// this.selectedRowKeys = [];
// this.allCorrelationData = [];
this.$refs.formData.resetFields();
this.isCorrelation = false;
},
......@@ -682,11 +729,9 @@ export default {
.header {
height: 100px;
.titel {
font-size: 18px;
margin-bottom: 15px;
}
.ant-btn {
margin-right: 19px;
}
}
}
.matter-name {
......@@ -705,17 +750,7 @@ export default {
}
}
}
.edit {
color: #03d76f;
margin-right: 10px;
}
.delete {
color: #f94545;
}
.jion {
color: #67b6ff;
margin-right: 10px;
}
.ant-pagination {
margin-top: 20px;
}
......@@ -729,10 +764,7 @@ export default {
margin-left: 10px;
}
}
.add-btn {
background-color: #04cb8f;
color: #fff;
}
// .table-content {
// height: 500px;
// }
......
rrent" <template>
<template>
<div class="basicset-tab4">
<div class="left">
<div class="header">
<h3 class="titel">站点事项列表</h3>
<div class="header-bottom flex aic jcb">
<div class="titel">站点事项列表</div>
<div class="header-bottom flex aic jcb pdr6">
<div class="left-btn"></div>
<div>
<a-space>
......@@ -57,6 +57,7 @@ rrent" <template>
current: current,
total: total,
pageSize: size,
size: 'middle',
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
......@@ -118,6 +119,7 @@ rrent" <template>
<script>
import { getSiteMatterList, addSitematter } from "@/services/matter";
import { pageSizeOptions } from "@/config/pageConfig.js";
import { getDeptList } from "@/services/dept";
import local from "@/utils/local";
const columns = [
......@@ -169,7 +171,7 @@ export default {
current: 1,
total: 0,
size: 10,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
siteId: local.getLocal("siteId"), // 站点id
deptList: [], // 站点部门
searchVal: "", // 站点事项搜索
......@@ -283,6 +285,10 @@ export default {
padding: 0px 20px;
.header {
margin-bottom: 15px;
.titel {
font-size: 18px;
margin-bottom: 15px;
}
}
.workguide_btn {
cursor: pointer;
......
......@@ -7,7 +7,7 @@
:maskClosable="false"
>
<a-button slot="footer" @click="handleReset">重置</a-button>
<a-button slot="footer" type="primary" @click="handleOk">保存</a-button>
<a-button slot="footer" type="primary" @click="handleOk">确定</a-button>
<a-form-model
:model="form"
ref="formData"
......
......@@ -90,6 +90,7 @@
<script>
import { getStatementList, delStatement } from "@/services/basicsetFun";
import AddStatement from "../modal/AddStatement.vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [
{
title: "序号",
......@@ -140,7 +141,7 @@ export default {
total: 0,
size: 10,
current: 1,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
selectedRowKeys: [],
tableData: [],
addStatementVisile: false,
......
<template>
<div class="deploy">
<a-card title="部署板块管理" :bordered="false">
<div class="control">
<a-tabs activeKey="model">
<a-tab-pane key="model" tab="部署板块管理">
<div class="control pdr6">
<div>
<a-button type="primary" style="margin-right: 10px" @click="handleAdd"
<a-button
type="primary"
style="margin-right: 10px"
@click="handleAdd"
>新增模块</a-button
>
<a-button type="danger" @click="handleDelAll">批量删除模块</a-button>
<a-button type="danger" @click="handleDelAll"
>批量删除模块</a-button
>
</div>
<div class="search-box">
<a-input-search
......@@ -28,8 +34,8 @@
}"
:loading="loading"
bordered
:scroll="{ y: 560 }"
:columns="columns"
:scroll="{ y: 580 }"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
......@@ -79,23 +85,30 @@
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space>
<a
<span
href="javascript:;"
class="primary"
class="primary pointer"
@click="statementManage(text)"
>配置报表</a
>配置报表</span
>
<a href="javascript:;" class="edit" @click="handleEdit(text)"
>编辑</a
<span
href="javascript:;"
class="primary pointer"
@click="handleEdit(text)"
>编辑</span
>
<a href="javascript:;" class="delete" @click="handleDel(text.id)"
>删除</a
<span
href="javascript:;"
class="delete pointer"
@click="handleDel(text.id)"
>删除</span
>
</a-space>
</template>
</a-table>
</div>
</a-card>
</a-tab-pane>
</a-tabs>
<!-- 新增模块 -->
<a-modal
v-model="visible"
......@@ -233,6 +246,7 @@
import { modelList, addMode, delMode } from "@/services/basicsetFun";
import PrevieModal from "@/components/PrevieModal.vue";
import StatementManage from "./components/StatementManage.vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [
{
title: "序号",
......@@ -288,6 +302,7 @@ export default {
},
data() {
return {
pageSizeOptions,
api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL,
accept: "image/jpeg,image/png,image/svg+xml", // 上传类型
......@@ -310,7 +325,6 @@ export default {
current: 1,
size: 10,
total: 0,
pageSizeOptions: ["10", "30", "50", "100"],
searchValue: "", // 搜索
fileList: [], // 上传列表
rules: {
......@@ -520,6 +534,7 @@ export default {
width: 100%;
height: 100%;
background-color: #fff;
.control {
display: flex;
justify-content: space-between;
......@@ -532,20 +547,20 @@ export default {
// .table-content {
// height: 620px;
// }
.edit {
color: #03d76f;
}
.delete {
color: #f94545;
}
}
.ant-tabs {
width: 100%;
background-color: #fff;
min-height: 100%;
}
/deep/.ant-tabs-content {
padding: 0px 15px 15px 15px;
}
.handle-upload {
margin-bottom: 30px !important;
align-items: flex-start !important;
}
/deep/.ant-card {
width: 100% !important;
}
.svg-box,
/deep/.ant-upload-list-item-thumbnail {
background-color: #54788c;
......
......@@ -10,7 +10,7 @@
</template>
<div class="header">
<span class="title">窗口事项列表</span>
<div class="control">
<div class="control pdr6">
<div class="btn">
<a-button
type="primary"
......@@ -71,12 +71,21 @@
<y-switch v-model="text.isShow" :disabled="!text.isEdit"></y-switch>
</template>
<template slot="action" slot-scope="text">
<a href="javascript:;" class="edit" @click="handleEdit(text)">{{
text.isEdit ? "保存" : "编辑"
}}</a>
<a href="javascript:;" @click="handleDel(+text.id)" class="delete"
>删除</a
<a-space size="middle">
<span
href="javascript:;"
class="pointer"
:class="text.isEdit ? 'edit' : 'primary'"
@click="handleEdit(text)"
>{{ text.isEdit ? "保存" : "编辑" }}</span
>
<span
href="javascript:;"
@click="handleDel(+text.id)"
class="delete pointer"
>删除</span
>
</a-space>
</template>
</a-table>
</div>
......@@ -133,9 +142,14 @@
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: page,
pageSize: matterSize,
total: matterTotal,
size: 'small',
onChange: changeMatter,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onShowSizeChange: sizeChange,
}"
:columns="matterColumns"
:data-source="siteMatterData"
......@@ -163,6 +177,7 @@
<script>
import { getSiteMatterList } from "@/services/matter";
import { pageSizeOptions } from "@/config/pageConfig.js";
import {
saveWindowbatch,
getWindowmatterList,
......@@ -247,11 +262,12 @@ export default {
Current: 1,
size: 10,
total: 0,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
tableData: [],
siteMatterData: [], // 站点事项列表
matterTotal: 0,
page: 1,
matterSize: 10,
matterLoading: false,
matterKeys: [],
matterRows: [],
......@@ -296,7 +312,7 @@ export default {
this.matterLoading = true;
let res = await getSiteMatterList({
page: this.page,
size: 10,
size: this.matterSize,
siteId: this.windowInfo.siteId,
matterName: `%${this.matterNameSearch}%`,
source: this.source,
......@@ -305,6 +321,7 @@ export default {
let { data, total } = res.data.data;
this.siteMatterData = data;
this.matterTotal = total;
console.log(data);
this.matterLoading = false;
},
// 站点事项翻页
......@@ -312,6 +329,13 @@ export default {
this.page = cur;
this.getSiteMatterData();
},
// 站点事项改变每页显示数量
sizeChange(current, size) {
console.log(current, size);
this.page = current;
this.matterSize = size;
this.getSiteMatterData();
},
// 站点事项搜索
onSearchMatter() {
this.page = 1;
......@@ -497,13 +521,6 @@ export default {
margin-top: 10px;
}
.edit {
color: #03d76f;
margin-right: 10px;
}
.delete {
color: #fa6d6e;
}
.ant-form-item {
display: flex;
align-items: center !important;
......
......@@ -75,11 +75,42 @@
<!-- 窗口管理 -->
<div class="ff window-box">
<div class="department_right_add">
<div>窗口管理</div>
<div class="flex aic jcb">
<a-button type="primary" @click="addModal" class="department_btnadd"
>新增窗口</a-button
<div class="department_manage">窗口管理</div>
<div class="flex aic jcb pdr6">
<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"
......@@ -96,6 +127,7 @@
<a-table
:scroll="{ y: 580 }"
:loading="loading"
bordered
:columns="columns"
:data-source="windowData"
:pagination="{
......@@ -141,11 +173,19 @@
</template>
<!-- 操作 -->
<div slot="action" slot-scope="text">
<div class="flex flexwrap">
<a class="yewu" type="primary" @click="workModal(text)">业务</a>
<a class="shixiang" @click="addWindowMatter(text)">事项</a>
<a class="edit" type="primary" @click="editModal(text)">编辑</a>
<a class="delete" @click="delWindow(text.id)">删除</a>
<div class="flex jcb flexwrap">
<span class="primary pointer" @click="workModal(text)"
>业务</span
>
<span class="primary pointer" @click="addWindowMatter(text)"
>事项</span
>
<span class="primary pointer" @click="editModal(text)"
>编辑</span
>
<span class="delete pointer" @click="delWindow(text.id)"
>删除</span
>
</div>
</div>
</a-table>
......@@ -178,18 +218,28 @@
<script>
import { Empty } from "ant-design-vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
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 = [
export default {
components: {
adddepartment,
addwindow,
addWindowBusiness,
},
data() {
const columns = [
{
title: "序号",
width: "6%",
......@@ -204,13 +254,17 @@ const columns = [
},
{
title: "编号",
dataIndex: "fromnum",
width: "10%",
customRender: (text) => {
return text.fromnum || "--";
},
},
{
title: "所属部门",
width: "10%",
dataIndex: "deptName",
customRender: (text) => {
return text.deptName || "--";
},
},
{
title: "工作人员",
......@@ -253,16 +307,10 @@ const columns = [
customRender: "action",
},
},
];
export default {
components: {
adddepartment,
addwindow,
addWindowBusiness,
},
data() {
];
return {
spinning: false,
api: process.env.VUE_APP_API_BASE_URL + "/",
loading: false,
deptLoading: false,
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
......@@ -285,7 +333,7 @@ export default {
page: 1,
size: 10,
total: 0,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
// businessPage: 1, // 站点业务翻页
// businessTotal: 0, // 站点业务总数
rules: {
......@@ -334,6 +382,9 @@ export default {
this.$route.meta.isBack = false;
}
},
computed: {
...mapGetters("site", ["token"]),
},
created() {},
methods: {
// 去掉空children
......@@ -544,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>
......@@ -565,7 +645,8 @@ export default {
margin-right: 30px;
}
.department_manage {
margin-bottom: 10px;
font-size: 18px;
margin-bottom: 15px;
}
.department_add {
background-color: #0595fd;
......@@ -641,20 +722,12 @@ export default {
margin-left: 10px;
}
.department_right_tab {
margin-top: 20px;
margin-top: 10px;
}
.department_right_table {
font-size: 5px;
background-color: #fff;
}
.edit {
color: #03d76f;
margin-right: 5px;
}
.delete {
color: red;
cursor: pointer;
}
.yewu {
color: #0595fd;
margin-right: 5px;
......
<template>
<div class="hall-manage">
<div class="control flex aic jcb mb20">
<div class="control flex aic jcb mb20 pdr6">
<a-space size="middle">
<a-button type="primary" @click="handleAdd">新增大厅</a-button>
<a-button type="danger" @click="handleDelAll">批量删除</a-button>
......@@ -53,11 +53,17 @@
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<a href="javascript:;" class="edit" @click="handleEdit(text)"
>编辑</a
<span
href="javascript:;"
class="primary pointer"
@click="handleEdit(text)"
>编辑</span
>
<a href="javascript:;" class="delete" @click="handleDel(text.id)"
>删除</a
<span
href="javascript:;"
class="delete pointer"
@click="handleDel(text.id)"
>删除</span
>
</a-space>
</template>
......@@ -75,6 +81,7 @@
<script>
import { getHallList, delHall } from "@/services/hall";
import { pageSizeOptions } from "@/config/pageConfig.js";
import loacl from "@/utils/local";
import AddHall from "./modal/AddHall.vue";
export default {
......@@ -141,7 +148,7 @@ export default {
size: 10,
total: 0,
siteId: loacl.getLocal("siteId"),
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
searchValue: "", // 搜索
dataList: [],
};
......
......@@ -2,8 +2,8 @@
<div class="hall-window">
<div class="left">
<div class="header">
<h3 class="titel">大厅窗口</h3>
<div class="control">
<div class="titel">大厅窗口</div>
<div class="control pdr6">
<a-button type="danger" @click="handleDelAll"> 批量移除 </a-button>
<div class="business-control">
<a-space>
......@@ -68,8 +68,11 @@
</span>
</template>
<template slot="action" slot-scope="text">
<a href="javascript:;" class="delete" @click="handleDel(text.id)"
>移除</a
<span
href="javascript:;"
class="delete pointer"
@click="handleDel(text.id)"
>移除</span
>
</template>
</a-table>
......@@ -78,8 +81,8 @@
<!-- 右 -->
<div class="right">
<div class="header">
<h3 class="titel">站点窗口</h3>
<div class="control">
<div class="titel">站点窗口</div>
<div class="control pdr6">
<div>
<a-button type="primary" @click="handleAddAll"> 批量加入 </a-button>
</div>
......@@ -148,7 +151,9 @@
<template slot="action" slot-scope="text">
<a-space size="middle">
<a class="jion" @click="handleIn([text])">加入大厅</a>
<span class="primary pointer" @click="handleIn([text])"
>加入大厅</span
>
</a-space>
</template>
</a-table>
......@@ -166,6 +171,7 @@
<script>
import { getHallList, getWindowHallList, delWindowHall } from "@/services/hall";
import { pageSizeOptions } from "@/config/pageConfig.js";
import WindowToHall from "./modal/WindowToHall.vue";
import local from "@/utils/local";
import { getDeptList, getSubHalllist } from "@/services/dept";
......@@ -248,7 +254,7 @@ export default {
rightTotal: 0,
leftSize: 10,
rightSize: 10,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
siteId: local.getLocal("siteId"), // 站点id
hallWindowData: [], // 大厅窗口数据
siteWindowData: [], // 站点窗口数据
......@@ -455,6 +461,7 @@ export default {
.header {
height: 100px;
.titel {
font-size: 18px;
margin-bottom: 15px;
}
}
......
<template>
<div class="festival festival">
<div class="skins_bnt btn-box">
<div class="skins_bnt btn-box pdr6">
<!-- 新增按钮 -->
<a-button type="primary" @click="showModal" class="skins_btn_1"
>新增节日</a-button
>
<div>
<a-input-search
style="width: 300px"
allowClear
placeholder="请输入年份查询"
enter-button="搜索"
<a-space>
<a-select
showSearch
optionFilterProp="label"
v-model="year"
@search="onSearch"
/>
style="width: 180px"
placeholder="请选择年份查询"
>
<a-select-option value="" label="全部年份">
全部年份
</a-select-option>
<a-select-option
:label="v"
v-for="v in yearData"
:key="v"
:value="v"
>
{{ v }}
</a-select-option>
</a-select>
<a-button type="primary" @click="onSearch"> 搜索 </a-button>
</a-space>
</div>
</div>
<div class="table-content">
......@@ -63,8 +77,8 @@
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space>
<a @click="handleEdit(text)" class="edit">编辑</a>
<a-space size="middle">
<a @click="handleEdit(text)" class="primary">编辑</a>
<a class="delet" @click="handleDel(text.id)">删除</a>
</a-space>
</template>
......@@ -80,6 +94,7 @@
<script>
import { getHolidayList, DelHoliday } from "@/services/festival";
import { pageSizeOptions } from "@/config/pageConfig.js";
import addfestivals from "./components/addfestivals.vue";
import local from "@/utils/local";
const columns = [
......@@ -147,13 +162,15 @@ export default {
page: 1,
size: 10,
total: 0,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
year: "",
siteId: local.getLocal("siteId"),
yearData: [], // 年份搜索数据
};
},
created() {
this.getHolidayData();
this.getYearData();
},
methods: {
// 获取节假日列表
......@@ -229,6 +246,13 @@ export default {
},
});
},
// 获取年份选择数据
getYearData() {
let curYear = new Date().getFullYear();
for (let i = curYear; i >= 1990; i--) {
this.yearData.push(i);
}
},
},
};
</script>
......
......@@ -6,6 +6,7 @@
<script>
import local from "@/utils/local";
import { mapMutations } from "vuex";
export default {
data() {
return {};
......@@ -14,6 +15,12 @@ export default {
this.getToken();
},
methods: {
...mapMutations("site", [
"SET_userInfo",
"SET_token",
"SET_SITE_ID",
"SET_siteName",
]),
// 获取token
getToken() {
let token = this.$route.query.token;
......@@ -22,8 +29,12 @@ export default {
let siteName = this.$route.query.siteName;
if (token && userInfo) {
userInfo = JSON.parse(userInfo);
local.setLocal("token", token);
local.setLocal("baseUserInfo", userInfo);
this.SET_userInfo(userInfo);
this.SET_token(token);
this.SET_SITE_ID(siteId);
this.SET_siteName(siteName);
// local.setLocal("token", token);
// local.setLocal("baseUserInfo", userInfo);
local.setLocal("siteId", siteId);
local.setLocal("siteName", siteName);
this.$router.push("/website");
......@@ -38,5 +49,4 @@ export default {
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<style lang="less" scoped></style>
......@@ -786,20 +786,7 @@ export default {
height: 100px;
object-fit: cover;
}
.color_title {
margin-left: 15px;
position: relative;
margin-bottom: 15px;
&::before {
content: "";
width: 4px;
height: 20px;
position: absolute;
top: 1px;
left: -16px;
background-color: rgba(5, 149, 253, 1);
}
}
.building,
.level {
position: relative;
......@@ -829,9 +816,14 @@ export default {
}
/deep/.model-id {
display: flex !important;
align-items: flex-start;
.ant-form-item-label {
line-height: 22px;
}
.ant-checkbox-group {
display: grid;
grid-template-columns: 160px 160px 160px 160px 160px 160px;
}
.ant-checkbox-wrapper {
margin-left: 0px;
margin-right: 6px;
......
......@@ -18,6 +18,7 @@
<div class="site_box">
<div class="site_message">站点信息</div>
<div class="btn-box">
<a-space size="middle">
<a-button
v-permission="[1]"
type="primary"
......@@ -30,6 +31,7 @@
<a-button type="danger" @click="deleteSite(item.id, index)"
>删除</a-button
>
</a-space>
</div>
</div>
......@@ -468,17 +470,17 @@ export default {
.site_message {
font-weight: 600;
}
.ant-btn-primary {
background-color: rgba(4, 202, 143, 1);
border-color: rgba(4, 202, 143, 1);
padding-left: 20px;
padding-right: 20px;
margin-right: 30px;
}
.ant-btn-danger {
padding-left: 20px;
padding-right: 20px;
}
// .ant-btn-primary {
// background-color: rgba(4, 202, 143, 1);
// border-color: rgba(4, 202, 143, 1);
// padding-left: 20px;
// padding-right: 20px;
// margin-right: 30px;
// }
// .ant-btn-danger {
// padding-left: 20px;
// padding-right: 20px;
// }
.btn-box {
margin-right: 20px;
}
......@@ -531,11 +533,13 @@ export default {
display: flex;
flex-wrap: wrap;
.item {
width: 120px;
background-color: rgba(30, 159, 255, 0.2);
margin-right: 10px;
margin-bottom: 10px;
padding: 6px 16px;
padding: 6px;
border-radius: 5px;
text-align: center;
}
}
}
......@@ -547,20 +551,6 @@ export default {
}
}
}
.color_title {
margin-left: 15px;
position: relative;
margin-bottom: 15px;
&::before {
content: "";
width: 4px;
height: 20px;
position: absolute;
top: 1px;
left: -16px;
background-color: rgba(5, 149, 253, 1);
}
}
.model_base {
/deep/.ant-col-3 {
......
......@@ -11,7 +11,7 @@
</a-tooltip>
<span>皮肤模板</span>
</div>
<div class="header">
<div class="header pdr6">
<a-space>
<a-button type="primary" @click="handleAddTemplate"
>新增皮肤模板</a-button
......@@ -61,8 +61,11 @@
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space>
<a href="javascript:;" class="edit" @click="handleEdit(text)"
<a-space size="middle">
<a
href="javascript:;"
class="primary"
@click="handleEdit(text)"
>编辑</a
>
<a
......@@ -75,26 +78,12 @@
</template>
</a-table>
</div>
<!-- 翻页 -->
<!-- <div class="pagination" v-if="leftTotal">
<a-pagination
v-model="leftCurrent"
:show-total="(total) => `共 ${total} 条`"
:total="leftTotal"
@change="changeLeft"
show-less-items
show-size-changer
show-quick-jumper
:pageSizeOptions="pageSizeOptions"
@showSizeChange="showSizeChange"
/>
</div> -->
</a-card>
</div>
<!-- 右 -->
<div class="right">
<a-card title="模板属性" :bodyStyle="{ height: '79vh' }">
<div class="header">
<div class="header pdr6">
<div>
<a-space>
<a-button type="primary" @click="handleAddField"
......@@ -173,8 +162,8 @@
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space>
<a class="edit" @click="handleEditRight(text)">编辑</a>
<a-space size="middle">
<a class="primary" @click="handleEditRight(text)">编辑</a>
<a
href="javascript:;"
class="delete"
......@@ -185,20 +174,6 @@
</template>
</a-table>
</div>
<!-- 分页 -->
<!-- <div class="pagination" v-if="rightTotal">
<a-pagination
v-model="rightCurrent"
:show-total="(total) => `共 ${total} 条`"
:total="rightTotal"
@change="changeRight"
show-less-items
show-size-changer
show-quick-jumper
:pageSizeOptions="pageSizeOptions"
@showSizeChange="showSizeChangeRight"
/>
</div> -->
</a-card>
</div>
</div>
......@@ -231,6 +206,7 @@ import {
} from "@/services/surface";
import AddTemplate from "./modal/AddTemplate.vue";
import AddField from "./modal/AddField.vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
const leftColumns = [
{
title: "序号",
......@@ -325,7 +301,7 @@ export default {
rightCurrent: 1,
rightSize: 10,
rightTotal: 0,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
visibleTemplate: false,
visibleField: false,
titleTemplate: "",
......
......@@ -12,7 +12,7 @@
<!-- 头部 -->
<div class="header flex jcb">
<div class="header-title flex aic">
<img src="../../../../assets/img/logo.png" />
<!-- <img src="../../../../assets/img/logo.png" /> -->
<h1 :style="{ color: filterItem('2', 0) }">政务服务中心</h1>
</div>
<div class="flex header-right jcb">
......
......@@ -12,7 +12,7 @@
<!-- 头部 -->
<div class="header flex jcb">
<div class="header-title flex aic">
<img src="../../../../assets/img/logo.png" />
<!-- <img src="../../../../assets/img/logo.png" /> -->
<h1 :style="{ color: filterItem('2', 0) }">政务服务中心</h1>
</div>
<div
......
......@@ -12,7 +12,7 @@
<!-- 头部 -->
<div class="header flex aic jcb">
<div class="title flex aic">
<img src="../../../../assets/img/logo.png" />
<!-- <img src="../../../../assets/img/logo.png" /> -->
<h1 :style="{ color: filterItem('2', 0) }">政务服务中心</h1>
</div>
<div class="time" :style="{ color: filterItem('3', 0) }">
......@@ -157,6 +157,122 @@
</div>
</div>
</div>
<!-- 集中显示屏 竖版 -->
<div
class="vertical-skin"
:id="conponentsId"
v-else-if="imageResolution === '2'"
:style="{
background: filterItem('1', 0),
}"
>
<!-- 头部 -->
<div class="header flex aic jcc">
<h1 :style="{ color: filterItem('2', 0) }">政务服务中心</h1>
</div>
<!-- 主体 -->
<div class="main flex flexc aic jcb">
<div class="call-out flex flexc jcb">
<div class="call-out-item">
<div class="call-out-item-title">正在呼叫</div>
<div class="call-out-item-text call-out-item-text-1">
<span
class="call-out-item-code"
:style="{ color: filterItem('7', 0) }"
>A0004号</span
>
<span
class="call-out-item-code"
:style="{ color: filterItem('7', 0) }"
>03号窗口</span
>
</div>
</div>
<div class="call-out-item">
<div class="call-out-item-title">正在办理</div>
<div class="call-out-item-text call-out-item-text-2">
<span
class="call-out-item-code"
:style="{ color: filterItem('7', 0) }"
>A0004号</span
>
<span
class="call-out-item-code"
:style="{ color: filterItem('7', 0) }"
>03号窗口</span
>
</div>
</div>
<div class="call-out-item">
<div class="call-out-item-title">正在办理</div>
<div class="call-out-item-text call-out-item-text-2">
<span
class="call-out-item-code"
:style="{ color: filterItem('7', 0) }"
>A0004号</span
>
<span
class="call-out-item-code"
:style="{ color: filterItem('7', 0) }"
>03号窗口</span
>
</div>
</div>
<div class="call-out-item" v-for="v in 4" :key="v">
<div class="call-out-item-title">等待中</div>
<div class="call-out-item-text call-out-item-text-3">
<span
class="call-out-item-code"
:style="{ color: filterItem('7', 0) }"
>A0004号</span
>
<span
class="call-out-item-code"
:style="{ color: filterItem('7', 0) }"
>--</span
>
</div>
</div>
</div>
<!-- banner -->
<div class="banner border flex aic jcc">banner</div>
</div>
<!-- 尾部 -->
<div class="footer flex aic jca">
<div class="footer-item flex flexc jcc aic">
<p :style="{ color: filterItem('5', 0) }">今日取号量</p>
<p class="footer-count" :style="{ color: filterItem('6', 0) }">
200次
</p>
</div>
<div class="footer-item flex flexc jcc aic">
<p :style="{ color: filterItem('5', 0) }">累计取号量</p>
<p class="footer-count" :style="{ color: filterItem('6', 0) }">
200次
</p>
</div>
<div class="footer-item flex flexc jcc aic">
<p :style="{ color: filterItem('5', 0) }">当前等待人数</p>
<p class="footer-count" :style="{ color: filterItem('6', 0) }">
200人
</p>
</div>
<div class="footer-item flex flexc jcc aic">
<p :style="{ color: filterItem('5', 0) }">评价等待时间</p>
<p class="footer-count" :style="{ color: filterItem('6', 0) }">
12分钟
</p>
</div>
</div>
</div>
<!-- 空数据显示 -->
<div class="empty flex aic jcc" v-else>
<a-empty
......@@ -255,6 +371,9 @@ export default {
</script>
<style lang="less" scoped>
.border {
border: 1px dashed #1890ff;
}
.centralize-across {
width: 1000px;
height: 562.5px;
......@@ -347,4 +466,90 @@ export default {
}
}
}
.vertical-skin {
height: 1000px;
width: 562px;
padding: 0px 10px;
background-image: linear-gradient(#26c5ff, #2c66ff);
background-repeat: no-repeat !important;
background-position: center !important;
background-size: 100% 100% !important;
.header {
height: 80px;
h1 {
margin: 0px;
margin-left: 10px;
font-size: 30px;
font-weight: bold;
color: #fff;
}
}
.main {
width: 100%;
padding: 10px;
border-radius: 4px;
background-color: #fff;
.banner {
width: 100%;
height: 360px;
border-radius: 4px;
color: #1890ff;
}
.call-out {
width: 100%;
.call-out-item {
width: 100%;
height: 50px;
margin-bottom: 10px;
border-radius: 8px;
position: relative;
background-color: #ccc;
.call-out-item-title {
height: 100%;
width: 20%;
text-align: center;
line-height: 50px;
color: #fff;
font-size: 16px;
border-radius: inherit;
}
.call-out-item-text {
height: 100%;
width: 80%;
line-height: 50px;
font-size: 20px;
padding: 0px 20px;
border-radius: 12px 8px 8px 0px;
position: absolute;
top: 0px;
right: 0px;
color: #000;
font-weight: 600;
text-align: left;
span {
margin: 0px 10px;
}
}
.call-out-item-text-1 {
background-color: #fdf7f2;
}
.call-out-item-text-2 {
background-color: #f1f8fe;
}
.call-out-item-text-3 {
background-color: #f4f5f6;
}
}
}
}
.footer {
margin-top: 20px;
width: 100%;
color: #fff;
.footer-count {
font-size: 18px;
font-weight: 600;
}
}
}
</style>
\ No newline at end of file
......@@ -47,7 +47,9 @@ export default {
// 搜索
onSearch(val) {
this.getProductList({ productName: `%${val}%` });
if (val) {
this.$emit("searchProduct", val);
}
},
changeMenu(index, row) {
......@@ -66,14 +68,28 @@ export default {
</script>
<style lang="less" scoped>
.left-menu {
height: 100%;
}
.search-box {
padding: 15px 15px 0px;
}
.menu {
height: 70vh;
margin-top: 15px;
overflow-y: auto;
padding: 0px 15px 15px 15px;
.active {
background-color: #1890ff;
color: #fff;
}
}
/deep/.ant-card-grid {
height: 90px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
</style>
\ No newline at end of file
......@@ -12,6 +12,7 @@
</a-select-option>
</a-select>
</div>
<a-spin size="small" :spinning="spinning">
<div class="preview-list">
<div v-if="previewList.length > 0">
<div
......@@ -26,6 +27,7 @@
</div>
<a-empty v-else :image="simpleImage" />
</div>
</a-spin>
<div class="preview-btn">
<a-button type="primary" style="margin-bottom: 10px" @click="AddSurface"
>新增皮肤</a-button
......@@ -54,6 +56,7 @@ export default {
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
categoryId: "", // 分类ID
previewList: [], // 皮肤列表
spinning: false,
};
},
computed: {
......@@ -93,6 +96,7 @@ export default {
// 获取皮肤列表
async getSkinList(search = {}) {
this.isActive = 0;
this.spinning = true;
let res = await getSkinList({
page: 1,
size: -1,
......@@ -100,7 +104,9 @@ export default {
categoryId: this.categoryId,
...search,
});
this.spinning = false;
let { imageResolution } = res.data.dict;
if (res.data.code == 1) {
let { data } = res.data.data;
this.SET_imageResolution(imageResolution);
this.previewList = data;
......@@ -111,6 +117,7 @@ export default {
this.SET_curSkin({});
this.SET_curSkinIndex(0);
}
}
},
// 选取预览图
changePreview(index, row) {
......@@ -151,12 +158,16 @@ export default {
height: 80vh;
display: flex;
flex-direction: column;
padding: 15px 0px;
.preview-seach {
height: 32px;
padding: 0px 15px;
margin-bottom: 15px;
}
.preview-list {
flex: 1;
height: 65vh;
padding: 0px 15px;
display: flex;
flex-direction: column;
border-bottom: 1px solid #ccc;
......
......@@ -22,9 +22,7 @@
</div>
<div class="show-btn flex aic jcc">
<a-space size="middle">
<a-button class="edit-btn" @click="editSurface"
>修改皮肤参数</a-button
>
<a-button type="primary" @click="editSurface">修改皮肤参数</a-button>
<a-button type="danger" @click="handleClose(curSkin.id)"
>删除皮肤</a-button
>
......@@ -205,10 +203,6 @@ export default {
object-fit: contain;
}
}
.edit-btn {
background-color: #03be64;
color: #fff;
}
}
}
// 媒体查询
......
......@@ -174,7 +174,7 @@
type="primary"
:loading="loading"
@click="getPrintScreen"
>保存</a-button
>确定</a-button
>
</a-space>
</div>
......
......@@ -62,7 +62,7 @@
<a-icon type="edit" style="margin-right: 6px" />
<span>编辑</span>
</div>
<div>
<div v-else>
<a-icon type="undo" style="margin-right: 6px" />
<span>保存</span>
</div>
......@@ -98,7 +98,7 @@
</div>
</div>
<div style="text-align: center" v-else>
<a-button class="add-btn" @click="handleAdd">
<a-button type="primary" @click="handleAdd">
<a-icon type="plus" />
新增分类
</a-button>
......@@ -361,7 +361,7 @@ export default {
text-align: center;
cursor: pointer;
line-height: 26px;
background-color: #1890ff;
background: linear-gradient(90deg, #5ab6ff, #2e9aff);
color: #fff;
border-radius: 0px 0px 0px 10px;
}
......
......@@ -12,7 +12,7 @@
<!-- 头部 -->
<div class="header flex aic jcb">
<div class="left flex aic">
<img class="mr20" src="../../../../assets/img/logo.png" />
<!-- <img class="mr20" src="../../../../assets/img/logo.png" /> -->
<div
class="title"
:style="{
......
......@@ -155,14 +155,13 @@ export default {
display: flex;
.menu-box {
width: 20%;
padding: 15px;
height: 100%;
}
.show-box {
width: 65%;
}
.preview-box {
width: 15%;
padding: 15px;
}
}
}
......
......@@ -16,7 +16,7 @@
</div>
<div class="right flex1 flex flexc aic">
<div class="header flex aic jcc">
<img src="../../../../assets/img/logo.png" />
<!-- <img src="../../../../assets/img/logo.png" /> -->
<div>
<h1 :style="{ color: filterItem('7', 0) }">政务服务中心</h1>
</div>
......
......@@ -12,7 +12,7 @@
<!-- 头部 -->
<div class="header flex aic jcb">
<div class="left flex aic">
<img class="mr20" src="../../../../assets/img/logo.png" />
<!-- <img class="mr20" src="../../../../assets/img/logo.png" /> -->
<div
class="title"
:style="{
......
<template>
<div class="parameter">
<div class="control flex aic jcb mb15">
<div class="control flex aic jcb mb15 pdr6">
<div>
<a-button type="primary" style="margin-right: 10px" @click="handleAdd"
>新增</a-button
......@@ -39,7 +39,6 @@
onChange: handleChange,
onShowSizeChange: showSizeChange,
}"
size="small"
:data-source="tableData"
:rowKey="(record) => record.id"
>
......@@ -63,11 +62,17 @@
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<a href="javascript:;" class="edit" @click="handleEdit(text)"
>编辑</a
<span
href="javascript:;"
class="primary pointer"
@click="handleEdit(text)"
>编辑</span
>
<a href="javascript:;" class="delete" @click="handleDel(text.id)"
>删除</a
<span
href="javascript:;"
class="delete pointer"
@click="handleDel(text.id)"
>删除</span
>
</a-space>
</template>
......@@ -86,6 +91,7 @@
<script>
import { getSystemParameterList, delSystemParameter } from "@/services/system";
import { pageSizeOptions } from "@/config/pageConfig.js";
import AddParameter from "./modal/AddParameter.vue";
export default {
components: {
......@@ -168,7 +174,7 @@ export default {
current: 1,
size: 10,
total: 0,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
searchValue: "", // 搜索
tableData: [],
selectedRowKeys: [],
......
......@@ -7,7 +7,7 @@
:maskClosable="false"
>
<a-button slot="footer" @click="handleReset">重置</a-button>
<a-button slot="footer" type="primary" @click="handleOk">保存</a-button>
<a-button slot="footer" type="primary" @click="handleOk">确定</a-button>
<a-form-model
:model="form"
ref="form"
......
<template>
<!-- 系统日志 -->
<div class="system-logs">
<div class="control">
<div class="control pdr6">
<div class="search-box">
<a-input-search
placeholder="请输入请求地址搜索"
......@@ -19,7 +19,6 @@
bordered
:scroll="{ y: 590 }"
:columns="columns"
size="small"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
......@@ -49,6 +48,7 @@
<script>
import { getSystemLogsList } from "@/services/system";
import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [
{
title: "序号",
......@@ -93,7 +93,7 @@ export default {
current: 1,
size: 10,
total: 0,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
searchValue: "", // 搜索
tableData: [],
};
......
<template>
<div class="task-set">
<div class="control flex aic jcb mb15">
<div class="control flex aic jcb mb15 pdr6">
<div>
<a-button type="primary" style="margin-right: 10px" @click="handleAdd"
>新增</a-button
......@@ -39,7 +39,6 @@
onChange: handleChange,
onShowSizeChange: showSizeChange,
}"
size="small"
:data-source="tableData"
:rowKey="(record) => record.id"
>
......@@ -64,11 +63,17 @@
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<a href="javascript:;" class="edit" @click="handleEdit(text)"
>编辑</a
<span
href="javascript:;"
class="primary pointer"
@click="handleEdit(text)"
>编辑</span
>
<a href="javascript:;" class="delete" @click="handleDel(text.id)"
>删除</a
<span
href="javascript:;"
class="delete pointer"
@click="handleDel(text.id)"
>删除</span
>
</a-space>
</template>
......@@ -87,6 +92,7 @@
<script>
import { getSystemTaskList, delSystemTask } from "@/services/system";
import { pageSizeOptions } from "@/config/pageConfig.js";
import AddTask from "./modal/AddTask.vue";
export default {
components: {
......@@ -154,7 +160,7 @@ export default {
current: 1,
size: 10,
total: 0,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
searchValue: "", // 搜索
tableData: [],
selectedRowKeys: [],
......
......@@ -7,7 +7,7 @@
:maskClosable="false"
>
<a-button slot="footer" @click="handleReset">重置</a-button>
<a-button slot="footer" type="primary" @click="handleOk">保存</a-button>
<a-button slot="footer" type="primary" @click="handleOk">确定</a-button>
<a-form-model
:model="form"
ref="form"
......
......@@ -39,8 +39,8 @@
<a-form-model-item label="所属部门" prop="deptId">
<a-select
showSearch
v-model="form.deptId"
optionFilterProp="label"
v-model="form.deptId"
placeholder="请选择部门"
@change="handleDeptSelect"
allowClear
......@@ -56,28 +56,35 @@
</a-select>
</a-form-model-item>
</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-col :span="12">
<a-form-model-item label="所属窗口" prop="windowId">
<a-select
v-model="form.windowId"
placeholder="请选择窗口"
@change="handleWindowSelect"
showSearch
allowClear
optionFilterProp="label"
>
<a-select-option
v-for="v in windowData"
:key="v.id"
:value="v.id"
>{{ v.name }}</a-select-option
:label="v.name + v.fromnum"
:data-name="v.name"
>
<span>{{ v.name }}</span>
<span>--</span>
<span>{{ v.fromnum }}</span>
</a-select-option>
</a-select>
</a-form-model-item>
</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">
......@@ -123,6 +130,8 @@
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="称号" prop="dangyuan">
<a-select
......@@ -392,7 +401,7 @@ export default {
loading: false,
imageUrl: "",
labelCol: { span: 5 },
wrapperCol: { span: 14 },
wrapperCol: { span: 19 },
indeterminate: true,
checkAll: false,
modelIds: [], // 模块
......@@ -401,12 +410,13 @@ export default {
siteId: "",
siteName: "",
},
curWindow: {}, // 当前选择窗口
form: {
// roleId: "", // 权限id
deptId: undefined, // 部门id
deptName: "", //部门名称
windowName: "", // 窗口名称
// windowId: undefined, // 窗口id
windowId: undefined, // 窗口id
siteName: "", // 站点名称
siteId: "", // 站点id
name: "", // 姓名
......@@ -469,6 +479,15 @@ export default {
this.siteInfo.siteId = info.id;
this.siteInfo.siteName = info.label;
},
// 获取窗口列表
async getWindowList(deptId) {
let windowData = [];
let res = await getWindowList({ deptId, page: 1, size: -1 });
if (res.data.code == 1) {
windowData = res.data.data.data;
}
return windowData;
},
// 获取模块
async getModelList() {
let res = await modelList({ page: 1, size: -1 });
......@@ -477,21 +496,30 @@ export default {
// 部门选择
async handleDeptSelect(val, node) {
this.form.windowId = undefined;
// this.form.windowId = undefined;
// this.form.windowName = "";
if (val) {
let { text } = node.componentOptions.children[0];
this.form.deptName = text;
let res = await getWindowList({ deptId: val, page: 1, size: -1 });
this.windowData = res.data.data.data;
// this.windowData = await this.getWindowList(val);
} else {
this.form.deptName = "";
// this.windowData = [];
}
},
//编辑获取窗口
async editWindow(val) {
let res = await getWindowList({ deptId: val, page: 1, size: -1 });
this.windowData = res.data.data.data;
this.windowData = await this.getWindowList(val);
},
// 窗口选择
handleWindowSelect(val, node) {
let { text } = node.componentOptions.children[0];
this.form.windowName = text;
if (val) {
let name = node.data.attrs["data-name"];
this.form.windowName = name;
} else {
this.form.windowName = "";
}
this.$forceUpdate();
},
// 保存
hideModal() {
......@@ -509,9 +537,11 @@ export default {
},
// 编辑
onEdit(data) {
// this.editWindow(data.deptId);
this.form = { ...data };
this.form.loginName && this.$delete(this.form, "loginName");
this.form.loginPwd && this.$delete(this.form, "loginPwd");
this.form.windowId = this.form.windowId ? this.form.windowId : undefined;
if (this.form.photoPath) {
this.fileList = [
{
......@@ -523,16 +553,19 @@ export default {
},
];
}
// this.editWindow(data.deptId);
},
// 关闭对话框
handleClose() {
// this.$refs.formData.resetFields();
this.$refs.formData.resetFields();
this.fileList = [];
this.loading = false;
this.Visible = false;
// this.windowData = [];
// this.form.windowName = "";
},
// 重置
handleReset() {
// this.form.windowName = "";
this.$refs.formData.resetFields();
},
// 照片上传
......
......@@ -39,8 +39,8 @@
<a-form-model-item label="所属部门" prop="deptId">
<a-select
showSearch
v-model="form.deptId"
optionFilterProp="label"
v-model="form.deptId"
placeholder="请选择部门"
@change="handleDeptSelect"
allowClear
......@@ -56,28 +56,35 @@
</a-select>
</a-form-model-item>
</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-col :span="12">
<a-form-model-item label="所属窗口" prop="windowId">
<a-select
v-model="form.windowId"
placeholder="请选择窗口"
@change="handleWindowSelect"
showSearch
allowClear
optionFilterProp="label"
>
<a-select-option
v-for="v in windowData"
:key="v.id"
:value="v.id"
>{{ v.name }}</a-select-option
:label="v.name + v.fromnum"
:data-name="v.name"
>
<span>{{ v.name }}</span>
<span>--</span>
<span>{{ v.fromnum }}</span>
</a-select-option>
</a-select>
</a-form-model-item>
</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">
......@@ -123,6 +130,8 @@
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="称号" prop="dangyuan">
<a-select
......@@ -426,7 +435,7 @@ export default {
loading: false,
imageUrl: "",
labelCol: { span: 5 },
wrapperCol: { span: 14 },
wrapperCol: { span: 19 },
indeterminate: true,
checkAll: false,
modelIds: [], // 模块
......@@ -442,7 +451,7 @@ export default {
deptId: undefined, // 部门id
deptName: "", //部门名称
windowName: "", // 窗口名称
// windowId: undefined, // 窗口id
windowId: undefined, // 窗口id
siteName: "", // 站点名称
siteId: "", // 站点id
name: "", // 姓名
......@@ -510,23 +519,40 @@ export default {
let res = await modelList({ page: 1, size: -1 });
this.modelIds = res.data.data.data;
},
// 获取窗口列表
async getWindowList(deptId) {
let windowData = [];
let res = await getWindowList({ deptId, page: 1, size: -1 });
if (res.data.code == 1) {
windowData = res.data.data.data;
}
return windowData;
},
// 部门选择
async handleDeptSelect(val, node) {
this.form.windowId = undefined;
// this.form.windowId = undefined;
// this.form.windowName = "";
if (val) {
let { text } = node.componentOptions.children[0];
this.form.deptName = text;
let res = await getWindowList({ deptId: val, page: 1, size: -1 });
this.windowData = res.data.data.data;
// this.windowData = await this.getWindowList(val);
} else {
this.form.deptName = "";
// this.windowData = [];
}
},
//编辑获取窗口
async editWindow(val) {
let res = await getWindowList({ deptId: val, page: 1, size: -1 });
this.windowData = res.data.data.data;
this.windowData = await this.getWindowList(val);
},
// 窗口选择
handleWindowSelect(val, node) {
let { text } = node.componentOptions.children[0];
this.form.windowName = text;
if (val) {
let name = node.data.attrs["data-name"];
this.form.windowName = name;
} else {
this.form.windowName = "";
}
},
// 保存
hideModal() {
......@@ -548,18 +574,18 @@ export default {
},
// 重置
handleReset() {
// this.form.windowName = "";
this.$refs.formData.resetFields();
},
// 新增
onAdd() {
Object.assign(this.form, this.$options.data().form);
this.windowData = [];
this.form.id && this.$delete(this.form, "id");
},
// 编辑
onEdit(data) {
this.form = { ...data };
this.editWindow(data.deptId);
// this.editWindow(data.deptId);
if (this.form.photoPath) {
this.fileList = [
{
......@@ -575,6 +601,9 @@ export default {
// 关闭对话框
handleClose() {
// this.$refs.formData.resetFields();
// this.windowData = [];
this.fileList = [];
// this.form.windowName = "";
this.loading = false;
this.Visible = false;
},
......
......@@ -3,7 +3,7 @@
<div class="website">
<!-- 右边 -->
<div class="right ff">
<div class="person_message">工作人员管理</div>
<!-- <div class="person_message">工作人员管理</div> -->
<div class="person_chang">
<div class="person_gruop">选择部门:</div>
<div class="person_gruop1">
......@@ -125,7 +125,7 @@
</a-radio-group> -->
</div>
</div>
<div class="on btn">
<div class="on btn pdr6">
<div>
<a-button type="primary" @click="showModal">新增人员</a-button>
<a-dropdown>
......@@ -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"
>
......@@ -178,7 +182,8 @@
</div>
<div class="in">
<a-input-search
placeholder="请输入姓名或者工号"
placeholder="请输入姓名或者工号搜索"
v-model="searchVal"
enter-button="搜索"
allowClear
@search="onSearch"
......@@ -199,6 +204,7 @@
onChange: handlePagination,
onShowSizeChange: showSizeChange,
}"
bordered
:scroll="{ y: 530 }"
:loading="loading"
:columns="columns"
......@@ -216,6 +222,7 @@
:src="api2 + text.photoPath"
class="pht"
/>
<span v-else>--</span>
</template>
<!-- 电话 -->
......@@ -230,7 +237,7 @@
</div>
<span v-else>--</span>
</template>
<!-- 创建时间 -->
<!-- 所属窗口 -->
<template slot="windowName" slot-scope="text">
{{ text.windowName ? text.windowName : "--" }}
</template>
......@@ -239,20 +246,24 @@
{{ 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>
<!-- 操作 -->
<span slot="action" slot-scope="text">
<a-space>
<a class="edit" type="primary" @click="editModal(text)">编辑</a>
<a class="edit-pwd" type="primary" @click="changePwd(text)"
>修改密码</a
<span class="primary pointer" @click="editModal(text)"
>编辑</span
>
<span class="primary pointer" @click="changePwd(text)"
>修改密码</span
>
<span class="delete pointer" @click="handleDel(text.id)"
>删除</span
>
<a class="delet" @click="handleDel(text.id)">删除</a>
</a-space>
</span>
</a-table>
......@@ -288,6 +299,8 @@ import EditPwd from "./components/EditPwd";
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,
......@@ -356,13 +369,13 @@ const columns = [
{
title: "最后登录时间",
scopedSlots: {
customRender: "logintime",
customRender: "lastLoginTime",
},
},
{
title: "操作",
width: "160px",
width: "170px",
scopedSlots: {
customRender: "action",
},
......@@ -376,9 +389,6 @@ export default {
},
data() {
return {
headers: {
Authorization: local.getLocal("token"),
},
spinning: false,
columns,
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
......@@ -393,17 +403,21 @@ export default {
WorkmanData: [], // 工作人员列表
deptSearch: "", //部门搜索
windowSearch: "", // 窗口搜索
searchVal: "",
visibleAll: false,
page: 1,
size: 10,
total: 0,
pageSizeOptions: ["10", "30", "50", "100"],
pageSizeOptions,
designationDict: {}, // 称号字典
politicalDict: {}, // 政治面貌字典
curDept: "", // 当前选中部门
curWindow: "", // 当前选中窗口
};
},
computed: {
...mapGetters("site", ["token"]),
},
created() {
this.getDeptList();
this.getWindowData();
......@@ -424,6 +438,8 @@ export default {
// 获取部门窗口
async getWindowData() {
let res = await getWindowList({
page: 1,
size: -1,
siteId: this.siteId,
deptId: this.deptSearch,
});
......@@ -433,12 +449,19 @@ export default {
// 获取工作人员列表
async getWorkmanData(search = {}) {
this.loading = true;
let obj = {};
if (/^[\u4e00-\u9fa5]+$/.test(this.searchVal)) {
obj.name = `%${this.searchVal}%`;
} else if (/^[a-zA-z0-9]+$/.test(this.searchVal)) {
obj.number = `%${this.searchVal}%`;
}
let res = await getWorkmanList({
siteId: this.siteId,
page: this.page,
size: this.size,
deptId: this.deptSearch,
windowId: this.windowSearch,
...obj,
...search,
});
let { data, pageInfo, dict } = res.data.data;
......@@ -504,15 +527,16 @@ export default {
});
},
// 搜索
onSearch(val) {
onSearch() {
this.page = 1;
if (/^[\u4e00-\u9fa5]+$/.test(val)) {
this.getWorkmanData({ name: `%${val}%` });
} else if (/^[a-zA-z0-9]+$/.test(val)) {
this.getWorkmanData({ number: `%${val}%` });
} else {
this.getWorkmanData();
}
// if (/^[\u4e00-\u9fa5]+$/.test(val)) {
// this.getWorkmanData({ name: `%${val}%` });
// } else if (/^[a-zA-z0-9]+$/.test(val)) {
// this.getWorkmanData({ number: `%${val}%` });
// } else {
// this.getWorkmanData();
// }
},
// 新增工作人员
showModal() {
......@@ -547,7 +571,7 @@ export default {
const blob = new Blob([res.data], {
type: "application/octet-stream",
});
let fileName = "批量导入工作人员模";
let fileName = "批量导入工作人员模";
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
......@@ -618,12 +642,6 @@ export default {
</script>
<style lang="less" scoped>
.skins_btn_1 {
width: 100px;
height: 36px;
background-color: rgba(5, 149, 253, 1);
border-color: rgba(5, 149, 253, 1);
}
.website {
.right {
width: 100%;
......@@ -632,7 +650,7 @@ export default {
color: #333;
padding-left: 20px;
.person_message {
font-weight: 600;
font-size: 18px;
}
}
......@@ -657,44 +675,12 @@ export default {
margin-bottom: 6px;
}
}
.btn_add {
width: 80px;
height: 36px;
background-color: rgba(5, 149, 253, 1);
font-size: 13px;
text-align: center;
line-height: normal;
text-transform: none;
border: none;
margin-top: 15px;
}
.btn_to {
width: 80px;
height: 36px;
background-color: rgba(5, 149, 253, 1);
font-size: 13px;
text-align: center;
line-height: normal;
text-transform: none;
margin-left: 12px;
border: none;
margin-top: 20px;
margin-bottom: 20px;
}
.pht {
width: 56px;
height: 74px;
object-fit: cover;
}
.edit {
color: #03d76f;
}
.edit-pwd {
color: #1890ff;
}
.delet {
color: red;
}
div.person_gruop1 {
display: inline;
flex: 1;
......@@ -714,14 +700,6 @@ export default {
height: 36px;
margin-right: 10px;
}
.btn_search {
width: 72px;
height: 36px;
border: 0;
background: inherit;
// margin-b: 10px;
background-color: rgba(5, 149, 253, 1);
}
.on {
margin: 10px 0px;
......@@ -778,8 +756,8 @@ export default {
border-radius: 0px 4px 4px 0px;
}
.active {
background-color: #1890ff;
border-color: #1890ff;
background: linear-gradient(90deg, #5ab6ff, #2e9aff);
border-color: transparent;
color: #fff;
&:hover {
color: #fff;
......
<template>
<exception-page home-route="/demo" :style="`min-height: ${minHeight}`" type="404" />
<exception-page
home-route="/website"
:style="`min-height: ${minHeight}`"
type="404"
/>
</template>
<script>
import ExceptionPage from '@/components/exception/ExceptionPage'
import {mapState} from 'vuex'
import ExceptionPage from "@/components/exception/ExceptionPage";
import { mapState } from "vuex";
export default {
name: 'Exp404',
components: {ExceptionPage},
name: "Exp404",
components: { ExceptionPage },
computed: {
...mapState('setting', ['pageMinHeight']),
...mapState("setting", ["pageMinHeight"]),
minHeight() {
return this.pageMinHeight ? this.pageMinHeight + 'px' : '100vh'
}
}
}
return this.pageMinHeight ? this.pageMinHeight + "px" : "100vh";
},
},
};
</script>
<style scoped lang="less">
......
......@@ -264,6 +264,14 @@ const options = {
invisible: true,
},
},
{
path: "appTheme",
component: () =>
import("@/pages/basicset/appmarket/components/AppTheme"),
meta: {
invisible: true,
},
},
],
},
{
......
......@@ -2,7 +2,8 @@ import { hasAuthority } from "@/utils/authority-utils";
// import {loginIgnore} from '@/router/index'
// import {checkAuthorization} from '@/utils/request'
import NProgress from "nprogress";
import local from "@/utils/local";
// import local from "@/utils/local";
import store from "@/store/index";
NProgress.configure({ showSpinner: false });
......@@ -28,7 +29,8 @@ const progressStart = (to, from, next) => {
* @param options
*/
const loginGuard = (to, from, next) => {
let token = local.getLocal("token") ? true : false;
// let token = local.getLocal("token") ? true : false;
let token = store.getters["site/token"];
if (token) {
next();
} else {
......
......@@ -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`, // 查询当前站点所有没有在大厅配置的过的窗口
},
// 工作人员
......@@ -317,6 +318,13 @@ module.exports = {
used: `${BASE_URL}/base/app/version/used`,
preview: `${BASE_URL}/base/app/version/preview`,
},
// 应用分类
Appcategory: {
list: `${BASE_URL}/base/app/category/list`,
info: `${BASE_URL}/base/app/category/info`,
save: `${BASE_URL}/base/app/category/save`,
delete: `${BASE_URL}/base/app/category/delete`,
},
// 系统设置
system: {
// 系统日志
......
......@@ -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);
}
/**
* 窗口业务
......
......@@ -6,6 +6,7 @@ import {
version,
device,
blackapp,
Appcategory,
} from "@/services/basicsetApi";
import { request, METHOD } from "@/utils/request";
......@@ -164,3 +165,22 @@ export async function saveBlackApp(data) {
export async function deleteBlackapp(data) {
return request(blackapp.delete, METHOD.GET, data);
}
/**
* 应用分类
*/
// 获取分类列表
export async function getCategoryList(data) {
return request(Appcategory.list, METHOD.POST, data);
}
// 保存分类列表
export async function saveCategory(data) {
return request(Appcategory.save, METHOD.POST, data);
}
// 删除分类列表
export async function deleteCategory(data) {
return request(Appcategory.delete, METHOD.GET, data);
}
......@@ -2,6 +2,7 @@ export default {
namespaced: true,
state: {
siteId: "", // 站点id
siteName: "", // 站点名称
imageResolution: [], // 皮肤设置分辨率
SiteTree: [], // 站点树
appTemplate: [], // 应用模板属性
......@@ -32,8 +33,20 @@ export default {
appDict(state) {
return state.appDict;
},
siteId(state) {
return state.siteId;
},
},
mutations: {
SET_siteName(state, siteName) {
state.siteName = siteName;
},
SET_userInfo(state, userInfo) {
state.userInfo = userInfo;
},
SET_token(state, token) {
state.token = token;
},
SET_curProduct(state, curProduct) {
state.curProduct = curProduct;
},
......
// import Cookie from 'js-cookie'
import local from "@/utils/local";
// import local from "@/utils/local";
import { message } from "ant-design-vue";
import store from "@/store/index";
// 401拦截
// const resp401 = {
// /**
......@@ -71,7 +71,8 @@ const reqCommon = {
*/
onFulfilled(config) {
// 携带token
let token = local.getLocal("token");
// let token = local.getLocal("token");
let token = store.getters["site/token"];
if (token) {
config.headers.Authorization = token;
}
......
......@@ -162,3 +162,25 @@ PRIMARY KEY (`id`)
ALTER TABLE mortals_sys_site ADD COLUMN `onlineTake` tinyint(2) DEFAULT '1' COMMENT '在线取号(0.否,1.是)' AFTER workday7;
ALTER TABLE mortals_sys_site ADD COLUMN `appointment` tinyint(2) DEFAULT '1' COMMENT '在线取号(0.否,1.是)' AFTER onlineTake;
ALTER TABLE mortals_sys_site ADD COLUMN `gowMap` tinyint(2) DEFAULT '1' COMMENT '在线取号(0.否,1.是)' AFTER appointment;
-- ----------------------------
2023-6-15
-- ----------------------------
-- ----------------------------
-- 自助终端应用分类表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_sys_app_category`;
CREATE TABLE mortals_sys_app_category(
`id` bigint(20) AUTO_INCREMENT COMMENT '主键ID,主键,自增长',
`siteId` bigint(20) COMMENT '站点Id',
`siteName` varchar(256) COMMENT '站点名称',
`categoryCode` varchar(256) COMMENT '分类编码',
`categoryName` varchar(256) COMMENT '分类名称',
`sort` int(4) DEFAULT '0' COMMENT '排序字段',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建用户',
`updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='自助终端应用分类';
......@@ -10671,6 +10671,223 @@ data|object|数据对象
```
## 自助终端应用分类
### 查询自助终端应用分类列表
**请求URL:** /app/category/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询自助终端应用分类
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
page|Integer|否|当前页
size|Integer|否|每页条数,值为-1,查询所有记录
**请求样例:**
```
{
"page":1,
"size":10
}
```
**响应参数:**
参数名称|参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;per_page|Integer|每页条数
&emsp;total|Integer|总条数
&emsp;last_page|Integer|总页数
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|主键ID,主键,自增长
&emsp;&emsp;siteId|Long|站点Id
&emsp;&emsp;siteName|String|站点名称
&emsp;&emsp;categoryCode|String|分类编码
&emsp;&emsp;categoryName|String|分类名称
&emsp;&emsp;sort|Integer|排序字段
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;updateUserId|Long|更新用户
&emsp;&emsp;updateTime|Date|更新时间
dict|object|字典对象
**响应消息样例:**
```
{
"code":1,
"data":{
}
}
```
### 查看自助终端应用分类
**请求URL:** /app/category/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看自助终端应用分类,返回实例详细信息
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|Long|是|ID
**请求样例:**
```
http://localhost/app/category/info?id=549
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:-------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|主键ID,主键,自增长
&emsp;siteId|Long|站点Id
&emsp;siteName|String|站点名称
&emsp;categoryCode|String|分类编码
&emsp;categoryName|String|分类名称
&emsp;sort|Integer|排序字段
&emsp;createTime|Date|创建时间
&emsp;createUserId|Long|创建用户
&emsp;updateUserId|Long|更新用户
&emsp;updateTime|Date|更新时间
dict|object|字典对象
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":7446,
"siteId":6287,
"siteName":"hdyoc5",
"categoryCode":"lghzhw",
"categoryName":"9grukd",
"sort":8579,
"createTime":"2023-06-15",
"createUserId":5522,
"updateUserId":6707,
"updateTime":"2023-06-15"
}
}
```
### 保存更新自助终端应用分类
**请求URL:** /app/category/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新自助终端应用分类:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
siteId|Long|否|站点Id
siteName|String|否|站点名称
categoryCode|String|否|分类编码
categoryName|String|否|分类名称
sort|Integer|否|排序字段
**请求样例:**
```
{
"siteId":8230,
"siteName":"zbhc82",
"categoryCode":"d7b0ft",
"categoryName":"82or58",
"sort":9021,
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|保存后主键id
&emsp;entity|object|保存更新实体
&emsp;&emsp;id|Long|主键ID,主键,自增长
&emsp;&emsp;siteId|Long|站点Id
&emsp;&emsp;siteName|String|站点名称
&emsp;&emsp;categoryCode|String|分类编码
&emsp;&emsp;categoryName|String|分类名称
&emsp;&emsp;sort|Integer|排序字段
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;updateUserId|Long|更新用户
&emsp;&emsp;updateTime|Date|更新时间
**响应消息样例:**
```
{
"msg":"新增模块成功",
"code":1,
"data":{}
}
}
```
### 删除自助终端应用分类
**请求URL:** /app/category/delete
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 删除自助终端应用分类
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|String|是|数组
**请求样例:**
```
http://localhost:8080/app/category/delete?id=1&id=2'
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
**响应消息样例:**
```
{
"code":1,
"msg":"成功"
}
```
### 自助终端基础应用部署
**请求URL:** app/appCommonDistribute
......
......@@ -296,7 +296,60 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
@Override
public void updateUserList(List<UserPdu> list) {
//更新本地用户信息,并且更新用户站点树
//更新本地用户信息,并且更新用户站点树 //todo 将站点分组后 分组同步更新
List<String> loginNames = list.parallelStream().map(user -> user.getLoginName()).collect(Collectors.toList());
UserQuery userQuery = new UserQuery();
userQuery.setLoginNameList(loginNames);
List<UserEntity> existUsers = this.find(userQuery);
Map<String, UserEntity> existUserMap = existUsers.parallelStream().collect(Collectors.toMap(x -> x.getLoginName(), y -> y, (o, n) -> n));
//分组查找存在的与不存在的用户
Map<Boolean, List<UserPdu>> collect = list.parallelStream().collect(Collectors.partitioningBy(x -> existUserMap.containsKey(x.getLoginName())));
List<UserPdu> userPdusUpdate = collect.get(true);//更新
List<UserEntity> userEntityUpdate = new ArrayList<>();
List<UserPdu> userPdusSave = collect.get(false);//新增
List<UserEntity> userEntitySave = new ArrayList<>();
for (UserPdu user : userPdusSave) {
//新增
UserEntity entity = new UserEntity();
entity.initAttrValue();
BeanUtils.copyProperties(user, entity, BeanUtil.getNullPropertyNames(user));
this.save(entity);
if (!ObjectUtils.isEmpty(entity.getSiteIds())) {
userEntitySave.add(entity);
}
}
for (UserPdu user : userPdusUpdate) {
//更新
UserEntity userEntity = new UserEntity();
BeanUtils.copyProperties(user, userEntity, new String[]{"loginPwd", "loginName", "userType", "status", "lastLoginTime", "lastLoginAddress"});
userEntity.setId(existUserMap.get(user.getLoginName()).getId());
this.updateWidthDao(userEntity);
if (!ObjectUtils.isEmpty(userEntity.getSiteIds())) {
userEntitySave.add(userEntity);
}
}
//分组刷新节点 新增
Map<String, List<UserEntity>> saveSitesCollect = userEntitySave.stream().collect(Collectors.groupingBy(x -> x.getSiteIds()));
// Map<String, List<UserEntity>> updateSitesCollect = userEntityUpdate.stream().collect(Collectors.groupingBy(x -> x.getSiteIds()));
saveSitesCollect.entrySet().stream().forEach(item -> {
String siteIds = item.getKey();
List<UserEntity> userEntities = item.getValue();
if (!ObjectUtils.isEmpty(userEntities)) {
Context context = new Context();
context.setUser(userEntities.get(0));
ThreadPool.getInstance().execute(new SyncTreeSiteThread(context, userEntities));
}
});
/*
//如果用户未有所属站点 则不更新
for (UserPdu user : list) {
UserEntity tempUser = this.selectOne(new UserQuery().loginName(user.getLoginName()));
if (ObjectUtils.isEmpty(tempUser)) {
......@@ -305,20 +358,24 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
entity.initAttrValue();
BeanUtils.copyProperties(user, entity, BeanUtil.getNullPropertyNames(user));
this.save(entity);
if (!ObjectUtils.isEmpty(entity.getSiteIds())) {
Context context = new Context();
context.setUser(entity);
ThreadPool.getInstance().execute(new SyncTreeSiteThread(context));
}
} else {
//更新
UserEntity userEntity = new UserEntity();
BeanUtils.copyProperties(user, userEntity, new String[]{"loginPwd","loginName", "userType", "status", "lastLoginTime", "lastLoginAddress"});
BeanUtils.copyProperties(user, userEntity, new String[]{"loginPwd", "loginName", "userType", "status", "lastLoginTime", "lastLoginAddress"});
userEntity.setId(tempUser.getId());
this.updateWidthDao(userEntity);
if (!ObjectUtils.isEmpty(userEntity.getSiteIds())) {
Context context = new Context();
context.setUser(userEntity);
ThreadPool.getInstance().execute(new SyncTreeSiteThread( context));
ThreadPool.getInstance().execute(new SyncTreeSiteThread(context));
}
}
}*/
}
......
......@@ -2,10 +2,13 @@ package com.mortals.xhx.common.utils;
import com.alibaba.fastjson.JSON;
import com.mortals.framework.model.Context;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.module.site.model.SiteTreeSelect;
import com.mortals.xhx.module.site.service.SiteService;
import com.mortals.xhx.utils.SpringUtils;
import lombok.AllArgsConstructor;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.extern.apachecommons.CommonsLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ObjectUtils;
......@@ -18,16 +21,30 @@ import java.util.List;
* @description:
**/
@AllArgsConstructor
@RequiredArgsConstructor
@Slf4j
public class SyncTreeSiteThread implements Runnable {
@NonNull
private Context context;
private List<UserEntity> userEntities;
@Override
public void run() {
SiteService siteService = SpringUtils.getBean(SiteService.class);
List<SiteTreeSelect> siteTreeSelects = siteService.siteTree(context);
if(ObjectUtils.isEmpty(userEntities)){
siteService.setSiteTree(siteTreeSelects, context);
}else{
for (UserEntity userEntity : userEntities) {
Context contextTemp = new Context();
contextTemp.setUser(userEntity);
siteService.setSiteTree(siteTreeSelects, contextTemp);
}
}
// log.info("刷新用户站点树=》userID:{} siteIds:{} siteTree:{}",context.getUser().getId(),context.getUser().getSiteIds(), JSON.toJSONString(siteService.getSiteTree(context)));
}
......
......@@ -26,6 +26,9 @@ import com.mortals.framework.springcloud.service.IApplicationStartedService;
import org.springframework.util.ObjectUtils;
import java.util.List;
import static com.mortals.xhx.common.key.Constant.USER_SITE_TREE;
@Component
@Slf4j
public class DemoStartedService implements IApplicationStartedService {
......@@ -35,10 +38,15 @@ public class DemoStartedService implements IApplicationStartedService {
private IUserFeign userFeign;
@Autowired
private UserService userService;
@Autowired
private ICacheService cacheService;
@Override
public void start() {
logger.info("开始服务..[初始化用户站点树]");
//删除redis 中的 站点树
cacheService.del(USER_SITE_TREE);
UserEntity userEntity = new UserEntity();
userEntity.initAttrValue();
userEntity.setId(0L);
......@@ -56,33 +64,6 @@ public class DemoStartedService implements IApplicationStartedService {
ThreadPool.getInstance().execute(syncTreeSiteThread);
/* userService.find(new UserQuery()).forEach(user->{
Context context = new Context();
context.setUser(user);
ThreadPool.getInstance().execute(new SyncTreeSiteThread(context));
});*/
/* if(ObjectUtils.isEmpty(userFeign)){
logger.info("userFeign未加载,加载本地用户");
userService.find(new UserQuery()).forEach(user->{
Context context = new Context();
context.setUser(user);
ThreadPool.getInstance().execute(new SyncTreeSiteThread(context));
});
return;
}*/
/* userFeign.list(new UserPdu()).getData().getData().stream().forEach(userPdu->{
Context context = new Context();
UserEntity entity = new UserEntity();
entity.initAttrValue();
BeanUtils.copyProperties(userPdu, entity, BeanUtil.getNullPropertyNames(userPdu));
context.setUser(entity);
ThreadPool.getInstance().execute(new SyncTreeSiteThread(context));
});*/
}
@Override
......
package com.mortals.xhx.module.app.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.app.model.AppCategoryEntity;
import java.util.List;
/**
* 自助终端应用分类Dao
* 自助终端应用分类 DAO接口
*
* @author zxfei
* @date 2023-06-15
*/
public interface AppCategoryDao extends ICRUDDao<AppCategoryEntity,Long>{
}
package com.mortals.xhx.module.app.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.app.dao.AppCategoryDao;
import com.mortals.xhx.module.app.model.AppCategoryEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 自助终端应用分类DaoImpl DAO接口
*
* @author zxfei
* @date 2023-06-15
*/
@Repository("appCategoryDao")
public class AppCategoryDaoImpl extends BaseCRUDDaoMybatis<AppCategoryEntity,Long> implements AppCategoryDao {
}
package com.mortals.xhx.module.app.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.app.model.vo.AppCategoryVo;
import lombok.Data;
/**
* 自助终端应用分类实体对象
*
* @author zxfei
* @date 2023-06-15
*/
@Data
public class AppCategoryEntity extends AppCategoryVo {
private static final long serialVersionUID = 1L;
/**
* 站点Id
*/
private Long siteId;
/**
* 站点名称
*/
private String siteName;
/**
* 分类编码
*/
private String categoryCode;
/**
* 分类名称
*/
private String categoryName;
/**
* 排序字段
*/
private Integer sort;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof AppCategoryEntity) {
AppCategoryEntity tmp = (AppCategoryEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.siteId = -1L;
this.siteName = "";
this.categoryCode = "";
this.categoryName = "";
this.sort = 0;
}
}
\ No newline at end of file
package com.mortals.xhx.module.app.model;
import java.util.List;
import com.mortals.xhx.module.app.model.AppCategoryEntity;
/**
* 自助终端应用分类查询对象
*
* @author zxfei
* @date 2023-06-15
*/
public class AppCategoryQuery extends AppCategoryEntity {
/** 开始 主键ID,主键,自增长 */
private Long idStart;
/** 结束 主键ID,主键,自增长 */
private Long idEnd;
/** 增加 主键ID,主键,自增长 */
private Long idIncrement;
/** 主键ID,主键,自增长列表 */
private List <Long> idList;
/** 主键ID,主键,自增长排除列表 */
private List <Long> idNotList;
/** 开始 站点Id */
private Long siteIdStart;
/** 结束 站点Id */
private Long siteIdEnd;
/** 增加 站点Id */
private Long siteIdIncrement;
/** 站点Id列表 */
private List <Long> siteIdList;
/** 站点Id排除列表 */
private List <Long> siteIdNotList;
/** 站点名称 */
private List<String> siteNameList;
/** 站点名称排除列表 */
private List <String> siteNameNotList;
/** 分类编码 */
private List<String> categoryCodeList;
/** 分类编码排除列表 */
private List <String> categoryCodeNotList;
/** 分类名称 */
private List<String> categoryNameList;
/** 分类名称排除列表 */
private List <String> categoryNameNotList;
/** 开始 排序字段 */
private Integer sortStart;
/** 结束 排序字段 */
private Integer sortEnd;
/** 增加 排序字段 */
private Integer sortIncrement;
/** 排序字段列表 */
private List <Integer> sortList;
/** 排序字段排除列表 */
private List <Integer> sortNotList;
/** 开始 创建时间 */
private String createTimeStart;
/** 结束 创建时间 */
private String createTimeEnd;
/** 开始 创建用户 */
private Long createUserIdStart;
/** 结束 创建用户 */
private Long createUserIdEnd;
/** 增加 创建用户 */
private Long createUserIdIncrement;
/** 创建用户列表 */
private List <Long> createUserIdList;
/** 创建用户排除列表 */
private List <Long> createUserIdNotList;
/** 开始 更新用户 */
private Long updateUserIdStart;
/** 结束 更新用户 */
private Long updateUserIdEnd;
/** 增加 更新用户 */
private Long updateUserIdIncrement;
/** 更新用户列表 */
private List <Long> updateUserIdList;
/** 更新用户排除列表 */
private List <Long> updateUserIdNotList;
/** 开始 更新时间 */
private String updateTimeStart;
/** 结束 更新时间 */
private String updateTimeEnd;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<AppCategoryQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<AppCategoryQuery> andConditionList;
public AppCategoryQuery(){}
/**
* 获取 开始 主键ID,主键,自增长
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 主键ID,主键,自增长
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 主键ID,主键,自增长
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 主键ID,主键,自增长
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 主键ID,主键,自增长
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 主键ID,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 开始 站点Id
* @return siteIdStart
*/
public Long getSiteIdStart(){
return this.siteIdStart;
}
/**
* 设置 开始 站点Id
* @param siteIdStart
*/
public void setSiteIdStart(Long siteIdStart){
this.siteIdStart = siteIdStart;
}
/**
* 获取 结束 站点Id
* @return $siteIdEnd
*/
public Long getSiteIdEnd(){
return this.siteIdEnd;
}
/**
* 设置 结束 站点Id
* @param siteIdEnd
*/
public void setSiteIdEnd(Long siteIdEnd){
this.siteIdEnd = siteIdEnd;
}
/**
* 获取 增加 站点Id
* @return siteIdIncrement
*/
public Long getSiteIdIncrement(){
return this.siteIdIncrement;
}
/**
* 设置 增加 站点Id
* @param siteIdIncrement
*/
public void setSiteIdIncrement(Long siteIdIncrement){
this.siteIdIncrement = siteIdIncrement;
}
/**
* 获取 站点Id
* @return siteIdList
*/
public List<Long> getSiteIdList(){
return this.siteIdList;
}
/**
* 设置 站点Id
* @param siteIdList
*/
public void setSiteIdList(List<Long> siteIdList){
this.siteIdList = siteIdList;
}
/**
* 获取 站点Id
* @return siteIdNotList
*/
public List<Long> getSiteIdNotList(){
return this.siteIdNotList;
}
/**
* 设置 站点Id
* @param siteIdNotList
*/
public void setSiteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
}
/**
* 获取 站点名称
* @return siteNameList
*/
public List<String> getSiteNameList(){
return this.siteNameList;
}
/**
* 设置 站点名称
* @param siteNameList
*/
public void setSiteNameList(List<String> siteNameList){
this.siteNameList = siteNameList;
}
/**
* 获取 站点名称
* @return siteNameNotList
*/
public List<String> getSiteNameNotList(){
return this.siteNameNotList;
}
/**
* 设置 站点名称
* @param siteNameNotList
*/
public void setSiteNameNotList(List<String> siteNameNotList){
this.siteNameNotList = siteNameNotList;
}
/**
* 获取 分类编码
* @return categoryCodeList
*/
public List<String> getCategoryCodeList(){
return this.categoryCodeList;
}
/**
* 设置 分类编码
* @param categoryCodeList
*/
public void setCategoryCodeList(List<String> categoryCodeList){
this.categoryCodeList = categoryCodeList;
}
/**
* 获取 分类编码
* @return categoryCodeNotList
*/
public List<String> getCategoryCodeNotList(){
return this.categoryCodeNotList;
}
/**
* 设置 分类编码
* @param categoryCodeNotList
*/
public void setCategoryCodeNotList(List<String> categoryCodeNotList){
this.categoryCodeNotList = categoryCodeNotList;
}
/**
* 获取 分类名称
* @return categoryNameList
*/
public List<String> getCategoryNameList(){
return this.categoryNameList;
}
/**
* 设置 分类名称
* @param categoryNameList
*/
public void setCategoryNameList(List<String> categoryNameList){
this.categoryNameList = categoryNameList;
}
/**
* 获取 分类名称
* @return categoryNameNotList
*/
public List<String> getCategoryNameNotList(){
return this.categoryNameNotList;
}
/**
* 设置 分类名称
* @param categoryNameNotList
*/
public void setCategoryNameNotList(List<String> categoryNameNotList){
this.categoryNameNotList = categoryNameNotList;
}
/**
* 获取 开始 排序字段
* @return sortStart
*/
public Integer getSortStart(){
return this.sortStart;
}
/**
* 设置 开始 排序字段
* @param sortStart
*/
public void setSortStart(Integer sortStart){
this.sortStart = sortStart;
}
/**
* 获取 结束 排序字段
* @return $sortEnd
*/
public Integer getSortEnd(){
return this.sortEnd;
}
/**
* 设置 结束 排序字段
* @param sortEnd
*/
public void setSortEnd(Integer sortEnd){
this.sortEnd = sortEnd;
}
/**
* 获取 增加 排序字段
* @return sortIncrement
*/
public Integer getSortIncrement(){
return this.sortIncrement;
}
/**
* 设置 增加 排序字段
* @param sortIncrement
*/
public void setSortIncrement(Integer sortIncrement){
this.sortIncrement = sortIncrement;
}
/**
* 获取 排序字段
* @return sortList
*/
public List<Integer> getSortList(){
return this.sortList;
}
/**
* 设置 排序字段
* @param sortList
*/
public void setSortList(List<Integer> sortList){
this.sortList = sortList;
}
/**
* 获取 排序字段
* @return sortNotList
*/
public List<Integer> getSortNotList(){
return this.sortNotList;
}
/**
* 设置 排序字段
* @param sortNotList
*/
public void setSortNotList(List<Integer> sortNotList){
this.sortNotList = sortNotList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
*/
public Long getCreateUserIdStart(){
return this.createUserIdStart;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public void setCreateUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
}
/**
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
public Long getCreateUserIdEnd(){
return this.createUserIdEnd;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public void setCreateUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
}
/**
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
public Long getCreateUserIdIncrement(){
return this.createUserIdIncrement;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public void setCreateUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
}
/**
* 获取 创建用户
* @return createUserIdList
*/
public List<Long> getCreateUserIdList(){
return this.createUserIdList;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public void setCreateUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
}
/**
* 获取 创建用户
* @return createUserIdNotList
*/
public List<Long> getCreateUserIdNotList(){
return this.createUserIdNotList;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public void setCreateUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
}
/**
* 获取 开始 更新用户
* @return updateUserIdStart
*/
public Long getUpdateUserIdStart(){
return this.updateUserIdStart;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public void setUpdateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
}
/**
* 获取 结束 更新用户
* @return $updateUserIdEnd
*/
public Long getUpdateUserIdEnd(){
return this.updateUserIdEnd;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public void setUpdateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
}
/**
* 获取 增加 更新用户
* @return updateUserIdIncrement
*/
public Long getUpdateUserIdIncrement(){
return this.updateUserIdIncrement;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public void setUpdateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
}
/**
* 获取 更新用户
* @return updateUserIdList
*/
public List<Long> getUpdateUserIdList(){
return this.updateUserIdList;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public void setUpdateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
}
/**
* 获取 更新用户
* @return updateUserIdNotList
*/
public List<Long> getUpdateUserIdNotList(){
return this.updateUserIdNotList;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public void setUpdateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
}
/**
* 获取 开始 更新时间
* @return updateTimeStart
*/
public String getUpdateTimeStart(){
return this.updateTimeStart;
}
/**
* 设置 开始 更新时间
* @param updateTimeStart
*/
public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
/**
* 获取 结束 更新时间
* @return updateTimeEnd
*/
public String getUpdateTimeEnd(){
return this.updateTimeEnd;
}
/**
* 设置 结束 更新时间
* @param updateTimeEnd
*/
public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
/**
* 设置 主键ID,主键,自增长
* @param id
*/
public AppCategoryQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
public AppCategoryQuery idStart(Long idStart){
this.idStart = idStart;
return this;
}
/**
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
public AppCategoryQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
public AppCategoryQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 主键ID,主键,自增长
* @param idList
*/
public AppCategoryQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 主键ID,主键,自增长
* @param idNotList
*/
public AppCategoryQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/**
* 设置 站点Id
* @param siteId
*/
public AppCategoryQuery siteId(Long siteId){
setSiteId(siteId);
return this;
}
/**
* 设置 开始 站点Id
* @param siteIdStart
*/
public AppCategoryQuery siteIdStart(Long siteIdStart){
this.siteIdStart = siteIdStart;
return this;
}
/**
* 设置 结束 站点Id
* @param siteIdEnd
*/
public AppCategoryQuery siteIdEnd(Long siteIdEnd){
this.siteIdEnd = siteIdEnd;
return this;
}
/**
* 设置 增加 站点Id
* @param siteIdIncrement
*/
public AppCategoryQuery siteIdIncrement(Long siteIdIncrement){
this.siteIdIncrement = siteIdIncrement;
return this;
}
/**
* 设置 站点Id
* @param siteIdList
*/
public AppCategoryQuery siteIdList(List<Long> siteIdList){
this.siteIdList = siteIdList;
return this;
}
/**
* 设置 站点Id
* @param siteIdNotList
*/
public AppCategoryQuery siteIdNotList(List<Long> siteIdNotList){
this.siteIdNotList = siteIdNotList;
return this;
}
/**
* 设置 站点名称
* @param siteName
*/
public AppCategoryQuery siteName(String siteName){
setSiteName(siteName);
return this;
}
/**
* 设置 站点名称
* @param siteNameList
*/
public AppCategoryQuery siteNameList(List<String> siteNameList){
this.siteNameList = siteNameList;
return this;
}
/**
* 设置 分类编码
* @param categoryCode
*/
public AppCategoryQuery categoryCode(String categoryCode){
setCategoryCode(categoryCode);
return this;
}
/**
* 设置 分类编码
* @param categoryCodeList
*/
public AppCategoryQuery categoryCodeList(List<String> categoryCodeList){
this.categoryCodeList = categoryCodeList;
return this;
}
/**
* 设置 分类名称
* @param categoryName
*/
public AppCategoryQuery categoryName(String categoryName){
setCategoryName(categoryName);
return this;
}
/**
* 设置 分类名称
* @param categoryNameList
*/
public AppCategoryQuery categoryNameList(List<String> categoryNameList){
this.categoryNameList = categoryNameList;
return this;
}
/**
* 设置 排序字段
* @param sort
*/
public AppCategoryQuery sort(Integer sort){
setSort(sort);
return this;
}
/**
* 设置 开始 排序字段
* @param sortStart
*/
public AppCategoryQuery sortStart(Integer sortStart){
this.sortStart = sortStart;
return this;
}
/**
* 设置 结束 排序字段
* @param sortEnd
*/
public AppCategoryQuery sortEnd(Integer sortEnd){
this.sortEnd = sortEnd;
return this;
}
/**
* 设置 增加 排序字段
* @param sortIncrement
*/
public AppCategoryQuery sortIncrement(Integer sortIncrement){
this.sortIncrement = sortIncrement;
return this;
}
/**
* 设置 排序字段
* @param sortList
*/
public AppCategoryQuery sortList(List<Integer> sortList){
this.sortList = sortList;
return this;
}
/**
* 设置 排序字段
* @param sortNotList
*/
public AppCategoryQuery sortNotList(List<Integer> sortNotList){
this.sortNotList = sortNotList;
return this;
}
/**
* 设置 创建用户
* @param createUserId
*/
public AppCategoryQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public AppCategoryQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public AppCategoryQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public AppCategoryQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public AppCategoryQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public AppCategoryQuery createUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
return this;
}
/**
* 设置 更新用户
* @param updateUserId
*/
public AppCategoryQuery updateUserId(Long updateUserId){
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public AppCategoryQuery updateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
return this;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public AppCategoryQuery updateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
return this;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public AppCategoryQuery updateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public AppCategoryQuery updateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public AppCategoryQuery updateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<AppCategoryQuery> getOrConditionList(){
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<AppCategoryQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<AppCategoryQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<AppCategoryQuery> andConditionList){
this.andConditionList = andConditionList;
}
}
\ No newline at end of file
package com.mortals.xhx.module.app.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.app.model.AppCategoryEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 自助终端应用分类视图对象
*
* @author zxfei
* @date 2023-06-15
*/
@Data
public class AppCategoryVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.app.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.app.model.AppCategoryEntity;
import com.mortals.xhx.module.app.dao.AppCategoryDao;
/**
* AppCategoryService
*
* 自助终端应用分类 service接口
*
* @author zxfei
* @date 2023-06-15
*/
public interface AppCategoryService extends ICRUDService<AppCategoryEntity,Long>{
AppCategoryDao getDao();
}
\ No newline at end of file
package com.mortals.xhx.module.app.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.app.dao.AppCategoryDao;
import com.mortals.xhx.module.app.model.AppCategoryEntity;
import com.mortals.xhx.module.app.service.AppCategoryService;
import lombok.extern.slf4j.Slf4j;
/**
* AppCategoryService
* 自助终端应用分类 service实现
*
* @author zxfei
* @date 2023-06-15
*/
@Service("appCategoryService")
@Slf4j
public class AppCategoryServiceImpl extends AbstractCRUDServiceImpl<AppCategoryDao, AppCategoryEntity, Long> implements AppCategoryService {
}
\ No newline at end of file
......@@ -114,7 +114,6 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
} else {
item.setAppIconUrl(item.getAppIconPath());
}
};
super.findAfter(params, pageInfo, context, list);
}
......
package com.mortals.xhx.module.app.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.app.model.AppCategoryEntity;
import com.mortals.xhx.module.app.service.AppCategoryService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 自助终端应用分类
*
* @author zxfei
* @date 2023-06-15
*/
@RestController
@RequestMapping("app/category")
public class AppCategoryController extends BaseCRUDJsonBodyMappingController<AppCategoryService,AppCategoryEntity,Long> {
@Autowired
private ParamService paramService;
public AppCategoryController(){
super.setModuleDesc( "自助终端应用分类");
}
@Override
protected void init(Map<String, Object> model, Context context) {
super.init(model, context);
}
/**
* @param query
* @param model
* @param context
* @throws AppException
*/
@Override
protected void doListBefore(AppCategoryEntity query, Map<String, Object> model, Context context) throws AppException {
super.doListBefore(query, model, context);
query.setOrderColList(Arrays.asList(new OrderCol("sort")));
}
}
\ No newline at end of file
......@@ -2,19 +2,22 @@ package com.mortals.xhx.module.app.web;
import cn.hutool.core.net.url.UrlBuilder;
import cn.hutool.core.util.ZipUtil;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.util.DataUtil;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.AppTypeEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.module.app.model.AppCategoryEntity;
import com.mortals.xhx.module.app.model.AppCategoryQuery;
import com.mortals.xhx.module.app.model.AppEntity;
import com.mortals.xhx.module.app.model.AppQuery;
import com.mortals.xhx.module.app.service.AppCategoryService;
import com.mortals.xhx.module.app.service.AppService;
import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.model.SiteQuery;
......@@ -27,8 +30,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import static com.mortals.xhx.common.key.Constant.CUSTAPP_ROOT_PATH;
......@@ -48,6 +50,9 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService,
private ParamService paramService;
@Autowired
private SiteService siteService;
@Autowired
private AppCategoryService appCategoryService;
public AppController() {
super.setModuleDesc("自助终端应用");
......@@ -57,7 +62,7 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService,
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "type", AppTypeEnum.getEnumMap());
this.addDict(model, "shelves", paramService.getParamBySecondOrganize("App", "shelves"));
this.addDict(model, "appThemeName", paramService.getParamBySecondOrganize("App", "appThemeName"));
//this.addDict(model, "appThemeName", paramService.getParamBySecondOrganize("App", "appThemeName"));
this.addDict(model, "distribute", YesNoEnum.getEnumMap());
this.addDict(model, "dateUpdate", YesNoEnum.getEnumMap());
super.init(model, context);
......@@ -80,6 +85,33 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService,
super.doListBefore(query, model, context);
}
/**
* @param query
* @param model
* @param context
* @return
* @throws AppException
*/
@Override
protected int doListAfter(AppEntity query, Map<String, Object> model, Context context) throws AppException {
model.put("appCategory", new ArrayList<>());
if (!ObjectUtils.isEmpty(query.getSiteId())) {
AppCategoryQuery appCategoryQuery = new AppCategoryQuery();
appCategoryQuery.setSiteId(query.getSiteId());
appCategoryQuery.setOrderColList(Arrays.asList(new OrderCol("sort")));
List<AppCategoryEntity> appCategoryEntities = appCategoryService.find(appCategoryQuery);
if (!ObjectUtils.isEmpty(appCategoryEntities)) {
model.put("appCategory", appCategoryEntities);
Map<String,Object> appThemeName = new HashMap<>();
for (AppCategoryEntity appCategory:appCategoryEntities){
appThemeName.put(appCategory.getId().toString(),appCategory.getCategoryName());
}
this.addDict(model, "appThemeName", appThemeName);
}
}
return super.doListAfter(query, model, context);
}
@Override
protected int infoAfter(Long id, Map<String, Object> model, AppEntity entity, Context context) throws AppException {
List<AppEntity> appEntityList = this.service.find(new AppQuery().appCode(entity.getAppCode()), context);
......@@ -183,7 +215,7 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService,
throw new AppException("目标appId不能为空!");
}
Rest<String> cloneRest = this.service.cloneAppBySameSite(appQuery, getContext());
if(YesNoEnum.NO.getValue()==cloneRest.getCode()){
if (YesNoEnum.NO.getValue() == cloneRest.getCode()) {
return Rest.fail(cloneRest.getMsg());
}
recordSysLog(request, busiDesc + " 【成功】");
......
......@@ -37,6 +37,11 @@ public class SiteTreeSelect implements Serializable {
*/
private String siteCode;
/**
* 站点详细地址
*/
private String detailAddress;
/**
* 节点名称
*/
......@@ -45,6 +50,12 @@ public class SiteTreeSelect implements Serializable {
* 区域编码
*/
private String areaCode;
/**
* 为区域时 层级
*/
private Integer level;
/**
* 是否叶子节点
*/
......@@ -79,7 +90,6 @@ public class SiteTreeSelect implements Serializable {
public SiteTreeSelect(AreaEntity entity) {
//如果是站点,则替换名称和id
this.id = entity.getIid();
this.label = entity.getName();
if ("False".equalsIgnoreCase(entity.getHaveSonArea())) {
......@@ -103,14 +113,18 @@ public class SiteTreeSelect implements Serializable {
this.siteCode = collect.stream().map(item -> item.getSiteCode()).collect(Collectors.joining(","));
this.type = "site";
this.icon = "el-icon-wind-power";
this.longitude = collect.stream().findFirst().map(item -> item.getLongitude()).orElseGet(() -> "");
this.latitude = collect.stream().findFirst().map(item -> item.getLatitude()).orElseGet(() -> "");
this.detailAddress=collect.stream().map(item -> item.getDetailAddress()).collect(Collectors.joining(","));
this.areaCode=collect.stream().map(item -> item.getAreaCode()).collect(Collectors.joining(","));
this.longitude = collect.stream().map(item -> item.getLongitude()).collect(Collectors.joining(","));
this.latitude = collect.stream().map(item -> item.getLatitude()).collect(Collectors.joining(","));
} else {
this.id = entity.getIid();
this.label = entity.getName();
this.type = "area";
this.icon = "el-icon-place";
this.areaCode=entity.getAreaCode();
}
this.level=entity.getAreaLevel();
if ("False".equalsIgnoreCase(entity.getHaveSonArea())) {
this.isLeaf = true;
//this.children = new ArrayList();
......@@ -120,7 +134,6 @@ public class SiteTreeSelect implements Serializable {
}
this.areaCode = entity.getAreaCode();
}
// 反序列化器
......@@ -132,7 +145,7 @@ public class SiteTreeSelect implements Serializable {
node.setId(jsonObject.getString("id"));
node.setSiteCode(jsonObject.getString("siteCode"));
node.setLabel(jsonObject.getString("label"));
node.setAreaCode(jsonObject.getString("areacode"));
node.setAreaCode(jsonObject.getString("areaCode"));
node.setIsLeaf(jsonObject.getBoolean("isLeaf"));
node.setLongitude(jsonObject.getString("longitude"));
node.setLatitude(jsonObject.getString("latitude"));
......@@ -140,10 +153,12 @@ public class SiteTreeSelect implements Serializable {
node.setIcon(jsonObject.getString("icon"));
JSONArray jsonArray = jsonObject.getJSONArray("children");
List<SiteTreeSelect> children = new ArrayList<>();
if(!ObjectUtils.isEmpty(jsonArray)){
for (int i = 0; i < jsonArray.size(); i++) {
SiteTreeSelect child = JSON.parseObject(jsonArray.getJSONObject(i).toJSONString(), SiteTreeSelect.class);
children.add(child);
}
}
node.setChildren(children);
return node;
}
......
......@@ -44,25 +44,27 @@ public interface SiteService extends ICRUDCacheService<SiteEntity, Long> {
*/
List<SiteTreeSelect> getSiteTree(Context context);
List<SiteEntity> getFlatSitesByAreaCode(String areaCode,Context context);
List<SiteEntity> getFlatSitesByAreaCode(String areaCode, Context context);
List<SiteEntity> getFlatSitesBySiteId(Long siteId,Context context);
List<SiteEntity> getFlatSitesBySiteId(Long siteId, Context context);
Rest< List<SiteAreaVo>> getAreaSitesBySite(SiteQuery query, Context context);
Integer countSitesByArea(SiteQuery query, Context context);
Rest< List<SiteEntity>> getAreaSitesByAreaLevel(SiteQuery query, Context context);
Rest<List<SiteAreaVo>> getAreaSitesBySite(SiteQuery query, Context context);
Rest<List<SiteEntity>> getAreaSitesByAreaLevel(SiteQuery query, Context context);
void setSiteTree(List<SiteTreeSelect> list, Context context);
void removeSiteTree(List<SiteTreeSelect> list, Context context);
List<SiteEntity> getListAllInfoByQuery(SiteQuery query,Context context) throws AppException;
List<SiteEntity> getListAllInfoByQuery(SiteQuery query, Context context) throws AppException;
void changeUrlPath(SiteEntity siteEntity);
Rest<List<MatterEntity>> getMatterAllListByGOV(Map<String,String> params,Integer pageNum, Context context);
Rest<List<MatterEntity>> getMatterAllListByGOV(Map<String, String> params, Integer pageNum, Context context);
Rest<String> syncMatterBySiteId(SiteEntity siteEntity, Context context);
void deleteBysiteIdAndSource(Long siteId,Integer source, Context context);
void deleteBysiteIdAndSource(Long siteId, Integer source, Context context);
}
\ No newline at end of file
......@@ -185,7 +185,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
@Override
protected void saveAfter(SiteEntity entity, Context context) throws AppException {
log.info("站点更新1");
//刷新站点树
//ThreadPool.getInstance().execute(new SyncTreeSiteThread(this,context));
Rest<String> rest = userFeign.synchSiteAuth();
......@@ -209,6 +208,12 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
public List<SiteTreeSelect> siteTree(Context context) {
Map<String, AreaEntity> areaMap = new HashMap<>();
SiteQuery siteQuery = new SiteQuery();
//如果站点为空 或者用户为空 返回空数组
if (context.getUser() == null) {
return new ArrayList<>();
}
List<SiteEntity> siteList = new ArrayList<>();
if (context.getUser().getSiteIds() != null) {
Set<String> siteSet = Arrays.stream(context.getUser().getSiteIds().split(",")).filter(f -> !f.equals("")).collect(Collectors.toSet());
if (!ObjectUtils.isEmpty(siteSet)) {
......@@ -217,17 +222,20 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
siteQuery.idList(siteIdList);
}
}
}
//查詢指定的站點ids
log.info(String.format("siteQuery==>%s", JSON.toJSONString(siteQuery)));
List<SiteEntity> siteList = this.find(siteQuery);
// log.info(String.format("siteQuery==>%s", JSON.toJSONString(siteQuery)));
siteList = this.find(siteQuery);
}
//如果是管理员 默认全部站点
if (context.getUser().isAdmin()) {
log.info("user is admin !");
if (context.getUser().isAdmin() || context.getUser().getId() == 0L) {
log.info("user is admin ! id:{}", context.getUser().getId());
siteList = this.find(new SiteQuery());
}
if (ObjectUtils.isEmpty(siteList)) {
return new ArrayList<>();
}
//turn to sitemap
Map<String, SiteEntity> siteMap = siteList.parallelStream().collect(Collectors.toMap(x -> x.getSiteCode(), y -> y, (o, n) -> n));
//遍历过滤站点树
......@@ -316,15 +324,18 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
@Override
protected void updateAfter(SiteEntity entity, Context context) throws AppException {
super.updateAfter(entity, context);
//刷新站点树
log.info("update1");
Rest<String> rest = userFeign.synchSiteAuth();
if (rest.getCode().equals(YesNoEnum.YES.getValue())) {
log.info("update2");
UserPdu userPdu = new UserPdu();
userPdu.setPage(1);
userPdu.setSize(-1);
Rest<RespData<List<UserPdu>>> list = userFeign.list(userPdu);
log.info("update21");
userService.updateUserList(list.getData().getData());
log.info("update22");
}
if (refresh) {
//通知设备更新站点信息
......@@ -354,7 +365,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
@Override
public List<SiteTreeSelect> getSiteTree(Context context) {
List<SiteTreeSelect> siteTreeSelects = siteTreeMap.get(context.getUser().getId());
// List<SiteTreeSelect> siteTreeSelects = siteTreeMap.get(context.getUser().getId());
List<SiteTreeSelect> collect = getSiteTreeSelects(context.getUser().getId().toString());
log.info("siteTree:{}", JSON.toJSONString(collect));
if (!ObjectUtils.isEmpty(collect)) {
......@@ -379,7 +390,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
if (ObjectUtils.isEmpty(siteTreeSelectStr)) {
return new ArrayList<>();
}
JSONArray jsonArray = JSON.parseArray(siteTreeSelectStr);
if (ObjectUtils.isEmpty(jsonArray)) {
return new ArrayList<>();
......@@ -440,12 +450,37 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
return siteList;
}
/**
* @param query
* @param context
* @return
*/
@Override
public Integer countSitesByArea(SiteQuery query, Context context) {
List<SiteEntity> siteList = new ArrayList<>();
if (ObjectUtils.isEmpty(query.getAreaCode())) {
throw new AppException("区域编码不能为空!");
}
AreaEntity areaEntity = areaService.getExtCache(query.getAreaCode());
if (ObjectUtils.isEmpty(areaEntity)) {
throw new AppException(String.format("区域不存在!区域编码:%s", query.getAreaCode()));
}
String matchCode = query.getAreaCode().replaceAll("(0)+$", "");
SiteQuery siteQuery = new SiteQuery();
siteQuery.setAreaCode(matchCode + "%");
List<SiteEntity> siteEntities = this.find(siteQuery);
if (!ObjectUtils.isEmpty(siteEntities)) {
siteList.addAll(siteEntities);
}
return siteList.size();
}
@Override
public Rest<List<SiteAreaVo>> getAreaSitesBySite(SiteQuery query, Context context) {
List<SiteAreaVo> list = new ArrayList<>();
SiteAreaVo siteAreaVo = new SiteAreaVo();
//获取当前节点的第一层子节点
if (ObjectUtils.isEmpty(query.getAreaName())) {
throw new AppException("区域名称查询参数不能为空!");
......@@ -459,7 +494,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
throw new AppException("当前站点无子区域!");
}
siteAreaVo.setAreaCode(areaEntity.getAreaCode());
siteAreaVo.setAreaName(AreaLevelEnum.getByValue(areaEntity.getAreaLevel()).getValue()==AreaLevelEnum.地市州.getValue()?"市本级":areaEntity.getName());
siteAreaVo.setAreaName(AreaLevelEnum.getByValue(areaEntity.getAreaLevel()).getValue() == AreaLevelEnum.地市州.getValue() ? "市本级" : areaEntity.getName());
List<SiteEntity> siteEntityList = this.find(new SiteQuery().areaCode(areaEntity.getAreaCode()));
siteAreaVo.setSiteList(siteEntityList);
list.add(siteAreaVo);
......@@ -500,7 +535,11 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
if (!ObjectUtils.isEmpty(query.getSiteName())) {
SiteEntity siteEntity = this.selectOne(new SiteQuery().siteName(query.getSiteName()));
if (!ObjectUtils.isEmpty(siteEntity)) {
query.setAreaLevel(siteEntity.getAreaLevel());
AreaEntity areaCache = areaService.getExtCache(siteEntity.getAreaCode());
query.setAreaLevel(areaCache == null ? 1 : areaCache.getAreaLevel());
log.info("areaLevel:{}", query.getAreaLevel());
} else {
return Rest.ok(new ArrayList<>());
}
}
//获取所有层级的区域
......@@ -539,9 +578,9 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
@Override
public void setSiteTree(List<SiteTreeSelect> list, Context context) {
siteTreeMap.put(context.getUser().getId(), list);
// siteTreeMap.put(context.getUser().getId(), list);
//存放到redis中去
cacheService.hsetnx(USER_SITE_TREE, context.getUser().getId().toString(), JSON.toJSONString(list));
cacheService.hset(USER_SITE_TREE, context.getUser().getId().toString(), JSON.toJSONString(list));
}
@Override
......@@ -676,7 +715,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
//HashSet<String> matterNoSet = new HashSet<>();
Set<String> matterNoSet = matterService.getDao().getMatterListByAreaCode(new MatterQuery().areaCode(siteEntity.getAreaCode())).parallelStream().map(i->i.getMatterNo()).collect(Collectors.toSet());
Set<String> matterNoSet = matterService.getDao().getMatterListByAreaCode(new MatterQuery().areaCode(siteEntity.getAreaCode())).parallelStream().map(i -> i.getMatterNo()).collect(Collectors.toSet());
/* Integer page = 1;
Integer size = 200;
......
......@@ -255,6 +255,24 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
return jsonObject.toJSONString();
}
/**
* 根据区域获取子站点数量
*/
@PostMapping(value = "countSitesByArea")
@UnAuth
public Rest<Integer> countSitesByArea(@RequestBody SiteQuery site) {
String busiDesc = "根据站点id查询站点列表子集" + this.getModuleDesc();
try {
Integer count = this.service.countSitesByArea(site, getContext());
recordSysLog(request, busiDesc + " 【成功】");
return Rest.ok(count);
} catch (Exception e) {
log.error("获取异常", e);
return Rest.fail(e.getMessage());
}
}
/**
* 根据站点id查询站点列表子集,包含当前站点,二层结构
* {rootname:}
......
......@@ -19,10 +19,13 @@ public interface WindowDao extends ICRUDDao<WindowEntity, Long> {
String SQLID_SUB_HALL_LIST = "getSubHallList";
String SQLID_SUB_HALL_COUNT = "getSubHallListCount";
String SQLID_GETHALLBYDEPT = "getHallByDept";
Result<WindowEntity> getSubHallList(WindowEntity windowQuery, PageInfo pageInfo);
Result<WindowEntity> getHallByDept(WindowEntity windowQuery);
}
......@@ -52,6 +52,19 @@ public class WindowDaoImpl extends BaseCRUDDaoMybatis<WindowEntity, Long> implem
return result;
}
/**
* @param windowQuery
* @return
*/
@Override
public Result<WindowEntity> getHallByDept(WindowEntity windowQuery) {
Result<WindowEntity> result = new Result();
ParamDto paramDto = this.getQueryParam(windowQuery);
List list = this.getSqlSession().selectList(this.getSqlId(SQLID_GETHALLBYDEPT), paramDto);
result.setList(list);
return result;
}
public int getSubHallListCount(ParamDto paramDto) {
return this.getSqlSession().selectOne(this.getSqlId(SQLID_SUB_HALL_COUNT), this.cpyQueryParamDto(paramDto));
}
......
......@@ -35,38 +35,47 @@ public class WindowEntity extends WindowVo {
/**
* 窗口名称
*/
@Excel(name = "窗口名称")
private String name;
/**
* 英语窗口名
*/
@Excel(name = "窗口英语名")
private String englishName;
/**
* 区域
*/
@Excel(name = "区域")
private String region;
/**
* 英语区域
*/
@Excel(name = "英语区域")
private String englishRegion;
/**
* 窗口编号
*/
@Excel(name = "窗口编号")
private String fromnum;
/**
* 红旗窗口 (1.是,0.否)
*/
@Excel(name = "红旗窗口",combo={"是","否"}, readConverterExp = "1=是,0=否")
private Integer hongqi;
/**
* 无人值守(1.是)
* 无人值守(1.是)
*/
@Excel(name = "无人值守",combo={"是","否"}, readConverterExp = "1=是,0=否")
private Integer duty;
/**
* 显示内容
*/
@Excel(name = "显示内容")
private String dutyContent;
/**
* 显示英文
*/
@Excel(name = "显示英文")
private String dutyEnglish;
/**
* 备注
......@@ -75,18 +84,22 @@ public class WindowEntity extends WindowVo {
/**
* 楼栋
*/
@Excel(name = "楼栋",cellType= Excel.ColumnType.NUMERIC)
private Integer building;
/**
* 楼层
*/
@Excel(name = "楼层",cellType= Excel.ColumnType.NUMERIC)
private Integer level;
/**
* 名称描述
*/
@Excel(name = "名称描述")
private String nameDesc;
/**
* 英文名称描述
*/
@Excel(name = "英文名称描述")
private String englishNameDesc;
@Override
public int hashCode() {
......
......@@ -45,4 +45,7 @@ public interface WindowService extends ICRUDCacheService<WindowEntity, Long> {
Result<WindowEntity> findSubHallList(WindowEntity windowQuery, PageInfo pageInfo, Context context) throws AppException;
Result<WindowEntity> getHallByDept(WindowEntity windowQuery, Context context) throws AppException;
}
\ No newline at end of file
......@@ -68,7 +68,7 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
item.setHallId(windowHallEntity.getHallId());
item.setHallName(windowHallEntity.getHallName());
}else {
log.info("windowhallEntity is null windowId:{}",item.getWindowId());
//log.info("windowhallEntity is null windowId:{}",item.getWindowId());
}
} else {
iterator.remove();
......
......@@ -152,6 +152,17 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
return this.getDao().getSubHallList(windowQuery, pageInfo);
}
/**
* @param windowQuery
* @param context
* @return
* @throws AppException
*/
@Override
public Result<WindowEntity> getHallByDept(WindowEntity windowQuery, Context context) throws AppException {
return this.getDao().getHallByDept(windowQuery);
}
@Override
protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
......
......@@ -11,10 +11,15 @@ import com.mortals.framework.util.DataUtil;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.framework.web.BasePhpCRUDJsonMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.service.SiteService;
import com.mortals.xhx.module.window.model.WindowEntity;
import com.mortals.xhx.module.window.service.WindowBusinessService;
import com.mortals.xhx.module.window.service.WindowService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -38,12 +43,15 @@ import static com.mortals.framework.ap.SysConstains.PAGEINFO_KEY;
*/
@RestController
@RequestMapping("window")
@Slf4j
public class WindowController extends BaseCRUDJsonBodyMappingController<WindowService, WindowEntity, Long> {
@Autowired
private ParamService paramService;
@Autowired
private WindowBusinessService windowBusinessService;
private SiteService siteService;
@Autowired
private DeptService deptService;
public WindowController() {
......@@ -51,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"));
......@@ -112,4 +129,66 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
return ret;
}
@PostMapping(value = "getHallByDept")
@UnAuth
public Rest<Object> getHallByDept(@RequestBody WindowEntity query) {
Rest<Object> ret = new Rest<>();
Map<String, Object> model = new HashMap<>();
Context context = this.getContext();
String busiDesc = "根据部门查询所属大厅!";
int code = VALUE_RESULT_SUCCESS;
try {
Result<WindowEntity> result = this.getService().getHallByDept(query, context);
model.put(KEY_RESULT_DATA, result.getList());
model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo());
model.put(MESSAGE_INFO, busiDesc + "成功");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
}
this.init(model, context);
ret.setCode(code);
ret.setData(model);
ret.setMsg(model.get(MESSAGE_INFO) == null ? "" : model.remove(MESSAGE_INFO).toString());
return ret;
}
/**
* @param list
* @param updateSupport
* @param context
* @throws AppException
*/
@Override
public void doImportDataBefore(List<WindowEntity> list, boolean updateSupport, Context context) throws AppException {
String siteId = request.getParameter("siteId");
String deptId = request.getParameter("deptId");
log.info("siteId:{}", siteId);
SiteEntity siteEntity = null;
DeptEntity deptEntity = null;
if (!ObjectUtils.isEmpty(siteId)) {
siteEntity = siteService.get(Long.parseLong(siteId));
}
if (!ObjectUtils.isEmpty(deptId)) {
deptEntity = deptService.get(Long.parseLong(deptId));
}
for (WindowEntity windowEntity : list) {
if (!ObjectUtils.isEmpty(siteEntity)) {
windowEntity.setSiteId(siteEntity.getId());
windowEntity.setSiteName(siteEntity.getSiteName());
}
if (!ObjectUtils.isEmpty(deptEntity)) {
windowEntity.setDeptId(deptEntity.getId());
windowEntity.setDeptName(deptEntity.getName());
}
}
}
}
\ No newline at end of file
......@@ -9,32 +9,18 @@ import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.FileUtil;
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.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.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.module.dept.model.DeptEntity;
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.service.SiteService;
import com.mortals.xhx.module.window.model.WindowEntity;
import com.mortals.xhx.module.window.service.WindowService;
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 lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -45,7 +31,6 @@ import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 工作人员
......@@ -84,6 +69,16 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
super.init(model, context);
}
/**
*
*/
@Override
@UnAuth
public void downloadTemplate() {
super.downloadTemplate();
}
/**
* 工作人员登录
*/
......@@ -97,6 +92,13 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
WorkmanEntity workmanEntity = this.service.doLogin(query.getLoginName(), query.getLoginPwd(), ip);
workmanEntity.setLastLoginAddress(ip);
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);
if (query.getSiteId() != workmanEntity.getSiteId()) {
throw new AppException("当前工作人员不在当前站点下!");
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.app.dao.ibatis.AppCategoryDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="AppCategoryEntity" id="AppCategoryEntity-Map">
<id property="id" column="id" />
<result property="siteId" column="siteId" />
<result property="siteName" column="siteName" />
<result property="categoryCode" column="categoryCode" />
<result property="categoryName" column="categoryName" />
<result property="sort" column="sort" />
<result property="createTime" column="createTime" />
<result property="createUserId" column="createUserId" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteId') or colPickMode == 1 and data.containsKey('siteId')))">
a.siteId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteName') or colPickMode == 1 and data.containsKey('siteName')))">
a.siteName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('categoryCode') or colPickMode == 1 and data.containsKey('categoryCode')))">
a.categoryCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('categoryName') or colPickMode == 1 and data.containsKey('categoryName')))">
a.categoryName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sort') or colPickMode == 1 and data.containsKey('sort')))">
a.sort,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="AppCategoryEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_app_category
(siteId,siteName,categoryCode,categoryName,sort,createTime,createUserId,updateUserId,updateTime)
VALUES
(#{siteId},#{siteName},#{categoryCode},#{categoryName},#{sort},#{createTime},#{createUserId},#{updateUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_app_category
(siteId,siteName,categoryCode,categoryName,sort,createTime,createUserId,updateUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.siteId},#{item.siteName},#{item.categoryCode},#{item.categoryName},#{item.sort},#{item.createTime},#{item.createUserId},#{item.updateUserId},#{item.updateTime})
</foreach>
</insert>
<!-- 根据ParamDto更新 -->
<update id="update" parameterType="paramDto">
update mortals_sys_app_category as a
set
<trim suffixOverrides="," suffix="">
<if test="(colPickMode==0 and data.containsKey('siteId')) or (colPickMode==1 and !data.containsKey('siteId'))">
a.siteId=#{data.siteId},
</if>
<if test="(colPickMode==0 and data.containsKey('siteIdIncrement')) or (colPickMode==1 and !data.containsKey('siteIdIncrement'))">
a.siteId=ifnull(a.siteId,0) + #{data.siteIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('siteName')) or (colPickMode==1 and !data.containsKey('siteName'))">
a.siteName=#{data.siteName},
</if>
<if test="(colPickMode==0 and data.containsKey('categoryCode')) or (colPickMode==1 and !data.containsKey('categoryCode'))">
a.categoryCode=#{data.categoryCode},
</if>
<if test="(colPickMode==0 and data.containsKey('categoryName')) or (colPickMode==1 and !data.containsKey('categoryName'))">
a.categoryName=#{data.categoryName},
</if>
<if test="(colPickMode==0 and data.containsKey('sort')) or (colPickMode==1 and !data.containsKey('sort'))">
a.sort=#{data.sort},
</if>
<if test="(colPickMode==0 and data.containsKey('sortIncrement')) or (colPickMode==1 and !data.containsKey('sortIncrement'))">
a.sort=ifnull(a.sort,0) + #{data.sortIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
a.createUserId=#{data.createUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserIdIncrement')) or (colPickMode==1 and !data.containsKey('createUserIdIncrement'))">
a.createUserId=ifnull(a.createUserId,0) + #{data.createUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserId')) or (colPickMode==1 and !data.containsKey('updateUserId'))">
a.updateUserId=#{data.updateUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))">
a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</update>
<!-- 批量更新 -->
<update id="updateBatch" parameterType="paramDto">
update mortals_sys_app_category as a
<trim prefix="set" suffixOverrides=",">
<trim prefix="siteId=(case" suffix="ELSE siteId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('siteId')) or (colPickMode==1 and !item.containsKey('siteId'))">
when a.id=#{item.id} then #{item.siteId}
</when>
<when test="(colPickMode==0 and item.containsKey('siteIdIncrement')) or (colPickMode==1 and !item.containsKey('siteIdIncrement'))">
when a.id=#{item.id} then ifnull(a.siteId,0) + #{item.siteIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="siteName=(case" suffix="ELSE siteName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('siteName')) or (colPickMode==1 and !item.containsKey('siteName'))">
when a.id=#{item.id} then #{item.siteName}
</if>
</foreach>
</trim>
<trim prefix="categoryCode=(case" suffix="ELSE categoryCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('categoryCode')) or (colPickMode==1 and !item.containsKey('categoryCode'))">
when a.id=#{item.id} then #{item.categoryCode}
</if>
</foreach>
</trim>
<trim prefix="categoryName=(case" suffix="ELSE categoryName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('categoryName')) or (colPickMode==1 and !item.containsKey('categoryName'))">
when a.id=#{item.id} then #{item.categoryName}
</if>
</foreach>
</trim>
<trim prefix="sort=(case" suffix="ELSE sort end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('sort')) or (colPickMode==1 and !item.containsKey('sort'))">
when a.id=#{item.id} then #{item.sort}
</when>
<when test="(colPickMode==0 and item.containsKey('sortIncrement')) or (colPickMode==1 and !item.containsKey('sortIncrement'))">
when a.id=#{item.id} then ifnull(a.sort,0) + #{item.sortIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.id=#{item.id} then #{item.updateUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</update>
<!-- 根据主健查询 -->
<select id="getByKey" parameterType="paramDto" resultMap="AppCategoryEntity-Map">
select <include refid="_columns"/>
from mortals_sys_app_category as a
where a.id=#{condition.id}
</select>
<!-- 根据主健删除 -->
<delete id="deleteByKey" parameterType="paramDto">
delete a.* from mortals_sys_app_category as a where a.id=#{condition.id}
</delete>
<!-- 根据主健删除一批,针对单一主健有效 -->
<delete id="deleteByKeys">
delete from mortals_sys_app_category where id in
<foreach collection="array" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_sys_app_category where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_sys_app_category where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</delete>
<!-- 根据paramDto删除一批 -->
<delete id="deleteByMap" parameterType="paramDto">
delete a.* from mortals_sys_app_category as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</delete>
<!-- 获取列表 -->
<select id="getList" parameterType="paramDto" resultMap="AppCategoryEntity-Map">
select <include refid="_columns"/>
from mortals_sys_app_category as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
<include refid="_orderCols_"/>
</select>
<!-- 获取 -->
<select id="getListCount" parameterType="paramDto" resultType="int">
select count(1)
from mortals_sys_app_category as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</select>
<!-- 条件映射 -->
<sql id="_condition_">
<if test="condition != null and !condition.isEmpty()">
<!-- 条件映射-普通条件 -->
<include refid="_condition_param_">
<property name="_conditionParam_" value="condition"/>
<property name="_conditionType_" value="and"/>
</include>
<!-- 条件映射-集合之间使用AND,集合中元素使用OR-(list[0].1 or list[0].2) and (list[1].3 or list[1].4) -->
<if test="condition.containsKey('andConditionList') and !condition.andConditionList.isEmpty()">
and
<foreach collection="condition.andConditionList" open="(" close=")" index="index" item="andCondition" separator=" and ">
<trim prefixOverrides="or" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="andCondition"/>
<property name="_conditionType_" value="or"/>
</include>
</trim>
</foreach>
</if>
<!-- 条件映射-集合之间使用OR,集合中元素使用AND-(list[0].1 and list[0].2) or (list[1].3 and list[1].4) -->
<if test="condition.containsKey('orConditionList') and !condition.orConditionList.isEmpty()">
and
<foreach collection="condition.orConditionList" open="(" close=")" index="index" item="orCondition" separator=" or ">
<trim prefixOverrides="and" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="orCondition"/>
<property name="_conditionType_" value="and"/>
</include>
</trim>
</foreach>
</if>
</if>
</sql>
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
</if>
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if>
<if test="conditionParamRef.containsKey('siteId')">
<if test="conditionParamRef.siteId != null ">
${_conditionType_} a.siteId = #{${_conditionParam_}.siteId}
</if>
<if test="conditionParamRef.siteId == null">
${_conditionType_} a.siteId is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
${_conditionType_} a.siteId in
<foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIdNotList') and conditionParamRef.siteIdNotList.size() > 0">
${_conditionType_} a.siteId not in
<foreach collection="conditionParamRef.siteIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteIdStart') and conditionParamRef.siteIdStart != null">
${_conditionType_} a.siteId <![CDATA[ >= ]]> #{${_conditionParam_}.siteIdStart}
</if>
<if test="conditionParamRef.containsKey('siteIdEnd') and conditionParamRef.siteIdEnd != null">
${_conditionType_} a.siteId <![CDATA[ <= ]]> #{${_conditionParam_}.siteIdEnd}
</if>
<if test="conditionParamRef.containsKey('siteName')">
<if test="conditionParamRef.siteName != null and conditionParamRef.siteName != ''">
${_conditionType_} a.siteName like #{${_conditionParam_}.siteName}
</if>
<if test="conditionParamRef.siteName == null">
${_conditionType_} a.siteName is null
</if>
</if>
<if test="conditionParamRef.containsKey('siteNameList') and conditionParamRef.siteNameList.size() > 0">
${_conditionType_} a.siteName in
<foreach collection="conditionParamRef.siteNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('siteNameNotList') and conditionParamRef.siteNameNotList.size() > 0">
${_conditionType_} a.siteName not in
<foreach collection="conditionParamRef.siteNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('categoryCode')">
<if test="conditionParamRef.categoryCode != null and conditionParamRef.categoryCode != ''">
${_conditionType_} a.categoryCode like #{${_conditionParam_}.categoryCode}
</if>
<if test="conditionParamRef.categoryCode == null">
${_conditionType_} a.categoryCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('categoryCodeList') and conditionParamRef.categoryCodeList.size() > 0">
${_conditionType_} a.categoryCode in
<foreach collection="conditionParamRef.categoryCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('categoryCodeNotList') and conditionParamRef.categoryCodeNotList.size() > 0">
${_conditionType_} a.categoryCode not in
<foreach collection="conditionParamRef.categoryCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('categoryName')">
<if test="conditionParamRef.categoryName != null and conditionParamRef.categoryName != ''">
${_conditionType_} a.categoryName like #{${_conditionParam_}.categoryName}
</if>
<if test="conditionParamRef.categoryName == null">
${_conditionType_} a.categoryName is null
</if>
</if>
<if test="conditionParamRef.containsKey('categoryNameList') and conditionParamRef.categoryNameList.size() > 0">
${_conditionType_} a.categoryName in
<foreach collection="conditionParamRef.categoryNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('categoryNameNotList') and conditionParamRef.categoryNameNotList.size() > 0">
${_conditionType_} a.categoryName not in
<foreach collection="conditionParamRef.categoryNameNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sort')">
<if test="conditionParamRef.sort != null ">
${_conditionType_} a.sort = #{${_conditionParam_}.sort}
</if>
<if test="conditionParamRef.sort == null">
${_conditionType_} a.sort is null
</if>
</if>
<if test="conditionParamRef.containsKey('sortList') and conditionParamRef.sortList.size() > 0">
${_conditionType_} a.sort in
<foreach collection="conditionParamRef.sortList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sortNotList') and conditionParamRef.sortNotList.size() > 0">
${_conditionType_} a.sort not in
<foreach collection="conditionParamRef.sortNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sortStart') and conditionParamRef.sortStart != null">
${_conditionType_} a.sort <![CDATA[ >= ]]> #{${_conditionParam_}.sortStart}
</if>
<if test="conditionParamRef.containsKey('sortEnd') and conditionParamRef.sortEnd != null">
${_conditionType_} a.sort <![CDATA[ <= ]]> #{${_conditionParam_}.sortEnd}
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if>
<if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateUserId')">
<if test="conditionParamRef.updateUserId != null ">
${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
</if>
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdNotList') and conditionParamRef.updateUserIdNotList.size() > 0">
${_conditionType_} a.updateUserId not in
<foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if>
<if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</if>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('siteId')">
a.siteId
<if test='orderCol.siteId != null and "DESC".equalsIgnoreCase(orderCol.siteId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('siteName')">
a.siteName
<if test='orderCol.siteName != null and "DESC".equalsIgnoreCase(orderCol.siteName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('categoryCode')">
a.categoryCode
<if test='orderCol.categoryCode != null and "DESC".equalsIgnoreCase(orderCol.categoryCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('categoryName')">
a.categoryName
<if test='orderCol.categoryName != null and "DESC".equalsIgnoreCase(orderCol.categoryName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('sort')">
a.sort
<if test='orderCol.sort != null and "DESC".equalsIgnoreCase(orderCol.sort)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')">
a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
<sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()">
GROUP BY
<trim suffixOverrides="," suffix="">
<foreach collection="groupList" open="" close="" index="index" item="item" separator=",">
${item}
</foreach>
</trim>
</if>
</sql>
</mapper>
\ No newline at end of file
......@@ -32,4 +32,35 @@
</trim>
</select>
<!-- 根据部门id获取所属大厅 -->
<select id="getHallByDept" parameterType="paramDto" resultMap="WindowEntity-Map">
SELECT
deptId,deptName,hallId ,hallName
FROM
mortals_sys_window w,
mortals_sys_window_hall wh
<trim suffixOverrides="where" suffix="">
where w.id = wh.windowId and
<trim prefixOverrides="and" prefix="">
<if test="condition.siteId!=null and condition.siteId!=''">
and w.siteId = #{condition.siteId}
</if>
<if test="condition.deptId!=null and condition.deptId!=''">
and w.deptId = #{condition.deptId}
</if>
<if test="condition.containsKey('deptIdList')">
and w.deptId in
<foreach collection="condition.deptIdList" open="(" close=")" index="index"
item="item" separator=",">
#{item}
</foreach>
</if>
</trim>
GROUP BY
wh.hallId
</trim>
</select>
</mapper>
\ No newline at end of file
###登录
POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin",
"password":"admin",
"securityCode":"8888"
}
> {%
client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###自助终端应用分类列表
POST {{baseUrl}}/app/category/list
Content-Type: application/json
{
"page":1,
"size":10
}
###自助终端应用分类更新与保存
POST {{baseUrl}}/app/category/save
Authorization: {{authToken}}
Content-Type: application/json
{
"siteId":170,
"siteName":"ggou96",
"categoryCode":"9unmru",
"categoryName":"38ukji",
"sort":0,
}
> {%
client.global.set("AppCategory_id", JSON.parse(response.body).data.id);
%}
###自助终端应用分类查看
GET {{baseUrl}}/app/category/info?id={{AppCategory_id}}
Accept: application/json
###自助终端应用分类编辑
GET {{baseUrl}}/app/category/edit?id={{AppCategory_id}}
Accept: application/json
###自助终端应用分类删除
GET {{baseUrl}}/app/category/delete?id={{AppCategory_id}}
Authorization: {{authToken}}
Accept: application/json
......@@ -20,6 +20,7 @@ Content-Type: application/json
{
"page":1,
"size":1
}
......
......@@ -65,7 +65,7 @@ Accept: application/json
###构建站点树
GET {{baseUrl}}/site/siteTree
#Authorization: {{authToken}}
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJsb2dpbl91c2VyX2tleSI6IjM1OmVjZTkyMWQ1MzY2NDRkMmRhZTU0YmU0ZjA4ODE0OWZkIn0.EXKwA8I8t5rK864aJqMEh51XZ8IPtjG3juV51mgJf80
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJsb2dpbl91c2VyX2tleSI6IjE6NTgyNzRlMWM1MDlhNDQ2YzhmYjVlMDRkNjNlM2JmOTAifQ.dLq6-GLVOPvxq66pbqpj0K5qx1y3FzbKzbKq-wCxOr4
Accept: application/json
......@@ -87,7 +87,7 @@ POST {{baseUrl}}/site/getAreaSitesByAreaLevel
Content-Type: application/json
{
"areaLevel":2
"siteName":"徐州区办事处"
}
###站点列表
......
......@@ -122,7 +122,7 @@ Content-Type: application/json
{
"method":"post",
"type": 2,
"type": 1,
"path":"/api/edge-service-agent/1.0/46ce3be3269e8894/cxyhbhsfz_",
"body":"{\"idCardNo\":\"41010229611620007X\",\"orgNo\":\"10080000\"}"
}
......@@ -133,7 +133,7 @@ Content-Type: application/json
{
"method":"post",
"type": 2,
"type": 1,
"path":"/api/edge-service-agent/1.0/8d0b663762f8bba6/cxbzlb_",
"body":"{\"accountId\":\"1018145\"}"
}
......@@ -163,4 +163,14 @@ Content-Type: application/x-www-form-urlencoded
businessid=125&matter=125&devicenum=C0-FB-F9-CD-3B-5D&peopleid=13
### 参数列表组合查询
POST {{baseUrl}}/param/list
Content-Type: application/json
{
"page":1,
"size": -1,
"firstOrganize": "Window",
"secondOrganize": "hongqi"
}
......@@ -22,6 +22,15 @@ Content-Type: application/json
}
###站点部门窗口列表
POST {{baseUrl}}/window/getHallByDept
Content-Type: application/json
{
"deptId":426
}
###站点部门窗口更新与保存
POST {{baseUrl}}/window/save
Content-Type: application/json
......@@ -59,6 +68,13 @@ Accept: application/json
GET {{baseUrl}}/window/delete?id={{Window_id}}
Accept: application/json
###模板导出
POST {{baseUrl}}/window/downloadTemplate
Content-Type: application/json
Authorization: {{authToken}}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,6 +8,10 @@
</keep-alive> -->
</a-config-provider>
</a-spin>
<!-- 导出进度条 -->
<div class="export" v-if="progressFile.show">
<a-progress :percent="progressFile.percent" status="active" />
</div>
</div>
</template>
......@@ -22,6 +26,10 @@ export default {
loadingProps: {
spinning: false,
},
progressFile:{
show:false,
percent:1
}
};
},
beforeCreate() {
......@@ -62,4 +70,13 @@ export default {
display: flex;
// flex-direction: column;
}
.export{
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%);
z-index: 99;
width: 300px;
height: 150px;
}
</style>
......@@ -61,3 +61,7 @@ export function productLlist(params) {
export function pageLlist(params) {
return http.post(`${baseURL}/zwfw/page/info/list`, params);
}
// 通过业务名查询列表
export function userSiteBus(params) {
return http.get(`${BASEURL}/inter/statistic/busIdForName`, params);
}
import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL;
let BASEURL = process.env.VUE_APP_API_PHP_URL;
let BAS_EURL = process.env.VUE_APP_API_IMG_URL
// 1.15.1. 获取站点下的数据管理列表
export function censusListInterface(params) {
return http.post(`${baseURL}/zwfw/site/model/census/list`, params);
}
/* 排号机部分 */
// 大厅列表数据
export function getDatingList(params) {
return http.post(`${baseURL}/base/site/hall/list`, params);
}
// 部门列表数据
export function getBumenList(params) {
return http.post(`${baseURL}/base/dept/list`, params);
}
//排号机列表数据
export function getTaskList(params) {
return http.get(`${BASEURL}/admin/take/takelist`, params);
......
......@@ -98,7 +98,7 @@ import {getBusInfoById} from '@/api/dataActuary.js'
],
lineData: {},
useNumber: '0',
checkName: '',
checkId: '',
formState: {},
testWay:[]
}
......@@ -110,14 +110,14 @@ import {getBusInfoById} from '@/api/dataActuary.js'
'$route.query': {
immediate: true,
handler(newVal, oldVal){
this.checkName= newVal.name
this.checkId= newVal.id
this.getAnalysisData()
}
}
},
methods: {
async getAnalysisData() {
const res = await getBusInfoById({bus_name: this.checkName, selected: this.useNumber || 0 })
const res = await getBusInfoById({busid: this.checkId, siteid: localStorage.getItem('siteId') })
if(res.code == 1){
if (res.data.phone) this.testWay.push('手机号')
if (res.data.idcardtake) this.testWay.push('身份证')
......
......@@ -15,22 +15,22 @@
@select="onSelect"
@search="onSearch"
/>
<a-button type="primary" class="addclass" @click="startAnalysis">开始分析</a-button>
<a-button type="primary" class="addclass" v-if="btnShow" @click="backBase">返回</a-button>
<a-button type="primary" class="addclass" v-if="!btnShow" @click="startAnalysis">开始分析</a-button>
<a-button type="primary" class="addclass" v-else @click="backBase">返回</a-button>
</div>
</div>
<div class="content_view">
<router-view />
<router-view keep-alive/>
</div>
</div>
</div>
</template>
<script>
import _ from 'lodash'
import axios from 'axios'
import Breadcrumb from "./breadcrumb/index.vue";
export default {
</template>
<script>
import _ from 'lodash';
import axios from 'axios';
import Breadcrumb from "./breadcrumb/index.vue";
import {userSiteBus} from '@/api/dataActuary'
export default {
components:{
Breadcrumb
},
......@@ -39,6 +39,7 @@
// 搜索框
businessName: '',
dataSource: [],
sourceList:[],
dataList: [],
btnShow: false,
}
......@@ -47,14 +48,21 @@
mounted() {
this.getList()
},
created(){
},
computed:{
},
methods:{
startAnalysis() {
if(!this.businessName){
this.$message.error('请输入业务名称搜索')
}else{
this.$router.push({ path: 'analysiscontent', query:{name: this.businessName}})
let item = this.sourceList.filter(i=>{return i.name == this.businessName})[0]
if(item){
this.$router.push({ path: 'analysiscontent', query:{id:item.id}})
this.btnShow= true
}
}
},
backBase() {
this.$router.push({ path: 'basecontent'})
......@@ -72,20 +80,24 @@
},
onSearch: _.debounce(function(val){
this.dataSource= []
this.dataList.forEach(item=>{
if(item.indexOf(val) !== -1){
this.dataSource.push(item)
userSiteBus({siteid: localStorage.getItem('siteId'),bus_name:val}).then(res => {
if (res.code == 1) {
this.sourceList = res.data;
res.data.forEach(r => {
this.dataSource.push(
r.name
);
});
}
})
}, 1000),
},0),
onSelect(val){
this.businessName= val
}
}
},
}
</script>
<style lang="less" scoped>
</script>
<style lang="less" scoped>
@headerH: 4.5rem;
.Container {
height: 100% !important;
......@@ -159,6 +171,4 @@
.content_view{
padding: 0 5rem;
}
</style>
\ No newline at end of file
</style>
<template>
<div class="Container">
<div class="main">
<div class="first_card">
<div class="breadMenu">
<Breadcrumb/>
</div>
<div class="searchBox">
<!-- <a-auto-complete
v-model="businessName"
:data-source="dataSource"
optionLabelProp="value"
style="width: 35.625rem"
placeholder="请输入业务名称搜索"
@select="onSelect"
@search="onSearch"
/> -->
<!-- <a-select show-search placeholder="请输入业务名称搜索" style="width: 35.625rem"
:default-active-first-option="false" :show-arrow="false" :filter-option="false" allowClear
:not-found-content="null" :options="peopleArr" @search="peopelListFn"
@change="handleChange">
</a-select> -->
<a-button type="primary" class="addclass" v-if="!btnShow" @click="startAnalysis">开始分析</a-button>
<a-button type="primary" class="addclass" v-else @click="backBase">返回</a-button>
</div>
</div>
<div class="content_view">
<router-view keep-alive/>
</div>
</div>
</div>
</template>
<script>
import _ from 'lodash';
import axios from 'axios';
import Breadcrumb from "./breadcrumb/index.vue";
export default {
components:{
Breadcrumb
},
data() {
return {
// 搜索框
businessName: '',
dataSource: [],
dataList: [],
btnShow: false,
}
},
mounted() {
this.getList()
},
methods:{
startAnalysis() {
if(!this.businessName){
this.$message.error('请输入业务名称搜索')
}else{
this.$router.push({ path: 'analysiscontent', query:{name: this.businessName}})
this.btnShow= true
}
},
backBase() {
this.$router.push({ path: 'basecontent'})
this.btnShow= false
this.businessName= ''
},
async getList(){
await axios.get('http://192.168.0.98:8090/inter/statistic/busList',{params: {siteid: 1}}).then((res)=>{
if(res && res.status==200){
res.data.data.forEach(item=>{
this.dataList.push(item.name)
})
}
})
},
onSearch: _.debounce(function(val){
this.dataSource= []
this.dataList.forEach(item=>{
if(item.indexOf(val) !== -1){
this.dataSource.push(item)
}
})
}, 1000),
onSelect(val){
this.businessName= val
}
}
}
</script>
<style lang="less" scoped>
@headerH: 4.5rem;
.Container {
height: 100% !important;
// background: #fac;
background: #f5f5f5;
display: flex;
flex-direction: column;
.main {
// background: #afc;
border-radius: 6px;
flex: 1;
overflow-y: auto;
overflow-x: hidden;
}
&::before {
content: "";
display: block;
width: 100%;
height: @headerH;
background: rgb(59, 135, 255);
background: -moz-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: -webkit-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff",endColorstr="#6c35f7",GradientType=1);
}
/deep/.ant-tabs-nav {
.ant-tabs-tab {
margin: 0 !important;
}
}
/deep/.ant-tabs-tab {
font-size: 14px !important;
& + .ant-tabs-tab {
margin: 0 !important;
margin-left: 0.7rem !important;
}
}
/deep/.ant-tabs-bar{
margin: 0;
}
}
.first_card{
background: #FFF;
margin-bottom: .9375rem;
}
.breadMenu{
height: 2.8125rem;
line-height: 2.8125rem;
padding: 0 5rem;
border-bottom: 1px solid rgba(226, 226, 226, 1);
}
.searchBox{
height: 6.25rem;
display: flex;
justify-content: center;
align-items: center;
}
.content_view{
padding: 0 5rem;
}
</style>
\ No newline at end of file
......@@ -13,6 +13,18 @@
</div>
<span>
<a-space>
<a-select v-model="hallid">
<a-select-option value=""> 全部大厅 </a-select-option>
<a-select-option v-for="item in datingList" :key="item.id" :value="item.id">
{{ item.hallName }}
</a-select-option>
</a-select>
<a-select v-model="sectionid">
<a-select-option value=""> 全部部门 </a-select-option>
<a-select-option v-for="item in bumenList" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
<a-select v-model="evaChoose" placeholder="全部评价" mode="multiple">
<a-select-option v-for="item in optonList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
</a-select>
......@@ -62,6 +74,8 @@ import table from "@/mixins/table";
import { export2Excel } from "@/utils/js/exportExcel";
import HandlingDetails from "./components/HandlingDetails.vue";
import {
getDatingList,
getBumenList,
getOptonList,
getEvaList,
getEvaData,
......@@ -219,12 +233,20 @@ export default {
"pjxt",
"pj_name",
],
// 大厅列表
datingList:[],
// 部门列表
bumenList:[],
hallid:'',
sectionid:''
};
},
components: {
HandlingDetails,
},
created() {
this.getDatingListArr();
this.getBumenListArr();
this.togetevalist();
},
mounted() {
......@@ -235,6 +257,18 @@ export default {
});
},
methods: {
// 获取大厅列表
async getDatingListArr() {
await getDatingList({ page: 1, size: -1 }).then((res) => {
this.datingList = res.data.data;
});
},
// // 获取部门列表
async getBumenListArr() {
await getBumenList({ page: 1, size: -1 }).then((res) => {
this.bumenList = res.data.data;
});
},
// 重置
clearnAllChoose() {
this.evaChoose = [];
......@@ -303,6 +337,8 @@ export default {
pjxt,
time: this.BegindAndEndTime,
info: this.searchName,
hallid:this.hallid,
sectionid:this.sectionid,
...search,
});
if (res.code == 1) {
......
......@@ -13,6 +13,18 @@
</div>
<span>
<a-space>
<a-select v-model="hallid">
<a-select-option value=""> 全部大厅 </a-select-option>
<a-select-option v-for="item in datingList" :key="item.id" :value="item.id">
{{ item.hallName }}
</a-select-option>
</a-select>
<a-select v-model="sectionid">
<a-select-option value=""> 全部部门 </a-select-option>
<a-select-option v-for="item in bumenList" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
<a-select v-model="evaChoose" placeholder="全部评价" mode="multiple">
<a-select-option v-for="item in optonList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
</a-select>
......@@ -62,6 +74,8 @@ import { export2Excel } from "@/utils/js/exportExcel";
import table from "@/mixins/table";
import HandlingDetails from "./components/HandlingDetails.vue";
import {
getDatingList,
getBumenList,
getOptonList,
getEvaList,
getEvaData,
......@@ -219,17 +233,37 @@ export default {
"pjxt",
"pj_name",
],
// 大厅列表
datingList:[],
// 部门列表
bumenList:[],
hallid:'',
sectionid:''
};
},
components: {
HandlingDetails,
},
created() {
this.getDatingListArr();
this.getBumenListArr();
this.togetevalist();
this.getOptonList();
},
methods: {
// 获取大厅列表
async getDatingListArr() {
await getDatingList({ page: 1, size: -1 }).then((res) => {
this.datingList = res.data.data;
});
},
// // 获取部门列表
async getBumenListArr() {
await getBumenList({ page: 1, size: -1 }).then((res) => {
this.bumenList = res.data.data;
});
},
// 重置
clearnAllChoose() {
this.evaChoose = [];
......@@ -305,6 +339,8 @@ export default {
pjxt,
time: this.BegindAndEndTime,
info: this.searchName,
hallid:this.hallid,
sectionid:this.sectionid,
...search,
});
if (res.code == 1) {
......
......@@ -13,6 +13,18 @@
</div>
<span>
<a-space>
<a-select v-model="hallid">
<a-select-option value=""> 全部大厅 </a-select-option>
<a-select-option v-for="item in datingList" :key="item.id" :value="item.id">
{{ item.hallName }}
</a-select-option>
</a-select>
<a-select v-model="sectionid">
<a-select-option value=""> 全部部门 </a-select-option>
<a-select-option v-for="item in bumenList" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
<a-select v-model="evaChoose" placeholder="全部评价" mode="multiple">
<a-select-option v-for="item in optonList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
</a-select>
......@@ -63,6 +75,8 @@ import table from "@/mixins/table";
import { export2Excel } from "@/utils/js/exportExcel";
import HandlingDetails from "./components/HandlingDetails.vue";
import {
getDatingList,
getBumenList,
getOptonList,
getEvaList,
getEvaData,
......@@ -136,7 +150,7 @@ export default {
},
},
{
title: "评价来源",
title: "评价系统",
align: "center",
dataIndex: "pjxt",
customRender: (text, record, index) => {
......@@ -219,6 +233,10 @@ export default {
"pjxt",
"pj_name",
],
datingList: [],
bumenList: [],
hallid: '',
sectionid: ''
};
},
components: {
......@@ -226,10 +244,24 @@ export default {
},
created() {
this.getDatingListArr();
this.getBumenListArr();
this.getOptonList();
this.togetevalist();
},
methods: {
// 获取大厅列表
async getDatingListArr() {
await getDatingList({ page: 1, size: -1 }).then((res) => {
this.datingList = res.data.data;
});
},
// 获取部门列表
async getBumenListArr() {
await getBumenList({ page: 1, size: -1 }).then((res) => {
this.bumenList = res.data.data;
});
},
// 重置
clearnAllChoose() {
this.evaChoose = [];
......@@ -242,6 +274,8 @@ export default {
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
];
this.sectionid = ''
this.hallid = ''
this.togetevalist();
},
// 搜索
......@@ -309,6 +343,8 @@ export default {
pjxt,
time: this.BegindAndEndTime,
info: this.searchName,
hallid: this.hallid,
sectionid: this.sectionid,
...search,
});
if (res.code == 1) {
......@@ -327,7 +363,7 @@ export default {
openHandlingDetails(record) {
console.log(record)
// 判断为窗口屏或者其他状况,调用不同接口
if (record.pjxt == 1) {
if (record.pjxt == 1 && record.queueid) {
this.$refs.HandlingDetails.modalInfo.title = "办理明细";
this.$refs.HandlingDetails.modalInfo.show = 1;
this.togetQueEvaData(record);
......
......@@ -158,7 +158,7 @@ export default {
this.tHeader,
this.filterVal,
data,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
"12345拨打记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
this.btnLoading = false;
},
......
......@@ -376,7 +376,7 @@ export default {
tHeader,
filterVal,
data,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
"12345写信记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
this.btnLoading = false;
},
......
......@@ -10,6 +10,18 @@
</div>
<span>
<a-space>
<a-select v-model="searchForm.hallid">
<a-select-option value=""> 全部大厅 </a-select-option>
<a-select-option v-for="item in datingList" :key="item.id" :value="item.id">
{{ item.hallName }}
</a-select-option>
</a-select>
<a-select v-model="searchForm.sectionid">
<a-select-option value=""> 全部部门 </a-select-option>
<a-select-option v-for="item in bumenList" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
<a-select v-model="searchForm.id">
<a-select-option value=""> 全部设备 </a-select-option>
<a-select-option v-for="item in deviceData" :key="item.id" :value="item.id">
......@@ -66,6 +78,15 @@
<template slot="calltime" slot-scope="text">
{{ text.calltime ? text.calltime : "--" }}
</template>
<template slot="all_time" slot-scope="text">
{{ text.all_time ? text.all_time : "--" }}
</template>
<template slot="run_time" slot-scope="text">
{{ text.run_time ? text.run_time : "--" }}
</template>
<template slot="wait_time" slot-scope="text">
{{ text.wait_time ? text.wait_time : "--" }}
</template>
<!-- 办理窗口 -->
<template slot="window_name" slot-scope="text">
{{
......@@ -117,6 +138,8 @@ import BusinessInfo from "./components/businessInfo.vue";
import WorkpeopleInfo from "./components/workpeopleInfo.vue";
import HandlingDetails from "./components/HandlingDetails.vue";
import {
getDatingList,
getBumenList,
getCalllist,
getCallQueList,
getBusinessEvent,
......@@ -207,6 +230,30 @@ export default {
customRender: "endtime",
},
},
{
title: "当前排号总时长",
width: "8%",
align: "center",
scopedSlots: {
customRender: "all_time",
},
},
{
title: "业务平均办理时长",
width: "8%",
align: "center",
scopedSlots: {
customRender: "run_time",
},
},
{
title: "业务平均等待时长",
width: "8%",
align: "center",
scopedSlots: {
customRender: "wait_time",
},
},
{
title: "状态",
......@@ -232,7 +279,13 @@ export default {
style: "", // 状态
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码
hallid: "",
sectionid: ""
},
// 大厅列表
datingList: [],
// 部门列表
bumenList: [],
//状态
style: [
{
......@@ -276,6 +329,9 @@ export default {
"window_name",
"workman_name",
"endtime",
"all_time",
"run_time",
"wait_time",
"style",
],
btnLoading: false,
......@@ -290,11 +346,25 @@ export default {
HandlingDetails,
},
created() {
this.getDatingListArr();
this.getBumenListArr();
this.getCalllistArr();
this.getCallQueListArr();
},
mounted() { },
methods: {
// 获取大厅列表
async getDatingListArr() {
await getDatingList({ page: 1, size: -1 }).then((res) => {
this.datingList = res.data.data;
});
},
// // 获取部门列表
async getBumenListArr() {
await getBumenList({ page: 1, size: -1 }).then((res) => {
this.bumenList = res.data.data;
});
},
//重置按钮
resetBtn() {
this.tableSelectedKeys = [];
......@@ -305,6 +375,8 @@ export default {
style: "", // 状态
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码
hallid: "",
sectionid: ""
};
this.getCallQueListArr();
},
......@@ -468,6 +540,10 @@ export default {
</script>
<style lang="less" scoped>
/deep/.ant-select {
width: 120px;
}
/deep/.ant-spin-container {
display: block !important;
}
......
......@@ -52,7 +52,7 @@
</div>
<div class="description_box" slot="description">
<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.workman_name || "--" }}</span>
<span><i class="lable">叫号设备:</i>{{ dataList.call_name || "--" }}</span>
......
......@@ -10,6 +10,18 @@
</div>
<span>
<a-space>
<a-select v-model="searchForm.hallid">
<a-select-option value=""> 全部大厅 </a-select-option>
<a-select-option v-for="item in datingList" :key="item.id" :value="item.id">
{{ item.hallName }}
</a-select-option>
</a-select>
<a-select v-model="searchForm.sectionid">
<a-select-option value=""> 全部部门 </a-select-option>
<a-select-option v-for="item in bumenList" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
<a-select v-model="searchForm.id">
<a-select-option value=""> 全部设备 </a-select-option>
<a-select-option v-for="item in deviceData" :key="item.id" :value="item.id">
......@@ -85,6 +97,15 @@
<template slot="endtime" slot-scope="text">
{{ text.endtime ? text.endtime : "--" }}
</template>
<template slot="all_time" slot-scope="text">
{{ text.all_time ? text.all_time : "--" }}
</template>
<template slot="run_time" slot-scope="text">
{{ text.run_time ? text.run_time : "--" }}
</template>
<template slot="wait_time" slot-scope="text">
{{ text.wait_time ? text.wait_time : "--" }}
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a @click="openHandlingDetails(text.id)">详细信息</a>
......@@ -116,6 +137,8 @@ import BusinessInfo from "./components/businessInfo.vue";
import WorkpeopleInfo from "./components/workpeopleInfo.vue";
import HandlingDetails from "./components/HandlingDetails.vue";
import {
getDatingList,
getBumenList,
getTaskList,
getQueueData,
getQueueInfo,
......@@ -125,6 +148,8 @@ import {
getWorkmananalyse,
} from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
import { loading } from "@jiaminghi/data-view";
let ExcelDate = []
export default {
name: "PortalAdminVueQueueRecord",
mixins: [table],
......@@ -208,6 +233,30 @@ export default {
customRender: "endtime",
},
},
{
title: "当前排号总时长",
width: "8%",
align: "center",
scopedSlots: {
customRender: "all_time",
},
},
{
title: "业务平均办理时长",
width: "8%",
align: "center",
scopedSlots: {
customRender: "run_time",
},
},
{
title: "业务平均等待时长",
width: "8%",
align: "center",
scopedSlots: {
customRender: "wait_time",
},
},
{
title: "状态",
......@@ -252,6 +301,9 @@ export default {
"window_name",
"workman_name",
"endtime",
"all_time",
"run_time",
"wait_time",
"style",
],
//设备数据
......@@ -262,6 +314,8 @@ export default {
style: "", // 状态
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
flownum: "", // 排号编码
hallid: "",
sectionid: ""
},
//状态
style: [
......@@ -287,6 +341,10 @@ export default {
},
tableSelectedKeys: [],
tableSelectedRows: [],
// 大厅列表
datingList: [],
// 部门列表
bumenList: [],
};
},
components: {
......@@ -296,11 +354,25 @@ export default {
HandlingDetails,
},
created() {
this.getDatingListArr();
this.getBumenListArr();
this.getTaskListArr();
this.getQueueDataArr();
},
mounted() { },
methods: {
// 获取大厅列表
async getDatingListArr() {
await getDatingList({ page: 1, size: -1 }).then((res) => {
this.datingList = res.data.data;
});
},
// // 获取部门列表
async getBumenListArr() {
await getBumenList({ page: 1, size: -1 }).then((res) => {
this.bumenList = res.data.data;
});
},
//重置按钮
resetBtn() {
this.tablePagination.current = 1;
......@@ -432,27 +504,76 @@ export default {
}
});
});
} else {
data = this.$_.cloneDeep(
await this.getQueueDataArr({ page: 1, size: -1 })
export2Excel(
this.tHeader,
this.filterVal,
data,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
if (!data.length) return;
for (let item of data) {
this.btnLoading = false;
} else {
ExcelDate = []
await this.dataSection(1, 1000, () => {
if (!ExcelDate.length) return;
for (let item of ExcelDate) {
Object.keys(obj).forEach((key) => {
if (item.style == key) {
item.style = obj[key];
}
});
}
}
export2Excel(
this.tHeader,
this.filterVal,
data,
ExcelDate,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
this.btnLoading = false;
// alert(11)
})
// return
// data = this.$_.cloneDeep(
// await this.getQueueDataArr({ page: 1, size: -1 })
// );
// if (!data.length) return;
// for (let item of data) {
// Object.keys(obj).forEach((key) => {
// if (item.style == key) {
// item.style = obj[key];
// }
// });
// }
}
},
// 数据切片
async dataSection(page, size = 100, fn) {
let res = await getQueueData({
page: page || 1,
size: size,
...this.searchForm,
});
if (res.code == 1) {
let { data, total } = res.data;
ExcelDate = ExcelDate.concat(data || [])
// app.vue loading
this.$app.progressFile.show = true
this.$app.progressFile.percent = parseInt((ExcelDate.length / total) * 100)
if (ExcelDate.length >= total || data.length == 0) {
fn()
this.$app.progressFile.show = false
this.$app.progressFile.percent = 1
return
}
setTimeout(() => {
let index = parseInt(page || 1) + 1
this.dataSection(index, size, fn)
});
}
}
},
};
</script>
......
......@@ -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;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.Rest;
import com.mortals.framework.common.code.UserType;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
......@@ -268,9 +269,37 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
@Override
public void synchSitesAuth() throws AppException {
//todo 批量更新 用户太多 该接口查询非常缓慢 用户根据所属区域分组查询后更新
UserEntity query = new UserEntity();
List<UserEntity> all = this.find(query);
all.forEach(item -> {
List<UserEntity> allUsers = this.find(query);
//区域分组编码
allUsers.stream().collect(Collectors.groupingBy(x -> x.getAreaCodes())).entrySet().forEach(item -> {
String areaCodes = item.getKey();
if (!ObjectUtils.isEmpty(areaCodes)) {
List<String> areaCodeList = Arrays.asList(areaCodes.split(","));
String resp = areaService.getFlatSitesByAreaCodes(new AreaQuery().areaCodeList(areaCodeList), null);
JSONObject apiResp = JSON.parseObject(resp);
if (apiResp.getInteger("code") == YesNoEnum.YES.getValue()) {
String siteIds = apiResp.getString("data");
//更新用户站点
List<UserEntity> userEntityList = item.getValue();
if (!ObjectUtils.isEmpty(userEntityList)) {
userEntityList.stream().forEach(userEntity -> {
userEntity.setSiteIds(siteIds);
this.dao.update(userEntity);
updateRedisUserSession(userEntity);
});
//this.dao.updateBatch(userEntityList);
}
} else {
log.info("获取用户站点列表树数据失败:" + apiResp.getString("msg"));
}
}
});
/* all.forEach(item -> {
if (StringUtils.isNotEmpty(item.getAreaCodes())) {
List<String> areaCodeList = Arrays.asList(item.getAreaCodes().split(","));
String resp = areaService.getFlatSitesByAreaCodes(new AreaQuery().areaCodeList(areaCodeList), null);
......@@ -286,7 +315,7 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
updateRedisUserSession(userEntity);
}
});
});*/
}
@Override
......@@ -352,7 +381,7 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
entity.setCreateTime(new Date());
entity.setLoginPwd(SecurityUtil.md5DoubleEncoding(entity.getLoginPwd()));
int insert = this.getDao().insert(entity);
if (insert >0) {
if (insert > 0) {
successNum++;
RoleUserQuery roleUserQuery = new RoleUserQuery();
roleUserQuery.setUserId(entity.getId());
......
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