Browse Source

病例列表,神内神外界面重构,ocr界面开发及逻辑处理

master
aBin 4 years ago
parent
commit
b45b67cab0
  1. 8
      .env.development
  2. 32
      src/apis/carbasics.js
  3. 0
      src/common/icon/idcard.png
  4. 4
      src/common/styles/tailwind.scss
  5. 14
      src/components/Projects/ProjectItem.vue
  6. 906
      src/components/Test/Test.vue
  7. 21
      src/pages.json
  8. 92
      src/pages/camera/camera.vue
  9. 14
      src/pages/establish/establish.vue
  10. BIN
      src/pages/establish/icon/bottom.png
  11. 349
      src/pages/info/info.vue
  12. 175
      src/pages/inner/inner.vue
  13. 1076
      src/pages/inner/mixin.js
  14. 962
      src/pages/outside/mixin.js
  15. 355
      src/pages/outside/outside.vue
  16. 401
      src/pages/patient/patient.vue
  17. 18
      src/pages/patientLine/patientLine.vue
  18. 7
      src/store/carbasics/mutations.js
  19. 3
      src/store/carbasics/state.js

8
.env.development

@ -1,8 +1,8 @@
VUE_APP_NODE_ENV=development
VUE_APP_BASE_URL=https://test.tall.wiki
VUE_APP_API_URL=https://test.tall.wiki/gateway
VUE_APP_BASE_URL=http://101.201.226.163
VUE_APP_API_URL=http://101.201.226.163/gateway
VUE_APP_MSG_URL=ws://101.201.226.163/websocket/message/v4.0/ws
VUE_APP_PROJECT_PATH=https://test.tall.wiki/carBasicTall
VUE_APP_QUESTION_PATH=https://test.tall.wiki/carbasics
VUE_APP_PROJECT_PATH=http://101.201.226.163/carBasicTall
VUE_APP_QUESTION_PATH=http://101.201.226.163/carbasics
VUE_APP_VERSION=v3.1.0
VUE_APP_PUBLIC_PATH=/carBasicCalendar/

32
src/apis/carbasics.js

@ -1,5 +1,7 @@
const apiUrl = process.env.VUE_APP_API_URL;
const fileUrl = process.env.VUE_APP_BASE_URL;
export const carbasics = `${apiUrl}/carbasics/v4.0`;
export const filedeal = `${fileUrl}/filedeal`;
const patient = `${carbasics}/patient`; // 患者相关接口
const firstAid = `${carbasics}/firstAid`; // 急救数据相关接口
@ -46,10 +48,32 @@ export const setRecord = {
},
};
/**
* 批量获取急救信息
* @param {object} param 提交的参数
* 提交信息
* @param { Array } codeAndAnswerList code和答案
* @param { String } firstAidId 项目id
* @param { Number } userType 提交人类型0平车 1
*/
export const getRecord = {
async index(param) {
try {
const data = await uni.$u.http.post(`${patient}/queryAidRecord`, { param });
return data;
} catch (error) {
uni.$t.ui.showToast(error);
throw new Error(error);
}
},
};
const install = (Vue, vm) => {
vm.$u.api = { ...vm.$u.api } || {};
// 存储患者病况信息
vm.$u.api.setRecord = params => setRecord.index(params);
// 获取患者病况信息
vm.$u.api.getRecord = params => getRecord.index(params);
// 获取急救/出院数据列表
vm.$u.api.querySelf = params => querySelf.index(params);
// 患者加入急救
@ -60,8 +84,16 @@ const install = (Vue, vm) => {
vm.$u.api.delDemo = params => vm.$u.post(`${firstAid}/delDemo`, params);
// 删除演示的急救患者数据
vm.$u.api.savePatient = params => vm.$u.post(`${patient}/savePatient`, params);
// 获取急救患者的患者信息数据
vm.$u.api.getPatient = params => vm.$u.post(`${patient}/getPatient`, params);
// 修改急救患者的患者信息
vm.$u.api.updatePatient = params => vm.$u.post(`${patient}/updatePatient`, params);
// 上传身份证图像识别
vm.$u.api.identifyWords = `${carbasics}/ocr/identifyWords`;
// 上传试题信息获取答案直接赋值给试题并且提交后台
vm.$u.api.generalBasic = params => vm.$u.post(`${carbasics}/ocr/general/basic`, params);
// 上传文件
vm.$u.api.uploadFile = `${filedeal}/file/upload/multiple`;
};
export default { install };

0
src/pages/establish/icon/idcard.png → src/common/icon/idcard.png

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

4
src/common/styles/tailwind.scss

@ -4507,3 +4507,7 @@
border-left-width: 0;
border-bottom-width: 0;
}
.gray-text {
color: #bbb;
}

14
src/components/Projects/ProjectItem.vue

@ -123,13 +123,13 @@ export default {
openProject(project) {
const { name, id, url } = project;
url && (uni.$t.domain = url);
this.$u.route('pages/project-webview/project-webview', {
u: this.userId,
p: id,
pname: name,
url: encodeURIComponent(url),
});
// uni.navigateTo({ url: `/pages/task-page/task-page?u=${this.userId}&p=${id}&pname=${name}&url=${encodeURIComponent(url)}` });
// this.$u.route('pages/project-webview/project-webview', {
// u: this.userId,
// p: id,
// pname: name,
// url: encodeURIComponent(url),
// });
uni.navigateTo({ url: `/pages/task-page/task-page?u=${this.userId}&p=${id}&pname=${name}&url=${encodeURIComponent(url)}` });
},
/**

906
src/components/Test/Test.vue

@ -0,0 +1,906 @@
<template>
<div class="test">
<div bordered class="list-box" v-for="(item, index) in test" :key="index">
<template v-for="(listItem, listIndex) in item">
<!-- <template v-if="listItem.code === 'ZQTH-SJ'">
<Talk :key="listIndex"/>
</template> -->
<template>
<div
class="bg-white list-item"
:key="listIndex"
v-if="
itemIsShow(listItem.Fcode, listItem.isShow, listItem.level) && itemNoShow(listItem.NFcode, listItem.noShow, listItem.level)
"
>
<div class="w-full flex flex-nowrap justify-between items-center" :style="{ marginLeft: listItem.grade === 2 ? '' : '16px' }">
<div class="flex items-center" v-if="listItem.title" style="font-size: 16px">
{{ listItem.title }}
<span v-if="listItem.isTrue" style="color: red; font-size: 20px">*</span>
</div>
<div class="flex flex-1 justify-end">
<!-- 自动计算 -->
<span v-if="listItem.type === 0" style="color: rgba(0, 0, 0, 0.45)">
{{ listItem.code === 'JBXX-BMI' ? getBMI : getCount }}
</span>
<!-- 输入框 -->
<u-input
:border="true"
:clearable="false"
style="width: 200rpx"
v-else-if="listItem.type === 1"
placeholder="请输入"
input-align="right"
:value="listItem.value"
@bulr="changeIpt($event, listItem.code, index, listIndex)"
/>
<!-- 单选 -->
<u-radio-group :value="listItem.value" v-else-if="listItem.type === 2" style="margin-right: -24rpx">
<u-radio
@change="changeRadio($event, listItem.code, index, listIndex)"
v-for="radioValue in listItem.itemList"
:key="radioValue"
:name="radioValue"
>
<span :style="{ color: listItem.value === radioValue ? '#1890ff' : '' }">{{ radioValue }}</span>
</u-radio>
</u-radio-group>
<!-- 单选(竖向排列) -->
<u-radio-group :value="listItem.value" v-else-if="listItem.type === 21" class="flex flex-col w-full">
<div v-for="radioValue in listItem.itemList" :key="radioValue">
<u-radio
style="display: block; width: 100%; margin-left: 0; height: 40px; line-height: 40px"
:name="radioValue"
:key="radioValue"
@change="changeRadio($event, listItem.code, index, listIndex)"
>
<span :style="{ color: listItem.value === radioValue ? '#1890ff' : '' }">{{ radioValue }}</span>
</u-radio>
<div
v-if="
listItem.code === 'ZLFA-FBJZ' &&
listItem.value === '其他原因所致的缺血性卒中(SOE)' &&
radioValue === '其他原因所致的缺血性卒中(SOE)'
"
class="flex ml-2"
>
<div>是否烟雾病:</div>
<u-radio-group :value="listItem.ywbValue">
<u-radio @change="changeYWBRadio($event, listItem.ywbCode, index, listIndex)" name="是"> </u-radio>
<u-radio @change="changeYWBRadio($event, listItem.ywbCode, index, listIndex)" name="否"> </u-radio>
</u-radio-group>
</div>
</div>
</u-radio-group>
<!-- 单选(横向三列) -->
<u-radio-group :value="listItem.value" v-else-if="listItem.type === 22" class="flex flex-row flex-wrap w-full">
<div
v-for="(radioValue, radioIndex) in listItem.itemList"
:key="radioValue"
style="width: 200rpx"
class="flex"
:class="{
'text-left': radioIndex % 3 === 0,
'text-center': (radioIndex - 1) % 3 === 0,
'text-right': (radioIndex + 1) % 3 === 0,
'flex-wrap': radioIndex > 3,
'flex-nowrap': radioIndex <= 3,
}"
>
<u-radio
@change="changeRadio($event, listItem.code, index, listIndex)"
style="margin-left: 0; height: 40px; line-height: 40px"
:name="radioValue"
>
<span :style="{ color: listItem.value === radioValue ? '#1890ff' : '' }">{{ radioValue }}</span>
</u-radio>
</div>
</u-radio-group>
<!-- 单选(带分数输入框) -->
<u-radio-group :value="listItem.value" v-else-if="listItem.type === 23" class="flex flex-column flex-wrap w-full">
<template v-if="listItem.code !== 'JRZL-SQ-ASPECT'">
<div
v-for="(radioValue, radioIndex) in listItem.listItem"
:key="radioIndex"
class="flex flex-1 items-center"
style="height: 44px"
>
<u-radio
style="margin-left: 0; height: 40px; line-height: 40px"
:style="{ color: listItem.value === radioValue ? '#1890ff' : '' }"
:value="radioValue.type"
@change="changeRadio($event, listItem.code, index, listIndex)"
>
{{ radioValue.name }}
</u-radio>
<div v-if="radioValue.showIpt">
<u-input
:border="true"
:clearable="false"
:value="radioValue.value"
placeholder="请输入"
style="width: 100rpx !important"
@click="iptChangeRadio('score', listItem.code, index, listIndex)"
@blur="changeScroeNum($event, radioValue.min, radioValue.max, radioValue.code, index, listIndex, radioIndex)"
/>
</div>
</div>
</template>
<template v-else>
<div>
<u-radio
style="margin-left: 0"
:style="{ color: listItem.value === 'score' ? '#1890ff' : '' }"
name="score"
@change="changeRadio('score', listItem.code, index, listIndex)"
>
<div class="flex items-center" :style="{ color: listItem.value === 'score' ? '#1890ff' : '' }">
CT<u-input
:border="true"
:clearable="false"
:value="listItem.listItem[0].value"
placeholder="请输入"
style="width: 100rpx !important"
@click="iptChangeRadio('score', listItem.code, index, listIndex)"
@blur="
changeScroeNum(
$event,
listItem.listItem[0].min,
listItem.listItem[0].max,
listItem.listItem[0].code,
index,
listIndex,
0,
)
"
/>MRI<u-input
:border="true"
:clearable="false"
:value="listItem.listItem[1].value"
placeholder="请输入"
style="width: 100rpx !important"
@click="iptChangeRadio('score', listItem.code, index, listIndex)"
@blur="
changeScroeNum(
$event,
listItem.listItem[1].min,
listItem.listItem[1].max,
listItem.listItem[1].code,
index,
listIndex,
1,
)
"
/>
</div>
</u-radio>
</div>
<u-radio
style="margin-left: 0; height: 40px; line-height: 40px"
name="noScore"
@change="changeRadio('noScore', listItem.code, index, listIndex)"
>
<span :style="{ color: listItem.value === 'noScore' ? '#1890ff' : '' }">未评</span>
</u-radio>
</template>
</u-radio-group>
<!-- 单选(竖向排列带分数输入框) -->
<u-radio-group :value="listItem.value" v-else-if="listItem.type === 24" class="flex flex-column w-full">
<div class="w-full flex" v-for="(radioValue, radioIndex) in listItem.itemList" :key="radioIndex">
<u-radio
class="flex items-center"
:style="{ color: listItem.value === radioValue ? '#1890ff' : '' }"
:name="radioValue.name"
@change="changeRadio($event, listItem.code, index, listIndex)"
>
{{ radioValue.name }}
</u-radio>
<div v-if="radioValue.showIpt" class="flex items-center ml-1 mr-1">
<!-- :disabled="listItem.value !== radioValue.name" -->
<u-input
:border="true"
:clearable="false"
:value="radioValue.value"
:type="radioValue.unit ? 'number' : 'text'"
placeholder="请输入"
style="width: 150rpx !important"
@click="iptChangeRadio(radioValue.name, listItem.code, index, listIndex)"
@blur="
changeRadioScore(
$event,
radioValue.code,
index,
listIndex,
radioIndex,
radioValue.unit,
radioValue.min,
radioValue.max,
)
"
/>
<span>{{ radioValue.unit }}</span>
</div>
</div>
</u-radio-group>
<!-- 多选 -->
<u-checkbox-group
v-else-if="listItem.type === 3"
:value="listItem.value"
@change="changeCheck($event, listItem.code, index, listIndex, false, listItem.showOther)"
:class="{ 'justify-between': listItem.checkType - 0 === 4 }"
class="w-full flex flex-row flex-wrap"
>
<div
v-for="(check, checkIndex) in listItem.itemIsChecked"
:key="checkIndex"
:style="{ minWidth: listItem.checkType - 0 === 3 ? '33%' : listItem.checkType - 0 === 2 ? '50%' : 0 }"
class="my-2 flex items-center"
>
<u-checkbox v-model="check.checked" :name="listItem.itemList[checkIndex]">
<span :style="{ color: check.checked ? '#1890ff' : '' }">
{{ listItem.itemList[checkIndex] }}
</span>
</u-checkbox>
<u-input
:border="true"
:clearable="false"
:value="listItem.iptValue"
v-if="listItem.showIpt && listItem.showIptItem === listItem.itemList[checkIndex]"
@blur="changeOther($event, listItem.iptCode, index, listIndex)"
placeholder="请输入"
style="width: 200rpx"
/>
</div>
</u-checkbox-group>
<!-- 多选特殊类型 -->
<div v-else-if="listItem.type === 31" class="w-full">
<div v-for="(checkTest, checkIndex) in listItem.checkList" :key="checkTest.title">
<div>{{ checkTest.title }}</div>
<u-checkbox-group
:value="checkTest.value"
:class="{ 'justify-between': listItem.checkType - 0 === 4 }"
class="w-full flex flex-row flex-wrap"
@change="changeCheck($event, checkTest.code, index, listIndex, checkIndex)"
>
<div
style="min-width: 33%"
class="my-2 flex items-center"
v-for="(check, isCheckIndex) in checkTest.itemIsChecked"
:key="check"
>
<u-checkbox v-model="check.checked" :name="checkTest.itemList[isCheckIndex]">
<!-- itemIsChecked,itemList -->
<span :style="{ color: check.checked ? '#1890ff' : '' }">
{{ check }}
</span>
</u-checkbox>
<u-input
:border="true"
:clearable="false"
@bulr="changeCheckIpt($event, checkTest.iptCode, index, listIndex, checkIndex)"
:value="checkTest.iptValue"
placeholder="请输入"
style="width: 200rpx"
v-if="checkTest.showIpt && checkTest.showValue === checkTest.itemList[isCheckIndex]"
/>
</div>
</u-checkbox-group>
</div>
</div>
<!-- 时间选择 -->
<div
v-else-if="listItem.type === 4"
@click="openTimeSelect(listItem.title, listItem.code, index, listIndex, listItem.value)"
class="flex items-center"
>
<span class="mr-3" v-if="listItem.value">
{{ $moment(+listItem.value).format('YYYY-MM-DD HH:mm') }}
</span>
<span class="mr-3 gray-text" v-else>请选择时间</span>
<!-- <img src="@/static/icon/time.png" style="height: 20px" /> -->
<u-icon name="clock" color="#2979ff" size="28"></u-icon>
</div>
<!-- 展开底部下拉框 -->
<div
v-else-if="listItem.type === 5"
style="min-width: 160px; width: auto; justify-content: flex-end; height: 30px"
class="flex items-center"
@click="openDropDown(listItem.title, listItem.itemList, listItem.code, index, listIndex, listItem.value)"
>
<span style="margin-right: 10px" v-if="listItem.value">{{ listItem.value }}</span>
<span style="margin-right: 10px" v-else>请选择</span>
<!-- <img src="@/static/icon/right.png" style="height: 20px" /> -->
<u-icon name="arrow-right" color="#2979ff" size="28"></u-icon>
</div>
<!-- 带有最大最小值限制的输入框 -->
<div v-else-if="listItem.type === 7" class="flex items-center">
<div v-if="numIndex === index && numItemIndex === listIndex" class="mr-1 font-12 text-red">
<span v-if="exceed === 'max'"> 超过最大值{{ listItem.max }} </span>
<span v-else-if="exceed === 'min'"> 超过最小值{{ listItem.min }} </span>
</div>
<span v-if="listItem.beforeUnit">{{ listItem.beforeUnit }}</span>
<u-input
:border="true"
:clearable="false"
type="number"
v-model="listItem.value"
placeholder="请输入"
style="width: 200rpx"
@change="changeNum($event, listItem.min, listItem.max, listItem.code, index, listIndex)"
@blur="inputNumBlur($event, listItem.code)"
/>
<span v-if="listItem.unit">{{ listItem.unit }}</span>
</div>
<!-- 带已评输入框的单选 -->
<u-radio-group
:class="{ 'w-full': !listItem.title }"
v-else-if="listItem.type === 71"
:value="listItem.value"
class="flex-1"
>
<u-radio
:name="radioValue.name"
v-for="(radioValue, radioIndex) in listItem.listItem"
:key="radioValue.name"
class="ipt-radio"
style="height: 40px"
@change="changeRadio($event, listItem.code, index, listIndex)"
>
<u-input
:border="true"
:clearable="false"
v-if="radioValue.name === '已评'"
:style="{
color: listItem.value !== '已评' ? 'rgba(0,0,0,0.25)' : '',
background: listItem.value !== '已评' ? '#eee' : '',
}"
type="number"
:value="radioValue.value"
placeholder="请输入"
class="ipt-radio"
style="width: 200rpx"
@click="iptChangeRadio(radioValue.name, listItem.code, index, listIndex)"
@blur="changeScroeNum($event, listItem.min, listItem.max, radioValue.code, index, listIndex, radioIndex)"
/>
<span v-else :style="{ color: listItem.value === radioValue.name ? '#1890ff' : '' }">{{ radioValue.name }}</span>
</u-radio>
</u-radio-group>
</div>
</div>
</div>
</template>
</template>
</div>
<u-picker mode="time" v-model="show" :title="title" :params="timeSelectparams" @confirm="chooseTime"></u-picker>
<u-picker mode="selector" v-model="showDrop" :range="dropList" :default-selector="[0]" @confirm="chooseSelector"></u-picker>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapState } from 'vuex';
export default {
props: {
testIndex: {
type: Number,
default: 0,
},
list: {
type: Array,
default: () => [],
},
answerList: {
type: Object,
default: () => {},
},
},
data: () => ({
test: [], //
radioStyle: {
//
display: 'block',
width: '100%',
marginLeft: '0',
height: '40px',
lineHeight: '40px',
},
timeValue: '',
title: '', //
timeIndex: 0, // index
timeItemIndex: 0, // index
timeCode: '', // code
show: false, //
ZQTHSJ: null, //
timeSelectparams: {
//
year: true,
month: true,
day: true,
hour: true,
minute: true,
second: false,
},
dropTitle: '',
dropList: [],
dropCode: '',
dropIndex: '',
dropItemIndex: '',
dValue: '',
showDrop: false,
numIndex: '',
numItemIndex: '',
exceed: '',
}),
computed: {
...mapState('carbasics', ['firstAidId']),
getBMI() {
let height = 0;
let weight = 0;
for (let key in this.test) {
for (let i in this.test[key]) {
if (this.test[key][i].code === 'RYPG-height' && this.test[key][i].value) {
height = this.test[key][i].value - 0;
} else if (this.test[key][i].code === 'RYPG-weight' && this.test[key][i].value) {
weight = this.test[key][i].value - 0;
}
}
}
if (height && weight) {
return (weight / (((height / 100) * height) / 100)).toFixed(2);
} else {
return 0;
}
},
getCount() {
let num = 0;
for (let key in this.test) {
for (let i in this.test[key]) {
if (this.test[key][i].code === 'TSCX-AVM-SIZE') {
// ['<3cm1 ', '3-6cm2 ', '>6cm3 ']
if (this.test[key][i].value === '<3cm(1 分)') {
num += 1;
} else if (this.test[key][i].value === '3-6cm(2 分)') {
num += 2;
} else if (this.test[key][i].value === '>6cm(3 分)') {
num += 3;
}
} else if (this.test[key][i].code === 'TSCX-AVM-features') {
// ['0 ', '1 ']
if (this.test[key][i].value === '大脑非功能区(0 分)') {
num += 0;
} else if (this.test[key][i].value === '大脑功能区(1 分)') {
num += 1;
}
} else if (this.test[key][i].code === 'TSCX-AVM-SEAT') {
// ['0 ', '1 ']
if (this.test[key][i].value === '浅表部(0 分)') {
num += 0;
} else if (this.test[key][i].value === '深部(1 分)') {
num += 1;
}
}
}
}
return num;
},
},
methods: {
/**
* 判断当前 item 是否显示
* 根据 显示条件: isShow 是否和父级code: Fcode 的值相等判断
* 如果 Fcode isShow 都不存在,则直接返回true,显示当前item
* 如果 Fcode isShow 都存在,而且 (父级code存在且父级code的value和isShow值相等) 则返回ture
* 否则返回false
*/
itemIsShow(code, isShow, level) {
if (!level) {
if (code && isShow) {
for (let i = 0; i < this.test.length; i++) {
const item = this.test[i];
if (item) {
for (let j = 0; j < item.length; j++) {
const jtem = item[j];
if (jtem.code === code && jtem.value === isShow) {
return true;
} else if (i === this.test.length - 1 && j === item.length) {
return false;
}
}
}
}
} else {
return true;
}
} else {
if (this.answerList && this.answerList[code]) {
const value = this.answerList[code];
if (Array.isArray(value)) {
for (var i = 0; i < value.length; i++) {
if (value[i] === isShow) {
return true;
} else if (i === value.length - 1) {
return false;
}
}
} else {
return value === isShow;
}
} else {
return true;
}
}
},
/**
* 判断当前试题是否显示
* 不是根据父级试题选了哪一项而显示,而是根据父级试题没选哪一项而显示
* 比如 选了 '死亡',不能再出现'出院带药'等试题,选了其他选项则可以出现
* 需要根据 @param level 来判断父级试题与当前题是否处于同一分类下
* 并且 父级 题目的 答案不一定是字符串,也有可能是数组
*/
itemNoShow(NFcode, noShow, level) {
if (level && NFcode && noShow) {
for (let i = 0; i < this.test.length; i++) {
const item = this.test[i];
for (let j = 0; j < item.length; j++) {
const jtem = item[j];
if (jtem.code === NFcode) {
return this.judgeType(jtem.value, noShow);
} else if (i === this.test.length - 1 && j === item.length) {
return false;
}
}
}
} else {
return true;
}
},
/**
* 修改输入框内容
* 先获取到 this.test 数组props接收的值不能在当前界面修改,所以用将list的值赋值给了 test ,渲染界面也是用的 test
* 通过 index 修改掉 test 数组后,存储答案给服务端
*/
changeIpt(e, code, index, itemIndex) {
this.Rerender(e, index, itemIndex);
this.setAnswer(code, e);
},
/**
* 修改单选框内容
* 和输入框操作一样
*/
changeRadio(e, code, index, itemIndex) {
// console.log('e, code, index, itemIndex: ', e, code, index, itemIndex);
this.Rerender(e, index, itemIndex);
// this.$emit('getCollaoseHeight', this.testIndex);
this.setAnswer(code, e);
},
// ,
changeYWBRadio(e, code, index, itemIndex) {
let Arr = [...this.test];
Arr[index][itemIndex].ywbValue = e;
this.test = [...Arr];
this.setAnswer(code, e);
},
// ,test,
Rerender(value, index, itemIndex) {
let Arr = [...this.test];
Arr[index][itemIndex].value = value;
this.test = [...Arr];
},
//
changeRadioScore(e, code, index, itemIndex, radioIndex, unit, min, max) {
let num = e;
if (unit && max) {
if (num || num - 0 === 0) {
if (num < min) {
// this.$message.warning('' + min);
this.$refs.uToast.show({
title: '最低数值为:' + min,
type: 'warning',
});
num = min;
} else if (num > max) {
// this.$message.warning('' + max);
this.$refs.uToast.show({
title: '最高数值为:' + max,
type: 'warning',
});
num = max;
}
}
}
let Arr = [...this.test];
Arr[index][itemIndex].itemList[radioIndex].value = num;
this.test = [...Arr];
this.setAnswer(code, num);
},
/**
* 修改多选框内容
* 因为多选的类型有分成了几种特殊类型
* 所以需要判断某些参数是否存在
*/
changeCheck(e, code, index, itemIndex, checkIndex, other) {
let val = [...e];
if (!checkIndex && checkIndex !== 0) {
if (other && e.length) {
for (let i = 0; i < e.length; i++) {
if (e[i] === other) {
val = [other];
}
}
}
this.Rerender(val, index, itemIndex);
} else {
let Arr = [...this.test];
Arr[index][itemIndex].checkList[checkIndex].value = val;
this.test = [...Arr];
}
const codeAndAnswerList = [
{
questionCode: code,
answer: val,
},
];
const setParams = {
codeAndAnswerList,
firstAidId: this.firstAidId,
};
uni.$u.api.setRecord(setParams);
},
//
isDisabled(check, value, other) {
let status = false;
if (value.length && other) {
for (let i = 0; i < value.length; i++) {
if (value[i] && value[i] === other) {
status = true;
}
}
}
if (check === other) {
return false;
} else {
return status;
}
},
//
getCheckIsCheck(list, value) {
let status = true;
for (let key in list) {
if (list[key] === value) {
status = true;
}
}
return status;
},
//
changeOther(e, code, index, itemIndex) {
let Arr = [...this.test];
Arr[index][itemIndex].iptValue = e;
this.test = [...Arr];
this.setAnswer(code, e);
},
//
changeCheckIpt(e, code, index, listIndex, checkIndex) {
let Arr = [...this.test];
Arr[index][listIndex].checkList[checkIndex].iptValue = e;
this.test = [...Arr];
this.setAnswer(code, e);
},
//
async openTimeSelect(title, code, index, listIndex, time) {
this.timeValue = time ? time : 0;
this.title = title;
this.timeIndex = index;
this.timeItemIndex = listIndex;
this.timeCode = code;
this.show = true;
if (code === 'YJJL-CTendTime') {
const codeList = ['ZQTH-SJ'];
const param = {
codeList,
firstAidId: this.firstAidId,
};
const data = await this.$u.api.getRecord(param);
this.ZQTHSJ = data.record['ZQTH-SJ'] && data.record['ZQTH-SJ'].length ? data.record['ZQTH-SJ'][0] : null;
}
},
//
chooseTime(time) {
const timeValue = this.$moment(`${time.year}-${time.month}-${time.day} ${time.hour}:${time.minute}:00`).valueOf();
if (this.timeCode === 'YJJL-CTendTime' && this.ZQTHSJ && timeValue - 0 < this.ZQTHSJ - 0) {
// this.$message.error('CT,');
this.$refs.uToast.show({
title: 'CT完成时间不能晚于签署知情同意书时间,请重新选择',
type: 'warning',
});
return;
}
this.Rerender(timeValue, this.timeIndex, this.timeItemIndex);
this.setAnswer(this.timeCode, timeValue);
this.show = false;
},
//
openDropDown(title, list, code, index, itemIndex, value) {
this.dropTitle = title;
this.dropList = list;
this.dropCode = code;
this.dropIndex = index;
this.dropItemIndex = itemIndex;
this.dValue = value;
this.showDrop = true;
},
//
chooseSelector(e) {
this.Rerender(this.dropList[e], this.dropIndex, this.dropItemIndex);
this.setAnswer(this.dropCode, value);
},
/**
* 修改数字输入框,存在最大最小值
* 小于最小值,则存储最小值
* 大于最大值,则存储最大值
* 否则存储当前拿到的值
*/
changeNum(e, min, max, code, index, itemIndex) {
let num = 0;
if (e || e - 0 === 0) {
if (e < min) {
this.numIndex = index;
this.numItemIndex = itemIndex;
this.exceed = 'min';
num = min;
} else if (e > max) {
this.numIndex = index;
this.numItemIndex = itemIndex;
this.exceed = 'max';
num = max;
} else {
this.numIndex = null;
this.numItemIndex = null;
this.exceed = '';
num = e;
}
}
this.Rerender(num, index, itemIndex);
},
// ,,/
inputNumBlur(e, code) {
this.numIndex = null;
this.numItemIndex = null;
this.exceed = '';
if (code) {
if (code === 'RYPG-systolicPressure') {
//
const maxNum = this.getPressure(1); //
if (e < maxNum && maxNum) {
// this.$message.error(',');
this.$refs.uToast.show({
title: '收缩压必须大于舒张压,请重新填写',
type: 'warning',
});
return;
}
} else if (code === 'RYPG-diastolicPressure') {
//
const minNum = this.getPressure(0); //
if (e > minNum && minNum) {
// this.$message.error(',');
this.$refs.uToast.show({
title: '舒张压必须小于收缩压,请重新填写',
type: 'warning',
});
return;
}
}
this.setAnswer(code, e);
}
},
// / 0:,1:
getPressure(type) {
const { list } = this;
let num = 0;
for (let i = 0; i < list.length; i++) {
const item = list[i];
for (let k = 0; k < item.length; k++) {
const obj = item[k];
if ((obj.code === 'RYPG-systolicPressure' && type === 0) || (obj.code === 'RYPG-diastolicPressure' && type === 1)) {
num = obj.value - 0;
return num;
}
}
}
},
//
changeScroeNum(e, min, max, code, index, itemIndex, radioIndex) {
let num = 0;
if (e || e - 0 === 0) {
if (e < min) {
num = min;
} else if (e > max) {
num = max;
} else {
num = e;
}
}
let Arr = [...this.test];
Arr[index][itemIndex].listItem[radioIndex].value = num;
this.test = [...Arr];
this.setAnswer(code, num);
},
// ,
iptChangeRadio(value, code, index, itemIndex) {
console.log('value, code, index, itemIndex: ', value, code, index, itemIndex);
this.Rerender(value, index, itemIndex);
this.setAnswer(code, value);
},
//
setAnswer(questionCode, value) {
const params = {
codeAndAnswerList: [
{
questionCode,
answer: [value],
},
],
firstAidId: this.firstAidId,
};
uni.$u.api.setRecord(params);
},
},
watch: {
list: {
handler() {
this.test = [...this.list];
},
deep: true,
},
},
// --
mounted() {},
created() {
this.test = [...this.list];
console.log('this.test: ', this.test);
},
// --
beforeUpdate() {},
// --
updated() {},
// --()
activated() {},
// --()
deactivated() {},
// --
beforeDestroy() {},
};
</script>
<style>
.ipt-radio view {
height: 40px;
line-height: 40px;
}
.list-box {
border-radius: 4px;
overflow: hidden;
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5;
list-style: none;
font-feature-settings: 'tnum';
position: relative;
}
.list-item {
min-height: 54px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
border-bottom: 1px solid #e8e8e8;
margin-top: 8px;
}
</style>

21
src/pages.json

@ -34,7 +34,7 @@
{
"path": "pages/camera/camera",
"style": {
"navigationBarTitleText": "拍照"
"navigationBarTitleText": "拍照识别"
}
},
{
@ -57,6 +57,25 @@
},
{
"path": "pages/inner/inner",
"style": {
"navigationBarTitleText": "信息录入",
"enablePullDownRefresh": true
}
},
{
"path": "pages/patient/patient",
"style": {
"navigationBarTitleText": "患者信息"
}
},
{
"path": "pages/info/info",
"style": {
"navigationBarTitleText": "基本信息"
}
},
{
"path": "pages/outside/outside",
"style": {
"navigationBarTitleText": "信息录入"
}

92
src/pages/camera/camera.vue

@ -5,42 +5,84 @@
</camera>
<view class="scan-text">支持将住院病案首页医嘱单拍照进行文字识别</view>
<button type="primary" @click="takePhoto">拍照</button>
<image v-for="item in srcList" :key="item" mode="widthFix" class="photos-box" :src="item"></image>
<scroll-view :scroll-x="true">
<image class="photos-box" v-for="item in srcList" :key="item" :src="item" />
</scroll-view>
<button type="primary" @click="submitSrc">确定</button>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
export default {
components: {},
data: () => ({ srcList: [] }),
computed: {},
data: () => ({
srcList: ['http://101.201.226.163/filedeal/uploads/upload/20220117/5544a104844c448d8fbe339563580008.jpg'],
action: '',
}),
computed: {
...mapState('user', ['token']),
...mapState('carbasics', ['firstAidId']),
},
created() {
this.action = uni.$u.api.uploadFile;
// this.srcList = [];
},
methods: {
...mapMutations('carbasics', ['setIsRefresh']),
//
takePhoto() {
const ctx = uni.createCameraContext();
ctx.takePhoto({
quality: 'high',
success: res => {
this.srcList.push(res.tempImagePath);
console.log('this.srcList: ', this.srcList);
/* 返回调用页面并把图片URL传递过去 */
/* let pages = getCurrentPages();
let prevPage = pages[pages.length - 2];
prevPage.setData({
"image": res.tempImagePath,
})
uni.navigateBack(); */
/* 调用页面获取图片URL方法 */
/* let pages = getCurrentPages();
let currPage = pages[pages.length-1];
if(typeof(currPage.data.image) != undefined && currPage.data.image != null){
console.log('获取图片:', currPage.data.image)
} */
this.uploadImage(res.tempImagePath);
},
});
},
//
uploadImage(path) {
uni.uploadFile({
url: this.action,
filePath: path,
name: 'files',
header: {
Authorization: 'Bearer ' + this.token,
'Content-Type': 'multipart/form-data',
},
formData: {},
success: res => {
const url = JSON.parse(res.data).data[0].visitUrl; //
this.srcList.push(url);
},
fail: error => {
console.log('error: ', error);
},
});
},
error(e) {
console.log(e.detail);
//
async submitSrc() {
try {
const param = {
fileList: this.srcList,
projectId: this.firstAidId,
};
const data = await this.$u.api.generalBasic(param);
console.log('data: ', data);
this.$refs.uToast.show({
title: '上传成功',
type: 'success',
});
this.setIsRefresh();
uni.navigateBack();
} catch (error) {
this.$refs.uToast.show({
title: '上传失败,请稍后重试',
type: 'warning',
});
}
},
},
watch: {},
@ -68,4 +110,10 @@ export default {
};
</script>
<style></style>
<style>
.photos-box {
width: 130rpx;
height: 130rpx !important;
margin: 10rpx;
}
</style>

14
src/pages/establish/establish.vue

@ -23,7 +23,7 @@
:custom-btn="true"
@on-success="successUpload"
>
<img slot="addBtn" src="./icon/idcard.png" class="img-icon" />
<img slot="addBtn" src="@/common/icon/idcard.png" class="img-icon" />
</u-upload>
<div v-else-if="listItem.type === 3" style="width: 174px">
<!-- {{ codeValue[listItem.code] }} -->
@ -68,20 +68,11 @@
{{ radioItem.name }}
</u-radio>
</u-radio-group>
<!-- <div
v-else-if="listItem.type === 5"
style="min-width: 100px; width: auto; justify-content: flex-end"
class="d-flex align-center"
@click="showDrop = true"
>
<span style="margin-right: 10px">{{ codeValue['CJBL-YSBL'] }}</span>
<img src="@/static/icon/right.png" style="height: 20px" />
</div> -->
</div>
</div>
</div>
</div>
<div class="d-flex btn-box" v-if="showBtn">
<div class="flex btn-box" v-if="showBtn">
<u-button type="primary" :disabled="isSubmit" id="complete-btn" class="flex-1 btn mr-2" @click="submit"> 完成创建病例 </u-button>
<!-- <a-button
:disabled="isStartDisabled()"
@ -168,7 +159,6 @@ export default {
},
onLoad(options) {
console.log('options: ', options);
this.role = options.role;
this.action = uni.$u.api.identifyWords;
},

BIN
src/pages/establish/icon/bottom.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

349
src/pages/info/info.vue

@ -0,0 +1,349 @@
<template>
<div class="info">
<div bordered class="list-box bg-white mb-2" v-for="(item, index) in list" :key="index">
<template v-for="(listItem, listIndex) in item">
<div class="list-item" :key="listIndex" v-if="getRadioValue(listItem.Fcode) === listItem.isShow">
<div class="w-full flex flex-nowrap justify-between items-center">
<div class="flex items-center">
{{ listItem.title }}
<span v-if="listItem.isTrue" style="color: red; font-size: 20px">*</span>
</div>
<div :style="{ marginRight: listItem.type === 2 ? '-24rpx' : '0' }">
<u-input
:border="true"
:clearable="false"
:value="JBXXZYH"
v-if="listItem.type === 1"
placeholder="请输入"
@blur="chanegIpt"
/>
<u-radio-group :value="getRadioValue(listItem.code)" v-else-if="listItem.type === 2" name="radioGroup">
<u-radio
@change="changeRadio($event, listItem.code)"
:name="radioValue"
v-for="radioValue in listItem.itemList"
:key="radioValue"
>
{{ radioValue }}
</u-radio>
</u-radio-group>
<div
v-else-if="listItem.type === 3"
@click="openTimeSelect(listItem.title, listItem.code, getTime(listItem.code))"
class="flex items-center"
>
<span class="mr-3" v-if="getTime(listItem.code)">
{{ getTime(listItem.code) }}
</span>
<span class="mr-3 gray-text" v-else>请选择时间</span>
<u-icon name="clock" color="#2979ff" size="28"></u-icon>
</div>
<div
v-else-if="listItem.type === 4"
style="min-width: 100px; width: auto; justify-content: flex-end"
class="flex items-center"
@click="openDropDown(listItem.title, listItem.itemList, listItem.dropType, getValue(listItem.code))"
>
<span style="margin-right: 10px">{{ getValue(listItem.code) ? getValue(listItem.code) : '请选择' }}</span>
<u-icon name="arrow-right" color="#2979ff" size="28"></u-icon>
</div>
</div>
</div>
</div>
</template>
</div>
<u-picker mode="time" v-model="show" :title="title" :params="timeSelectparams" @confirm="chooseTime"></u-picker>
<u-picker mode="selector" v-model="showDrop" :range="dropList" :default-selector="[0]" @confirm="chooseSelector"></u-picker>
</div>
</template>
<script>
import { mapState } from 'vuex';
export default {
components: {},
data: () => ({
timeSelectparams: {
//
year: true,
month: true,
day: true,
hour: true,
minute: true,
second: false,
},
list: [
[{ title: '住院号', type: 1, code: 'JBXX-ZYH' }],
[
{ title: '发病时间', type: 2, itemList: ['已知', '未知', '醒后卒中'], code: 'JBXX-FBSJ' },
{ title: '发病时间', type: 3, Fcode: 'JBXX-FBSJ', isShow: '已知', code: 'JBXX-FBTime' },
{ title: '最后正常时间', type: 3, Fcode: 'JBXX-FBSJ', isShow: '醒后卒中', code: 'JBXX-ZHZC' },
],
[
{ title: '是否院内卒中', type: 2, itemList: ['是', '否'], code: 'JBXX-YZCZ' },
{ title: '到院时间', type: 3, Fcode: 'JBXX-YZCZ', isShow: '否', code: 'JBXX-DYSJ' },
],
[
{ title: '办理住院手续时间', type: 3, code: 'JBXX-ZYSJ' },
{ title: '入院途径', type: 4, code: 'JBXX-RYTJ', dropType: 'one', itemList: ['急诊', '门诊', '其他医疗机构转入', '其他'] },
{
title: '来院方式',
type: 4,
code: 'JBXX-LYFS',
dropType: 'two',
itemList: ['本院急救车', '当地120', '外院转院-网络协作医院', '外院转院-非网络协作医院', '自行来院'],
},
],
[{ title: '卒中团队到场时间', type: 3, code: 'JBXX-TDDCSJ' }],
],
JBXXZYH: null,
JBXXFBSJ: null,
JBXXFBTime: null,
JBXXYZCZ: null,
JBXXZHZC: null,
JBXXDYSJ: null,
JBXXZYSJ: null,
JBXXRYTJ: null,
JBXXLYFS: null,
JBXXTDDCSJ: null,
show: false,
title: '',
timeCode: '',
showDrop: false,
dropTitle: '',
dropList: [],
dropType: 'one',
dValue: '',
timeValue: 0,
}),
computed: { ...mapState('carbasics', ['firstAidId']) },
created() {
this.getDefaultData();
},
methods: {
//
chanegIpt(e) {
this.JBXXZYH = e;
const list = [
{
questionCode: 'JBXX-ZYH',
answer: [this.JBXXZYH],
},
];
const setParam = {
codeAndAnswerList: list,
firstAidId: this.firstAidId,
};
this.$u.api.setRecord(setParam);
},
//
getRadioValue(code) {
if (code === 'JBXX-FBSJ') {
return this.JBXXFBSJ;
} else if (code === 'JBXX-YZCZ') {
return this.JBXXYZCZ;
}
},
//
changeRadio(e, code) {
let list = [
{
questionCode: '',
answer: [e],
},
];
if (code === 'JBXX-FBSJ') {
this.JBXXFBSJ = e;
list[0].questionCode = 'JBXX-FBSJ';
} else if (code === 'JBXX-YZCZ') {
list[0].questionCode = 'JBXX-YZCZ';
this.JBXXYZCZ = e;
}
const setParam = {
codeAndAnswerList: list,
firstAidId: this.firstAidId,
};
this.$u.api.setRecord(setParam);
},
//
openTimeSelect(title, code, time) {
if (time) {
this.timeValue = this.$moment(time).valueOf();
}
this.title = title;
this.timeCode = code;
this.show = true;
},
//
chooseTime(time) {
const timeValue = this.$moment(`${time.year}-${time.month}-${time.day} ${time.hour}:${time.minute}:00`).valueOf();
this.show = false;
let list = [
{
questionCode: '',
answer: [timeValue],
},
];
if (this.title === '最后正常时间') {
list[0].questionCode = 'JBXX-ZHZC';
this.JBXXZHZC = timeValue;
} else if (this.title === '到院时间') {
list[0].questionCode = 'JBXX-DYSJ';
this.JBXXDYSJ = timeValue;
} else if (this.title === '办理住院手续时间') {
list[0].questionCode = 'JBXX-ZYSJ';
this.JBXXZYSJ = timeValue;
} else if (this.title === '卒中团队到场时间') {
list[0].questionCode = 'JBXX-TDDCSJ';
this.JBXXTDDCSJ = timeValue;
} else if (this.title === '发病时间') {
list[0].questionCode = 'JBXX-FBTime';
this.JBXXFBTime = timeValue;
}
const setParam = {
codeAndAnswerList: list,
firstAidId: this.firstAidId,
};
this.$u.api.setRecord(setParam);
},
//
// ,
// false
getTime(code) {
if (code === 'JBXX-ZHZC' && this.JBXXZHZC) {
return this.$moment(+this.JBXXZHZC).format('YYYY-MM-DD HH:mm');
} else if (code === 'JBXX-DYSJ' && this.JBXXDYSJ) {
return this.$moment(+this.JBXXDYSJ).format('YYYY-MM-DD HH:mm');
} else if (code === 'JBXX-ZYSJ' && this.JBXXZYSJ) {
return this.$moment(+this.JBXXZYSJ).format('YYYY-MM-DD HH:mm');
} else if (code === 'JBXX-TDDCSJ' && this.JBXXTDDCSJ) {
return this.$moment(+this.JBXXTDDCSJ).format('YYYY-MM-DD HH:mm');
} else if (code === 'JBXX-FBTime' && this.JBXXFBTime) {
return this.$moment(+this.JBXXFBTime).format('YYYY-MM-DD HH:mm');
} else {
return false;
}
},
//
openDropDown(title, list, type, value) {
this.dropTitle = title;
this.dropList = list;
this.dropType = type;
this.dValue = value;
this.showDrop = true;
},
//
chooseSelector(index) {
const value = this.dropList[index];
let list = [
{
questionCode: '',
answer: [value],
},
];
if (this.dropTitle === '入院途径') {
list[0].questionCode = 'JBXX-RYTJ';
this.JBXXRYTJ = value;
} else {
list[0].questionCode = 'JBXX-LYFS';
this.JBXXLYFS = value;
}
this.showDrop = false;
if (value) {
const setParam = {
codeAndAnswerList: list,
firstAidId: this.firstAidId,
};
this.$u.api.setRecord(setParam);
}
},
//
getValue(code) {
if (code === 'JBXX-RYTJ') {
return this.JBXXRYTJ;
} else if (code === 'JBXX-LYFS') {
return this.JBXXLYFS;
}
},
async getDefaultData() {
try {
const codeList = [
'JBXX-ZYH',
'JBXX-FBSJ',
'JBXX-YZCZ',
'JBXX-ZHZC',
'JBXX-DYSJ',
'JBXX-ZYSJ',
'JBXX-RYTJ',
'JBXX-LYFS',
'JBXX-TDDCSJ',
'JBXX-FBTime',
];
const param = {
codeList,
firstAidId: this.firstAidId,
};
const data = await this.$u.api.getRecord(param);
this.JBXXZYH = data.record['JBXX-ZYH'] && data.record['JBXX-ZYH'].length ? data.record['JBXX-ZYH'][0] : null;
this.JBXXFBSJ = data.record['JBXX-FBSJ'] && data.record['JBXX-FBSJ'].length ? data.record['JBXX-FBSJ'][0] : null;
this.JBXXFBTime = data.record['JBXX-FBTime'] && data.record['JBXX-FBTime'].length ? data.record['JBXX-FBTime'][0] : null;
this.JBXXYZCZ = data.record['JBXX-YZCZ'] && data.record['JBXX-YZCZ'].length ? data.record['JBXX-YZCZ'][0] : null;
this.JBXXZHZC = data.record['JBXX-ZHZC'] && data.record['JBXX-ZHZC'].length ? data.record['JBXX-ZHZC'][0] : null;
this.JBXXDYSJ = data.record['JBXX-DYSJ'] && data.record['JBXX-DYSJ'].length ? data.record['JBXX-DYSJ'][0] : null;
this.JBXXZYSJ = data.record['JBXX-ZYSJ'] && data.record['JBXX-ZYSJ'].length ? data.record['JBXX-ZYSJ'][0] : null;
this.JBXXRYTJ = data.record['JBXX-RYTJ'] && data.record['JBXX-RYTJ'].length ? data.record['JBXX-RYTJ'][0] : null;
this.JBXXLYFS = data.record['JBXX-LYFS'] && data.record['JBXX-LYFS'].length ? data.record['JBXX-LYFS'][0] : null;
this.JBXXTDDCSJ = data.record['JBXX-TDDCSJ'] && data.record['JBXX-TDDCSJ'].length ? data.record['JBXX-TDDCSJ'][0] : null;
} catch (error) {
console.log(error);
}
},
},
watch: {},
// --
onLoad() {},
// --
onReady() {},
// --(not-nvue)
onShow() {},
// --
onHide() {},
// --
onUnload() {},
// --
onPullDownRefresh() {
uni.stopPullDownRefresh();
},
// --
onReachBottom() {},
// --(not-nvue)
/* onPageScroll(event) {}, */
// --
/* onShareAppMessage(options) {}, */
};
</script>
<style>
.list-box {
border-radius: 4px;
overflow: hidden;
box-sizing: border-box;
margin: 0 0 0.75rem 0;
padding: 0;
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5;
list-style: none;
font-feature-settings: 'tnum';
position: relative;
}
.list-item {
min-height: 54px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
}
</style>

175
src/pages/inner/inner.vue

@ -1,21 +1,160 @@
<template>
<div class="inner">inner</div>
<div class="inner">
<!-- :style="{ paddingTop: detailsData.valueType ? '28px' : '28px' }" -->
<div class="w-full" v-for="(item, index) in testList" :key="index">
<template v-if="item.testType === 1">
<Test :answer-list="answerList" v-if="type" class="w-full" :list="item.content" />
</template>
<u-collapse
:head-style="headerStyle"
:item-style="itemStyle"
class="mb-2 w-full"
v-if="item.testType === 2"
:bordered="false"
expand-icon-position="right"
:ref="'collapseView' + index"
>
<!-- <template #expandIcon="props">
<u-icon type="down" :rotate="props.isActive ? 0 : -180" />
</template> -->
<u-collapse-item :open="true" class="w-full" :title="item.testTitle" :style="customStyle">
<Test
:testIndex="index"
@getCollaoseHeight="getCollaoseHeight"
:answer-list="answerList"
v-if="type"
class="w-full"
:list="item.content"
/>
</u-collapse-item>
</u-collapse>
</div>
<div class="ocr-open-box" @click="openOcr">OCR</div>
</div>
</template>
<script>
import { mapState } from 'vuex';
import Mixin from './mixin';
export default {
components: {},
data: () => ({}),
computed: {},
methods: {},
watch: {},
mixins: [Mixin],
data: () => ({
testList: [],
customStyle: 'background: #fff;border-radius: 4px;border: 0;overflow: hidden',
headerStyle: {
height: '54px',
lineHeight: '30px',
fontSize: '18px',
padding: '0 16px',
/* color: #1890ff; */
color: 'rgba(0, 0, 0, 0.65)',
fontWeight: 'bold',
backgroundColor: '#fff',
},
itemStyle: { marginBottom: '8px' },
type: 'RYPG',
afterStr: '主要治疗',
beforeStr: '基本信息',
answerList: {},
}),
computed: { ...mapState('carbasics', ['InputCode', 'firstAidId', 'isRefresh']) },
methods: {
// ocr
openOcr() {
uni.navigateTo({ url: '/pages/camera/camera' });
},
// code,
async getAnswer() {
const codeList = [];
for (let key in this.codeValue) {
if (key === this.type) {
for (let value in this.codeValue[key]) {
codeList.push(value);
}
}
}
const param = {
codeList,
firstAidId: this.firstAidId,
};
const answer = await this.$u.api.getRecord(param);
this.answerList = answer.record;
this.reassign(answer.record);
},
// ()
reassign(recordList) {
for (let key in this.codeValue[this.type]) {
for (let value in recordList) {
if (key === value) {
if (Array.isArray(this.codeValue[this.type][key])) {
this.codeValue[this.type][key] = recordList[value];
break;
} else {
this.codeValue[this.type][key] = recordList[value][0];
break;
}
}
}
}
// list
this.reassignList();
// type
this.getTest();
},
//
// codeListcode value
// codeList,getTest
getTest() {
for (let i = 0; i < this.list.length; i++) {
if (this.list[i].name === this.type) {
this.testList = [...this.list[i].testList];
break;
}
}
},
//
getCollaoseHeight(index) {
const that = this;
// console.log('this.$refs', that.$refs[`collapseView${index}`]);
//
this.$nextTick(() => {
that.$refs[`collapseView${index}`][0].init();
});
},
},
watch: {
isRefresh(val) {
console.log('val: ', val);
this.getAnswer();
},
},
// --
onLoad() {},
onLoad() {
this.type = this.InputCode;
if (this.type === 'RYPG') {
this.afterStr = '主要治疗';
this.beforeStr = '基本信息';
} else if (this.type === 'SSXG') {
this.afterStr = '出院记录';
this.beforeStr = '入院评估';
} else if (this.type === 'CYJL') {
this.afterStr = '无数据';
this.beforeStr = '主要治疗';
}
// this.tips = '...';
this.getAnswer();
},
// --
onReady() {},
// --(not-nvue)
onShow() {},
onShow(status) {
if (status) {
console.log('status: ', status);
}
},
// --
onHide() {},
// --
@ -33,4 +172,24 @@ export default {
};
</script>
<style></style>
<style>
.ocr-open-box {
position: fixed;
right: 0;
top: 40%;
height: 40px;
width: 40px;
font-size: 16px;
background: #1890ff;
color: white;
display: flex;
align-items: center;
justify-content: center;
border-radius: 20px 20px 0 20px;
box-shadow: 0 0 4px #1890ff;
}
.inner {
background-color: #ededed;
min-height: 100vh;
}
</style>

1076
src/pages/inner/mixin.js

File diff suppressed because it is too large

962
src/pages/outside/mixin.js

@ -0,0 +1,962 @@
const mixin = {
data() {
return {
codeValue: {
RYPG: {
'RYPG-height': null,
'RYPG-weight': null,
'RYPG-mRSScore-pf': null,
'RYPG-GCS-pf': null,
'JBXX-ZYH': null,
'RYPG-systolicPressure': null,
'RYPG-diastolicPressure': null,
'RYPG-pulse': null,
'RYPG-mRSScore': null,
'RYPG-GCS': null,
'RYPG-NS': null,
'RYPG-swallowingFunction': null,
'RYPG-test': null,
'YJJL-bloodroutineReportTime': null,
'YJJL-CTendTime-outSide': '否',
'YJJL-CTendTime': null,
'RYPG-ZDJG': null,
},
ZYJC: {
'CTCX-ZUO': [],
'CTCX-YOU': [],
'CTCX-ML': null,
'BYPD-LNXG': [],
'BYPD-BYPD': [],
},
SSXG: {
'ZQTH-SJ': null,
'ZYZL-KSSJ': null,
'ZYZL-MZFS': null,
'ZYZL-SSFZ': [],
'ZYZL-SSFZ-OTHER': null,
'ZYZL-BFZ': [],
'ZYZL-BFZ-OTHER': null,
'ZYZL-YUH': null,
},
CYJL: {
'CYJL-JZ': null,
'CYPG-mRS-pf': null,
'CYPG-GCS-pf': null,
'CYQK-LYFS': null,
'CYJL-JZ-ARR': [],
'CYJL-TZ': null,
'CYJL-TZ-ARR': [],
'CYJL-JT': null,
'CYJL-JT-ARR': [],
'KFZL-SFJS': null,
'KFZL-ZLFS': [],
'KFZL-ZLCS': [],
'JKJY-SFXJ': '是',
'JKJY-XJFS': ['集体病区教育'],
'CYQK-CYSJ': null,
'CYQK-SWYY': [],
'CYQK-SWYY-OTHER': null,
'CYQK-SWSJ': null,
'CYPG-GCS': null,
'CYPG-mRS': null,
'CYQK-CYDY': [],
},
TSCX: {
'BYPD-BYPD': [],
'TSCX-LCBX': [],
'TSCX-NCX': [],
'TSCX-LSBS': null,
'TSCX-FBSJ': null,
'TSCX-SSBS': null,
'TSCX-XGWZ': null,
'XGWZ-ZUO': [],
'XGWZ-ZUO-OTHER': null,
'XGWZ-YOU': [],
'XGWZ-YOU-OTHER': null,
'TSCX-LNDC': null,
'TSCX-SSZL': null,
'TSCX-SSSJ': null,
'TSCX-ZLFS-ZUO': [],
'TSCX-ZLFS-ZUO-OTHER': null,
'TSCX-ZLFS-YOU': [],
'TSCX-ZLFS-YOU-OTHER': null,
'TSCX-BFZ': [],
'TSCX-AVM-TYPE': null,
'TSCX-AVM-SIZE': null,
'TSCX-AVM-features': null,
'TSCX-AVM-SEAT': null,
'TSCX-SFJMRS': null,
'TSCX-SFSSZL': null,
'TSCX-AVM-ZLSJ': null,
'TSCX-AVM-ZLCL': [],
'TSCX-SFSSZL-BFZ': [],
'TSCX-AVM-ZUO': [],
'TSCX-AVM-YOU': [],
'TSCX-AVM-ZHONG': [],
'TSCX-AVM-ZHONG-OTHER': null,
'TSCX-SFSSZL-BFZ-OTHER': null,
},
},
// 试题类型: null:单标题类型,1:输入框,2:单选,3:多选,4:时间选择器,5:底部弹框,6:评分器,(0:自动计算)
// 7:数字输入框,31:多选另种类型(带小标题)
// 试题展示类型: 1:直接展示,无需折叠面板,2:需要折叠面板
list: [],
};
},
methods: {
reassignList() {
this.list = [
{
name: 'RYPG',
testList: [
{
testTitle: '',
testType: 1,
content: [
[
{ title: '身高 cm', grade: 2, type: 7, min: 0, max: 350, code: 'RYPG-height', value: this.codeValue.RYPG['RYPG-height'] },
{ title: '体重 kg', grade: 2, type: 7, min: 0, max: 500, code: 'RYPG-weight', value: this.codeValue.RYPG['RYPG-weight'] },
{ title: 'BMI', grade: 2, type: 0, code: 'JBXX-BMI' },
],
[
{
title: '收缩压 mmHg',
grade: 2,
type: 7,
min: 0,
max: 300,
code: 'RYPG-systolicPressure',
value: this.codeValue.RYPG['RYPG-systolicPressure'],
},
{
title: '舒张压 mmHg',
grade: 2,
type: 7,
min: 0,
max: 300,
code: 'RYPG-diastolicPressure',
value: this.codeValue.RYPG['RYPG-diastolicPressure'],
},
{
title: '脉搏 次/分',
grade: 2,
type: 7,
min: 0,
max: 200,
code: 'RYPG-pulse',
value: this.codeValue.RYPG['RYPG-pulse'],
},
],
[
{
title: '本次入院 mRS 评分',
grade: 2,
type: 71,
},
{
title: '',
grade: 2,
type: 71,
listItem: [
{ name: '已评', showIpt: true, code: 'RYPG-mRSScore-pf', value: this.codeValue.RYPG['RYPG-mRSScore-pf'] },
{ name: '未评', showIpt: false },
],
min: 0,
max: 5,
code: 'RYPG-mRSScore',
value: this.codeValue.RYPG['RYPG-mRSScore'],
},
{
title: '入院时 GCS 评分',
grade: 2,
type: 71,
},
{
title: '',
grade: 2,
type: 71,
listItem: [
{ name: '已评', showIpt: true, code: 'RYPG-GCS-pf', value: this.codeValue.RYPG['RYPG-GCS-pf'] },
{ name: '未评', showIpt: false },
],
min: 3,
max: 15,
code: 'RYPG-GCS',
value: this.codeValue.RYPG['RYPG-GCS'],
},
{ title: '是否脑疝', grade: 2, type: 2, itemList: ['是', '否'], code: 'RYPG-NS', value: this.codeValue.RYPG['RYPG-NS'] },
{
title: '吞咽功能评估',
grade: 2,
type: 2,
itemList: ['是', '否'],
code: 'RYPG-swallowingFunction',
value: this.codeValue.RYPG['RYPG-swallowingFunction'],
},
{
title: '洼田饮水试验',
Fcode: 'RYPG-swallowingFunction',
isShow: '是',
},
{
title: '',
type: 22,
itemList: ['1级', '2级', '3级', '4级', '未评级'],
code: 'RYPG-test',
Fcode: 'RYPG-swallowingFunction',
isShow: '是',
value: this.codeValue.RYPG['RYPG-test'],
},
],
[
{
title: '血样报告时间',
grade: 2,
type: 4,
code: 'YJJL-bloodroutineReportTime',
value: this.codeValue.RYPG['YJJL-bloodroutineReportTime'],
},
{
title: 'CT是否外院已查',
type: 2,
grade: 2,
code: 'YJJL-CTendTime-outSide',
itemList: ['是', '否'],
value: this.codeValue.RYPG['YJJL-CTendTime-outSide'],
},
{
title: 'CT完成时间',
grade: 2,
Fcode: 'YJJL-CTendTime-outSide',
isShow: '否',
type: 4,
code: 'YJJL-CTendTime',
value: this.codeValue.RYPG['YJJL-CTendTime'],
},
],
[
{
title: '初步诊断',
grade: 2,
type: 5,
itemList: ['缺血性脑卒中', '出血性脑卒中', '短暂性脑缺血发作', '其他'],
code: 'RYPG-ZDJG',
value: this.codeValue.RYPG['RYPG-ZDJG'],
},
],
],
},
],
},
{
name: 'ZYJC',
testList: [
{
testTitle: 'CT平扫',
testType: 2,
content: [
[
{ title: '出血部位', grade: 2, type: null },
{
title: '',
type: 31,
checkList: [
{
title: '左侧',
code: 'CTCX-ZUO',
itemList: ['基底节区', '幕上脑叶', '小脑', '脑干', '脑室'],
value: this.codeValue.ZYJC['CTCX-ZUO'],
},
{
title: '右侧',
code: 'CTCX-YOU',
itemList: ['基底节区', '幕上脑叶', '小脑', '脑干', '脑室'],
value: this.codeValue.ZYJC['CTCX-YOU'],
},
],
},
],
[
{
title: '出血大小',
grade: 2,
type: 7,
min: 0,
max: 9999,
beforeUnit: '约',
unit: 'ml',
code: 'CTCX-ML',
value: this.codeValue.ZYJC['CTCX-ML'],
},
],
],
},
{
testTitle: '病因诊断',
testType: 2,
content: [
[
{ title: '颅内血管检查', grade: 2, type: null },
{
title: '',
type: 3,
code: 'BYPD-LNXG',
itemList: ['CTA', 'MRA', 'DSA', '未查'],
checkType: 4,
value: this.codeValue.ZYJC['BYPD-LNXG'],
},
],
[
{ title: '病因诊断', grade: 2, type: null },
{
title: '',
type: 3,
code: 'BYPD-BYPD',
itemList: [
'高血压',
'动静脉畸形 AVM',
'烟雾病',
'未血管淀粉样变性查',
'颅内动脉瘤',
'硬脑膜动静脉瘘',
'海绵状血管瘤',
'颅内静脉窦血栓形成',
'其他',
],
checkType: 3,
value: this.codeValue.ZYJC['BYPD-BYPD'],
},
],
],
},
],
},
{
name: 'SSXG',
testList: [
{
testTitle: '',
testType: 1,
content: [
[
{ title: '签署知情同意书', grade: 2, type: 4, code: 'ZQTH-SJ', value: this.codeValue.SSXG['ZQTH-SJ'] },
{ title: '手术开始时间', grade: 2, type: 4, code: 'ZYZL-KSSJ', value: this.codeValue.SSXG['ZYZL-KSSJ'] },
],
[
{
title: '麻醉方式',
grade: 2,
type: 2,
itemList: ['全麻', '局麻'],
code: 'ZYZL-MZFS',
value: this.codeValue.SSXG['ZYZL-MZFS'],
},
],
[
{
title: '手术方式',
grade: 2,
type: 3,
},
{
title: '',
type: 3,
itemList: ['开颅血肿清除术', '去骨瓣减压术', '脑室镜下血肿抽吸术', '钻孔血肿抽吸术', '复合手术', '其他'],
checkType: 2,
code: 'ZYZL-SSFZ',
value: this.codeValue.SSXG['ZYZL-SSFZ'],
showIpt: true,
showIptItem: '其他',
iptCode: 'ZYZL-SSFZ-OTHER',
iptValue: this.codeValue.SSXG['ZYZL-SSFZ-OTHER'],
},
],
[
{
title: '脑部并发症',
grade: 2,
type: 3,
},
{
title: '',
type: 3,
itemList: ['无', '手术部位再次脑出血', '手术远隔部位再出血', '脑梗死', '继发性癫痫口颅内感染', '其他'],
checkType: 2,
code: 'ZYZL-BFZ',
value: this.codeValue.SSXG['ZYZL-BFZ'],
showOther: '无',
showIpt: true,
showIptItem: '其他',
iptCode: 'ZYZL-BFZ-OTHER',
iptValue: this.codeValue.SSXG['ZYZL-BFZ-OTHER'],
},
],
[
{
title: '预后',
grade: 2,
type: 5,
itemList: ['治愈', '好转', '加重', '死亡'],
code: 'ZYZL-YUH',
value: this.codeValue.SSXG['ZYZL-YUH'],
},
],
],
},
],
},
{
name: 'CYJL',
testList: [
{
testTitle: '住院药物治疗',
testType: 2,
content: [
[
{ title: '降压', grade: 2, code: 'CYJL-JZ', type: 2, itemList: ['是', '否'], value: this.codeValue.CYJL['CYJL-JZ'] },
{
type: 3,
checkType: 3,
code: 'CYJL-JZ-ARR',
Fcode: 'CYJL-JZ',
isShow: '是',
itemList: ['ACEI', 'ARB', '利尿剂', 'β受体阻滞剂', '钙拮抗剂', '其他'],
value: this.codeValue.CYJL['CYJL-JZ-ARR'],
},
],
[
{ title: '调脂', grade: 2, code: 'CYJL-TZ', type: 2, itemList: ['是', '否'], value: this.codeValue.CYJL['CYJL-TZ'] },
{
type: 3,
checkType: 3,
code: 'CYJL-TZ-ARR',
Fcode: 'CYJL-TZ',
isShow: '是',
itemList: ['他汀类', '烟酸及其衍生物', '贝特类', '胆固醇吸收抑制剂', '其他'],
value: this.codeValue.CYJL['CYJL-TZ-ARR'],
},
],
[
{ title: '降糖', grade: 2, code: 'CYJL-JT', type: 2, itemList: ['是', '否'], value: this.codeValue.CYJL['CYJL-JT'] },
{
type: 3,
checkType: 3,
code: 'CYJL-JT-ARR',
Fcode: 'CYJL-JT',
isShow: '是',
itemList: ['胰岛素', '磺酰脲类', '双胍类', 'α糖苷酶抑制剂', '胰岛素增敏剂', '非磺酰脲类促胰岛素分泌剂', '其他'],
value: this.codeValue.CYJL['CYJL-JT-ARR'],
},
],
],
},
{
// testTitle: '康复治疗',
testTitle: '',
testType: 1,
content: [
[
{
title: '是否接受康复治疗',
grade: 2,
code: 'KFZL-SFJS',
type: 2,
itemList: ['是', '否'],
value: this.codeValue.CYJL['KFZL-SFJS'],
},
],
[
{ title: '康复治疗方式', grade: 2, Fcode: 'KFZL-SFJS', isShow: '是' },
{
type: 3,
checkType: 3,
code: 'KFZL-ZLFS',
Fcode: 'KFZL-SFJS',
isShow: '是',
itemList: [
'传统康复(针灸 、推拿)',
'运动疗法(PT)',
'作业疗法(OT)',
'言语训练(ST)',
'其他(认知训练、吞咽治疗、心理治疗、理疗)',
],
value: this.codeValue.CYJL['KFZL-ZLFS'],
},
],
[
{ title: '康复治疗场所', grade: 2, Fcode: 'KFZL-SFJS', isShow: '是' },
{
type: 3,
checkType: 3,
Fcode: 'KFZL-SFJS',
isShow: '是',
code: 'KFZL-ZLCS',
itemList: ['床旁', '康复科'],
value: this.codeValue.CYJL['KFZL-ZLCS'],
},
],
],
},
{
// testTitle: '健康教育',
testTitle: '',
testType: 1,
content: [
[
{
title: '健康宣教',
grade: 2,
code: 'JKJY-SFXJ',
type: 2,
itemList: ['是', '否'],
value: this.codeValue.CYJL['JKJY-SFXJ'],
},
],
[
{ title: '宣教方式', grade: 2 },
{
type: 3,
checkType: 3,
code: 'JKJY-XJFS',
itemList: ['集体病区教育', '一对一教育', '其他'],
value: this.codeValue.CYJL['JKJY-XJFS'],
},
],
],
},
{
// testTitle: '出院情况',
testTitle: '',
testType: 1,
content: [
[
{ title: '出院时间', grade: 2, code: 'CYQK-CYSJ', type: 4, value: this.codeValue.CYJL['CYQK-CYSJ'] },
{
title: '离院方式',
grade: 2,
code: 'CYQK-LYFS',
type: 5,
itemList: ['医嘱离院', '医嘱转院', '医嘱转社区卫生服务机构/乡镇卫生院', '非医嘱离院', '死亡', '其他'],
value: this.codeValue.CYJL['CYQK-LYFS'],
},
{ title: '死亡原因', Fcode: 'CYQK-LYFS', isShow: '死亡' },
{
type: 3,
checkType: 3,
code: 'CYQK-SWYY',
Fcode: 'CYQK-LYFS',
isShow: '死亡',
itemList: ['呼吸循环衰竭', '脑血管病', '肺部感染', '消化道出血', '急性肾功能衰竭', '损伤和中毒', '不详', '其他'],
value: this.codeValue.CYJL['CYQK-SWYY'],
showIpt: true,
showIptItem: '其他',
iptCode: 'CYQK-SWYY-OTHER',
iptValue: this.codeValue.CYJL['CYQK-SWYY-OTHER'],
},
{
title: '死亡时间',
code: 'CYQK-SWSJ',
Fcode: 'CYQK-LYFS',
isShow: '死亡',
type: 4,
value: this.codeValue.CYJL['CYQK-SWSJ'],
},
{ title: '出院评估', NFcode: 'CYQK-LYFS', noShow: '死亡', level: true, grade: 2 },
{
title: '出院时 mRS 评分',
NFcode: 'CYQK-LYFS',
noShow: '死亡',
level: true,
type: 71,
},
{
title: '',
type: 71,
NFcode: 'CYQK-LYFS',
noShow: '死亡',
level: true,
listItem: [
{ name: '已评', showIpt: true, code: 'CYPG-mRS-pf', value: this.codeValue.CYJL['CYPG-mRS-pf'] },
{ name: '未评', showIpt: false },
],
min: 0,
max: 5,
code: 'CYPG-mRS',
value: this.codeValue.CYJL['CYPG-mRS'],
},
{
title: '出院时 GCS 评分',
NFcode: 'CYQK-LYFS',
noShow: '死亡',
level: true,
type: 71,
},
{
title: '',
NFcode: 'CYQK-LYFS',
noShow: '死亡',
level: true,
type: 71,
listItem: [
{ name: '已评', showIpt: true, code: 'CYPG-GCS-pf', value: this.codeValue.CYJL['CYPG-GCS-pf'] },
{ name: '未评', showIpt: false },
],
min: 3,
max: 15,
code: 'CYPG-GCS',
value: this.codeValue.CYJL['CYPG-GCS'],
},
{ title: '出院带药', NFcode: 'CYQK-LYFS', noShow: '死亡', level: true, grade: 2 },
{
title: '',
NFcode: 'CYQK-LYFS',
noShow: '死亡',
level: true,
type: 3,
checkType: 3,
code: 'CYQK-CYDY',
itemList: ['降压药', '降糖药', '调脂药', '抗凝药', '抗血小板药', '中药治疗', '其他', '无'],
value: this.codeValue.CYJL['CYQK-CYDY'],
},
],
],
},
],
},
{
name: 'TSCX',
testList: [
{
testTitle: '烟雾病诊疗登记表',
testType: 2,
Fcode: 'BYPD-BYPD',
isShow: '烟雾病',
content: [
[
{
title: '临床表现类型',
code: 'TSCX-LCBX',
grade: 2,
},
{
title: '',
type: 3,
grade: 2,
checkType: 3,
code: 'TSCX-LCBX',
itemList: ['TIA', '脑梗塞', '脑室出血', '蛛网膜下'],
value: this.codeValue.TSCX['TSCX-LCBX'],
},
{
title: '脑出血',
code: 'TSCX-NCX',
grade: 2,
},
{
title: '',
type: 3,
checkType: 3,
code: 'TSCX-NCX',
itemList: ['头痛', '癫痫发作', '其他'],
value: this.codeValue.TSCX['TSCX-NCX'],
},
{
title: '既往是否有类似病史',
type: 2,
grade: 2,
code: 'TSCX-LSBS',
itemList: ['无', '有'],
value: this.codeValue.TSCX['TSCX-LSBS'],
},
{
title: '上次发病时间',
type: 4,
code: 'TSCX-FBSJ',
Fcode: 'TSCX-LSBS',
isShow: '有',
value: this.codeValue.TSCX['TSCX-FBSJ'],
},
{
title: '既往手术病史',
type: 2,
code: 'TSCX-SSBS',
Fcode: 'TSCX-LSBS',
isShow: '有',
itemList: ['无', '有'],
value: this.codeValue.TSCX['TSCX-SSBS'],
},
],
[
{
title: '烟雾状血管位置',
grade: 2,
type: 2,
code: 'TSCX-XGWZ',
itemList: ['单侧', '双侧'],
value: this.codeValue.TSCX['TSCX-XGWZ'],
},
{
title: '',
grade: 2,
type: 31,
checkList: [
{
title: '左侧',
code: 'XGWZ-ZUO',
itemList: ['-1 大脑前动脉 ACA', '-2 大脑中动脉 MCA', '-3 大脑后动脉 PCA', '其他'],
value: this.codeValue.TSCX['XGWZ-ZUO'],
iptValue: this.codeValue.TSCX['XGWZ-ZUO-OTHER'],
iptCode: 'XGWZ-ZUO-OTHER',
showIpt: true,
showValue: '其他',
},
{
title: '右侧',
code: 'XGWZ-YOU',
itemList: ['-1 大脑前动脉 ACA', '-2 大脑中动脉 MCA', '-3 大脑后动脉 PCA', '其他'],
value: this.codeValue.TSCX['XGWZ-YOU'],
iptValue: this.codeValue.TSCX['XGWZ-YOU-OTHER'],
iptCode: 'XGWZ-YOU-OTHER',
showIpt: true,
showValue: '其他',
},
],
},
],
[
{
title: '颅内外是否有代偿',
grade: 2,
type: 2,
code: 'TSCX-LNDC',
itemList: ['有', '无'],
value: this.codeValue.TSCX['TSCX-LNDC'],
},
{
title: '烟雾病本次发病是否手术治疗',
grade: 2,
type: 2,
code: 'TSCX-SSZL',
itemList: ['是', '否'],
value: this.codeValue.TSCX['TSCX-SSZL'],
},
{
title: '手术开始时间',
type: 4,
code: 'TSCX-SSSJ',
Fcode: 'TSCX-SSZL',
isShow: '是',
value: this.codeValue.TSCX['TSCX-SSSJ'],
},
{ title: '治疗方式', Fcode: 'TSCX-SSZL', isShow: '是' },
{
title: '',
type: 31,
Fcode: 'TSCX-SSZL',
isShow: '是',
checkList: [
{
title: '左侧',
code: 'TSCX-ZLFS-ZUO',
itemList: ['STA/MCA 搭桥', 'STA 贴敷', '颞肌贴敷', '硬脑膜贴敷', '其他'],
value: this.codeValue.TSCX['TSCX-ZLFS-ZUO'],
iptValue: this.codeValue.TSCX['TSCX-ZLFS-ZUO-OTHER'],
iptCode: 'TSCX-ZLFS-ZUO-OTHER',
showIpt: true,
showValue: '其他',
},
{
title: '右侧',
code: 'TSCX-ZLFS-YOU',
itemList: ['STA/MCA 搭桥', 'STA 贴敷', '颞肌贴敷', '硬脑膜贴敷', '其他'],
value: this.codeValue.TSCX['TSCX-ZLFS-YOU'],
iptValue: this.codeValue.TSCX['TSCX-ZLFS-YOU-OTHER'],
iptCode: 'TSCX-ZLFS-YOU-OTHER',
showIpt: true,
showValue: '其他',
},
],
},
{
title: '手术治疗并发症',
Fcode: 'TSCX-SSZL',
isShow: '是',
grade: 2,
},
{
title: '',
type: 3,
grade: 2,
checkType: 3,
code: 'TSCX-BFZ',
Fcode: 'TSCX-SSZL',
isShow: '是',
itemList: ['无', '出血', '栓塞', '继发性癫痫', '感染', '其他'],
value: this.codeValue.TSCX['TSCX-BFZ'],
},
],
],
},
{
testTitle: '动静脉畸形 AVM 诊疗登记表',
testType: 2,
Fcode: 'BYPD-BYPD',
isShow: '动静脉畸形 AVM',
content: [
[
{
title: 'AVM 类型',
code: 'TSCX-AVM-TYPE',
grade: 2,
type: 2,
itemList: ['脑实质 AVM', '脑膜脑 AVM'],
value: this.codeValue.TSCX['TSCX-AVM-TYPE'],
},
{
title: 'AVM 大小',
grade: 2,
},
{
title: '',
code: 'TSCX-AVM-SIZE',
grade: 2,
type: 21,
itemList: ['<3cm(1 分)', '3-6cm(2 分)', '>6cm(3 分)'],
value: this.codeValue.TSCX['TSCX-AVM-SIZE'],
},
{
title: 'AVM 部位特征',
grade: 2,
},
{
title: '',
code: 'TSCX-AVM-features',
grade: 2,
type: 21,
itemList: ['大脑非功能区(0 分)', '大脑功能区(1 分)'],
value: this.codeValue.TSCX['TSCX-AVM-features'],
},
{
title: '静脉引流位置',
grade: 2,
},
{
title: '',
code: 'TSCX-AVM-SEAT',
grade: 2,
type: 21,
itemList: ['浅表部(0 分)', '深部(1 分)'],
value: this.codeValue.TSCX['TSCX-AVM-SEAT'],
},
{
title: 'Spetzler–Martin 评分',
code: 'TSCX-Martin',
grade: 2,
type: 0,
},
{
title: '有无静脉血栓',
code: 'TSCX-SFJMRS',
grade: 2,
type: 2,
itemList: ['有', '无'],
value: this.codeValue.TSCX['TSCX-SFJMRS'],
},
{
title: '是否手术治疗',
code: 'TSCX-SFSSZL',
grade: 2,
type: 2,
itemList: ['是', '否'],
value: this.codeValue.TSCX['TSCX-SFSSZL'],
},
{
title: 'AVM 治疗时间',
code: 'TSCX-AVM-ZLSJ',
Fcode: 'TSCX-SFSSZL',
isShow: '是',
type: 4,
value: this.codeValue.TSCX['TSCX-AVM-ZLSJ'],
},
{
title: 'AVM 治疗策略',
type: 3,
Fcode: 'TSCX-SFSSZL',
isShow: '是',
},
{
title: '',
code: 'TSCX-AVM-ZLCL',
Fcode: 'TSCX-SFSSZL',
isShow: '是',
type: 3,
itemList: ['栓塞术', '血肿清除术', 'AVM 切除术', '放射外科手术', '复合手术'],
value: this.codeValue.TSCX['TSCX-AVM-ZLCL'],
},
{
title: '治疗并发症',
type: 3,
Fcode: 'TSCX-SFSSZL',
isShow: '是',
},
{
title: '',
code: 'TSCX-SFSSZL-BFZ',
Fcode: 'TSCX-SFSSZL',
isShow: '是',
type: 3,
itemList: ['无', '颅内出血', '脑梗死', '其他'],
showOther: '无',
value: this.codeValue.TSCX['TSCX-SFSSZL-BFZ'],
showIpt: true,
showIptItem: '其他',
iptCode: 'TSCX-SFSSZL-BFZ-OTHER',
iptValue: this.codeValue.TSCX['TSCX-SFSSZL-BFZ-OTHER'],
},
],
[
{
title: 'AVM 责任病灶位置',
grade: 2,
},
{
title: '',
grade: 2,
type: 31,
checkList: [
{
title: '左侧',
code: 'TSCX-AVM-ZUO',
itemList: ['额叶', '顶叶', '颞叶', '枕叶', '小脑', '深部'],
value: this.codeValue.TSCX['TSCX-AVM-ZUO'],
},
{
title: '右侧',
code: 'TSCX-AVM-YOU',
itemList: ['额叶', '顶叶', '颞叶', '枕叶', '小脑', '深部'],
value: this.codeValue.TSCX['TSCX-AVM-YOU'],
},
{
title: '中线部位',
code: 'TSCX-AVM-ZHONG',
itemList: ['脑干', '胼胝体', '其他'],
iptValue: this.codeValue.TSCX['TSCX-AVM-ZHONG-OTHER'],
iptCode: 'TSCX-AVM-ZHONG-OTHER',
showIpt: true,
showValue: '其他',
value: this.codeValue.TSCX['TSCX-AVM-ZHONG'],
},
],
},
],
],
},
],
},
];
},
},
};
export default mixin;

355
src/pages/outside/outside.vue

@ -0,0 +1,355 @@
<template>
<div class="w-full flex flex-column flex-wrap" style="padding-bottom: 20px">
<!-- :style="{ paddingTop: detailsData.valueType ? '28px' : '28px' }" -->
<div class="w-full" v-for="(item, index) in testList" :key="index">
<template v-if="item.testType === 1">
<Test :answer-list="answerList" v-if="type" class="w-full" :list="item.content" />
</template>
<u-collapse
:head-style="headerStyle"
:item-style="itemStyle"
class="mb-2 w-full"
v-if="item.testType === 2"
:bordered="false"
expand-icon-position="right"
:ref="'collapseView' + index"
>
<u-collapse-item :open="true" class="w-full" :title="item.testTitle" :style="customStyle">
<Test
:testIndex="index"
@getCollaoseHeight="getCollaoseHeight"
:answer-list="answerList"
v-if="type"
class="w-full"
:list="item.content"
/>
</u-collapse-item>
</u-collapse>
</div>
<div class="explain-box" v-if="type === 'ZYJC'">
<div class="mb-2">说明</div>
<div class="mb-2">病因诊断为动静脉畸形AVM可选择填写动静脉畸形AVM登记表</div>
<div>病因诊断为烟雾病可选择填写烟雾病登记表</div>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex';
import Mixin from './mixin';
export default {
name: 'outside',
mixins: [Mixin],
data() {
return {
type: 'RYPG', // RYPG(),ZYJC(),SSXG(),CYJL(),TSCX()
testList: [],
customStyle: 'background: #fff;border-radius: 4px;border: 0;overflow: hidden',
visible: false,
afterStr: '主要检查',
beforeStr: '基本信息',
answerList: {}, //
headerStyle: {
height: '54px',
lineHeight: '30px',
fontSize: '18px',
padding: '0 16px',
/* color: #1890ff; */
color: 'rgba(0, 0, 0, 0.65)',
fontWeight: 'bold',
backgroundColor: '#fff',
},
itemStyle: { marginBottom: '8px' },
};
},
computed: { ...mapState('home', ['InputCode', 'firstAidId']) },
methods: {
// ,
showCol(code, isShow) {
console.log('code, isShow: ', code, isShow);
if (code && isShow) {
if (this.answerList[code]) {
if (Array.isArray(this.answerList[code])) {
for (var i = 0; i < this.answerList[code].length; i++) {
if (this.answerList[code][i] === isShow) {
return true;
} else if (i === this.answerList[code].length - 1) {
return false;
}
}
} else {
return this.answerList[code] === isShow;
}
} else {
return false;
}
} else {
return true;
}
},
//
back() {
if (this.type === 'RYPG') {
this.$router.push('/info');
} else if (this.type === 'CYJL') {
this.type = 'SSXG';
document.title = '手术相关';
this.afterStr = '出院记录';
this.beforeStr = '主要检查';
} else if (this.type === 'SSXG') {
this.type = 'ZYJC';
document.title = '主要检查';
this.afterStr = '手术相关';
this.beforeStr = '入院评估';
} else if (this.type === 'ZYJC') {
this.type = 'RYPG';
document.title = '入院评估';
this.afterStr = '主要检查';
this.beforeStr = '基本信息';
} else if (this.type === 'TSCX') {
this.type = 'CYJL';
document.title = '出院记录';
this.afterStr = '特殊登记';
this.beforeStr = '手术相关';
}
setTimeout(() => {
this.getAnswer();
}, 50);
this.visible = false;
},
//
go() {
// RYPG(),ZYJC(),SSXG(),CYJL(),TSCX()
if (this.type !== 'TSCX') {
if (this.type === 'RYPG') {
this.type = 'ZYJC';
document.title = '主要检查';
this.afterStr = '手术相关';
this.beforeStr = '入院评估';
} else if (this.type === 'ZYJC') {
this.type = 'SSXG';
document.title = '手术相关';
this.afterStr = '出院记录';
this.beforeStr = '主要检查';
} else if (this.type === 'SSXG') {
this.type = 'CYJL';
document.title = '出院记录';
this.afterStr = '特殊登记';
this.beforeStr = '手术相关';
} else if (this.type === 'CYJL') {
this.type = 'TSCX';
document.title = '特殊登记';
this.afterStr = '无数据';
this.beforeStr = '出院记录';
}
setTimeout(() => {
this.getAnswer();
}, 50);
this.visible = false;
}
},
getHistory() {
// for (var i = 0; i <= window.history.length - (this.historyNum + this.backPageNum); i++) {
// window.history.back(-1);
// }
this.$router.push('/patient-line');
},
//
// codeListcode value
// codeList,mountedgetTest
getTest() {
for (let i = 0; i < this.list.length; i++) {
if (this.list[i].name === this.type) {
this.testList = this.list[i].testList;
break;
}
}
},
// code,
async getAnswer() {
const codeList = [];
for (let key in this.codeValue) {
if (key === this.type) {
for (let value in this.codeValue[key]) {
codeList.push(value);
}
}
}
const param = {
codeList,
firstAidId: this.firstAidId,
};
const answer = await this.$u.api.getRecord(param);
this.answerList = answer.record;
this.reassign(answer.record);
},
// ()
reassign(recordList) {
console.log('recordList: ', recordList);
for (let key in this.codeValue[this.type]) {
for (let value in recordList) {
if (key === value) {
if (Array.isArray(this.codeValue[this.type][key])) {
this.codeValue[this.type][key] = recordList[value];
break;
} else {
this.codeValue[this.type][key] = recordList[value][0];
break;
}
}
}
}
// list
this.reassignList();
// type
this.getTest();
},
handleOk(num) {
// RYPG(),ZYJC(Toast /),SSXG(/),CYJL()
if (num === 0) {
this.type = 'RYPG';
document.title = '入院评估';
this.afterStr = '主要检查';
this.beforeStr = '基本信息';
} else if (num === 1) {
this.type = 'ZYJC';
document.title = '主要检查';
this.afterStr = '手术相关';
this.beforeStr = '入院评估';
} else if (num === 2) {
this.type = 'SSXG';
document.title = '手术相关';
this.afterStr = '出院记录';
this.beforeStr = '主要检查';
} else if (num === 3) {
this.type = 'CYJL';
document.title = '出院记录';
this.afterStr = '无数据';
this.beforeStr = '手术相关';
}
setTimeout(() => {
this.getAnswer();
}, 50);
this.visible = false;
},
//
getCollaoseHeight(index) {
const that = this;
// console.log('this.$refs', that.$refs[`collapseView${index}`]);
//
this.$nextTick(() => {
that.$refs[`collapseView${index}`][0].init();
});
},
},
// --
onLoad() {
this.type = this.InputCode;
if (this.type === 'RYPG') {
this.afterStr = '主要治疗';
this.beforeStr = '基本信息';
} else if (this.type === 'SSXG') {
this.afterStr = '出院记录';
this.beforeStr = '入院评估';
} else if (this.type === 'CYJL') {
this.afterStr = '无数据';
this.beforeStr = '主要治疗';
}
// this.tips = '...';
this.getAnswer();
},
};
</script>
<style scoped>
.page-box {
height: 40px;
margin: 12px 0 0 0;
padding: 0 16px;
color: #1890ff;
font-size: 16px;
}
.page-img {
height: 20px;
}
.back-btn {
height: 44px;
margin: 24px 16px;
}
.active-color {
color: #5892ff;
}
.footer-btn {
font-size: 16px;
border-top: 1px solid #ccc;
}
.footer-box {
position: absolute;
bottom: 0;
left: 0;
height: 60px;
width: 100%;
}
/deep/.ant-collapse-icon-position-right > .ant-collapse-item > .ant-collapse-header {
height: 54px;
line-height: 30px;
font-size: 16px;
/* color: #1890ff; */
color: rgba(0, 0, 0, 0.65);
font-weight: bold;
}
/deep/.ant-collapse-content > .ant-collapse-content-box {
background: #ededed;
padding: 0;
}
/deep/.ant-collapse-borderless > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box {
padding-top: 0;
}
/deep/.ant-spin-nested-loading > div > .ant-spin {
position: fixed;
top: 50%;
margin-top: -50%;
}
.explain-box {
height: 118px;
background-color: #fff;
padding: 16px;
font-size: 12px;
color: #666;
}
.switch-box {
height: 120px;
width: 120px;
position: fixed;
right: 0;
bottom: 40px;
/* border: 2px solid red; */
transition: all 0.5s;
}
.switch-box-btn-box {
position: absolute;
overflow: hidden;
transition: all 0.5s;
line-height: 34px;
text-align: center;
font-size: 12px;
color: #fff;
background-color: #1890ff;
border-radius: 50%;
box-shadow: 0 0 5px #1890ff;
}
.change-box {
right: 2px;
bottom: 2px;
position: absolute;
height: 60px;
width: 60px;
background-color: #1890ff;
box-shadow: 0 0 10px #1890ff;
border-radius: 50%;
text-align: center;
line-height: 60px;
color: #fff;
}
</style>

401
src/pages/patient/patient.vue

@ -0,0 +1,401 @@
<template>
<div class="establish bg-gray-100">
<div bordered class="list-box bg-white" v-for="(item, index) in list" :key="index">
<div
class="list-item"
:style="{ 'border-bottom': listIndex === item.length - 1 ? '' : '1px solid #ccc;' }"
v-for="(listItem, listIndex) in item"
:key="listIndex"
>
<div class="w-full flex flex-nowrap justify-between items-center">
<div class="flex items-center" v-if="listItem.title">
{{ listItem.title }}
<span v-if="listItem.isTrue" style="color: red; font-size: 20px">*</span>
</div>
<div>
<!-- <u-switch v-if="listItem.type === 1" v-model="codeValue['CJBL-YLMS']" /> -->
<u-upload
v-if="listItem.type === 2"
name="part"
accept="image/*"
:action="action"
:show-upload-list="false"
:custom-btn="true"
@on-success="successUpload"
>
<img slot="addBtn" src="@/common/icon/idcard.png" class="img-icon" />
</u-upload>
<div v-else-if="listItem.type === 3" style="width: 174px">
<u-input
input-align="right"
:value="codeValue[listItem.code]"
placeholder="请输入"
@blur="chanegIpt($event, listItem.code)"
style="text-align: right"
/>
<div class="text-red-400 font-12" style="text-align: right" v-if="!isFit && listItem.code === 'CJBL-idCard'">
身份证号输入有误!
</div>
</div>
<u-radio-group :value="codeValue[listItem.code]" v-else-if="listItem.type === 4" name="radioGroup">
<div @click="clickRadio(listItem.code, radioItem.name)" v-for="radioItem in listItem.listItem" :key="radioItem.id">
<u-radio
@change="changeRadio($event, listItem.code)"
:disabled="isDisabled(listItem.code, radioItem.name)"
:key="radioItem.id"
:name="radioItem.id"
>
{{ radioItem.name }}
</u-radio>
</div>
</u-radio-group>
<u-radio-group
:disabled="sexIsDisabled('CJBL-idCard')"
:value="codeValue[listItem.code]"
v-else-if="listItem.type === 41"
name="radioGroup"
>
<u-radio
@change="changeRadio($event, listItem.code)"
v-for="radioItem in listItem.listItem"
:key="radioItem.id"
:name="radioItem.id"
>
{{ radioItem.name }}
</u-radio>
</u-radio-group>
</div>
</div>
</div>
</div>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapState, mapGetters, mapMutations } from 'vuex';
export default {
components: {},
data: () => ({
action: '',
codeValue: {
'CJBL-YLMS': false,
'CJBL-NAME': null,
'CJBL-SEX': null,
'CJBL-nation': null,
'CJBL-idCard': null,
'CJBL-YSBL': 'AS急性脑卒中',
},
list: [
// [{ title: '', type: 1, isTrue: false }],
[{ title: '扫描身份证', type: 2, isTrue: false }],
[
{ title: '姓名', type: 3, code: 'CJBL-NAME', isTrue: true },
{
title: '性别',
type: 41,
code: 'CJBL-SEX',
isTrue: true,
listItem: [
{ name: '女', id: 0 },
{ name: '男', id: 1 },
],
},
{ title: '民族', type: 3, code: 'CJBL-nation', isTrue: false },
{ title: '身份证号', type: 3, code: 'CJBL-idCard', isTrue: false },
{
title: '疑似诊断',
code: 'CJBL-YSBL',
type: 4,
isTrue: false,
},
{
title: '',
code: 'CJBL-YSBL',
type: 4,
isTrue: false,
listItem: [
{ name: 'AS急性脑卒中', id: 'AS急性脑卒中' },
{ name: 'AMI急性心肌梗死', id: 'AMI急性心肌梗死' },
{ name: 'ATI急性创伤', id: 'ATI急性创伤' },
{ name: 'AGB急性消化道出血', id: 'AGB急性消化道出血' },
],
},
],
],
dropList: [],
bodyStyle: { textAlign: 'center', height: '240px', padding: '24px 24px 0 24px', position: 'relative', overFlow: 'hidden' },
visible: false,
isActive: true,
active: 0,
role: '',
isFit: true, //
}),
computed: {
...mapGetters('project', ['projectId']),
...mapState('carbasics', ['globalData', 'firstAidId']),
},
onLoad(options) {
this.role = options.role;
this.action = uni.$u.api.identifyWords;
this.getData();
},
methods: {
...mapMutations('carbasics', ['setRefreshList']),
//
async getData() {
try {
const param = { firstAidId: this.firstAidId };
const data = await this.$u.api.getPatient(param);
console.log('data: ', data);
if (data && data.firstAidId) {
this.codeValue = {
'CJBL-NAME': data.name,
'CJBL-SEX': data.gender,
'CJBL-nation': data.nation,
'CJBL-idCard': data.idcard,
'CJBL-YSBL': data.suspected || 'AS急性脑卒中',
};
}
} catch (error) {
console.log('error: ', error);
}
},
//
successUpload(res) {
const { code, data } = res;
let obj = { ...this.codeValue };
if (code === 200) {
obj['CJBL-NAME'] = data.name;
obj['CJBL-SEX'] = data.sex;
obj['CJBL-idCard'] = data.idCardNo;
obj['CJBL-nation'] = data.nation;
this.codeValue = { ...obj };
const param = {
firstAidId: this.firstAidId,
gender: data.sex,
idcard: data.idCardNo,
name: data.name,
nation: data.nation,
};
this.updateData(param);
}
},
//
isDisabled(code, name) {
if (code === 'CJBL-YSBL' && name !== 'AS急性脑卒中') {
return true;
} else {
return false;
}
},
sexIsDisabled(code) {
if (this.codeValue[code] && this.codeValue[code].length > 0) {
return true;
}
},
//
clickRadio(code, name) {
if (code === 'CJBL-YSBL' && name !== 'AS急性脑卒中') {
// this.$message.warning('');
this.$refs.uToast.show({
title: '请联系系统代理商开通该功能',
type: 'warning',
});
}
},
//
changeRadio(e, questionCode) {
this.codeValue[questionCode] = e;
let param = { firstAidId: this.firstAidId };
if (questionCode === 'CJBL-SEX') {
param.gender = e;
} else if (questionCode === 'CJBL-YSBL') {
param.suspected = e;
}
this.updateData(param);
},
//
iptBlur(e, code) {
if (code === 'CJBL-idCard') {
if (this.codeValue['CJBL-idCard']) {
this.isFit = this.isIdentityId(this.codeValue['CJBL-idCard']);
const idcard = this.codeValue['CJBL-idCard'];
if (this.codeValue['CJBL-idCard'].length === 15) {
this.codeValue['CJBL-SEX'] = (idcard[idcard.length - 1] - 0) % 2;
} else if (this.codeValue['CJBL-idCard'].length === 18) {
this.codeValue['CJBL-SEX'] = (idcard[idcard.length - 2] - 0) % 2;
}
} else {
this.isFit = true;
}
}
this.chanegIpt(e, code);
},
//
chanegIpt(e, questionCode) {
this.codeValue[questionCode] = e;
const param = { firstAidId: this.firstAidId };
if (questionCode === 'CJBL-NAME') {
param.name = e;
} else if (questionCode === 'CJBL-nation') {
param.nation = e;
} else if (questionCode === 'CJBL-idCard') {
param.idcard = e;
}
if (questionCode !== 'CJBL-idCard' || (questionCode === 'CJBL-idCard' && e.length === 18)) {
this.updateData(param);
}
},
//
isIdentityId(identityId) {
var patrn = /(^\d{15}$)|(^\d{17}(\d|X|x)$)/; //
//
var aCity = {
11: '北京',
12: '天津',
13: '河北',
14: '山西',
15: '内蒙古',
21: '辽宁',
22: '吉林',
23: '黑龙江',
31: '上海',
32: '江苏',
33: '浙江',
34: '安徽',
35: '福建',
36: '江西',
37: '山东',
41: '河南',
42: '湖北',
43: '湖南',
44: '广东',
45: '广西',
46: '海南',
50: '重庆',
51: '四川',
52: '贵州',
53: '云南',
54: '西藏',
61: '陕西',
62: '甘肃',
63: '青海',
64: '宁夏',
65: '新疆',
71: '台湾',
81: '香港',
82: '澳门',
91: '国外',
};
//
var sBirthday = (identityId.substr(6, 4) + '-' + Number(identityId.substr(10, 2)) + '-' + Number(identityId.substr(12, 2))).replace(
/-/g,
'/',
),
d = new Date(sBirthday);
// 4 /X
var sum = 0,
weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2],
codes = '10X98765432',
codes1 = '10x98765432';
for (var i = 0; i < identityId.length - 1; i++) {
sum += identityId[i] * weights[i];
}
var last = codes[sum % 11]; //
var last1 = codes1[sum % 11]; //
var errorMsg = true;
if (identityId === '') {
errorMsg = false;
} else if (!patrn.exec(identityId)) {
errorMsg = false;
} else if (!aCity[parseInt(identityId.substr(0, 2))]) {
errorMsg = false;
} else if (sBirthday != d.getFullYear() + '/' + (d.getMonth() + 1) + '/' + d.getDate()) {
errorMsg = false;
} else if (identityId[identityId.length - 1] != last && identityId[identityId.length - 1] != last1) {
errorMsg = false;
}
return errorMsg;
},
//
async updateData(param) {
try {
await this.$u.api.updatePatient(param);
this.$refs.uToast.show({
title: '修改成功',
type: 'ssuccess',
});
} catch (error) {
this.$refs.uToast.show({
title: '修改失败',
type: 'warning',
});
}
},
},
watch: {
codeValue: {
handler(val) {
console.log('val: ', val);
this.iptBlur(val['CJBL-idCard'], 'CJBL-idCard');
},
deep: true,
},
},
// --
onReady() {},
// --(not-nvue)
onShow() {},
// --
onHide() {},
// --
onUnload() {},
// --
onPullDownRefresh() {
uni.stopPullDownRefresh();
},
// --
onReachBottom() {},
// --(not-nvue)
/* onPageScroll(event) {}, */
// --
/* onShareAppMessage(options) {}, */
};
</script>
<style>
.img-icon {
height: 24px;
width: 24px;
color: #717171;
}
.btn-box {
padding: 16px;
}
.list-box {
border-radius: 4px;
overflow: hidden;
box-sizing: border-box;
margin: 0 0 0.75rem 0;
padding: 0;
color: rgba(0, 0, 0, 0.65);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5;
list-style: none;
font-feature-settings: 'tnum';
position: relative;
}
.list-item {
min-height: 54px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
}
</style>

18
src/pages/patientLine/patientLine.vue

@ -35,13 +35,13 @@ export default {
name: '患者信息',
time: '11月24日 16:56',
code: '',
path: '/pages/inner/inner',
path: '/pages/patient/patient',
},
{
name: '基本信息',
time: '11月24日 16:56',
code: '',
path: '/pages/inner/inner',
path: '/pages/info/info',
},
{
name: '入院评估',
@ -68,37 +68,37 @@ export default {
name: '患者信息',
time: '11月24日 16:56',
code: '',
path: '/pages/inner/inner',
path: '/pages/patient/patient',
},
{
name: '基本信息',
time: '11月24日 16:56',
code: '',
path: '/pages/inner/inner',
path: '/pages/info/info',
},
{
name: '入院评估',
time: '11月24日 16:56',
code: 'RYPG',
path: '/pages/inner/inner',
path: '/pages/outside/outside',
},
{
name: '主要检查',
time: '11月24日 16:56',
code: 'ZYJC',
path: '/pages/inner/inner',
path: '/pages/outside/outside',
},
{
name: '手术相关操作',
time: '11月24日 16:56',
code: 'SSXG',
path: '/pages/inner/inner',
path: '/pages/outside/outside',
},
{
name: '出院记录',
time: '11月24日 16:56',
code: 'CYJL',
path: '/pages/inner/inner',
path: '/pages/outside/outside',
},
],
time: 0,
@ -110,14 +110,12 @@ export default {
},
},
onLoad(options) {
console.log('options: ', options);
this.caseType = options.caseType - 0;
this.showLine = true;
},
methods: {
...mapMutations('carbasics', ['setInputCode']),
jump(code, path) {
// console.log('code, path: ', code, path);
this.setInputCode(code ? code : 'RYPG');
uni.navigateTo({ url: path });
},

7
src/store/carbasics/mutations.js

@ -30,6 +30,13 @@ const mutations = {
setInputCode(state, data) {
state.InputCode = data;
},
/**
* 增加isRefresh值,当试题录入界面监听到变化时,刷新当前界面
* @param { object } state
*/
setIsRefresh(state) {
state.isRefresh += 1;
},
};
export default mutations;

3
src/store/carbasics/state.js

@ -6,7 +6,8 @@ const state = {
firstAidId: '', // 当前正在进行数据录入的患者的急救id
globalData: null, // 插件的跳转路径及参数
refreshList: 0, // 依据此值去重新请求病例列表(当从创建病例界面 创建了病例之后,修改此值,并且返回病例列表界面,病例列表重新查询数据)
InputCode: 'RYPG',
InputCode: 'RYPG', // 当前试题录入的类型
isRefresh: 0, // 是否刷新当前试题界面 监听数值,每次改变一次刷新一次
};
export default state;

Loading…
Cancel
Save