parent
14c05ca927
commit
51e20d3bde
@ -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,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
Loading…
Reference in new issue