101 lines
2.2 KiB
Plaintext
101 lines
2.2 KiB
Plaintext
<!-- 体征跟进 - uts-android 兼容版 -->
|
|
<template>
|
|
<view class="follow-up">
|
|
<view class="header">
|
|
<text class="header-title">体征跟进</text>
|
|
</view>
|
|
<form @submit="onSubmit">
|
|
<view class="form-group">
|
|
<text class="form-label">患者</text>
|
|
<input class="form-input" v-model="form.elder_name" disabled />
|
|
</view>
|
|
<view class="form-group">
|
|
<text class="form-label">跟进内容</text>
|
|
<textarea class="form-textarea" v-model="form.content" placeholder="请输入跟进内容" />
|
|
</view>
|
|
<button class="submit-btn" form-type="submit"><text class="btn-text">提交</text></button>
|
|
</form>
|
|
</view>
|
|
</template>
|
|
<script setup lang="uts">
|
|
import { ref, onMounted } from 'vue'
|
|
import supa from '@/components/supadb/aksupainstance.uts'
|
|
const form = ref({ elder_id: '', elder_name: '', content: '' })
|
|
|
|
const onSubmit = async () => {
|
|
if (!form.value.elder_id || !form.value.content) {
|
|
uni.showToast({ title: '请填写完整', icon: 'none' }); return
|
|
}
|
|
const insertData = { ...form.value, created_at: new Date().toISOString() }
|
|
const result = await supa.from('ec_vital_followup').insert([insertData]).execute()
|
|
if (!result.error) {
|
|
uni.showToast({ title: '提交成功', icon: 'success' }); uni.navigateBack()
|
|
} else {
|
|
uni.showToast({ title: '提交失败', icon: 'none' })
|
|
}
|
|
}
|
|
</script>
|
|
<style lang="scss">
|
|
.follow-up {
|
|
padding: 20px;
|
|
background: #f5f5f5;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.header {
|
|
padding: 20px 0 10px 0;
|
|
text-align: center;
|
|
}
|
|
|
|
.header-title {
|
|
font-size: 22px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 18px;
|
|
}
|
|
|
|
.form-label {
|
|
font-size: 15px;
|
|
color: #333;
|
|
margin-bottom: 6px;
|
|
display: block;
|
|
}
|
|
|
|
.form-input {
|
|
width: 100%;
|
|
padding: 8px 10px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
font-size: 15px;
|
|
background: #fff;
|
|
}
|
|
|
|
.form-textarea {
|
|
width: 100%;
|
|
min-height: 60px;
|
|
padding: 8px 10px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
font-size: 15px;
|
|
background: #fff;
|
|
}
|
|
|
|
.submit-btn {
|
|
width: 100%;
|
|
padding: 12px 0;
|
|
border-radius: 20px;
|
|
background: #667eea;
|
|
color: #fff;
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
border: none;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.btn-text {
|
|
color: #fff;
|
|
font-size: 16px;
|
|
}
|
|
</style> |