Compare commits
2 Commits
368898f334
...
d5e6c74939
Author | SHA1 | Date |
---|---|---|
|
d5e6c74939 | 10 months ago |
|
a7c0b3720b | 10 months ago |
10 changed files with 1359 additions and 1471 deletions
@ -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> |
|||
|
@ -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> |
|||
|
@ -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> |
|||
|
@ -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> |
|||
|
Loading…
Reference in new issue