Commit d77fd6a0 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 943fb47b 52ea8818
......@@ -46,7 +46,8 @@
"vue-resource": "^1.5.2",
"vue-router": "^3.3.4",
"vuedraggable": "^2.23.2",
"vuex": "^3.4.0"
"vuex": "^3.4.0",
"vuex-persistedstate": "^4.1.0"
},
"devDependencies": {
"@ant-design/colors": "^4.0.1",
......
......@@ -90,6 +90,22 @@ export default {
popContainer() {
return document.getElementById("popContainer");
},
// 刷新保存
// readVueXData() {
// window.addEventListener("beforeunload", () => {
// sessionStorage.setItem("store", JSON.stringify(this.$store.state));
// });
// if (sessionStorage.getItem("store")) {
// this.$store.replaceState(
// Object.assign(
// {},
// this.$store.state,
// JSON.parse(sessionStorage.getItem("store"))
// )
// );
// sessionStorage.removeItem("store");
// }
// },
},
};
</script>
......
<template>
<div class="previe-modal" v-if="Visible" @click="Visible = false">
<img @click.stop v-if="previeData.type === 'img'" :src="previeData.url" />
<img @click.stop v-if="previewData.type === 'img'" :src="previewData.url" />
<video
@click.stop
v-else
:src="previeData.url"
:src="previewData.url"
autoplay
muted
controls
......@@ -16,14 +16,14 @@
<script>
export default {
props: {
previeData: {
previewData: {
type: Object,
required: true,
default: () => {
return {};
},
},
previeVisible: {
previewVisible: {
type: Boolean,
required: true,
default: false,
......@@ -32,10 +32,10 @@ export default {
computed: {
Visible: {
get() {
return this.previeVisible;
return this.previewVisible;
},
set(val) {
this.$emit("update:previeVisible", val);
this.$emit("update:previewVisible", val);
},
},
},
......
<template>
<div class="addbusiness ff">
<div class="back_btn" @click="handleBack">返回上一级</div>
<div class="addmatter">
<a-tabs default-active-key="1">
<a-tab-pane key="1" tab="基本信息" class="box">
<div slot="tabBarExtraContent">
<a-space>
<a-button @click="handleManage">返回事项列表</a-button>
<a-button @click="handleBack">返回概要列表</a-button>
</a-space>
</div>
<a-tab-pane key="1" tab="基本信息">
<BaseMessage />
</a-tab-pane>
......@@ -68,6 +73,10 @@ export default {
mounted() {},
methods: {
// 返回管理页面
handleManage() {
this.$router.push("/business");
},
// 返回上一级
handleBack() {
this.$router.back();
......@@ -79,19 +88,14 @@ export default {
};
</script>
<style lang='less' scoped>
.addbusiness {
position: relative;
height: 100%;
.addmatter {
width: 100%;
height: auto;
padding-left: 10px;
.back_btn {
position: absolute;
top: 8px;
right: 20px;
border-radius: 4px;
padding: 6px 8px;
border: 1px solid rgba(221, 221, 221, 1);
z-index: 100;
cursor: pointer;
}
padding-right: 10px;
background-color: #fff;
}
/deep/.ant-tabs-nav-container {
border-bottom: 1px solid #f0f0f0 !important;
}
</style>
\ No newline at end of file
<template>
<!-- 事项概要 -->
<div class="synopsis">
<a-tabs default-active-key="1">
<a-button slot="tabBarExtraContent" @click="handleBack"
>返回上一级</a-button
>
<a-tab-pane key="1" tab="事项概要信息">
<AddSynopsis></AddSynopsis>
</a-tab-pane>
</a-tabs>
</div>
</template>
<script>
import AddSynopsis from "./components/AddSynopsis.vue";
export default {
components: {
AddSynopsis,
},
data() {
return {};
},
methods: {
// 返回上一级
handleBack() {
this.$router.back();
},
},
};
</script>
<style lang="less" scoped>
.synopsis {
height: auto;
width: 100%;
padding: 0px 10px;
}
/deep/.ant-tabs-nav-container {
border-bottom: 1px solid #f0f0f0 !important;
}
</style>
\ No newline at end of file
......@@ -99,8 +99,8 @@
></AddData>
<!-- 预览 -->
<PrevieModal
:previeVisible.sync="previeVisible"
:previeData="previeData"
:previewVisible.sync="previewVisible"
:previewData="previewData"
></PrevieModal>
</div>
</template>
......@@ -139,8 +139,8 @@ export default {
AddVisible: false,
title: "",
fieldCode: "",
previeVisible: false,
previeData: {}, // 预览信息
previewVisible: false,
previewData: {}, // 预览信息
};
},
computed: {
......@@ -274,11 +274,11 @@ export default {
},
// 预览
handlePreview(type, url) {
this.previeData = {
this.previewData = {
type,
url,
};
this.previeVisible = true;
this.previewVisible = true;
},
},
};
......
<template>
<div class="business-matter">
<router-view></router-view>
</div>
</template>
<script>
export default {};
</script>
<style lang="less" scoped>
.business-matter {
width: 100%;
min-height: 100%;
background-color: #fff;
display: flex;
}
</style>
\ No newline at end of file
<template>
<div class="business">
<a-tabs v-model="active">
<a-tab-pane :key="1" tab="业务管理">
<BusinessTabs1 v-if="active === 1" ref="BusinessTabs1" />
<a-tab-pane :key="1" tab="事项管理">
<BusinessTabs2 v-if="active === 1" ref="BusinessTabs2" />
</a-tab-pane>
<a-tab-pane :key="2" tab="事项管理">
<BusinessTabs2 v-if="active === 2" ref="BusinessTabs2" />
<a-tab-pane :key="2" tab="业务管理">
<BusinessTabs1 v-if="active === 2" ref="BusinessTabs1" />
</a-tab-pane>
<a-tab-pane :key="3" tab="业务事项关联">
......
......@@ -6,7 +6,6 @@
<div class="header-bottom">
<div class="left-btn">
<a-button type="danger" @click="handleDelAll"> 批量移除 </a-button>
<!-- <a-button class="add-btn" @click="addItems"> 新增事项 </a-button> -->
</div>
<div class="search-box">
<!-- <a-select
......@@ -67,6 +66,17 @@
<template slot="deptName" slot-scope="text">
{{ text.deptName ? text.deptName : "--" }}
</template>
<!-- 事项名称 -->
<template slot="matterName" slot-scope="text">
<a-tooltip placement="topLeft">
<template slot="title">
{{ text.matterName }}
</template>
<div class="matter-name">{{ text.matterName }}</div>
</a-tooltip>
<a-tag v-if="text.source === 0" color="green"> 一体化添加 </a-tag>
<a-tag v-else color="blue"> 手动添加 </a-tag>
</template>
<!-- 到现场次数 -->
<template slot="num" slot-scope="text">
<span v-if="text.windowToTheSceneNum">{{
......@@ -79,12 +89,21 @@
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a
href="javascript:;"
class="delete"
@click="handleDel(text.id, text)"
>移除</a
>
<a-space>
<a
href="javascript:;"
v-if="text.source == 1"
class="edit"
@click="handleEdit(text.matterId)"
>编辑</a
>
<a
href="javascript:;"
class="delete"
@click="handleDel(text.id, text)"
>移除</a
>
</a-space>
</template>
</a-table>
</div>
......@@ -92,10 +111,11 @@
<!-- 右 -->
<div class="right">
<div class="header">
<h3 class="titel">一体化事项列表</h3>
<h3 class="titel">基础事项列表</h3>
<div class="control">
<div>
<a-button type="primary" @click="handleAddAll"> 批量加入 </a-button>
<a-button class="add-btn" @click="addMatter"> 新增事项 </a-button>
</div>
<div>
<a-input-search
......@@ -143,10 +163,29 @@
<template slot="deptName" slot-scope="text">
{{ text.deptName ? text.deptName : "--" }}
</template>
<!-- 事项名称 -->
<template slot="matterName" slot-scope="text">
<a-tooltip placement="topLeft">
<template slot="title">
{{ text.matterName }}
</template>
<div class="matter-name">{{ text.matterName }}</div>
</a-tooltip>
<a-tag v-if="text.source === 0" color="green"> 一体化添加 </a-tag>
<a-tag v-else color="blue"> 手动添加 </a-tag>
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a href="javascript:;" class="jion" @click="handleIn(text.id)"
>加入</a
>
<a
href="javascript:;"
v-if="text.source == 1"
class="edit"
@click="handleEdit(text.id)"
>编辑</a
>
<a
href="javascript:;"
class="delete"
......@@ -171,6 +210,7 @@ import {
import { getBusinessMatterList, delBusinessMatter } from "@/services/business";
// import { getDeptList } from "@/services/dept";
import local from "@/utils/local";
import { mapMutations } from "vuex";
const leftColumns = [
{
title: "序号",
......@@ -186,8 +226,11 @@ const leftColumns = [
},
{
title: "事项名称",
ellipsis: true,
dataIndex: "matterName",
// ellipsis: true,
align: "left",
scopedSlots: {
customRender: "matterName",
},
},
{
title: "到现场次数",
......@@ -219,12 +262,15 @@ const rightColumns = [
},
{
title: "事项名称",
ellipsis: true,
dataIndex: "matterName",
// ellipsis: true,
align: "left",
scopedSlots: {
customRender: "matterName",
},
},
{
title: "操作",
width: "110px",
width: "130px",
scopedSlots: {
customRender: "action",
},
......@@ -266,6 +312,7 @@ export default {
},
methods: {
...mapMutations("site", ["SET_matterDict"]),
// 获取站点事项
async getMatterSiteData(search = {}) {
this.leftLoading = true;
......@@ -295,14 +342,17 @@ export default {
matterName: this.searchRightVal,
...search,
});
let { pageInfo, data } = res.data.data;
if (!data.length && this.rightCurrent > 1) {
this.rightCurrent -= 1;
this.getMatterListData();
if (res.data.code === 1) {
let { pageInfo, data, dict } = res.data.data;
if (!data.length && this.rightCurrent > 1) {
this.rightCurrent -= 1;
this.getMatterListData();
}
this.matterDataList = data;
this.rightTotal = pageInfo.totalResult;
this.SET_matterDict(dict);
this.rightLoading = false;
}
this.matterDataList = data;
this.rightTotal = pageInfo.totalResult;
this.rightLoading = false;
},
// 左边搜索
onSearchLeft() {
......@@ -338,14 +388,12 @@ export default {
});
},
//新增事项
addItems() {
if (!this.siteId) {
this.$message.warning("请先选择站点");
return;
}
addMatter() {
this.$router.push({
path: "addbusiness",
query: { siteId: this.siteId },
path: "/business/synopsis",
query: {
edit: 0,
},
});
},
onSelectChange(key, data) {
......@@ -417,7 +465,6 @@ export default {
this.getMatterSiteData();
this.getMatterListData();
this.selectedRowKeys = [];
this.$bus.$emit("addMatterSiteData");
}
},
// 右边删除
......@@ -491,6 +538,16 @@ export default {
}
}
},
// 编辑
handleEdit(matterId) {
this.$router.push({
path: "/business/synopsis",
query: {
edit: 1,
matterId,
},
});
},
},
};
</script>
......@@ -512,6 +569,12 @@ export default {
margin-right: 19px;
}
}
.matter-name {
margin-bottom: 10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.header-bottom {
display: flex;
......
......@@ -113,6 +113,18 @@
<template slot="deptName" slot-scope="text">
{{ text.deptName ? text.deptName : "--" }}
</template>
<!-- 事项名称 -->
<template slot="matterName" slot-scope="text">
<a-tooltip placement="topLeft">
<template slot="title">
{{ text.matterName }}
</template>
<div class="matter-name">{{ text.matterName }}</div>
</a-tooltip>
<!-- <a-tag v-if="text.source === 0" color="green"> 一体化添加 </a-tag>
<a-tag v-else color="blue"> 手动添加 </a-tag> -->
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a href="javascript:;" class="jion" @click="handleIn(text)">关联</a>
</template>
......@@ -287,8 +299,11 @@ const rightColumns = [
},
{
title: "事项名称",
ellipsis: true,
dataIndex: "matterName",
// ellipsis: true,
align: "left",
scopedSlots: {
customRender: "matterName",
},
},
{
title: "操作",
......@@ -664,6 +679,12 @@ export default {
}
}
}
.matter-name {
margin-bottom: 10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.header-bottom {
display: flex;
justify-content: space-between;
......
......@@ -9,7 +9,9 @@
>
<div slot="footer">
<a-button @click="resetForm">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
<a-button :loading="loading" type="primary" @click="handleOk"
>确定</a-button
>
</div>
<div class="content">
<a-form-model
......@@ -156,6 +158,20 @@
</a-form-model-item>
<a-form-model-item label="中心Logo" prop="logoPath">
<a-upload
:action="api + 'base/file/commonupload'"
list-type="picture-card"
:file-list="fileList"
@preview="handlePreview"
@change="handleChange"
:accept="accept"
>
<div v-if="fileList.length < 1">
<a-icon type="plus" />
<div class="ant-upload-text">上传图片</div>
</div>
</a-upload>
<!-- <a-upload
name="file"
list-type="picture-card"
class="avatar-uploader"
......@@ -174,7 +190,7 @@
<a-icon :type="loading ? 'loading' : 'plus'" />
<div class="ant-upload-text">上传图片</div>
</div>
</a-upload>
</a-upload> -->
</a-form-model-item>
<div class="color_title">办公信息</div>
......@@ -255,6 +271,11 @@
</a-form-model>
</div>
</a-modal>
<!-- 预览 -->
<PrevieModal
:previewData="previewData"
:previewVisible.sync="previewVisible"
></PrevieModal>
</div>
</template>
<script>
......@@ -262,6 +283,7 @@ import { modelList, siteSave } from "@/services/basicsetFun";
import YCheckbox from "@/components/ycheckbox/YCheckbox.vue";
// import options from "@/utils/city";
import { regionData } from "element-china-area-data";
import PrevieModal from "@/components/PrevieModal.vue";
export default {
props: {
formVisible: {
......@@ -283,6 +305,7 @@ export default {
},
components: {
YCheckbox,
PrevieModal,
},
data() {
// 验证手机号码
......@@ -310,6 +333,8 @@ export default {
api: process.env.VUE_APP_API_BASE_URL + "/",
accept: "image/jpeg,image/png", // 上传类型
loading: false,
previewData: {}, // 预览logo信息
previewVisible: false,
options: regionData, // 地区级联数据
tablename: "", //接口名称
modelIds: [], // 板块数据
......@@ -356,6 +381,7 @@ export default {
}, //表单提交数据
indeterminate: true,
checkAll: false,
fileList: [],
formRules: {
siteName: [
{
......@@ -552,10 +578,12 @@ export default {
},
//重置
resetForm() {
this.fileList = [];
this.$refs.ruleForm.resetFields();
},
// 关闭对话框
closeModal() {
this.fileList = [];
this.$refs.ruleForm.resetFields();
this.Visible = false;
},
......@@ -581,12 +609,23 @@ export default {
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.api + this.formInfo.logoPath,
url2: this.formInfo.logoPath,
},
];
}
},
// 保存
handleOk() {
console.log(this.formInfo);
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
this.loading = true;
let res = await siteSave({
...this.formInfo,
...this.areaInfo,
......@@ -597,8 +636,10 @@ export default {
modelIds: this.formInfo.modelIds.join(","),
});
let { code, msg } = res.data;
this.loading = false;
if (code === 1) {
this.$message.success(msg);
this.fileList = [];
this.Visible = false;
this.$parent.getSiteList({ areaID: this.areaInfo.areaID });
}
......@@ -619,19 +660,42 @@ export default {
return isJpgOrPng && isLt2M;
},
// 上传图片
handleChange(info) {
if (info.file.status === "uploading") {
this.loading = true;
return;
}
if (info.file.status === "done") {
this.formInfo.logoPath = info.file.response.url;
this.loading = false;
handleChange({ fileList }) {
this.fileList = fileList.map((v) => {
if (v.response) {
v.url2 = v.response.url;
v.url = this.api + v.response.url;
}
return v;
});
if (this.fileList[0]) {
this.formInfo.logoPath = this.fileList[0].url2;
} else {
this.formInfo.logoPath = "";
}
// if (info.file.status === "uploading") {
// this.loading = true;
// return;
// }
// if (info.file.status === "done") {
// this.formInfo.logoPath = info.file.response.url;
// this.loading = false;
// }
},
// 预览logo
handlePreview(info) {
this.previewData = {
type: "img",
url: info.url,
};
this.previewVisible = true;
},
// 删除logo
// handleRemove() {
// this.formInfo.logoPath = "";
// },
// 地址
oncityChange(val) {
console.log(val);
[
this.formInfo.proCode,
this.formInfo.cityCode,
......
......@@ -50,18 +50,33 @@ const options = {
},
{
path: "business",
name: "业务事项管理",
meta: {
icon: "book",
},
component: () => import("@/pages/basicset/business/business"),
},
{
path: "addbusiness",
name: "新增事项",
component: () =>
import("@/pages/basicset/addbusiness/addbusiness.vue"),
meta: { invisible: true },
component: () => import("@/pages/basicset/business/Index"),
children: [
{
path: "",
name: "业务事项管理",
meta: {
icon: "book",
invisible: true,
},
component: () => import("@/pages/basicset/business/business"),
},
{
path: "addmatter",
name: "新增事项",
component: () => import("@/pages/basicset/addmatter/AddMatter"),
meta: { invisible: true },
},
{
path: "synopsis",
name: "事项概要",
component: () => import("@/pages/basicset/addmatter/Synopsis"),
meta: { invisible: true },
},
],
},
{
......
......@@ -52,6 +52,11 @@ export async function delMatter(data) {
export async function getMatterListSubList(data) {
return request(matter.matterList, METHOD.POST, data);
}
// 查看基础事项
export async function getMatterInfo(data) {
return request(matter.info, METHOD.GET, data);
}
/**
* 事项申请材料
*/
......
import Vue from 'vue'
import Vuex from 'vuex'
import modules from './modules'
import Vue from "vue";
import Vuex from "vuex";
import modules from "./modules";
import createPersistedState from "vuex-persistedstate";
Vue.use(Vuex)
const store = new Vuex.Store({modules})
Vue.use(Vuex);
const store = new Vuex.Store({
modules,
// 持久化插件
plugins: [
createPersistedState({
storage: window.sessionStorage,
}),
],
});
export default store
export default store;
......@@ -5,6 +5,7 @@ export default {
imageResolution: [], // 皮肤设置分辨率
SiteTree: [], // 站点树
appTemplate: [], // 应用模板属性
matterDict: {}, // 事项字典
},
getters: {
SiteTree(state) {
......@@ -13,11 +14,17 @@ export default {
appTemplate(state) {
return state.appTemplate;
},
matterDict(state) {
return state.matterDict;
},
},
mutations: {
SET_appTemplate(state, appTemplate) {
state.appTemplate = appTemplate;
},
SET_matterDict(state, matterDict) {
state.matterDict = matterDict;
},
SET_SITE_ID(state, newId) {
state.siteId = newId;
},
......
......@@ -9735,6 +9735,11 @@ shell-quote@^1.6.1:
resolved "https://registry.npm.taobao.org/shell-quote/download/shell-quote-1.7.2.tgz"
integrity sha1-Z6fQLHbJ2iT5nSCAj8re0ODgS+I=
shvl@^2.0.3:
version "2.0.3"
resolved "https://registry.npmmirror.com/shvl/-/shvl-2.0.3.tgz#eb4bd37644f5684bba1fc52c3010c96fb5e6afd1"
integrity sha512-V7C6S9Hlol6SzOJPnQ7qzOVEWUQImt3BNmmzh40wObhla3XOYMe4gGiYzLrJd5TFa+cI2f9LKIRJTTKZSTbWgw==
side-channel@^1.0.4:
version "1.0.4"
resolved "https://registry.npmmirror.com/side-channel/-/side-channel-1.0.4.tgz"
......@@ -11186,6 +11191,14 @@ vuepress@^1.5.2:
opencollective-postinstall "^2.0.2"
update-notifier "^4.0.0"
vuex-persistedstate@^4.1.0:
version "4.1.0"
resolved "https://registry.npmmirror.com/vuex-persistedstate/-/vuex-persistedstate-4.1.0.tgz#127165f85f5b4534fb3170a5d3a8be9811bd2a53"
integrity sha512-3SkEj4NqwM69ikJdFVw6gObeB0NHyspRYMYkR/EbhR0hbvAKyR5gksVhtAfY1UYuWUOCCA0QNGwv9pOwdj+XUQ==
dependencies:
deepmerge "^4.2.2"
shvl "^2.0.3"
vuex@^3.4.0:
version "3.4.0"
resolved "https://registry.npm.taobao.org/vuex/download/vuex-3.4.0.tgz"
......
......@@ -46,7 +46,7 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
private ParamService paramService;
@Autowired
private InterceptorConfig interceptorConfig;
@Autowired
private SiteThemeService siteThemeService;
public MatterController() {
......
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