1.修改首页直观图表格

master
董哲奇 1 year ago
parent 14c05ca927
commit 51e20d3bde

@ -0,0 +1,154 @@
<template>
<div class="mytable">
<vxe-grid
id="id4"
ref="xGrid4"
border
resizable
keep-source
:align="'center'"
:height="height"
:auto-resize="true"
:columns="tableColumn7"
highlight-current-row
:custom-config="{ storage: true }"
:cell-style="cellStyle"
highlight-hover-row
show-overflow
show-header-overflow
:scroll-y="{enabled: true}"
>
</vxe-grid>
</div>
</template>
<script>
export default {
name:'Bcxq',
props:{
height:String,
list:Array,
},
data(){
return {
tableColumn7: [
{type: 'seq', width: 60, title: '序号', fixed: "left"},
{ field: '', title: '日期', width: 150,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '垛位', width: 150,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '船号', width: 150,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '批量', width: 150,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '数量', width: 150,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '重量', width: 150,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '订货清单号', width: 150,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '订货数量', width: 150,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '采购数量', width: 150,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '到货数量', width: 150,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '跨位', width: 150,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '跨位需求数量', width: 150,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
],
}
},
methods:{
cellClickEvent_xb(row) {
this.mxList = row.row.mxList
this.dialogVisible1 = true
},
rowClassName({row, rowIndex}) {
if (row.dcCh === '合计') {
return {
backgroundColor: 'lightblue',
cursor: 'pointer'
}
}
return null
},
//
cellStyle({row, column, rowIndex, columnIndex}) {
let fields = ['tlt_zl', 'jsq_dz_pc', 'jsq_xz_pc', 'tzxqq', 'tlt_sl', 'hx_cd', 'qg_cd', 'gcxqq'];
if (fields.includes(column.property)) {
return {
color: '#CC8B04',
cursor: 'pointer'
}
}
},
rowspanMethod({row, _rowIndex, column, visibleData}) {
//vxe-grid :scroll-y="{enabled: false}"
//
let fields = ['nf', 'yf', 'rq', 'tzxqq','kw','ch',];//
const cellValue = row[column.property];//
if (cellValue && fields.includes(column.property)) {
const prevRow = visibleData[_rowIndex - 1];
let nextRow = visibleData[_rowIndex + 1];
if (prevRow && prevRow[column.property] === cellValue) {
//
return {rowspan: 0, colspan: 0};
} else {
//
let countRowspan = 1;
while (nextRow && nextRow[column.property] === cellValue) {
nextRow = visibleData[++countRowspan + _rowIndex];
}
if (countRowspan > 1) {
return {rowspan: countRowspan, colspan: 1};
}
}
}
},
//
selectAllEvent() {
const records = this.$refs.xGrid.getCheckboxRecords();
this.checkedList = records;
},
//
selectChangeEvent() {
const records = this.$refs.xGrid.getCheckboxRecords();
this.checkedList = records;
},
cellStyle2({row}) {
if (this.gcrl.includes(row.jssj)) {
return {
color: 'red',
cursor: 'pointer'
}
}
},
}
}
</script>

@ -0,0 +1,396 @@
<template>
<div class="mytable">
<vxe-grid
id="id3"
ref="xGrid3"
border
resizable
keep-source
:align="'center'"
:height="height"
:auto-resize="true"
:columns="tableColumn3"
highlight-current-row
:data="list"
:custom-config="{ storage: true }"
:span-method="rowspanMethod"
:scroll-y="{enabled: true}"
highlight-hover-row
show-overflow
show-header-overflow
@cell-dblclick="cellClickEvent_xb"
>
</vxe-grid>
</div>
</template>
<script>
export default {
name:'Kwxx',
props:{
height:String,
list:Array,
},
data(){
return {
tableColumn3: [
{type: 'seq', width: 60, title: '序号', fixed: "left"},
{
field: 'yf', title: '月份', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'kw', title: '跨位', width: 120, formatter: ['dictFormat', 'QGKW'],
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'ch', title: '船号', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'pl', title: '批量', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'fd', title: '分段', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'bs', title: '板数', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'dhqd', title: '订货清单号', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'lhsl', title: '到货数量', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'dhsl', title: '订货数量', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'blgs', title: '备料总工时', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'pwgs', title: '抛丸总工时', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'llgs', title: '理料总工时', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'hxgs', title: '划线总工时', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'qggs', title: '切割总工时', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'pkgs', title: '坡口总工时', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'dmgs', title: '打磨总工时', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'qjggs', title: '曲加工总工时', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
{
field: 'zpgs', title: '装配总工时', width: 120,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',},
},
],
}
},
methods:{
cellClickEvent_xb(row) {
this.mxList = row.row.mxList
this.dialogVisible1 = true
},
rowClassName({row, rowIndex}) {
if (row.dcCh === '合计') {
return {
backgroundColor: 'lightblue',
cursor: 'pointer'
}
}
return null
},
//
cellStyle({row, column, rowIndex, columnIndex}) {
let fields = ['tlt_zl', 'jsq_dz_pc', 'jsq_xz_pc', 'tzxqq', 'tlt_sl', 'hx_cd', 'qg_cd', 'gcxqq'];
if (fields.includes(column.property)) {
return {
color: '#CC8B04',
cursor: 'pointer'
}
}
},
rowspanMethod({row, _rowIndex, column, visibleData}) {
//vxe-grid :scroll-y="{enabled: false}"
//
let fields = ['nf', 'yf', 'rq', 'tzxqq','kw','ch',];//
const cellValue = row[column.property];//
if (cellValue && fields.includes(column.property)) {
const prevRow = visibleData[_rowIndex - 1];
let nextRow = visibleData[_rowIndex + 1];
if (prevRow && prevRow[column.property] === cellValue) {
//
return {rowspan: 0, colspan: 0};
} else {
//
let countRowspan = 1;
while (nextRow && nextRow[column.property] === cellValue) {
nextRow = visibleData[++countRowspan + _rowIndex];
}
if (countRowspan > 1) {
return {rowspan: countRowspan, colspan: 1};
}
}
}
},
//
selectAllEvent() {
const records = this.$refs.xGrid.getCheckboxRecords();
this.checkedList = records;
},
//
selectChangeEvent() {
const records = this.$refs.xGrid.getCheckboxRecords();
this.checkedList = records;
},
cellStyle2({row}) {
if (this.gcrl.includes(row.jssj)) {
return {
color: 'red',
cursor: 'pointer'
}
}
},
}
}
</script>

@ -0,0 +1,250 @@
<template>
<div class="mytable">
<vxe-grid
id="id2"
ref="xGrid2"
border
resizable
keep-source
:align="'center'"
:height="height"
:auto-resize="true"
:columns="tableColumn2"
:data="list"
:custom-config="{ storage: true }"
:cell-style="cellStyle"
highlight-current-row
highlight-hover-row
show-overflow
:scroll-y="{enabled: true}"
>
</vxe-grid>
</div>
</template>
<script>
export default {
name:'Plxx',
props:{
height:String,
list:Array,
},
data(){
return {
tableColumn2: [
{type: 'seq', width: 60, title: '序号', fixed: "left"},
{
field: 'dcCh', title: '船号', width: 100,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'dcPl', title: '批量', width: 100,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'dcFd', title: '分段', width: 100,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'xzjsq', title: 'a=批量表(钢加小组结束)', width: 180,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'xzglxq', title: 'b=钢料滚动需求(小组)', width: 180,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombin ation',}
},
{
field: 'xzcz', title: 'b-a=时间差(小组)', width: 180,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'dzjsq', title: 'c=批量表(钢加大组结束)', width: 180,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'dzglxq', title: 'd=钢料滚动需求(大组)', width: 180,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'dzcz', title: 'd-c=时间差(大组)', width: 180,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
],
}
},
methods:{
cellClickEvent_xb(row) {
this.mxList = row.row.mxList
this.dialogVisible1 = true
},
rowClassName({row, rowIndex}) {
if (row.dcCh === '合计') {
return {
backgroundColor: 'lightblue',
cursor: 'pointer'
}
}
return null
},
//
cellStyle({row, column, rowIndex, columnIndex}) {
let fields = ['tlt_zl', 'jsq_dz_pc', 'jsq_xz_pc', 'tzxqq', 'tlt_sl', 'hx_cd', 'qg_cd', 'gcxqq'];
if (fields.includes(column.property)) {
return {
color: '#CC8B04',
cursor: 'pointer'
}
}
},
rowspanMethod({row, _rowIndex, column, visibleData}) {
//vxe-grid :scroll-y="{enabled: false}"
//
let fields = ['nf', 'yf', 'rq', 'tzxqq','kw','ch',];//
const cellValue = row[column.property];//
if (cellValue && fields.includes(column.property)) {
const prevRow = visibleData[_rowIndex - 1];
let nextRow = visibleData[_rowIndex + 1];
if (prevRow && prevRow[column.property] === cellValue) {
//
return {rowspan: 0, colspan: 0};
} else {
//
let countRowspan = 1;
while (nextRow && nextRow[column.property] === cellValue) {
nextRow = visibleData[++countRowspan + _rowIndex];
}
if (countRowspan > 1) {
return {rowspan: countRowspan, colspan: 1};
}
}
}
},
//
selectAllEvent() {
const records = this.$refs.xGrid.getCheckboxRecords();
this.checkedList = records;
},
//
selectChangeEvent() {
const records = this.$refs.xGrid.getCheckboxRecords();
this.checkedList = records;
},
cellStyle2({row}) {
if (this.gcrl.includes(row.jssj)) {
return {
color: 'red',
cursor: 'pointer'
}
}
},
}
}
</script>

@ -0,0 +1,607 @@
<template>
<div class="mytable">
<vxe-grid
id="id"
ref="xGrid"
border
resizable
keep-source
:align="'center'"
:height="height"
:auto-resize="true"
:columns="tableColumn"
:data="list"
:custom-config="{ storage: true }"
:edit-config="{trigger: 'click',mode: 'row',showStatus: true,}"
@checkbox-all="selectAllEvent"
@checkbox-change="selectChangeEvent"
:cell-style="cellStyle2"
highlight-current-row
highlight-hover-row
show-overflow
:scroll-y="{enabled: true}"
>
</vxe-grid>
</div>
</template>
<script>
export default {
name:'Sygdxqjh',
props:{
height:String,
list:Array,
},
data(){
return {
tableColumn: [
{type: 'seq', width: 60, title: '序号', fixed: "left"},
{
field: 'dcCh', title: '船号', minWidth: "70",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'dcCh1', title: '目标船号', minWidth: "90",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},//
{
field: 'dcPl', title: '批量', minWidth: "70",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'dcFd', title: '分段号', minWidth: "150",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'zl', title: '组立', minWidth: "70", formatter: ['dictFormat', 'ZLLB'],
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'jssj', title: '钢料滚动需求期(小组)', minWidth: "160",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'lqlb', title: '领取类型', width: 90, formatter: ['dictFormat', 'CLlQ'],
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'lx', title: '物资类型', width: 90, formatter: this.formatterLx,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'kw', title: '跨位', width: 80, formatter: ['dictFormat', 'QGKW'],
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'tzbh', title: '套料图号', width: 90,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'wpgg', title: '规格', width: 80,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'bcshzl', title: '重量', width: 80,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'wpxh', title: '材质', width: 80,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
},
{
field: 'xcms', title: '型材米数', width: 100,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'jzbs', title: '矫正标识', width: 100,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'hxcd', title: '划线长度(米)', minWidth: "110",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'hxcdKc', title: '划线空程长度(米)', minWidth: "140",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'qgcd', title: '切割长度(米)', minWidth: "120",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'qgcdKc', title: '切割空程长度(米)', minWidth: "140",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'slrq', title: '上料计划日期', minWidth: "120",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'pwrq', title: '抛丸计划日期', minWidth: "120",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'hxrq', title: '划线计划日期', minWidth: "120",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'qgrq', title: '切割计划日期', minWidth: "120",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'pkcd', title: '坡口长度', minWidth: "110",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'pkrq', title: '坡口计划日期', minWidth: "130",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'dmcd', title: '打磨长度', width: 100,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'dmrq', title: '打磨计划日期', minWidth: "130",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'qbs', title: '曲标识', width: 100,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'qjgrq', title: '曲加工计划日期', minWidth: "140",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'gjjsDz', title: '钢料滚动需求期(大组)', minWidth: "160",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'ljsl', title: '零件数量', width: 100,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'dcCh2', title: '本船号', width: 100,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'zt', title: '状态', width: 70, formatter: ['dictFormat', 'SYZT'],
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'gxsj', title: '数据更新时间', minWidth: "130",
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
],
}
},
methods:{
//
selectAllEvent() {
const records = this.$refs.xGrid.getCheckboxRecords();
this.checkedList = records;
},
//
selectChangeEvent() {
const records = this.$refs.xGrid.getCheckboxRecords();
this.checkedList = records;
},
cellStyle2({row}) {
if (this.gcrl.includes(row.jssj)) {
return {
color: 'red',
cursor: 'pointer'
}
}
},
}
}
</script>

@ -0,0 +1,64 @@
<template>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="前方三月需求计划" name="first">
<Sygdxqjh :height="height" :list="list" />
</el-tab-pane>
<el-tab-pane label="线表信息" name="second">
<Xbjh :height="height" :list="list1" />
</el-tab-pane>
<el-tab-pane label="批量信息" name="third">
<Plxx :height="height" :list="list2" />
</el-tab-pane>
<el-tab-pane label="板材需求" name="">
<Bcxq :height="height" :list="list4" />
</el-tab-pane>
<el-tab-pane label="跨位信息" name="fourth">
<Kwxx :height="height" :list="list3" />
</el-tab-pane>
</el-tabs>
</template>
<script>
import Sygdxqjh from "@/views/dashboard/components/fd/child/sygdxqjh.vue";
import Xbjh from "@/views/dashboard/components/fd/child/xbjh.vue";
import Plxx from "@/views/dashboard/components/fd/child/plxx.vue";
import Kwxx from "@/views/dashboard/components/fd/child/kwxx.vue";
import Bcxq from "@/views/dashboard/components/fd/child/bcxq.vue";
export default {
name:'Tabs',
components: {Bcxq, Kwxx, Plxx, Xbjh, Sygdxqjh},
props:{
data:Object
},
data(){
return {
activeName: 'first',
height: '500px',
list:[],
list1:[],
list2:[],
list3:[],
list4:[],
}
},
created() {
window.addEventListener('resize', this.getHeight)
this.getHeight()
},
methods:{
showData(fd){
this.list1=this.data.list1
this.list2=this.data.list2
this.list3=this.data.list3
this.list4=this.data.list4
},
handleClick(tab, event) {
},
getHeight() {
this.height = window.innerHeight - 718+'px'
},
}
}
</script>

@ -0,0 +1,209 @@
<template>
<div class="mytable">
<vxe-grid
id="id1"
ref="xGrid1"
border
resizable
keep-source
:align="'center'"
:height="height"
:auto-resize="true"
:columns="tableColumn1"
highlight-current-row
:data="list"
:custom-config="{ storage: true }"
:span-method="rowspanMethod"
:cell-style="cellStyle"
:row-style="rowClassName"
highlight-hover-row
show-overflow
show-header-overflow
@cell-dblclick="cellClickEvent_xb"
:scroll-y="{enabled: true}"
>
<template #numMx5="{ items, _columnIndex }">
<span style="color: red">{{ items[_columnIndex] }}</span>
</template>
</vxe-grid>
</div>
</template>
<script>
export default {
name:'Xbjh',
props:{
height:String,
list:Array,
},
data(){
return {
tableColumn1: [
{type: 'seq', width: 60, title: '序号', fixed: "left"},
{
field: 'nf', title: '年份', width: 100,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'yf', title: '月份', width: 100,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'dcCh', title: '船号', width: 100,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'zl', title: 'a=线表重量(吨)', width: 170,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'tlt_zl', title: 'b=套料图实耗重量(吨)', width: 170,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
{
field: 'xczl', title: 'b-a=差值重量(吨)', width: 170,
filters: [{
data: {
checks: [],
sVal: '',
sMenu: '',
fType1: '',
fVal1: '',
fMode: 'and',
fType2: '',
fVal2: ''
}
}],
filterRender: {name: 'FilterCombination',}
},
],
}
},
methods:{
cellClickEvent_xb(row) {
this.mxList = row.row.mxList
this.dialogVisible1 = true
},
rowClassName({row, rowIndex}) {
if (row.dcCh === '合计') {
return {
backgroundColor: 'lightblue',
cursor: 'pointer'
}
}
return null
},
//
cellStyle({row, column, rowIndex, columnIndex}) {
let fields = ['tlt_zl', 'jsq_dz_pc', 'jsq_xz_pc', 'tzxqq', 'tlt_sl', 'hx_cd', 'qg_cd', 'gcxqq'];
if (fields.includes(column.property)) {
return {
color: '#CC8B04',
cursor: 'pointer'
}
}
},
rowspanMethod({row, _rowIndex, column, visibleData}) {
//vxe-grid :scroll-y="{enabled: false}"
//
let fields = ['nf', 'yf', 'rq', 'tzxqq','kw','ch',];//
const cellValue = row[column.property];//
if (cellValue && fields.includes(column.property)) {
const prevRow = visibleData[_rowIndex - 1];
let nextRow = visibleData[_rowIndex + 1];
if (prevRow && prevRow[column.property] === cellValue) {
//
return {rowspan: 0, colspan: 0};
} else {
//
let countRowspan = 1;
while (nextRow && nextRow[column.property] === cellValue) {
nextRow = visibleData[++countRowspan + _rowIndex];
}
if (countRowspan > 1) {
return {rowspan: countRowspan, colspan: 1};
}
}
}
},
//
selectAllEvent() {
const records = this.$refs.xGrid.getCheckboxRecords();
this.checkedList = records;
},
//
selectChangeEvent() {
const records = this.$refs.xGrid.getCheckboxRecords();
this.checkedList = records;
},
cellStyle2({row}) {
if (this.gcrl.includes(row.jssj)) {
return {
color: 'red',
cursor: 'pointer'
}
}
},
}
}
</script>

@ -0,0 +1,151 @@
<template>
<div class="mytablefdt" style="display: flex;justify-content: center;align-items: center;">
<vxe-grid
id="id"
ref="xGridFd"
:empty-text="emtext"
:height="520"
resizable
:columns="tableColumn"
:data="tableData"
:show-header="false"
align="center"
@cell-click="cellClick"
border=none
:cell-style="cellStyle"
>
</vxe-grid>
</div>
</template>
<script>
export default {
name:'Zgt',
props:{
czbh:String,
},
data(){
return{
columns:[],
tableData:[],
tableColumn: [],
tableDataMainAll:[],
fds:[],
emtext:''
}
},
methods:{
show(res){
this.tableColumn=[]
this.emtext=this.czbh+"尚未定义直观图请于分段制造部管理人员联系!"
if(res.success) {
const col = res.data.col;
for (let i = 0; i <= col; i++) {
let ii = i + '';
let aaa = 'column' + ii.padStart(3, '0');
this.columns.push(aaa);
let temp1 = {
title: `111`, width: "35px", field: `column${ii.padStart(3, '0')}`, type: "html",
slots: {
// 使 JSX
default: ({row, column}) => {
return [
<a>{row[column.property]}</a>
]
}
}
};
this.tableColumn.push(temp1)
}
this.tableData=res.data.data
this.tableDataMainAll=res.data.fdqk
this.fds=res.data.fd
}
},
cellClick({row,column}){
if( row[column.field] ==='' || row[column.field]===undefined || row[column.field]===null){
return
}else{
this.$confirm('是否选择'+ row[column.field] +'分段数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
distinguishCancelAndClose: false,
type: 'warning'
}).then(type => {
this.row = row
this.column = column
this.tableDataMain = this.tableDataMainAll.filter((item) => {
return item.fdh == row[column.field];
});
})
}
},
cellStyle({ row, rowIndex, column }) {
for(let index of this.fds) {
if(index.fdh===row[column.property]){
if(index.color==='green'){
if (this.row === row && this.column === column) {
return {
backgroundColor: '#00FF00',
border:'1px solid black',
color:'blue'
}
}else{
return {
backgroundColor: '#00FF00',
border:'1px solid black',
color:'black'
}
}
}
if(index.color==='yellow'){
if (this.row === row && this.column === column) {
return {
backgroundColor: '#FFFF00',
border:'1px solid black',
color:'blue'
}
}else{
return {
backgroundColor: '#FFFF00',
border:'1px solid black',
color:'black'
}
}
}
if(index.color==='red'){
if (this.row === row && this.column === column) {
return {
backgroundColor: '#FF0000',
border:'1px solid black',
color:'blue'
}
}else{
return {
backgroundColor: '#FF0000',
border:'1px solid black',
color:'black'
}
}
}
}
}
if(row[column.property]){
if (this.row === row && this.column === column) {
return {
border:'1px solid black',
color:'blue'
}
}else{
return {
border:'1px solid black',
color:'black'
}
}
}
},
}
}
</script>

File diff suppressed because it is too large Load Diff

@ -69,7 +69,7 @@ export default {
.dashboard-editor-container {
background-color: #e3e3e3;
min-height: 100vh;
height: 70vh;
padding: 10px;
.pan-info-roles {
font-size: 12px;

@ -2348,7 +2348,7 @@ export default {
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
],
],
}
},
computed: {

Loading…
Cancel
Save