This commit is contained in:
2025-02-11 13:05:11 +08:00
parent 032f03375e
commit 5ee017f1e1

View File

@@ -37,23 +37,8 @@
</view>
<view class="zd-row submit-bar_new">
<button class="zd-col-7 submit-button_c" @tap="toClear">清空</button>
<button class="zd-col-15 submit-button_new" :class="{'btn-disabled': !index1 || !index2}" :disabled="disabled" @tap="toPop">确认</button>
<button class="zd-col-15 submit-button_new" :class="{'btn-disabled': !index1 || !index2 || !index3 || !index4 || !index5}" :disabled="disabled" @tap="toSure">确认</button>
</view>
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
<view class="pop-line"></view>
<view class="msg_content">
<view class="zd-row">
<view class="zd-col-24">
<span class="filter_label">确认下发任务</span>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-default" @tap.stop="show = false">关闭</button>
<button class="zd-col-11 button-primary" :disabled="disabled" @tap="_callTask">确定</button>
</view>
</view>
<view v-if="show" class="msg_mask"></view>
</view>
</template>
@@ -66,7 +51,6 @@
},
data() {
return {
show: false,
disabled: false,
options1: [],
index1: '',
@@ -175,35 +159,40 @@
this.options4 = []
this.options5 = []
},
toPop () {
if (this.index1 && this.index2 && this.index3 && this.index4) {
this.show = true
}
},
async _callTask () {
this.disabled = true
if (!this.index1 || !this.index2) {
this.disabled = false
return
}
try {
let res = await callTask(this.index1, this.index2, '3', '')
this.disabled = false
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled = false
} catch (e) {
this.disabled = false
}
},
toSure () {
this.disabled = true
if (!this.index1 || !this.index2 || !this.index3 || !this.index4 || !this.index5) {
this.disabled = false
return
}
uni.showModal({
title: '提示',
content: '确认下发任务?',
confirmColor: '#ff6a00',
success: (res) => {
if (res.confirm) {
this._callTask()
} else if (res.cancel) {
this.disabled = false
}
}
})
}
}
}
</script>
<style lang="stylus">
@import '../../common/style/mixin.styl';
.msg_wrapper
height auto
min-height 30%
</style>