Commit 60b2ec91 authored by 赵啸非's avatar 赵啸非

Merge branch 'master' into 'reg'

Master

See merge request !1
parents 9bc81fbb 61c33a07
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
"china-division": "^2.5.0", "china-division": "^2.5.0",
"clipboard": "^2.0.6", "clipboard": "^2.0.6",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"crypto-js": "^4.1.1",
"date-fns": "^2.14.0", "date-fns": "^2.14.0",
"echarts": "^5.2.2", "echarts": "^5.2.2",
"element-china-area-data": "^5.0.2", "element-china-area-data": "^5.0.2",
...@@ -34,6 +35,7 @@ ...@@ -34,6 +35,7 @@
"highlight.js": "^10.2.1", "highlight.js": "^10.2.1",
"html2canvas": "^1.4.1", "html2canvas": "^1.4.1",
"js-cookie": "^2.2.1", "js-cookie": "^2.2.1",
"lodash": "^4.17.21",
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"moment": "^2.24.0", "moment": "^2.24.0",
"nanoid": "^4.0.0", "nanoid": "^4.0.0",
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<meta charset="utf-8"> <head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <meta name="viewport" content="width=device-width,initial-scale=1.0" />
<!-- <title><%= process.env.VUE_APP_NAME %></title> --> <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title></title> <!-- <title><%= process.env.VUE_APP_NAME %></title> -->
<!-- require cdn assets css --> <title></title>
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %> <!-- require cdn assets css -->
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" /> <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
<% } %> <% } %>
<style>
</head> @font-face {
<body> font-family: Source Han Sans CN;
<noscript> src: url("./SourceHanSansSC-Regular-2.otf");
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> }
</noscript> </style>
<div id="popContainer"> </head>
<div id="app"></div>
</div> <body>
<!-- require cdn assets js --> <noscript>
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %> <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
<script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script> properly without JavaScript enabled. Please enable it to
continue.</strong>
</noscript>
<div id="popContainer">
<div id="app"></div>
</div>
<!-- require cdn assets js -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
<% } %> <% } %>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
</html>
</html>
\ No newline at end of file
...@@ -31,16 +31,17 @@ ...@@ -31,16 +31,17 @@
border-bottom: 1px solid rgb(224, 224, 224) !important; border-bottom: 1px solid rgb(224, 224, 224) !important;
} }
.ant-tabs-tab{ .ant-tabs-tab {
font-weight: bold; font-weight: bold;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
i{ i {
color:#1890ff color: #1890ff;
} }
} }
.ant-spin-nested-loading,.ant-spin-container{ .ant-spin-nested-loading,
width:100%; .ant-spin-container {
height:100%; width: 100%;
height: 100%;
} }
/* 溢出表格滚动条 */ /* 溢出表格滚动条 */
/* 表格 */ /* 表格 */
...@@ -56,10 +57,9 @@ ...@@ -56,10 +57,9 @@
tr:only-child > th:last-child { tr:only-child > th:last-child {
border-right-color: #f0f0f0 !important; border-right-color: #f0f0f0 !important;
} }
} }
.ant-table-placeholder{ .ant-table-placeholder {
width:calc(100% - 6px) width: calc(100% - 6px);
} }
.ant-table-header { .ant-table-header {
background: #fff; background: #fff;
...@@ -99,9 +99,14 @@ ...@@ -99,9 +99,14 @@
resize: none; resize: none;
} }
.ant-btn-primary { .ant-btn-primary {
background: linear-gradient(90deg, #5ab6ff, #2e9aff) !important; background: linear-gradient(90deg, #5ab6ff, #2e9aff) ;
border: none !important; border: none ;
border-color: transparent !important; border-color: transparent ;
&:hover,&:focus{
background: linear-gradient(90deg, #5ab6ff, #2e9aff) ;
border: none ;
border-color: transparent ;
}
} }
.ant-form-explain { .ant-form-explain {
...@@ -118,4 +123,11 @@ ...@@ -118,4 +123,11 @@
// align-items: center; // align-items: center;
// justify-content:space-between; // justify-content:space-between;
// margin-bottom: 20px; // margin-bottom: 20px;
// } // }
\ No newline at end of file
// 统一设置表格为空时的展示
.ant-table-tbody {
td:empty::after {
content: "--";
}
}
<template>
<div class="y-button" :style="{ '--w': width + 'px' }">
<button
type="button"
:style="{ '--w': width + 'px' }"
:class="{ animating: active, active: value }"
@click="clickHandler"
@animationend="animationend"
>
<span>
<b></b>
<svg viewBox="-5.5 -5.5 71 71" id="circle">
<circle
cx="30"
cy="30"
r="30"
stroke="white"
stroke-width="11"
fill="transparent"
></circle>
</svg>
</span>
</button>
<div :class="['text', { active: value }]">
<!-- <span class="on">
<span>
{{ activeText }}
</span>
</span>
<span class="off">
<span>
{{ unActiveText }}
</span>
</span> -->
{{ value ? activeText : unActiveText }}
</div>
</div>
</template>
<script>
export default {
model: {
prop: "checked",
event: "change",
},
props: {
width: {
type: Number,
default: 84,
},
checked: {
required: true,
},
activeText: {
default: "ON",
},
unActiveText: {
default: "OFF",
},
},
data() {
return {
active: false,
};
},
computed: {
value() {
return this.checked === 1 || this.checked === "1";
},
},
methods: {
clickHandler() {
this.active = true;
},
animationend() {
this.active = false;
this.$emit("change", this.checked ? 0 : 1);
},
},
};
</script>
<style lang="less" scoped>
@keyframes c {
to {
transform: none;
}
}
.y-button {
--timing: cubic-bezier(0.645, 0.045, 0.355, 1);
--primary: #f4f7f5;
width: var(--w);
button {
--bg: rgb(var(--rgb));
--bga: rgba(var(--rgb), 0.4);
/* Safari fix */
-webkit-appearance: none;
border: none;
font-size: 100%;
width: var(--w);
height: var(--w);
background: var(--bg);
box-shadow: 0 3px 12px 2px var(--bga);
border-radius: 50%;
position: relative;
overflow: hidden;
cursor: pointer;
transition: 0.1s transform, 0.3s box-shadow;
will-change: transform, box-shadow;
backface-visibility: hidden;
}
button > * {
pointer-events: none;
}
button:focus {
outline: none;
}
button:active {
transform: scale(0.97);
}
button:after {
--bg: rgb(var(--rgb));
content: "";
position: absolute;
top: -15%;
left: -15%;
width: 200%;
height: 200%;
background: var(--bg);
border-radius: inherit;
transform: translate(5%, 5%) scale(0.03);
pointer-events: none;
}
button.animating:after {
animation: c 0.5s cubic-bezier(0.5, 0, 0.5, 1) backwards;
}
button.active,
button:not(.active):after {
--rgb: 64, 227, 120;
}
button:not(.active),
button.active:after {
--rgb: 229, 55, 94;
}
button span {
display: inline-block;
position: relative;
margin-top: 5px;
}
button b {
--w: 7px;
overflow: hidden;
border-radius: var(--w);
display: grid;
width: var(--w);
height: 35px;
top: 0;
left: 50%;
position: absolute;
transform: translateX(-50%);
z-index: 3;
will-change: transform;
}
button b:before {
content: "";
background: #fff;
width: 100%;
height: 100%;
border-radius: var(--w);
transform: translateY(-15px);
transition-timing-function: var(--timing);
transition: 0.5s;
}
button.active b:before {
transform: translateY(12px);
transition-delay: 0.27s;
transition-timing-function: cubic-bezier(0.25, 0.25, 0.25, 1.25);
}
button svg {
--dash: 190;
stroke-linecap: round;
stroke-dasharray: var(--dash);
stroke-dashoffset: var(--dash);
width: 46px;
height: 46px;
transform: scaleX(-1) rotate(-89deg);
transition: 0.4s;
transition-timing-function: var(--timing);
margin: auto;
position: relative;
z-index: 1;
will-change: transform, stroke-dashoffset;
}
button:not(.active) svg {
stroke-dashoffset: 40;
transform: scaleX(-1) rotate(-52deg);
transition: 0.5s 0.25s;
}
aside {
position: absolute;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
text-align: center;
width: 100%;
padding: 0 2em 2em;
font-family: "Pacifico", cursive;
}
aside a {
text-decoration: underline;
color: #e65289;
display: flex;
align-items: center;
}
aside a:hover,
aside a:focus {
color: #000;
text-decoration: none;
}
.dribbble-logo {
width: 18px;
height: 18px;
margin-right: 5px;
}
.text {
width: 100%;
margin-top: 10px;
font-size: 22px;
font-family: Source Han Sans CN;
font-weight: 500;
color: #c9c9c9;
text-align: center;
}
}
</style>
...@@ -2,13 +2,16 @@ ...@@ -2,13 +2,16 @@
<div style="margin-bottom: 25px" class="y-quill" :style="{ height: height }"> <div style="margin-bottom: 25px" class="y-quill" :style="{ height: height }">
<!-- 图片上传组件辅助--> <!-- 图片上传组件辅助-->
<a-upload <a-upload
name="uploadFile" name="file"
:multiple="true" :multiple="true"
:headers="headers" :headers="{
Authorization: token,
}"
:show-upload-list="false" :show-upload-list="false"
:action="serverUrl" :action="serverUrl"
@change="handleChange" @change="handleChange"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:accept="accept"
> >
</a-upload> </a-upload>
<!-- 富文本 --> <!-- 富文本 -->
...@@ -24,7 +27,7 @@ ...@@ -24,7 +27,7 @@
</div> </div>
</template> </template>
<script> <script>
import local from "@/utils/local"; import { mapGetters } from "vuex";
// 工具栏配置 // 工具栏配置
const toolbarOptions = [ const toolbarOptions = [
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线 ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
...@@ -104,6 +107,7 @@ export default { ...@@ -104,6 +107,7 @@ export default {
data() { data() {
return { return {
accept: "image/png,image/gif,image/jpeg,video/mp4",
quillUpdateImg: false, // 根据图片上传状态来确定是否显示loading动画,刚开始是false,不显示 quillUpdateImg: false, // 根据图片上传状态来确定是否显示loading动画,刚开始是false,不显示
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
editorOption: { editorOption: {
...@@ -142,10 +146,7 @@ export default { ...@@ -142,10 +146,7 @@ export default {
}, },
}, },
}, },
serverUrl: process.env.VUE_APP_API_BASE_URL + "/file/commonupload", // 这里写你要上传的图片服务器地址 serverUrl: process.env.VUE_APP_API_BASE_URL + "/base/file/commonupload", // 这里写你要上传的图片服务器地址
headers: {
Authorization: local.getLocal("token"),
},
}; };
}, },
computed: { computed: {
...@@ -157,6 +158,7 @@ export default { ...@@ -157,6 +158,7 @@ export default {
this.$emit("input", val); this.$emit("input", val);
}, },
}, },
...mapGetters("site", ["token"]),
}, },
methods: { methods: {
onEditorBlur() { onEditorBlur() {
......
...@@ -2,14 +2,15 @@ ...@@ -2,14 +2,15 @@
<div class="sitetree"> <div class="sitetree">
<!-- <span style="font-weight: 600">站点结构</span> --> <!-- <span style="font-weight: 600">站点结构</span> -->
<div class="box"> <div class="box">
<a-tree <a-spin :spinning="loading">
:load-data="onLoadData" <a-tree
:tree-data="treeData" :tree-data="treeData"
:expandedKeys.sync="expandedKeys" :expandedKeys.sync="expandedKeys"
:replaceFields="{ title: 'label', key: 'id' }" :replaceFields="{ title: 'label', key: 'id' }"
@select="onSelect" @select="onSelect"
> >
</a-tree> </a-tree>
</a-spin>
</div> </div>
</div> </div>
</template> </template>
...@@ -18,6 +19,7 @@ ...@@ -18,6 +19,7 @@
// api // api
import { import {
getListByParentId, getListByParentId,
authAreaTree,
// areaList, // areaList,
// getSiteList // getSiteList
} from "@/services/basicsetFun"; } from "@/services/basicsetFun";
...@@ -28,43 +30,73 @@ export default { ...@@ -28,43 +30,73 @@ export default {
treeData: [], //树结构 treeData: [], //树结构
id: "", id: "",
expandedKeys: [], expandedKeys: [],
loading: false,
}; };
}, },
created() { created() {
this.getAreaList(); this.authAreaTree();
this.getTopArea();
}, },
methods: { methods: {
// 获取区域 editLeaf(arr) {
async getAreaList() { return arr.map((v) => {
if (v.children && v.children.length > 0) {
this.editLeaf(v.children);
} else {
v.isLeaf = true;
}
return v;
});
},
// 获取个人区域数据
async authAreaTree() {
this.loading = true;
let res = await authAreaTree();
if (res.data.code == 1) {
let { data } = res.data.data;
if (data.length) {
let firstData = data[0];
if (firstData.areaLevel > 2 || data.length > 1) {
let TopParent = await this.getTopArea();
TopParent.selectable = false;
TopParent.children = this.editLeaf(data);
this.treeData = [TopParent];
} else {
this.treeData = this.editLeaf(data);
}
this.expandedKeys = [this.treeData[0].id];
}
}
this.loading = false;
},
// 获取顶层区域
async getTopArea() {
let res = await getListByParentId({ parentId: 0 }); let res = await getListByParentId({ parentId: 0 });
const { data, code } = res.data; const { data, code } = res.data;
if (code === 1) { if (code === 1) {
this.treeData = data.data; return data.data[0];
// let obj = { } else {
// dataRef: { return {};
// id: data.data[0].id,
// },
// };
// this.onLoadData(obj);
this.expandedKeys = [data.data[0].id];
} }
}, },
// 异步获取子区域 // 异步获取子区域
onLoadData(treeNode) { // onLoadData(treeNode) {
return new Promise((resolve) => { // return new Promise((resolve) => {
getListByParentId({ // getListByParentId({
parentId: treeNode.dataRef.id, // parentId: treeNode.dataRef.id,
}).then((res) => { // }).then((res) => {
const { data } = res.data; // const { data } = res.data;
treeNode.dataRef.children = data.data; // treeNode.dataRef.children = data.data;
this.treeData = [...this.treeData]; // this.treeData = [...this.treeData];
resolve(); // resolve();
}); // });
}); // });
}, // },
// 选中区域 // 选中区域
onSelect(num, node) { onSelect(num, node) {
if (num && node.selectedNodes.length > 0) { if (num && node.selectedNodes.length > 0) {
...@@ -94,4 +126,4 @@ export default { ...@@ -94,4 +126,4 @@ export default {
overflow-y: auto; overflow-y: auto;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
<div class="flex aic"> <div class="flex aic">
<router-link to="/" class="flex aic"> <router-link to="/" class="flex aic">
<img <img
class="mr10" class="mr10 logo"
width="32"
:src="sysLogo ? api + sysLogo : require('@/assets/img/logo.png')" :src="sysLogo ? api + sysLogo : require('@/assets/img/logo.png')"
/> />
<h1 class="title"> <h1 class="title">
...@@ -22,7 +21,9 @@ ...@@ -22,7 +21,9 @@
初始化区域数据 初始化区域数据
</a> </a>
<a-tooltip class="header-item" title="返回门户" placement="bottom"> <a-tooltip class="header-item" title="返回门户" placement="bottom">
<a :href="portalUrl + path"> <a-icon type="home" /> 返回门户 </a> <a :href="portalUrl + (path ? path : '')">
<a-icon type="home" /> 返回门户
</a>
</a-tooltip> </a-tooltip>
</a-space> </a-space>
</div> </div>
...@@ -102,6 +103,10 @@ export default { ...@@ -102,6 +103,10 @@ export default {
line-height: normal; line-height: normal;
} }
} }
.logo {
height: 32px;
object-fit: contain;
}
.main { .main {
height: calc(100vh - 64px); height: calc(100vh - 64px);
padding: 0px 24px 24px; padding: 0px 24px 24px;
...@@ -128,4 +133,4 @@ export default { ...@@ -128,4 +133,4 @@ export default {
background: #fff; background: #fff;
border-radius: 4px; border-radius: 4px;
} }
</style> </style>
\ No newline at end of file
...@@ -46,7 +46,9 @@ ...@@ -46,7 +46,9 @@
>初始化区域数据</a-button >初始化区域数据</a-button
> >
<a-tooltip class="header-item" title="返回门户" placement="bottom"> <a-tooltip class="header-item" title="返回门户" placement="bottom">
<a :href="portalUrl + path"> <a-icon type="home" /> 返回门户 </a> <a :href="portalUrl + (path ? path : '')">
<a-icon type="home" /> 返回门户
</a>
</a-tooltip> </a-tooltip>
<!-- <a-tooltip class="header-item" title="数据可视化" placement="bottom"> <!-- <a-tooltip class="header-item" title="数据可视化" placement="bottom">
<a href="" target="_blank"> <a-icon type="setting" /> 数据可视化 </a> <a href="" target="_blank"> <a-icon type="setting" /> 数据可视化 </a>
...@@ -96,7 +98,7 @@ export default { ...@@ -96,7 +98,7 @@ export default {
{ key: "US", name: "English", alias: "English" }, { key: "US", name: "English", alias: "English" },
], ],
searchActive: false, searchActive: false,
portalUrl: process.env.VUE_APP_API_portal_URL, portalUrl: process.env.VUE_APP_API_portal_URL + "/#",
}; };
}, },
computed: { computed: {
......
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
const { siteTree } = data; const { siteTree } = data;
this.sitelist = siteTree; this.sitelist = siteTree;
let arr = []; let arr = [];
const treeFn = function (e) { const treeFn = function(e) {
e.forEach((element) => { e.forEach((element) => {
arr.push(element); arr.push(element);
if (element.children && element.children.length > 0) { if (element.children && element.children.length > 0) {
......
import Vue from "vue"; import Vue from "vue";
import App from "./App.vue"; import App from "./App.vue";
import { initRouter } from "./router";
import "./theme/index.less"; import "./theme/index.less";
import Antd from "ant-design-vue"; import Antd from "ant-design-vue";
// import Viser from 'viser-vue'
// import '@/mock'
import store from "./store"; import store from "./store";
import "animate.css/source/animate.css"; import "animate.css/source/animate.css";
import "./assets/css/common.less"; import "./assets/css/common.less";
import "./assets/css/relas.less"; import "./assets/css/relas.less";
import "./assets/css/use.less"; import "./assets/css/use.less";
import Plugins from "@/plugins"; import Plugins from "@/plugins";
import { initI18n } from "@/utils/i18n"; import { router } from "@/router";
import { i18n } from "@/utils/i18n";
import bootstrap from "@/bootstrap"; import bootstrap from "@/bootstrap";
import "moment/locale/zh-cn"; import "moment/locale/zh-cn";
import VueResource from "vue-resource"; import VueResource from "vue-resource";
...@@ -48,6 +46,9 @@ Vue.use(Viewer); ...@@ -48,6 +46,9 @@ Vue.use(Viewer);
// moment 时间处理 // moment 时间处理
import moment from "moment"; import moment from "moment";
Vue.prototype.$moment = moment; Vue.prototype.$moment = moment;
// 引入lodash
import lodash from "lodash";
Vue.prototype.$_ = lodash;
// nanoid // nanoid
import { nanoid } from "nanoid"; import { nanoid } from "nanoid";
Vue.prototype.$nanoid = nanoid; Vue.prototype.$nanoid = nanoid;
...@@ -55,14 +56,11 @@ Vue.prototype.$nanoid = nanoid; ...@@ -55,14 +56,11 @@ Vue.prototype.$nanoid = nanoid;
import * as echarts from "echarts"; import * as echarts from "echarts";
Vue.prototype.$echarts = echarts; Vue.prototype.$echarts = echarts;
export const router = initRouter(store.state.setting.asyncRoutes);
const i18n = initI18n("CN", "US");
Vue.use(Antd); Vue.use(Antd);
Vue.config.productionTip = false; Vue.config.productionTip = false;
// Vue.use(Viser) // Vue.use(Viser)
Vue.use(Plugins); Vue.use(Plugins);
Vue.use(VueResource); Vue.use(VueResource);
bootstrap({ router, store, i18n, message: Vue.prototype.$message }); bootstrap({ router, store, i18n, message: Vue.prototype.$message });
new Vue({ new Vue({
......
...@@ -16,49 +16,49 @@ ...@@ -16,49 +16,49 @@
<a-tab-pane key="ApplyMaterial"> <a-tab-pane key="ApplyMaterial">
<span slot="tab"> <span slot="tab">
<a-icon type="container" /> <a-icon type="file" />
申请材料 申请材料
</span> </span>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="AcceptMaterial"> <a-tab-pane key="AcceptMaterial">
<span slot="tab"> <span slot="tab">
<a-icon type="container" /> <a-icon type="interaction" />
受理材料 受理材料
</span> </span>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="Flow"> <a-tab-pane key="Flow">
<span slot="tab"> <span slot="tab">
<a-icon type="container" /> <a-icon type="cluster" />
办理流程 办理流程
</span> </span>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="Rates"> <a-tab-pane key="Rates">
<span slot="tab"> <span slot="tab">
<a-icon type="container" /> <a-icon type="audit" />
收费标准 收费标准
</span> </span>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="Pursuant"> <a-tab-pane key="Pursuant">
<span slot="tab"> <span slot="tab">
<a-icon type="container" /> <a-icon type="file-done" />
设定依据 设定依据
</span> </span>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="Agency"> <a-tab-pane key="Agency">
<span slot="tab"> <span slot="tab">
<a-icon type="container" /> <a-icon type="solution" />
中介服务 中介服务
</span> </span>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="Question"> <a-tab-pane key="Question">
<span slot="tab"> <span slot="tab">
<a-icon type="container" /> <a-icon type="file-unknown" />
常见问题 常见问题
</span> </span>
</a-tab-pane> </a-tab-pane>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import local from "@/utils/local"; import local from "@/utils/local";
import BaseMessage from "./components/baseMessage.vue"; import BaseMessage from "./components/baseMessage.vue";
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
}, },
}; };
</script> </script>
<style lang='less' scoped> <style lang="less" scoped>
.addmatter { .addmatter {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -128,4 +128,4 @@ export default { ...@@ -128,4 +128,4 @@ export default {
/deep/.ant-tabs-nav-container { /deep/.ant-tabs-nav-container {
border-bottom: 1px solid #f0f0f0 !important; border-bottom: 1px solid #f0f0f0 !important;
} }
</style> </style>
\ No newline at end of file
...@@ -112,7 +112,9 @@ export default { ...@@ -112,7 +112,9 @@ export default {
this.form.id && this.$delete(this.form, "id"); this.form.id && this.$delete(this.form, "id");
}, },
onEdit(data) { onEdit(data) {
this.form = { ...data }; this.$nextTick(() => {
this.form = { ...data };
});
}, },
handleReset() { handleReset() {
this.$refs.form.resetFields(); this.$refs.form.resetFields();
...@@ -125,5 +127,4 @@ export default { ...@@ -125,5 +127,4 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
\ No newline at end of file
...@@ -154,7 +154,9 @@ export default { ...@@ -154,7 +154,9 @@ export default {
}, },
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
this.form = { ...data }; this.$nextTick(() => {
this.form = { ...data };
});
}, },
// 关闭对话框 // 关闭对话框
handleClose() { handleClose() {
...@@ -178,4 +180,4 @@ export default { ...@@ -178,4 +180,4 @@ export default {
/deep/.ant-form-explain { /deep/.ant-form-explain {
position: absolute; position: absolute;
} }
</style> </style>
\ No newline at end of file
...@@ -471,7 +471,9 @@ export default { ...@@ -471,7 +471,9 @@ export default {
}; };
}); });
} }
this.form = { ...data }; this.$nextTick(() => {
this.form = { ...data };
});
}, },
// 过滤附件数组 // 过滤附件数组
filterArr(arr, file) { filterArr(arr, file) {
...@@ -525,4 +527,4 @@ export default { ...@@ -525,4 +527,4 @@ export default {
.upload-file { .upload-file {
display: block; display: block;
} }
</style> </style>
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
:wrapper-col="{ span: 22 }" :wrapper-col="{ span: 22 }"
> >
<a-form-model-item label="应用主题"> <a-form-model-item label="应用主题">
{{ filterItems(appInfo.appThemeName, appDict.appThemeName) }} {{ filterItems(appInfo.appThemeName) }}
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="应用简介"> <a-form-model-item label="应用简介">
{{ appInfo.summary }} {{ appInfo.summary }}
...@@ -117,10 +117,10 @@ import { ...@@ -117,10 +117,10 @@ import {
getVersionList, getVersionList,
usedVersion, usedVersion,
previewVersion, previewVersion,
getCategoryList,
} from "@/services/market"; } from "@/services/market";
import CheckSite from "../modal/CheckSite.vue"; import CheckSite from "../modal/CheckSite.vue";
import { pageSizeOptions } from "@/config/pageConfig.js"; import { pageSizeOptions } from "@/config/pageConfig.js";
import { filterItems } from "@/utils";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
export default { export default {
props: { props: {
...@@ -153,9 +153,7 @@ export default { ...@@ -153,9 +153,7 @@ export default {
{ {
title: "更新说明", title: "更新说明",
width: "40%", width: "40%",
customRender: (text) => { dataIndex: "notes",
return <span>{text.notes ? text.notes : "--"}</span>;
},
}, },
{ {
title: "应用包", title: "应用包",
...@@ -172,7 +170,6 @@ export default { ...@@ -172,7 +170,6 @@ export default {
}, },
]; ];
return { return {
filterItems,
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
columns, columns,
appId: this.$route.query.id, appId: this.$route.query.id,
...@@ -185,16 +182,30 @@ export default { ...@@ -185,16 +182,30 @@ export default {
form: {}, form: {},
tableData: [], tableData: [],
siteVisible: false, siteVisible: false,
categoryList: [],
}; };
}, },
computed: { computed: {
...mapGetters("site", ["appDict"]), ...mapGetters("site", ["appDict"]),
}, },
created() { created() {
this.getCategoryList();
this.getAppInfo(); this.getAppInfo();
this.getVersions(); this.getVersions();
}, },
methods: { methods: {
// 获取分类列表
async getCategoryList() {
let res = await getCategoryList({
page: 1,
size: -1,
siteId: this.siteId,
});
if (res.data.code === 1) {
let { data } = res.data.data;
this.categoryList = data;
}
},
// 获取应用详情 // 获取应用详情
async getAppInfo() { async getAppInfo() {
let res = await getAppInfo({ id: this.appId }); let res = await getAppInfo({ id: this.appId });
...@@ -275,6 +286,15 @@ export default { ...@@ -275,6 +286,15 @@ export default {
this.$refs.CheckSite.getSiteList(siteList); this.$refs.CheckSite.getSiteList(siteList);
this.siteVisible = true; this.siteVisible = true;
}, },
filterItems(appThemeName) {
if (!appThemeName) return;
let arr = this.categoryList.find((v) => v.id == appThemeName);
if (arr) {
return arr.categoryName;
} else {
return "--";
}
},
}, },
}; };
</script> </script>
......
...@@ -75,11 +75,6 @@ ...@@ -75,11 +75,6 @@
:addVisile.sync="addVisile" :addVisile.sync="addVisile"
@addSuccess="getCategoryList" @addSuccess="getCategoryList"
></AddTheme> ></AddTheme>
<!-- 预览 -->
<PrevieModal
:previewData="previewData"
:previewVisible.sync="previewVisible"
></PrevieModal>
</div> </div>
</template> </template>
...@@ -88,7 +83,6 @@ import { getCategoryList, deleteCategory } from "@/services/market"; ...@@ -88,7 +83,6 @@ import { getCategoryList, deleteCategory } from "@/services/market";
import AddTheme from "../modal/AddTheme"; import AddTheme from "../modal/AddTheme";
import local from "@/utils/local"; import local from "@/utils/local";
import { pageSizeOptions } from "@/config/pageConfig.js"; import { pageSizeOptions } from "@/config/pageConfig.js";
import PrevieModal from "@/components/PrevieModal.vue";
const columns = [ const columns = [
{ {
title: "序号", title: "序号",
...@@ -135,15 +129,12 @@ const columns = [ ...@@ -135,15 +129,12 @@ const columns = [
export default { export default {
components: { components: {
AddTheme, AddTheme,
PrevieModal,
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL, api2: process.env.VUE_APP_API_IMG_URL,
columns, columns,
previewData: {}, // 预览
previewVisible: false,
siteId: local.getLocal("siteId"), siteId: local.getLocal("siteId"),
tableData: [], // 表格数据 tableData: [], // 表格数据
loading: false, loading: false,
...@@ -254,11 +245,9 @@ export default { ...@@ -254,11 +245,9 @@ export default {
}, },
// 预览封面 // 预览封面
handlePreview(url) { handlePreview(url) {
this.previewData = { this.$viewerApi({
type: "img", images: [url],
url: url, });
};
this.previewVisible = true;
}, },
}, },
}; };
......
...@@ -2,7 +2,10 @@ ...@@ -2,7 +2,10 @@
<div class="data-update"> <div class="data-update">
<!-- 头部 --> <!-- 头部 -->
<div class="header flex aic jcb mb20 pdr6"> <div class="header flex aic jcb mb20 pdr6">
<a-button type="primary" @click="handleAdd">新增</a-button> <a-space>
<a-button type="primary" @click="handleAdd">新增</a-button>
<a-button type="danger" @click="handleDelAll">批量删除</a-button>
</a-space>
<div class="search-box"> <div class="search-box">
<a-input-group compact> <a-input-group compact>
<a-select style="min-width: 100px" v-model="fieldCode"> <a-select style="min-width: 100px" v-model="fieldCode">
...@@ -54,6 +57,10 @@ ...@@ -54,6 +57,10 @@
onShowSizeChange: showSizeChange, onShowSizeChange: showSizeChange,
}" }"
:data-source="tableData" :data-source="tableData"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:rowKey="(record) => record.id" :rowKey="(record) => record.id"
> >
<!-- 序号 --> <!-- 序号 -->
...@@ -65,9 +72,9 @@ ...@@ -65,9 +72,9 @@
<template slot="img" slot-scope="text"> <template slot="img" slot-scope="text">
<img <img
v-if="text.img" v-if="text.img"
width="50" class="pre-item"
:src="api2 + text.img" :src="filterRes(text.img)"
@click="handlePreview('img', api2 + text.img)" @click="handlePreview('img', text.img)"
/> />
<span v-else>--</span> <span v-else>--</span>
</template> </template>
...@@ -76,8 +83,8 @@ ...@@ -76,8 +83,8 @@
<video <video
v-if="text.video" v-if="text.video"
width="50" width="50"
:src="api2 + text.video" :src="filterRes(text.video)"
@click="handlePreview('vidoe', api2 + text.video)" @click="handlePreview('video', api2 + text.video)"
/> />
<span v-else>--</span> <span v-else>--</span>
</template> </template>
...@@ -147,6 +154,7 @@ export default { ...@@ -147,6 +154,7 @@ export default {
previewVisible: false, previewVisible: false,
previewData: {}, // 预览信息 previewData: {}, // 预览信息
appTemplate: [], // 字段模板列表 appTemplate: [], // 字段模板列表
selectedRowKeys: [],
}; };
}, },
computed: { computed: {
...@@ -241,13 +249,14 @@ export default { ...@@ -241,13 +249,14 @@ export default {
return; return;
} }
this.title = "新增"; this.title = "新增";
let arr = JSON.parse(JSON.stringify(this.appTemplate)); let arr = this.$_.cloneDeep(this.appTemplate);
this.$refs.AddData.onAdd(arr); this.$refs.AddData.onAdd(arr);
this.AddVisible = true; this.AddVisible = true;
}, },
// 搜索 // 搜索
onSearch() { onSearch() {
this.current = 1; this.current = 1;
this.selectedRowKeys = [];
this.getDatasetList(); this.getDatasetList();
}, },
// 翻页 // 翻页
...@@ -267,6 +276,19 @@ export default { ...@@ -267,6 +276,19 @@ export default {
this.$refs.AddData.onEdit(row); this.$refs.AddData.onEdit(row);
this.AddVisible = true; this.AddVisible = true;
}, },
// 选择
onSelectChange(keys) {
this.selectedRowKeys = keys;
},
// 批量删除
handleDelAll() {
if (!this.selectedRowKeys.length) {
this.$message.warn("请先勾选数据");
return;
}
let ids = this.selectedRowKeys.join(",");
this.handleDel(ids);
},
// 删除 // 删除
handleDel(id) { handleDel(id) {
let _this = this; let _this = this;
...@@ -284,6 +306,7 @@ export default { ...@@ -284,6 +306,7 @@ export default {
let { code, msg } = res.data; let { code, msg } = res.data;
if (code === 1) { if (code === 1) {
_this.$message.success(msg); _this.$message.success(msg);
_this.selectedRowKeys = [];
_this.getDatasetList(); _this.getDatasetList();
} }
}, },
...@@ -292,13 +315,30 @@ export default { ...@@ -292,13 +315,30 @@ export default {
}, },
}); });
}, },
// 过滤影音
filterRes(data) {
let resource = data.split(",").map((v) => {
return this.api2 + v;
});
return resource[0];
},
// 预览 // 预览
handlePreview(type, url) { handlePreview(type, data) {
this.previewData = { let resource = data.split(",").map((v) => {
type, return this.api2 + v;
url, });
}; if (type == "img") {
this.previewVisible = true; this.$viewerApi({
images: resource,
});
} else {
this.previewData = {
type,
url: resource[0],
};
this.previewVisible = true;
}
}, },
}, },
}; };
...@@ -311,6 +351,7 @@ export default { ...@@ -311,6 +351,7 @@ export default {
} }
img, img,
video { video {
width: 50px;
cursor: pointer; cursor: pointer;
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,10 @@ ...@@ -2,7 +2,10 @@
<div class="field-config"> <div class="field-config">
<!-- 头部 --> <!-- 头部 -->
<div class="header flex aic jcb mb20 pdr6"> <div class="header flex aic jcb mb20 pdr6">
<a-button type="primary" @click="handleAdd">新增字段</a-button> <a-space>
<a-button type="primary" @click="handleAdd">新增字段</a-button>
<a-button type="danger" @click="handleDelAll">批量删除</a-button>
</a-space>
<a-input-search <a-input-search
style="width: 300px" style="width: 300px"
placeholder="请输入字段名称搜索" placeholder="请输入字段名称搜索"
...@@ -31,6 +34,10 @@ ...@@ -31,6 +34,10 @@
onShowSizeChange: showSizeChange, onShowSizeChange: showSizeChange,
}" }"
:data-source="tableData" :data-source="tableData"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:rowKey="(record) => record.id" :rowKey="(record) => record.id"
> >
<!-- 序号 --> <!-- 序号 -->
...@@ -131,6 +138,7 @@ export default { ...@@ -131,6 +138,7 @@ export default {
tableData: [], tableData: [],
fieldVisible: false, fieldVisible: false,
title: "", title: "",
selectedRowKeys: [],
}; };
}, },
created() { created() {
...@@ -168,6 +176,7 @@ export default { ...@@ -168,6 +176,7 @@ export default {
// 搜索 // 搜索
onSearch() { onSearch() {
this.current = 1; this.current = 1;
this.selectedRowKeys = [];
this.getTempleteList(); this.getTempleteList();
}, },
// 翻页 // 翻页
...@@ -187,6 +196,19 @@ export default { ...@@ -187,6 +196,19 @@ export default {
this.$refs.AddField.onEdit(row); this.$refs.AddField.onEdit(row);
this.fieldVisible = true; this.fieldVisible = true;
}, },
// 选择
onSelectChange(keys) {
this.selectedRowKeys = keys;
},
// 批量删除
handleDelAll() {
if (!this.selectedRowKeys.length) {
this.$message.warn("请先勾选数据");
return;
}
let ids = this.selectedRowKeys.join(",");
this.handleDel(ids);
},
// 删除 // 删除
handleDel(id) { handleDel(id) {
let _this = this; let _this = this;
...@@ -204,6 +226,7 @@ export default { ...@@ -204,6 +226,7 @@ export default {
let { code, msg } = res.data; let { code, msg } = res.data;
if (code === 1) { if (code === 1) {
_this.$message.success(msg); _this.$message.success(msg);
_this.selectedRowKeys = [];
_this.getTempleteList(); _this.getTempleteList();
} }
}, },
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
}" }"
:loading="loading" :loading="loading"
bordered bordered
:scroll="{ y: 580 }" :scroll="{ y: 560 }"
:columns="columns" :columns="columns"
:pagination="{ :pagination="{
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
...@@ -47,9 +47,11 @@ ...@@ -47,9 +47,11 @@
<template slot="appIconPath" slot-scope="text"> <template slot="appIconPath" slot-scope="text">
<img <img
v-if="text.appIconPath" v-if="text.appIconPath"
class="pointer"
height="20" height="20"
width="20" width="20"
:src="api2 + text.appIconPath" :src="api2 + text.appIconPath"
@click="handlePreview(api2 + text.appIconPath)"
/> />
<span v-else>--</span> <span v-else>--</span>
</template> </template>
...@@ -374,9 +376,18 @@ export default { ...@@ -374,9 +376,18 @@ export default {
}, },
// 过滤分类展示 // 过滤分类展示
filterItems(appThemeName) { filterItems(appThemeName) {
return ( let row = this.categoryList.find((v) => v.id == appThemeName);
this.categoryList.find((v) => v.id == appThemeName).categoryName || "--" let str = "--";
); if (row) {
str = row.categoryName;
}
return str;
},
// 预览图片
handlePreview(url) {
this.$viewerApi({
images: [url],
});
}, },
}, },
}; };
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
}" }"
:loading="loading" :loading="loading"
bordered bordered
:scroll="{ y: 580 }" :scroll="{ y: 560 }"
:columns="columns" :columns="columns"
:pagination="{ :pagination="{
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
...@@ -47,9 +47,11 @@ ...@@ -47,9 +47,11 @@
<template slot="appIconPath" slot-scope="text"> <template slot="appIconPath" slot-scope="text">
<img <img
v-if="text.appIconPath" v-if="text.appIconPath"
class="pointer"
height="20" height="20"
width="20" width="20"
:src="api2 + text.appIconPath" :src="api2 + text.appIconPath"
@click="handlePreview(api2 + text.appIconPath)"
/> />
<span v-else>--</span> <span v-else>--</span>
</template> </template>
...@@ -213,7 +215,6 @@ export default { ...@@ -213,7 +215,6 @@ export default {
...mapMutations("site", ["SET_appDict"]), ...mapMutations("site", ["SET_appDict"]),
// 获取分类列表 // 获取分类列表
async getCategoryList() { async getCategoryList() {
this.loading = true;
let res = await getCategoryList({ let res = await getCategoryList({
page: 1, page: 1,
size: -1, size: -1,
...@@ -359,9 +360,18 @@ export default { ...@@ -359,9 +360,18 @@ export default {
}, },
// 过滤分类展示 // 过滤分类展示
filterItems(appThemeName) { filterItems(appThemeName) {
return ( let row = this.categoryList.find((v) => v.id == appThemeName);
this.categoryList.find((v) => v.id == appThemeName).categoryName || "--" let str = "--";
); if (row) {
str = row.categoryName;
}
return str;
},
// 预览图片
handlePreview(url) {
this.$viewerApi({
images: [url],
});
}, },
}, },
}; };
......
...@@ -143,15 +143,10 @@ ...@@ -143,15 +143,10 @@
}" }"
> >
<a-space size="middle"> <a-space size="middle">
<a-button @click="onClose"> 取消 </a-button> <a-button @click="resetForm"> 重置 </a-button>
<a-button type="primary" @click="onSubmit"> 确定 </a-button> <a-button type="primary" @click="onSubmit"> 确定 </a-button>
</a-space> </a-space>
</div> </div>
<!-- 预览 -->
<PrevieModal
:previewData="previewData"
:previewVisible.sync="previewVisible"
></PrevieModal>
</a-drawer> </a-drawer>
</div> </div>
</template> </template>
...@@ -162,11 +157,9 @@ import { saveApp } from "@/services/market"; ...@@ -162,11 +157,9 @@ import { saveApp } from "@/services/market";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { changeCodeNumber } from "@/utils/validate"; import { changeCodeNumber } from "@/utils/validate";
// import local from "@/utils/local"; // import local from "@/utils/local";
import PrevieModal from "@/components/PrevieModal.vue";
export default { export default {
components: { components: {
YSwitch, YSwitch,
PrevieModal,
}, },
props: { props: {
title: { title: {
...@@ -190,8 +183,6 @@ export default { ...@@ -190,8 +183,6 @@ export default {
accept: "image/jpeg,image/png,image/svg+xml", accept: "image/jpeg,image/png,image/svg+xml",
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL, api2: process.env.VUE_APP_API_IMG_URL,
previewData: {}, // 预览
previewVisible: false,
iconFileList: [], iconFileList: [],
labelCol: { labelCol: {
span: 3, span: 3,
...@@ -278,8 +269,14 @@ export default { ...@@ -278,8 +269,14 @@ export default {
onClose() { onClose() {
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.fileList = []; this.fileList = [];
this.iconFileList = [];
this.Visible = false; this.Visible = false;
}, },
resetForm() {
this.fileList = [];
this.iconFileList = [];
this.$refs.form.resetFields();
},
// 提交 // 提交
onSubmit() { onSubmit() {
this.$refs.form.validate(async (valid) => { this.$refs.form.validate(async (valid) => {
...@@ -311,15 +308,6 @@ export default { ...@@ -311,15 +308,6 @@ export default {
}, },
// 上传图标 // 上传图标
handleChangeIcon({ fileList }) { handleChangeIcon({ fileList }) {
// if (info.file.status === "uploading") {
// this.loading = true;
// return;
// }
// if (info.file.status === "done") {
// this.form.appIconPath = info.file.response.url;
// this.loading = false;
// }
this.iconFileList = [...fileList].slice(-1); this.iconFileList = [...fileList].slice(-1);
this.iconFileList = this.iconFileList.map((v) => { this.iconFileList = this.iconFileList.map((v) => {
if (v.response) { if (v.response) {
...@@ -336,11 +324,9 @@ export default { ...@@ -336,11 +324,9 @@ export default {
}, },
// 预览 // 预览
handlePreview(info) { handlePreview(info) {
this.previewData = { this.$viewerApi({
type: "img", images: [info.url],
url: info.url, });
};
this.previewVisible = true;
}, },
// 上传应用 // 上传应用
handleChangeFile(info) { handleChangeFile(info) {
...@@ -369,25 +355,28 @@ export default { ...@@ -369,25 +355,28 @@ export default {
}, },
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
this.form = { ...data }; this.$nextTick(() => {
this.fileList = [ this.form = { ...data };
{ this.fileList = [
uid: "-1", {
name: this.form.fileName, uid: "-1",
status: "done", name: this.form.fileName,
url: this.form.filePath, status: "done",
}, url: this.form.filePath,
]; },
this.iconFileList = [ ];
{ this.iconFileList = [
uid: "-2", {
name: this.form.appIconPath, uid: "-2",
status: "done", name: this.form.appIconPath,
url: this.api2 + this.form.appIconPath, status: "done",
url2: this.form.appIconPath, url: this.api2 + this.form.appIconPath,
}, url2: this.form.appIconPath,
]; },
];
});
}, },
// 选中站点 // 选中站点
changeSite(value, label) { changeSite(value, label) {
this.form.siteName = label[0]; this.form.siteName = label[0];
...@@ -397,6 +386,10 @@ export default { ...@@ -397,6 +386,10 @@ export default {
let val = e.target.value; let val = e.target.value;
if (val == 1) { if (val == 1) {
this.form.url = ""; this.form.url = "";
} else {
this.form.filePath = "";
this.form.fileName = "";
this.fileList = [];
} }
}, },
}, },
......
...@@ -5,13 +5,8 @@ ...@@ -5,13 +5,8 @@
:maskClosable="false" :maskClosable="false"
:title="title" :title="title"
@cancel="handleClose" @cancel="handleClose"
destroyOnClose
centered centered
> >
<template slot="footer">
<a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</template>
<a-form-model <a-form-model
ref="form" ref="form"
:model="form" :model="form"
...@@ -46,11 +41,10 @@ ...@@ -46,11 +41,10 @@
<a-input-number v-model="form.sort" :min="1" /> <a-input-number v-model="form.sort" :min="1" />
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<!-- 预览 --> <template slot="footer">
<PrevieModal <a-button @click="handleReset">重置</a-button>
:previewData="previewData" <a-button type="primary" @click="handleOk">确定</a-button>
:previewVisible.sync="previewVisible" </template>
></PrevieModal>
</a-modal> </a-modal>
</div> </div>
</template> </template>
...@@ -58,7 +52,6 @@ ...@@ -58,7 +52,6 @@
<script> <script>
import { saveCategory } from "@/services/market"; import { saveCategory } from "@/services/market";
import local from "@/utils/local"; import local from "@/utils/local";
import PrevieModal from "@/components/PrevieModal.vue";
export default { export default {
props: { props: {
addVisile: { addVisile: {
...@@ -71,17 +64,13 @@ export default { ...@@ -71,17 +64,13 @@ export default {
default: "新增分类", default: "新增分类",
}, },
}, },
components: { components: {},
PrevieModal,
},
data() { data() {
return { return {
accept: "image/jpeg,image/png", accept: "image/jpeg,image/png",
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL, api2: process.env.VUE_APP_API_IMG_URL,
fileList: [], fileList: [],
previewData: {}, // 预览
previewVisible: false,
form: { form: {
siteId: local.getLocal("siteId"), // 站点id siteId: local.getLocal("siteId"), // 站点id
siteName: local.getLocal("siteName"), // 站点名称 siteName: local.getLocal("siteName"), // 站点名称
...@@ -120,18 +109,20 @@ export default { ...@@ -120,18 +109,20 @@ export default {
}, },
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
this.form = { ...data }; this.$nextTick(() => {
if (this.form.cover) { this.form = { ...data };
this.fileList = [ if (this.form.cover) {
{ this.fileList = [
uid: "-2", {
name: this.form.cover, uid: "-2",
status: "done", name: this.form.cover,
url: this.api2 + this.form.cover, status: "done",
url2: this.form.cover, url: this.api2 + this.form.cover,
}, url2: this.form.cover,
]; },
} ];
}
});
}, },
// 关闭弹窗 // 关闭弹窗
handleClose() { handleClose() {
...@@ -184,14 +175,13 @@ export default { ...@@ -184,14 +175,13 @@ export default {
}, },
// 预览 // 预览
handlePreview(info) { handlePreview(info) {
this.previewData = { this.$viewerApi({
type: "img", images: [info.url],
url: info.url, });
};
this.previewVisible = true;
}, },
// 重置 // 重置
handleReset() { handleReset() {
this.fileList = [];
this.$refs.form.resetFields(); this.$refs.form.resetFields();
}, },
}, },
......
...@@ -157,11 +157,13 @@ export default { ...@@ -157,11 +157,13 @@ export default {
}, },
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
this.getBusinessData(); this.$nextTick(() => {
this.form = { ...data }; this.getBusinessData();
if (this.form.parentId == 0) { this.form = { ...data };
this.form.parentId = undefined; if (this.form.parentId == 0) {
} this.form.parentId = undefined;
}
});
}, },
// 切换业务级别 // 切换业务级别
changeIsBusiness() { changeIsBusiness() {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
:loading="loading" :loading="loading"
bordered bordered
:columns="columns" :columns="columns"
:scroll="{ y: 580 }" :scroll="{ y: 560 }"
:pagination="{ :pagination="{
showTotal: (total) => `共 ${total} 条`, showTotal: (total) => `共 ${total} 条`,
current: current, current: current,
...@@ -60,7 +60,13 @@ ...@@ -60,7 +60,13 @@
<img width="30" height="30" :src="api2 + text.modelIcon" /> <img width="30" height="30" :src="api2 + text.modelIcon" />
</div> --> </div> -->
<div class="svg-box"> <div class="svg-box">
<img width="30" height="30" :src="api2 + text.modelIcon" /> <img
class="pointer"
width="30"
height="30"
:src="api2 + text.modelIcon"
@click="handlePreview({ url: api2 + text.modelIcon })"
/>
</div> </div>
</div> </div>
<span v-else>--</span> <span v-else>--</span>
...@@ -220,11 +226,6 @@ ...@@ -220,11 +226,6 @@
</a-col> </a-col>
</a-row> </a-row>
</a-form-model> </a-form-model>
<!-- 预览 -->
<PrevieModal
:previewData="previewData"
:previewVisible.sync="previewVisible"
></PrevieModal>
</a-modal> </a-modal>
<!-- 报表管理 --> <!-- 报表管理 -->
<StatementManage <StatementManage
...@@ -236,7 +237,6 @@ ...@@ -236,7 +237,6 @@
<script> <script>
import { modelList, addMode, delMode } from "@/services/basicsetFun"; import { modelList, addMode, delMode } from "@/services/basicsetFun";
import PrevieModal from "@/components/PrevieModal.vue";
import StatementManage from "./components/StatementManage.vue"; import StatementManage from "./components/StatementManage.vue";
import TabHeader from "@/components/TabHeader"; import TabHeader from "@/components/TabHeader";
import { pageSizeOptions } from "@/config/pageConfig.js"; import { pageSizeOptions } from "@/config/pageConfig.js";
...@@ -294,7 +294,6 @@ const columns = [ ...@@ -294,7 +294,6 @@ const columns = [
]; ];
export default { export default {
components: { components: {
PrevieModal,
StatementManage, StatementManage,
TabHeader, TabHeader,
}, },
...@@ -304,8 +303,6 @@ export default { ...@@ -304,8 +303,6 @@ export default {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL, api2: process.env.VUE_APP_API_IMG_URL,
accept: "image/jpeg,image/png,image/svg+xml", // 上传类型 accept: "image/jpeg,image/png,image/svg+xml", // 上传类型
previewData: {}, // 预览
previewVisible: false,
columns, columns,
loading: true, loading: true,
title: "新增模块", title: "新增模块",
...@@ -502,11 +499,9 @@ export default { ...@@ -502,11 +499,9 @@ export default {
}, },
// 预览 // 预览
handlePreview(info) { handlePreview(info) {
this.previewData = { this.$viewerApi({
type: "img", images: [info.url],
url: info.url, });
};
this.previewVisible = true;
}, },
// 关闭对话框 // 关闭对话框
......
...@@ -119,8 +119,10 @@ export default { ...@@ -119,8 +119,10 @@ export default {
}, },
// 编辑 // 编辑
onEdit(data, modelInfo) { onEdit(data, modelInfo) {
this.modelInfo = modelInfo; this.$nextTick(() => {
this.formData = { ...data }; this.modelInfo = modelInfo;
this.formData = { ...data };
});
}, },
// 关闭弹窗 // 关闭弹窗
handleClose() { handleClose() {
...@@ -149,5 +151,4 @@ export default { ...@@ -149,5 +151,4 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
\ No newline at end of file
...@@ -92,6 +92,12 @@ ...@@ -92,6 +92,12 @@
</a-col> </a-col>
</a-row> </a-row>
</a-form-model> </a-form-model>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button :loading="loading" type="primary" @click="handleOk"
>确定</a-button
>
</div>
</a-modal> </a-modal>
</template> </template>
...@@ -114,6 +120,7 @@ export default { ...@@ -114,6 +120,7 @@ export default {
// } // }
// }; // };
return { return {
loading: false,
labelCol: { span: 6 }, labelCol: { span: 6 },
wrapperCol: { span: 14 }, wrapperCol: { span: 14 },
siteInfo: { siteInfo: {
...@@ -179,9 +186,11 @@ export default { ...@@ -179,9 +186,11 @@ export default {
}, },
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
this.siteInfo.siteName = data.siteName; this.$nextTick(() => {
this.siteInfo.siteId = data.siteId; this.siteInfo.siteName = data.siteName;
this.form = { ...data }; this.siteInfo.siteId = data.siteId;
this.form = { ...data };
});
}, },
// 保存 // 保存
handleOk() { handleOk() {
...@@ -206,6 +215,10 @@ export default { ...@@ -206,6 +215,10 @@ export default {
this.$refs.formData.resetFields(); this.$refs.formData.resetFields();
this.Visible = false; this.Visible = false;
}, },
// 重置
resetForm() {
this.$refs.formData.resetFields();
},
}, },
}; };
</script> </script>
...@@ -220,4 +233,4 @@ export default { ...@@ -220,4 +233,4 @@ export default {
/deep/.ant-form-explain { /deep/.ant-form-explain {
position: absolute; position: absolute;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<a-modal <a-modal
:title="WindowTitle" :title="WindowTitle"
@ok="handleAdd"
:visible="Visible" :visible="Visible"
@cancel="handleClose" @cancel="handleClose"
:maskClosable="false" :maskClosable="false"
...@@ -188,6 +187,12 @@ ...@@ -188,6 +187,12 @@
</a-col> </a-col>
</a-row> </a-row>
</a-form-model> </a-form-model>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button :loading="loading" type="primary" @click="handleOk"
>确定</a-button
>
</div>
</a-modal> </a-modal>
</template> </template>
...@@ -202,6 +207,7 @@ export default { ...@@ -202,6 +207,7 @@ export default {
}, },
data() { data() {
return { return {
loading: false,
labelCol: { span: 6 }, labelCol: { span: 6 },
wrapperCol: { span: 14 }, wrapperCol: { span: 14 },
siteInfo: { siteInfo: {
...@@ -288,18 +294,22 @@ export default { ...@@ -288,18 +294,22 @@ export default {
}, },
// 编辑 // 编辑
onEdit(row) { onEdit(row) {
this.siteInfo.siteName = row.siteName; this.$nextTick(() => {
this.siteInfo.siteId = row.siteId; this.siteInfo.siteName = row.siteName;
this.form = { ...row }; this.siteInfo.siteId = row.siteId;
this.form = { ...row };
});
}, },
// 保存 // 保存
async handleAdd() { async handleOk() {
this.$refs.formData.validate(async (valid) => { this.$refs.formData.validate(async (valid) => {
if (valid) { if (valid) {
this.loading = true;
let res = await addWindow({ let res = await addWindow({
...this.form, ...this.form,
...this.siteInfo, ...this.siteInfo,
}); });
this.loading = false;
let { code, msg } = res.data; let { code, msg } = res.data;
if (code === 1) { if (code === 1) {
this.$message.success(msg); this.$message.success(msg);
...@@ -314,6 +324,10 @@ export default { ...@@ -314,6 +324,10 @@ export default {
this.$refs.formData.resetFields(); this.$refs.formData.resetFields();
this.Visible = false; this.Visible = false;
}, },
// 重置
resetForm() {
this.$refs.formData.resetFields();
},
// 改变无人值守 // 改变无人值守
changeDuty(val) { changeDuty(val) {
if (!val) { if (!val) {
......
...@@ -59,9 +59,7 @@ ...@@ -59,9 +59,7 @@
</div> </div>
</div> </div>
<div> <div>
<div class="department_span"> <div>简称:{{ v.deptAbb ? v.deptAbb : "--" }}</div>
简称:{{ v.deptAbb ? v.deptAbb : "--" }}
</div>
<div> <div>
联系电话:{{ v.deptTelphone ? v.deptTelphone : "--" }} 联系电话:{{ v.deptTelphone ? v.deptTelphone : "--" }}
</div> </div>
...@@ -127,7 +125,7 @@ ...@@ -127,7 +125,7 @@
<div class="table-content"> <div class="table-content">
<!-- 表格 --> <!-- 表格 -->
<a-table <a-table
:scroll="{ y: 560 }" :scroll="{ y: 550 }"
:loading="loading" :loading="loading"
bordered bordered
:columns="columns" :columns="columns"
...@@ -687,7 +685,6 @@ export default { ...@@ -687,7 +685,6 @@ export default {
} }
.department_span { .department_span {
margin-right: 3px; margin-right: 3px;
font-size: 5px;
} }
.department_off { .department_off {
// margin-left: 20px; // margin-left: 20px;
......
...@@ -5,12 +5,7 @@ ...@@ -5,12 +5,7 @@
:maskClosable="false" :maskClosable="false"
:title="title" :title="title"
@cancel="handleClose" @cancel="handleClose"
destroyOnClose
> >
<template slot="footer">
<a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</template>
<a-form-model <a-form-model
ref="form" ref="form"
:model="form" :model="form"
...@@ -44,11 +39,15 @@ ...@@ -44,11 +39,15 @@
/> />
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<template slot="footer">
<a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</template>
</a-modal> </a-modal>
</div> </div>
</template> </template>
<script> <script>
import { saveHall } from "@/services/hall"; import { saveHall } from "@/services/hall";
import loacl from "@/utils/local"; import loacl from "@/utils/local";
export default { export default {
...@@ -100,7 +99,9 @@ export default { ...@@ -100,7 +99,9 @@ export default {
}, },
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
this.form = { ...data }; this.$nextTick(() => {
this.form = { ...data };
});
}, },
// 关闭弹窗 // 关闭弹窗
handleClose() { handleClose() {
...@@ -128,9 +129,9 @@ export default { ...@@ -128,9 +129,9 @@ export default {
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.ant-input-number { .ant-input-number {
width: 100%; width: 100%;
} }
</style> </style>
\ No newline at end of file
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
:maskClosable="false" :maskClosable="false"
title="新增大厅窗口" title="新增大厅窗口"
@cancel="handleClose" @cancel="handleClose"
destroyOnClose
centered centered
> >
<template slot="footer"> <template slot="footer">
...@@ -35,8 +34,9 @@ ...@@ -35,8 +34,9 @@
</a-modal> </a-modal>
</div> </div>
</template> </template>
<script> <script>
import local from "@/utils/local";
import { import {
// saveWindowHall, // saveWindowHall,
batchSaveWindowHall, batchSaveWindowHall,
...@@ -60,6 +60,7 @@ export default { ...@@ -60,6 +60,7 @@ export default {
data() { data() {
return { return {
selectInfo: undefined, selectInfo: undefined,
siteId: local.getLocal("siteId"), // 站点id
form: { form: {
windowId: "", // 窗口id windowId: "", // 窗口id
windowName: "", // 窗口名称 windowName: "", // 窗口名称
...@@ -94,7 +95,9 @@ export default { ...@@ -94,7 +95,9 @@ export default {
}, },
// 新增 // 新增
onAdd(rows) { onAdd(rows) {
this.windowList = rows; this.$nextTick(() => {
this.windowList = rows;
});
// this.form.windowId = rows.id; // this.form.windowId = rows.id;
// this.form.windowName = rows.name; // this.form.windowName = rows.name;
}, },
...@@ -115,6 +118,7 @@ export default { ...@@ -115,6 +118,7 @@ export default {
windowName: v.name, // 窗口名称 windowName: v.name, // 窗口名称
hallId: this.form.hallId, // 大厅id hallId: this.form.hallId, // 大厅id
hallName: this.form.hallName, // 大厅名称 hallName: this.form.hallName, // 大厅名称
siteId: this.siteId,
}; };
}); });
let res = await batchSaveWindowHall(arr); let res = await batchSaveWindowHall(arr);
...@@ -135,6 +139,5 @@ export default { ...@@ -135,6 +139,5 @@ export default {
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
\ No newline at end of file
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<a-modal <a-modal
:maskClosable="false" :maskClosable="false"
:title="title" :title="title"
@ok="handleOk"
:visible="Visible" :visible="Visible"
@cancel="handleClose" @cancel="handleClose"
> >
...@@ -34,6 +33,12 @@ ...@@ -34,6 +33,12 @@
<a-textarea v-model="form.summary" placeholder allow-clear /> <a-textarea v-model="form.summary" placeholder allow-clear />
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button :loading="loading" type="primary" @click="handleOk"
>确定</a-button
>
</div>
</a-modal> </a-modal>
</template> </template>
...@@ -41,8 +46,15 @@ ...@@ -41,8 +46,15 @@
import { addHoliday } from "@/services/festival"; import { addHoliday } from "@/services/festival";
import locale from "ant-design-vue/es/date-picker/locale/zh_CN"; import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
export default { export default {
props: {
visibleDay: {
type: Boolean,
default: false,
},
},
data() { data() {
return { return {
loading: false,
locale, locale,
title: "选择节假日", title: "选择节假日",
date: [], // 日期 date: [], // 日期
...@@ -71,10 +83,15 @@ export default { ...@@ -71,10 +83,15 @@ export default {
}, },
}; };
}, },
props: {
visibleDay: { computed: {
type: Boolean, Visible: {
default: false, get() {
return this.visibleDay;
},
set(val) {
this.$emit("update:visibleDay", val);
},
}, },
}, },
methods: { methods: {
...@@ -82,6 +99,7 @@ export default { ...@@ -82,6 +99,7 @@ export default {
handleOk() { handleOk() {
this.$refs.ruleForm.validate(async (valid) => { this.$refs.ruleForm.validate(async (valid) => {
if (valid) { if (valid) {
this.loading = true;
let year = new Date(parseInt(this.form.startTime)).getFullYear(); let year = new Date(parseInt(this.form.startTime)).getFullYear();
let res = await addHoliday({ let res = await addHoliday({
...this.form, ...this.form,
...@@ -95,6 +113,7 @@ export default { ...@@ -95,6 +113,7 @@ export default {
this.handleClose(); this.handleClose();
this.$parent.getHolidayData(); this.$parent.getHolidayData();
} }
this.loading = false;
} }
}); });
}, },
...@@ -114,22 +133,19 @@ export default { ...@@ -114,22 +133,19 @@ export default {
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
this.title = "编辑节假日"; this.title = "编辑节假日";
this.date = [String(data.startTime), String(data.endTime)]; this.$nextTick(() => {
this.form = { ...data }; this.date = [String(data.startTime), String(data.endTime)];
this.form = { ...data };
});
}, },
handleClose() { handleClose() {
this.Visible = false; this.Visible = false;
this.$refs.ruleForm.resetFields(); this.$refs.ruleForm.resetFields();
}, },
}, // 重置
computed: { resetForm() {
Visible: { this.date = [];
get() { this.$refs.ruleForm.resetFields();
return this.visibleDay;
},
set(val) {
this.$emit("update:visibleDay", val);
},
}, },
}, },
}; };
...@@ -143,4 +159,4 @@ export default { ...@@ -143,4 +159,4 @@ export default {
/deep/.ant-form-explain { /deep/.ant-form-explain {
position: absolute; position: absolute;
} }
</style> </style>
\ No newline at end of file
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<script> <script>
import local from "@/utils/local"; import local from "@/utils/local";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import { createMenus } from "@/router";
export default { export default {
data() { data() {
return {}; return {};
...@@ -26,8 +27,15 @@ export default { ...@@ -26,8 +27,15 @@ export default {
]), ]),
// 获取token // 获取token
getToken() { getToken() {
let { token, userInfo, siteid, siteName, sysName, sysLogo, path } = let {
this.$route.query; token,
userInfo,
siteid,
siteName,
sysName,
sysLogo,
path,
} = this.$route.query;
if (token && userInfo) { if (token && userInfo) {
userInfo = JSON.parse(userInfo); userInfo = JSON.parse(userInfo);
this.SET_userInfo(userInfo); this.SET_userInfo(userInfo);
...@@ -39,6 +47,8 @@ export default { ...@@ -39,6 +47,8 @@ export default {
this.SET_path(path); this.SET_path(path);
local.setLocal("siteId", siteid); local.setLocal("siteId", siteid);
local.setLocal("siteName", siteName); local.setLocal("siteName", siteName);
// 动态菜单
createMenus();
this.$router.push("/website"); this.$router.push("/website");
} else { } else {
this.$message.warning("跳转失败,请重新登录"); this.$message.warning("跳转失败,请重新登录");
......
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-model-item label="区域编号" prop="areaCode"> <a-form-model-item label="区域编号">
<a-input <a-input
v-model="areaInfo.areaCode" v-model="areaInfo.areaCode"
readOnly disabled
type="text" type="text"
placeholder="请输入区域编号" placeholder="请输入区域编号"
/> </a-form-model-item /> </a-form-model-item
...@@ -282,8 +282,9 @@ ...@@ -282,8 +282,9 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<div class="color_title">部署板块</div> <div v-permission="[1]" class="color_title">部署板块</div>
<a-form-model-item <a-form-model-item
v-permission="[1]"
:label-col="{ span: 2 }" :label-col="{ span: 2 }"
:wrapper-col="{ span: 22 }" :wrapper-col="{ span: 22 }"
class="model-id" class="model-id"
...@@ -299,11 +300,6 @@ ...@@ -299,11 +300,6 @@
</a-form-model> </a-form-model>
</div> </div>
</a-modal> </a-modal>
<!-- 预览 -->
<PrevieModal
:previewData="previewData"
:previewVisible.sync="previewVisible"
></PrevieModal>
</div> </div>
</template> </template>
<script> <script>
...@@ -312,7 +308,6 @@ import YCheckbox from "@/components/ycheckbox/YCheckbox.vue"; ...@@ -312,7 +308,6 @@ import YCheckbox from "@/components/ycheckbox/YCheckbox.vue";
import YSwitch from "@/components/yswitch/YSwitch.vue"; import YSwitch from "@/components/yswitch/YSwitch.vue";
// import options from "@/utils/city"; // import options from "@/utils/city";
import { regionData } from "element-china-area-data"; import { regionData } from "element-china-area-data";
import PrevieModal from "@/components/PrevieModal.vue";
export default { export default {
props: { props: {
formVisible: { formVisible: {
...@@ -326,7 +321,6 @@ export default { ...@@ -326,7 +321,6 @@ export default {
}, },
components: { components: {
YCheckbox, YCheckbox,
PrevieModal,
YSwitch, YSwitch,
}, },
data() { data() {
...@@ -356,8 +350,6 @@ export default { ...@@ -356,8 +350,6 @@ export default {
api2: process.env.VUE_APP_API_IMG_URL, api2: process.env.VUE_APP_API_IMG_URL,
accept: "image/jpeg,image/png", // 上传类型 accept: "image/jpeg,image/png", // 上传类型
loading: false, loading: false,
previewData: {}, // 预览logo信息
previewVisible: false,
options: regionData, // 地区级联数据 options: regionData, // 地区级联数据
tablename: "", //接口名称 tablename: "", //接口名称
modelIds: [], // 板块数据 modelIds: [], // 板块数据
...@@ -575,7 +567,6 @@ export default { ...@@ -575,7 +567,6 @@ export default {
}, },
created() { created() {
this.getModel(); this.getModel();
console.log(process.env.NODE_ENV);
}, },
computed: { computed: {
Visible: { Visible: {
...@@ -605,6 +596,7 @@ export default { ...@@ -605,6 +596,7 @@ export default {
//重置 //重置
resetForm() { resetForm() {
this.fileList = []; this.fileList = [];
this.cityData = [];
this.$refs.ruleForm.resetFields(); this.$refs.ruleForm.resetFields();
}, },
// 关闭对话框 // 关闭对话框
...@@ -621,31 +613,33 @@ export default { ...@@ -621,31 +613,33 @@ export default {
}, },
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
this.formInfo = { ...data }; this.$nextTick(() => {
this.areaInfo.areaID = this.formInfo.areaID; this.formInfo = { ...data };
this.areaInfo.areaCode = this.formInfo.areaCode; this.areaInfo.areaID = this.formInfo.areaID;
this.areaInfo.areaName = this.formInfo.areaName; this.areaInfo.areaCode = this.formInfo.areaCode;
this.cityData = [ this.areaInfo.areaName = this.formInfo.areaName;
this.formInfo.proCode, this.cityData = [
this.formInfo.cityCode, this.formInfo.proCode,
this.formInfo.districtCode, this.formInfo.cityCode,
]; this.formInfo.districtCode,
this.formInfo.modelIds = this.formInfo.modelIds.map(Number);
this.formInfo.amWorkStartTime = String(this.formInfo.amWorkStartTime);
this.formInfo.amWorkEndTime = String(this.formInfo.amWorkEndTime);
this.formInfo.pmWorkStartTime = String(this.formInfo.pmWorkStartTime);
this.formInfo.pmWorkEndTime = String(this.formInfo.pmWorkEndTime);
if (this.formInfo.logoPath) {
this.fileList = [
{
uid: -1,
status: "done",
name: this.formInfo.logoPath,
url: this.api2 + this.formInfo.logoPath,
url2: this.formInfo.logoPath,
},
]; ];
} this.formInfo.modelIds = this.formInfo.modelIds.map(Number);
this.formInfo.amWorkStartTime = String(this.formInfo.amWorkStartTime);
this.formInfo.amWorkEndTime = String(this.formInfo.amWorkEndTime);
this.formInfo.pmWorkStartTime = String(this.formInfo.pmWorkStartTime);
this.formInfo.pmWorkEndTime = String(this.formInfo.pmWorkEndTime);
if (this.formInfo.logoPath) {
this.fileList = [
{
uid: -1,
status: "done",
name: this.formInfo.logoPath,
url: this.api2 + this.formInfo.logoPath,
url2: this.formInfo.logoPath,
},
];
}
});
}, },
// 保存 // 保存
handleOk() { handleOk() {
...@@ -711,11 +705,9 @@ export default { ...@@ -711,11 +705,9 @@ export default {
}, },
// 预览logo // 预览logo
handlePreview(info) { handlePreview(info) {
this.previewData = { this.$viewerApi({
type: "img", images: [info.url],
url: info.url, });
};
this.previewVisible = true;
}, },
// 删除logo // 删除logo
// handleRemove() { // handleRemove() {
...@@ -740,8 +732,10 @@ export default { ...@@ -740,8 +732,10 @@ export default {
}) })
.then((res) => { .then((res) => {
let { location } = res.geocodes[0]; let { location } = res.geocodes[0];
[this.formInfo.longitude, this.formInfo.latitude] = [
location.split(","); this.formInfo.longitude,
this.formInfo.latitude,
] = location.split(",");
}) })
.catch(() => { .catch(() => {
this.$message.error("经纬度获取失败,请输入正确的地址"); this.$message.error("经纬度获取失败,请输入正确的地址");
...@@ -822,7 +816,7 @@ export default { ...@@ -822,7 +816,7 @@ export default {
} }
.ant-checkbox-group { .ant-checkbox-group {
display: grid; display: grid;
grid-template-columns: 260px 260px 260px 260px; grid-template-columns: repeat(3, 320px);
} }
.ant-checkbox-wrapper { .ant-checkbox-wrapper {
margin-left: 0px; margin-left: 0px;
......
<template> <template>
<div class="configurat"> <div class="configurat">
<div class="title">短信全局配置</div> <div class="title">短信全局配置</div>
<div class="set-configurat"> <div class="des">
<y-switch 全局配置,一键控制
v-model="setInfo.messageoff"
checkedChildren="开"
unCheckedChildren="关"
@change="changeClose"
></y-switch>
</div> </div>
<div class="des">
轻松管理政务短信通知的全局设置,确保信息的准确传递
</div>
<div class="tag-list">
<div class="tag-item" v-for="v in tagList" :key="v">
{{ v }}
</div>
</div>
<YButton v-model="setInfo.messageoff" @change="changeClose"></YButton>
</div> </div>
</template> </template>
<script> <script>
import YSwitch from "@/components/yswitch/YSwitch.vue"; import YButton from "@/components/YButton";
import { getSmssetList, saveSmssetList } from "@/services/configurat"; import { getSmssetList, saveSmssetList } from "@/services/configurat";
import local from "@/utils/local"; import local from "@/utils/local";
export default { export default {
components: { components: {
YSwitch, YButton,
}, },
data() { data() {
return { return {
tagList: ["全局管控", "精准到达", "远程监管", "贴心服务"],
setInfo: { setInfo: {
siteId: local.getLocal("siteId"), siteId: local.getLocal("siteId"),
messageoff: "", messageoff: "",
...@@ -53,6 +58,8 @@ export default { ...@@ -53,6 +58,8 @@ export default {
let { code, msg } = res.data; let { code, msg } = res.data;
if (code === 1) { if (code === 1) {
this.$message.success(msg); this.$message.success(msg);
} else {
this.getSmssetList();
} }
}, },
}, },
...@@ -63,37 +70,42 @@ export default { ...@@ -63,37 +70,42 @@ export default {
.configurat { .configurat {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 20px; padding: 115px 80px;
.main { background: url("~@/assets/img/sms_bg.jpg") no-repeat center/100% 100%;
height: 100%;
display: flex;
.set-configurat {
margin-left: 20px;
}
.left {
width: 224px;
margin-right: 20px;
}
.right {
height: 200px;
padding: 15px;
flex: 1;
background-color: #fff;
}
}
.title { .title {
margin-left: 15px; margin-bottom: 35px;
position: relative; font-size: 44px;
margin-bottom: 15px; font-family: Source Han Sans CN;
&::before { font-weight: bold;
content: ""; color: #0857e8;
width: 4px; }
height: 20px; .des {
position: absolute; font-size: 20px;
top: 1px; font-family: Source Han Sans CN;
left: -16px; font-weight: 500;
background-color: rgba(5, 149, 253, 1); color: #365182;
line-height: 35px;
}
.tag-list {
margin-top: 38px;
margin-bottom: 40px;
display: flex;
align-items: center;
gap: 26px;
.tag-item {
width: 138px;
height: 50px;
background: rgba(8, 87, 232, 0.05);
border-radius: 24px;
display: flex;
align-items: center;
justify-content: center;
font-size: 22px;
font-family: Source Han Sans CN;
font-weight: 500;
color: #232323;
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -245,6 +245,10 @@ const rightColumns = [ ...@@ -245,6 +245,10 @@ const rightColumns = [
title: "字段名称", title: "字段名称",
dataIndex: "fieldName", dataIndex: "fieldName",
}, },
{
title: "字段编码",
dataIndex: "fieldCode",
},
{ {
title: "数据类型", title: "数据类型",
scopedSlots: { scopedSlots: {
...@@ -547,4 +551,4 @@ export default { ...@@ -547,4 +551,4 @@ export default {
cursor: pointer; cursor: pointer;
color: #1890ff; color: #1890ff;
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 评价器 横板皮肤 --> <!-- 评价器 横板皮肤 -->
<div <div
:id="conponentsId" :id="componentsId"
class="call-out-skin-across" class="call-out-skin-across"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
:style="{ :style="{
...@@ -125,7 +125,7 @@ export default { ...@@ -125,7 +125,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
...@@ -298,4 +298,4 @@ export default { ...@@ -298,4 +298,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 呼叫器 横板皮肤 --> <!-- 呼叫器 横板皮肤 -->
<div <div
:id="conponentsId" :id="componentsId"
class="call-out-skin-across" class="call-out-skin-across"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
:style="{ :style="{
...@@ -151,7 +151,7 @@ export default { ...@@ -151,7 +151,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- 集中显示屏 横板 --> <!-- 集中显示屏 横板 -->
<div <div
class="centralize-across" class="centralize-across"
:id="conponentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
<!-- 集中显示屏 竖版 --> <!-- 集中显示屏 竖版 -->
<div <div
class="vertical-skin" class="vertical-skin"
:id="conponentsId" :id="componentsId"
v-else-if="imageResolution === '2'" v-else-if="imageResolution === '2'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
...@@ -301,7 +301,7 @@ export default { ...@@ -301,7 +301,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
...@@ -552,4 +552,4 @@ export default { ...@@ -552,4 +552,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -13,23 +13,42 @@ ...@@ -13,23 +13,42 @@
:class="{ active: i === isActive }" :class="{ active: i === isActive }"
v-for="(v, i) in productList" v-for="(v, i) in productList"
:key="v.id" :key="v.id"
@click="changeMenu(i, v)" @click.self="changeMenu(i, v)"
style="width: 50%; text-align: center" style="width: 50%; text-align: center"
> >
<div class="control" v-permission="[1]">
<a-space>
<a-icon type="edit" @click="handleEdit(v)" />
<a-icon type="delete" @click="handleDel(v.id)" />
</a-space>
</div>
{{ v.productName }} {{ v.productName }}
</a-card-grid> </a-card-grid>
</div> </div>
<!-- 编辑产品 -->
<AddDev
ref="AddDev"
:visible.sync="visible"
:title="title"
@addDev="getProductList"
></AddDev>
</div> </div>
</template> </template>
<script> <script>
import { getProductList } from "@/services/surface"; import { getProductList, deleteProduct } from "@/services/surface";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import AddDev from "../modal/AddDev.vue";
export default { export default {
components: {
AddDev,
},
data() { data() {
return { return {
productList: [], //产品列表 productList: [], //产品列表
isActive: "", isActive: "",
visible: false,
title: "编辑产品",
}; };
}, },
created() { created() {
...@@ -62,6 +81,38 @@ export default { ...@@ -62,6 +81,38 @@ export default {
}; };
this.SET_curProduct(obj); this.SET_curProduct(obj);
}, },
// 编辑产品
handleEdit(row) {
this.title = "编辑产品";
this.$refs.AddDev.onEdit(row);
this.visible = true;
},
// 删除产品
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 deleteProduct({ id });
let { code, msg } = res.data;
if (code === 1) {
_this.$message.success(msg);
_this.getProductList();
}
},
onCancel() {
console.log("Cancel");
},
});
console.log(id);
},
}, },
beforeDestroy() { beforeDestroy() {
this.SET_curProduct({}); this.SET_curProduct({});
...@@ -74,6 +125,7 @@ export default { ...@@ -74,6 +125,7 @@ export default {
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
} }
.search-box { .search-box {
padding: 15px 15px 0px; padding: 15px 15px 0px;
} }
...@@ -85,6 +137,9 @@ export default { ...@@ -85,6 +137,9 @@ export default {
.active { .active {
background-color: #1890ff; background-color: #1890ff;
color: #fff; color: #fff;
.anticon {
color: inherit;
}
} }
} }
/deep/.ant-card-grid { /deep/.ant-card-grid {
...@@ -93,5 +148,23 @@ export default { ...@@ -93,5 +148,23 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
cursor: pointer; cursor: pointer;
position: relative;
&:hover {
.control {
display: block;
}
}
}
.control {
position: absolute;
right: 10px;
top: 0px;
display: none;
.anticon-edit {
color: #03d76f;
}
.anticon-delete {
color: #fa4d4c;
}
} }
</style> </style>
\ No newline at end of file
...@@ -194,10 +194,11 @@ export default { ...@@ -194,10 +194,11 @@ export default {
.preview-btn { .preview-btn {
border-top: 1px solid #ccc; border-top: 1px solid #ccc;
height: 100px; height: 100px;
padding: 0px 10px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
flex-shrink: 0; flex-shrink: 0;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</div> </div>
<div class="show-skin flex aic jcc"> <div class="show-skin flex aic jcc">
<component <component
conponentsId="skinInfo" componentsId="skinInfo"
:is="component" :is="component"
:imageResolution="curSkin.imageResolution" :imageResolution="curSkin.imageResolution"
:skinFieldList="curSkin.skinFieldList" :skinFieldList="curSkin.skinFieldList"
...@@ -211,4 +211,4 @@ export default { ...@@ -211,4 +211,4 @@ export default {
transform: scale(0.7); transform: scale(0.7);
} }
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 桌面自助服务终端 横板 --> <!-- 桌面自助服务终端 横板 -->
<div <div
:id="conponentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
class="across-skin flex flexc aic" class="across-skin flex flexc aic"
:style="{ :style="{
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
...@@ -258,4 +258,4 @@ export default { ...@@ -258,4 +258,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 信息发布 横板皮肤 --> <!-- 信息发布 横板皮肤 -->
<div <div
:id="conponentsId" :id="componentsId"
class="across-skin flex flexc" class="across-skin flex flexc"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
> >
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</div> </div>
<!-- 信息发布 竖版皮肤 --> <!-- 信息发布 竖版皮肤 -->
<div <div
:id="conponentsId" :id="componentsId"
class="vertical-skin flex flexc" class="vertical-skin flex flexc"
v-else-if="imageResolution === '2'" v-else-if="imageResolution === '2'"
> >
...@@ -114,7 +114,7 @@ export default { ...@@ -114,7 +114,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
...@@ -253,4 +253,4 @@ export default { ...@@ -253,4 +253,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div> <div>
<a-modal <a-modal v-model="Visible" :title="title" @cancel="handleClose">
v-model="Visible"
title="新增设备"
@ok="handleOk"
@cancel="handleClose"
>
<a-form-model <a-form-model
:model="form" :model="form"
ref="form" ref="form"
...@@ -17,11 +12,7 @@ ...@@ -17,11 +12,7 @@
<a-input placeholder="请输入设备名称" v-model="form.productName" /> <a-input placeholder="请输入设备名称" v-model="form.productName" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="设备编号" prop="productCode"> <a-form-model-item label="设备编号" prop="productCode">
<a-input <a-input placeholder="请输入设备编号" v-model="form.productCode" />
type="password"
placeholder="请输入设备编号"
v-model="form.productCode"
/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="备注" prop="productRemark"> <a-form-model-item label="备注" prop="productRemark">
<a-textarea <a-textarea
...@@ -31,6 +22,10 @@ ...@@ -31,6 +22,10 @@
/> />
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</div>
</a-modal> </a-modal>
</div> </div>
</template> </template>
...@@ -44,6 +39,11 @@ export default { ...@@ -44,6 +39,11 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
title: {
required: true,
type: String,
default: "新增设备",
},
}, },
data() { data() {
return { return {
...@@ -91,6 +91,20 @@ export default { ...@@ -91,6 +91,20 @@ export default {
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.Visible = false; this.Visible = false;
}, },
resetForm() {
this.$refs.form.resetFields();
},
// 新增
onAdd() {
Object.assign(this.form, this.$options.data().form);
this.form.id && this.$delete(this.form, "id");
},
// 编辑
onEdit(row) {
setTimeout(() => {
this.form = { ...row };
}, 10);
},
}, },
}; };
</script> </script>
...@@ -104,4 +118,4 @@ export default { ...@@ -104,4 +118,4 @@ export default {
/deep/.ant-form-explain { /deep/.ant-form-explain {
position: absolute; position: absolute;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div> <div>
<a-modal <a-modal v-model="Visible" :title="titleField" @cancel="handleClose">
v-model="Visible"
:title="titleField"
@ok="handleOk"
@cancel="handleClose"
>
<a-form-model <a-form-model
:model="formData" :model="formData"
ref="formData" ref="formData"
...@@ -54,6 +49,10 @@ ...@@ -54,6 +49,10 @@
<a-input-number v-model="formData.fieldOrderNo" :min="0" /> <a-input-number v-model="formData.fieldOrderNo" :min="0" />
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</div>
</a-modal> </a-modal>
</div> </div>
</template> </template>
...@@ -152,7 +151,10 @@ export default { ...@@ -152,7 +151,10 @@ export default {
}); });
}, },
handleClose() { handleClose() {
this.$refs.formData.resetFields();
this.Visible = false; this.Visible = false;
},
resetForm() {
this.$refs.formData.resetFields(); this.$refs.formData.resetFields();
}, },
changeTemplate(val, e) { changeTemplate(val, e) {
...@@ -166,7 +168,9 @@ export default { ...@@ -166,7 +168,9 @@ export default {
}, },
// 编辑 // 编辑
onEdit(row) { onEdit(row) {
this.formData = { ...row }; this.$nextTick(() => {
this.formData = { ...row };
});
}, },
}, },
}; };
...@@ -181,4 +185,4 @@ export default { ...@@ -181,4 +185,4 @@ export default {
/deep/.ant-form-explain { /deep/.ant-form-explain {
position: absolute; position: absolute;
} }
</style> </style>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="add-surface-preview"> <div class="add-surface-preview">
<div ref="content" class="add-surface-preview-content"> <div ref="content" class="add-surface-preview-content">
<component <component
conponentsId="conponentsId" componentsId="componentsId"
:is="component" :is="component"
:skinFieldList="formData.skinFieldList" :skinFieldList="formData.skinFieldList"
:imageResolution="formData.imageResolution" :imageResolution="formData.imageResolution"
...@@ -351,9 +351,11 @@ export default { ...@@ -351,9 +351,11 @@ export default {
item.fieldOrderNo = 1000; item.fieldOrderNo = 1000;
} }
} }
v.skinFieldList.sort((a, b) => { v.skinFieldList = v.skinFieldList
return a.fieldOrderNo - b.fieldOrderNo; .sort((a, b) => {
}); return a.fieldOrderNo - b.fieldOrderNo;
})
.filter((v) => v.enabled != 0);
}); });
this.skinTemplate = data; this.skinTemplate = data;
// this.formData.skinFieldList = this.skinTemplate[0].skinFieldList; // this.formData.skinFieldList = this.skinTemplate[0].skinFieldList;
...@@ -401,11 +403,11 @@ export default { ...@@ -401,11 +403,11 @@ export default {
this.$refs.formData.validate((valid) => { this.$refs.formData.validate((valid) => {
if (valid) { if (valid) {
this.loading = true; this.loading = true;
let conponentsId = document.getElementById("conponentsId"); let componentsId = document.getElementById("componentsId");
let info = conponentsId.getBoundingClientRect(); let info = componentsId.getBoundingClientRect();
let width = info.width; let width = info.width;
let height = info.height; let height = info.height;
html2canvas(conponentsId, { html2canvas(componentsId, {
backgroundColor: null, backgroundColor: null,
useCORS: true, useCORS: true,
width: width, width: width,
...@@ -429,8 +431,8 @@ export default { ...@@ -429,8 +431,8 @@ export default {
if (code === 1) { if (code === 1) {
this.formData.previewImagePath = res.data.url; this.formData.previewImagePath = res.data.url;
let result = await skinSave({ let result = await skinSave({
...this.curProduct,
...this.formData, ...this.formData,
...this.curProduct,
}); });
let { code, msg } = result.data; let { code, msg } = result.data;
if (code === 1) { if (code === 1) {
...@@ -529,9 +531,9 @@ export default { ...@@ -529,9 +531,9 @@ export default {
} }
.upload-btn, .upload-btn,
.select-color-btn { .select-color-btn {
background-color: #04cb8f; background: #04cb8f !important;
color: #fff; color: #fff;
border: 1px solid #04cb8f; border: 1px solid #04cb8f !important;
} }
.color-ipt { .color-ipt {
width: 100%; width: 100%;
......
<template> <template>
<div> <div>
<a-modal <a-modal v-model="Visible" :title="titleTemplate" @cancel="handleClose">
v-model="Visible"
:title="titleTemplate"
@ok="handleOk"
@cancel="handleClose"
>
<a-form-model <a-form-model
:model="formData" :model="formData"
ref="formData" ref="formData"
...@@ -31,6 +26,10 @@ ...@@ -31,6 +26,10 @@
/> />
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</div>
</a-modal> </a-modal>
</div> </div>
</template> </template>
...@@ -108,8 +107,8 @@ export default { ...@@ -108,8 +107,8 @@ export default {
this.formData.productName = text; this.formData.productName = text;
}, },
handleClose() { handleClose() {
this.Visible = false;
this.$refs.formData.resetFields(); this.$refs.formData.resetFields();
this.Visible = false;
}, },
// 新增 // 新增
onAdd() { onAdd() {
...@@ -118,8 +117,12 @@ export default { ...@@ -118,8 +117,12 @@ export default {
}, },
// 编辑 // 编辑
onEdit(row) { onEdit(row) {
this.formData = { ...row }; this.$nextTick(() => {
console.log(row); this.formData = { ...row };
});
},
resetForm() {
this.$refs.formData.resetFields();
}, },
handleOk() { handleOk() {
this.$refs.formData.validate(async (valid) => { this.$refs.formData.validate(async (valid) => {
...@@ -161,4 +164,4 @@ export default { ...@@ -161,4 +164,4 @@ export default {
margin-right: 4px; margin-right: 4px;
margin-bottom: 4px; margin-bottom: 4px;
} }
</style> </style>
\ No newline at end of file
...@@ -302,6 +302,7 @@ export default { ...@@ -302,6 +302,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
/deep/.ant-drawer-body { /deep/.ant-drawer-body {
height: 90%; height: 90%;
padding: 0px;
} }
.classify { .classify {
height: 100%; height: 100%;
...@@ -310,6 +311,7 @@ export default { ...@@ -310,6 +311,7 @@ export default {
.classify-list { .classify-list {
flex: 1; flex: 1;
margin-bottom: 10px; margin-bottom: 10px;
padding: 20px;
overflow-y: auto; overflow-y: auto;
} }
.footer-btn { .footer-btn {
...@@ -326,6 +328,7 @@ export default { ...@@ -326,6 +328,7 @@ export default {
} }
.skin-name { .skin-name {
margin-bottom: 0px; margin-bottom: 0px;
align-items: flex-start;
/deep/ .ant-form-item-label { /deep/ .ant-form-item-label {
line-height: 20px !important; line-height: 20px !important;
} }
...@@ -409,4 +412,4 @@ export default { ...@@ -409,4 +412,4 @@ export default {
/deep/.ant-form-explain { /deep/.ant-form-explain {
position: absolute; position: absolute;
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 排号机 1920*1080 --> <!-- 排号机 1920*1080 -->
<div <div
:id="conponentsId" :id="componentsId"
class="across-skin" class="across-skin"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
:style="{ :style="{
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<!-- 排号机竖版 1080*1920 --> <!-- 排号机竖版 1080*1920 -->
<div <div
class="vertical-skin" class="vertical-skin"
:id="conponentsId" :id="componentsId"
v-else-if="imageResolution === '2'" v-else-if="imageResolution === '2'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
...@@ -173,7 +173,7 @@ export default { ...@@ -173,7 +173,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
...@@ -380,4 +380,4 @@ export default { ...@@ -380,4 +380,4 @@ export default {
color: #fff; color: #fff;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 样表机 横板 --> <!-- 样表机 横板 -->
<div <div
:id="conponentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
class="sample_form_skin flex flexc aic" class="sample_form_skin flex flexc aic"
:style="{ :style="{
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
...@@ -280,4 +280,4 @@ export default { ...@@ -280,4 +280,4 @@ export default {
color: #fff; color: #fff;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 自助服务终端 横板 --> <!-- 自助服务终端 横板 -->
<div <div
:id="conponentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
class="across-skin flex flexc aic" class="across-skin flex flexc aic"
:style="{ :style="{
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
...@@ -258,4 +258,4 @@ export default { ...@@ -258,4 +258,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 导视机 横板 --> <!-- 导视机 横板 -->
<div <div
:id="conponentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
class="across-skin flex flexc aic" class="across-skin flex flexc aic"
> >
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
...@@ -186,4 +186,4 @@ export default { ...@@ -186,4 +186,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<TabHeader label="皮肤管理"> <TabHeader label="皮肤管理">
<a-space> <a-space>
<a-button v-permission="[1]" icon="plus" @click="addDev" <a-button v-permission="[1]" icon="plus" @click="addDev"
>新增设备</a-button >新增产品</a-button
> >
<a-button <a-button
type="primary" type="primary"
...@@ -48,7 +48,12 @@ ...@@ -48,7 +48,12 @@
@addSkinSuccess="addSkinSuccess" @addSkinSuccess="addSkinSuccess"
></AddSurface> ></AddSurface>
<!-- 新增设备 --> <!-- 新增设备 -->
<AddDev :visible.sync="addDevVisible" @addDev="addDevSuccess"></AddDev> <AddDev
ref="AddDev"
:visible.sync="addDevVisible"
@addDev="addDevSuccess"
:title="title"
></AddDev>
</div> </div>
</template> </template>
...@@ -77,6 +82,7 @@ export default { ...@@ -77,6 +82,7 @@ export default {
visible: false, visible: false,
addDevVisible: false, addDevVisible: false,
classifyList: [], //皮肤分类数据 classifyList: [], //皮肤分类数据
title: "新增产品",
}; };
}, },
created() { created() {
...@@ -113,8 +119,8 @@ export default { ...@@ -113,8 +119,8 @@ export default {
}, },
// 编辑皮肤 // 编辑皮肤
editSkin(row) { editSkin(row) {
this.isShow = true;
this.$refs.AddSurface.onEdit(row); this.$refs.AddSurface.onEdit(row);
this.isShow = true;
}, },
// 新增分类成功刷新数据 // 新增分类成功刷新数据
addCategorySuccess() { addCategorySuccess() {
...@@ -126,6 +132,8 @@ export default { ...@@ -126,6 +132,8 @@ export default {
}, },
// 新增设备 // 新增设备
addDev() { addDev() {
this.title = "新增产品";
this.$refs.AddDev.onAdd();
this.addDevVisible = true; this.addDevVisible = true;
}, },
// 新增设备成功 // 新增设备成功
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 窗口屏 横板 --> <!-- 窗口屏 横板 -->
<div <div
:id="conponentsId" :id="componentsId"
class="window-skin-across flex jcb aic" class="window-skin-across flex jcb aic"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
:style="{ :style="{
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
...@@ -226,4 +226,4 @@ export default { ...@@ -226,4 +226,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 样表机 横板 --> <!-- 样表机 横板 -->
<div <div
:id="conponentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
class="sample_form_skin flex flexc aic" class="sample_form_skin flex flexc aic"
:style="{ :style="{
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
...@@ -329,4 +329,4 @@ export default { ...@@ -329,4 +329,4 @@ export default {
color: #fff; color: #fff;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -148,7 +148,9 @@ export default { ...@@ -148,7 +148,9 @@ export default {
}, },
// 编辑 // 编辑
onEdit(row) { onEdit(row) {
this.form = { ...row }; this.$nextTick(() => {
this.form = { ...row };
});
}, },
// 保存 // 保存
handleOk() { handleOk() {
...@@ -168,5 +170,4 @@ export default { ...@@ -168,5 +170,4 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
\ No newline at end of file
...@@ -209,7 +209,9 @@ export default { ...@@ -209,7 +209,9 @@ export default {
}, },
// 编辑 // 编辑
onEdit(row) { onEdit(row) {
this.form = { ...row }; this.$nextTick(() => {
this.form = { ...row };
});
}, },
// 保存 // 保存
handleOk() { handleOk() {
...@@ -229,5 +231,4 @@ export default { ...@@ -229,5 +231,4 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style>
\ No newline at end of file
...@@ -334,18 +334,12 @@ ...@@ -334,18 +334,12 @@
<a-button @click="handleReset">重置</a-button> <a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="hideModal">确定</a-button> <a-button type="primary" @click="hideModal">确定</a-button>
</div> </div>
<!-- 预览 -->
<PrevieModal
:previewData="previewData"
:previewVisible.sync="previewVisible"
></PrevieModal>
</a-modal> </a-modal>
</template> </template>
<script> <script>
import { getWindowList, saveWorkman } from "@/services/dept"; import { getWindowList, saveWorkman } from "@/services/dept";
import { modelList } from "@/services/basicsetFun"; import { modelList } from "@/services/basicsetFun";
import PrevieModal from "@/components/PrevieModal.vue";
// import { changePhone, changeLandline } from "@/utils/validate"; // import { changePhone, changeLandline } from "@/utils/validate";
export default { export default {
props: { props: {
...@@ -374,9 +368,7 @@ export default { ...@@ -374,9 +368,7 @@ export default {
}, },
}, },
}, },
components: { components: {},
PrevieModal,
},
data() { data() {
const checkIdCard = (rule, value, callback) => { const checkIdCard = (rule, value, callback) => {
if (!value) { if (!value) {
...@@ -395,8 +387,6 @@ export default { ...@@ -395,8 +387,6 @@ export default {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL, api2: process.env.VUE_APP_API_IMG_URL,
accept: "image/jpeg,image/png", // 上传类型 accept: "image/jpeg,image/png", // 上传类型
previewData: {}, // 预览
previewVisible: false,
fileList: [], fileList: [],
loading: false, loading: false,
imageUrl: "", imageUrl: "",
...@@ -537,22 +527,26 @@ export default { ...@@ -537,22 +527,26 @@ export default {
}, },
// 编辑 // 编辑
onEdit(data) { onEdit(data) {
// this.editWindow(data.deptId); this.$nextTick(() => {
this.form = { ...data }; // this.editWindow(data.deptId);
this.form.loginName && this.$delete(this.form, "loginName"); this.form = { ...data };
this.form.loginPwd && this.$delete(this.form, "loginPwd"); this.form.loginName && this.$delete(this.form, "loginName");
this.form.windowId = this.form.windowId ? this.form.windowId : undefined; this.form.loginPwd && this.$delete(this.form, "loginPwd");
if (this.form.photoPath) { this.form.windowId = this.form.windowId
this.fileList = [ ? this.form.windowId
{ : undefined;
uid: -1, if (this.form.photoPath) {
status: "done", this.fileList = [
name: this.form.photoPath, {
url: this.api2 + this.form.photoPath, uid: -1,
url2: this.form.photoPath, status: "done",
}, name: this.form.photoPath,
]; url: this.api2 + this.form.photoPath,
} url2: this.form.photoPath,
},
];
}
});
}, },
// 关闭对话框 // 关闭对话框
handleClose() { handleClose() {
...@@ -566,6 +560,7 @@ export default { ...@@ -566,6 +560,7 @@ export default {
// 重置 // 重置
handleReset() { handleReset() {
// this.form.windowName = ""; // this.form.windowName = "";
this.fileList = [];
this.$refs.formData.resetFields(); this.$refs.formData.resetFields();
}, },
// 照片上传 // 照片上传
...@@ -586,11 +581,9 @@ export default { ...@@ -586,11 +581,9 @@ export default {
}, },
// 预览 // 预览
handlePreview(info) { handlePreview(info) {
this.previewData = { this.$viewerApi({
type: "img", images: [info.url],
url: info.url, });
};
this.previewVisible = true;
}, },
// 照片大小格式限制 // 照片大小格式限制
beforeUpload(file) { beforeUpload(file) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
:label-col="{ span: 5 }" :label-col="{ span: 5 }"
:wrapper-col="{ span: 19 }" :wrapper-col="{ span: 19 }"
> >
<a-form-model-item label="账号" prop="loginName"> <a-form-model-item label="账号">
<a-input disabled placeholder="请输入账号" v-model="form.loginName" /> <a-input disabled placeholder="请输入账号" v-model="form.loginName" />
</a-form-model-item> </a-form-model-item>
<!-- <a-form-model-item label="旧密码" prop="oldPwd"> <!-- <a-form-model-item label="旧密码" prop="oldPwd">
...@@ -115,12 +115,15 @@ export default { ...@@ -115,12 +115,15 @@ export default {
}, },
// 关闭对话框 // 关闭对话框
handleClose() { handleClose() {
this.form.loginName = "";
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.Visible = false; this.Visible = false;
}, },
// 获取用户账号信息 // 获取用户账号信息
getUserInfo(account) { getUserInfo(account) {
this.form.loginName = account; this.$nextTick(() => {
this.form.loginName = account;
});
}, },
}, },
}; };
...@@ -135,4 +138,4 @@ export default { ...@@ -135,4 +138,4 @@ export default {
/deep/.ant-form-explain { /deep/.ant-form-explain {
position: absolute; position: absolute;
} }
</style> </style>
\ No newline at end of file
...@@ -366,11 +366,6 @@ ...@@ -366,11 +366,6 @@
<a-button @click="handleReset">重置</a-button> <a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="hideModal">确定</a-button> <a-button type="primary" @click="hideModal">确定</a-button>
</div> </div>
<!-- 预览 -->
<PrevieModal
:previewData="previewData"
:previewVisible.sync="previewVisible"
></PrevieModal>
</a-modal> </a-modal>
</template> </template>
...@@ -378,7 +373,6 @@ ...@@ -378,7 +373,6 @@
import { changeAccount, changePassWord } from "@/utils/validate"; import { changeAccount, changePassWord } from "@/utils/validate";
import { getWindowList, saveWorkman } from "@/services/dept"; import { getWindowList, saveWorkman } from "@/services/dept";
import { modelList } from "@/services/basicsetFun"; import { modelList } from "@/services/basicsetFun";
import PrevieModal from "@/components/PrevieModal.vue";
// import { changePhone, changeLandline } from "@/utils/validate"; // import { changePhone, changeLandline } from "@/utils/validate";
import local from "@/utils/local"; import local from "@/utils/local";
export default { export default {
...@@ -408,9 +402,7 @@ export default { ...@@ -408,9 +402,7 @@ export default {
}, },
}, },
}, },
components: { components: {},
PrevieModal,
},
data() { data() {
const checkIdCard = (rule, value, callback) => { const checkIdCard = (rule, value, callback) => {
if (!value) { if (!value) {
...@@ -429,8 +421,6 @@ export default { ...@@ -429,8 +421,6 @@ export default {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL, api2: process.env.VUE_APP_API_IMG_URL,
accept: "image/jpeg,image/png", // 上传类型 accept: "image/jpeg,image/png", // 上传类型
previewData: {}, // 预览
previewVisible: false,
fileList: [], fileList: [],
loading: false, loading: false,
imageUrl: "", imageUrl: "",
...@@ -626,11 +616,9 @@ export default { ...@@ -626,11 +616,9 @@ export default {
}, },
// 预览 // 预览
handlePreview(info) { handlePreview(info) {
this.previewData = { this.$viewerApi({
type: "img", images: [info.url],
url: info.url, });
};
this.previewVisible = true;
}, },
// 照片大小格式限制 // 照片大小格式限制
beforeUpload(file) { beforeUpload(file) {
......
<template> <template>
<a-spin tip="正在上传中..." :spinning="spinning"> <a-spin tip="正在上传中..." :spinning="spinning">
<div class="website flex flexc"> <div class="personnel flex flexc">
<TabHeader label="工作人员管理"></TabHeader> <TabHeader label="工作人员管理"></TabHeader>
<div class="pd15 flex1 auto-scroll-y"> <div class="pd15 flex1 auto-scroll-y">
<div class="person_chang flex aic mb10"> <div class="person_chang flex aic mb10">
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
{{ curDept }} {{ curDept }}
</div> </div>
<a-popover <a-popover
overlayClassName="personnel-popover"
arrowPointAtCenter arrowPointAtCenter
placement="rightTop" placement="rightTop"
title="部门列表" title="部门列表"
...@@ -80,6 +81,7 @@ ...@@ -80,6 +81,7 @@
{{ curWindow }} {{ curWindow }}
</div> </div>
<a-popover <a-popover
overlayClassName="personnel-popover"
arrowPointAtCenter arrowPointAtCenter
placement="rightTop" placement="rightTop"
title="窗口列表" title="窗口列表"
...@@ -204,7 +206,7 @@ ...@@ -204,7 +206,7 @@
onShowSizeChange: showSizeChange, onShowSizeChange: showSizeChange,
}" }"
bordered bordered
:scroll="{ y: 510 }" :scroll="{ y: 500 }"
:loading="loading" :loading="loading"
:columns="columns" :columns="columns"
:data-source="WorkmanData" :data-source="WorkmanData"
...@@ -219,6 +221,7 @@ ...@@ -219,6 +221,7 @@
<img <img
v-if="text.photoPath" v-if="text.photoPath"
:src="api2 + text.photoPath" :src="api2 + text.photoPath"
@click="handlePreview(api2 + text.photoPath)"
class="pht" class="pht"
/> />
...@@ -651,12 +654,24 @@ export default { ...@@ -651,12 +654,24 @@ export default {
} }
return fromnum; return fromnum;
}, },
// 预览照片
handlePreview(url) {
this.$viewerApi({
images: [url],
});
},
}, },
}; };
</script> </script>
<style lang="less">
.personnel-popover {
.ant-popover-inner-content {
padding: 0px !important;
}
}
</style>
<style lang="less" scoped> <style lang="less" scoped>
.website { .personnel {
width: 100%; width: 100%;
height: 100%; height: 100%;
.right { .right {
...@@ -690,6 +705,7 @@ export default { ...@@ -690,6 +705,7 @@ export default {
width: 56px; width: 56px;
height: 74px; height: 74px;
object-fit: cover; object-fit: cover;
cursor: pointer;
} }
div.person_gruop1 { div.person_gruop1 {
...@@ -775,10 +791,12 @@ export default { ...@@ -775,10 +791,12 @@ export default {
} }
} }
} }
.dept-list { .dept-list {
width: 500px; width: 620px;
min-height: 50px; min-height: 50px;
max-height: 400px; max-height: 400px;
padding: 12px 16px;
overflow-y: auto; overflow-y: auto;
.ant-radio-group { .ant-radio-group {
display: grid; display: grid;
......
...@@ -6,21 +6,6 @@ import Layouts from "@/layouts/Layouts"; ...@@ -6,21 +6,6 @@ import Layouts from "@/layouts/Layouts";
// 路由配置 // 路由配置
const options = { const options = {
routes: [ routes: [
{
path: "/jump",
name: "跳转页面",
component: () => import("@/pages/basicset/jump/jump"),
},
{
path: "*",
name: "404",
component: () => import("@/pages/exception/404"),
},
{
path: "/403",
name: "403",
component: () => import("@/pages/exception/403"),
},
{ {
path: "/apppreview", path: "/apppreview",
name: "预览页面", name: "预览页面",
...@@ -33,7 +18,7 @@ const options = { ...@@ -33,7 +18,7 @@ const options = {
redirect: "/website", redirect: "/website",
children: [ children: [
{ {
path: "website", path: "/website",
name: "站点管理", name: "站点管理",
meta: { meta: {
icon: "bank", icon: "bank",
...@@ -41,7 +26,7 @@ const options = { ...@@ -41,7 +26,7 @@ const options = {
component: () => import("@/pages/basicset/site/website"), component: () => import("@/pages/basicset/site/website"),
}, },
{ {
path: "business", path: "/business",
meta: { meta: {
icon: "book", icon: "book",
}, },
...@@ -118,7 +103,7 @@ const options = { ...@@ -118,7 +103,7 @@ const options = {
], ],
}, },
{ {
path: "department", path: "/department",
meta: { meta: {
icon: "audit", icon: "audit",
}, },
...@@ -141,7 +126,7 @@ const options = { ...@@ -141,7 +126,7 @@ const options = {
], ],
}, },
{ {
path: "personnel", path: "/personnel",
name: "工作人员管理", name: "工作人员管理",
meta: { meta: {
icon: "idcard", icon: "idcard",
...@@ -149,7 +134,7 @@ const options = { ...@@ -149,7 +134,7 @@ const options = {
component: () => import("@/pages/basicset/workman/personnel"), component: () => import("@/pages/basicset/workman/personnel"),
}, },
{ {
path: "festival", path: "/festival",
name: "节假日管理", name: "节假日管理",
meta: { meta: {
icon: "carry-out", icon: "carry-out",
...@@ -157,16 +142,17 @@ const options = { ...@@ -157,16 +142,17 @@ const options = {
component: () => import("@/pages/basicset/holiday/festival"), component: () => import("@/pages/basicset/holiday/festival"),
}, },
{ {
path: "deploy", path: "/deploy",
name: "部署模块管理", name: "部署模块管理",
meta: { meta: {
icon: "appstore", icon: "appstore",
roles: ["admin"],
}, },
component: () => import("@/pages/basicset/deploy/deploy"), component: () => import("@/pages/basicset/deploy/deploy"),
}, },
{ {
path: "hall", path: "/hall",
name: "大厅管理", name: "大厅管理",
meta: { meta: {
icon: "gateway", icon: "gateway",
...@@ -196,7 +182,7 @@ const options = { ...@@ -196,7 +182,7 @@ const options = {
}, },
{ {
path: "surface", path: "/surface",
component: () => import("@/pages/basicset/surface/index"), component: () => import("@/pages/basicset/surface/index"),
meta: { meta: {
icon: "skin", icon: "skin",
...@@ -210,7 +196,7 @@ const options = { ...@@ -210,7 +196,7 @@ const options = {
}, },
{ {
path: "addsurfacetemplate", path: "addsurfacetemplate",
name: "新增皮肤m模板", name: "新增皮肤模板",
component: () => component: () =>
import("@/pages/basicset/surface/AddSurfaceTemplate"), import("@/pages/basicset/surface/AddSurfaceTemplate"),
meta: { invisible: true }, meta: { invisible: true },
...@@ -218,7 +204,7 @@ const options = { ...@@ -218,7 +204,7 @@ const options = {
], ],
}, },
{ {
path: "configurat", path: "/configurat",
name: "短信配置", name: "短信配置",
meta: { meta: {
icon: "mail", icon: "mail",
...@@ -227,7 +213,7 @@ const options = { ...@@ -227,7 +213,7 @@ const options = {
}, },
{ {
path: "appmarket", path: "/appmarket",
component: () => import("@/pages/basicset/appmarket/Index"), component: () => import("@/pages/basicset/appmarket/Index"),
meta: { meta: {
icon: "shop", icon: "shop",
...@@ -314,7 +300,7 @@ const options = { ...@@ -314,7 +300,7 @@ const options = {
], ],
}, },
{ {
path: "system", path: "/system",
name: "系统设置", name: "系统设置",
component: () => import("@/pages/basicset/system/System"), component: () => import("@/pages/basicset/system/System"),
meta: { meta: {
......
import Vue from 'vue' import Vue from "vue";
import Router from 'vue-router' import VueRouter from "vue-router";
import {formatRoutes} from '@/utils/routerUtil' import { formatRoutes } from "@/utils/routerUtil";
import { i18n } from "@/utils/i18n";
Vue.use(Router) import store from "@/store";
import { mergeI18nFromRoutes } from "@/utils/i18n";
Vue.use(VueRouter);
//解决重复路由报错 //解决重复路由报错
const originalPush = Router.prototype.push const originalPush = VueRouter.prototype.push;
// 修改原型对象中的push方法 // 修改原型对象中的push方法
Router.prototype.push = function push(location) { VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err) return originalPush.call(this, location).catch((err) => err);
} };
const routes = [
{
path: "/jump",
name: "跳转页面",
component: () => import("@/pages/basicset/jump/jump"),
},
{
path: "*",
name: "404",
component: () => import("@/pages/exception/404"),
},
{
path: "/403",
name: "403",
component: () => import("@/pages/exception/403"),
},
];
formatRoutes(routes);
const router = new VueRouter({
routes,
});
// 不需要登录拦截的路由配置 // 不需要登录拦截的路由配置
const loginIgnore = { const loginIgnore = {
names: ['404', '403'], //根据路由名称匹配 names: ["404", "403"], //根据路由名称匹配
paths: ['/login'], //根据路由fullPath匹配 paths: ["/login", "/jump"], //根据路由fullPath匹配
/** /**
* 判断路由是否包含在该配置中 * 判断路由是否包含在该配置中
* @param route vue-router 的 route 对象 * @param route vue-router 的 route 对象
* @returns {boolean} * @returns {boolean}
*/ */
includes(route) { includes(route) {
return this.names.includes(route.name) || this.paths.includes(route.path) return this.names.includes(route.name) || this.paths.includes(route.path);
} },
} };
/** /**
* 初始化路由实例 * 初始化路由实例
* @param isAsync 是否异步路由模式
* @returns {VueRouter} * @returns {VueRouter}
*/ */
function initRouter(isAsync) { function initRouter() {
const options = isAsync ? require('./async/config.async').default : require('./config').default // 是否异步路由模式
formatRoutes(options.routes) const options = store.state.setting.asyncRoutes
return new Router(options) ? require("./async/config.async").default
: require("./config").default;
formatRoutes(options.routes);
return options;
}
// 判断权限
function permission(router, role) {
if (router.meta && router.meta.roles) {
return router.meta.roles.includes(role);
} else {
return true;
}
}
// 计算动态路由
function calcRouters(dynamicRouter, role) {
// 过滤
let res = dynamicRouter.filter((v) => {
// 判断是否有权限访问此路由
if (permission(v, role)) {
// 判断有没有子路由
if (v.children) {
// 递归
v.children = calcRouters(v.children, role);
}
return true;
} else {
return false;
}
});
return res;
}
// 动态菜单
function createMenus() {
let role = store.getters["site/userInfo"].name;
if (!role) return;
let options = initRouter();
let routesArr = calcRouters(options.routes, role);
const rootRoute = routesArr.find((item) => item.path === "/");
const menuRoutes = rootRoute && rootRoute.children;
mergeI18nFromRoutes(i18n, menuRoutes);
if (menuRoutes) {
routesArr.forEach((v) => {
router.addRoute(v);
});
store.commit("setting/setMenuData", menuRoutes);
}
} }
export {loginIgnore, initRouter} createMenus();
export { loginIgnore, initRouter, createMenus, router };
...@@ -30,7 +30,8 @@ module.exports = { ...@@ -30,7 +30,8 @@ module.exports = {
treeselect: `${BASE_URL}/base/area/treeselect`, treeselect: `${BASE_URL}/base/area/treeselect`,
save: `${BASE_URL}/base/area/save`, save: `${BASE_URL}/base/area/save`,
delete: `${BASE_URL}/base/area/delete`, delete: `${BASE_URL}/base/area/delete`,
init: `${BASE_URL}/base/base/area/genSubAreaByAreaName `, init: `${BASE_URL}/base/area/genSubAreaByAreaName`,
authAreaTree: `${BASE_URL}/base/area/authAreaTree`,
}, },
// 站点 // 站点
site: { site: {
...@@ -294,6 +295,7 @@ module.exports = { ...@@ -294,6 +295,7 @@ module.exports = {
list: `${BASE_URL}/base/app/dataset/list`, list: `${BASE_URL}/base/app/dataset/list`,
info: `${BASE_URL}/base/app/dataset/info`, info: `${BASE_URL}/base/app/dataset/info`,
save: `${BASE_URL}/base/app/dataset/save`, save: `${BASE_URL}/base/app/dataset/save`,
batchSave: `${BASE_URL}/base/app/dataset/batchSave`,
delete: `${BASE_URL}/base/app/dataset/delete`, delete: `${BASE_URL}/base/app/dataset/delete`,
}, },
// 应用信息字段配置 // 应用信息字段配置
......
...@@ -19,6 +19,10 @@ export async function getListByParentId(data) { ...@@ -19,6 +19,10 @@ export async function getListByParentId(data) {
export async function treeselect(data) { export async function treeselect(data) {
return request(area.treeselect, METHOD.POST, data); return request(area.treeselect, METHOD.POST, data);
} }
// 查看个人区域列表
export async function authAreaTree(data) {
return request(area.authAreaTree, METHOD.POST, data);
}
// 查看站点列表 // 查看站点列表
export async function getSiteList(data) { export async function getSiteList(data) {
return request(site.list, METHOD.POST, data); return request(site.list, METHOD.POST, data);
......
...@@ -61,6 +61,10 @@ export async function getDatasetInfo(data) { ...@@ -61,6 +61,10 @@ export async function getDatasetInfo(data) {
export async function saveDataset(data) { export async function saveDataset(data) {
return request(dataset.save, METHOD.POST, data); return request(dataset.save, METHOD.POST, data);
} }
// 批量保存数据
export async function batchSaveDataset(data) {
return request(dataset.batchSave, METHOD.POST, data);
}
// 删除数据 // 删除数据
export async function deleteDataset(data) { export async function deleteDataset(data) {
return request(dataset.delete, METHOD.GET, data); return request(dataset.delete, METHOD.GET, data);
......
...@@ -2,8 +2,9 @@ import Vue from "vue"; ...@@ -2,8 +2,9 @@ import Vue from "vue";
import Vuex from "vuex"; import Vuex from "vuex";
import modules from "./modules"; import modules from "./modules";
import createPersistedState from "vuex-persistedstate"; import createPersistedState from "vuex-persistedstate";
import SecureLS from "secure-ls"; // import SecureLS from "secure-ls";
var ls = new SecureLS({ isCompression: false }); // var ls = new SecureLS({ isCompression: false });
import { SessionCrypto } from "@/utils/util";
Vue.use(Vuex); Vue.use(Vuex);
const store = new Vuex.Store({ const store = new Vuex.Store({
modules, modules,
...@@ -15,9 +16,9 @@ const store = new Vuex.Store({ ...@@ -15,9 +16,9 @@ const store = new Vuex.Store({
createPersistedState({ createPersistedState({
key: "info", key: "info",
storage: { storage: {
getItem: (key) => ls.get(key), getItem: (key) => SessionCrypto.getItem(key),
setItem: (key, value) => ls.set(key, value), setItem: (key, value) => SessionCrypto.setItem(key, value),
removeItem: (key) => ls.remove(key), removeItem: (key) => SessionCrypto.remove(key),
}, },
}), }),
], ],
......
import config from '@/config' import config from "@/config";
import { ADMIN } from '@/config/default' import { ADMIN } from "@/config/default";
import { formatFullPath } from '@/utils/i18n' import { formatFullPath } from "@/utils/i18n";
import { filterMenu } from '@/utils/authority-utils' import { filterMenu } from "@/utils/authority-utils";
import { getLocalSetting } from '@/utils/themeUtil' import { getLocalSetting } from "@/utils/themeUtil";
import deepClone from 'lodash.clonedeep' import deepClone from "lodash.clonedeep";
const localSetting = getLocalSetting(true) const localSetting = getLocalSetting(true);
// console.log(localSetting) // console.log(localSetting)
const customTitlesStr = sessionStorage.getItem(process.env.VUE_APP_TBAS_TITLES_KEY) const customTitlesStr = sessionStorage.getItem(
const customTitles = (customTitlesStr && JSON.parse(customTitlesStr)) || [] process.env.VUE_APP_TBAS_TITLES_KEY
);
const customTitles = (customTitlesStr && JSON.parse(customTitlesStr)) || [];
export default { export default {
namespaced: true, namespaced: true,
...@@ -20,96 +22,99 @@ export default { ...@@ -20,96 +22,99 @@ export default {
activatedFirst: undefined, activatedFirst: undefined,
customTitles, customTitles,
...config, ...config,
...localSetting ...localSetting,
}, },
getters: { getters: {
menuData (state, getters, rootState) { menuData(state, getters, rootState) {
if (state.filterMenu) { if (state.filterMenu) {
const { permissions, roles } = rootState.account const { permissions, roles } = rootState.account;
return filterMenu(deepClone(state.menuData), permissions, roles) return filterMenu(deepClone(state.menuData), permissions, roles);
} }
return state.menuData return state.menuData;
}, },
firstMenu (state, getters) { firstMenu(state, getters) {
const { menuData } = getters const { menuData } = getters;
if (menuData.length > 0 && !menuData[0].fullPath) { if (menuData.length > 0 && !menuData[0].fullPath) {
formatFullPath(menuData) formatFullPath(menuData);
} }
return menuData.map(item => { return menuData.map((item) => {
const menuItem = { ...item } const menuItem = { ...item };
delete menuItem.children delete menuItem.children;
return menuItem return menuItem;
}) });
}, },
subMenu (state) { subMenu(state) {
const { menuData, activatedFirst } = state const { menuData, activatedFirst } = state;
if (menuData.length > 0 && !menuData[0].fullPath) { if (menuData.length > 0 && !menuData[0].fullPath) {
formatFullPath(menuData) formatFullPath(menuData);
} }
const current = menuData.find(menu => menu.fullPath === activatedFirst) const current = menuData.find((menu) => menu.fullPath === activatedFirst);
return current && current.children || [] return (current && current.children) || [];
} },
}, },
mutations: { mutations: {
setDevice (state, isMobile) { setDevice(state, isMobile) {
state.isMobile = isMobile state.isMobile = isMobile;
}, },
setTheme (state, theme) { setTheme(state, theme) {
// console.log(theme) // console.log(theme)
state.theme = theme state.theme = theme;
}, },
setLayout (state, layout) { setLayout(state, layout) {
state.layout = layout state.layout = layout;
}, },
setMultiPage (state, multiPage) { setMultiPage(state, multiPage) {
state.multiPage = multiPage state.multiPage = multiPage;
}, },
setAnimate (state, animate) { setAnimate(state, animate) {
state.animate = animate state.animate = animate;
}, },
setWeekMode (state, weekMode) { setWeekMode(state, weekMode) {
state.weekMode = weekMode state.weekMode = weekMode;
}, },
setFixedHeader (state, fixedHeader) { setFixedHeader(state, fixedHeader) {
state.fixedHeader = fixedHeader state.fixedHeader = fixedHeader;
}, },
setFixedSideBar (state, fixedSideBar) { setFixedSideBar(state, fixedSideBar) {
state.fixedSideBar = fixedSideBar state.fixedSideBar = fixedSideBar;
}, },
setLang (state, lang) { setLang(state, lang) {
state.lang = lang state.lang = lang;
}, },
setHideSetting (state, hideSetting) { setHideSetting(state, hideSetting) {
state.hideSetting = hideSetting state.hideSetting = hideSetting;
}, },
correctPageMinHeight (state, minHeight) { correctPageMinHeight(state, minHeight) {
state.pageMinHeight += minHeight state.pageMinHeight += minHeight;
}, },
setMenuData (state, menuData) { setMenuData(state, menuData) {
state.menuData = menuData state.menuData = menuData;
}, },
setAsyncRoutes (state, asyncRoutes) { setAsyncRoutes(state, asyncRoutes) {
state.asyncRoutes = asyncRoutes state.asyncRoutes = asyncRoutes;
}, },
setPageWidth (state, pageWidth) { setPageWidth(state, pageWidth) {
state.pageWidth = pageWidth state.pageWidth = pageWidth;
}, },
setActivatedFirst (state, activatedFirst) { setActivatedFirst(state, activatedFirst) {
state.activatedFirst = activatedFirst state.activatedFirst = activatedFirst;
}, },
setFixedTabs (state, fixedTabs) { setFixedTabs(state, fixedTabs) {
state.fixedTabs = fixedTabs state.fixedTabs = fixedTabs;
}, },
setCustomTitle (state, { path, title }) { setCustomTitle(state, { path, title }) {
if (title) { if (title) {
const obj = state.customTitles.find(item => item.path === path) const obj = state.customTitles.find((item) => item.path === path);
if (obj) { if (obj) {
obj.title = title obj.title = title;
} else { } else {
state.customTitles.push({ path, title }) state.customTitles.push({ path, title });
} }
sessionStorage.setItem(process.env.VUE_APP_TBAS_TITLES_KEY, JSON.stringify(state.customTitles)) sessionStorage.setItem(
process.env.VUE_APP_TBAS_TITLES_KEY,
JSON.stringify(state.customTitles)
);
} }
} },
} },
} };
import Vue from 'vue' import Vue from "vue";
import VueI18n from 'vue-i18n' import VueI18n from "vue-i18n";
import routesI18n from '@/router/i18n' import routesI18n from "@/router/i18n";
import './Objects' import "./Objects";
import { getI18nKey } from '@/utils/routerUtil' import { getI18nKey } from "@/utils/routerUtil";
/** /**
* 创建 i18n 配置 * 创建 i18n 配置
...@@ -10,16 +10,18 @@ import { getI18nKey } from '@/utils/routerUtil' ...@@ -10,16 +10,18 @@ import { getI18nKey } from '@/utils/routerUtil'
* @param fallback 回退语言 * @param fallback 回退语言
* @returns {VueI18n} * @returns {VueI18n}
*/ */
function initI18n (locale, fallback) { function initI18n(locale, fallback) {
Vue.use(VueI18n) Vue.use(VueI18n);
let i18nOptions = { let i18nOptions = {
locale, locale,
fallbackLocale: fallback, fallbackLocale: fallback,
silentFallbackWarn: true, silentFallbackWarn: true,
} };
return new VueI18n(i18nOptions) return new VueI18n(i18nOptions);
} }
const i18n = initI18n("CN", "US");
/** /**
* 根据 router options 配置生成 国际化语言 * 根据 router options 配置生成 国际化语言
* @param lang * @param lang
...@@ -27,16 +29,22 @@ function initI18n (locale, fallback) { ...@@ -27,16 +29,22 @@ function initI18n (locale, fallback) {
* @param valueKey * @param valueKey
* @returns {*} * @returns {*}
*/ */
function generateI18n (lang, routes, valueKey) { function generateI18n(lang, routes, valueKey) {
routes.forEach(route => { routes.forEach((route) => {
let keys = getI18nKey(route.fullPath).split('.') let keys = getI18nKey(route.fullPath).split(".");
let value = valueKey === 'path' ? route[valueKey].split('/').filter(item => !item.startsWith(':') && item != '').join('.') : route[valueKey] let value =
lang.assignProps(keys, value) valueKey === "path"
? route[valueKey]
.split("/")
.filter((item) => !item.startsWith(":") && item != "")
.join(".")
: route[valueKey];
lang.assignProps(keys, value);
if (route.children) { if (route.children) {
generateI18n(lang, route.children, valueKey) generateI18n(lang, route.children, valueKey);
} }
}) });
return lang return lang;
} }
/** /**
...@@ -44,14 +52,18 @@ function generateI18n (lang, routes, valueKey) { ...@@ -44,14 +52,18 @@ function generateI18n (lang, routes, valueKey) {
* @param routes * @param routes
* @param parentPath * @param parentPath
*/ */
function formatFullPath (routes, parentPath = '') { function formatFullPath(routes, parentPath = "") {
routes.forEach(route => { routes.forEach((route) => {
let isFullPath = route.path.substring(0, 1) === '/' let isFullPath = route.path.substring(0, 1) === "/";
route.fullPath = isFullPath ? route.path : (parentPath === '/' ? parentPath + route.path : parentPath + '/' + route.path) route.fullPath = isFullPath
? route.path
: parentPath === "/"
? parentPath + route.path
: parentPath + "/" + route.path;
if (route.children) { if (route.children) {
formatFullPath(route.children, route.fullPath) formatFullPath(route.children, route.fullPath);
} }
}) });
} }
/** /**
...@@ -59,20 +71,16 @@ function formatFullPath (routes, parentPath = '') { ...@@ -59,20 +71,16 @@ function formatFullPath (routes, parentPath = '') {
* @param i18n * @param i18n
* @param routes * @param routes
*/ */
function mergeI18nFromRoutes (i18n, routes) { function mergeI18nFromRoutes(i18n, routes) {
formatFullPath(routes) formatFullPath(routes);
const CN = generateI18n(new Object(), routes, 'name') const CN = generateI18n(new Object(), routes, "name");
const US = generateI18n(new Object(), routes, 'path') const US = generateI18n(new Object(), routes, "path");
i18n.mergeLocaleMessage('CN', CN) i18n.mergeLocaleMessage("CN", CN);
i18n.mergeLocaleMessage('US', US) i18n.mergeLocaleMessage("US", US);
const messages = routesI18n.messages const messages = routesI18n.messages;
Object.keys(messages).forEach(lang => { Object.keys(messages).forEach((lang) => {
i18n.mergeLocaleMessage(lang, messages[lang]) i18n.mergeLocaleMessage(lang, messages[lang]);
}) });
} }
export { export { initI18n, mergeI18nFromRoutes, formatFullPath, i18n };
initI18n,
mergeI18nFromRoutes,
formatFullPath
}
...@@ -136,11 +136,11 @@ function loadRoutes(routesConfig) { ...@@ -136,11 +136,11 @@ function loadRoutes(routesConfig) {
// 提取路由国际化数据 // 提取路由国际化数据
mergeI18nFromRoutes(i18n, router.options.routes); mergeI18nFromRoutes(i18n, router.options.routes);
// 初始化Admin后台菜单数据 // 初始化Admin后台菜单数据
const rootRoute = router.options.routes.find((item) => item.path === "/"); // const rootRoute = router.options.routes.find((item) => item.path === "/");
const menuRoutes = rootRoute && rootRoute.children; // const menuRoutes = rootRoute && rootRoute.children;
if (menuRoutes) { // if (menuRoutes) {
store.commit("setting/setMenuData", menuRoutes); // store.commit("setting/setMenuData", menuRoutes);
} // }
} }
/** /**
......
import enquireJs from "enquire.js"; import enquireJs from "enquire.js";
import CryptoJS from "crypto-js";
export function isDef(v) { export function isDef(v) {
return v !== undefined && v !== null; return v !== undefined && v !== null;
} }
...@@ -62,3 +62,52 @@ export const extractTree = (arrs, childs, attrArr) => { ...@@ -62,3 +62,52 @@ export const extractTree = (arrs, childs, attrArr) => {
}; };
return getObj(arrs); return getObj(arrs);
}; };
/**
* 加密存储临时数据并解析对象
*/
const aseKey = "**_FXxx_1234_KEY";
const KEY = "KEY_EXTRA";
export class SessionCrypto {
// 加密
static setItem(key = KEY, value = "") {
if (typeof key === "string") {
const stringify = JSON.stringify(value);
const encrypt = CryptoJS.AES.encrypt(
stringify,
CryptoJS.enc.Utf8.parse(aseKey),
{
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
}
).toString();
window.sessionStorage.setItem(key, encrypt);
return encrypt;
}
}
// 解密
static getItem(key = KEY) {
const ssStr = window.sessionStorage.getItem(key) || "";
try {
if (ssStr) {
const decrypt = CryptoJS.AES.decrypt(
ssStr,
CryptoJS.enc.Utf8.parse(aseKey),
{
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7,
}
).toString(CryptoJS.enc.Utf8);
const parseStr = JSON.parse(decrypt);
return parseStr;
}
return "";
} catch (e) {
return "";
}
}
// 删除
static remove(key) {
window.sessionStorage.removeItem(key);
}
}
...@@ -3676,6 +3676,11 @@ crypto-js@^3.1.6: ...@@ -3676,6 +3676,11 @@ crypto-js@^3.1.6:
resolved "https://registry.npmmirror.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b" resolved "https://registry.npmmirror.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b"
integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q== integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==
crypto-js@^4.1.1:
version "4.1.1"
resolved "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf"
integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==
crypto-random-string@^2.0.0: crypto-random-string@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.npm.taobao.org/crypto-random-string/download/crypto-random-string-2.0.0.tgz?cache=0&sync_timestamp=1583560482221&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcrypto-random-string%2Fdownload%2Fcrypto-random-string-2.0.0.tgz" resolved "https://registry.npm.taobao.org/crypto-random-string/download/crypto-random-string-2.0.0.tgz?cache=0&sync_timestamp=1583560482221&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcrypto-random-string%2Fdownload%2Fcrypto-random-string-2.0.0.tgz"
...@@ -7215,6 +7220,11 @@ lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17 ...@@ -7215,6 +7220,11 @@ lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz"
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
lodash@^4.17.21:
version "4.17.21"
resolved "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
log-symbols@^2.2.0: log-symbols@^2.2.0:
version "2.2.0" version "2.2.0"
resolved "https://registry.npm.taobao.org/log-symbols/download/log-symbols-2.2.0.tgz?cache=0&sync_timestamp=1587898912367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flog-symbols%2Fdownload%2Flog-symbols-2.2.0.tgz" resolved "https://registry.npm.taobao.org/log-symbols/download/log-symbols-2.2.0.tgz?cache=0&sync_timestamp=1587898912367&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flog-symbols%2Fdownload%2Flog-symbols-2.2.0.tgz"
...@@ -10999,7 +11009,7 @@ uuid@^8.3.2: ...@@ -10999,7 +11009,7 @@ uuid@^8.3.2:
v-viewer@^1.6.4: v-viewer@^1.6.4:
version "1.6.4" version "1.6.4"
resolved "https://registry.npmmirror.com/v-viewer/-/v-viewer-1.6.4.tgz" resolved "https://registry.npmmirror.com/v-viewer/-/v-viewer-1.6.4.tgz#39e36b534baab34076fb816704c6a734de0dc72f"
integrity sha512-LVkiUHpmsbsZXebeNXnu8krRCi5i2n07FeLFxoIVGhw8lVvTBO0ffpbDC6mLEuacCjrIh09HjIqpciwUtWE8lQ== integrity sha512-LVkiUHpmsbsZXebeNXnu8krRCi5i2n07FeLFxoIVGhw8lVvTBO0ffpbDC6mLEuacCjrIh09HjIqpciwUtWE8lQ==
dependencies: dependencies:
throttle-debounce "^2.0.1" throttle-debounce "^2.0.1"
......
This diff is collapsed.
This diff is collapsed.
...@@ -4,6 +4,7 @@ import cn.hutool.core.exceptions.ExceptionUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.exceptions.ExceptionUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.service.ICacheService; import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.ThreadPool;
import com.mortals.xhx.base.system.message.MessageService; import com.mortals.xhx.base.system.message.MessageService;
import com.mortals.xhx.common.utils.SendTask; import com.mortals.xhx.common.utils.SendTask;
import com.mortals.xhx.common.utils.SendTaskThreadPool; import com.mortals.xhx.common.utils.SendTaskThreadPool;
...@@ -22,14 +23,11 @@ import org.springframework.stereotype.Service; ...@@ -22,14 +23,11 @@ import org.springframework.stereotype.Service;
@Slf4j @Slf4j
public class MessageServiceImpl implements MessageService { public class MessageServiceImpl implements MessageService {
@Autowired
private SendTaskThreadPool sendTaskThreadPool;
@Override @Override
public void sendThirdParty(String sendUrl, String content) { public void sendThirdParty(String sendUrl, String content) {
SendTask sendTask = new SendTask(sendUrl, content); SendTask sendTask = new SendTask(sendUrl, content);
sendTaskThreadPool.execute(sendTask); ThreadPool.getInstance().execute(sendTask);
} }
public static void main(String[] args) { public static void main(String[] args) {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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