From 27adeebae1d930439101244fc9034040c7c4a378 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Thu, 15 Sep 2022 11:14:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=A8=E5=A4=A9=E6=8F=90=E5=87=BA=E7=9A=84?= =?UTF-8?q?=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/scss/modules/visual/people.scss | 6 +- src/main.js | 1 - src/store/index.js | 49 -- src/store/modules/user.js | 8 - src/utils/index.js | 22 +- src/views/modules/visual/basicinfo/people.vue | 497 ++++++++------ .../communityGovern/shijianchuli/pieOption.js | 322 +++++----- .../shijianchuli/shijianchulifenxi.vue | 608 +++++++++--------- .../shijianfenlei/shijianfenleifenxi.vue | 18 +- 9 files changed, 781 insertions(+), 750 deletions(-) delete mode 100644 src/store/index.js delete mode 100644 src/store/modules/user.js diff --git a/src/assets/scss/modules/visual/people.scss b/src/assets/scss/modules/visual/people.scss index b624578ba..ba67b1aaf 100644 --- a/src/assets/scss/modules/visual/people.scss +++ b/src/assets/scss/modules/visual/people.scss @@ -244,7 +244,7 @@ } } - .item2{ + .item2 { width: 49%; } } @@ -486,6 +486,10 @@ .m-list { width: calc(50% - 3px); + &.z-only { + width: 100%; + } + .title { margin-bottom: 10px; padding: 4px 2px; diff --git a/src/main.js b/src/main.js index 90e2269f2..1bf35aa3d 100644 --- a/src/main.js +++ b/src/main.js @@ -7,7 +7,6 @@ import 'mint-ui/lib/style.css'; import App from "@/App"; import i18n from "@/i18n"; import router from "@/router"; -// import store1 from '@/store' import "@/icons"; import "@/element-ui/theme/index.css"; import "@/assets/scss/aui.scss"; diff --git a/src/store/index.js b/src/store/index.js deleted file mode 100644 index d411b20e9..000000000 --- a/src/store/index.js +++ /dev/null @@ -1,49 +0,0 @@ -import Vue from 'vue' -import Vuex from 'vuex' -import cloneDeep from 'lodash/cloneDeep' -import user from './modules/user' - -Vue.use(Vuex) - -export default new Vuex.Store({ - namespaced: true, - state: { - // 导航条, 布局风格, defalut(白色) / colorful(鲜艳) - navbarLayoutType: 'colorful', - // 侧边栏, 布局皮肤, default(白色) / dark(黑色) - sidebarLayoutSkin: 'dark', - // 侧边栏, 折叠状态 - sidebarFold: false, - // 侧边栏, 菜单 - sidebarMenuList: [], - sidebarMenuActiveName: '', - // 内容, 是否需要刷新 - contentIsNeedRefresh: false, - // 内容, 标签页(默认添加首页) - contentTabs: [ - { - ...window.SITE_CONFIG['contentTabDefault'], - 'name': 'indexWork', - 'title': '首页' - } - ], - contentTabsActiveName: 'indexWork', - - mainShuju: { - menuList: [], - activeName: "", - }, - }, - modules: { - user - - }, - mutations: { - // 重置vuex本地储存状态 - resetStore (state) { - Object.keys(state).forEach((key) => { - state[key] = cloneDeep(window.SITE_CONFIG['storeState'][key]) - }) - } - } -}) diff --git a/src/store/modules/user.js b/src/store/modules/user.js deleted file mode 100644 index 652b69ca2..000000000 --- a/src/store/modules/user.js +++ /dev/null @@ -1,8 +0,0 @@ -export default { - state: { - id: 0, - name: '', - realName: '', - superAdmin: 0 - } -} diff --git a/src/utils/index.js b/src/utils/index.js index c129bea9d..8cd1c35cb 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,5 +1,4 @@ -import Cookies from 'js-cookie' -import store from '@/store' +import store from '@/js/store' /** * 获取字典数据列表 @@ -44,8 +43,7 @@ export function getDictLabel(dictType, dictValue) { */ export function clearLoginInfo() { store.commit('resetStore') - Cookies.remove('token') - localStorage.setItem("token", ''); + localStorage.removeItem('token') window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] = false } @@ -154,4 +152,20 @@ export function spliceIntoChunks(arr, chunkSize) { } return res; } +// 获取当前时间 如果有指定time则按指定的来 +export function getCurrentDate(hour,min,sec) { + console.log(hour,min,sec) + let date = new Date(); + if (hour){ + date.setHours(hour); + console.log(hour) + }if (min!==undefined){ + date.setMinutes(min); + console.log(min) + }if (sec!==undefined){ + date.setSeconds(sec); + console.log(sec) + } + return date; +} diff --git a/src/views/modules/visual/basicinfo/people.vue b/src/views/modules/visual/basicinfo/people.vue index 74eda8d40..39604913e 100644 --- a/src/views/modules/visual/basicinfo/people.vue +++ b/src/views/modules/visual/basicinfo/people.vue @@ -1,11 +1,12 @@ @@ -472,7 +557,7 @@ export default { }, }, - data () { + data() { return { breadList: [], showedMoreInfo: false, @@ -574,9 +659,13 @@ export default { }; }, - computed: {}, + computed: { + isShundeju() { + return this.$store.state.user.customerId == "1550309684576591874"; + }, + }, - beforeRouteEnter (to, from, next) { + beforeRouteEnter(to, from, next) { console.log("让我看看", to); if (from) { const arr = [{ ...from }, { ...to, meta: { title: "个人详情" } }]; @@ -588,14 +677,14 @@ export default { } }, watch: { - uid (id) { + uid(id) { this.userId = id; }, - userId () { + userId() { this.getApiData(); window.scrollTo(0, 0); }, - $route (route) { + $route(route) { // if you go to the redirect page, do not update the breadcrumbs if (route.path.startsWith("/redirect/")) { return; @@ -604,21 +693,21 @@ export default { }, }, - async mounted () { + async mounted() { this.userId = this.uid; console.log(this.$router); this.getApiData(); }, - deactivated () { + deactivated() { this.breadList = []; console.log("breadList-----", this.breadList); }, - destroyed () { + destroyed() { this.breadList = []; console.log("breadList-----", this.breadList); }, methods: { - getBreadcrumb () { + getBreadcrumb() { // only show routes with meta.title console.log("routest----", this.$route); let matched = this.$route.matched.filter( @@ -634,16 +723,16 @@ export default { (item) => item.meta && item.meta.title && item.meta.breadcrumb !== false ); }, - isDashboard (route) { + isDashboard(route) { const name = route && route.name; if (!name) { return false; } return name.trim().toLocaleLowerCase() === "Home".toLocaleLowerCase(); }, - handleSearch () { }, + handleSearch() {}, - async getApiData () { + async getApiData() { await this.getInfo(); this.getHouseInfo(); this.getDemandData(); @@ -652,12 +741,12 @@ export default { this.getPointData(); }, - toUserInfo (uid) { + toUserInfo(uid) { this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` }); }, //加载组织数据 - async getInfo () { + async getInfo() { const url = "/epmetuser/icresiuser/persondata"; let params = { userId: this.userId, @@ -673,7 +762,7 @@ export default { }, //加载组织数据 - async getHouseInfo () { + async getHouseInfo() { const url = "/epmetuser/icresiuser/ownerrelation"; let params = { userId: this.userId, @@ -688,12 +777,12 @@ export default { } }, - handlePageNoChangeDemand (val) { + handlePageNoChangeDemand(val) { this.demand.pageNo = val; this.getDemandData(); }, - handleOperateDemandList (index, type) { + handleOperateDemandList(index, type) { if (type == "查看") { this.showedDemandInfo = true; this.demand.currentIndex = index; @@ -701,12 +790,12 @@ export default { }, //指派成功后刷新 - handleAssignOk () { + handleAssignOk() { this.getDemandData(); }, //加载组织数据 - async getDemandData () { + async getDemandData() { const url = "/heart/userdemand/mydemand"; let params = { epmetUserIdList: this.info.epmetUserIdList, @@ -736,18 +825,18 @@ export default { } }, - handlePageNoChangeIncident (val) { + handlePageNoChangeIncident(val) { this.incident.pageNo = val; this.getIncidentData(); }, - handleClickIncident (index) { + handleClickIncident(index) { this.incident.showedInfo = true; this.incident.currentIndex = index; }, //加载组织数据 - async getIncidentData () { + async getIncidentData() { let url = "/gov/project/icEvent/icevent-pageuserreported"; // 市北沿用旧接口 @@ -775,18 +864,18 @@ export default { } }, - handlePageNoChangeTopic (val) { + handlePageNoChangeTopic(val) { this.topic.pageNo = val; this.getTopicData(); }, - handleClickTopic (index) { + handleClickTopic(index) { this.topic.showedInfo = true; this.topic.currentIndex = index; }, //加载组织数据 - async getTopicData () { + async getTopicData() { const url = "/data/aggregator/resigroup/pageusertopic"; let params = { epmetUserIdList: this.info.epmetUserIdList, @@ -806,18 +895,18 @@ export default { } }, - handlePageNoChangePoint (val) { + handlePageNoChangePoint(val) { this.point.pageNo = val; this.getPointData(); }, - handleClickPoint (index) { + handleClickPoint(index) { this.point.showedInfo = true; this.point.currentIndex = index; }, //加载组织数据 - async getPointData () { + async getPointData() { const url = "/point/resi/point/pageuserpoint"; let params = { epmetUserIdList: this.info.epmetUserIdList, diff --git a/src/views/modules/visual/communityGovern/shijianchuli/pieOption.js b/src/views/modules/visual/communityGovern/shijianchuli/pieOption.js index 6e9b5c886..90dfc3570 100644 --- a/src/views/modules/visual/communityGovern/shijianchuli/pieOption.js +++ b/src/views/modules/visual/communityGovern/shijianchuli/pieOption.js @@ -1,184 +1,176 @@ - -export function pieOption (_charts) { - const center= ['50%', '170px'] - return { - title: { - text: '0', - top: 140, - left: 'center', - textStyle: { - width: '100%', - fontSize: 32, - color: '#FFFFFF', - fontWeight: 400 - }, - itemGap: 5, - subtext: '总数', - subtextStyle: { - fontSize: 20, - color: '#fff', - fontWeight: 400 - } +export function pieOption(_charts) { + const center = ["50%", "170px"]; + return { + title: { + text: "0", + top: 140, + left: "center", + textStyle: { + width: "100%", + fontSize: 32, + color: "#FFFFFF", + fontWeight: 400, }, - tooltip: { - show: false + itemGap: 5, + subtext: "总数", + subtextStyle: { + fontSize: 20, + color: "#fff", + fontWeight: 400, }, - // legend: { - // top: 350, - // bottom: 0, - // itemWidth: 20, - // itemHeight: 10, - // textStyle: { - // color: '#D2E7FF', - // fontSize: 16, - // lineHeight: 20, + }, + tooltip: { + show: false, + }, + // legend: { + // top: 350, + // bottom: 0, + // itemWidth: 20, + // itemHeight: 10, + // textStyle: { + // color: '#D2E7FF', + // fontSize: 16, + // lineHeight: 20, + // }, + + // }, + series: [ + // 外侧圆环 + { + type: "pie", + // 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。 + startAngle: 0, + hoverAnimation: false, + // tooltip: { // }, - - // }, - series: [ - // 外侧圆环 - { - type: 'pie', - // 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。 - startAngle: 0, - hoverAnimation: false, - // tooltip: { - // }, - center: center, - radius: ['58%', '58.3%'], - label: { - normal: { - show: false - } + center: center, + radius: ["58%", "58.3%"], + label: { + normal: { + show: false, }, - labelLine: { - normal: { - show: false - } + }, + labelLine: { + normal: { + show: false, }, - data: [{ + }, + data: [ + { value: 360, itemStyle: { normal: { - color: 'rgba(40, 101, 250, 0)', - width:0, - borderColor: 'rgba(40, 101, 250, 0.5)', + color: "rgba(40, 101, 250, 0)", + width: 0, + borderColor: "rgba(40, 101, 250, 0.5)", borderWidth: 1, - borderType: 'dotted' - } - } - } - ] - }, - - // 突出的 - { - hoverAnimation: false, - // name: 'Access From', - type: 'pie', - center: center, - radius: ['35%', '48%'], - avoidLabelOverlap: false, - // top: top + '%', - // height: '80%', - selectedMode: 'single', - left: 'center', - width: 400, - label: { - // show: false, - position: 'outside', - alignTo: 'edge', - // formatter: '{a|{c}}\n\n{name|{b}}', - formatter: '{a|{c}%}\n{r|}\n{name|{b}}', - minMargin: 5, - edgeDistance: 1, - lineHeight: 15, - color: '#fff', - fontSize: 12, - // distanceToLabelLine: -60, - rich: { - name: { - padding: [0, 6, 0, 6] + borderType: "dotted", }, - a: { - fontSize: 30, - color: '#fff', - padding: [0, 6, 6, 6] - }, - r: { - backgroundColor: 'auto', - borderRadius: 6, - width: 6, - height: 6, - // padding: [3, 3, 0, -12] - } - } + }, }, - labelLine: { - show: false, - smooth: 0.2, - length: 30, - length2: 0, - maxSurfaceAngle: 80 + ], + }, + + // 突出的 + { + hoverAnimation: false, + // name: 'Access From', + type: "pie", + center: center, + radius: ["35%", "48%"], + avoidLabelOverlap: false, + // top: top + '%', + // height: '80%', + selectedMode: "single", + left: "center", + width: 400, + label: { + // show: false, + position: "outside", + alignTo: "edge", + // formatter: '{a|{c}}\n\n{name|{b}}', + formatter: "{a|{c}%}\n{r|}\n{name|{b}}", + minMargin: 5, + edgeDistance: 1, + lineHeight: 15, + color: "#fff", + fontSize: 12, + // distanceToLabelLine: -60, + rich: { + name: { + padding: [0, 6, 0, 6], + }, + a: { + fontSize: 30, + color: "#fff", + padding: [0, 6, 6, 6], + }, + r: { + backgroundColor: "auto", + borderRadius: 6, + width: 6, + height: 6, + // padding: [3, 3, 0, -12] + }, }, - labelLayout: function (params) { - - const isLeft = params.labelRect.x < _charts.getWidth() / 2; - const points = params.labelLinePoints; - // Update the end point. - if (points) { - points[2][0] = isLeft + }, + labelLine: { + show: false, + smooth: 0.2, + length: 30, + length2: 0, + maxSurfaceAngle: 80, + }, + labelLayout: function (params) { + const isLeft = params.labelRect.x < _charts.getWidth() / 2; + const points = params.labelLinePoints; + // Update the end point. + if (points) { + points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width; - } - - return { - labelLinePoints: points - }; - }, - itemStyle: { - color:function(params) { + } + + return { + labelLinePoints: points, + }; + }, + itemStyle: { + color: function (params) { //自定义颜色 - var colorList = [ '#FAC126', '#3DDA83']; - return colorList[params.dataIndex] - } + var colorList = ["#FAC126", "#3DDA83"].reverse(); + return colorList[params.dataIndex]; }, - data: [], - }, - // 中间圆环 - { - type: 'pie', - // 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。 - startAngle: 0, - hoverAnimation: false, - center: center, - // tooltip: { - // }, - radius: ['0%', '25%'], - label: { - - show: false - - }, - labelLine: { - - show: false - + data: [], + }, + // 中间圆环 + { + type: "pie", + // 起始刻度的角度,默认为 90 度,即圆心的正上方。0 度为圆心的正右方。 + startAngle: 0, + hoverAnimation: false, + center: center, + // tooltip: { + // }, + radius: ["0%", "25%"], + label: { + show: false, + }, + labelLine: { + show: false, + }, + data: [ + { + value: 360, + itemStyle: { + normal: { + color: "rgba(8, 37, 134, 1)", + }, }, - data: [{ - value: 360, - itemStyle: { - normal: { - color: 'rgba(8, 37, 134, 1)', - - } - } - } - ] }, - ] - - } - } - \ No newline at end of file + ], + }, + ], + }; +} diff --git a/src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi.vue b/src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi.vue index 40467b1f5..964a673e5 100644 --- a/src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi.vue +++ b/src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi.vue @@ -1,65 +1,75 @@