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/js/store/index.js b/src/js/store/index.js index 483238a6..7dfbb567 100644 --- a/src/js/store/index.js +++ b/src/js/store/index.js @@ -4,6 +4,7 @@ import cloneDeep from "lodash/cloneDeep"; import user from "./modules/user"; import app from "./modules/app"; import tagsView from "./modules/tagsView"; +import { requestPost } from "@/js/dai/request"; Vue.use(Vuex); @@ -37,7 +38,8 @@ export default new Vuex.Store({ menuList: [], activeName: "", }, - + tipsList: [], + tipsTime: [], inIframe: window.self !== window.top, }, modules: { @@ -52,5 +54,38 @@ export default new Vuex.Store({ state[key] = cloneDeep(window.SITE_CONFIG["storeState"][key]); }); }, + SET_TIPS_LIST(state, tipsList) { + let _list = state.tipsList + state.tipsList = _list.concat(tipsList) + }, + SET_TIPS_TIME(state, time) { + state.tipsTime = time + } }, + actions: { + setTipsList({ commit }, time) { + return new Promise(async (resolve, reject) => { + const url = '/gov/project/memoAttr/memosToRemind' + const params = { + remindTime: time || '' + } + const { data, code, msg } = await requestPost(url, params) + if (code === 0) { + commit('SET_TIPS_LIST', data) + resolve() + } else reject(msg) + }) + }, + setTipsTime({ commit }) { + return new Promise(async (resolve, reject) => { + const url = '/gov/project/memoAttr/memoTime' + + const { data, code, msg } = await requestPost(url) + if (code === 0) { + commit('SET_TIPS_TIME', data) + resolve() + } else reject(msg) + }) + } + } }); diff --git a/src/views/main-content.vue b/src/views/main-content.vue index 08c7e249..c691d133 100644 --- a/src/views/main-content.vue +++ b/src/views/main-content.vue @@ -69,18 +69,53 @@ + + + + + + + + + + + + + + + + + + + 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/base/resi.vue b/src/views/modules/base/resi.vue index 2d9d49cf..63dce11e 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -12,11 +12,12 @@ @click="handleAdd">新增 下载人口模板 + @click="handleExportModule('room')">下载模板 + > + @@ -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; } }, }, }; - + diff --git a/src/views/tips.vue b/src/views/tips.vue new file mode 100644 index 00000000..5c926775 --- /dev/null +++ b/src/views/tips.vue @@ -0,0 +1,103 @@ + + + + + \ No newline at end of file