fix:fmlog改动,以及大屏改动

This commit is contained in:
shijing 2024-11-28 16:43:30 +08:00
parent ffc95890fa
commit 0d9afd42e0
2 changed files with 156 additions and 157 deletions

View File

@ -104,7 +104,7 @@
<div>设备运转状态</div> <div>设备运转状态</div>
</div> </div>
<div class="itemBody"> <div class="itemBody">
<div id="eqPieChart" style="width: 310px;height: 220px;"></div> <div id="eqPieChart" style="width:16vw;height:20vh;"></div>
</div> </div>
</div> </div>
</div> </div>
@ -112,7 +112,7 @@
<div class="flexItem"> <div class="flexItem">
<div class="itemTitle2"> <div class="itemTitle2">
<div>库存</div> <div>库存</div>
<el-carousel height="40px" :interval="30000" indicator-position="none" <el-carousel height="4vh" :interval="30000" indicator-position="none"
style="position: absolute;top: 0;right: 0;width: 100px;"> style="position: absolute;top: 0;right: 0;width: 100px;">
<el-carousel-item> <el-carousel-item>
<div style="color: #ffffff; z-index: 10;font-size: 18px;">成品库</div> <div style="color: #ffffff; z-index: 10;font-size: 18px;">成品库</div>
@ -123,7 +123,7 @@
</el-carousel> </el-carousel>
</div> </div>
<div class="itemBody itemBody1"> <div class="itemBody itemBody1">
<el-carousel height="140px" :interval="30000" indicator-position="none"> <el-carousel height="14vh" :interval="30000" indicator-position="none">
<el-carousel-item> <el-carousel-item>
<dv-scroll-board <dv-scroll-board
:config="configDataProd" :config="configDataProd"
@ -145,11 +145,11 @@
<div>质量分析</div> <div>质量分析</div>
</div> </div>
<div class="itemBody3"> <div class="itemBody3">
<scEcharts height="165px" width="128px" :option="options"></scEcharts> <scEcharts :height="pieHeight" :width="pieWidth" :option="options"></scEcharts>
<scEcharts height="165px" width="128px" :option="option1"></scEcharts> <scEcharts :height="pieHeight" :width="pieWidth" :option="option1"></scEcharts>
<scEcharts height="165px" width="128px" :option="option2"></scEcharts> <scEcharts :height="pieHeight" :width="pieWidth" :option="option2"></scEcharts>
<scEcharts height="165px" width="128px" :option="option3"></scEcharts> <scEcharts :height="pieHeight" :width="pieWidth" :option="option3"></scEcharts>
<scEcharts height="165px" width="128px" :option="option4"></scEcharts> <scEcharts :height="pieHeight" :width="pieWidth" :option="option4"></scEcharts>
</div> </div>
</div> </div>
</div> </div>
@ -159,7 +159,7 @@
<div class="itemTitleIcon"></div> <div class="itemTitleIcon"></div>
<div>实时视频</div> <div>实时视频</div>
</div> </div>
<div class="itemBody"> <div class="itemBody" style="height: 32.5vh;">
<video width="100%" height="100%" autoplay controls loop> <video width="100%" height="100%" autoplay controls loop>
<!-- <source :src="videoUrl" type="video/mp4"> --> <!-- <source :src="videoUrl" type="video/mp4"> -->
<source src="img/gx/gx_video.mp4" type="video/mp4"> <source src="img/gx/gx_video.mp4" type="video/mp4">
@ -174,46 +174,17 @@
<div class="itemBody"> <div class="itemBody">
<div class="viewsItem" v-for="articleItem in articleList" :key="articleItem.id"> <div class="viewsItem" v-for="articleItem in articleList" :key="articleItem.id">
<div class="viewsItem_wrap"> <div class="viewsItem_wrap">
<!-- <img style="float: left;" class="viewsItem_img" src="img/gz_logo.png"> -->
<img style="float: left;" class="viewsItem_img" :src="articleItem.poster"> <img style="float: left;" class="viewsItem_img" :src="articleItem.poster">
<article> <article>
{{ articleItem.content }} {{ articleItem.content }}
</article> </article>
</div> </div>
</div> </div>
<div class="viewsItem">
<div class="viewsItem_wrap">
<img style="float: left;" class="viewsItem_img" src="img/gz_logo.png">
<article>
紧绷安全弦筑牢防护网光芯科技开展五一节前安全生产大检查紧绷安全弦筑牢防护网光芯科技开展五一节前安全生产大检查
</article>
</div>
</div>
<!-- <div class="viewsItem">
<div class="viewsItem_wrap">
<img style="float: left;" class="viewsItem_img" src="img/gz_logo.png">
<article>
紧绷安全弦筑牢防护网光芯科技开展五一节前安全生产大检查紧绷安全弦筑牢防护网光芯科技开展五一节前安全生产大检查
</article>
</div>
</div> -->
</div> </div>
</div> </div>
</div> </div>
<div class="bottom_block"> <div class="bottom_block">
<div id="scroll" class="bottom_block2"> <div id="scroll" class="bottom_block2">
<!-- <div class="flexItem3">
<div class="itemTitle itemTitle_b">
<div>切片</div>
</div>
<div class="itemBody">
<dv-scroll-board
:config="configData0"
class="inmBoxmain"
/>
</div>
</div> -->
<div class="flexItem3"> <div class="flexItem3">
<div class="flexItem3_title">切片</div> <div class="flexItem3_title">切片</div>
<div class="flexItem3Body"> <div class="flexItem3Body">
@ -221,7 +192,7 @@
:config="configData0" :config="configData0"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options0"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options0"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -231,7 +202,7 @@
:config="configData2" :config="configData2"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options2"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options2"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -241,7 +212,7 @@
:config="configData3" :config="configData3"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options3"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options3"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -251,7 +222,7 @@
:config="configData4" :config="configData4"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options4"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options4"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -261,7 +232,7 @@
:config="configData5" :config="configData5"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options5"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options5"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -271,7 +242,7 @@
:config="configData6" :config="configData6"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options6"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options6"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -281,7 +252,7 @@
:config="configData8" :config="configData8"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options8"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options8"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -291,7 +262,7 @@
:config="configData9" :config="configData9"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options9"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options9"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -301,7 +272,7 @@
:config="configData10" :config="configData10"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options10"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options10"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -311,7 +282,7 @@
:config="configData11" :config="configData11"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options11"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options11"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -321,7 +292,7 @@
:config="configData12" :config="configData12"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options12"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options12"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -331,7 +302,7 @@
:config="configData13" :config="configData13"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options13"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options13"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -341,7 +312,7 @@
:config="configData14" :config="configData14"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options14"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options14"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -351,7 +322,7 @@
:config="configData15" :config="configData15"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options15"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options15"></scEcharts>
</div> </div>
</div> </div>
<div class="flexItem3"> <div class="flexItem3">
@ -361,7 +332,7 @@
:config="configData0" :config="configData0"
class="inmBoxmain" class="inmBoxmain"
/> />
<scEcharts width="370px" height="150px" :option="options0"></scEcharts> <scEcharts :width="lineWidth" :height="lineHeight" :option="options0"></scEcharts>
</div> </div>
</div> </div>
</div> </div>
@ -388,7 +359,7 @@ import baseUrl from "@/config";
const configData={ const configData={
header : ['物料批次','未加工','进行中','已完成','合格数'], header : ['物料批次','未加工','进行中','已完成','合格数'],
headerBGC : '#0a3f44', headerBGC : '#0a3f44',
rowNum : 3, rowNum : 4,
headerHeight : 35, headerHeight : 35,
align : 'center', align : 'center',
waitTime : 150000, waitTime : 150000,
@ -691,14 +662,22 @@ export default {
options15:{}, options15:{},
articleList:[], articleList:[],
videoUrl:'', videoUrl:'',
pieWidth:0,
lineWidth:0,
pieHeight:0,
lineHeight:0,
}; };
}, },
mounted() { mounted() {
let that = this; let that = this;
that.initFactory(); var windowHeight = window.innerHeight;
var windowWidth = window.innerWidth;
that.pieWidth =Math.round((windowWidth/100*33)/5)+'px';
that.pieHeight = Math.round((windowHeight/100)*13)+'px';
that.lineWidth = (windowWidth/5-10)+'px';
that.lineHeight = (windowHeight/100)*12.5+'px';
that.bigScreenName = that.$TOOL.data.get("BASE_INFO").base.bigScreen_name; that.bigScreenName = that.$TOOL.data.get("BASE_INFO").base.bigScreen_name;
that.showTime();
that.addListener();
// //
let nowDate = new Date(); let nowDate = new Date();
let year = nowDate.getFullYear(); let year = nowDate.getFullYear();
@ -716,14 +695,7 @@ export default {
} }
// dayArr.push(day); // dayArr.push(day);
that.dayArr = dayArr; that.dayArr = dayArr;
that.getEquipments();
that.getMaterials();
that.getMgroup();
that.getTaskNumber();
that.addListener();
that.setIntervalFun();
that.getQulity();
that.getArticles();
that.myChart = echarts.init(document.getElementById('eqPieChart')); that.myChart = echarts.init(document.getElementById('eqPieChart'));
that.myChart.setOption(that.option_eq); that.myChart.setOption(that.option_eq);
let index2 = 0; let index2 = 0;
@ -748,6 +720,19 @@ export default {
index2 = 0; index2 = 0;
} }
}, 3000); }, 3000);
that.$nextTick(function () {
that.getEquipments();
that.getMaterials();
that.getMgroup();
that.getTaskNumber();
that.addListener();
that.setIntervalFun();
that.getQulity();
that.getArticles();
that.initFactory();
that.showTime();
that.addListener();
})
}, },
methods: { methods: {
// //
@ -826,16 +811,18 @@ export default {
// //
setIntervalFun(){ setIntervalFun(){
let that = this; let that = this;
let containerWidth = document.getElementsByClassName("container")[0].offsetWidth;
let wdiths = containerWidth/5;
that.scrollInterval = setInterval(() => { that.scrollInterval = setInterval(() => {
if(that.scrollNum>8){ if(that.scrollNum>8){
that.scrollNum = 0; that.scrollNum = 0;
}else{ }else{
that.scrollNum++; that.scrollNum++;
} }
let nums = that.scrollNum * 384; let nums = that.scrollNum * wdiths;
let lefts = 0-nums; let lefts = 0-nums;
document.getElementById("scroll").style.left = lefts +'px'; document.getElementById("scroll").style.left = lefts +'px';
},6000) },600000)
}, },
// //
showTime() { showTime() {
@ -871,6 +858,10 @@ export default {
var windowWidth = window.innerWidth; var windowWidth = window.innerWidth;
var container = document.getElementsByClassName("container")[0]; var container = document.getElementsByClassName("container")[0];
var model = document.getElementsByClassName("model")[0]; var model = document.getElementsByClassName("model")[0];
that.pieWidth = windowWidth/500*33+'px';
that.lineWidth = (windowWidth/5-10)+'px';
that.pieHeight = windowHeight/100*13+'px';
that.lineHeight = windowHeight/100*12.8+'px';
if (windowWidth > 960) { if (windowWidth > 960) {
container.style.overflow = "hidden"; container.style.overflow = "hidden";
model.style.position = "absolute"; model.style.position = "absolute";
@ -1191,17 +1182,17 @@ export default {
.container { .container {
/* background: url("/public/img/gx/gx_bj.jpg") no-repeat; */ /* background: url("/public/img/gx/gx_bj.jpg") no-repeat; */
background-size: cover; background-size: cover;
height: 1080px; height: 100vh;
width: 1920px; width: 100vw;
position: relative; position: relative;
} }
/* header-start */ /* header-start */
.pageHeader { .pageHeader {
z-index: 100; z-index: 100;
height: 70px; height: 6.48vh;
width: 1920px; width: 100vw;
padding: 0 20px; padding: 0 1vw;
line-height:70px; line-height:6.48vh;
color: #ffffff; color: #ffffff;
position: absolute; position: absolute;
text-align: center; text-align: center;
@ -1210,30 +1201,30 @@ export default {
/* border-bottom: 1px solid rgba(54, 217, 187, 0.3); */ /* border-bottom: 1px solid rgba(54, 217, 187, 0.3); */
} }
.header_left{ .header_left{
position: absolute;top: 0;left: 10px;font-size: 18px; position: absolute;top: 0;left: 1vw;font-size: 18px;
} }
.header_center_text{ .header_center_text{
font-family: myfont;letter-spacing: 0.2em; font-size: 38px;line-height:53px;z-index: 100; font-family: myfont;letter-spacing: 0.2em; font-size: 3vh;line-height:5vh;z-index: 100;
} }
.header_right{ .header_right{
position: absolute;top: 0;right: 10px;font-size: 18px; position: absolute;top: 0;right: 1vw;font-size: 18px;
} }
.header_bg{ .header_bg{
z-index: -1;position: absolute;top:0;left:0;width:1920px;height:70px; z-index: -1;position: absolute;top:0;left:0;width:100vw;height:6.48vh;
} }
.header_line{ .header_line{
top:65px; top:6vh;
height: 1px; height: 1px;
position: absolute; position: absolute;
background: rgb(54,217,187); background: rgb(54,217,187);
} }
.header_line1{ .header_line1{
width: 10px; width: 0.5vw;
right: 160px; right: 8vw;
} }
.header_line2{ .header_line2{
width: 20px; width: 1.5vw;
right: 80px; right: 4vw;
} }
/* header-end */ /* header-end */
@ -1241,8 +1232,8 @@ export default {
.left_block, .left_block,
.left_block2, .left_block2,
.right_block{ .right_block{
top:74px; top:6.48vh;
width:320px; width:16.5vw;
z-index: 10; z-index: 10;
display: flex; display: flex;
position:absolute; position:absolute;
@ -1254,65 +1245,67 @@ export default {
background: rgba(9, 31, 43, 0.5); background: rgba(9, 31, 43, 0.5);
} }
.left_block3{ .left_block3{
top:340px; top:31.48vh;
left: 0; left: 0;
width:640px; width:33vw;
display: flex; display: flex;
position:absolute; position:absolute;
overflow:hidden; overflow:hidden;
flex-direction: column; flex-direction: column;
padding: 0 5px; padding: 0 5px;
height: 400px; height: 37vh;
background: rgba(9, 31, 43, 0.5); background: rgba(9, 31, 43, 0.5);
} }
.left_block3 .flexItem{ .left_block3 .flexItem{
width:630px; width:32.8vw;
height: 38vh;
} }
.left_block { .left_block {
left: 0; left: 0;
height: 270px; height: 25vh;
} }
.right_block { .right_block {
right: 0; right: 0;
width:640px; width:33vw;
height: 670px; height: 62vh;
} }
.left_block2{ .left_block2{
left: 320px; left: 16.5vw;
height: 270px; height: 25vh;
padding: 0 5px; padding: 0 5px;
} }
.left_block2 .flexItem{ .left_block2 .flexItem{
width:310px; width:16vw;
} }
.flexItem{ .flexItem{
width: 310px; width: 16.5vw;
} }
.videoFlexItem{ .videoFlexItem{
width: 630px; width: 32.8vw;
height: 400px; height: 37vh;
} }
.newsFlexItem{ .newsFlexItem{
width: 620px; width: 32.8vw;
height: 270px; height: 25vh;
} }
/* //短标题 */ /* //短标题 */
.itemTitle{ .itemTitle{
color: #fff; color: #fff;
height:45px; height: 4.2vh;
padding-left: 1.5em; padding-left: 1.5em;
font-size: 16px; font-size: 1.3vh;
line-height: 40px; line-height: 4vh;
width: 16vw;
background-size: 100% 100%; background-size: 100% 100%;
background-image: url("/public/img/gx/title_bg2.png"); background-image: url("/public/img/gx/title_bg2.png");
} }
/* //长标题 */ /* //长标题 */
.itemTitle2 { .itemTitle2 {
color: #fff; color: #fff;
height:45px; height:4.2vh;
padding-left: 1.5em; padding-left: 1.5em;
font-size: 16px; font-size: 1.3vh;
line-height: 40px; line-height: 4vh;
background: url("/public/img/gx/title_bg.png") ; background: url("/public/img/gx/title_bg.png") ;
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
@ -1329,7 +1322,7 @@ export default {
} }
.block1NumberWrap{ .block1NumberWrap{
width:135px; width:7.5vw;
border: 1px solid rgba(54, 217, 187, 0.3); border: 1px solid rgba(54, 217, 187, 0.3);
padding: 3px; padding: 3px;
text-align: center; text-align: center;
@ -1337,20 +1330,20 @@ export default {
.block1Numberinner{ .block1Numberinner{
background: rgba(54, 217, 187, 0.3); background: rgba(54, 217, 187, 0.3);
color: #fff; color: #fff;
height:64px; height: 6vh;
line-height:80px; line-height: 7.5vh;
position: relative; position: relative;
} }
.block1Text{ .block1Text{
top: 0; top: 0;
left: 10px; left: 10px;
height: 30px; height: 2vh;
line-height: 30px; line-height: 2vh;
position: absolute; position: absolute;
font-size: 14px; font-size: 0.8vh;
} }
.block1Number{ .block1Number{
font-size: 26px; font-size: 1.6vh;
vertical-align: bottom; vertical-align: bottom;
margin: 0 0.5em; margin: 0 0.5em;
color: orange; color: orange;
@ -1374,7 +1367,7 @@ export default {
display: flex; display: flex;
} }
.boxmain{ .boxmain{
height: 140px; height: 13vh;
width:100%; width:100%;
margin:auto; margin:auto;
} }
@ -1384,7 +1377,7 @@ export default {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
height: 340px; height: 31vh;
overflow: hidden; overflow: hidden;
} }
.bottom_block2{ .bottom_block2{
@ -1392,22 +1385,22 @@ export default {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
height: 340px; height: 31.4vh;
display: flex; display: flex;
transition: left 2s ease; transition: left 2s ease;
} }
.flexItem3 { .flexItem3 {
width: 384px; width: 20vw;
height: 340px; height: 31.5vh;
position: relative; position: relative;
background: rgba(9, 31, 43, 0.5) background: rgba(9, 31, 43, 0.5)
} }
.flexItem3_title{ .flexItem3_title{
left: 50%; left: 50%;
width: 150px; width: 7.8vw;
height: 30px; height: 2.8vh;
line-height: 28px; line-height: 2.5vh;
font-size: 16px; font-size: 16px;
color: #00ffff; color: #00ffff;
text-align: center; text-align: center;
@ -1416,24 +1409,24 @@ export default {
box-shadow: inset 0 0 5px 5px rgb(0 255 255 / 32%); box-shadow: inset 0 0 5px 5px rgb(0 255 255 / 32%);
z-index: 99; z-index: 99;
position: absolute; position: absolute;
top: 0; top: 0.6vh;
transform: translateX(-50%); transform: translateX(-50%);
background: rgb(4 50 83); background: rgb(4 50 83);
} }
.flexItem3Body{ .flexItem3Body{
width: 380px; width: 19.8vw;
height: 315px; height: 28.5vh;
padding-top: 25px; padding-top: 2.3vh;
border: 1px solid #00ffff; border: 1px solid #00ffff;
border-radius: 5px; border-radius: 5px;
position: absolute; position: absolute;
top: 15px; top: 2vh;
box-shadow: inset 0 0 15px 5px rgb(0 255 255 / 32%); box-shadow: inset 0 0 15px 5px rgb(0 255 255 / 32%);
} }
.inmBoxmain{ .inmBoxmain{
flex: 1; flex: 1;
height:140px; height:12.96vh;
width:98%; width:98%;
margin:auto; margin:auto;
/* border-left: 2px solid #0f5b8e; */ /* border-left: 2px solid #0f5b8e; */
@ -1444,21 +1437,21 @@ export default {
} }
.viewsItem { .viewsItem {
color: #ffffff; color: #ffffff;
width: 620px; width: 32.3vw;
height: 100px; height: 9.26vh;
font-size: 15px; font-size: 15px;
display: inline-block; display: inline-block;
margin-bottom: 10px; margin-bottom: 1vh;
} }
.viewsItem_wrap { .viewsItem_wrap {
height: 100px; height: 9.26vh;
flex-direction: column; flex-direction: column;
border-left: 5px solid rgba(28, 169, 231, 0.81); border-left: 5px solid rgba(28, 169, 231, 0.81);
padding-left: 10px; padding-left: 10px;
border-radius: 5px; border-radius: 5px;
} }
.viewsItem_img{ .viewsItem_img{
width: 85px; width: 4.4vw;
margin-top: 10px; margin-top: 10px;
} }
article{ article{

View File

@ -18,14 +18,33 @@
> >
<el-row> <el-row>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="工艺路线" prop="route"> <el-form-item label="关联任务" prop="mtask">
<el-select
v-model="form.mtask"
placeholder="关联任务"
clearable
style="width: 100%"
@change="changeMtask"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.number"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="工艺路线">
<el-select <el-select
v-model="form.route" v-model="form.route"
placeholder="工艺路线" placeholder="工艺路线"
clearable clearable
disabled
filterable filterable
style="width: 100%" style="width: 100%"
:disabled="mode == 'edit'"
> >
<el-option <el-option
v-for="item in routeOptions" v-for="item in routeOptions"
@ -42,25 +61,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24">
<el-form-item label="关联任务">
<el-select
v-model="form.mtask"
placeholder="关联任务"
clearable
style="width: 100%"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.number"
:value="item.id"
>
<!-- <span>{{ item.material_out_name }}</span>/ -->
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="备注"> <el-form-item label="备注">
<el-input <el-input
@ -129,11 +129,10 @@ export default {
form: Object.assign({}, defaultForm), form: Object.assign({}, defaultForm),
// //
rules: { rules: {
mtask: [
route: [
{ {
required: true, required: true,
message: "请选择工艺路线", message: "请选择任务",
trigger: "blur", trigger: "blur",
}, },
], ],
@ -185,7 +184,14 @@ export default {
Object.assign(this.form, data); Object.assign(this.form, data);
this.getRoute(data.id); this.getRoute(data.id);
}, },
changeMtask(){
let that = this;
that.options.forEach((item) => {
if(item.id == that.form.mtask){
that.form.route = item.route;
}
})
},
// //
submit() { submit() {
let that = this; let that = this;