This commit is contained in:
@zuopngfei 2025-07-24 18:00:35 +08:00
parent a11f8e330d
commit 0ee0842bc4
9 changed files with 237 additions and 152 deletions

View File

@ -1,19 +1,7 @@
// 在登录成功后请调用 resetTokenInvalid() 重置 isTokenInvalid 标志
let isTokenInvalid = false;
const baseUrl = 'https://ddbs.1024tool.vip/'; const baseUrl = 'https://ddbs.1024tool.vip/';
let isNavigatingToLogin = false;
// 重置 token 失效标志(登录成功后调用)
export function resetTokenInvalid() {
isTokenInvalid = false;
}
function request(url, method = 'GET', data = {}) { function request(url, method = 'GET', data = {}) {
// 如果 token 已失效,直接中断请求
if (isTokenInvalid && wx.getStorageSync('access_token')) {
return Promise.reject({ code: 10103, message: '登录已失效,请重新登录' });
}
const header = { const header = {
'content-type': 'application/json', 'content-type': 'application/json',
// 有其他content-type需求加点逻辑判断处理即可 // 有其他content-type需求加点逻辑判断处理即可
@ -33,21 +21,13 @@ function request(url, method = 'GET', data = {}) {
success(res) { success(res) {
if (res.data.code) { if (res.data.code) {
if (res.data.code == 10103) { if (res.data.code == 10103) {
isTokenInvalid = true;
wx.removeStorageSync('access_token'); wx.removeStorageSync('access_token');
if (!isNavigatingToLogin) {
const pages = getCurrentPages();
const currentRoute = pages[pages.length - 1]?.route;
if (currentRoute !== 'pages/login/login') {
isNavigatingToLogin = true;
wx.navigateTo({ wx.navigateTo({
url: '/pages/login/login', url: '/pages/login/login',
complete: () => { complete: () => {
isNavigatingToLogin = false; isNavigatingToLogin = false;
} }
}); });
}
}
reject(res.data); reject(res.data);
return; return;
} }

View File

@ -1,7 +1,10 @@
import * as echarts from '../../ec-canvas/echarts.min'; import * as echarts from '../../ec-canvas/echarts.min';
import request from '~/api/request'; import request from '~/api/request';
import { heightList, weightList } from '../../assets/js/heightWeight'; import {
heightList,
weightList
} from '../../assets/js/heightWeight';
const app = getApp(); const app = getApp();
@ -11,8 +14,8 @@ Page({
return { return {
title: 'ECharts 可以在微信小程序中使用啦!', title: 'ECharts 可以在微信小程序中使用啦!',
path: '/pages/index/index', path: '/pages/index/index',
success: function () { }, success: function () {},
fail: function () { } fail: function () {}
} }
}, },
data: { data: {
@ -23,43 +26,34 @@ Page({
lazyLoad: true lazyLoad: true
}, },
activeIndex: 0, activeIndex: 0,
sfData:{}, sfData: {},
sfListLength: 0, sfListLength: 0,
articles:[], articles: [],
articlesLength: 0, articlesLength: 0,
heightData: [], heightData: [],
weightData: [], weightData: [],
heightChart: null,
weightChart: null,
xAxis: [], xAxis: [],
carList: [], carList: [],
carLength: 0, carLength: 0,
}, },
standardHeight:[], heightChart: null,
standardWeight:[], weightChart: null,
standardHeight: [],
standardWeight: [],
// Helper function to strip HTML tags and convert to plain text // Helper function to strip HTML tags and convert to plain text
stripHtml(html) { stripHtml(html) {
if (!html) return ''; if (!html) return '';
return html.replace(/<[^>]*>/g, ''); return html.replace(/<[^>]*>/g, '');
}, },
async getPersonalInfo() {
const info = await request('patient/basic/0').then((res) => res); async getSfList() {
if(info.sex == 1){
this.standardHeight = heightList.boy
this.standardWeight = weightList.boy
}else{
this.standardHeight = heightList.girl
this.standardWeight = weightList.girl
}
},
async getSfList(){
this.followPlans() this.followPlans()
this.getArticleList() this.getArticleList()
this.getCarList() this.getCarList()
}, },
async followPlans(){ async followPlans() {
const res = await request('patient/follow_plans', 'get', { const res = await request('patient/follow_plans', 'get', {
page: 1, page: 1,
page_size: 10, page_size: 10,
@ -80,8 +74,12 @@ Page({
} }
}) })
}, },
async getArticleList(){ async getArticleList() {
const res2 = await request('patient/articles', 'get', { title: '', page: 1, page_size: 2 }); const res2 = await request('patient/articles', 'get', {
title: '',
page: 1,
page_size: 2
});
// Convert rich text content to plain text // Convert rich text content to plain text
const plainTextContent = this.stripHtml(res2.list[0].content); const plainTextContent = this.stripHtml(res2.list[0].content);
const articleList = res2.list.map(item => { const articleList = res2.list.map(item => {
@ -115,10 +113,13 @@ Page({
}) })
}, },
async medicineRecord(e){ async medicineRecord(e) {
const {id, status} = e.currentTarget.dataset const {
if(status == 1){ id,
await request('patient/medicine_record/'+id, 'put', {}) status
} = e.currentTarget.dataset
if (status == 1) {
await request('patient/medicine_record/' + id, 'put', {})
wx.showToast({ wx.showToast({
type: 'success', type: 'success',
title: '打卡成功', title: '打卡成功',
@ -127,12 +128,14 @@ Page({
} }
}, },
async getChartData(){ async getChartData() {
try {
const res = await request('patient/chat/0', 'get') const res = await request('patient/chat/0', 'get')
this.getSfList()
const heightData = [] const heightData = []
const weightData = [] const weightData = []
const xAxis = [] const xAxis = []
if(res.list.length > 0){ if (res.list.length > 0) {
res.list.forEach(item => { res.list.forEach(item => {
heightData.push(item.height) heightData.push(item.height)
weightData.push(item.weight) weightData.push(item.weight)
@ -147,26 +150,48 @@ Page({
}); });
this.initHeightChart() this.initHeightChart()
} catch (e) {
console.log(e)
}
}, },
onLoad(){ onLoad() {
}, },
onReady() { onReady() {
}, },
onShow(){ async getPersonalInfo() {
this.getSfList() const user_info = await wx.getStorageSync('user_info')
console.log(user_info)
if (user_info) {
if (user_info.sex == 1) {
this.standardHeight = heightList.boy
this.standardWeight = weightList.boy
} else {
this.standardHeight = heightList.girl
this.standardWeight = weightList.girl
}
this.getChartData() this.getChartData()
} else {
wx.navigateTo({
url: '/pages/login/login'
})
}
},
onShow() {
console.log(this.weightChart)
this.getPersonalInfo() this.getPersonalInfo()
}, },
changeChart(e) { changeChart(e) {
const index = e.currentTarget.dataset.index; const index = e.currentTarget.dataset.index;
if(index == this.data.activeIndex){ if (index == this.data.activeIndex) {
return return
} }
this.setData({ this.setData({
@ -182,24 +207,24 @@ Page({
}); });
}, },
toClockIn(){ toClockIn() {
wx.navigateTo({ wx.navigateTo({
url: '/pages/clockIn/index', url: '/pages/clockIn/index',
}) })
}, },
toEmergency(){ toEmergency() {
wx.navigateTo({ wx.navigateTo({
url: '/pages/emergency/index', url: '/pages/emergency/index',
}) })
}, },
toArticle(){ toArticle() {
wx.navigateTo({ wx.navigateTo({
url: '/pages/articleList/index', url: '/pages/articleList/index',
}) })
}, },
async toArticleDelit(e){ async toArticleDelit(e) {
const index = e.currentTarget.dataset.index; const index = e.currentTarget.dataset.index;
await wx.setStorageSync('article',JSON.stringify(this.data.articles[index])); await wx.setStorageSync('article', JSON.stringify(this.data.articles[index]));
wx.navigateTo({ wx.navigateTo({
url: '/pages/article/index', url: '/pages/article/index',
}) })
@ -224,7 +249,7 @@ Page({
let totalList = [] let totalList = []
standardHeight.forEach(item => { standardHeight.forEach(item => {
this.data.xAxis.forEach(item2 => { this.data.xAxis.forEach(item2 => {
if(item.age == item2) { if (item.age == item2) {
totalList.push(item.value) totalList.push(item.value)
} }
@ -237,11 +262,25 @@ Page({
const chartComp = this.selectComponent('#mychart-dom-height'); const chartComp = this.selectComponent('#mychart-dom-height');
if (chartComp) { if (chartComp) {
chartComp.init((canvas, width, height, dpr) => { chartComp.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, { width, height, devicePixelRatio: dpr }); const chart = echarts.init(canvas, null, {
width,
height,
devicePixelRatio: dpr
});
canvas.setChart(chart); canvas.setChart(chart);
chart.setOption({ chart.setOption({
title: { text: '', left: 'left', fontSize: 6 }, title: {
grid: { containLabel: true, top: '5%', left: '5%', right: '7%', bottom: '3%' }, text: '',
left: 'left',
fontSize: 6
},
grid: {
containLabel: true,
top: '5%',
left: '5%',
right: '7%',
bottom: '3%'
},
tooltip: { tooltip: {
show: true, show: true,
trigger: 'axis', trigger: 'axis',
@ -250,10 +289,21 @@ Page({
return `${param.axisValue}\n${param.seriesName}: ${param.value} cm`; return `${param.axisValue}\n${param.seriesName}: ${param.value} cm`;
} }
}, },
xAxis: { type: 'category', boundaryGap: false, data: this.data.xAxis }, xAxis: {
yAxis: { x: 'center', type: 'value', splitLine: { lineStyle: { type: 'dashed' } } }, type: 'category',
series: [ boundaryGap: false,
{ data: this.data.xAxis
},
yAxis: {
x: 'center',
type: 'value',
splitLine: {
lineStyle: {
type: 'dashed'
}
}
},
series: [{
name: '实际身高', name: '实际身高',
type: 'line', type: 'line',
smooth: true, smooth: true,
@ -264,23 +314,36 @@ Page({
type: 'line', type: 'line',
symbol: 'none', symbol: 'none',
data: standardUpper, data: standardUpper,
lineStyle: { opacity: 0 }, lineStyle: {
opacity: 0
},
stack: '标准范围', stack: '标准范围',
areaStyle: { opacity: 0 }, areaStyle: {
tooltip: { show: true } opacity: 0
},
tooltip: {
show: true
}
}, },
{ {
name: '标准下界', name: '标准下界',
type: 'line', type: 'line',
symbol: 'none', symbol: 'none',
data: standardLower, data: standardLower,
lineStyle: { opacity: 0 }, lineStyle: {
opacity: 0
},
stack: '标准范围', stack: '标准范围',
areaStyle: { color: 'rgba(135,206,250,0.3)' }, areaStyle: {
tooltip: { show: true } color: 'rgba(135,206,250,0.3)'
},
tooltip: {
show: true
}
} }
] ]
}); });
this.heightChart = chart;
return chart; return chart;
}); });
} }
@ -293,7 +356,7 @@ Page({
let totalList = [] let totalList = []
standardWeight.forEach(item => { standardWeight.forEach(item => {
this.data.xAxis.forEach(item2 => { this.data.xAxis.forEach(item2 => {
if(item.age == item2) { if (item.age == item2) {
totalList.push(item.value) totalList.push(item.value)
} }
@ -307,11 +370,25 @@ Page({
const chartComp = this.selectComponent('#mychart-dom-weight'); const chartComp = this.selectComponent('#mychart-dom-weight');
if (chartComp) { if (chartComp) {
chartComp.init((canvas, width, height, dpr) => { chartComp.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, { width, height, devicePixelRatio: dpr }); const chart = echarts.init(canvas, null, {
width,
height,
devicePixelRatio: dpr
});
canvas.setChart(chart); canvas.setChart(chart);
chart.setOption({ chart.setOption({
title: { text: '', left: 'left', fontSize: 6 }, title: {
grid: { containLabel: true, top: '5%', left: '5%', right: '7%', bottom: '3%' }, text: '',
left: 'left',
fontSize: 6
},
grid: {
containLabel: true,
top: '5%',
left: '5%',
right: '7%',
bottom: '3%'
},
tooltip: { tooltip: {
show: true, show: true,
trigger: 'axis', trigger: 'axis',
@ -320,10 +397,21 @@ Page({
return `${param.axisValue}\n${param.seriesName}: ${param.value} kg`; return `${param.axisValue}\n${param.seriesName}: ${param.value} kg`;
} }
}, },
xAxis: { type: 'category', boundaryGap: false, data: this.data.xAxis }, xAxis: {
yAxis: { x: 'center', type: 'value', splitLine: { lineStyle: { type: 'dashed' } } }, type: 'category',
series: [ boundaryGap: false,
{ data: this.data.xAxis
},
yAxis: {
x: 'center',
type: 'value',
splitLine: {
lineStyle: {
type: 'dashed'
}
}
},
series: [{
name: '实际体重', name: '实际体重',
type: 'line', type: 'line',
smooth: true, smooth: true,
@ -334,23 +422,36 @@ Page({
type: 'line', type: 'line',
symbol: 'none', symbol: 'none',
data: standardUpper, data: standardUpper,
lineStyle: { opacity: 0 }, lineStyle: {
opacity: 0
},
stack: '标准范围', stack: '标准范围',
areaStyle: { opacity: 0 }, areaStyle: {
tooltip: { show: true } opacity: 0
},
tooltip: {
show: true
}
}, },
{ {
name: '标准下界', name: '标准下界',
type: 'line', type: 'line',
symbol: 'none', symbol: 'none',
data: standardUpper, data: standardUpper,
lineStyle: { opacity: 0 }, lineStyle: {
opacity: 0
},
stack: '标准范围', stack: '标准范围',
areaStyle: { color: 'rgba(135,206,250,0.3)' }, areaStyle: {
tooltip: { show: true } color: 'rgba(135,206,250,0.3)'
},
tooltip: {
show: true
}
} }
] ]
}); });
this.weightChart = chart;
return chart; return chart;
}); });
} }

View File

@ -1,6 +1,5 @@
import request from '~/api/request'; import request from '~/api/request';
import { resetTokenInvalid } from '~/api/request';
Page({ Page({
data: { data: {
@ -34,7 +33,6 @@ Page({
// console.log(e.detail.errMsg) // 回调信息(成功失败都会返回) // console.log(e.detail.errMsg) // 回调信息(成功失败都会返回)
// console.log(e.detail.errno) // 错误码(失败时返回) // console.log(e.detail.errno) // 错误码(失败时返回)
if (e.detail.code) { if (e.detail.code) {
resetTokenInvalid()
const res = await request('patient/quick_login', 'post', { const res = await request('patient/quick_login', 'post', {
code: e.detail.code code: e.detail.code
}) })

View File

@ -1,5 +1,4 @@
import request from '~/api/request'; import request from '~/api/request';
import {resetTokenInvalid } from '~/api/request';
Page({ Page({
data: { data: {
code: '', code: '',
@ -108,7 +107,6 @@ Page({
// }); // });
// return; // return;
// } // }
resetTokenInvalid()
const res = await request('patient/code_login', 'post', { const res = await request('patient/code_login', 'post', {
code: this.data.code, code: this.data.code,

View File

@ -99,6 +99,7 @@ Page({
async getPersonalInfo() { async getPersonalInfo() {
const info = await request('patient/basic/0').then((res) => res); const info = await request('patient/basic/0').then((res) => res);
await wx.setStorageSync('user_info', info);
return info; return info;
}, },

View File

@ -423,16 +423,21 @@ Page({
errorStatus.gestational_week = !/^\d+(\.\d+)?$/.test(obj.gestational_week) || Number(obj.gestational_week) <= 0; errorStatus.gestational_week = !/^\d+(\.\d+)?$/.test(obj.gestational_week) || Number(obj.gestational_week) <= 0;
errorStatus.prenatal_check_type = !obj.prenatal_check_type; errorStatus.prenatal_check_type = !obj.prenatal_check_type;
errorStatus.delivery_type = !obj.delivery_type; errorStatus.delivery_type = !obj.delivery_type;
if(obj.delivery_type == '1'){
errorStatus.prenatal_check_remark = !obj.prenatal_check_remark; errorStatus.prenatal_check_remark = !obj.prenatal_check_remark;
}
if (obj.prenatal_check_type == 2) {
obj.prenatal_check_remark = '无';
errorStatus.prenatal_check_remark = false;
}
console.log(errorStatus);
this.setData({ errorStatus }); this.setData({ errorStatus });
if (Object.values(errorStatus).some(v => v)) { if (Object.values(errorStatus).some(v => v)) {
return; return;
} }
obj.birth_weight = Number(obj.birth_weight); obj.birth_weight = Number(obj.birth_weight);
obj.gestational_week = Number(obj.gestational_week); obj.gestational_week = Number(obj.gestational_week);
if (obj.prenatal_check_type == 2) {
obj.prenatal_check_remark = '无';
}
await request('patient/set_personal_information', 'post', obj); await request('patient/set_personal_information', 'post', obj);
wx.showToast({ wx.showToast({
title: '提交成功', title: '提交成功',

View File

@ -8,7 +8,7 @@
</view> </view>
<view class="info-item"> <view class="info-item">
<t-cell class="info-edit__cell" required title="姓名" bordered="{{false}}"> <t-cell class="info-edit__cell" required title="姓名" bordered="{{false}}">
<t-input bind:change="onNameChange" align="right" borderless placeholder="请输入患者姓名" slot="note" value="{{personInfo.username}}"/> <t-input bind:change="onNameChange" always-embed="{{true}}" align="right" borderless placeholder="请输入患者姓名" slot="note" value="{{personInfo.username}}"/>
</t-cell> </t-cell>
<view class="info-edit__tips" wx:if="{{errorStatus.name}}">姓名字数在2至20之间</view> <view class="info-edit__tips" wx:if="{{errorStatus.name}}">姓名字数在2至20之间</view>
</view> </view>
@ -20,61 +20,61 @@
</view> </view>
<view class="info-item"> <view class="info-item">
<t-cell class="info-edit__cell" title="身份证号" bordered="{{false}}"> <t-cell class="info-edit__cell" title="身份证号" bordered="{{false}}">
<t-input type="idcard" bind:change="onIdInput" align="right" borderless placeholder="请输入身份证号" slot="note" value="{{personInfo.id_number}}" /> <t-input type="idcard" always-embed="{{true}}" bind:change="onIdInput" align="right" borderless placeholder="请输入身份证号" slot="note" value="{{personInfo.id_number}}" />
</t-cell> </t-cell>
<view class="info-edit__tips" wx:if="{{errorStatus.id}}">身份证号输入有误</view> <view class="info-edit__tips" wx:if="{{errorStatus.id}}">身份证号输入有误</view>
</view> </view>
<view class="info-item"> <view class="info-item">
<t-cell required arrow bind:click="showPicker" data-mode="birth" title="出生日期" bordered="{{false}}"> <t-cell required arrow bind:click="showPicker" data-mode="birth" title="出生日期" bordered="{{false}}">
<t-input align="right" borderless placeholder="请输选择" readonly slot="note" value="{{personInfo.birthday}}" /> <t-input align="right" always-embed="{{true}}" borderless placeholder="请输选择" readonly slot="note" value="{{personInfo.birthday}}" />
</t-cell> </t-cell>
<view class="info-edit__tips" wx:if="{{errorStatus.birthday}}">请选择出生日期</view> <view class="info-edit__tips" wx:if="{{errorStatus.birthday}}">请选择出生日期</view>
</view> </view>
<view class="info-item"> <view class="info-item">
<t-cell class="info-edit__cell" align="right" required title="年龄" bordered="{{false}}"> <t-cell class="info-edit__cell" align="right" required title="年龄" bordered="{{false}}">
<t-input align="right" borderless placeholder="请输入" readonly slot="note" value="{{personInfo.age}}" type="digit"/> <t-input align="right" always-embed="{{true}}" borderless placeholder="请输入" readonly slot="note" value="{{personInfo.age}}" type="digit"/>
</t-cell> </t-cell>
<view class="info-edit__tips" wx:if="{{errorStatus.age}}">请输入年龄</view> <view class="info-edit__tips" wx:if="{{errorStatus.age}}">请输入年龄</view>
</view> </view>
<view class="info-item"> <view class="info-item">
<t-cell class="info-edit__cell" required title="出生体重" bordered="{{false}}"> <t-cell class="info-edit__cell" required title="出生体重" bordered="{{false}}">
<t-input align="right" bind:change="onWeightInput" borderless placeholder="请输入" slot="note" value="{{personInfo.birth_weight}}" suffix="g" type="digit"/> <t-input align="right" always-embed="{{true}}" bind:change="onWeightInput" borderless placeholder="请输入" slot="note" value="{{personInfo.birth_weight}}" suffix="g" type="digit"/>
</t-cell> </t-cell>
<view class="info-edit__tips" wx:if="{{errorStatus.birth_weight}}">请输入出生体重</view> <view class="info-edit__tips" wx:if="{{errorStatus.birth_weight}}">请输入出生体重</view>
</view> </view>
<view class="info-item"> <view class="info-item">
<t-cell required arrow bind:click="showPicker" data-mode="operative" title="胆道闭锁手术时间" bordered="{{false}}"> <t-cell required arrow bind:click="showPicker" data-mode="operative" title="胆道闭锁手术时间" bordered="{{false}}">
<t-input align="right" borderless placeholder="请选择" readonly slot="note" value="{{personInfo.operative_date}}" /> <t-input align="right" always-embed="{{true}}" borderless placeholder="请选择" readonly slot="note" value="{{personInfo.operative_date}}" />
</t-cell> </t-cell>
<view class="info-edit__tips" wx:if="{{errorStatus.operative_date}}">请选择胆道闭锁手术时间</view> <view class="info-edit__tips" wx:if="{{errorStatus.operative_date}}">请选择胆道闭锁手术时间</view>
</view> </view>
<view class="info-item"> <view class="info-item">
<t-cell title="胎次" required arrow bordered="{{false}}" bind:click="showSelect" data-mode="parity_number" data-list="{{parity_numberList}}" > <t-cell title="胎次" required arrow bordered="{{false}}" bind:click="showSelect" data-mode="parity_number" data-list="{{parity_numberList}}" >
<t-input align="right" borderless placeholder="请选择" readonly slot="note" value="{{parity_numberList[personInfo.parity_number - 1].label}}" /> <t-input align="right" always-embed="{{true}}" borderless placeholder="请选择" readonly slot="note" value="{{parity_numberList[personInfo.parity_number - 1].label}}" />
</t-cell> </t-cell>
<view class="info-edit__tips" wx:if="{{errorStatus.parity_number}}">请选择胎次</view> <view class="info-edit__tips" wx:if="{{errorStatus.parity_number}}">请选择胎次</view>
</view> </view>
<view class="info-item"> <view class="info-item">
<t-cell title="产次" required arrow bordered="{{false}}" bind:click="showSelect" data-mode="birth_number" data-list="{{birth_numberList}}" > <t-cell title="产次" required arrow bordered="{{false}}" bind:click="showSelect" data-mode="birth_number" data-list="{{birth_numberList}}" >
<t-input align="right" borderless placeholder="请选择" readonly slot="note" value="{{birth_numberList[personInfo.birth_number - 1].label}}" /> <t-input align="right" always-embed="{{true}}" borderless placeholder="请选择" readonly slot="note" value="{{birth_numberList[personInfo.birth_number - 1].label}}" />
</t-cell> </t-cell>
<view class="info-edit__tips" wx:if="{{errorStatus.birth_number}}">请选择产次</view> <view class="info-edit__tips" wx:if="{{errorStatus.birth_number}}">请选择产次</view>
</view> </view>
<view class="info-item"> <view class="info-item">
<t-cell title="受孕方式" required arrow bordered="{{false}}" bind:click="showSelect" data-mode="conception_type" data-list="{{conception_typeList}}"> <t-cell title="受孕方式" required arrow bordered="{{false}}" bind:click="showSelect" data-mode="conception_type" data-list="{{conception_typeList}}">
<t-input align="right" borderless placeholder="请选择" readonly slot="note" value="{{conception_typeList[personInfo.conception_type - 1].label}}" /> <t-input align="right" always-embed="{{true}}" borderless placeholder="请选择" readonly slot="note" value="{{conception_typeList[personInfo.conception_type - 1].label}}" />
</t-cell> </t-cell>
<view class="info-edit__tips" wx:if="{{errorStatus.conception_type}}">请选择受孕方式</view> <view class="info-edit__tips" wx:if="{{errorStatus.conception_type}}">请选择受孕方式</view>
</view> </view>
<view class="info-item"> <view class="info-item">
<t-cell class="info-edit__cell" required bordered="{{false}}" title="孕周"> <t-cell class="info-edit__cell" required bordered="{{false}}" title="孕周">
<t-input align="right" suffix="周" bind:change="onWeekInput" borderless placeholder="请输入" slot="note" value="{{personInfo.gestational_week}}" type="digit" /> <t-input align="right" always-embed="{{true}}" suffix="周" bind:change="onWeekInput" borderless placeholder="请输入" slot="note" value="{{personInfo.gestational_week}}" type="digit" />
</t-cell> </t-cell>
<view class="info-edit__tips" wx:if="{{errorStatus.gestational_week}}">请输入孕周</view> <view class="info-edit__tips" wx:if="{{errorStatus.gestational_week}}">请输入孕周</view>
</view> </view>
<view class="info-item"> <view class="info-item">
<t-cell title="产检是否有异常(如有,请填写)" bordered="{{false}}" required arrow bind:click="showSelect" data-mode="prenatal_check_type" data-list="{{prenatal_checkList}}" > <t-cell title="产检是否有异常(如有,请填写)" bordered="{{false}}" required arrow bind:click="showSelect" data-mode="prenatal_check_type" data-list="{{prenatal_checkList}}" >
<t-input align="right" borderless placeholder="请选择" readonly slot="note" value="{{prenatal_checkList[personInfo.prenatal_check_type - 1].label}}" /> <t-input align="right" always-embed="{{true}}" borderless placeholder="请选择" readonly slot="note" value="{{prenatal_checkList[personInfo.prenatal_check_type - 1].label}}" />
</t-cell> </t-cell>
<t-textarea bind:change="onPrenatalCheckRemarkChange" t-class="external-class" wx:if="{{personInfo.prenatal_check_type == 1}}" placeholder="请输入异常描述" disableDefaultPadding="{{true}}" value="{{personInfo.prenatal_check_remark}}" /> <t-textarea bind:change="onPrenatalCheckRemarkChange" t-class="external-class" wx:if="{{personInfo.prenatal_check_type == 1}}" placeholder="请输入异常描述" disableDefaultPadding="{{true}}" value="{{personInfo.prenatal_check_remark}}" />
<view class="info-edit__tips" wx:if="{{errorStatus.prenatal_check_type}}">请选择产检是否有异常</view> <view class="info-edit__tips" wx:if="{{errorStatus.prenatal_check_type}}">请选择产检是否有异常</view>
@ -82,7 +82,7 @@
</view> </view>
<view class="info-item"> <view class="info-item">
<t-cell title="分娩方式" required arrow bordered="{{false}}" bind:click="showSelect" data-mode="delivery_type" data-list="{{deliveryList}}" > <t-cell title="分娩方式" required arrow bordered="{{false}}" bind:click="showSelect" data-mode="delivery_type" data-list="{{deliveryList}}" >
<t-input align="right" borderless placeholder="请选择" readonly slot="note" value="{{deliveryList[personInfo.delivery_type - 1].label}}" /> <t-input align="right" always-embed="{{true}}" borderless placeholder="请选择" readonly slot="note" value="{{deliveryList[personInfo.delivery_type - 1].label}}" />
</t-cell> </t-cell>
<view class="info-edit__tips" wx:if="{{errorStatus.delivery_type}}">请选择分娩方式</view> <view class="info-edit__tips" wx:if="{{errorStatus.delivery_type}}">请选择分娩方式</view>
</view> </view>

View File

@ -1,13 +1,14 @@
/* pages/therapeuticRegimen/index.wxss */ /* pages/therapeuticRegimen/index.wxss */
pages{ pages{
height: 100vh; // height: 100vh;
overflow: hidden; // overflow: hidden;
} }
.therapeuticRegimen{ .therapeuticRegimen{
box-sizing: border-box; box-sizing: border-box;
// padding: 24rpx; // padding: 24rpx;
position: relative; position: relative;
height: calc(100vh - 120rpx); height: calc(100vh - 120rpx);
.scroll-view-box { .scroll-view-box {
padding: 28rpx; padding: 28rpx;
padding-bottom: 0; padding-bottom: 0;
@ -19,6 +20,7 @@ pages{
background-color: #fff; background-color: #fff;
border-radius: 24rpx; border-radius: 24rpx;
position: relative; position: relative;
z-index: 1;
overflow: hidden; overflow: hidden;
margin-bottom: 28rpx; margin-bottom: 28rpx;
.tab-text{ .tab-text{
@ -110,7 +112,7 @@ pages{
left: 0; left: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;
z-index: 100;
} }
} }

View File

@ -154,7 +154,7 @@
] ]
} }
}, },
"libVersion": "3.8.10", "libVersion": "3.8.11",
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
"compileHotReLoad": false "compileHotReLoad": false