参数收集统计修改
This commit is contained in:
@@ -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',
|
||||
}
|
||||
@@ -1297,4 +1297,9 @@ module.exports = {
|
||||
uploadedbyyourself: '只能删除自己上传的文件数据',
|
||||
doNotHavePermissionDeleteData: '没有权限删除此数据',
|
||||
Parametercollection:'参数收集',
|
||||
Collectlist:'收集清单',
|
||||
Statisticalmodels:'统计模式',
|
||||
Inthecollection:'收集中',
|
||||
Notatthe:'未开始',
|
||||
Thepercentage:'百分比',
|
||||
}
|
||||
@@ -187,7 +187,7 @@
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-form-model-item :label="$t('Foldername')" prop="folderName">
|
||||
<a-input class="box-input add-input" v-model="form.folderName" :placeholder="$t('PleaseEnter')+$t('Foldername')"/>
|
||||
<a-input class="box-input add-input" v-model.trim="form.folderName" :placeholder="$t('PleaseEnter')+$t('Foldername')"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('Administrativeprivileges')" prop="authManageIdsName">
|
||||
<PersonnelSelection class="box-input add-input"
|
||||
@@ -205,7 +205,7 @@
|
||||
v-model="form.authViewIdsName"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('Folderorder')" prop="orderId">
|
||||
<a-input-number v-model="form.orderId" :min="1" :max="99999" class="box-input add-input"
|
||||
<a-input-number v-model="form.orderId" :min="1" :max="9999" class="box-input add-input"
|
||||
:placeholder="$t('PleaseEnter')+$t('Folderorder')" :formatter="limitNumber"
|
||||
:parser="limitNumber" />
|
||||
<!-- <a-input-number v-model="rowCount" :min="1" :placeholder="$t('pleaseEnter')+$t('numberRows')" :formatter="limitNumber" :parser="limitNumber" />-->
|
||||
@@ -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' },
|
||||
|
||||
@@ -4,21 +4,20 @@
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item label="订单类型">
|
||||
<a-select placeholder="请输入订单类型" v-model="queryParam.ctype">
|
||||
<a-select-option value="1">国内订单</a-select-option>
|
||||
<a-select-option value="2">国际订单</a-select-option>
|
||||
<a-form-item :label="$t('Collectlist')">
|
||||
<a-select v-model="queryParam.ctype" @change="getonChange">
|
||||
<a-select-option v-for="d in options" :key="d.value" :value="d.value" >{{ d.label }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-model-item :label="$t('reviewResults')" prop="value" class="process-form-item">
|
||||
<a-form-model-item :label="$t('Statisticalmodels')" prop="value" class="process-form-item">
|
||||
<a-radio-group v-model="queryParam.value" @change="onChange">
|
||||
<a-radio :value="1">
|
||||
{{$t('accord')}}
|
||||
{{$t('Thepercentage')}}
|
||||
</a-radio>
|
||||
<a-radio :value="2">
|
||||
{{$t('nonConformity')}}
|
||||
{{$t('Quantity')}}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user