You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
1.7 KiB
77 lines
1.7 KiB
<template>
|
|
<view class="flex flex-col items-center mx-3">
|
|
<view class="px-6 w-full">
|
|
<img class="w-full mt-16" style="height: 6rem" src="https://www.tall.wiki/staticrec/yanyuan/input-code.png" />
|
|
</view>
|
|
|
|
<myp-one ref="one" type="box" @finish="finished"></myp-one>
|
|
|
|
<view class="px-2 mt-2 w-full">
|
|
<u-button type="primary" class="w-full" @click="submit">确认</u-button>
|
|
</view>
|
|
|
|
<!-- 选择老人 -->
|
|
<u-modal
|
|
v-model="showElder"
|
|
title="选择老人"
|
|
@confirm="confirmModel"
|
|
@cancel="cancelModel"
|
|
:async-close="true"
|
|
ref="uModal"
|
|
:show-cancel-button="true"
|
|
>
|
|
<ChooseElder></ChooseElder>
|
|
</u-modal>
|
|
|
|
<!-- 设置使用者 -->
|
|
<u-modal
|
|
v-model="showUser"
|
|
title="设置使用者"
|
|
@confirm="confirmSetUserModel"
|
|
@cancel="cancelSetUserModel"
|
|
:async-close="true"
|
|
ref="uModal"
|
|
:show-cancel-button="true"
|
|
>
|
|
<ChooseUser></ChooseUser>
|
|
</u-modal>
|
|
|
|
<!-- 全局提示框 -->
|
|
<u-top-tips ref="uTips"></u-top-tips>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import toolMixin from '@/mixins/tool';
|
|
import { mapActions } from 'vuex';
|
|
import { MypOne } from './components/MypOne/MypOne';
|
|
|
|
export default {
|
|
mixins: [toolMixin],
|
|
components: { MypOne },
|
|
|
|
data() {
|
|
return { toolCode: '' };
|
|
},
|
|
|
|
methods: {
|
|
...mapActions('yanyuan', ['getBindTool']),
|
|
|
|
finished(val) {
|
|
this.toolCode = val;
|
|
},
|
|
|
|
async submit() {
|
|
try {
|
|
const params = { toolCode: this.toolCode };
|
|
await this.getBindTool(params);
|
|
this.initTool();
|
|
} catch (error) {
|
|
console.log('error: ', error);
|
|
}
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped></style>
|
|
|