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 = https://epmet-preview.elinkservice.cn/api
# VUE_APP_API_SERVER = http://192.168.1.60:8080/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 = 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-yantai.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epmet-test.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 loadTinymce from "@/utils/loadTinymce";
import { plugins, toolbar } from "./config"; import { plugins, toolbar } from "./config";
import { debounce } from "throttle-debounce"; 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; let num = 1;
export default { export default {
name: "Tinymce", name: "Tinymce",
@ -36,12 +33,8 @@ export default {
mounted() { mounted() {
loadTinymce((tinymce) => { loadTinymce((tinymce) => {
let token = this.getUserToken(); let token = this.getUserToken();
// let uploadUrl = '1111'
let uploadUrl = let uploadUrl =
window.SITE_CONFIG["apiURL"] + "/oss/file/function/upload"; window.SITE_CONFIG["apiURL"] + "/oss/file/function/upload";
// :data="{customerId:customerId}"
// let uploadUrl = constants.userUploadUrl
// eslint-disable-next-line global-require
require("./zh_CN"); require("./zh_CN");
let conf = { let conf = {
selector: `#${this.tinymceId}`, selector: `#${this.tinymceId}`,

495
src/views/main-content.vue

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

706
src/views/main-navbar.vue

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

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

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

365
src/views/main-sidebar.vue

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

298
src/views/main.vue

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

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

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

74
src/views/modules/unopen.vue

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

3
vue.config.js

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

Loading…
Cancel
Save