<template>
|
<el-dialog
|
:close-on-click-modal="false"
|
:visible.sync="islook"
|
width="600px"
|
class="add-event-dialog"
|
@close="shutdown"
|
>
|
<div slot="title" class="tac drawerHeader">控制</div>
|
<div class="dialog-content-box">
|
<div style=" margin: auto; width: 240px;overflow:hidden;margin-bottom:30px;">
|
<div class="circel">
|
<div class="circel-two"></div>
|
</div>
|
<div class="circel-text">
|
<div class="circel-text-t"> 钢管外壁厚度</div>
|
<div class="circel-text-b">
|
<span>3</span>mm
|
</div>
|
</div>
|
</div>
|
<div class="color_red">请仔细校对钢管外壁厚度及工艺参数,5 秒钟后可下发参数!</div>
|
<div style="color:#333;font-size:15px; font-weight:700;margin-bottom:10px;">工艺参数</div>
|
<el-form
|
ref="form"
|
label-width="80px"
|
label-position="left"
|
>
|
<div v-for="(item,index) in Arr" :key="index">
|
<el-form-item :label="item.Key" prop="estimateHour" class="form-item">
|
<el-input
|
v-model="item.Value"
|
placeholder="请输入"
|
disabled
|
></el-input>
|
</el-form-item>
|
</div>
|
</el-form>
|
</div>
|
<div slot="footer" class="dialog-footer tac">
|
<el-button @click="shutdown">关闭</el-button>
|
|
<el-button type="primary" @click="onSubmit()">下发参数</el-button>
|
</div>
|
</el-dialog>
|
</template>
|
|
<script>
|
|
import {
|
startTask,
|
sendProcessParams
|
} from "@/api/home/index"; // 产线
|
export default {
|
components: {},
|
props: {
|
Arr:{
|
type: [Array],
|
default: () => {
|
return [];
|
},
|
}
|
},
|
data() {
|
return {
|
islook: false,
|
};
|
},
|
mounted() {
|
|
},
|
watch: {
|
islook(val) {
|
if (val) {
|
}
|
},
|
},
|
methods: {
|
|
validatorNum(rule, value, callback) {
|
if (value) {
|
if (value == undefined || value == null) {
|
callback(new Error("请输入有效数字"));
|
} else {
|
var reg = /^\+?[0-9]\d*$/;
|
if (!reg.test(value)) {
|
callback(new Error("请填写不小于0的数字"));
|
} else {
|
callback();
|
}
|
}
|
} else {
|
callback();
|
}
|
},
|
|
onSubmit() {
|
|
if(this.id){
|
sendProcessParams({id:this.id}).then(res=>{
|
if(res.code==200){
|
this.$message.success("下发成功!");
|
this.shutdown();
|
}
|
})
|
}else{
|
this.$message.error("当前设备没有工序!");
|
|
}
|
},
|
shutdown() {
|
this.islook = false;
|
},
|
},
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
::v-deep .el-tabs__content {
|
height: calc(100% - 55px);
|
overflow-y: auto;
|
}
|
.circel {
|
width: 100px;
|
height: 100px;
|
border-radius: 50%;
|
border: 2px solid rgba(12, 79, 218, 1);
|
position: relative;
|
float:left;
|
.circel-two {
|
width: 75px;
|
height: 75px;
|
position: absolute;
|
top: 11px;
|
left: 11px;
|
border-radius: 50%;
|
border: 2px solid rgba(12, 79, 218, 1);
|
}
|
}
|
.circel-text{
|
float:right;
|
color:#333;
|
.circel-text-t{
|
font-size:18px;
|
line-height:40px;
|
}
|
.circel-text-b{
|
font-weight: 700;
|
font-size:14px;
|
|
span{
|
color:rgba(12, 79, 218, 1);
|
font-size:38px;
|
margin-right:10px;
|
}
|
}
|
}
|
.color_red{
|
width:100%;
|
color:red;
|
margin:0 auto;
|
text-align:center;
|
font-size:14px;
|
margin-bottom:25px;
|
}
|
.form-item {
|
width: calc(50% - 20px);
|
float: left;
|
&:nth-child(odd) {
|
margin-right: 20px;
|
}
|
}
|
.form-item-two {
|
width: calc(50% - 20px);
|
float: left;
|
&:nth-of-type(odd) {
|
margin-right: 20px;
|
}
|
}
|
.form-item-three {
|
width: calc(100% - 20px);
|
float: left;
|
}
|
.form-item-check {
|
width: calc(33% - 40px);
|
float: left;
|
&:nth-of-type(odd) {
|
margin-right: 20px;
|
}
|
}
|
.title {
|
width: 100%;
|
}
|
.dialog-content-box {
|
height: 400px;
|
padding-bottom: 50px;
|
overflow-y: auto;
|
padding: 0 10px;
|
.el-form {
|
overflow: hidden;
|
}
|
}
|
.num-identify {
|
padding: 5px 8px;
|
background-color: rgba(255, 153, 0, 1);
|
border-radius: 6px;
|
font-size: 14px;
|
color: #fff;
|
font-weight: 600;
|
}
|
.drawerHeader {
|
// position:relative;
|
border-bottom: 1px solid #eee;
|
height: 40px;
|
line-height: 30px;
|
color: #333;
|
font-weight: 700;
|
font-size: 18px;
|
.identify {
|
width: 80px;
|
height: 25px;
|
line-height: 25px;
|
text-align: center;
|
border: 1px solid rgba(255, 153, 0, 1);
|
border-radius: 6px;
|
font-size: 16px;
|
color: rgba(255, 153, 0, 1);
|
transform: rotate(15deg);
|
font-weight: 600;
|
margin-right: 100px;
|
margin-top: 12px;
|
float: right;
|
}
|
}
|
</style>
|