77 lines
1.7 KiB
Vue
77 lines
1.7 KiB
Vue
<template>
|
|
<!-- 顶部导航栏 -->
|
|
<custom-nav-bar :left="true" leftText="" @leftClick="" title="新增任务"></custom-nav-bar>
|
|
<uni-forms ref="baseForm" :modelValue="baseFormData">
|
|
<uni-forms-item label="任务名称" required>
|
|
<uni-easyinput v-model="baseFormData.name" placeholder="请输入任务名称" />
|
|
</uni-forms-item>
|
|
<uni-forms-item label="轮灌方案" required>
|
|
<view class="select" @click="openPopup">
|
|
<view>请选择轮灌方案</view>
|
|
</view>
|
|
</uni-forms-item>
|
|
<uni-forms-item label="起始组" required>
|
|
<view class="select" @click="openPopup">
|
|
<view>请选择起始组</view>
|
|
</view>
|
|
</uni-forms-item>
|
|
<uni-forms-item label="自动调压" required>
|
|
<uni-data-checkbox v-model="baseFormData.sex" :localdata="sexs" />
|
|
</uni-forms-item>
|
|
<view class="form-btn">
|
|
<u-button type="success" size="large" text="立即执行" @click="" />
|
|
<u-button size="large" text="取消" @click="" />
|
|
</view>
|
|
</uni-forms>
|
|
<!-- 底部弹出框 -->
|
|
<uni-popup ref="popup" type="bottom">
|
|
<view class="popup-content">
|
|
<text>这是底部弹出框的内容。</text>
|
|
|
|
</view>
|
|
</uni-popup>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
// 基础表单数据
|
|
baseFormData: {
|
|
|
|
sex: 2,
|
|
|
|
},
|
|
|
|
// 单选数据源
|
|
sexs: [{
|
|
text: '是',
|
|
value: 0
|
|
}, {
|
|
text: '否',
|
|
value: 1
|
|
}],
|
|
|
|
|
|
|
|
}
|
|
},
|
|
methods: {
|
|
openPopup() {
|
|
this.$refs.popup.open();
|
|
},
|
|
closePopup() {
|
|
this.$refs.popup.close();
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
body{background-color: #fff;}
|
|
.popup-content {
|
|
padding: 20px;
|
|
background-color: #fff;
|
|
text-align: center;
|
|
}
|
|
</style> |