+
@@ -10,23 +10,23 @@
class="bg-white list-item"
:key="listIndex"
v-if="
- itemIsShow(listItem.Fcode, listItem.isShow, listItem.level) && itemNoShow(listItem.NFcode, listItem.noShow, listItem.level)
+ itemIsShow(listItem.relevanceQuestionCode, listItem.relevanceShowValue)
"
>
-
+
- {{ listItem.title }}
+ {{ listItem.content }}
*
- {{ listItem.title }}
+ {{ listItem.content }}
-
+
{{ listItem.code === 'JBXX-BMI' ? getBMI : getCount }}
@@ -39,19 +39,19 @@
style="width: 200rpx"
placeholder="请输入"
input-align="right"
- :value="listItem.value"
- @bulr="changeIpt($event, listItem.code, index, listIndex)"
+ :value="listItem.answer[0]"
+ @blur="changeIpt($event, listItem.code, listIndex)"
/>
-
+
- {{ radioValue }}
+ {{ radioValue.optionContent }}
@@ -306,14 +306,25 @@
- {{ $moment(+listItem.value).format('YYYY-MM-DD HH:mm') }}
+ {{ $moment(+listItem.answer[0]).format('YYYY-MM-DD HH:mm') }}
+
+ 请选择时间
+
+
+
+
+
+ {{ $moment(+listItem.answer[0]).format('YYYY-MM-DD') }}
请选择时间
-
@@ -321,9 +332,9 @@
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)"
+ @click="openDropDown(listItem.content, listItem.optionList, listItem.code, listIndex, listItem.answer[0])"
>
- {{ listItem.value }}
+ {{ listItem.answer[0] }}
请选择
@@ -385,9 +396,10 @@
-
+
+
@@ -433,6 +445,7 @@ export default {
timeItemIndex: 0, // 当前时间选择器对应试题的 index 位置
timeCode: '', // 当前时间选择器对应试题的 code
show: false, // 是否显示时间选择器组件
+ dateShow: false, // 是否显示日期选择器组件
ZQTHSJ: null, // 知情谈话时间
timeSelectparams: {
// 时间选择器可以选择那个时间
@@ -443,6 +456,15 @@ export default {
minute: true,
second: false,
},
+ timeSelectparams1: {
+ // 日期选择器可以选择那个时间
+ year: true,
+ month: true,
+ day: true,
+ hour: false,
+ minute: false,
+ second: false,
+ },
dropTitle: '',
dropList: [],
dropCode: '',
@@ -518,63 +540,20 @@ export default {
* 如果 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) {
+ itemIsShow(code, isShow) {
+ if (code && isShow) {
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;
- }
+ // if (item) {
+ // for (let j = 0; j < item.length; j++) {
+ // const jtem = item[j];
+ if (item.code === code && item.answer[0] === isShow) {
+ return true;
+ } else if (i === this.test.length - 1) {
+ return false;
}
+ // }
+ // }.
}
} else {
return true;
@@ -600,19 +579,17 @@ export default {
* 先获取到 this.test 数组(props接收的值不能在当前界面修改,所以用将list的值赋值给了 test ,渲染界面也是用的 test)
* 通过 index 修改掉 test 数组后,存储答案给服务端
*/
- changeIpt(e, code, index, itemIndex) {
- this.Rerender(e, index, itemIndex);
+ changeIpt(e, code, index) {
+ console.log('e, code, index: ', e, code, index);
+ // this.Rerender(e, index, itemIndex);
this.setAnswer(code, e);
},
/**
* 修改单选框内容
* 和输入框操作一样
*/
- changeRadio(e, code, index, itemIndex) {
- this.Rerender(e, index, itemIndex);
- // if (this.canChange) {
- // this.$emit('getCollaoseHeight', this.testIndex);
- // }
+ changeRadio(e, code, index) {
+ this.Rerender([e], index);
this.setAnswer(code, e);
},
// 修改是否是烟雾病的题时,
@@ -623,10 +600,9 @@ export default {
this.setAnswer(code, e);
},
// 修改试题时,重新赋值test,达到重新渲染界面的目的
- Rerender(value, index, itemIndex) {
+ Rerender(value, index) {
let Arr = [...this.test];
- Arr[index][itemIndex].value = value;
- console.log('Arr[index][itemIndex].value: ', Arr[index][itemIndex].value);
+ Arr[index].answer = [...value];
this.test = [...Arr];
},
// 修改带评分输入框的单选题内的输入框
@@ -739,10 +715,9 @@ export default {
this.setAnswer(code, e);
},
// 打开时间选择器组件
- async openTimeSelect(title, code, index, listIndex, time) {
+ async openTimeSelect(title, code, listIndex, time) {
this.timeValue = time ? time : 0;
this.title = title;
- this.timeIndex = index;
this.timeItemIndex = listIndex;
this.timeCode = code;
this.show = true;
@@ -756,34 +731,43 @@ export default {
this.ZQTHSJ = data.record['ZQTH-SJ'] && data.record['ZQTH-SJ'].length ? data.record['ZQTH-SJ'][0] : null;
}
},
+ // 打开日期选择器组件
+ async openTimeSelect1(title, code, listIndex, time) {
+ this.timeValue = time ? time : 0;
+ this.title = title;
+ this.timeItemIndex = listIndex;
+ this.timeCode = code;
+ this.dateShow = true;
+ },
// 时间选择器组件选择了时间
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;
+ console.log('time: ', 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) {
+ openDropDown(title, list, code, itemIndex, value) {
+ console.log('title, list, code, itemIndex, value: ', title, list, code, itemIndex, value);
this.dropTitle = title;
- this.dropList = list;
+ this.dropList = list.map(item=> {return item.optionContent});
this.dropCode = code;
- this.dropIndex = index;
- this.dropItemIndex = itemIndex;
+ this.dropIndex = itemIndex;
this.dValue = value;
this.showDrop = true;
},
// 底部下拉选中
chooseSelector(e) {
- this.Rerender(this.dropList[e], this.dropIndex, this.dropItemIndex);
+ this.Rerender([this.dropList[e]], this.dropIndex);
this.setAnswer(this.dropCode, this.dropList[e]);
},
/**
@@ -902,6 +886,7 @@ export default {
list: {
handler() {
this.test = [...this.list];
+ console.log('this.test: ', this.test);
},
deep: true,
},
@@ -916,6 +901,7 @@ export default {
},
created() {
this.test = [...this.list];
+ console.log('this.test: ', this.test);
},
// 组件周期函数--监听组件数据更新之前
beforeUpdate() {},
diff --git a/src/pages/MoreCar/detail.vue b/src/pages/MoreCar/detail.vue
index 5222efb..be845c0 100644
--- a/src/pages/MoreCar/detail.vue
+++ b/src/pages/MoreCar/detail.vue
@@ -5,46 +5,53 @@
class="car-box bor-left-lv"
v-if="car"
:class="{
- 'bor-left-lv': car.carStatus === 0,
- 'bor-left-zhan': car.carStatus === 1,
+ 'bor-left-lv': car.carStatus === 1,
+ 'bor-left-zhan': car.carStatus === 0 || car.carStatus === 3,
'bor-left-xian': car.carStatus === 2,
- 'bor-left-dian': car.carStatus === 3,
- 'bor-left-li': car.carStatus === 4,
}"
@click="openDetail"
>
+
{{ car.carNo }}
- {{ car.nursesName || '患者姓名' }}
+ {{
+ car.nursesName ? car.nursesName : car.carStatus === 3 ? '无病历' : '无名氏'
+ }}
{{ car.gender === 0 ? '女' : car.gender === 1 ? '男' : '性别' }}
- {{ car.age || '年龄' }}
+ {{ car.age || '年龄' }}
-
-
+
+
-
-
+
+
{{ medical }}
- 身份证:{{ car.idcard }}
+ 身份证:{{ car.idcard || '暂无' }}
@@ -125,6 +132,7 @@ export default {
onLoad(options) {
console.log('options: ', options);
this.car = JSON.parse(options.info);
+ console.log('this.car: ', this.car);
this.getSteps();
},
// 页面周期函数--监听页面初次渲染完成0
@@ -211,6 +219,11 @@ export default {
.car-no {
width: 140rpx;
margin-right: 10rpx;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ /* display: -webkit-box; */
+ -webkit-line-clamp: 1;
+ -webkit-box-orient: vertical;
}
.id-card {
font-size: 28rpx;
diff --git a/src/pages/MoreCar/index.vue b/src/pages/MoreCar/index.vue
index a223b78..659561a 100644
--- a/src/pages/MoreCar/index.vue
+++ b/src/pages/MoreCar/index.vue
@@ -12,51 +12,63 @@
>
-
-
-
-
- {{ car.carNo }}
- {{ car.nursesName || '患者姓名' }}
- {{ car.gender === 0 ? '女' : car.gender === 1 ? '男' : '性别' }}
- {{ car.age || '年龄' }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ car.carNo }}
+ {{
+ car.nursesName ? car.nursesName : car.carStatus === 3 ? '无病历' : '无名氏'
+ }}
+ {{ car.gender === 0 ? '女' : car.gender === 1 ? '男' : '性别' }}
+ {{ car.age || '年龄' }}
-
-
-
- {{ medical }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ medical }}
+
+ 身份证:{{ car.idcard || '暂无' }}
- 身份证:{{ car.idcard || '' }}
+
-
-
+
+
+