Compare commits

...

2 Commits

Author SHA1 Message Date
luyan d5e6c74939 第一次提交 10 months ago
luyan a7c0b3720b 移除注释代码; 10 months ago
  1. 3
      .env.development
  2. 7
      src/views/components/tinymce/index.vue
  3. 495
      src/views/main-content.vue
  4. 706
      src/views/main-navbar.vue
  5. 141
      src/views/main-sidebar-sub-menu.vue
  6. 365
      src/views/main-sidebar.vue
  7. 298
      src/views/main.vue
  8. 738
      src/views/modules/home/notice.vue
  9. 74
      src/views/modules/unopen.vue
  10. 3
      vue.config.js

3
.env.development

@ -2,7 +2,8 @@ NODE_ENV=development
# VUE_APP_API_SERVER = https://epmet-preview.elinkservice.cn/api
# VUE_APP_API_SERVER = http://192.168.1.60:8080/api
VUE_APP_API_SERVER = http://219.146.91.110:30801/api
# VUE_APP_API_SERVER = http://219.146.91.110:30801/api
VUE_APP_API_SERVER = http://192.168.1.140/api
# VUE_APP_API_SERVER = http://219.146.91.110:30801/api219.146.91.110:30801
# VUE_APP_API_SERVER = https://epmet-yantai.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api

7
src/views/components/tinymce/index.vue

@ -6,9 +6,6 @@
import loadTinymce from "@/utils/loadTinymce";
import { plugins, toolbar } from "./config";
import { debounce } from "throttle-debounce";
import Cookie from "js-cookie";
// import constants from '@/utils/constants'
import nextTick from "dai-js/tools/nextTick";
let num = 1;
export default {
name: "Tinymce",
@ -36,12 +33,8 @@ export default {
mounted() {
loadTinymce((tinymce) => {
let token = this.getUserToken();
// let uploadUrl = '1111'
let uploadUrl =
window.SITE_CONFIG["apiURL"] + "/oss/file/function/upload";
// :data="{customerId:customerId}"
// let uploadUrl = constants.userUploadUrl
// eslint-disable-next-line global-require
require("./zh_CN");
let conf = {
selector: `#${this.tinymceId}`,

495
src/views/main-content.vue

@ -1,293 +1,248 @@
<template>
<main :class="['aui-content', { 'aui-content--tabs': $route.meta.isTab }]">
<!-- tab展示内容 -->
<template v-if="$route.meta.isTab && !$store.state.inIframe">
<el-dropdown class="aui-content--tabs-tools">
<i class="el-icon-arrow-down"></i>
<el-dropdown-menu slot="dropdown" :show-timeout="0">
<el-dropdown-item
@click.native="tabRemoveHandle($store.state.contentTabsActiveName)"
>{{ $t("contentTabs.closeCurrent") }}</el-dropdown-item
>
<el-dropdown-item @click.native="tabsCloseOtherHandle()">{{
$t("contentTabs.closeOther")
}}</el-dropdown-item>
<el-dropdown-item @click.native="tabsCloseAllHandle()">{{
$t("contentTabs.closeAll")
}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-tabs
v-model.trim="$store.state.contentTabsActiveName"
@tab-click="tabSelectedHandle"
@tab-remove="tabRemoveHandle"
>
<!-- item.name !== 'indexWork', -->
<el-tab-pane
v-for="item in $store.state.contentTabs"
:key="item.name"
:name="item.name"
:label="item.title"
:closable="item.name !== 'home'"
:class="{ 'is-iframe': tabIsIframe(item.iframeURL) }"
>
<template v-if="tabIsIframe(item.iframeURL)">
<iframe
:src="
item.iframeURL + '?token=' + token + '&customerId=' + customerId
"
ref="iframes"
class="iframes"
id="iframes"
width="100%"
height="100%"
frameborder="0"
scrolling="yes"
></iframe>
<!-- <div v-if="tabIsIframe(item.iframeURL)" id="addend-iframe" style="height: 100%;"> </div> -->
</template>
<keep-alive v-else>
<router-view
v-if="item.name === $store.state.contentTabsActiveName"
@changeCustomerName="changeCustomerName"
/>
</keep-alive>
</el-tab-pane>
</el-tabs>
</template>
<!-- 其他方式, 展示内容 -->
<template v-else>
<keep-alive>
<router-view />
</keep-alive>
</template>
<template v-for="(item, index) in msgList">
<Tips
:key="item.memoId"
:info="item"
:show="msgList.length > 0 ? true : false"
@look="handleLook(item, index)"
@close="handleClose(item, index)"
/>
</template>
<el-dialog
:title="dialogTitle"
:visible.sync="dialogFormVisible"
:close-on-click-modal="false"
top="5vh"
width="950px"
class="dialog-h"
append-to-body
>
<work-form
v-if="formType == 'work_diary'"
ref="ref_form"
@dialogCancle="
dialogFormVisible = false;
formType = '';
"
/>
<h-form
v-if="formType == 'concern'"
ref="concern_form"
@dialogCancle="
dialogFormVisible = false;
formType = '';
"
/>
<d-form
v-if="formType == 'difficulty'"
ref="difficulty_form"
@dialogCancle="
dialogFormVisible = false;
formType = '';
"
/>
</el-dialog>
</main>
<main :class="['aui-content', { 'aui-content--tabs': $route.meta.isTab }]">
<!-- tab展示内容 -->
<template v-if="$route.meta.isTab && !$store.state.inIframe">
<el-dropdown class="aui-content--tabs-tools">
<i class="el-icon-arrow-down"></i>
<el-dropdown-menu slot="dropdown" :show-timeout="0">
<el-dropdown-item @click.native="tabRemoveHandle($store.state.contentTabsActiveName)">{{
$t("contentTabs.closeCurrent") }}</el-dropdown-item>
<el-dropdown-item @click.native="tabsCloseOtherHandle()">{{
$t("contentTabs.closeOther")
}}</el-dropdown-item>
<el-dropdown-item @click.native="tabsCloseAllHandle()">{{
$t("contentTabs.closeAll")
}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-tabs v-model.trim="$store.state.contentTabsActiveName" @tab-click="tabSelectedHandle"
@tab-remove="tabRemoveHandle">
<!-- item.name !== 'indexWork', -->
<el-tab-pane v-for="item in $store.state.contentTabs" :key="item.name" :name="item.name"
:label="item.title" :closable="item.name !== 'home'"
:class="{ 'is-iframe': tabIsIframe(item.iframeURL) }">
<template v-if="tabIsIframe(item.iframeURL)">
<iframe :src="item.iframeURL + '?token=' + token + '&customerId=' + customerId
" ref="iframes" class="iframes" id="iframes" width="100%" height="100%" frameborder="0"
scrolling="yes"></iframe>
<!-- <div v-if="tabIsIframe(item.iframeURL)" id="addend-iframe" style="height: 100%;"> </div> -->
</template>
<keep-alive v-else>
<router-view v-if="item.name === $store.state.contentTabsActiveName"
@changeCustomerName="changeCustomerName" />
</keep-alive>
</el-tab-pane>
</el-tabs>
</template>
<!-- 其他方式, 展示内容 -->
<template v-else>
<keep-alive>
<router-view />
</keep-alive>
</template>
<template v-for="(item, index) in msgList">
<Tips :key="item.memoId" :info="item" :show="msgList.length > 0 ? true : false"
@look="handleLook(item, index)" @close="handleClose(item, index)" />
</template>
<el-dialog :title="dialogTitle" :visible.sync="dialogFormVisible" :close-on-click-modal="false" top="5vh"
width="950px" class="dialog-h" append-to-body>
<work-form v-if="formType == 'work_diary'" ref="ref_form" @dialogCancle="
dialogFormVisible = false;
formType = '';
" />
<h-form v-if="formType == 'concern'" ref="concern_form" @dialogCancle="
dialogFormVisible = false;
formType = '';
" />
<d-form v-if="formType == 'difficulty'" ref="difficulty_form" @dialogCancle="
dialogFormVisible = false;
formType = '';
" />
</el-dialog>
</main>
</template>
<script>
import { isURL } from "@/utils/validate";
import Cookie from "js-cookie";
import Tips from "./tips.vue";
import { requestPost } from "@/js/dai/request";
import workForm from "./modules/secretaryLog/workLog/form.vue";
import dForm from "./modules/secretaryLog/difficulty/difficultyForm.vue";
import hForm from "./modules/secretaryLog/humanisticCare/careForm.vue";
export default {
components: {
Tips,
workForm,
dForm,
hForm,
},
data() {
return {
dialogTitle: "",
dialogFormVisible: false,
iframeUrl: "",
token: "",
customerId: "",
form: {},
formType: "",
formLabelWidth: "120px",
tipsList: [],
};
},
created() {
// this.$nextTick(() => {
// this.sendMessage()
// })
this.token = localStorage.getItem("token");
this.customerId = localStorage.getItem("customerId");
this.loopTips();
},
destroyed() {
this.$store.dispatch("clearInter");
},
computed: {
msgList() {
return this.$store.state.tipsList;
components: {
Tips,
workForm,
dForm,
hForm,
},
},
methods: {
toPage(path) {
if (path) {
this.$router.push({
path,
});
}
data() {
return {
dialogTitle: "",
dialogFormVisible: false,
iframeUrl: "",
token: "",
customerId: "",
form: {},
formType: "",
formLabelWidth: "120px",
tipsList: [],
};
},
changeCustomerName(customerName) {
this.$emit("changeCustomerName", customerName);
created() {
// this.$nextTick(() => {
// this.sendMessage()
// })
this.token = localStorage.getItem("token");
this.customerId = localStorage.getItem("customerId");
this.loopTips();
},
// tabs, iframe
tabIsIframe(url) {
// this.appendIframe(url)
this.iframeUrl =
url +
"?token=" +
localStorage.getItem("token") +
"&customerId=" +
localStorage.getItem("customerId");
return isURL(url);
destroyed() {
this.$store.dispatch("clearInter");
},
// tabs, tab
tabSelectedHandle(tab) {
tab = this.$store.state.contentTabs.filter(
(item) => item.name === tab.name
)[0];
this.$store.state.LevelTowMenuActiveName = tab.menuId || "";
if (tab) {
this.$router.push({
name: tab.name,
params: { ...tab.params },
query: { ...tab.query },
});
}
computed: {
msgList() {
return this.$store.state.tipsList;
},
},
// tabs, tab
tabRemoveHandle(tabName) {
if (tabName === "home") {
return false;
}
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name !== tabName
);
if (this.$store.state.contentTabs.length <= 0) {
this.$store.state.sidebarMenuActiveName =
this.$store.state.contentTabsActiveName = "home";
return false;
}
// tab
if (tabName === this.$store.state.contentTabsActiveName) {
let tab =
this.$store.state.contentTabs[
this.$store.state.contentTabs.length - 1
];
this.$router.push({
name: tab.name,
params: { ...tab.params },
query: { ...tab.query },
});
}
methods: {
toPage(path) {
if (path) {
this.$router.push({
path,
});
}
},
changeCustomerName(customerName) {
this.$emit("changeCustomerName", customerName);
},
// tabs, iframe
tabIsIframe(url) {
// this.appendIframe(url)
this.iframeUrl =
url +
"?token=" +
localStorage.getItem("token") +
"&customerId=" +
localStorage.getItem("customerId");
return isURL(url);
},
// tabs, tab
tabSelectedHandle(tab) {
tab = this.$store.state.contentTabs.filter(
(item) => item.name === tab.name
)[0];
this.$store.state.LevelTowMenuActiveName = tab.menuId || "";
if (tab) {
this.$router.push({
name: tab.name,
params: { ...tab.params },
query: { ...tab.query },
});
}
},
// tabs, tab
tabRemoveHandle(tabName) {
if (tabName === "home") {
return false;
}
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name !== tabName
);
if (this.$store.state.contentTabs.length <= 0) {
this.$store.state.sidebarMenuActiveName =
this.$store.state.contentTabsActiveName = "home";
return false;
}
// tab
if (tabName === this.$store.state.contentTabsActiveName) {
let tab =
this.$store.state.contentTabs[
this.$store.state.contentTabs.length - 1
];
this.$router.push({
name: tab.name,
params: { ...tab.params },
query: { ...tab.query },
});
}
},
// tabs,
tabsCloseOtherHandle() {
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => {
return (
item.name === "home" ||
item.name === this.$store.state.contentTabsActiveName
);
}
);
},
// tabs,
tabsCloseAllHandle() {
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name === "home"
);
this.$router.push({ name: "home" });
},
sendMessage() {
const iframe =
document.getElementsByClassName("iframes")[0].contentWindow;
iframe.postMessage({ name: "lalalal" }, "*");
},
loopTips() {
},
async closeTips(memoId) {
const url = "/governance/memoAttr/setReaded";
const params = {
memoId,
};
const { data, code, msg } = await requestPost(url, params);
if (code != 0) this.$message.error(msg);
},
async getInfo(item) {
const urls = {
work_diary: "/governance/memoWorkDiary",
concern: "/governance/memoConcern",
difficulty: "/governance/memoDifficulty/detail",
};
const params = {
id: item.memoId,
readFlag: 0,
};
const { data, code, msg } = await requestPost(urls[item.type], params);
if (code == 0) {
this.form = { ...data };
} else this.$message.error(msg);
},
handleClose(item, index) {
this.$store.state.tipsList.splice(index, 1);
this.closeTips(item.memoId);
},
async handleLook(item, index) {
const formType = {
work_diary: "ref_form",
concern: "concern_form",
difficulty: "difficulty_form",
};
this.dialogTitle = item.typeName;
// await this.getInfo(item)
this.formType = item.type;
this.dialogFormVisible = true;
this.$nextTick(() => {
this.$refs[formType[item.type]].initForm("look", item.memoId);
this.$store.state.tipsList.splice(index, 1);
this.closeTips(item.memoId);
});
},
},
// tabs,
tabsCloseOtherHandle() {
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => {
return (
item.name === "home" ||
item.name === this.$store.state.contentTabsActiveName
);
}
);
},
// tabs,
tabsCloseAllHandle() {
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name === "home"
);
this.$router.push({ name: "home" });
},
sendMessage() {
const iframe =
document.getElementsByClassName("iframes")[0].contentWindow;
iframe.postMessage({ name: "lalalal" }, "*");
},
loopTips() {
},
async closeTips(memoId) {
const url = "/governance/memoAttr/setReaded";
const params = {
memoId,
};
const { data, code, msg } = await requestPost(url, params);
if (code != 0) this.$message.error(msg);
},
async getInfo(item) {
const urls = {
work_diary: "/governance/memoWorkDiary",
concern: "/governance/memoConcern",
difficulty: "/governance/memoDifficulty/detail",
};
const params = {
id: item.memoId,
readFlag: 0,
};
const { data, code, msg } = await requestPost(urls[item.type], params);
if (code == 0) {
this.form = { ...data };
} else this.$message.error(msg);
},
handleClose(item, index) {
this.$store.state.tipsList.splice(index, 1);
this.closeTips(item.memoId);
},
async handleLook(item, index) {
const formType = {
work_diary: "ref_form",
concern: "concern_form",
difficulty: "difficulty_form",
};
this.dialogTitle = item.typeName;
// await this.getInfo(item)
this.formType = item.type;
this.dialogFormVisible = true;
this.$nextTick(() => {
this.$refs[formType[item.type]].initForm("look", item.memoId);
this.$store.state.tipsList.splice(index, 1);
this.closeTips(item.memoId);
});
},
},
};
</script>
<style lang="scss" scoped>
@import "~@/assets/scss/c/function.scss";
.aui-content {
position: relative;
// height: calc(100vh -50px) !important;
overflow: hidden;
position: relative;
// height: calc(100vh -50px) !important;
overflow: hidden;
}
</style>

706
src/views/main-navbar.vue

@ -1,91 +1,89 @@
<template>
<div>
<nav v-if="showHeader" class="aui-navbar">
<div class="aui-navbar__header">
<div class="aui-navbar__logo"><img v-if="$store.state.user.headUrl" :src="$store.state.user.headUrl" /></div>
<h1 class="aui-navbar__brand">
<a class="aui-navbar__brand-lg" href="javascript:;" style="width:fit-content;">{{ this.$store.state.user.agencyName }}</a>
<a class="aui-navbar__brand-mini" href="javascript:;">{{ this.$store.state.user.agencyName.slice(0, 2) }}</a>
</h1>
</div>
<div class="aui-navbar__body">
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
<el-menu-item v-if="false" index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true"><use xlink:href="#icon-outdent"></use></svg>
</el-menu-item>
<el-menu-item v-if="true" index="2" @click="refresh()">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-sync"></use></svg>
</el-menu-item>
</el-menu>
<el-menu class="aui-navbar__menu" mode="horizontal" style="min-width: 80px">
<el-menu-item index="3" @click="handleCLickNav">
<div class="nav-item">
<img src="~@/assets/images/main/nav-sjdb.png" />
<span>智能分析</span>
</div>
</el-menu-item>
<!-- <el-menu-item index="3" @click="$router.push({ name: 'dataBoard' })">
<div class="nav-item">
<img src="~@/assets/images/main/nav-zntb.png" />
<span>智能填报</span>
</div>
</el-menu-item> -->
<!-- <el-menu-item index="3" @click="$router.push({ name: 'dataBoard' })">
<div class="nav-item">
<img src="~@/assets/images/main/nav-sjjy.png" />
<span>数据校验</span>
</div>
</el-menu-item> -->
</el-menu>
<el-menu class="aui-navbar__menu" mode="horizontal" style="min-width: 180px">
<el-menu-item index="3" @click="toImportRecord">
<div class="img-nav">
<div class="img-wrap"><img src="~@/assets/images/main/time.png" /></div>
</div>
</el-menu-item>
<el-menu-item index="2" @click="toNoticePage">
<div class="img-nav" :class="{ 'z-on': false }">
<span class="corner-dot" v-if="unreadMsgNum > 0">{{ unreadMsgNum }}</span>
<div class="img-wrap"><img src="~@/assets/images/main/hint.png" /></div>
</div>
</el-menu-item>
<el-menu-item index="1" class="aui-navbar__avatar">
<el-dropdown placement="bottom" :show-timeout="0">
<span class="el-dropdown-link">
<img v-if="$store.state.user.gender === '2'" src="~@/assets/images/main/default-avatar.png" />
<img v-else src="~@/assets/images/main/default-avatar.png" />
<span>{{ $store.state.user.realName }}</span>
<i class="el-icon-arrow-down"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title') }}</el-dropdown-item>
<el-dropdown-item @click.native="logoutHandle()">{{ $t('logout') }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-menu-item>
</el-menu>
</div>
<!-- 弹窗, 修改密码 -->
<update-password-work v-if="updatePassowrdVisible" ref="updatePassowrd"></update-password-work>
</nav>
<nav v-else class="aui-navbar main-line"></nav>
<div class="m-newMsg" v-if="noticeList.length > 0 && displayedNoticeList">
<div class="title">新提醒</div>
<div class="btn-close" @click="displayedNoticeList = false"><img src="~@/assets/images/main/close.png" /></div>
<div class="row">
<span class="date">{{ noticeList[0].createdTime }}</span>
<i class="i-new">NEW</i>
</div>
<div class="cnt" @click="toNoticePage()">{{ noticeList[0].content }}</div>
</div>
</div>
<div>
<nav v-if="showHeader" class="aui-navbar">
<div class="aui-navbar__header">
<div class="aui-navbar__logo"><img v-if="$store.state.user.headUrl" :src="$store.state.user.headUrl" />
</div>
<h1 class="aui-navbar__brand">
<a class="aui-navbar__brand-lg" href="javascript:;" style="width:fit-content;">{{
this.$store.state.user.agencyName }}</a>
<a class="aui-navbar__brand-mini" href="javascript:;">{{ this.$store.state.user.agencyName.slice(0,
2) }}</a>
</h1>
</div>
<div class="aui-navbar__body">
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
<el-menu-item v-if="false" index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true">
<use xlink:href="#icon-outdent"></use>
</svg>
</el-menu-item>
<el-menu-item v-if="true" index="2" @click="refresh()">
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
<use xlink:href="#icon-sync"></use>
</svg>
</el-menu-item>
</el-menu>
<el-menu class="aui-navbar__menu" mode="horizontal" style="min-width: 80px">
<el-menu-item index="3" @click="handleCLickNav">
<div class="nav-item">
<img src="~@/assets/images/main/nav-sjdb.png" />
<span>智能分析</span>
</div>
</el-menu-item>
</el-menu>
<el-menu class="aui-navbar__menu" mode="horizontal" style="min-width: 180px">
<el-menu-item index="3" @click="toImportRecord">
<div class="img-nav">
<div class="img-wrap"><img src="~@/assets/images/main/time.png" /></div>
</div>
</el-menu-item>
<el-menu-item index="2" @click="toNoticePage">
<div class="img-nav" :class="{ 'z-on': false }">
<span class="corner-dot" v-if="unreadMsgNum > 0">{{ unreadMsgNum }}</span>
<div class="img-wrap"><img src="~@/assets/images/main/hint.png" /></div>
</div>
</el-menu-item>
<el-menu-item index="1" class="aui-navbar__avatar">
<el-dropdown placement="bottom" :show-timeout="0">
<span class="el-dropdown-link">
<img v-if="$store.state.user.gender === '2'"
src="~@/assets/images/main/default-avatar.png" />
<img v-else src="~@/assets/images/main/default-avatar.png" />
<span>{{ $store.state.user.realName }}</span>
<i class="el-icon-arrow-down"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title')
}}</el-dropdown-item>
<el-dropdown-item @click.native="logoutHandle()">{{ $t('logout') }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-menu-item>
</el-menu>
</div>
<!-- 弹窗, 修改密码 -->
<update-password-work v-if="updatePassowrdVisible" ref="updatePassowrd"></update-password-work>
</nav>
<nav v-else class="aui-navbar main-line"></nav>
<div class="m-newMsg" v-if="noticeList.length > 0 && displayedNoticeList">
<div class="title">新提醒</div>
<div class="btn-close" @click="displayedNoticeList = false"><img src="~@/assets/images/main/close.png" />
</div>
<div class="row">
<span class="date">{{ noticeList[0].createdTime }}</span>
<i class="i-new">NEW</i>
</div>
<div class="cnt" @click="toNoticePage()">{{ noticeList[0].content }}</div>
</div>
</div>
</template>
<script>
@ -97,177 +95,177 @@ import { requestPost, requestGet } from '@/js/dai/request';
import nextTick from 'dai-js/tools/nextTick';
export default {
inject: ['refresh'],
data() {
return {
showHeader: true,
i18nMessages: messages,
updatePassowrdVisible: false,
customerName: '',
unreadMsgNum: 0,
noticeList: [],
displayedNoticeList: true
};
},
components: {
UpdatePasswordWork
},
created() {
let platformToken = localStorage.getItem('showHeader') || '';
if (typeof platformToken !== 'undefined' && platformToken !== 'undefined' && platformToken !== '') {
this.showHeader = false;
}
this.changeCustomerName();
this.pollGetNoticeData();
},
computed: {
userType() {
return localStorage.getItem('userType');
}
},
methods: {
async readClearOne(item) {
const url = `/message/intelligentMessage/msg/clearOne/?msgId=${item.id}`;
const { data, code, msg } = await requestPost(url);
if (code == 0) {
} else if (code >= 8000) {
this.$message.error(msg);
}
},
toNoticePage() {
this.displayedNoticeList = false;
this.readClearOne(this.noticeList[0]);
this.$router.replace('/main/home-notice');
},
toImportRecord() {
this.$router.replace('/main/importRecord-index');
},
toIndexPage() {
this.$router.replace('/index');
},
// menuId()
gotoRouteHandle(menuId, idx) {
var route = window.SITE_CONFIG['dynamicMenuRoutes'].filter(item => item.meta.menuId === menuId)[0];
if (route) {
if (route.meta.iframeURL.endsWith('【跳转新页面】')) {
return window.open(route.meta.iframeURL.slice(0, -7));
} else {
this.$router.push({ name: route.name });
}
}
this.$store.state.LevelOneMenuActiveName = menuId;
this.$store.state.sidebarActiveSubMenuList = this.$store.state.sidebarMenuList[idx].children || [];
},
changeCustomerName(customerName) {
this.customerName = localStorage.getItem('customerName') || '党建引领基层治理互联管理平台';
},
//
fullscreenHandle() {
if (!screenfull.enabled) {
return this.$message({
message: this.$t('fullscreen.prompt'),
type: 'warning',
duration: 500
});
}
screenfull.toggle();
},
//
updatePasswordHandle() {
this.updatePassowrdVisible = true;
this.$nextTick(() => {
this.$refs.updatePassowrd.init();
});
},
// 退
logoutHandle() {
this.$confirm(this.$t('prompt.info', { handle: this.$t('logout') }), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning'
})
.then(() => {
//
// tabs,
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name === 'home');
this.$http
.post('/auth/login/logout')
.then(({ data: res }) => {
if (res.code !== 0) {
// 退
if (res.code !== 10007) {
this.$message.error(res.msg);
}
}
clearLoginInfo();
this.$router.push({ name: 'login' });
// if (localStorage.getItem('userType') === 'work') {
// this.$router.push({ name: 'loginWork' })
// } else {
// this.$router.push({ name: 'login' })
// }
})
.catch(() => {});
})
.catch(() => {});
},
async pollGetNoticeData() {
this.getNoticeData();
await nextTick(60000);
this.pollGetNoticeData();
},
//
async getNoticeData() {
const url = '/message/intelligentMessage/msg/notice';
const { data, code, msg } = await requestGet(url, {});
if (code === 0) {
if (data.unreadNum > 0 && this.unreadMsgNum < data.unreadNum) {
this.getNoticeList();
this.displayedNoticeList = true;
setTimeout(() => {
this.displayedNoticeList = false;
}, 5000);
}
this.unreadMsgNum = data.unreadNum;
} else {
}
},
//
async getNoticeList() {
const url = '/message/intelligentMessage/page';
let params = {
page: this.pageNo,
limit: this.pageSize,
readFlag: 0
};
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
this.noticeList = data.list;
} else {
this.$message.error(msg);
}
},
handleCLickNav() {
let routeData = this.$router.resolve({
name: 'dataBoard'
});
// window.open(this.$router.push({ name: 'dataBoard' }))
window.open(routeData.href, '_blank');
}
}
inject: ['refresh'],
data() {
return {
showHeader: true,
i18nMessages: messages,
updatePassowrdVisible: false,
customerName: '',
unreadMsgNum: 0,
noticeList: [],
displayedNoticeList: true
};
},
components: {
UpdatePasswordWork
},
created() {
let platformToken = localStorage.getItem('showHeader') || '';
if (typeof platformToken !== 'undefined' && platformToken !== 'undefined' && platformToken !== '') {
this.showHeader = false;
}
this.changeCustomerName();
this.pollGetNoticeData();
},
computed: {
userType() {
return localStorage.getItem('userType');
}
},
methods: {
async readClearOne(item) {
const url = `/message/intelligentMessage/msg/clearOne/?msgId=${item.id}`;
const { data, code, msg } = await requestPost(url);
if (code == 0) {
} else if (code >= 8000) {
this.$message.error(msg);
}
},
toNoticePage() {
this.displayedNoticeList = false;
this.readClearOne(this.noticeList[0]);
this.$router.replace('/main/home-notice');
},
toImportRecord() {
this.$router.replace('/main/importRecord-index');
},
toIndexPage() {
this.$router.replace('/index');
},
// menuId()
gotoRouteHandle(menuId, idx) {
var route = window.SITE_CONFIG['dynamicMenuRoutes'].filter(item => item.meta.menuId === menuId)[0];
if (route) {
if (route.meta.iframeURL.endsWith('【跳转新页面】')) {
return window.open(route.meta.iframeURL.slice(0, -7));
} else {
this.$router.push({ name: route.name });
}
}
this.$store.state.LevelOneMenuActiveName = menuId;
this.$store.state.sidebarActiveSubMenuList = this.$store.state.sidebarMenuList[idx].children || [];
},
changeCustomerName(customerName) {
this.customerName = localStorage.getItem('customerName') || '党建引领基层治理互联管理平台';
},
//
fullscreenHandle() {
if (!screenfull.enabled) {
return this.$message({
message: this.$t('fullscreen.prompt'),
type: 'warning',
duration: 500
});
}
screenfull.toggle();
},
//
updatePasswordHandle() {
this.updatePassowrdVisible = true;
this.$nextTick(() => {
this.$refs.updatePassowrd.init();
});
},
// 退
logoutHandle() {
this.$confirm(this.$t('prompt.info', { handle: this.$t('logout') }), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'),
type: 'warning'
})
.then(() => {
//
// tabs,
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name === 'home');
this.$http
.post('/auth/login/logout')
.then(({ data: res }) => {
if (res.code !== 0) {
// 退
if (res.code !== 10007) {
this.$message.error(res.msg);
}
}
clearLoginInfo();
this.$router.push({ name: 'login' });
// if (localStorage.getItem('userType') === 'work') {
// this.$router.push({ name: 'loginWork' })
// } else {
// this.$router.push({ name: 'login' })
// }
})
.catch(() => { });
})
.catch(() => { });
},
async pollGetNoticeData() {
this.getNoticeData();
await nextTick(60000);
this.pollGetNoticeData();
},
//
async getNoticeData() {
const url = '/message/intelligentMessage/msg/notice';
const { data, code, msg } = await requestGet(url, {});
if (code === 0) {
if (data.unreadNum > 0 && this.unreadMsgNum < data.unreadNum) {
this.getNoticeList();
this.displayedNoticeList = true;
setTimeout(() => {
this.displayedNoticeList = false;
}, 5000);
}
this.unreadMsgNum = data.unreadNum;
} else {
}
},
//
async getNoticeList() {
const url = '/message/intelligentMessage/page';
let params = {
page: this.pageNo,
limit: this.pageSize,
readFlag: 0
};
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
this.noticeList = data.list;
} else {
this.$message.error(msg);
}
},
handleCLickNav() {
let routeData = this.$router.resolve({
name: 'dataBoard'
});
// window.open(this.$router.push({ name: 'dataBoard' }))
window.open(routeData.href, '_blank');
}
}
};
</script>
@ -275,102 +273,110 @@ export default {
@import '~@/assets/scss/c/function.scss';
.main-line {
height: 50px;
background: #eeeeee;
height: 50px;
background: #eeeeee;
}
.img-nav {
position: relative;
.corner-dot {
position: absolute;
z-index: 100;
display: block;
top: -5px;
right: 2px;
padding: 0 3px;
min-width: 16px;
height: 16px;
line-height: 16px;
transform: translateX(50%);
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
background: #ff4d4f;
border-radius: 8px;
border: 1px solid #ffffff;
text-align: center;
}
position: relative;
.corner-dot {
position: absolute;
z-index: 100;
display: block;
top: -5px;
right: 2px;
padding: 0 3px;
min-width: 16px;
height: 16px;
line-height: 16px;
transform: translateX(50%);
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
background: #ff4d4f;
border-radius: 8px;
border: 1px solid #ffffff;
text-align: center;
}
}
.m-newMsg {
position: fixed;
z-index: 2000;
right: 30px;
box-sizing: border-box;
padding: 16px;
width: 320px;
background: #ffffff;
box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 3px 6px -4px rgba(0, 0, 0, 0.12);
border-radius: 4px;
.title {
margin-bottom: 16px;
height: 22px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 22px;
}
.btn-close {
position: absolute;
top: 15px;
right: 10px;
padding: 6px;
img {
width: 16px;
}
}
.row {
display: flex;
align-items: center;
}
.date {
height: 17px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.45);
line-height: 17px;
}
.i-new {
margin-left: 8px;
width: 40px;
height: 16px;
background: #eb512f;
border-radius: 2px;
font-size: 12px;
font-family: Arial-BoldItalicMT, Arial;
font-weight: normal;
color: #ffffff;
line-height: 16px;
text-align: center;
}
.cnt {
@include toeM(2);
margin-top: 3px;
padding-bottom: 0;
width: 288px;
height: 44px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
line-height: 22px;
cursor: pointer;
&:hover {
color: #0056d6 !important;
}
}
position: fixed;
z-index: 2000;
right: 30px;
box-sizing: border-box;
padding: 16px;
width: 320px;
background: #ffffff;
box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 3px 6px -4px rgba(0, 0, 0, 0.12);
border-radius: 4px;
.title {
margin-bottom: 16px;
height: 22px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 22px;
}
.btn-close {
position: absolute;
top: 15px;
right: 10px;
padding: 6px;
img {
width: 16px;
}
}
.row {
display: flex;
align-items: center;
}
.date {
height: 17px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.45);
line-height: 17px;
}
.i-new {
margin-left: 8px;
width: 40px;
height: 16px;
background: #eb512f;
border-radius: 2px;
font-size: 12px;
font-family: Arial-BoldItalicMT, Arial;
font-weight: normal;
color: #ffffff;
line-height: 16px;
text-align: center;
}
.cnt {
@include toeM(2);
margin-top: 3px;
padding-bottom: 0;
width: 288px;
height: 44px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
line-height: 22px;
cursor: pointer;
&:hover {
color: #0056d6 !important;
}
}
}
</style>

141
src/views/main-sidebar-sub-menu.vue

@ -8,95 +8,84 @@
*
-->
<template>
<div v-if="menu.showFlag">
<el-submenu
v-show="menu.showFlag == 1"
v-if="menu.children && menu.children.length >= 1"
:index="menu.id"
ref="subMenu"
popper-append-to-body
>
<template slot="title">
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true">
<use :xlink:href="`#${menu.icon}`" />
</svg>
<span :title="menu.name">{{ menu.name }}</span>
</template>
<sub-menu
:root="false"
v-show="item.showFlag == 1"
v-for="item in menu.children"
:key="item.id"
:menu="item"
></sub-menu>
</el-submenu>
<el-menu-item
:class="{ 'activeTow': menu.id == $store.state.LevelTowMenuActiveName }"
v-else
:index="menu.id"
@click="gotoRouteHandle(menu.id)"
>
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true">
<use :xlink:href="`#${menu.icon}`" />
</svg>
<span :title="menu.name">{{ menu.name }}</span>
</el-menu-item>
</div>
<div v-if="menu.showFlag">
<el-submenu v-show="menu.showFlag == 1" v-if="menu.children && menu.children.length >= 1" :index="menu.id"
ref="subMenu" popper-append-to-body>
<template slot="title">
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true">
<use :xlink:href="`#${menu.icon}`" />
</svg>
<span :title="menu.name">{{ menu.name }}</span>
</template>
<sub-menu :root="false" v-show="item.showFlag == 1" v-for="item in menu.children" :key="item.id"
:menu="item"></sub-menu>
</el-submenu>
<el-menu-item :class="{ 'activeTow': menu.id == $store.state.LevelTowMenuActiveName }" v-else :index="menu.id"
@click="gotoRouteHandle(menu.id)">
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true">
<use :xlink:href="`#${menu.icon}`" />
</svg>
<span :title="menu.name">{{ menu.name }}</span>
</el-menu-item>
</div>
</template>
<script>
import SubMenu from "./main-sidebar-sub-menu";
export default {
name: "sub-menu",
props: {
menu: {
type: Object,
required: true,
name: "sub-menu",
props: {
menu: {
type: Object,
required: true,
},
root: {
type: Boolean,
default: true,
},
},
root: {
type: Boolean,
default: true,
components: {
SubMenu,
},
},
components: {
SubMenu,
},
methods: {
// menuId()
gotoRouteHandle(menuId) {
var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
(item) => item.meta.menuId === menuId
)[0];
if (route) {
if (route.name === this.$router.currentRoute.name) {
return;
}
if (route.meta.iframeURL.endsWith("【跳转新页面】")) {
window.open(route.meta.iframeURL.slice(0, -7));
} else {
this.$router.push({ name: route.name });
}
}
this.$store.state.LevelTowMenuActiveName = menuId
methods: {
// menuId()
gotoRouteHandle(menuId) {
var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
(item) => item.meta.menuId === menuId
)[0];
if (route) {
if (route.name === this.$router.currentRoute.name) {
return;
}
if (route.meta.iframeURL.endsWith("【跳转新页面】")) {
window.open(route.meta.iframeURL.slice(0, -7));
} else {
this.$router.push({ name: route.name });
}
}
this.$store.state.LevelTowMenuActiveName = menuId
},
},
},
};
</script>
<style lang="scss" scoped>
@import "~@/assets/scss/c/function.scss";
/deep/ .el-menu-item {
@include toe;
@include toe;
}
.activeTow{
background-color: #ecf4fe;
.activeTow {
background-color: #ecf4fe;
}
.activeTow::after{
display: inline-block;
content: '';
background-color: #0056d6;
width: 2px;
height: 48px;
position: absolute;
right: 3px;
top: 0;
.activeTow::after {
display: inline-block;
content: '';
background-color: #0056d6;
width: 2px;
height: 48px;
position: absolute;
right: 3px;
top: 0;
}
</style>

365
src/views/main-sidebar.vue

@ -1,234 +1,187 @@
<template>
<div>
<aside :class="['aui-sidebar', 'g-sd']">
<div class="m-nav">
<div class="nav">
<div class="nav-item" @click="toIndexPage" v-if="false">
<span>全部菜单</span>
</div>
<div
class="nav-item"
:class="{ 'z-on': $store.state.LevelOneMenuActiveName == '' }"
@click="toIndexPage"
>
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true">
<use xlink:href="#icon-desktop" />
</svg>
<span>首页</span>
</div>
<div
class="nav-item"
:class="{ 'z-on': menu.id == $store.state.LevelOneMenuActiveName }"
v-show="menu.showFlag == 1"
v-for="(menu, idx) in $store.state.sidebarMenuList"
:key="menu.id"
@click="gotoRouteHandle(menu.id, idx)"
>
<svg
v-if="menu.icon"
class="icon-svg aui-sidebar__menu-icon"
aria-hidden="true"
>
<use :xlink:href="`#${menu.icon}`" />
</svg>
<span>{{ menu.name }}</span>
</div>
<!-- <div class="nav-div"></div> -->
<!-- <div class="nav-item" @click="$router.push({ name: 'dataBoard' })">
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true">
<use xlink:href="#icon-stock" />
</svg>
<span>可视化</span>
</div> -->
<!-- <div class="nav-item" @click="$router.push({ name: 'main-shuju' })">
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true">
<use xlink:href="#icon-stock" />
</svg>
<span>可视化旧</span>
</div> -->
</div>
</div>
<div
class="m-folder"
v-show="$store.state.sidebarActiveSubMenuList.length != 0"
@click="$store.state.sidebarFold = !$store.state.sidebarFold"
>
<img
v-show="!$store.state.sidebarFold"
class="z-normal"
src="~@/assets/images/main/fold.png"
/>
<img
v-show="!$store.state.sidebarFold"
class="z-on"
src="~@/assets/images/main/fold-on.png"
/>
<img
v-show="$store.state.sidebarFold"
class="z-normal"
src="~@/assets/images/main/unfold.png"
/>
<img
v-show="$store.state.sidebarFold"
class="z-on"
src="~@/assets/images/main/unfold-on.png"
/>
</div>
<div
class="aui-sidebar_wrap"
v-show="$store.state.sidebarActiveSubMenuList.length != 0"
>
<div class="aui-sidebar__inner">
<el-menu
:default-active="$store.state.sidebarMenuActiveName"
:collapse="$store.state.sidebarFold"
:unique-opened="true"
:collapseTransition="false"
class="aui-sidebar__menu"
>
<sub-menu
v-for="menu in $store.state.sidebarActiveSubMenuList"
:key="menu.id"
:menu="menu"
/>
</el-menu>
</div>
</div>
</aside>
</div>
<div>
<aside :class="['aui-sidebar', 'g-sd']">
<div class="m-nav">
<div class="nav">
<div class="nav-item" @click="toIndexPage" v-if="false">
<span>全部菜单</span>
</div>
<div class="nav-item" :class="{ 'z-on': menu.id == $store.state.LevelOneMenuActiveName }"
v-show="menu.showFlag == 1" v-for="(menu, idx) in $store.state.sidebarMenuList" :key="menu.id"
@click="gotoRouteHandle(menu.id, idx)">
<svg v-if="menu.icon" class="icon-svg aui-sidebar__menu-icon" aria-hidden="true">
<use :xlink:href="`#${menu.icon}`" />
</svg>
<span>{{ menu.name }}</span>
</div>
</div>
</div>
<div class="m-folder" v-show="$store.state.sidebarActiveSubMenuList.length != 0"
@click="$store.state.sidebarFold = !$store.state.sidebarFold">
<img v-show="!$store.state.sidebarFold" class="z-normal" src="~@/assets/images/main/fold.png" />
<img v-show="!$store.state.sidebarFold" class="z-on" src="~@/assets/images/main/fold-on.png" />
<img v-show="$store.state.sidebarFold" class="z-normal" src="~@/assets/images/main/unfold.png" />
<img v-show="$store.state.sidebarFold" class="z-on" src="~@/assets/images/main/unfold-on.png" />
</div>
<div class="aui-sidebar_wrap" v-show="$store.state.sidebarActiveSubMenuList.length != 0">
<div class="aui-sidebar__inner">
<el-menu :default-active="$store.state.sidebarMenuActiveName" :collapse="$store.state.sidebarFold"
:unique-opened="true" :collapseTransition="false" class="aui-sidebar__menu">
<sub-menu v-for="menu in $store.state.sidebarActiveSubMenuList" :key="menu.id" :menu="menu" />
</el-menu>
</div>
</div>
</aside>
</div>
</template>
<script>
import SubMenu from "./main-sidebar-sub-menu";
export default {
data() {
return {};
},
components: {
SubMenu,
},
computed: {
userType() {
return localStorage.getItem("userType");
data() {
return {};
},
},
created() {
this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"];
},
methods: {
toIndexPage() {
this.$router.push({ name: "home" });
// this.$router.replace("/index");
components: {
SubMenu,
},
// menuId()
gotoRouteHandle(menuId, idx) {
var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
(item) => item.meta.menuId === menuId
)[0];
if (route) {
if (route.meta.iframeURL.endsWith("【跳转新页面】")) {
return window.open(route.meta.iframeURL.slice(0, -7));
} else {
this.$router.push({ name: route.name });
}
}
this.$store.state.sidebarMenuList[idx].children || [];
const { sidebarMenuList } = this.$store.state;
const firstChild = sidebarMenuList[idx].children[0];
const id = firstChild.children.length === 0 ? firstChild.id : firstChild.children[0].id;
this.$store.state.LevelTowMenuActiveName = id;
computed: {
userType() {
return localStorage.getItem("userType");
},
},
created() {
this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"];
},
methods: {
toIndexPage() {
this.$router.push({ name: "home" });
// this.$router.replace("/index");
},
// menuId()
gotoRouteHandle(menuId, idx) {
var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
(item) => item.meta.menuId === menuId
)[0];
if (route) {
if (route.meta.iframeURL.endsWith("【跳转新页面】")) {
return window.open(route.meta.iframeURL.slice(0, -7));
} else {
this.$router.push({ name: route.name });
}
}
this.$store.state.sidebarMenuList[idx].children || [];
const { sidebarMenuList } = this.$store.state;
const firstChild = sidebarMenuList[idx].children[0];
const id = firstChild.children.length === 0 ? firstChild.id : firstChild.children[0].id;
this.$store.state.LevelTowMenuActiveName = id;
},
},
},
};
</script>
<style lang="scss" scoped>
@import "~@/assets/scss/c/function.scss";
.el-menu--collapse .el-submenu__title span,
.el-menu--collapse .el-menu-item span {
display: none;
display: none;
}
.g-sd {
display: flex;
display: flex;
}
/deep/ .m-folder {
position: absolute;
z-index: 100;
top: 50px;
right: -16px;
width: 32px;
height: 32px;
background: #ffffff;
box-shadow: 0px 5px 12px 4px rgba(0, 0, 0, 0.09),
0px 3px 6px 0px rgba(0, 0, 0, 0.12), 0px 1px 2px -2px rgba(0, 0, 0, 0.16);
line-height: 32px;
font-size: 18px;
text-align: center;
color: #666;
border-radius: 100%;
overflow: hidden;
cursor: pointer;
&:hover {
position: absolute;
z-index: 100;
top: 50px;
right: -16px;
width: 32px;
height: 32px;
background: #ffffff;
box-shadow: 0px 5px 12px 4px rgba(0, 0, 0, 0.09),
0px 3px 6px 0px rgba(0, 0, 0, 0.12), 0px 1px 2px -2px rgba(0, 0, 0, 0.16);
line-height: 32px;
font-size: 18px;
text-align: center;
color: #666;
border-radius: 100%;
overflow: hidden;
cursor: pointer;
&:hover {
.z-on {
display: block;
}
.z-normal {
display: none;
}
}
.z-on {
display: block;
display: none;
}
.z-normal {
display: none;
display: block;
}
img {
position: absolute;
display: block;
width: 16px;
height: 16px;
@include hub;
}
}
.z-on {
display: none;
}
.z-normal {
display: block;
}
img {
position: absolute;
display: block;
width: 16px;
height: 16px;
@include hub;
}
}
/deep/ .m-nav {
box-sizing: border-box;
padding: 25px 0;
flex-shrink: 0;
width: 64px;
height: 100%;
background: #0056d6;
overflow-y: auto;
&::-webkit-scrollbar {
width: 1px;
}
.nav {
color: rgba(#ffffff, 0.85);
.nav-div {
margin: 20px auto;
width: 28px;
height: 1px;
background: #ffffff;
border-radius: 1px;
opacity: 0.45;
box-sizing: border-box;
padding: 25px 0;
flex-shrink: 0;
width: 64px;
height: 100%;
background: #0056d6;
overflow-y: auto;
&::-webkit-scrollbar {
width: 1px;
}
.nav-item {
font-size: 13px;
text-align: center;
padding: 11px 0 9px 0;
cursor: pointer;
.icon-svg {
margin: 0 auto;
font-size: 24px;
width: 20px !important;
}
span {
display: block;
line-height: 30px;
}
&:hover,
&.z-on {
background-color: rgba(#000, 0.1);
color: rgba(#ffffff, 1);
}
.nav {
color: rgba(#ffffff, 0.85);
.nav-div {
margin: 20px auto;
width: 28px;
height: 1px;
background: #ffffff;
border-radius: 1px;
opacity: 0.45;
}
.nav-item {
font-size: 13px;
text-align: center;
padding: 11px 0 9px 0;
cursor: pointer;
.icon-svg {
margin: 0 auto;
font-size: 24px;
width: 20px !important;
}
span {
display: block;
line-height: 30px;
}
&:hover,
&.z-on {
background-color: rgba(#000, 0.1);
color: rgba(#ffffff, 1);
}
}
}
}
}
</style>

298
src/views/main.vue

@ -1,32 +1,24 @@
<template>
<div
v-loading.fullscreen.lock="loading"
:element-loading-text="$t('loading')"
:class="[
'aui-wrapper',
{
'aui-sidebar--fold':
$store.state.sidebarActiveSubMenuList.length == 0 ||
$store.state.sidebarFold,
},
{
'aui-sidebar--noside': $store.state.inIframe,
},
{ 'z-iframe': $store.state.inIframe },
]"
>
<template v-if="!loading">
<main-navbar ref="ref_navbar" v-if="!$store.state.inIframe" />
<main-sidebar v-if="!$store.state.inIframe" />
<div class="aui-content__wrapper">
<main-content
v-if="!$store.state.contentIsNeedRefresh"
@changeCustomerName="changeCustomerName"
/>
</div>
<!-- <secretary-log-notice v-if="!$store.state.inIframe" /> -->
</template>
</div>
<div v-loading.fullscreen.lock="loading" :element-loading-text="$t('loading')" :class="[
'aui-wrapper',
{
'aui-sidebar--fold':
$store.state.sidebarActiveSubMenuList.length == 0 ||
$store.state.sidebarFold,
},
{
'aui-sidebar--noside': $store.state.inIframe,
},
{ 'z-iframe': $store.state.inIframe },
]">
<template v-if="!loading">
<main-navbar ref="ref_navbar" v-if="!$store.state.inIframe" />
<main-sidebar v-if="!$store.state.inIframe" />
<div class="aui-content__wrapper">
<main-content v-if="!$store.state.contentIsNeedRefresh" @changeCustomerName="changeCustomerName" />
</div>
</template>
</div>
</template>
<script>
import MainNavbar from "./main-navbar";
@ -34,137 +26,131 @@ import MainSidebar from "./main-sidebar";
import MainContent from "./main-content";
import SecretaryLogNotice from "./modules/secretaryLog/cpts/notice";
import debounce from "lodash/debounce";
import { mapGetters } from "vuex";
import nextTick from "dai-js/tools/nextTick";
import { requestPost } from "@/js/dai/request";
import { clearLoginInfo } from "@/utils";
export default {
provide() {
return {
//
refresh() {
this.$store.state.contentIsNeedRefresh = true;
this.$nextTick(() => {
this.$store.state.contentIsNeedRefresh = false;
});
},
};
},
data() {
return {
loading: true,
userType: localStorage.getItem("userType"),
};
},
components: {
MainNavbar,
MainSidebar,
MainContent,
SecretaryLogNotice,
},
watch: {
$route: "routeHandle",
},
async created() {
this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"];
// this.windowResizeHandle();
this.routeHandle(this.$route);
Promise.all([this.getWorkUserInfo()]).then(() => {
this.loading = false;
});
},
computed: {},
methods: {
changeCustomerName(customerName) {
this.$refs["ref_navbar"].changeCustomerName(customerName);
},
//
windowResizeHandle() {
this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false;
window.addEventListener(
"resize",
debounce(() => {
this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false;
}, 150)
);
},
// ,
routeHandle(route) {
if (!route.meta.isTab) {
return false;
}
var tab = this.$store.state.contentTabs.filter(
(item) => item.name === route.name
)[0];
if (!tab) {
tab = {
...window.SITE_CONFIG["contentTabDefault"],
...route.meta,
name: route.name,
params: { ...route.params },
query: { ...route.query },
};
this.$store.state.contentTabs =
this.$store.state.contentTabs.concat(tab);
}
this.$store.state.sidebarMenuActiveName = tab.menuId;
this.$store.state.contentTabsActiveName = tab.name;
this.syncLevelOneMenuActive(tab.menuId);
},
async syncLevelOneMenuActive(menuId) {
await nextTick();
console.log(
"*******************************",
menuId,
this.$store.state.sidebarMenuList
);
const fn = (item) => {
if (item.id == menuId) {
return true;
} else if (item.children.length > 0) {
return item.children.findIndex(fn) !== -1;
} else {
return false;
}
};
let idx = this.$store.state.sidebarMenuList.findIndex(fn);
this.$store.state.LevelOneMenuActiveName =
idx !== -1 ? this.$store.state.sidebarMenuList[idx].id : "";
this.$store.state.sidebarActiveSubMenuList =
idx !== -1
? this.$store.state.sidebarMenuList[idx].children
: [];
},
//
async getWorkUserInfo() {
const url = "/epmetuser/customerstaff/staffbasicinfo";
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
if (data) {
this.$store.state.user = { ...data };
console.log("user---hahha", this.$store.state.user);
localStorage.setItem("roleList", data.roleList);
localStorage.setItem("customerId", data.customerId);
localStorage.setItem("staffId", data.id);
localStorage.setItem("agencyId", data.agencyId);
localStorage.setItem("level", data.level);
if (!localStorage.getItem("customerName")) {
localStorage.setItem(
"customerName",
data.agencyName || ""
);
}
} else {
clearLoginInfo();
this.$router.push({ name: "login" });
}
} else {
this.$message.error(msg);
}
},
},
provide() {
return {
//
refresh() {
this.$store.state.contentIsNeedRefresh = true;
this.$nextTick(() => {
this.$store.state.contentIsNeedRefresh = false;
});
},
};
},
data() {
return {
loading: true,
userType: localStorage.getItem("userType"),
};
},
components: {
MainNavbar,
MainSidebar,
MainContent,
SecretaryLogNotice,
},
watch: {
$route: "routeHandle",
},
async created() {
this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"];
// this.windowResizeHandle();
this.routeHandle(this.$route);
Promise.all([this.getWorkUserInfo()]).then(() => {
this.loading = false;
});
},
computed: {},
methods: {
changeCustomerName(customerName) {
this.$refs["ref_navbar"].changeCustomerName(customerName);
},
//
windowResizeHandle() {
this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false;
window.addEventListener(
"resize",
debounce(() => {
this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false;
}, 150)
);
},
// ,
routeHandle(route) {
if (!route.meta.isTab) {
return false;
}
var tab = this.$store.state.contentTabs.filter(
(item) => item.name === route.name
)[0];
if (!tab) {
tab = {
...window.SITE_CONFIG["contentTabDefault"],
...route.meta,
name: route.name,
params: { ...route.params },
query: { ...route.query },
};
this.$store.state.contentTabs =
this.$store.state.contentTabs.concat(tab);
}
this.$store.state.sidebarMenuActiveName = tab.menuId;
this.$store.state.contentTabsActiveName = tab.name;
this.syncLevelOneMenuActive(tab.menuId);
},
async syncLevelOneMenuActive(menuId) {
await nextTick();
const fn = (item) => {
if (item.id == menuId) {
return true;
} else if (item.children.length > 0) {
return item.children.findIndex(fn) !== -1;
} else {
return false;
}
};
let idx = this.$store.state.sidebarMenuList.findIndex(fn);
this.$store.state.LevelOneMenuActiveName =
idx !== -1 ? this.$store.state.sidebarMenuList[idx].id : "";
this.$store.state.sidebarActiveSubMenuList =
idx !== -1
? this.$store.state.sidebarMenuList[idx].children
: [];
},
//
async getWorkUserInfo() {
const url = "/epmetuser/customerstaff/staffbasicinfo";
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
if (data) {
this.$store.state.user = { ...data };
console.log("user---hahha", this.$store.state.user);
localStorage.setItem("roleList", data.roleList);
localStorage.setItem("customerId", data.customerId);
localStorage.setItem("staffId", data.id);
localStorage.setItem("agencyId", data.agencyId);
localStorage.setItem("level", data.level);
if (!localStorage.getItem("customerName")) {
localStorage.setItem(
"customerName",
data.agencyName || ""
);
}
} else {
clearLoginInfo();
this.$router.push({ name: "login" });
}
} else {
this.$message.error(msg);
}
},
},
};
</script>

738
src/views/modules/home/notice.vue

@ -1,385 +1,387 @@
<template>
<div>
<div class="m-tx">
<div class="wrap">
<div class="header">
<div class="title">全部提醒</div>
<div class="btn-clear" @click="read">
<img src="~@/assets/images/main/clear.png" />
全部标记已读
</div>
</div>
<div class="cnt" v-if="noticeData.length > 0">
<div
@click="handleClickNotice(item, index)"
:class="{ 'z-readed': item.readFlag == 1 }"
class="item"
:key="'notice' + item.targetId + index"
v-for="(item, index) in noticeData"
>
<i class="i-tag" v-if="item.readFlag == 1">已读</i>
<i class="i-tag" v-else>未读</i>
<div class="item-title">
{{ item.content }}
</div>
<div
v-if="item.readFlag != 1"
@click.stop="readClearOne(item)"
class="item-btn-clear"
>
<img src="~@/assets/images/main/clear.png" />
标记已读
</div>
<div class="item-date">{{ item.createdTime }}</div>
</div>
</div>
<div class="cnt" v-else>
<div class="empty">
<img
src="~@/assets/images/shuju/renfang/index/empty.png"
/>
<span>暂无提醒</span>
</div>
</div>
<div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
</div>
</div>
<fastcall ref="fastcall" />
</div>
<div>
<div class="m-tx">
<div class="wrap">
<div class="header">
<div class="title">全部提醒</div>
<div class="btn-clear" @click="read">
<img src="~@/assets/images/main/clear.png" />
全部标记已读
</div>
</div>
<div class="cnt" v-if="noticeData.length > 0">
<div @click="handleClickNotice(item, index)" :class="{ 'z-readed': item.readFlag == 1 }"
class="item" :key="'notice' + item.targetId + index" v-for="(item, index) in noticeData">
<i class="i-tag" v-if="item.readFlag == 1">已读</i>
<i class="i-tag" v-else>未读</i>
<div class="item-title">
{{ item.content }}
</div>
<div v-if="item.readFlag != 1" @click.stop="readClearOne(item)" class="item-btn-clear">
<img src="~@/assets/images/main/clear.png" />
标记已读
</div>
<div class="item-date">{{ item.createdTime }}</div>
</div>
</div>
<div class="cnt" v-else>
<div class="empty">
<img src="~@/assets/images/shuju/renfang/index/empty.png" />
<span>暂无提醒</span>
</div>
</div>
<div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="pageNo" :page-sizes="[20, 50, 100, 200]" :page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total" :total="total">
</el-pagination>
</div>
</div>
</div>
<fastcall ref="fastcall" />
</div>
</template>
<script>
import { requestGet, requestPost } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import fastcall from "@/views/modules/cpts/fastcall";
export default {
components: { fastcall },
data() {
return {
type: "all",
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
noticeData: [],
};
},
computed: {},
watch: {},
activated() {
this.getList();
},
methods: {
// handleClickNotice(item, index) {
// // this.readClearOne(item);
// if (item.msgType == "community_house") {
// let { agencyId, gridId, gridName, houseId, houseName, targetId } = item
// this.$store.dispatch('saveDataH', { agencyId, gridId, gridName, houseId: targetId, houseName: '' });
// this.$router.push({ name: 'house-huaxiang' });
// this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => {
// if (item.name === "house-huaxiang") {
// return { ...item, title: '' };
// }
// return item;
// });
// } else if (item.msgType == "resident_base_info") {
// let {
// agencyId,
// gridId,
// gridName,
// gender,
// homeId,
// homeName,
// name,
// targetId,
// deptName
// } = item;
// this.$store.dispatch("saveData", {
// agencyId,
// gridId,
// gridName,
// gender,
// homeId,
// homeName,
// name: '',
// resiId: targetId,
// });
// this.$router.push({ name: "jumin-huaxiang" });
// this.$store.state.contentTabs = this.$store.state.contentTabs.map(
// (item) => {
// if (item.name === "jumin-huaxiang") {
// return { ...item, title: name };
// }
// return item;
// }
// );
// }
// },
handleClickNotice(item) {
this.readClearOne(item);
if (item.msgType == "community_house") {
let { agencyId, gridId, gridName, houseId, houseName, targetId } = item
this.$store.dispatch('saveDataH', { agencyId, gridId, gridName, houseId: targetId, houseName: '房屋详情' });
this.$router.push({ name: 'house-huaxiang' });
this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => {
if (item.name === "house-huaxiang") {
return { ...item, title: '房屋信息' };
}
return item;
});
} else if (item.msgType == "resident_base_info") {
let {
agencyId,
gridId,
gridName,
gender,
homeId,
homeName,
name,
targetId,
deptName
} = item;
this.$store.dispatch("saveData", {
agencyId,
gridId,
gridName,
gender,
homeId,
homeName,
name: '居民详情',
resiId: targetId,
});
this.$router.push({ name: "jumin-huaxiang" });
this.$store.state.contentTabs = this.$store.state.contentTabs.map(
(item) => {
if (item.name === "jumin-huaxiang") {
return { ...item, title: name };
}
return item;
}
);
} else if (item.msgType == "resident_category") {
this.$router.push({
name: "base-resi",
query: {
category: item.category || null,
},
});
} else if(item.msgType == "sys_version_upgrade_publish"){
let { targetId } = item
this.$router.push({ path: `notice-version`, query: { version_id: targetId } });
this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => {
if (item.name === "notice-version") {
return { ...item };
}
return item;
});
}
},
async read(item, index) {
if (item && item.readFlag == 1) return;
const url = "/message/intelligentMessage/msg/clear";
let params = {};
if (item.id) {
params.id = item.id;
url += "?id=" + item.id;
}
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
console.log("消息已读");
this.getList();
} else {
this.$message.error(msg);
}
},
async readClearOne(item) {
console.log("item", item)
const url = `/message/intelligentMessage/msg/clearOne/?msgId=${item.id}`
const { data, code, msg } = await requestPost(url)
if (code == 0) {
this.getList()
} else if (code >= 8000) {
this.$message.error(msg)
}
},
handleClickTab(type) {
console.log(type);
this.getList();
},
handleSizeChange(val) {
this.pageSize = val;
localStorage.setItem("pageSize", val);
this.getList();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getList();
},
//
async getList() {
const url = "/message/intelligentMessage/page";
let params = {
page: this.pageNo,
limit: this.pageSize,
};
const { type } = this;
if (type == "readed") {
params.readFlag = 1;
} else if (type == "unreaded") {
params.readFlag = 0;
}
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
this.total = data.total;
this.noticeData = data.list;
} else {
this.$message.error(msg);
}
},
},
components: { fastcall },
data() {
return {
type: "all",
pageNo: 1,
pageSize: window.localStorage.getItem("pageSize") || 20,
total: 1,
noticeData: [],
};
},
computed: {},
watch: {},
activated() {
this.getList();
},
methods: {
// handleClickNotice(item, index) {
// // this.readClearOne(item);
// if (item.msgType == "community_house") {
// let { agencyId, gridId, gridName, houseId, houseName, targetId } = item
// this.$store.dispatch('saveDataH', { agencyId, gridId, gridName, houseId: targetId, houseName: '' });
// this.$router.push({ name: 'house-huaxiang' });
// this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => {
// if (item.name === "house-huaxiang") {
// return { ...item, title: '' };
// }
// return item;
// });
// } else if (item.msgType == "resident_base_info") {
// let {
// agencyId,
// gridId,
// gridName,
// gender,
// homeId,
// homeName,
// name,
// targetId,
// deptName
// } = item;
// this.$store.dispatch("saveData", {
// agencyId,
// gridId,
// gridName,
// gender,
// homeId,
// homeName,
// name: '',
// resiId: targetId,
// });
// this.$router.push({ name: "jumin-huaxiang" });
// this.$store.state.contentTabs = this.$store.state.contentTabs.map(
// (item) => {
// if (item.name === "jumin-huaxiang") {
// return { ...item, title: name };
// }
// return item;
// }
// );
// }
// },
handleClickNotice(item) {
this.readClearOne(item);
if (item.msgType == "community_house") {
let { agencyId, gridId, gridName, houseId, houseName, targetId } = item
this.$store.dispatch('saveDataH', { agencyId, gridId, gridName, houseId: targetId, houseName: '房屋详情' });
this.$router.push({ name: 'house-huaxiang' });
this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => {
if (item.name === "house-huaxiang") {
return { ...item, title: '房屋信息' };
}
return item;
});
} else if (item.msgType == "resident_base_info") {
let {
agencyId,
gridId,
gridName,
gender,
homeId,
homeName,
name,
targetId,
deptName
} = item;
this.$store.dispatch("saveData", {
agencyId,
gridId,
gridName,
gender,
homeId,
homeName,
name: '居民详情',
resiId: targetId,
});
this.$router.push({ name: "jumin-huaxiang" });
this.$store.state.contentTabs = this.$store.state.contentTabs.map(
(item) => {
if (item.name === "jumin-huaxiang") {
return { ...item, title: name };
}
return item;
}
);
} else if (item.msgType == "resident_category") {
this.$router.push({
name: "base-resi",
query: {
category: item.category || null,
},
});
} else if (item.msgType == "sys_version_upgrade_publish") {
let { targetId } = item
this.$router.push({ path: `notice-version`, query: { version_id: targetId } });
this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => {
if (item.name === "notice-version") {
return { ...item };
}
return item;
});
}
},
async read(item, index) {
if (item && item.readFlag == 1) return;
const url = "/message/intelligentMessage/msg/clear";
let params = {};
if (item.id) {
params.id = item.id;
url += "?id=" + item.id;
}
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
console.log("消息已读");
this.getList();
} else {
this.$message.error(msg);
}
},
async readClearOne(item) {
console.log("item", item)
const url = `/message/intelligentMessage/msg/clearOne/?msgId=${item.id}`
const { data, code, msg } = await requestPost(url)
if (code == 0) {
this.getList()
} else if (code >= 8000) {
this.$message.error(msg)
}
},
handleClickTab(type) {
console.log(type);
this.getList();
},
handleSizeChange(val) {
this.pageSize = val;
localStorage.setItem("pageSize", val);
this.getList();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getList();
},
//
async getList() {
const url = "/message/intelligentMessage/page";
let params = {
page: this.pageNo,
limit: this.pageSize,
};
const { type } = this;
if (type == "readed") {
params.readFlag = 1;
} else if (type == "unreaded") {
params.readFlag = 0;
}
const { data, code, msg } = await requestGet(url, params);
if (code === 0) {
this.total = data.total;
this.noticeData = data.list;
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style lang="scss" scoped>
@import "~@/assets/scss/c/function.scss";
.m-tx {
position: relative;
margin: 10px 6px;
padding: 12px 20px;
background: #ffffff;
box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
0px 3px 6px -4px rgba(0, 0, 0, 0.12);
border-radius: 2px;
.cnt {
box-sizing: border-box;
border-radius: 2px;
overflow: hidden;
padding: 0 12px;
.empty {
margin: 100px 0;
text-align: center;
color: #999;
img {
display: block;
width: 120px;
margin: 20px auto;
}
}
.z-readed {
opacity: 0.5;
}
.item {
position: relative;
display: flex;
align-items: center;
padding: 16px 0 12px;
border-bottom: 1px dashed #f0f5fa;
&:last-child {
border-bottom: none;
}
&:hover {
.item-title {
color: #0056d6;
cursor: pointer;
}
.item-btn-clear {
display: block;
}
}
.i-tag {
display: block;
margin-right: 15px;
width: 40px;
height: 22px;
border-radius: 4px;
border: 1px solid rgba(0, 0, 0, 0.15);
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.88);
line-height: 20px;
font-style: normal;
text-align: center;
}
.item-title {
// @include toe;
width: 60%;
margin-right: 100px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.85);
line-height: 22px;
}
.item-btn-clear {
position: absolute;
display: none;
top: 50%;
left: 65%;
width: 80px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0042a3;
line-height: 16px;
cursor: pointer;
transform: translateY(-50%);
img {
width: 16px;
margin-right: 3px;
}
}
.item-date {
margin-left: 100px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.45);
line-height: 17px;
}
}
}
.header {
display: flex;
justify-content: space-between;
padding: 12px 0;
margin-bottom: 10px;
border-bottom: 1px solid #f0f5fa;
.title {
height: 22px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 22px;
}
.btn-clear {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0042a3;
line-height: 16px;
cursor: pointer;
img {
width: 16px;
margin-right: 3px;
}
}
}
position: relative;
margin: 10px 6px;
padding: 12px 20px;
background: #ffffff;
box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08),
0px 3px 6px -4px rgba(0, 0, 0, 0.12);
border-radius: 2px;
.cnt {
box-sizing: border-box;
border-radius: 2px;
overflow: hidden;
padding: 0 12px;
.empty {
margin: 100px 0;
text-align: center;
color: #999;
img {
display: block;
width: 120px;
margin: 20px auto;
}
}
.z-readed {
opacity: 0.5;
}
.item {
position: relative;
display: flex;
align-items: center;
padding: 16px 0 12px;
border-bottom: 1px dashed #f0f5fa;
&:last-child {
border-bottom: none;
}
&:hover {
.item-title {
color: #0056d6;
cursor: pointer;
}
.item-btn-clear {
display: block;
}
}
.i-tag {
display: block;
margin-right: 15px;
width: 40px;
height: 22px;
border-radius: 4px;
border: 1px solid rgba(0, 0, 0, 0.15);
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.88);
line-height: 20px;
font-style: normal;
text-align: center;
}
.item-title {
// @include toe;
width: 60%;
margin-right: 100px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.85);
line-height: 22px;
}
.item-btn-clear {
position: absolute;
display: none;
top: 50%;
left: 65%;
width: 80px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0042a3;
line-height: 16px;
cursor: pointer;
transform: translateY(-50%);
img {
width: 16px;
margin-right: 3px;
}
}
.item-date {
margin-left: 100px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.45);
line-height: 17px;
}
}
}
.header {
display: flex;
justify-content: space-between;
padding: 12px 0;
margin-bottom: 10px;
border-bottom: 1px solid #f0f5fa;
.title {
height: 22px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
line-height: 22px;
}
.btn-clear {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0042a3;
line-height: 16px;
cursor: pointer;
img {
width: 16px;
margin-right: 3px;
}
}
}
}
/deep/ .el-tabs__nav-wrap::after {
height: 1px;
background-color: #f0f5fa;
height: 1px;
background-color: #f0f5fa;
}
/deep/ .el-pagination__total {
// float: left;
// float: left;
}
</style>

74
src/views/modules/unopen.vue

@ -1,48 +1,50 @@
<template>
<div>
<div class="m-hint">
<div class="wrap">
<img src="@/assets/img/unopen-hint.png" alt="" />
<span>功能暂未开放</span>
</div>
<div>
<div class="m-hint">
<div class="wrap">
<img src="@/assets/img/unopen-hint.png" alt="" />
<span>功能暂未开放</span>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {};
},
components: {},
mounted() {},
methods: {
changeCustomerName(customerName) {},
},
data() {
return {};
},
components: {},
mounted() { },
methods: {
changeCustomerName(customerName) { },
},
};
</script>
<style lang="scss" scoped>
.m-hint {
position: relative;
background-color: #ffffff;
height: calc(100vh - 150px);
.wrap {
position: absolute;
display: block;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 271px;
height: 240px;
font-size: 20px;
line-height: 30px;
font-weight: bold;
color: #aaa;
text-align: center;
img {
margin-bottom: 10px;
position: relative;
background-color: #ffffff;
height: calc(100vh - 150px);
.wrap {
position: absolute;
display: block;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 271px;
height: 240px;
font-size: 20px;
line-height: 30px;
font-weight: bold;
color: #aaa;
text-align: center;
img {
margin-bottom: 10px;
}
}
}
}
</style>

3
vue.config.js

@ -35,7 +35,8 @@ module.exports = {
target: "http://bipaas.elinkservice.cn", // 我们要代理的真实接口地址
},
"/api": {
target: "http://219.146.91.110:30801", // 测试地址
target: "http://192.168.1.140", // 测试地址
// target: "http://219.146.91.110:30801", // 测试地址
// target: "http://192.168.1.60:8080", // 本地地址
// target: "https://epmet-preview.elinkservice.cn", // 演示地址
changeOrigin: true,

Loading…
Cancel
Save