From 49d468a32d072797a3d5e1fbff78c05c695a2915 Mon Sep 17 00:00:00 2001 From: fengchenchen Date: Tue, 23 May 2023 15:41:22 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90update=E5=A4=A7=E5=B1=8F=E3=80=91-?= =?UTF-8?q?=E5=88=B6=E4=BF=AE=E8=AE=A2=E3=80=81WP29=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=8F=98=E6=9B=B4=E7=9A=84=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/screenApi/api.js | 9 +- .../preparationRevision/CentralizedChart.vue | 37 +++ .../CompletionProjectChart.vue | 27 +- .../preparationRevision/OverdueChart.vue | 36 +++ .../PreparationRevisionChart.vue | 27 +- .../preparationRevision/ReleasePlanChart.vue | 31 ++- .../ReleaseStandardChart.vue | 31 ++- .../ShouldBeCompletedProjectChart.vue | 73 ++++++ .../screen/preparationRevision/index.vue | 27 +- .../screen/wp29/ExpertQuantityChart.vue | 92 ++++--- .../dashboard/screen/wp29/MeetingCalendar.vue | 28 ++- .../screen/wp29/MeetingInformationChart.vue | 231 ++++++++++++++---- .../screen/wp29/RegulationQuantityChart.vue | 43 ++-- 13 files changed, 541 insertions(+), 151 deletions(-) diff --git a/src/screenApi/api.js b/src/screenApi/api.js index eae518e..0ae91c2 100644 --- a/src/screenApi/api.js +++ b/src/screenApi/api.js @@ -2,6 +2,9 @@ import { getActionZxd, getActionWP, getActionISO } from '@/screenApi/manage' /******制修订大屏接口--------开始 **********/ +// 获取所有sc信息 +const GetSCData = (params) => getActionZxd( '/serviceInterface/getDpData_scInfoList', params) + // 汽车标准项目总体情况;包括发布的国行标、在研的国行标、立项上报的国行标、外文版项目数量 const StanderProjectGeneralSituation = (params) => getActionZxd( '/serviceInterface/getDpData1', params) @@ -50,9 +53,11 @@ const GetRegulationQuantityData = (params) => getActionWP('/laws/bzsLawRegulatio const GetExpertQuantityData = (params) => getActionWP('/expertinfo/bzsExpertInfo/getScreenExpertStatistics', params) // 会议信息日历 const GetMeetingCalendarData = (params) => getActionWP('/meetinginfo/bzsMeetingInfo/getScreenMeetingInfoCalendar', params) -// 会议信息统计 +// 会议信息统计-技术领域 const GetMeetingInformationData = (params) => getActionWP('/meetinginfo/bzsMeetingInfo/queryScreenMeetingInfo', params) +// 会议信息统计-部门 +const GetMeetingInformationDataByDepart = (params) => getActionWP('/meetinginfo/bzsMeetingInfo/queryScreenMeetingInfoDepart', params) /******WP29--------结束 **********/ @@ -71,6 +76,7 @@ const GetTechnicalFieldData = (params) => getActionISO('/expertinfo/bzsExpertInf export { + GetSCData, StanderProjectGeneralSituation, GetPreparationRevisionSituation, GetPreparationRevisionSC, @@ -91,6 +97,7 @@ export { GetExpertQuantityData, GetMeetingCalendarData, GetMeetingInformationData, + GetMeetingInformationDataByDepart, GetLeadingStandardData, GetISOMeetingCalendarData, diff --git a/src/views/dashboard/screen/preparationRevision/CentralizedChart.vue b/src/views/dashboard/screen/preparationRevision/CentralizedChart.vue index a99fe58..85d56e2 100644 --- a/src/views/dashboard/screen/preparationRevision/CentralizedChart.vue +++ b/src/views/dashboard/screen/preparationRevision/CentralizedChart.vue @@ -14,6 +14,23 @@ import { createBarChart } from '../util/BarOptions' export default { name: 'CentralizedChart', + props: { + /* scDataInfoArr 内部对象数据的组成形式 { + "code": "SC1", + "committeeFullName": "全国汽车标准化技术委员会摩托车分会", + "committeeSimpleName": "摩托车", + "contacts": "陆瑾", + "currentSecretaryGeneral": "胡文浩", + "scCode": "TC114/SC1", + "secretariatUnit": "上海机动车检测认证技术研究中心有限公司" + }*/ + scDataInfoArr: { + type: Array, + default: () => { + return [] + } + } + }, data() { return { xData: [], @@ -49,6 +66,7 @@ export default { }, // 初始化图表 initChart() { + const _this = this let option = { xAxis: { data: this.xData @@ -57,6 +75,25 @@ export default { formatter: params => { // 获取xAxis data中的数据 let dataStr = '' + let curCode = params[0].name + let scItem = _this.scDataInfoArr.find(t => t.code === curCode) + if (scItem) { + dataStr += `
+
+ 委员会简称: + ${scItem.committeeSimpleName} +
+
+ 秘书处所在单位: + ${scItem.secretariatUnit} +
+
+ 现任秘书长: + ${scItem.currentSecretaryGeneral} +
+
` + } + params.forEach(item => { let color = '' if(typeof item.color === 'string') { diff --git a/src/views/dashboard/screen/preparationRevision/CompletionProjectChart.vue b/src/views/dashboard/screen/preparationRevision/CompletionProjectChart.vue index f57c1ae..b0cd50f 100644 --- a/src/views/dashboard/screen/preparationRevision/CompletionProjectChart.vue +++ b/src/views/dashboard/screen/preparationRevision/CompletionProjectChart.vue @@ -19,9 +19,10 @@ - {{item}} + {{item.code}} @@ -40,6 +41,23 @@ import { createBarAndLineChart } from '../util/BarAndLineOptions' export default { name: 'CompletionProjectChart', + props: { + /* scDataInfoArr 内部对象数据的组成形式 { + "code": "SC1", + "committeeFullName": "全国汽车标准化技术委员会摩托车分会", + "committeeSimpleName": "摩托车", + "contacts": "陆瑾", + "currentSecretaryGeneral": "胡文浩", + "scCode": "TC114/SC1", + "secretariatUnit": "上海机动车检测认证技术研究中心有限公司" + }*/ + scDataInfoArr: { + type: Array, + default: () => { + return [] + } + } + }, data() { return { selectValue: undefined, // 选中的SC @@ -83,7 +101,10 @@ export default { initSCData(arr) { this.SCOptionData = [] arr.map(item => { - this.SCOptionData.push(item.tm_code) + let scItem = this.scDataInfoArr.find(t => t.code === item.tm_code) + if (scItem) { + this.SCOptionData.push(scItem) + } }) }, /* diff --git a/src/views/dashboard/screen/preparationRevision/OverdueChart.vue b/src/views/dashboard/screen/preparationRevision/OverdueChart.vue index 7a966d4..c36ae23 100644 --- a/src/views/dashboard/screen/preparationRevision/OverdueChart.vue +++ b/src/views/dashboard/screen/preparationRevision/OverdueChart.vue @@ -14,6 +14,23 @@ import { createBarChart } from '../util/BarOptions' export default { name: 'OverdueChart', + props: { + /* scDataInfoArr 内部对象数据的组成形式 { + "code": "SC1", + "committeeFullName": "全国汽车标准化技术委员会摩托车分会", + "committeeSimpleName": "摩托车", + "contacts": "陆瑾", + "currentSecretaryGeneral": "胡文浩", + "scCode": "TC114/SC1", + "secretariatUnit": "上海机动车检测认证技术研究中心有限公司" + }*/ + scDataInfoArr: { + type: Array, + default: () => { + return [] + } + } + }, data() { return { @@ -45,6 +62,7 @@ export default { }, // 初始化图表 initChart() { + const _this = this let option = { color: ['#069F99', '#3CC3BE', '#97E3E0'], // @@ -55,6 +73,24 @@ export default { formatter: params => { // 获取xAxis data中的数据 let dataStr = '' + let curCode = params[0].name + let scItem = _this.scDataInfoArr.find(t => t.code === curCode) + if (scItem) { + dataStr += `
+
+ 委员会简称: + ${scItem.committeeSimpleName} +
+
+ 秘书处所在单位: + ${scItem.secretariatUnit} +
+
+ 现任秘书长: + ${scItem.currentSecretaryGeneral} +
+
` + } params.forEach(item => { let color = '' if(typeof item.color === 'string') { diff --git a/src/views/dashboard/screen/preparationRevision/PreparationRevisionChart.vue b/src/views/dashboard/screen/preparationRevision/PreparationRevisionChart.vue index d82782c..f666b97 100644 --- a/src/views/dashboard/screen/preparationRevision/PreparationRevisionChart.vue +++ b/src/views/dashboard/screen/preparationRevision/PreparationRevisionChart.vue @@ -21,9 +21,10 @@ - {{item}} + {{item.code}} @@ -41,6 +42,23 @@ import { createBarChart } from '../util/BarOptions' export default { name: 'PreparationRevisionChart', + props: { + /* scDataInfoArr 内部对象数据的组成形式 { + "code": "SC1", + "committeeFullName": "全国汽车标准化技术委员会摩托车分会", + "committeeSimpleName": "摩托车", + "contacts": "陆瑾", + "currentSecretaryGeneral": "胡文浩", + "scCode": "TC114/SC1", + "secretariatUnit": "上海机动车检测认证技术研究中心有限公司" + }*/ + scDataInfoArr: { + type: Array, + default: () => { + return [] + } + } + }, data() { return { selectType: 1, // 统计的维度 1-总体 2-SC下拉框 @@ -74,7 +92,10 @@ export default { result.map(item =>{ this.SCData[item.tm_code] = item // let obj = {label: item.tm_code, value: item.tm_code} - SCData.push(item.tm_code) + let scItem = this.scDataInfoArr.find(t => t.code === item.tm_code) + if (scItem) { + SCData.push(scItem) + } }) this.SCOptionData = SCData } catch (e) { diff --git a/src/views/dashboard/screen/preparationRevision/ReleasePlanChart.vue b/src/views/dashboard/screen/preparationRevision/ReleasePlanChart.vue index 706f974..2ce1df5 100644 --- a/src/views/dashboard/screen/preparationRevision/ReleasePlanChart.vue +++ b/src/views/dashboard/screen/preparationRevision/ReleasePlanChart.vue @@ -22,9 +22,10 @@ - {{item}} + {{item.code}} @@ -47,6 +48,23 @@ import * as echarts from 'echarts' export default { name: 'ReleasePlanChart', + props: { + /* scDataInfoArr 内部对象数据的组成形式 { + "code": "SC1", + "committeeFullName": "全国汽车标准化技术委员会摩托车分会", + "committeeSimpleName": "摩托车", + "contacts": "陆瑾", + "currentSecretaryGeneral": "胡文浩", + "scCode": "TC114/SC1", + "secretariatUnit": "上海机动车检测认证技术研究中心有限公司" + }*/ + scDataInfoArr: { + type: Array, + default: () => { + return [] + } + } + }, data() { return { selectType: 1, // 统计的维度 1-总体 2-SC下拉框 @@ -76,8 +94,8 @@ export default { // 点击中间的图片 做维度的转换 changeType() { if(this.selectType === 1) { - this.selectValue = this.SCOptionData[0] - this.selectChange(this.SCOptionData[0]) + this.selectValue = this.SCOptionData[0].code + this.selectChange(this.SCOptionData[0].code) } else { this.selectTypeChange(1) } @@ -97,7 +115,10 @@ export default { initSCData(arr) { this.SCOptionData = [] arr.map(item => { - this.SCOptionData.push(item.tm_code) + let scItem = this.scDataInfoArr.find(t => t.code === item.tm_code) + if (scItem) { + this.SCOptionData.push(scItem) + } }) }, // 获取SC下拉框的数据 diff --git a/src/views/dashboard/screen/preparationRevision/ReleaseStandardChart.vue b/src/views/dashboard/screen/preparationRevision/ReleaseStandardChart.vue index d8c1627..caec006 100644 --- a/src/views/dashboard/screen/preparationRevision/ReleaseStandardChart.vue +++ b/src/views/dashboard/screen/preparationRevision/ReleaseStandardChart.vue @@ -22,9 +22,10 @@ - {{item}} + {{item.code}} @@ -46,6 +47,23 @@ import * as echarts from 'echarts' export default { name: 'ReleaseStandardChart', + props: { + /* scDataInfoArr 内部对象数据的组成形式 { + "code": "SC1", + "committeeFullName": "全国汽车标准化技术委员会摩托车分会", + "committeeSimpleName": "摩托车", + "contacts": "陆瑾", + "currentSecretaryGeneral": "胡文浩", + "scCode": "TC114/SC1", + "secretariatUnit": "上海机动车检测认证技术研究中心有限公司" + }*/ + scDataInfoArr: { + type: Array, + default: () => { + return [] + } + } + }, data() { return { selectType: 1, // 统计的维度 1-总体 2-SC下拉框 @@ -74,8 +92,8 @@ export default { // 点击中间的图片 做维度的转换 changeType() { if(this.selectType === 1) { - this.selectValue = this.SCOptionData[0] - this.selectChange(this.SCOptionData[0]) + this.selectValue = this.SCOptionData[0].code + this.selectChange(this.SCOptionData[0].code) } else { this.selectTypeChange(1) } @@ -95,7 +113,10 @@ export default { initSCData(arr) { this.SCOptionData = [] arr.map(item => { - this.SCOptionData.push(item.tm_code) + let scItem = this.scDataInfoArr.find(t => t.code === item.tm_code) + if (scItem) { + this.SCOptionData.push(scItem) + } }) }, // 获取SC下拉框的数据 diff --git a/src/views/dashboard/screen/preparationRevision/ShouldBeCompletedProjectChart.vue b/src/views/dashboard/screen/preparationRevision/ShouldBeCompletedProjectChart.vue index 346839e..1c42d22 100644 --- a/src/views/dashboard/screen/preparationRevision/ShouldBeCompletedProjectChart.vue +++ b/src/views/dashboard/screen/preparationRevision/ShouldBeCompletedProjectChart.vue @@ -39,6 +39,23 @@ import { createBarAndLineChart } from '../util/BarAndLineOptions' export default { name: 'ShouldBeCompletedProjectChart', + props: { + /* scDataInfoArr 内部对象数据的组成形式 { + "code": "SC1", + "committeeFullName": "全国汽车标准化技术委员会摩托车分会", + "committeeSimpleName": "摩托车", + "contacts": "陆瑾", + "currentSecretaryGeneral": "胡文浩", + "scCode": "TC114/SC1", + "secretariatUnit": "上海机动车检测认证技术研究中心有限公司" + }*/ + scDataInfoArr: { + type: Array, + default: () => { + return [] + } + } + }, data() { return { selectValue: undefined, // 选中的SC @@ -85,8 +102,64 @@ export default { }, // 初始化图表 initChart() { + const _this = this let option = { xAxis: { data: this.xData }, + tooltip: { + formatter: params => { + // 获取xAxis data中的数据 + let dataStr = '' + let curCode = params[0].name + let scItem = _this.scDataInfoArr.find(t => t.code === curCode) + if (scItem) { + dataStr += `
+
+ 委员会简称: + ${scItem.committeeSimpleName} +
+
+ 秘书处所在单位: + ${scItem.secretariatUnit} +
+
+ 现任秘书长: + ${scItem.currentSecretaryGeneral} +
+
` + } + params.forEach(item => { + let color = '' + if(typeof item.color === 'string') { + color = item.color + } else { + color = item.color.colorStops[0].color + } + if(item.seriesType === 'bar') { + dataStr += `
+
+ + ${item.seriesName} + ${item.value} +
+
` + } else { + let valueText = item.value + // 求比例的时候特殊处理 + if(item.seriesName.indexOf('比例') > -1) { + valueText = item.value === undefined ? '-' : `${item.value}%` + } + dataStr += `
+
+ + ${item.seriesName} + ${valueText} +
+
` + } + }) + return dataStr + }, + }, series: [ { data: this.yData[0] }, { data: this.yData[1] }, diff --git a/src/views/dashboard/screen/preparationRevision/index.vue b/src/views/dashboard/screen/preparationRevision/index.vue index d5b8512..68c173d 100644 --- a/src/views/dashboard/screen/preparationRevision/index.vue +++ b/src/views/dashboard/screen/preparationRevision/index.vue @@ -3,21 +3,21 @@ - + - + - + - + - + - + - + @@ -40,6 +40,7 @@ import EnterpriseContributionChart from './EnterpriseContributionChart' import ShouldBeCompletedProjectChart from './ShouldBeCompletedProjectChart' //各SC超期情况统计 OverdueChart import OverdueChart from './OverdueChart' +import { GetSCData } from '../../../../screenApi/api' export default { name: 'index', @@ -62,6 +63,18 @@ export default { ShouldBeCompletedProjectChart, // 各SC超期情况统计 OverdueChart + }, + data() { + return { + ScData: [] // 存储所有的SC数据 + } + }, + created() { + GetSCData().then(res =>{ + if(res.success) { + this.ScData = res.result || [] + } + }) } } diff --git a/src/views/dashboard/screen/wp29/ExpertQuantityChart.vue b/src/views/dashboard/screen/wp29/ExpertQuantityChart.vue index 8ce23cf..01b9162 100644 --- a/src/views/dashboard/screen/wp29/ExpertQuantityChart.vue +++ b/src/views/dashboard/screen/wp29/ExpertQuantityChart.vue @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/src/views/dashboard/screen/wp29/MeetingCalendar.vue b/src/views/dashboard/screen/wp29/MeetingCalendar.vue index 9d71bc5..c730116 100644 --- a/src/views/dashboard/screen/wp29/MeetingCalendar.vue +++ b/src/views/dashboard/screen/wp29/MeetingCalendar.vue @@ -5,8 +5,8 @@ 会议信息日历
- 会议总数: - {{this.scheduleList.length}} + 当月会议总数: + {{this.scheduleList.length > 0 ? this.scheduleList[0].total : 0}}
@@ -86,13 +86,17 @@ export default { this.time = currentDate.getFullYear() + '年' + (currentDate.getMonth() + 1) + '月' }) // this.getReservationList(this.scheduleList) - this.getData() + const year = new Date().getFullYear() + const month = new Date().getMonth() + 1 + let m = month < 10 ? ('0' + month) : month + const cutTime = year + '-' + m + this.getData(cutTime) }, methods: { - getData() { + getData(cutTime) { let query = { // orgCode: this.orgCode, - // cutTime: '' + cutTime: cutTime } GetMeetingCalendarData(query).then((res) => { if (res.success) { @@ -106,13 +110,23 @@ export default { prev() { this.calendarApi.prev() let currentDate = new Date(this.calendarApi.currentData.currentDate) - this.time = currentDate.getFullYear() + '年' + (currentDate.getMonth() + 1) + '月' + const year = currentDate.getFullYear() + const month = currentDate.getMonth() + 1 + let m = month < 10 ? ('0' + month) : month + this.time = year + '年' + month + '月' + const cutTime = year + '-' + m + this.getData(cutTime) }, // 切换下一个按钮事件 next() { this.calendarApi.next() let currentDate = new Date(this.calendarApi.currentData.currentDate) - this.time = currentDate.getFullYear() + '年' + (currentDate.getMonth() + 1) + '月' + const year = currentDate.getFullYear() + const month = currentDate.getMonth() + 1 + let m = month < 10 ? ('0' + month) : month + this.time = year + '年' + month + '月' + const cutTime = year + '-' + m + this.getData(cutTime) }, // 点击今天按钮 today() { diff --git a/src/views/dashboard/screen/wp29/MeetingInformationChart.vue b/src/views/dashboard/screen/wp29/MeetingInformationChart.vue index 7b6e587..adba3b1 100644 --- a/src/views/dashboard/screen/wp29/MeetingInformationChart.vue +++ b/src/views/dashboard/screen/wp29/MeetingInformationChart.vue @@ -5,42 +5,41 @@ 会议信息统计
-
- 选择时间: +
+ 年份: - - +
+
+ 季度:
-
- 会议总数: - {{totalAll}} +
+ 月份: + +
+ + 重置
@@ -63,9 +72,11 @@