| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582 |
- <template>
- <div class="container">
- <div class="bgimg"></div>
- <div class="content" v-if="!popupVisible">
- <div class="title">FVIII药代动力学检测</div>
- <div class="diagForm">
- <mt-field label="病例体重(kg)" placeholder="整数或1位小数" type="number" v-model="form.bltz"></mt-field>
- <mt-field label="注射产品" placeholder="请选择产品" class="inputDisable" disabled v-model="form.mpro"
- @click.native="mproFlag=true;mfreqFlag=false">
- <img src="../assets/images/down.png" alt="" width="16px">
- </mt-field>
- <mt-field label="注射剂量(IU)" placeholder="请输入整数" v-model="form.zsjl" type="number"></mt-field>
- <div class="numSubTitle">
- <mt-field class="inputDisable" disabled placeholder="请选择时间" v-model="form.zssjt0"
- @click.native="$refs.t0Picker.open()">
- <img src="../assets/images/down.png" alt="" width="16px">
- </mt-field>
- <span>注射时间t<sub>0</sub></span>
- </div>
- <mt-field label="基础活性%" placeholder="请输入2位小数" v-model="form.jchx"></mt-field>
- <!-- <mt-field label="注射后半小时内活性%" placeholder="请输入2位小数" type="number" v-model="form.zs30hx"></mt-field> -->
- <div class="numSubTitle">
- <mt-field class="inputDisable" disabled placeholder="请选择时间" v-model="form.cxsjt1"
- @click.native="$refs.t1Picker.open()">
- <img src="../assets/images/down.png" alt="" width="16px">
- </mt-field>
- <span>采血时间t<sub>1</sub></span>
- </div>
- <div class="numSubTitle">
- <mt-field placeholder="请输入2位小数" v-model="form.t1hx" type="number"></mt-field>
- <span>t<sub>1</sub>点活性%</span>
- </div>
- <div class="numSubTitle">
- <mt-field class="inputDisable" disabled placeholder="请选择时间" v-model="form.cxsjt2"
- @click.native="$refs.t2Picker.open()">
- <img src="../assets/images/down.png" alt="" width="16px">
- </mt-field>
- <span>采血时间t<sub>2</sub></span>
- </div>
- <div class="numSubTitle">
- <mt-field placeholder="请输入2位小数" v-model="form.t2hx" type="number"></mt-field>
- <span>t<sub>2</sub>点活性%</span>
- </div>
- <div class="numSubTitle">
- <mt-field class="inputDisable" disabled placeholder="请选择时间" v-model="form.cxsjt3"
- @click.native="$refs.t3Picker.open()">
- <img src="../assets/images/down.png" alt="" width="16px">
- </mt-field>
- <span>采血时间t<sub>3</sub></span>
- </div>
- <div class="numSubTitle">
- <mt-field placeholder="请输入2位小数" v-model="form.t3hx" type="number"></mt-field>
- <span>t<sub>3</sub>点活性%</span>
- </div>
- </div>
- <!-- <div class="diagForm">
- <div class="formTitle">血友病治疗方案</div>
- <mt-field label="预防谷活性" type="number" placeholder="请输入整数" v-model="form.yfghx"></mt-field>
- <mt-field class="inputDisable" disabled label="注射频次" placeholder="请选择" v-model="form.zspc"
- @click.native="mfreqFlag=true">
- <img src="../assets/images/down.png" alt="" width="16px">
- </mt-field>
- </div> -->
- <div class="footer">
- <div class="jbbtn" @click="$router.go(-1)">返回</div>
- <div class="jbbtn" @click="submit">确定</div>
- </div>
- </div>
- <!-- 注射时间t0 -->
- <mt-datetime-picker ref="t0Picker" type="datetime" year-format="{value} 年" month-format="{value} 月"
- date-format="{value} 日" hourFormat="{value}时" minuteFormat="{value}分" @confirm='changeTime0' :endDate='endDate'
- :startDate='startDate' v-model="now" @touchmove.native.stop.prevent>
- </mt-datetime-picker>
- <!-- 采血时间t1 -->
- <mt-datetime-picker ref="t1Picker" type="datetime" year-format="{value} 年" month-format="{value} 月"
- date-format="{value} 日" hourFormat="{value}时" minuteFormat="{value}分" @confirm='changeTime1' :endDate='endDate'
- :startDate='startDate' v-model="now" @touchmove.native.stop.prevent>
- </mt-datetime-picker>
- <!-- 采血时间t2 -->
- <mt-datetime-picker ref="t2Picker" type="datetime" year-format="{value} 年" month-format="{value} 月"
- date-format="{value} 日" hourFormat="{value}时" minuteFormat="{value}分" @confirm='changeTime2' :endDate='endDate'
- :startDate='startDate' v-model="now" @touchmove.native.stop.prevent>
- </mt-datetime-picker>
- <!-- 采血时间t3 -->
- <mt-datetime-picker ref="t3Picker" type="datetime" year-format="{value} 年" month-format="{value} 月"
- date-format="{value} 日" hourFormat="{value}时" minuteFormat="{value}分" @confirm='changeTime3' :endDate='endDate'
- :startDate='startDate' v-model="now" @touchmove.native.stop.prevent>
- </mt-datetime-picker>
- <!-- 注射频次 -->
- <!-- <mt-picker @change="onValuesChange1" v-if="mfreqFlag" :slots="slots1" ref="sexPicker1" class="sexPicker"
- :showToolbar="true" @touchmove.native.stop.prevent>
- <div class="pickerConfirm" @click="mfreqFlag=false">确认</div>
- </mt-picker> -->
- <!-- 注射产品 -->
- <mt-picker @change="onValuesChange" v-if="mproFlag" :slots="slots" ref="sexPicker" class="sexPicker"
- :showToolbar="true">
- <div class="pickerConfirm" @click="mproFlag=false">确认</div>
- </mt-picker>
- <!-- 试算弹出框 -->
- <div class="content" v-if="popupVisible">
- <div class="popupContainer">
- <!-- 药代动力学参数 -->
- <div class="diagShowForm">
- <div class="formTitle">FVIII 药代动力学参数</div>
- <div style="display:flex;">
- <div class="rowfont" style="width:50%;">半衰期(小时)</div>
- <div class="rowfont" style="width:50%;color:#888;">{{form.bsq}}</div>
- </div>
- <div style="display:flex;">
- <div class="rowfont" style="width:50%;">利用率%</div>
- <div class="rowfont" style="width:50%;color:#888;">{{form.lyl*100}}</div>
- </div>
- <div style="display:flex;">
- <div class="rowfont" style="width:50%;">预期峰值活性%</div>
- <div class="rowfont" style="width:50%;color:#888;">{{form.yqfzhx}}</div>
- </div>
- </div>
- <!-- 血友病预防治疗剂量计算 -->
- <div class="diagShowForm">
- <div class="formTitle">血友病预防治疗剂量计算</div>
- <div class="popupDiagForm">
- <mt-field label="目标谷活性%" type="number" placeholder="请输入整数" v-model="form.yfghx" @input.native="mczsjl=''">
- </mt-field>
- <mt-field class="inputDisable" disabled label="注射频次" placeholder="请选择" v-model="form.zspc"
- @click.native="mfreqFlag=true">
- <img src="../assets/images/down.png" alt="" width="16px">
- </mt-field>
- <mt-field label="每次注射剂量(IU)" type="number" placeholder="" v-model="mczsjl" disabled></mt-field>
- </div>
- </div>
- <div class="popupFooter">
- <div class="jbbtn" @click="goback">返回</div>
- <div class="jbbtn" @click="goSelect">确定</div>
- <div class="jbbtn" @click="calc_mczsjl">计算</div>
- </div>
- </div>
- <!-- 注射频次 -->
- <mt-picker @change="onValuesChange1" v-if="mfreqFlag" :slots="slots1" ref="sexPicker1" class="sexPicker"
- :showToolbar="true" @touchmove.native.stop.prevent>
- <div class="pickerConfirm" @click="mfreqFlag=false">确认</div>
- </mt-picker>
- </div>
- </div>
- </template>
- <script>
- import {
- Field,
- MessageBox,
- Toast,
- Popup
- } from 'mint-ui'
- export default {
- name: 'Index',
- components: {
- Field,
- MessageBox,
- Toast,
- Popup
- },
- data() {
- return {
- msg: 'Welcome to Your Vue.js App',
- mfreqFlag: false,
- form: {
- jchx: '',
- zssjt0: '',
- cxsjt1: '',
- cxsjt2: '',
- cxsjt3: '',
- mczsjl: null
- },
- mczsjl: null,
- slots1: [{
- flex: 1,
- values: this.$const.zspc,
- className: 'slot1',
- textAlign: 'center'
- }],
- startDate: new Date(this.$datetime.formatDateTime(new Date("2013-01-01 00:00:00"))),
- endDate: new Date(this.$datetime.formatDateTime(new Date("2024-01-01 00:00:00"))),
- now: new Date(),
- mproFlag: false,
- slots: [{
- flex: 1,
- values: this.$const.mprolist,
- className: 'slot1',
- textAlign: 'center'
- }],
- popupVisible: this.$route.query.edit ? true : false,
- patient_id: this.$route.query.patid
- }
- },
- methods: {
- goback() {
- if (this.$route.query && this.$route.query.edit && this.$route.query.back) {
- this.$router.push({
- path: this.$route.query.back
- });
- } else {
- this.popupVisible = false;
- }
- },
- goPage() {
- this.$router.push('/diagcalcshow')
- },
- changeTime0(value) {
- this.form.zssjt0 = this.$datetime.formatDateTime(value).replaceAll("/", "-")
- },
- changeTime1(value) {
- this.form.cxsjt1 = this.$datetime.formatDateTime(value).replaceAll("/", "-")
- },
- changeTime2(value) {
- this.form.cxsjt2 = this.$datetime.formatDateTime(value).replaceAll("/", "-")
- },
- changeTime3(value) {
- this.form.cxsjt3 = this.$datetime.formatDateTime(value).replaceAll("/", "-")
- },
- onValuesChange(picker, values) {
- if (picker.getSlotValue(0)) {
- this.form.mpro = picker.getSlotValue(0)
- } else {
- this.form.mpro = "人血FVIII"
- }
- },
- onValuesChange1(picker, values) {
- if (picker.getSlotValue(0)) {
- this.form.zspc = picker.getSlotValue(0)
- } else {
- this.form.zspc = this.$const.zspc[0]
- }
- this.form.mczsjl = ""
- },
- goSelect() {
- let params = this.form
- params.patient_id = this.patient_id
- let that = this
- this.$api.regPatientCase(params).then(res => {
- if (!res.data.code) {
- this.$router.push({
- path: 'pretraitcase',
- query: {
- id: res.data.data.id
- }
- })
- } else {
- Toast(res.data.message)
- }
- })
- },
- submit() {
- if (!this.form.bltz) {
- MessageBox({
- title: '提示',
- message: '请输入病例体重'
- })
- return
- } else {
- if (!this.$recheck.checkIntFloat1(this.form.bltz)) {
- MessageBox({
- title: '提示',
- message: '病例体重请输入整数或1位小数'
- })
- return
- }
- }
- if (!this.form.zsjl) {
- MessageBox({
- title: '提示',
- message: '请输入注射剂量'
- })
- return
- } else {
- if (!this.$recheck.checkInt(this.form.zsjl)) {
- MessageBox({
- title: '提示',
- message: '注射剂量请输入整数'
- })
- return
- }
- }
- if (!this.form.zssjt0) {
- MessageBox({
- title: '提示',
- message: '请选择注射时间t<sub>0</sub>'
- })
- return
- }
- if (!this.$recheck.checkIntFloat12(this.form.jchx)) {
- MessageBox({
- title: '提示',
- message: '请输入整数或2位小数?'
- })
- return
- }
- // if (!this.form.zs30hx) {
- // MessageBox({
- // title: '提示',
- // message: '请输入注射后半小时内活性'
- // })
- // return
- // } else {
- // if (!this.$recheck.checkIntFloat12(this.form.zs30hx)) {
- // MessageBox({
- // title: '提示',
- // message: '注射后半小时内活性请输入整数或2位小数'
- // })
- // return
- // }
- // }
- if (!this.form.cxsjt1) {
- MessageBox({
- title: '提示',
- message: '请选择采血时间t<sub>1</sub>'
- })
- return
- }
- if (!this.form.t1hx) {
- MessageBox({
- title: '提示',
- message: '请输入t<sub>1</sub>点活性'
- })
- return
- } else {
- if (!this.$recheck.checkIntFloat12(this.form.t1hx)) {
- MessageBox({
- title: '提示',
- message: 't<sub>1</sub>点活性请输入整数或2位小数'
- })
- return
- }
- }
- if (!this.form.cxsjt2) {
- MessageBox({
- title: '提示',
- message: '请选择采血时间t<sub>2</sub>'
- })
- return
- }
- if (!this.form.t2hx) {
- MessageBox({
- title: '提示',
- message: '请输入t<sub>2</sub>点活性'
- })
- return
- } else {
- if (!this.$recheck.checkIntFloat12(this.form.t2hx)) {
- MessageBox({
- title: '提示',
- message: 't<sub>2</sub>点活性请输入整数或2位小数'
- })
- return
- }
- }
- if (!this.form.cxsjt3) {
- MessageBox({
- title: '提示',
- message: '请选择采血时间t<sub>3</sub>'
- })
- return
- }
- if (!this.form.t3hx) {
- MessageBox({
- title: '提示',
- message: '请输入t<sub>3</sub>点活性'
- })
- return
- } else {
- if (!this.$recheck.checkIntFloat12(this.form.t3hx)) {
- MessageBox({
- title: '提示',
- message: 't<sub>3</sub>点活性请输入整数或2位小数'
- })
- return
- }
- }
- // if (!this.form.yfghx) {
- // MessageBox({
- // title: '提示',
- // message: '请输入预防谷活性'
- // })
- // return
- // } else {
- // if (!this.$recheck.checkInt(this.form.yfghx)) {
- // MessageBox({
- // title: '提示',
- // message: '预防谷活性请输入整数'
- // })
- // return
- // }
- // }
- // if (!this.form.zspc) {
- // MessageBox({
- // title: '提示',
- // message: '请选择注射频次'
- // })
- // return
- // }
- let params = this.form
- params.patient_id = this.patient_id
- let that = this
- this.$api.regPatientCase(params).then(res => {
- if (!res.data.code) {
- that.form = res.data.data;
- this.popupVisible = true;
- } else {
- Toast(res.data.message)
- }
- })
- },
- calc_mczsjl() {
- let that = this;
- this.$api.calc_mczsjl(this.form).then(res => {
- if (res.data.code == 0) {
- this.$set(this.form, "mczsjl", res.data.data)
- this.mczsjl = res.data.data
- }
- })
- }
- },
- created() {
- let patid = this.$route.query.patid;
- if (!patid) {
- this.$router.push("regpatinfo")
- } else {
- if(this.$route.query && this.$route.query.id){
- let case_id = this.$route.query.id
- this.$api.getPatientCaseInfo({id:case_id}).then(res=>{
- this.form = res.data.data
- this.mczsjl = res.data.data.mczsjl
- })
- }else{
- this.$api.getPatientDoingCase({
- patid: patid
- }).then(res => {
- if (res.data.code == 0 && res.data.data.id) {
- this.form = res.data.data
- this.mczsjl = res.data.data.mczsjl
- }
- })
- }
- }
- },
- }
- </script>
- <style scoped lang="scss">
- .diagForm {
- width: 84%;
- margin: auto;
- margin-top: 1rem;
- background: #fff;
- padding: 1rem;
- border-radius: 5px;
- .formTitle {
- height: 1rem;
- line-height: 1rem;
- text-align: left;
- color: #2882F4;
- padding-bottom: 0.5rem;
- border-bottom: 1px solid #2882F4;
- font-weight: bold;
- }
- .mint-field {
- border: 1px solid #ccc;
- border-radius: 50px;
- margin-top: 1rem;
- }
- .mint-cell {
- min-height: 2rem;
- }
- }
- .container {
- height: 100vh;
- .content {
- height: 100vh;
- }
- }
- .numSubTitle {
- position: relative;
- span {
- position: absolute;
- left: 25px;
- top: 5px;
- }
- }
- /deep/ .numSubTitle .mint-field-core {
- margin-left: 105px;
- }
- /deep/ .picker-items {
- width: 100% !important;
- }
- /* 试算样式 */
- /deep/ .mint-popup {
- width: 90%;
- }
- .diagShowForm {
- width: 84%;
- margin: auto;
- margin-top: 1rem;
- background: #fff;
- padding: 1rem;
- border-radius: 5px;
- .formTitle {
- height: 1rem;
- line-height: 1rem;
- text-align: left;
- color: #2882F4;
- padding-bottom: 0.5rem;
- border-bottom: 1px solid #2882F4;
- font-weight: bold;
- }
- .mint-cell {
- min-height: 2.5rem;
- }
- /deep/ .mint-cell .mint-cell-title {
- width: 60%;
- text-align: left;
- }
- /deep/ .mint-cell .mint-cell-value {
- width: 40%;
- text-align: right;
- }
- }
- .popupContainer {
- background: #EFEFEF;
- padding: 2px;
- height: 100vh;
- width: 84%;
- margin: auto;
- }
- .popupFooter {
- display: flex;
- /* padding: 2rem; */
- background: #EFEFEF;
- margin-top: 2rem;
- .jbbtn {
- width: 26%;
- margin-top: 1rem;
- margin-bottom: 1rem;
- }
- }
- .footer{
- display: flex;
- .jbbtn {
- width: 42%;
- margin-top: 1rem;
- margin-bottom: 1rem;
- }
- }
- </style>
|