10.22提交
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
@ -1 +1 @@
|
|||||||
<view class="content page-box data-v-1cf27b2a"><my-swiper wx:if="{{a}}" class="index-siwper margin-b-card data-v-1cf27b2a" style="width:100%" u-i="1cf27b2a-0" bind:__l="__l" u-p="{{a}}"/><view class="main-cards data-v-1cf27b2a"><view class="mc-part data-v-1cf27b2a" style="margin-left:0"><view class="mc-part-text data-v-1cf27b2a">已完成事项</view><image class="data-v-1cf27b2a" src="/static/done.png" mode="widthFix"></image></view><view class="mc-part mc-part2 data-v-1cf27b2a" style="margin-right:0"><view class="mc-part-text data-v-1cf27b2a">待完成事项</view><image class="data-v-1cf27b2a" style="transform:rotate(0deg)" src="/static/undone.png" mode="widthFix"></image></view></view><view class="attention-card data-v-1cf27b2a"><view class="part-title data-v-1cf27b2a"> 注意事项 </view><view class="ac-parts data-v-1cf27b2a"><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #ffa2a2,#ffd3d3, #ffffff00)"> 术前注意事项 <uni-icons wx:if="{{b}}" class="data-v-1cf27b2a" u-i="1cf27b2a-1" bind:__l="__l" u-p="{{b}}"></uni-icons></view><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #f9b275,#fff3e9, #ffffff00)"> 术中注意事项 <uni-icons wx:if="{{c}}" class="data-v-1cf27b2a" u-i="1cf27b2a-2" bind:__l="__l" u-p="{{c}}"></uni-icons></view><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #8fdc8a,#fdfdfd, #ffffff00)"> 术后注意事项 <uni-icons wx:if="{{d}}" class="data-v-1cf27b2a" u-i="1cf27b2a-3" bind:__l="__l" u-p="{{d}}"></uni-icons></view></view></view><uni-popup wx:if="{{n}}" class="r data-v-1cf27b2a" u-s="{{['d']}}" u-r="inputDialog" u-i="1cf27b2a-4" bind:__l="__l" u-p="{{n}}"><view class="pop-box data-v-1cf27b2a"><view class="pb-title data-v-1cf27b2a">完善手术信息</view><view class="pb-content data-v-1cf27b2a"><view class="pb-item data-v-1cf27b2a"><view class="pb-item-left data-v-1cf27b2a">已经手术</view><view class="pb-item-right data-v-1cf27b2a"><radio-group class="data-v-1cf27b2a" bindchange="{{e}}"><label class="radio data-v-1cf27b2a"><radio class="data-v-1cf27b2a" value="1"/>是</label><label class="radio data-v-1cf27b2a"><radio class="data-v-1cf27b2a" value="0"/>否</label></radio-group></view></view><view class="pb-item data-v-1cf27b2a"><view class="pb-item-left data-v-1cf27b2a">手术时间</view><view class="pb-item-right data-v-1cf27b2a"><uni-datetime-picker wx:if="{{h}}" class="data-v-1cf27b2a" bindmaskClick="{{f}}" u-i="1cf27b2a-5,1cf27b2a-4" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"></uni-datetime-picker></view></view><view class="pb-item data-v-1cf27b2a"><view class="pb-item-left data-v-1cf27b2a">医院名称</view><view class="pb-item-right data-v-1cf27b2a"><uni-easyinput wx:if="{{k}}" class="data-v-1cf27b2a" bindiconClick="{{i}}" u-i="1cf27b2a-6,1cf27b2a-4" bind:__l="__l" bindupdateModelValue="{{j}}" u-p="{{k}}"></uni-easyinput></view></view></view></view><view class="pop-close data-v-1cf27b2a" bindtap="{{l}}"> 关闭 </view></uni-popup></view>
|
<view class="content page-box data-v-1cf27b2a"><my-swiper wx:if="{{a}}" class="index-siwper margin-b-card data-v-1cf27b2a" style="width:100%" u-i="1cf27b2a-0" bind:__l="__l" u-p="{{a}}"/><view class="main-cards data-v-1cf27b2a" bindtap="{{c}}"><view class="mc-row data-v-1cf27b2a"><view class="data-v-1cf27b2a">视力测试</view><uni-icons wx:if="{{b}}" class="data-v-1cf27b2a" u-i="1cf27b2a-1" bind:__l="__l" u-p="{{b}}"></uni-icons></view></view><view class="main-cards data-v-1cf27b2a"><view class="mc-part data-v-1cf27b2a" style="margin-left:0"><view class="mc-part-text data-v-1cf27b2a">已完成事项</view><image class="data-v-1cf27b2a" src="/static/done.png" mode="widthFix"></image></view><view class="mc-part mc-part2 data-v-1cf27b2a" style="margin-right:0"><view class="mc-part-text data-v-1cf27b2a">待完成事项</view><image class="data-v-1cf27b2a" style="transform:rotate(0deg)" src="/static/undone.png" mode="widthFix"></image></view></view><view class="attention-card data-v-1cf27b2a"><view class="part-title data-v-1cf27b2a"> 注意事项 </view><view class="ac-parts data-v-1cf27b2a"><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #ffa2a2,#ffd3d3, #ffffff00)"> 术前注意事项 <uni-icons wx:if="{{d}}" class="data-v-1cf27b2a" u-i="1cf27b2a-2" bind:__l="__l" u-p="{{d}}"></uni-icons></view><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #f9b275,#fff3e9, #ffffff00)"> 术中注意事项 <uni-icons wx:if="{{e}}" class="data-v-1cf27b2a" u-i="1cf27b2a-3" bind:__l="__l" u-p="{{e}}"></uni-icons></view><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #8fdc8a,#fdfdfd, #ffffff00)"> 术后注意事项 <uni-icons wx:if="{{f}}" class="data-v-1cf27b2a" u-i="1cf27b2a-4" bind:__l="__l" u-p="{{f}}"></uni-icons></view></view></view><uni-popup wx:if="{{p}}" class="r data-v-1cf27b2a" u-s="{{['d']}}" u-r="inputDialog" u-i="1cf27b2a-5" bind:__l="__l" u-p="{{p}}"><view class="pop-box data-v-1cf27b2a"><view class="pb-title data-v-1cf27b2a">完善手术信息</view><view class="pb-content data-v-1cf27b2a"><view class="pb-item data-v-1cf27b2a"><view class="pb-item-left data-v-1cf27b2a">已经手术</view><view class="pb-item-right data-v-1cf27b2a"><radio-group class="data-v-1cf27b2a" bindchange="{{g}}"><label class="radio data-v-1cf27b2a"><radio class="data-v-1cf27b2a" value="1"/>是</label><label class="radio data-v-1cf27b2a"><radio class="data-v-1cf27b2a" value="0"/>否</label></radio-group></view></view><view class="pb-item data-v-1cf27b2a"><view class="pb-item-left data-v-1cf27b2a">手术时间</view><view class="pb-item-right data-v-1cf27b2a"><uni-datetime-picker wx:if="{{j}}" class="data-v-1cf27b2a" bindmaskClick="{{h}}" u-i="1cf27b2a-6,1cf27b2a-5" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"></uni-datetime-picker></view></view><view class="pb-item data-v-1cf27b2a"><view class="pb-item-left data-v-1cf27b2a">医院名称</view><view class="pb-item-right data-v-1cf27b2a"><uni-easyinput wx:if="{{m}}" class="data-v-1cf27b2a" bindiconClick="{{k}}" u-i="1cf27b2a-7,1cf27b2a-5" bind:__l="__l" bindupdateModelValue="{{l}}" u-p="{{m}}"></uni-easyinput></view></view></view></view><view class="pop-close data-v-1cf27b2a" bindtap="{{n}}"> 关闭 </view></uni-popup></view>
|
@ -0,0 +1,162 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../../common/vendor.js");
|
||||||
|
const store_index = require("../../store/index.js");
|
||||||
|
require("../../api/index.js");
|
||||||
|
require("../../api/request.js");
|
||||||
|
require("../../config/index.js");
|
||||||
|
if (!Array) {
|
||||||
|
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||||
|
_easycom_uni_popup2();
|
||||||
|
}
|
||||||
|
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
||||||
|
if (!Math) {
|
||||||
|
_easycom_uni_popup();
|
||||||
|
}
|
||||||
|
const _sfc_main = {
|
||||||
|
__name: "visionTest",
|
||||||
|
setup(__props) {
|
||||||
|
const store = store_index.useStore();
|
||||||
|
common_vendor.onLoad((e) => {
|
||||||
|
var _a;
|
||||||
|
if (!((_a = store.userInfo) == null ? void 0 : _a.has_operation)) {
|
||||||
|
setTimeout(() => {
|
||||||
|
inputDialog.value.open();
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const inputDialog = common_vendor.ref();
|
||||||
|
const inputDialog2 = common_vendor.ref();
|
||||||
|
const inputDialog3 = common_vendor.ref();
|
||||||
|
const step1 = common_vendor.ref("先测右眼,请遮住左眼");
|
||||||
|
common_vendor.ref("请遮住右眼");
|
||||||
|
const countDown = common_vendor.ref(5);
|
||||||
|
common_vendor.ref(1);
|
||||||
|
const current_img = common_vendor.ref("");
|
||||||
|
const current_img_index = common_vendor.ref(null);
|
||||||
|
const sizes = common_vendor.ref([
|
||||||
|
{
|
||||||
|
size: 23,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 19,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 15,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 11,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 9,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 7,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 6,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 4,
|
||||||
|
vision: 4.2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
size: 3,
|
||||||
|
vision: 4.2
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
const show_size = common_vendor.ref({
|
||||||
|
width: "29px"
|
||||||
|
});
|
||||||
|
const num = common_vendor.ref(0);
|
||||||
|
const now = common_vendor.ref(1);
|
||||||
|
const vision_info = common_vendor.ref({
|
||||||
|
left: 4,
|
||||||
|
right: 4.1
|
||||||
|
});
|
||||||
|
function toStart() {
|
||||||
|
inputDialog.value.close();
|
||||||
|
inputDialog2.value.open();
|
||||||
|
let s = setInterval(() => {
|
||||||
|
countDown.value--;
|
||||||
|
if (countDown.value == 0) {
|
||||||
|
clearInterval(s);
|
||||||
|
inputDialog2.value.close();
|
||||||
|
}
|
||||||
|
}, 1e3);
|
||||||
|
randomFunc();
|
||||||
|
}
|
||||||
|
function randomFunc() {
|
||||||
|
let ran = Math.ceil(Math.random() * 4);
|
||||||
|
if (current_img_index.value == ran) {
|
||||||
|
randomFunc();
|
||||||
|
} else {
|
||||||
|
current_img.value = "../../static/" + ran + ".png";
|
||||||
|
current_img_index.value = ran;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function chooseFunc(index) {
|
||||||
|
randomFunc();
|
||||||
|
if (num.value > 8) {
|
||||||
|
if (now.value == 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
show_size.value.width = "29px";
|
||||||
|
countDown.value = 5;
|
||||||
|
step1.value = "测左眼,请遮住右眼";
|
||||||
|
num.value = 8;
|
||||||
|
now.value = 2;
|
||||||
|
toStart();
|
||||||
|
} else {
|
||||||
|
show_size.value.width = sizes.value[num.value].size + "px";
|
||||||
|
num.value++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function okFunc() {
|
||||||
|
inputDialog3.value.open();
|
||||||
|
}
|
||||||
|
return (_ctx, _cache) => {
|
||||||
|
return {
|
||||||
|
a: current_img.value,
|
||||||
|
b: common_vendor.s(show_size.value),
|
||||||
|
c: common_vendor.o(($event) => chooseFunc()),
|
||||||
|
d: common_vendor.o(($event) => chooseFunc()),
|
||||||
|
e: common_vendor.o(($event) => chooseFunc()),
|
||||||
|
f: common_vendor.o(($event) => chooseFunc()),
|
||||||
|
g: common_vendor.o(($event) => chooseFunc()),
|
||||||
|
h: common_vendor.o(toStart),
|
||||||
|
i: common_vendor.sr(inputDialog, "29752d91-0", {
|
||||||
|
"k": "inputDialog"
|
||||||
|
}),
|
||||||
|
j: common_vendor.p({
|
||||||
|
["is-mask-click"]: true
|
||||||
|
}),
|
||||||
|
k: common_vendor.t(countDown.value),
|
||||||
|
l: common_vendor.t(step1.value),
|
||||||
|
m: common_vendor.sr(inputDialog2, "29752d91-1", {
|
||||||
|
"k": "inputDialog2"
|
||||||
|
}),
|
||||||
|
n: common_vendor.p({
|
||||||
|
["is-mask-click"]: false
|
||||||
|
}),
|
||||||
|
o: common_vendor.t(vision_info.value.left),
|
||||||
|
p: common_vendor.t(vision_info.value.right),
|
||||||
|
q: common_vendor.o(okFunc),
|
||||||
|
r: common_vendor.sr(inputDialog3, "29752d91-2", {
|
||||||
|
"k": "inputDialog3"
|
||||||
|
}),
|
||||||
|
s: common_vendor.p({
|
||||||
|
["is-mask-click"]: true
|
||||||
|
})
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-29752d91"], ["__file", "F:/项目2023/视力表/vision-record/pages/index/visionTest.vue"]]);
|
||||||
|
wx.createPage(MiniProgramPage);
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "视力测试",
|
||||||
|
"usingComponents": {
|
||||||
|
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |