设备操控修改
This commit is contained in:
@@ -14,14 +14,6 @@
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">操作命令</span>
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">载具编码</span>
|
||||
@@ -36,7 +28,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index || !val2}" :disabled="disabled" @tap="_toCommandTP">下发输送线运动命令</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_toCommandTP">下发输送线运动命令</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -54,8 +46,6 @@
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
options: [{value: '0', text: '是'}, {value: '1', text: '否'}],
|
||||
index: '',
|
||||
val2: '',
|
||||
disabled: false
|
||||
};
|
||||
@@ -64,17 +54,14 @@
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
async _toCommandTP () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.index || !this.val2) {
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await toCommandTP(this.val1, this.index, this.val2)
|
||||
let res = await toCommandTP(this.val1, '1', this.val2)
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
@@ -86,7 +73,6 @@
|
||||
},
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
this.index = ''
|
||||
this.val2 = ''
|
||||
this.disabled = false
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
options: [{value: '0', text: '是'}, {value: '1', text: '否'}],
|
||||
options: [{value: '0', text: '停用'}, {value: '1', text: '启用'}],
|
||||
index: '',
|
||||
disabled: false
|
||||
};
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
options: [{value: '0', text: '是'}, {value: '1', text: '否'}],
|
||||
options: [{value: '0', text: '入库模式'}, {value: '1', text: '出库模式'}],
|
||||
index: '',
|
||||
disabled: false
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user