首页柱状图tip文案显示,进度条文案,以及GATT改动
This commit is contained in:
parent
417a583c7a
commit
cabb27a41d
|
@ -63,9 +63,9 @@ export default {
|
|||
gantt.attachEvent('onGanttReady', function () {
|
||||
gantt.templates.tooltip_text = function (start, end, task) {
|
||||
return task.number +
|
||||
'<br/>计划产量:' + task.count +
|
||||
'<br/>任务量:' + task.count +
|
||||
'<br/>当日产量:' + task.count_real +
|
||||
'<br/>完成产量:' + task.count_ok +
|
||||
'<br/>合格数:' + task.count_ok +
|
||||
'<br/>开工时间:' + gantt.templates.tooltip_date_format(start) +
|
||||
'<br/>完工时间:' + gantt.templates.tooltip_date_format(start);
|
||||
};
|
||||
|
@ -152,4 +152,11 @@ export default {
|
|||
</script>
|
||||
<style>
|
||||
@import "~dhtmlx-gantt/codebase/dhtmlxgantt.css";
|
||||
.gantt_task_line{
|
||||
background-color: #c7c9c9;
|
||||
border: 1px solid #adb1b2;
|
||||
}
|
||||
.gantt_task_progress{
|
||||
color: #148dff;
|
||||
}
|
||||
</style>
|
|
@ -25,8 +25,17 @@
|
|||
<tr v-for="(itemy,index) in rowData" class="rollData" ref="con1" :key="itemy">
|
||||
<td>{{ index+1 }}</td>
|
||||
<td v-for="itemz in itemy" :key="itemz">
|
||||
<el-progress v-if="itemz.elType=='progress'" :text-inside="true" :stroke-width="14" :percentage="itemz.value"
|
||||
:status="getStatus(itemz.value)"/>
|
||||
<!-- <el-progress v-if="itemz.elType=='progress'" :text-inside="true" :stroke-width="14" :percentage="itemz.value"
|
||||
:status="getStatus(itemz.value)"/> -->
|
||||
<el-progress
|
||||
v-if="itemz.elType=='progress'"
|
||||
:text-inside="true"
|
||||
:stroke-width="16"
|
||||
:percentage="itemz.value"
|
||||
:status="getStatus(itemz.value)"
|
||||
>
|
||||
<span>{{itemz.value}}</span>
|
||||
</el-progress>
|
||||
<el-tag v-else-if="itemz.elType=='tag'" :type="getTagType(itemz.value)">{{ stateOption[itemz.value] }}</el-tag>
|
||||
<span v-else>{{ itemz.value }}</span>
|
||||
</td>
|
||||
|
|
|
@ -600,7 +600,7 @@ export default {
|
|||
]
|
||||
if(res3.data2.ds0.length>0){
|
||||
let item3 = res3.data2.ds0[0];
|
||||
that.yesterdayObjet = item
|
||||
that.yesterdayObjet = item3;
|
||||
seriesData3[0].value=item3.弯曲;
|
||||
seriesData3[1].value=item3.大小头;
|
||||
seriesData3[2].value=item3.偏壁;
|
||||
|
|
|
@ -215,13 +215,13 @@ export default {
|
|||
],
|
||||
blockHeight: null,
|
||||
taskBoard: {
|
||||
header: ['名称', '规格', '数量'],
|
||||
header: ['名称','数量'],
|
||||
headerBGC: 'rgb(10,63,68)',
|
||||
// waitTime: 1000,
|
||||
columnWidth: [1, 1, 1],
|
||||
// columnWidth: [4, 1],
|
||||
data: [],
|
||||
index: true,
|
||||
columnWidth: [50],
|
||||
columnWidth: [50,180],
|
||||
align: ['center'],
|
||||
loadedPercent: 0,
|
||||
percentage: 0,
|
||||
|
@ -368,7 +368,7 @@ export default {
|
|||
let last = new Date(new Date(cDate.getTime() + (weekLast * ondDayTime)));//本周周日
|
||||
let dateArr = [];
|
||||
for(let i=0;i<7;i++){
|
||||
let itemDate = new Date(first.getTime()-i*ondDayTime);
|
||||
let itemDate = new Date(first.getTime()+i*ondDayTime);
|
||||
let item = itemDate.getFullYear() + '-' + (itemDate.getMonth() + 1) + '-' + itemDate.getDate();
|
||||
dateArr.push(item);
|
||||
}
|
||||
|
@ -393,8 +393,13 @@ export default {
|
|||
if(list.length>0){
|
||||
list.forEach(item => {
|
||||
let date = item.年+'-'+item.月+'-'+item.日;
|
||||
let index = this.weekDateList.indexOf(date);
|
||||
saleOutdept6[index] = item.交付数;
|
||||
for(let i=0;i<this.weekDateList.length;i++){
|
||||
if( new Date(date)==new Date(that.weekDateList[i])){
|
||||
saleOutdept6[i] = item.交付数;
|
||||
}
|
||||
}
|
||||
// let index = this.weekDateList.indexOf(date);
|
||||
// saleOutdept6[index] = item.交付数;
|
||||
});
|
||||
}
|
||||
that.saleOutdept6 = saleOutdept6;
|
||||
|
@ -583,13 +588,16 @@ export default {
|
|||
that.$API.bi.dataset.exec.req('lineDay', obj).then((res) => {
|
||||
let list = res.data2.ds0;
|
||||
let countOkDept7 = [0,0,0,0,0,0,0],countRateDept7 = [0,0,0,0,0,0,0];
|
||||
let value0=0,value1=0,value2=0,value3=0,value4=0,value5=0,countOk_dept7=0;
|
||||
let countOk_dept7=0;
|
||||
if(list.length>0){
|
||||
list.forEach(item => {
|
||||
let date = item.年+'-'+item.月+'-'+item.日;
|
||||
let index = this.weekDateList.indexOf(date);
|
||||
countOkDept7[index] = item.合格数;
|
||||
countRateDept7[index] = Math.round(item.合格率);
|
||||
for(let i=0;i<this.weekDateList.length;i++){
|
||||
if( new Date(date)==new Date(that.weekDateList[i])){
|
||||
countOkDept7[i] = item.合格数;
|
||||
countRateDept7[i] = Math.round(item.合格率);
|
||||
}
|
||||
}
|
||||
countOk_dept7 = countOk_dept7+item.合格数;
|
||||
that.dept7Data[0].value= that.dept7Data[0].value+item.炸纹;
|
||||
that.dept7Data[1].value= that.dept7Data[1].value+item.条纹;
|
||||
|
@ -615,13 +623,19 @@ export default {
|
|||
that.$API.bi.dataset.exec.req('lineDay', obj).then((res) => {
|
||||
let list = res.data2.ds0;
|
||||
let countOkDept10 = [0,0,0,0,0,0,0],countRateDept10 = [0,0,0,0,0,0,0];
|
||||
let value0=0,value1=0,value2=0,value3=0,value4=0,value5=0,countOk_dept10=0;
|
||||
let countOk_dept10=0;
|
||||
if(list.length>0){
|
||||
console.log(this.weekDateList)
|
||||
list.forEach(item => {
|
||||
let date = item.年+'-'+item.月+'-'+item.日;
|
||||
let index = this.weekDateList.indexOf(date);
|
||||
countOkDept10[index] = item.合格数;
|
||||
countRateDept10[index] = Math.round(item.合格率);
|
||||
console.log(date)
|
||||
for(let i=0;i<this.weekDateList.length;i++){
|
||||
|
||||
if( new Date(date)==new Date(that.weekDateList[i])){
|
||||
countOkDept10[i] = item.合格数;
|
||||
countRateDept10[i] = Math.round(item.合格率);
|
||||
}
|
||||
}
|
||||
countOk_dept10 = countOk_dept10+item.合格数;
|
||||
});
|
||||
}
|
||||
|
@ -822,7 +836,7 @@ export default {
|
|||
//库存情况
|
||||
getMaterialList() {
|
||||
let that = this;
|
||||
this.$API.mtm.material.list.req({ page: 0, type: 10 }).then(res => {
|
||||
this.$API.mtm.material.list.req({ page: 0, type: 10 ,count__gte:1 }).then(res => {
|
||||
let data = [];
|
||||
if(res.length>0){
|
||||
res.forEach(item => {
|
||||
|
@ -833,10 +847,8 @@ export default {
|
|||
}else{
|
||||
colorText='<span style="color:green;">'+item.count+'</span>'
|
||||
}
|
||||
arr[0] = item.full_name;
|
||||
arr[1] = item.specification;//规格
|
||||
// arr[2] = item.model;//型号
|
||||
arr[2] = item.count;
|
||||
arr[0] = item.name+'|'+item.specification+'|'+item.model;
|
||||
arr[1] = item.count;
|
||||
data.push(arr)
|
||||
});
|
||||
}
|
||||
|
|
|
@ -291,6 +291,15 @@ export default {
|
|||
monthPayNumAVG:0,
|
||||
|
||||
option:{
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
label: {
|
||||
backgroundColor: '#6a7985'
|
||||
}
|
||||
}
|
||||
},
|
||||
grid: { // 图表距离边框的距离,可用百分比和数字(px)配置
|
||||
top: '5%',
|
||||
left: '1%',
|
||||
|
@ -315,7 +324,16 @@ export default {
|
|||
data: [],
|
||||
type: 'bar',
|
||||
barMaxWidth: 50,
|
||||
emphasis: {
|
||||
focus: 'series'
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
color:'#000'
|
||||
},
|
||||
itemStyle: {
|
||||
borderRadius: [5, 5, 0, 0],
|
||||
normal: { color: 'rgb(20, 141, 255)' }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue