From 2bf2d2a06b99882f66163014ec957cf776af272e Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Wed, 16 Mar 2022 16:46:24 +0800 Subject: [PATCH] ssdfsf --- src/assets/scss/c/config.scss | 2 +- src/assets/scss/c/function.scss | 15 +- .../scss/modules/shujirizhi-notice.scss | 62 +++ src/views/main.vue | 44 ++- .../modules/secretaryLog/cpts/notice.vue | 360 ++++-------------- 5 files changed, 167 insertions(+), 316 deletions(-) create mode 100644 src/assets/scss/modules/shujirizhi-notice.scss diff --git a/src/assets/scss/c/config.scss b/src/assets/scss/c/config.scss index e3555368..10221912 100644 --- a/src/assets/scss/c/config.scss +++ b/src/assets/scss/c/config.scss @@ -11,7 +11,7 @@ $w1: 1200px; //网站主色 primary color bgcolor $c1: #ff4c52; // 红 dd000f -$c2: #3b7cff; +$c2: #3e8ef7; //灰度色 用于字体 $fc0: #010033; diff --git a/src/assets/scss/c/function.scss b/src/assets/scss/c/function.scss index 90fb9dae..74b02097 100644 --- a/src/assets/scss/c/function.scss +++ b/src/assets/scss/c/function.scss @@ -87,6 +87,15 @@ text-overflow: ellipsis; word-wrap: normal; } + +// 强制文本换行 多行 +@mixin toeM($num) { + display: -webkit-box; + overflow: hidden; + text-overflow: ellipsis; + -webkit-line-clamp: $num; + -webkit-box-orient: vertical; +} // 图片居中 @mixin img_hub { position: absolute; @@ -206,7 +215,7 @@ } //党员积分排行榜 @mixin img123 { - width:20px; + width: 20px; height: 20px; border-radius: 50%; position: absolute; @@ -225,7 +234,7 @@ width: 67.15px; height: 67.15px; position: absolute; - display: block; + display: block; top: 4px; border-radius: 100%; } @@ -258,11 +267,9 @@ display: block; z-index: 10; margin-top: 40px; - } @mixin list { list-style-type: none; position: absolute; padding: 0px; } - diff --git a/src/assets/scss/modules/shujirizhi-notice.scss b/src/assets/scss/modules/shujirizhi-notice.scss new file mode 100644 index 00000000..8d717a03 --- /dev/null +++ b/src/assets/scss/modules/shujirizhi-notice.scss @@ -0,0 +1,62 @@ +@import "../c/anime"; +@import "../c/config"; +@import "../c/function"; + +.m-notice { + position: fixed; + z-index: 10000; + bottom: 0; + right: 0; + background-color: #fff; + box-shadow: 0 0 10px 0 rgba(#000, 0.1); + width: 500px; + height: 300px; + box-sizing: border-box; + padding: 25px; + + .header { + margin-bottom: 20px; + font-size: 24px; + font-weight: bold; + color: #3e8ef7; + } + .type { + margin-bottom: 10px; + font-size: 20px; + font-weight: bold; + color: #333; + } + .content { + @include toeM(2); + margin-bottom: 10px; + font-size: 16px; + color: #333; + line-height: 30px; + } + .date { + margin-bottom: 30px; + font-size: 16px; + color: #999; + line-height: 30px; + } + .operate { + display: flex; + justify-content: space-around; + + .btn { + box-sizing: border-box; + padding: 0 20px; + width: 180px; + text-align: center; + font-size: 20px; + color: #3e8ef7; + line-height: 40px; + cursor: pointer; + + &.z-stress { + background-color: #3e8ef7; + color: #fff; + } + } + } +} diff --git a/src/views/main.vue b/src/views/main.vue index 9ecf523e..479c782f 100644 --- a/src/views/main.vue +++ b/src/views/main.vue @@ -1,24 +1,30 @@ @@ -28,16 +34,17 @@ import MainNavbar from "./main-navbar"; import MainSidebar from "./main-sidebar"; import MainContent from "./main-content"; import MainThemeTools from "./main-theme-tools"; +import SecretaryLogNotice from "./modules/secretaryLog/cpts/notice"; import debounce from "lodash/debounce"; import { mapGetters } from "vuex"; import nextTick from "dai-js/tools/nextTick"; import { requestPost } from "@/js/dai/request"; export default { - provide () { + provide() { return { // 刷新 - refresh () { + refresh() { this.$store.state.contentIsNeedRefresh = true; this.$nextTick(() => { this.$store.state.contentIsNeedRefresh = false; @@ -45,7 +52,7 @@ export default { }, }; }, - data () { + data() { return { loading: true, userType: localStorage.getItem("userType"), @@ -56,12 +63,13 @@ export default { MainSidebar, MainContent, MainThemeTools, + SecretaryLogNotice, }, watch: { $route: "routeHandle", }, - async created () { + async created() { this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"]; console.log(this.$store.state.sidebarMenuList); @@ -73,11 +81,11 @@ export default { }, computed: {}, methods: { - changeCustomerName (customerName) { + changeCustomerName(customerName) { this.$refs["ref_navbar"].changeCustomerName(customerName); }, // 窗口改变大小 - windowResizeHandle () { + windowResizeHandle() { this.$store.state.sidebarFold = document.documentElement["clientWidth"] <= 992 || false; window.addEventListener( @@ -89,7 +97,7 @@ export default { ); }, // 路由, 监听 - routeHandle (route) { + routeHandle(route) { if (!route.meta.isTab) { return false; } @@ -112,7 +120,7 @@ export default { this.$store.state.contentTabsActiveName = tab.name; this.syncLevelOneMenuActive(tab.menuId); }, - async syncLevelOneMenuActive (menuId) { + async syncLevelOneMenuActive(menuId) { await nextTick(); console.log( "*******************************", @@ -135,7 +143,7 @@ export default { idx !== -1 ? this.$store.state.sidebarMenuList[idx].children : []; }, // 获取当前管理员信息 - async getWorkUserInfo () { + async getWorkUserInfo() { const url = "/epmetuser/customerstaff/staffbasicinfo"; let params = {}; const { data, code, msg } = await requestPost(url, params); diff --git a/src/views/modules/secretaryLog/cpts/notice.vue b/src/views/modules/secretaryLog/cpts/notice.vue index 6ddb547a..5fd0960f 100644 --- a/src/views/modules/secretaryLog/cpts/notice.vue +++ b/src/views/modules/secretaryLog/cpts/notice.vue @@ -1,6 +1,13 @@ @@ -9,320 +16,87 @@ import { requestPost } from "@/js/dai/request2"; import nextTick from "dai-js/tools/nextTick"; export default { - components: { }, + components: {}, data() { return { - agencyId: "", - - tableData: [], - - currentIndex: 0, + displayed: false, + + lastTime: 0, + + list: [ + { + memoId: "1", + type: "work_diary", + typeName: "工作日志", + content: + "提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容提醒内容", + remindTime: "2022-02-22 22:22", + }, + ], }; }, - computed: { - }, + computed: {}, watch: { - currentIndex() { - }, + currentIndex() {}, }, async mounted() { - await this.loadAgency(); - await this.getTableData(); + this.poll(); }, methods: { - async handleDel() { - if (!confirm("删除后不可恢复,确定删除?")) return; - - const item = this.tableData[this.currentIndex]; - const url = "/gov/org/icpartyservicecenter/del"; - - const { data, code, msg } = await requestPost(url, [ - item.partyServiceCenterId, - ]); + async poll() { + let nowTime = new Date().getTime(); + if (nowTime - this.lastTime > 60 * 1000) { + this.lastTime = nowTime; + this.getList(); + } + await nextTick(1000); + this.poll(); + }, - if (code === 0) { - this.$message.success("删除成功!"); - this.getTableData(); + checkInfo() { + const { memoId, type } = this.list[0]; + if (type == "work_diary") { + this.$router.push({ + path: `/main/visual-basicinfo-people/${uid}`, + }); + } else if (type == "concern") { + } else if (type == "difficulty") { } + + this.read(); }, - async getTableData() { - const oldLen = this.tableData.length; - const url = "/gov/org/icpartyservicecenter/partyservicecenterlist"; + async read() { + const item = this.list[0]; + const url = "/gov/project/memoAttr/setReaded"; + const { data, code, msg } = await requestPost(url, { - orgId: this.agencyId, - orgType: "agency", + memoId: item.memoId, }); - if (code === 0) { - console.log("列表请求成功!!!!!!!!!!!!!!"); - this.tableData = data; - - if (data.length > 0 && oldLen == 0) { - await nextTick(100); - this.initMap(); - this.setMap(); - } + if (code === 0) { + // this.$message.success("删除成功!"); + this.displayed = false; + this.getList(); } }, - //加载组织 - async loadAgency() { - const url = "/epmetuser/customerstaff/staffbasicinfo"; - let params = {}; - - const { data, code, msg } = await requestPost(url, params); - + async getList() { + const url = "/gov/project/memoAttr/memosToRemind"; + const { data, code, msg } = await requestPost(url, {}); if (code === 0) { - this.agencyId = data.agencyId; + console.log("列表请求成功!!!!!!!!!!!!!!"); + this.displayed = true; + this.lastTime = new Date().getTime(); + // this.list = data; } }, }, }; - +