SignalSend 添加

This commit is contained in:
2022-09-19 14:57:59 +08:00
parent ea8f39820e
commit ddb4607070
5 changed files with 170 additions and 15 deletions

View File

@@ -18,16 +18,12 @@ export const instOperation = (uuid, type) => post('api/andxy2/hand/inst', {
inst_uuid: uuid,
type: type
})
// 任务管理
// 1.1 查询未完成指令
export const queryTask = (keyword, scode, ncode) => post('api/andxy2/hand/tasks', {
keyword: keyword,
start_devicecode: scode,
next_devicecode: ncode
})
// 1.2 指令操作
export const taskOperation = (uuid, type) => post('api/andxy2/hand/taskoperation', {
inst_uuid: uuid,
type: type
// 信号下发
// 1.3下发设备信号
export const putPoint = (val1, val2, val3, val4, val5) => post('api/hand/putPoint', {
outer_diameter: val1,
length: val2,
color: val3,
jackup_num: val4,
strap_number: val5
})

View File

@@ -17,6 +17,7 @@
<div class="menu">
<ul>
<li @click="toSure('zlmanage')">指令管理</li>
<li @click="toSure('SignalSend')">信号下发</li>
</ul>
</div>
</div>

View File

@@ -0,0 +1,152 @@
<template>
<div class="inner-wrap">
<nav-bar title="信号下发"></nav-bar>
<div class="wrap2">
<div class="wrap-filter-button">
<div class="wrap-filter clearfix">
<div class="fl filter_item">
<div class="filter_input">
<label class="filter-label">管径mm</label>
<div class="iliblock">
<input type="number" class="input" v-model="val1">
</div>
</div>
</div>
<div class="fl filter_item">
<div class="filter_input">
<label class="filter-label">管长mm</label>
<div class="iliblock">
<input type="number" class="input" v-model="val2">
</div>
</div>
</div>
<div class="fl filter_item">
<div class="filter_input">
<label class="filter-label">颜色</label>
<div class="iliblock from_item">
<el-select v-model="val3" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</div>
</div>
<div class="fl filter_item">
<div class="filter_input">
<label class="filter-label">合格提升每次提升根数</label>
<div class="iliblock">
<input type="number" class="input" v-model="val4">
</div>
</div>
</div>
<div class="fl filter_item">
<div class="filter_input">
<label class="filter-label">每捆根数</label>
<div class="iliblock">
<input type="number" class="input" v-model="val5">
</div>
</div>
</div>
</div>
<div class="wrap-button clearfix">
<button class="button--primary" :disabled="disabled1" @click="toSure">确认</button>
</div>
</div>
</div>
</div>
</template>
<script>
import {putPoint} from '@config/getData'
import NavBar from '@components/NavBar.vue'
export default {
name: 'SignalSend',
components: {
NavBar
},
data () {
return {
val1: '',
val2: '',
val3: '',
val4: '',
val5: '',
options: [
{
value: '1',
label: '1蓝'
},
{
value: '2',
label: '2黑'
},
{
value: '3',
label: '3红'
},
{
value: '4',
label: '4白'
},
{
value: '5',
label: '5黄'
},
{
value: '6',
label: '6绿'
},
{
value: '7',
label: '7粉'
},
{
value: '8',
label: '8墨绿'
},
{
value: '9',
label: '9紫'
}
],
disabled1: false
}
},
mounted () {
},
methods: {
async putPoint () {
try {
let res = await putPoint(this.val1, this.val2, this.val3, this.val4, this.val5)
if (res.code === '1') {
this.toast('操作成功')
} else {
this.Dialog(res.desc)
}
this.disabled1 = false
} catch (err) {
console.log(err)
this.disabled1 = false
}
},
toSure () {
this.putPoint()
}
}
}
</script>
<style lang="stylus" scoped>
.wrap-filter-button
padding 0.05rem 0.2rem
margin 0
.wrap-button
margin 0.01rem auto
.filter-table
margin 0.08rem 0
.filter_item
margin 0.08rem 0 0 0
</style>

View File

@@ -5,6 +5,7 @@ const Login = r => require.ensure([], () => r(require('@page/Login')), 'Login')
const ZlManage = r => require.ensure([], () => r(require('@page/proj/ZlManage')), 'ZlManage')
const HomePage = r => require.ensure([], () => r(require('@page/proj/HomePage')), 'HomePage')
const SignalSend = r => require.ensure([], () => r(require('@page/proj/SignalSend')), 'SignalSend')
Vue.use(Router)
@@ -26,6 +27,10 @@ export default new Router({
{
path: '/zlmanage',
component: ZlManage
},
{
path: '/SignalSend',
component: SignalSend
}
]
})

View File

@@ -192,8 +192,9 @@ header
display flex
justify-content space-between
.filter-label
font-size 0.12rem
color #464646
width .6rem
width 1.2rem
line-height .3rem
height .3rem
text-align justify
@@ -275,7 +276,7 @@ header
display inline-block
// width calc(100% - .8rem)
width 100%
height .3rem
height .4rem
line-height .3rem
font-size .13rem
color #606266
@@ -507,7 +508,7 @@ header
cursor: not-allowed
.iliblock
flex 1
margin-left .2rem
margin-left .05rem
position relative
.filter-scan
display: block