diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 8a03170c7..26d39eb85 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1194,4 +1194,9 @@ module.exports = { Fileuploaded:'File uploading, please wait', doNotHavePermissionDeleteData:'Do not have permission to delete this data,', Parametercollection:'Parameter Collection', + Collectlist:'Colle Ctlist', + Statisticalmodels:'Statisti Calmodels', + Inthecollection:'In the collection', + Notatthe:'Not at the', + Thepercentage:'The Percentage', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 3451b7e5c..72353771f 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1297,4 +1297,9 @@ module.exports = { uploadedbyyourself: '只能删除自己上传的文件数据', doNotHavePermissionDeleteData: '没有权限删除此数据', Parametercollection:'参数收集', + Collectlist:'收集清单', + Statisticalmodels:'统计模式', + Inthecollection:'收集中', + Notatthe:'未开始', + Thepercentage:'百分比', } \ No newline at end of file diff --git a/jero-web/src/views/externalReports/index.vue b/jero-web/src/views/externalReports/index.vue index b1691566b..83e6a7017 100644 --- a/jero-web/src/views/externalReports/index.vue +++ b/jero-web/src/views/externalReports/index.vue @@ -187,7 +187,7 @@ :wrapper-col="wrapperCol" > - + - @@ -286,12 +286,12 @@ export default { { required: true, message: this.$t('PleaseEnter') + this.$t('Foldername'), trigger: 'blur' }, { min: 1, max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' } ], - authManageIdsName: [ - { required: true, message: this.$t('PleaseSelect') + this.$t('Administrativeprivileges'), trigger: 'change' }, - ], - authViewIdsName: [ - { required: true, message: this.$t('PleaseSelect') + this.$t('Checkthepermissions'), trigger: 'change' }, - ], + // authManageIdsName: [ + // { required: true, message: this.$t('PleaseSelect') + this.$t('Administrativeprivileges'), trigger: 'change' }, + // ], + // authViewIdsName: [ + // { required: true, message: this.$t('PleaseSelect') + this.$t('Checkthepermissions'), trigger: 'change' }, + // ], orderId: [ { required: true, message: this.$t('PleaseEnter') + this.$t('Folderorder'), trigger: 'blur' } // { min: 1, max: 99999, message: this.$t('cantExeed') + '99999' + this.$t('characters'), trigger: 'blur' }, diff --git a/jero-web/src/views/projectManagement/components/ParameterCollectionEchart.vue b/jero-web/src/views/projectManagement/components/ParameterCollectionEchart.vue index 1616c7698..97d2c7c23 100644 --- a/jero-web/src/views/projectManagement/components/ParameterCollectionEchart.vue +++ b/jero-web/src/views/projectManagement/components/ParameterCollectionEchart.vue @@ -4,21 +4,20 @@ - - - 国内订单 - 国际订单 + + + {{ d.label }} - + - {{$t('accord')}} + {{$t('Thepercentage')}} - {{$t('nonConformity')}} + {{$t('Quantity')}} @@ -41,6 +40,7 @@ import * as echarts from 'echarts' import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' import responsibilityList from './responsibilityList' + import "echarts/lib/component/dataZoom" export default { name: 'DeliverableStatusEchart', @@ -49,94 +49,120 @@ }, data() { return { - queryParam:{}, + queryParam:{ + value:1 + }, + options:[], + collecting:[], + notStart:[], + submit:[], + syncReport:[], + collectingdata:[], + notStartdata:[], + submitdata:[], + syncReportdata:[], + dutyTerritory:[], + collectingpercentage:[], + collectingquantity:[], + notStartpercentage:[], + notStartquantity:[], + submitpercentage:[], + submitquantity:[], + syncReportpercentage:[], + syncReportquantity:[], url: { - getProjectDetailsStatistics: '/project/projectLibraryBase/getProjectDetailsStatistics' + getProjectDetailsStatistics: '/project/projectLibraryBase/getProjectDetailsStatisticsCollectManifestData' } } }, mounted() { - this.getData() + this.getoptions() + }, methods: { - getData() { - getAction(this.url.getProjectDetailsStatistics, { id: this.$route.query.id }).then((res) => { + getData(item) { + getAction(this.url.getProjectDetailsStatistics, { paramsManifestId: item }).then((res) => { if (res.success) { if (res.result) { + this.collecting = res.result.collecting ? res.result.collecting : [] + this.notStart = res.result.notStart ? res.result.notStart: [] + this.submit = res.result.submit ? res.result.submit : [] + this.syncReport = res.result.syncReport ? res.result.syncReport : [] + this.dutyTerritory = res.result.dutyTerritory ? res.result.dutyTerritory : [] + this.collecting.forEach((item,index) => { + this.collectingpercentage.push(item.percentage) + this.collectingquantity.push(item.quantity) + }) + this.notStart.forEach((item,index) => { + this.notStartpercentage.push(item.percentage) + this.notStartquantity.push(item.quantity) + }) + this.submit.forEach((item,index) => { + this.submitpercentage.push(item.percentage) + this.submitquantity.push(item.quantity) + }) + this.syncReport.forEach((item,index) => { + this.syncReportpercentage.push(item.percentage) + this.syncReportquantity.push(item.quantity) + }) + if(this.queryParam.value = 1){ + this.collectingdata = this.collectingpercentage + this.notStartdata = this.notStartpercentage + this.submitdata = this.submitpercentage + this.syncReportdata = this.syncReportpercentage + }else{ + this.collectingdata = this.collectingquantity + this.notStartdata = this.notStartquantity + this.submitdata = this.submitquantity + this.syncReportdata = this.syncReportquantity + } + setTimeout(() => { + this.getEcharts() + },1000) - let listingToConfirmMap = res.result.listingToConfirmMap ? res.result.listingToConfirmMap.listingToConfirmMapList : [] - let taskToConfirmMap = res.result.taskToConfirmMap ? res.result.taskToConfirmMap.taskToConfirmMapList : [] - let designComplianceMap = res.result.designComplianceMap ? res.result.designComplianceMap.designComplianceMapList : [] - let prehomoMap = res.result.prehomoMap ? res.result.prehomoMap.prehomoMapList : [] - let verifyComplianceMap = res.result.verifyComplianceMap ? res.result.verifyComplianceMap.verifyComplianceMapList : [] - this.dataEcharts(listingToConfirmMap, 1) - this.dataEcharts(taskToConfirmMap, 2) } } }) }, - dataEcharts(val, num) { - let data = [] - let color = [] - if (val && val.length > 0) { - val.forEach((res) => { - if (res.inventoryAffirmStatus == 'Not started' || res.taskAffirmStatus == 'Not started') { - data.push({ - value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount, - name: this.$t('notLaunch'), - status: res.inventoryAffirmStatus || res.taskAffirmStatus - }) - color.push('#707486') - } else if (res.inventoryAffirmStatus == 'List to confirm' || res.taskAffirmStatus == 'List to confirm') { - data.push({ - value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount, - name: this.$t('toBeConfirmed'), - status: res.inventoryAffirmStatus || res.taskAffirmStatus - }) - color.push('#00B3BE') - } else if (res.inventoryAffirmStatus == 'Accepted' || res.taskAffirmStatus == 'Accepted') { - data.push({ - value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount, - name: this.$t('accept'), - status: res.inventoryAffirmStatus || res.taskAffirmStatus - }) - color.push('#26BD4B') - } else if (res.inventoryAffirmStatus == 'Rejected' || res.taskAffirmStatus == 'Rejected') { - data.push({ - value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount, - name: this.$t('refuse'), - status: res.inventoryAffirmStatus || res.taskAffirmStatus - }) - color.push('#E83030') - } - }) - } - if(num == 1){ - this.mainLeftEcharts(data, color) - } + getoptions(){ + getAction('project/projectLibraryBase/getProjectDetailsStatisticsCollectManifestLabel', {id:this.$route.query.id}).then((res) => { + if (res.success) { + this.options = res.result + this.queryParam.ctype = this.options[0].value + this.getData(this.queryParam.ctype) + } else { + } + }) + }, + getonChange(value){ + this.getData(value) + }, + onChange(){ }, getEcharts(chart, title, color, data, num) { - var chartDom = document.getElementById(chart); + var chartDom = document.getElementById('main-left'); var myChart = echarts.init(chartDom); var option; let xAxisData = []; - let data1 = []; - let data2 = []; - let data3 = []; - let data4 = []; - for (let i = 0; i < 10; i++) { - xAxisData.push(this.$t('areaOfResponsibility') + i); - data1.push(+(Math.random() * 2).toFixed(2)); - data2.push(+(Math.random() * 100).toFixed(2)); - data3.push(+(Math.random() + 0.3).toFixed(2)); - data4.push(+Math.random().toFixed(2)); - } + // let data1 = []; + // let data2 = []; + // let data3 = []; + // let data4 = []; + this.dutyTerritory.forEach((item,index) => { + xAxisData.push(item); + }) + // data1.push(+(Math.random() * 2).toFixed(2)); + // data2.push(+(Math.random() * 100).toFixed(2)); + // data3.push(+(Math.random() + 0.3).toFixed(2)); + // data4.push(+Math.random().toFixed(2)); + + option = { legend: { - data: ['bar', 'bar2', 'bar3', 'bar4'], + data: [this.$t('Notatthe'), this.$t('Inthecollection'), this.$t('Submitted'), this.$t('SynchronizedLibrary')], left: '10%' }, toolbox: { @@ -161,7 +187,7 @@ }, series: [ { - name: 'bar', + name: this.$t('Notatthe'), type: 'bar', stack: 'one', barWidth: 30, @@ -169,10 +195,10 @@ itemStyle: { color: "#707486", }, - data: data1 + data: this.collectingdata }, { - name: 'bar2', + name: this.$t('Inthecollection'), type: 'bar', stack: 'one', barWidth: 30, @@ -180,10 +206,10 @@ itemStyle: { color: "#00B3BE", }, - data: data2 + data: this.notStartdata }, { - name: 'bar3', + name: this.$t('Submitted'), type: 'bar', stack: 'one', barWidth: 30, @@ -191,10 +217,10 @@ itemStyle: { color: "#26BD4B", }, - data: data3 + data: this.submitdata }, { - name: 'bar4', + name: this.$t('SynchronizedLibrary'), type: 'bar', stack: 'one', barWidth: 30, @@ -202,9 +228,64 @@ itemStyle: { color: "#E83030", }, - data: data4 + data: this.syncReportdata } - ] + ], + dataZoom:[ + + { + + type: 'slider', + + show: false, + + start:0,//默认为0 + + end: 100,//默认为100 + + xAxisIndex: [0], + + handleSize: 0,//滑动条的 左右2个滑动条的大小 + + height: 5,//组件高度 + + bottom: 0,//右边的距离 + + borderColor: "#e3e3e3", + + fillerColor: '#51B7F9', + + borderRadius:10, + + backgroundColor: '#e3e3e3',//两边未选中的滑动条区域的颜色 + + showDataShadow: false,//是否显示数据阴影 默认auto + + showDetail: false,//即拖拽时候是否显示详细数值信息 默认true + + realtime:true, //是否实时更新 + + filterMode: 'filter', + + zlevel:-10, + + }, + //以下重点: 让鼠标滚动从缩放变成移动 + { + + type: 'inside', + + xAxisIndex: [0], + + zoomOnMouseWheel:false, //滚轮不触发缩放 + + moveOnMouseMove:true, //鼠标移动触发平移 + + moveOnMouseWheel:true, //鼠标滚轮触发平移 + + }, + + ], }; option && myChart.setOption(option); },