diff --git a/src/layouts/components/Header.vue b/src/layouts/components/Header.vue index 292dec0..24afa7f 100644 --- a/src/layouts/components/Header.vue +++ b/src/layouts/components/Header.vue @@ -81,6 +81,7 @@ import LogoFull from '@/assets/assets-logo-full.svg'; import Notice from './Notice.vue'; import Search from './Search.vue'; import MenuContent from './MenuContent.vue'; +import {resetRouter} from "@/router"; export default Vue.extend({ components: { @@ -170,11 +171,13 @@ export default Vue.extend({ toggleSettingPanel() { this.$store.commit('setting/toggleSettingPanel', true); }, - handleLogout() { - this.$store.commit('user/removeAssociation'); - this.$store.commit('user/removeToken'); - this.$router.push(`/login?id=`+this.association.id); - this.$store.commit('user/setUserInfo',[]); + async handleLogout() { + await store.commit('user/removeAssociation'); + await store.commit('user/removeToken'); + await store.commit('user/setUserInfo',[]); + this.$router.replace('/').catch(() => ''); + localStorage.removeItem('reload'); + this.$router.push('/login'); //this.$router.push(`/login?redirect=${this.$router.history.current.fullPath}`); }, changeCollapsed() { diff --git a/src/pages/activity/activity_index.vue b/src/pages/activity/activity_index.vue index 9f0b71c..7a87870 100644 --- a/src/pages/activity/activity_index.vue +++ b/src/pages/activity/activity_index.vue @@ -78,7 +78,7 @@
- 导出 + 导出
-
总参与人数1人
+
+
+
+ 导出 +
+
@@ -254,7 +259,7 @@ -
@@ -435,7 +440,7 @@ export default { } } }, - questionnaireMode: false,//问题模态框 + questionnaireAddMode: false,//问题模态框 questionnaire: [],//问题列表 questionnaireId:0, questionnaireUpdateMode:false, @@ -649,7 +654,7 @@ export default { }, openQuestionnairefind(d) { this.questionnaireId=d.id; - this.questionnaireMode = true; + this.questionnaireAddMode = true; }, onCurrentChangeInfo(d) { this.info_pagination.page = d; @@ -837,14 +842,20 @@ export default { onCloseMy() { this.addMode = false; this.infoMode = false; - this.questionnaireMode = false; + this.questionnaireAddMode = false; this.questionnaireUpdateMode=false; this.QuestionnaireMode=false; this.JuanMode=false; }, - exportList(){ + exportList(d){ const token = store.state.user.token; - window.open(store.state.user.apiUrl + '/api/excel_controller/applicationexport?id='+this.infoId+"&token="+token); + if(d==0){ + window.open(store.state.user.apiUrl + '/api/excel_controller/applicationexport?id='+this.infoId+"&token="+token); + } + if(d==1){ + window.open(store.state.user.apiUrl + '/api/excel_controller/activityexport?id='+this.QuestionnaireModeId+"&token="+token); + } + }, } } diff --git a/src/pages/association/person.vue b/src/pages/association/person.vue index bafa09c..2eb8284 100644 --- a/src/pages/association/person.vue +++ b/src/pages/association/person.vue @@ -32,8 +32,8 @@ - - + +
- - + +
- +
@@ -53,13 +53,13 @@ import * as echarts from "echarts/core"; import {GridComponent} from "echarts/components"; import {LineChart, PieChart} from "echarts/charts"; import {CanvasRenderer} from "echarts/renderers"; +import { TooltipComponent, LegendComponent, GridComponent } from 'echarts/components'; +echarts.use([TooltipComponent, LegendComponent, PieChart, GridComponent, LineChart, CanvasRenderer]); -echarts.use([PieChart, GridComponent, LineChart, CanvasRenderer]); export default { data() { return { resizeTime: 1, - currentMonth: this.getThisMonth(), subject: '', association: '', pay: { @@ -67,89 +67,9 @@ export default { appkey: '', serial: '', }, - dataSet: { - tooltip: { - trigger: 'item', - }, - grid: { - left: '0', - right: '20px', - top: '5px', - bottom: '36px', - containLabel: true, - }, - legend: { - left: 'center', - bottom: '0', - orient: 'horizontal', // legend 横向布局。 - data: ['本月', '上月'], - textStyle: { - fontSize: 12, - color: "#000000", - }, - }, - xAxis: { - type: 'category', - data: ["05-20", "05-21", "05-22", "05-23", "05-24", "05-25", "05-26", "05-27", "05-28", "05-29","05-30"], - boundaryGap: false, - axisLabel: { - color: "#000000", - }, - axisLine: { - lineStyle: { - width: 1, - }, - }, - }, - yAxis: { - type: 'value', - axisLabel: { - color: "#000000", - }, - splitLine: { - lineStyle: {}, - }, - }, - series: [ - { - name: '本月', - data: ["10", "93", "2", "24", "30", "68", "42", "57", "50", "23","10"], - type: 'line', - smooth: false, - showSymbol: true, - symbol: 'circle', - symbolSize: 8, - itemStyle: { - normal: { - borderWidth: 1, - borderColor: "#0052D9", - }, - }, - areaStyle: { - normal: { - opacity: 0.1, - }, - }, - }, - { - name: '上月', - data:["84", "10", "33", "24", "37", "30", "72", "1", "78", "50","10"], - type: 'line', - smooth: false, - showSymbol: true, - symbol: 'circle', - symbolSize: 8, - itemStyle: { - normal: { - borderWidth: 1, - }, - }, - }, - ], - }, One_data: { tooltip: { - show: false, + show: true, trigger: 'axis', position: null, }, @@ -185,7 +105,7 @@ export default { label: { show: true, position: 'center', - formatter: ['{value|{d}%}', '{name|{b}剩余}'].join('\n'), + formatter: '{value|{d}%} \n {name|{b}剩余}', rich: { value: { color: "#000000", @@ -201,7 +121,7 @@ export default { }, }, labelLine: { - show: false, + show: true, }, data: [ { @@ -225,47 +145,25 @@ export default { }, methods: { - onCurrencyChange(checkedValues) { - const {chartColors} = this.$store.state.setting; + renderCharts() { + // 销售合同占比 + if (!this.countContainer) { + this.countContainer = document.getElementById('countContainer'); + } + this.countChart = echarts.init(this.countContainer); + const option = this.One_data; + this.countChart.setOption(option); - this.currentMonth = this.getThisMonth(checkedValues); - this.monitorChart.setOption(this.dataSet); - }, - renderCharts() { - const {chartColors} = this.$store.state.setting; - // 资金走势 - if (!this.monitorContainer) { - this.monitorContainer = document.getElementById('monitorContainer'); - } - this.monitorChart = echarts.init(this.monitorContainer); - this.monitorChart.setOption(this.dataSet); - // 销售合同占比 - if (!this.countContainer) { - this.countContainer = document.getElementById('countContainer'); - } - this.countChart = echarts.init(this.countContainer); - const option = this.One_data; - this.countChart.setOption(option); - }, - /** 获取当前选中时间的短时间表达法 */ - getThisMonth(checkedValues = '') { - let date; - if (!checkedValues || checkedValues.length === 0) { - date = new Date(); - return `${date.getFullYear()}-${date.getMonth() + 1}`; - } - date = new Date(checkedValues[0]); - const date2 = new Date(checkedValues[1]); - const startMonth = date.getMonth() + 1 > 9 ? date.getMonth() + 1 : `0${date.getMonth() + 1}`; - const endMonth = date2.getMonth() + 1 > 9 ? date2.getMonth() + 1 : `0${date2.getMonth() + 1}`; - - return `${date.getFullYear()}-${startMonth} 至 ${date2.getFullYear()}-${endMonth}`; - }, + if (!this.LLContainer) { + this.LLContainer = document.getElementById('LLContainer'); + } + this.LLContainer = echarts.init(this.LLContainer); + const lloption = this.One_data; + this.LLContainer.setOption(lloption); + }, + } } -, -} -;