Commit 576cb111 by nlp97

修改签名组件前

parents
ENV = 'development'
VUE_APP_USER_NAME = 'xmgl'
VUE_APP_PASS_WORD='1111'
\ No newline at end of file
ENV = 'production'
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
#四川省医移动端
17 服务器 : C:\wwwroot\multiproj.suvalue.com
166 8019 \\192.168.18.166\wwwroot\multi-project-manage\testmultiproj.suvalue.com\mobile
166 \\192.168.18.166\wwwroot\testmultiproj.suvalue.com\mobile
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
],
plugins: [
// ['import', {
// libraryName: 'vant',
// libraryDirectory: 'es',
// style: true
// }, 'vant']
]
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "mult_mobile",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@vant/area-data": "^1.2.2",
"autoprefixer": "^9.7.5",
"babel-plugin-import": "^1.13.0",
"core-js": "^3.6.4",
"echarts": "^4.9.0",
"lib-flexible": "^0.3.2",
"postcss": "^7.0.27",
"postcss-pxtorem": "^5.1.1",
"sessionstorage": "^0.1.0",
"vant": "^2.12.45",
"vue": "^2.6.11",
"vue-wechat-title": "^2.0.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.2.0",
"@vue/cli-plugin-eslint": "^4.2.0",
"@vue/cli-service": "^4.2.0",
"axios": "^0.19.2",
"element-ui": "^2.14.1",
"node-sass": "^5.0.0",
"sass": "^1.25.0",
"sass-loader": "^7.3.1",
"vue-router": "^3.1.6",
"vue-template-compiler": "^2.6.11",
"vuex": "^3.1.3"
},
"postcss": {
"plugins": {
"autoprefixer": {},
"postcss-pxtorem": {
"rootValue": 37.5,
"propList": [
"*"
]
}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8",
"ios >= 8",
"android >= 4.0"
]
}
<!--
* @Author: ninglupeng
* @Date: 2022-03-17 15:06:50
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-17 15:12:27
* @Description:
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>
上海公卫信息采集
</title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
\ No newline at end of file
<!--
* @Author: ninglupeng
* @Date: 2022-03-17 15:06:50
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-19 17:58:52
* @Description:
-->
<template>
<div id="app">
<router-view v-if="isRouterAlive" v-wechat-title="$route.meta.title" />
<van-overlay :show="show" @click="show = false" :lock-scroll="true">
<div class="wrapper" @click.stop>
<div class="block">
<van-loading color="#1989fa" size="24px" vertical type="spinner">
<span style="color:#1989fa">加载中... </span>
</van-loading>
</div>
</div>
</van-overlay>
</div>
</template>
<script>
export default {
name: "App",
provide() {
// 依赖注入,解决层级较深,使用props比较难过的时候
return {
setLoading: this.setLoading,
reload: this.reload,
};
},
data() {
return {
show: false,
isRouterAlive: true,
};
},
methods: {
setLoading(state) {
this.show = state;
},
reload() {
this.isRouterAlive = false;
this.$nextTick(function() {
this.isRouterAlive = true;
});
},
},
components: {},
mounted() {},
created() {
//在页面刷新时将vuex里的信息保存到localStorage里
window.addEventListener("beforeunload", () => {});
},
};
</script>
<style lang="scss">
#app {
width: 100vw;
height: 100vh;
/* background-color: #ffffff; */
.wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
.block {
}
}
.van-overlay {
z-index: 1001 !important;
}
}
</style>
/**cookie & localStorage相关方法**/
/**cookie**/
//设置cookie
function setCookie(cookieName, cookieValue, exphour) {
var exp = new Date();
exphour = exphour || 24;
exp.setTime(exp.getTime() + 1000*60*60*exphour); //默认保存24小时
document.cookie = cookieName + "=" + cookieValue +"; expires=" + exp.toGMTString();
}
//取Cookie的值
function getCookie(cookieName) {
var strCookie = document.cookie;
var arrCookie = strCookie.split("; ");
for (var i = 0; i < arrCookie.length; i++) {
var arr = arrCookie[i].split("=");
if (arr[0] == cookieName)
return arr[1];
}
return "";
}
//清空cookie
function clearCookie(cookieName) {
setCookie(cookieName, null, -1);
}
/**session**/
//设置session
function setSession(sessionName, value) {
if(typeof value == "object")
value = JSON.stringify(value);
sessionStorage.setItem(sessionName, value);
}
//获取session
function getSession(sessionName) {
var result = sessionStorage.getItem(sessionName);
if (typeof result == 'string') {
try {
return JSON.parse(result);
} catch(e) {
if(result=="true"){
return true;
}else if(result=="false"){
return false;
}else{
return result;
}
}
}
}
//清楚session
function clearSession(sessionName) {
sessionStorage.removeItem(sessionName);
}
/**localStorage**/
//设置缓存
function setCache(localstorageName, value){
if(typeof value == "object")
value = JSON.stringify(value);
localStorage.setItem(localstorageName, value);
// 保存缓存的时间
localStorage[localstorageName+"CacheTime"] = new Date().getTime();
}
//获取缓存
function getCache(localstorageName){
var result = localStorage.getItem(localstorageName);
if (typeof result == 'string') {
try {
return JSON.parse(result);
} catch(e) {
return result;
}
}
}
//判断数据是否缓存
function checkCache(localstorageName){
if(!localStorage[localstorageName]){ //没有缓存
return false;
}else{ //如果有缓存
var time = new Date().getTime() - localStorage[localstorageName+"CacheTime"];
if(time> 20*1000){ //缓存时间超过20s
localStorage.removeItem(localstorageName); //清除该localstorage;
return false;
}
return true;
}
}
//有无缓存方法
function ifCacheFn(localstorageName, yesCallback, noCallback){
if(checkCache(localstorageName)){ //有缓存
yesCallback(getCache(localstorageName));
}else{ //没有缓存
noCallback();
}
}
export{
setCookie, getCookie, clearCookie,
setSession, getSession, clearSession,
setCache, getCache, checkCache, ifCacheFn
}
\ No newline at end of file
@mixin flex_row {
display: flex;
flex-direction: row;
}
@mixin flex_column {
display: flex;
flex-direction: column;
}
@mixin align_center {
align-items: center;
}
@mixin align_end {
align-items: flex-end;
}
@mixin align_start {
align-items: flex-start;
}
@mixin justify_c_start {
justify-content: flex-start;
}
@mixin justify_c_end {
justify-content: flex-end;
}
@mixin justify_c_around {
justify-content: space-around;
}
@mixin justify_c_between {
justify-content: space-between;
}
@mixin justify_c_center {
justify-content: center;
}
@mixin nowrap {
flex-wrap: nowrap
}
@mixin wrap {
flex-wrap: wrap
}
@mixin chart_title {
font-size: 15px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
line-height: 22px;
margin-left: 10px;
margin-top: 5px;
}
@mixin chart_box {
background: #ffffff;
border-radius: 5px;
padding: 5px;
}
<!--
* @Author: ninglupeng
* @Date: 2022-03-19 10:27:33
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-19 14:09:01
* @Description:
-->
<template>
<div class="signHandle">
<div class="signHandle_hd">
<strong class="signHandleTitle">{{ title }}</strong>
</div>
<div class="signHandle_bd">
<div id="canvas" ref="canvas"></div>
</div>
<div class="signHandle_ft">
<van-button
id="saveCanvas"
native-type="button"
block
ref="saveCanvas"
type="info"
size="mini"
>保存</van-button
>
<van-button
id="clearCanvas"
block
ref="clearCanvas"
type="warning"
size="mini"
native-type="button"
>清除</van-button
>
<van-button
id="Cancel"
native-type="button"
block
ref="Cancel"
type="default"
size="mini"
@click="onCancel"
>返回</van-button
>
</div>
</div>
</template>
<script>
export default {
name: "",
props: {
title: {
default: null,
},
},
data() {
return {
signSrc: "",
};
},
mounted() {
this.lineCanvas({
el: this.$refs.canvas, //绘制canvas的父级div
clearEl: this.$refs.clearCanvas, //清除按钮
saveEl: this.$refs.saveCanvas, //保存按钮
});
},
methods: {
lineCanvas(obj) {
this.linewidth = 2;
this.color = "#000000";
this.background = "#ffffff";
for (var i in obj) {
this[i] = obj[i];
}
this.canvas = document.createElement("canvas");
this.el.appendChild(this.canvas);
this.cxt = this.canvas.getContext("2d");
this.canvas.width = this.el.clientWidth;
this.canvas.height = this.el.clientHeight;
this.cxt.fillStyle = this.background;
this.cxt.fillRect(0, 0, this.canvas.width, this.canvas.width);
this.cxt.strokeStyle = this.color;
this.cxt.lineWidth = this.linewidth;
this.cxt.lineCap = "round";
//开始绘制
this.canvas.addEventListener(
"touchstart",
function(e) {
this.cxt.beginPath();
this.cxt.moveTo(e.changedTouches[0].pageX, e.changedTouches[0].pageY);
}.bind(this),
false
);
//绘制中
this.canvas.addEventListener(
"touchmove",
function(e) {
this.cxt.lineTo(e.changedTouches[0].pageX, e.changedTouches[0].pageY);
this.cxt.stroke();
}.bind(this),
false
);
//结束绘制
// this.canvas.addEventListener(
// "touchend",
// function() {
// this.cxt.closePath();
// let imgBase64 = this.canvas.toDataURL();
// console.log(imgBase64);
// this.signSrc = imgBase64;
// }.bind(this),
// false
// );
//清除画布
this.clearEl.addEventListener(
"click",
function() {
this.cxt.clearRect(0, 0, this.canvas.width, this.canvas.height);
}.bind(this),
false
);
//保存图片,直接转base64
this.saveEl.addEventListener(
"click",
function() {
let imgBase64 = this.canvas.toDataURL();
// console.log(imgBase64);
this.signSrc = imgBase64;
this.$emit("onCancel", this.signSrc);
this.$notify({ type: "success", message: "签名保存成功" });
}.bind(this),
false
);
},
onCancel() {
this.$emit("onCancel");
},
},
};
</script>
<style lang="scss" scoped>
.signHandle {
text-align: left;
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 5000;
background-color: #ffffff;
text-align: center;
border-radius: 8px;
overflow: hidden;
border: 1px solid #eeeeee;
}
.signHandleTitle {
font-weight: 400;
font-size: 18px;
}
.signHandle_bd {
height: 80vh;
font-size: 15px;
line-height: 1.3;
word-wrap: break-word;
word-break: break-all;
color: #4a4a4a;
&:first-child {
padding: 2.7em 20px 1.7em;
color: #353535;
}
#canvas {
width: 100%;
height: 90vh;
position: relative;
canvas {
display: block;
}
}
}
.signHandle_ft {
width: 100%;
position: fixed;
bottom: 0;
left: 0;
display: flex;
flex-direction: row;
#clearCanvas {
border: 1px solid #dedede;
z-index: 1;
height: 40px;
}
#saveCanvas {
text-align: center;
border: 1px solid #dedede;
z-index: 1;
height: 40px;
}
#Cancel {
text-align: center;
border: 1px solid #dedede;
z-index: 1;
height: 40px;
}
}
</style>
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-19 18:03:50
* @Description:
-->
<template>
<div class="index">
<van-form
ref="vantform"
label-align="right"
class="index_form"
@submit="save"
>
<page1 v-show="page === 1"></page1>
<page2 v-show="page === 2"></page2>
<page3 v-show="page === 3"></page3>
<page4 v-show="page === 4"></page4>
<page5 v-show="page === 5"></page5>
<page6 v-show="page === 6"></page6>
<leaveHospital v-show="page === 7"></leaveHospital>
<page7 v-show="page === 8"></page7>
<div class="index_form_footer" v-if="page != 1 && page != 2 && page != 8">
<van-button
class="index_form_footer_next"
round
block
type="info"
native-type="button"
v-if="page != 1 && page != 2 && page != 7 && page != 8"
@click="next()"
>下一步</van-button
>
<van-button
v-if="page == 7"
class="index_form_footer_next"
round
block
type="info"
native-type="button"
@click="submit"
>保存</van-button
>
</div>
</van-form>
</div>
</template>
<script>
import { mapState, mapMutations } from "vuex";
import page1 from "./page1.vue";
import page2 from "./page2.vue";
import page3 from "./page3.vue";
import page4 from "./page4.vue";
import page5 from "./page5.vue";
import page6 from "./page6.vue";
import page7 from "./page7.vue";
import leaveHospital from "./leaveHospital.vue";
import signHandleVue from "./signHandle.vue";
export default {
inject: ["setLoading", "reload"],
name: "index",
data() {
return {};
},
mounted() {},
methods: {
next() {
// let pageS = this.page + 1;
// this.$store.dispatch("user/setpage", pageS);
//page3
// inpatientNumber: "", //入院号
// agreementFloor: "", //楼层
// bedNumber: "", //床号
// agreementSign: "", // 患者签字
// agreementDate: "", // 签字日期
if (this.page == 3) {
this.$refs.vantform
.validate([
"inpatientNumber",
"agreementFloor",
"bedNumber",
"agreementSign",
"agreementDate",
])
.then(() => {
this.$store.dispatch("user/setpage", 4);
// 验证通过
})
.catch(() => {
//验证失败
debugger;
});
} else if (this.page == 4) {
// patientName: "", //患者姓名
// age: "", //年龄
// gender: "男", //性别
// maritalStatus: "未婚", //婚姻状况
// birthday: "", //出生日期
// isConceive: "未孕", //怀孕状况
// gestationalWeeks: "", //怀孕周期
// occupation: "", //职业
// contactInformation: "", //联系方式
// Registeredresidence: "", //籍贯 (包括省市)
// province: "", //籍贯 (省)
// city: "", //籍贯 (市)
// address: "", //地址
// idCard: "", //身份证号
// insurance: "有", //商业保险
this.$refs.vantform
.validate([
"patientName", //患者姓名
"age", //年龄
"birthday", //出生日期
"gestationalWeeks", //怀孕周期
"occupation", //职业
"contactInformation", //联系方式
"Registeredresidence", //籍贯 (包括省市)
"address",
"idCard",
])
.then(() => {
this.$store.dispatch("user/setpage", 5);
// 验证通过
})
.catch(() => {
//验证失败
debugger;
});
} else if (this.page == 5) {
// purpose: "学习", // 来沪目的
// LeaveShangHai: "", //多少天未出上海
// unusualDate: "", //核酸检测异常时间
// normalDate: "", //未发生异常时间
// inHospitalDate: "", //120转运时间
// HasSymptom: "是", //有无症状
// symptom: [], //患者症状
// covidVaccine: 0, //接种针数
// vaccineType: "", //疫苗公司
// vaccineDate: "", //最后一次接种日期
this.$refs.vantform
.validate([
"LeaveShangHai", //多少天未出上海
"unusualDate", //核酸检测异常时间
"normalDate", //未发生异常时间
"inHospitalDate", //120转运时间
"symptom", //患者症状
"covidVaccine", //接种针数
"vaccineType", //疫苗公司
"vaccineDate", //最后一次接种日期
])
.then(() => {
this.$store.dispatch("user/setpage", 6);
// 验证通过
})
.catch(() => {
//验证失败
debugger;
});
} else if (this.page == 6) {
// hasHistoryAllergies: "有", //过敏史
// historyAllergies: "", //过敏原
// hasHistorySurgery: "有", //手术史
// historySurgery: "", //具体内容
// HasPreviousHistory: "否", //有无既往史
// previousHistory: [], //既往史
// tuberculosisDate: "", //既往史发生时间
// ChestCT: "是", //有无CT
// ChestCTDate: "", //CT拍照时间
this.$refs.vantform
.validate([
"hasHistoryAllergies", //过敏史
"historyAllergies", //过敏原
"hasHistorySurgery", //手术史
"historySurgery", //具体内容
"HasPreviousHistory", //有无既往史
"previousHistory", //既往史
"tuberculosisDate", //既往史发生时间
"ChestCT", //有无CT
"ChestCTDate", //CT拍照时间
])
.then(() => {
this.$store.dispatch("user/setpage", 7);
// 验证通过
})
.catch(() => {
//验证失败
});
}
},
submit() {
this.$refs.vantform
.validate([
"leaveSign", //出院签字
"leaveDate", // 签字日期
])
.then(() => {
this.$refs.vantform.submit();
// 验证通过
})
.catch(() => {
//验证失败
debugger;
});
},
save(values) {
this.setLoading(true);
this.$http.post(`/Research`, values).then((data) => {
this.$notify({ type: "success", message: "保存成功" });
this.$store.dispatch("user/setpage", 8);
this.reload();
this.setLoading(false);
});
},
},
computed: {
...mapState({
page: (state) => state.user.page,
}),
},
components: {
page1,
page2,
page3,
page4,
page5,
page6,
page7,
signHandleVue,
leaveHospital,
},
};
</script>
<style lang="scss" scoped>
.index {
@include flex_column;
@include align_center;
width: 100vw;
height: 100vh;
/* position: relative; */
&_form {
width: 100vw;
height: 100%;
&_footer {
/* position: absolute; */
/* bottom: 20px; */
width: 100%;
padding-top: 30px;
padding-bottom: 30px;
&_next {
width: 319px;
height: 48px;
background: #0091ff;
border-radius: 24px;
margin: 0 auto;
}
}
}
}
</style>
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-19 17:46:03
* @Description:
-->
<template>
<div class="leaveHospital">
<h1 class="leaveHospital_title">出院沟通告知书</h1>
<div class="leaveHospital_text">
1、目前明确诊断:新型冠状病毒肺炎 <br />
2、目前主要治疗手段:药物 <br />
3、重要检查及结果:实验室检测 <br />
4、可能出现的并发症:过敏 <br />
5、药物(包括自费药)使用及其不良反应
</div>
<div class="leaveHospital_text">
<van-field colon clearable name="leaveProtagonist" label="今日与患者">
<template #input>
<van-radio-group v-model="leaveProtagonist" direction="horizontal">
<van-radio name="本人">本人</van-radio>
<van-radio name="家属">家属</van-radio>
</van-radio-group>
</template>
</van-field>
就上述情况进行了沟通,并作了详细解释,患者(家属)己充分理解,表示同意。
</div>
<van-field
colon
clearable
v-model="leaveSign"
name="leaveSign"
label=" 患者(或其家属、代理人)签字"
placeholder="患者签字"
:rules="[{ required: true, message: '请患者签字' }]"
label-width="190px"
>
<template #input>
<van-button
size="small"
block
type="primary"
@click="showSignHandleVue = true"
native-type="button"
>点击签字</van-button
>
</template></van-field
>
<jlPopup title="签名" v-if="showSignHandleVue" @onCancel="onCancel">
</jlPopup>
<van-field
colon
clearable
readonly
clickable
name="leaveDate"
:value="leaveDate"
label="签字日期"
label-width="190px"
placeholder="点击选择签字日期"
@click="showCalendar = true"
:rules="[{ required: true, message: '请选择签字日期' }]"
/>
<van-popup v-model="showCalendar" position="bottom">
<van-datetime-picker
type="date"
:formatter="formatter"
:min-date="minleaveDate"
:max-date="maxDate"
@confirm="onleaveDate"
@cancel="showCalendar = false"
/>
</van-popup>
</div>
</template>
<script>
import { mapState, mapMutations } from "vuex";
import jlPopup from "./alert.vue";
import { formatDate } from "../utils/common.js";
export default {
components: {
jlPopup,
},
name: "leaveHospital",
data() {
return {
leaveProtagonist: "本人",
leaveSign: "", //出院签字
leaveDate: "", // 签字日期
showCalendar: false, //签字日期弹窗
minleaveDate: new Date(2020, 0, 1),
maxDate: new Date(),
showSignHandleVue: false,
};
},
mounted() {},
methods: {
onCancel(val) {
console.log(val);
this.leaveSign = val;
this.showSignHandleVue = false;
},
onleaveDate(date) {
this.leaveDate = formatDate(date, "yyyy-MM-dd");
this.showCalendar = false;
},
formatter(type, val) {
if (type === "year") {
return `${val}年`;
}
if (type === "month") {
return `${val}月`;
} else if (type === "day") {
return `${val}日`;
} else if (type === "hour") {
return `${val}时`;
} else if (type === "minute") {
return `${val}分`;
}
return val;
},
},
computed: {},
};
</script>
<style lang="scss" scoped>
.leaveHospital {
&_title {
text-align: center;
}
&_text {
/* text-indent: 35px; */
margin: 25px;
font-size: 14px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #000000;
line-height: 25px;
}
}
</style>
<template>
<div id="login">
<div class="logintitle">
<div class="titleText">临床数据采集系统</div>
<div class="notes">CLINICAL DATA ACQUISITION SYSTEM</div>
</div>
<div class="fromBox">
<div class="item">
<div class="icon">
<img
style="width: 10px; height: 16px"
src="../../assets/Page.png"
alt
/>
</div>
<input type="text" v-model="account" placeholder="账号" />
</div>
<div class="item">
<div class="icon">
<img
style="width: 14px; height: 16px"
src="../../assets/Fill.png"
alt
/>
</div>
<input type="password" v-model="password" placeholder="密码" />
</div>
<div class="submit" @click="onSubmit">登录</div>
</div>
</div>
</template>
<style lang="scss" scoped>
#login {
display: flex;
flex-direction: column;
align-content: center;
align-items: center;
background-image: url("../../assets/login_bg@2x.png");
background-size: 100%;
height: 100vh;
width: 100vw;
}
.logintitle {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 20vh;
}
.titleText {
font-size: 21px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 30px;
letter-spacing: 5px;
text-align-last: justify;
text-align: justify;
text-justify: distribute-all-lines;
width: 100%;
}
.notes {
font-size: 11px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #8d9ad0;
line-height: 15px;
}
.fromBox {
margin-top: 10vh;
width: 90vw;
display: flex;
flex-direction: column;
align-content: center;
align-items: center;
}
.item {
margin-top: 20px;
display: flex;
flex-direction: row;
width: 300px;
height: 50px;
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
}
.icon {
width: 15%;
display: flex;
flex-direction: column;
align-content: center;
align-items: center;
justify-items: center;
justify-content: center;
}
.item input {
width: 80%;
border: none;
color: #ffffff;
background-color: rgba(0, 0, 0, 0.001);
}
.item input::-webkit-input-placeholder {
color: #8d9ad0;
}
.item input::-moz-placeholder {
color: #8d9ad0;
}
.item input:-moz-placeholder {
color: #8d9ad0;
}
.item input:-ms-input-placeholder {
color: #8d9ad0;
}
.submit {
width: 300px;
height: 36px;
border-radius: 21px;
margin-top: 20px;
height: 44px;
background: #73deb3;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 23px;
}
</style>
<script>
export default {
name: "login",
data() {
return {
account: process.env.VUE_APP_USER_NAME,
password: process.env.VUE_APP_PASS_WORD
};
},
methods: {
onSubmit() {
if (this.account == "") {
this.$notify({
message: "请输入账号",
type: "warning"
});
return false;
}
if (this.password == "") {
this.$notify({
message: "请输入密码",
type: "warning"
});
return false;
}
this.$store
.dispatch("user/login", {
account: this.account,
password: this.password,
logintype: 2
})
.then(() => {
this.$router.push({ path: this.redirect || "/" });
this.$toast.success("登录成功");
})
.catch(d => {
// debugger;
// this.$toast.fail(d.message);
return false;
});
}
}
};
</script>
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-19 08:29:28
* @Description:
-->
<template>
<div class="page1">
<div class="page1_topbg">
<span class="page1_topbg_title">
入院信息采集
</span>
</div>
<div class="page1_bottom">
<span class="page1_bottom_img" @click="next"></span>
</div>
</div>
</template>
<script>
import { mapState, mapMutations } from "vuex";
export default {
name: "page1",
data() {
return {};
},
mounted() {},
methods: {
next() {
this.$store.dispatch("user/setpage", 2);
},
},
computed: {},
};
</script>
<style lang="scss" scoped>
.page1 {
width: 100%;
height: 100%;
overflow: hidden;
background-color: #f2f2f2;
&_topbg {
background-image: url("../assets/img/page1bg.png");
width: 100%;
height: 390px;
background-size: cover;
background-position: center center;
@include flex_column;
@include align_center;
justify-content: space-evenly;
position: relative;
&_title {
font-size: 24px;
font-family: Roboto-Bold, Roboto;
font-weight: bold;
color: #000000;
line-height: 28px;
position: absolute;
bottom: 50px;
}
}
&_bottom {
width: 100%;
height: 48px;
@include flex_column;
@include align_center;
position: absolute;
bottom: 150px;
&_img {
width: 48px;
height: 48px;
background-image: url("../assets/img/next.png");
background-size: cover;
background-position: center center;
}
}
}
</style>
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-18 13:06:45
* @Description:
-->
<template>
<div class="page2">
<!-- <h1 class="page2_title">知情同意书</h1> -->
<div class="page2_text">
为保障您在我院住院治疗期间享有充分的知情同意权,医务人员将向您告知您的病情、主要医疗措施、医疗风险等情況,解答您对疾病的咨询。未经您本人充分知情和签名同意,医务人员将不得进行手术等重大医疗行为。但由于各人心理承受能力不同,以及疾病发展具有不可预测性,为有利于治疗,请您现授权委托一位您充分信任的代理人,代为行使您的知情同意权。我院将依据您签名出具的授权委托书,视代理人的代理行为为您本人真实意思的表示。如您末满18周岁或没有民事行为能力和限制民事行为能力的,您的法定监护人为您的法定伐理人,代为行使知情同意权。
</div>
<br />
<div class="page2_text">
为了让医生给您制定最佳的洽疗方案,请您务必客观,真实地向医生提供您的病情资料和相关情況。
</div>
<div class="page2_text" style="text-align:right;">
特此告知
</div>
<br />
<br />
<br />
<div class="page2_next" @click="next">
上述告知书内容本人己充分了解
</div>
</div>
</template>
<script>
import { mapState, mapMutations } from "vuex";
export default {
name: "index",
data() {
return {};
},
mounted() {},
methods: {
next() {
this.$store.dispatch("user/setpage", 3);
},
},
computed: {},
};
</script>
<style lang="scss" scoped>
.page2 {
/* &_title {
text-align: center;
} */
&_text {
text-indent: 35px;
margin: 25px;
font-size: 17px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #000000;
line-height: 25px;
}
&_next {
width: 321px;
height: 48px;
background: #0091ff;
border-radius: 24px;
font-size: 18px;
font-family: Roboto-Bold, Roboto;
font-weight: bold;
color: #ffffff;
line-height: 18px;
display: flex;
flex-direction: column;
justify-items: center;
align-items: center;
justify-content: center;
margin: 0 auto;
}
}
</style>
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-19 17:07:10
* @Description:
-->
<template>
<div class="page3">
<div class="page3_header">本人决定选择以下方式:</div>
<div class="page3_text">
1、向贵院出具授权委托书指定代理人;<br />
2、向贵院出具户籍等相关证明,明确法定伐理人; <br />
3、本人決定不委托代理人,如本人疾病出现危急情况或不可预知情況,授权经治医师決定治疗方案,如有医疗风险和不良后果,由本人自行负责。<br />
</div>
<van-field
colon
clearable
v-model="inpatientNumber"
name="inpatientNumber"
label="住院号"
placeholder="住院号"
:rules="[{ required: true, message: '请填写住院号' }]"
></van-field>
<van-field
colon
clearable
v-model="agreementFloor"
name="agreementFloor"
label="楼层"
placeholder="楼层"
:rules="[{ required: true, message: '请填写楼层' }]"
></van-field>
<van-field
colon
clearable
v-model="bedNumber"
name="bedNumber"
label="床号"
placeholder="床号"
:rules="[{ required: true, message: '请填写床号' }]"
></van-field>
<van-field
colon
clearable
v-model="agreementSign"
name="agreementSign"
label="患者签字"
placeholder="患者签字"
readonly
:rules="[{ required: true, message: '请患者签字' }]"
>
<template #input>
<van-button
size="small"
@click="showSignHandleVue = true"
block
type="primary"
native-type="button"
>点击签字</van-button
>
</template>
</van-field>
<van-field
colon
clearable
readonly
clickable
name="agreementDate"
:value="agreementDate"
label="签字日期"
placeholder="点击选择签字日期"
@click="showCalendar = true"
:rules="[{ required: true, message: '请选择签字日期' }]"
/>
<van-popup v-model="showCalendar" position="bottom">
<van-datetime-picker
type="date"
:min-date="minAgreementDate"
:max-date="maxDate"
@confirm="onAgreementDate"
@cancel="showCalendar = false"
:formatter="formatter"
/>
</van-popup>
<jlPopup title="签名" v-if="showSignHandleVue" @onCancel="onCancel">
</jlPopup>
</div>
</template>
<script>
import { mapState, mapMutations } from "vuex";
import { formatDate } from "../utils/common.js";
import signHandleVue from "./signHandle.vue";
import jlPopup from "./alert.vue";
export default {
components: {
signHandleVue,
jlPopup,
},
name: "page3",
data() {
return {
AgreementMode: "",
inpatientNumber: "", //入院号
agreementFloor: "", //楼层
bedNumber: "", //床号
agreementSign: "", // 患者签字
agreementDate: "", // 签字日期
showCalendar: false, //签字日期弹窗
minAgreementDate: new Date(2020, 0, 1),
maxDate: new Date(),
showSignHandleVue: false,
};
},
mounted() {},
methods: {
onCancel(val) {
// console.log(val);
this.agreementSign = val;
this.showSignHandleVue = false;
},
onAgreementDate(date) {
this.agreementDate = formatDate(date, "yyyy-MM-dd");
this.showCalendar = false;
},
formatter(type, val) {
if (type === "year") {
return `${val}年`;
}
if (type === "month") {
return `${val}月`;
} else if (type === "day") {
return `${val}日`;
} else if (type === "hour") {
return `${val}时`;
} else if (type === "minute") {
return `${val}分`;
}
return val;
},
},
computed: {},
};
</script>
<style lang="scss" scoped>
.page3 {
&_text {
margin: 25px;
font-size: 14px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #000000;
line-height: 25px;
}
&_header {
height: 42px;
font-size: 18px;
margin: 10px;
font-family: Roboto-Bold, Roboto;
font-weight: bold;
color: #000000;
line-height: 42px;
}
&_next {
width: 319px;
height: 48px;
background: #0091ff;
border-radius: 24px;
margin: 0 auto;
margin-top: 100px;
}
}
</style>
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-19 17:15:50
* @Description:
-->
<template>
<div class="page4">
<van-field
colon
clearable
v-model="patientName"
name="patientName"
label="患者姓名"
placeholder="患者姓名"
:rules="[{ required: true, message: '请填写患者姓名' }]"
></van-field>
<van-field
colon
clearable
v-model="idCard"
name="idCard"
label="身份证号"
placeholder="身份证号"
@blur="getdate"
:rules="[
{ required: true, message: '请填写身份证号' },
{ validator, message: '身份证号码格式错误!' },
]"
></van-field>
<!-- 出生日期 birthday-->
<van-field
colon
clearable
readonly
clickable
name="birthday"
:value="birthday"
label="出生日期"
placeholder="出生日期"
@click="showbirthday = true"
:rules="[{ required: true, message: '请选择出生日期' }]"
/>
<van-popup v-model="showbirthday" position="bottom">
<van-datetime-picker
type="date"
:min-date="minbirthday"
:max-date="maxDate"
@confirm="onbirthday"
@cancel="showbirthday = false"
:formatter="formatter"
/>
</van-popup>
<van-field
colon
clearable
v-model="age"
name="age"
label="年龄"
placeholder="年龄"
type="digit"
:rules="[{ required: true, message: '请填写年龄' }]"
></van-field>
<van-field colon clearable name="gender" label="性别">
<template #input>
<van-radio-group v-model="gender" direction="horizontal">
<van-radio name="男"></van-radio>
<van-radio name="女"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field colon clearable name="maritalStatus" label="婚姻状况">
<template #input>
<van-radio-group v-model="maritalStatus" direction="horizontal">
<van-radio name="已婚">已婚</van-radio>
<van-radio name="未婚">未婚</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
colon
clearable
v-if="gender == '女'"
name="isConceive"
label="怀孕状况"
>
<template #input>
<van-radio-group v-model="isConceive" direction="horizontal">
<van-radio name="未孕">未孕</van-radio>
<van-radio name="已孕">已孕</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
colon
clearable
v-if="gender == '女' && isConceive == '已孕'"
v-model="gestationalWeeks"
name="gestationalWeeks"
label="怀孕周期"
placeholder="怀孕周期"
type="number"
:rules="[
{
required: gender == '女' && isConceive == '已孕' ? true : false,
message: '请填写怀孕周期',
},
]"
>
<template #extra></template>
</van-field>
<van-field
colon
clearable
v-model="occupation"
name="occupation"
label="职业"
placeholder="职业"
:rules="[{ required: true, message: '请填写职业' }]"
></van-field>
<van-field
colon
clearable
v-model="contactInformation"
name="contactInformation"
label="联系方式"
placeholder="联系方式"
:rules="[{ required: true, message: '请填写联系方式' }]"
></van-field>
<!-- -->
<van-field
colon
clearable
readonly
clickable
name="province"
:value="province"
label="户籍地(省)"
v-show="false"
/>
<van-field
colon
clearable
readonly
clickable
name="city"
:value="city"
label="户籍地(市)"
v-show="false"
/>
<van-field
colon
clearable
readonly
clickable
name="Registeredresidence"
:value="Registeredresidence"
label="户籍地"
placeholder="点击选择户籍地"
@click="showArea = true"
:rules="[{ required: true, message: '请点击选择户籍地' }]"
/>
<van-popup v-model="showArea" position="bottom">
<van-area
:area-list="areaList"
:columns-num="2"
@confirm="onConfirm"
@cancel="showArea = false"
/>
</van-popup>
<van-field
colon
clearable
autosize
type="textarea"
v-model="address"
name="address"
label="详细住址"
placeholder="详细住址"
:rules="[{ required: true, message: '请填写详细住址' }]"
></van-field>
<!-- 有无商业保险 -->
<van-field colon clearable name="insurance" label="商业保险">
<template #input>
<van-radio-group v-model="insurance" direction="horizontal">
<van-radio name="有"></van-radio>
<van-radio name="无"></van-radio>
</van-radio-group>
</template>
</van-field>
</div>
</template>
<script>
import { mapState, mapMutations } from "vuex";
import { areaList } from "@vant/area-data";
import { formatDate } from "../utils/common.js";
export default {
name: "page4",
data() {
return {
patientName: "", //患者姓名
age: "", //年龄
gender: "男", //性别
maritalStatus: "未婚", //婚姻状况
birthday: "", //出生日期
isConceive: "未孕", //怀孕状况
gestationalWeeks: "", //怀孕周期
occupation: "", //职业
contactInformation: "", //联系方式
Registeredresidence: "", //籍贯 (包括省市)
province: "", //籍贯 (省)
city: "", //籍贯 (市)
address: "", //地址
idCard: "", //身份证号
insurance: "有", //商业保险
areaList, //地址数据选项列表
showArea: false, //控制地址弹窗
showbirthday: false, //核酸时间弹窗
minbirthday: new Date(1920, 0, 1),
maxDate: new Date(),
};
},
mounted() {},
methods: {
onConfirm(values) {
console.log(values);
this.Registeredresidence = values
.filter((item) => !!item)
.map((item) => item.name)
.join("/");
this.province = values[0].name;
this.city = values[1].name;
this.showArea = false;
},
validator(val) {
const card15 = /^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$/;
const card18 = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
return card15.test(val) || card18.test(val);
},
getdate() {
let obj = this.getInfo(this.idCard);
if (this.validator(this.idCard)) {
this.age = obj.age;
this.birthday = obj.birth;
this.gender = obj.sex == 1 ? "男" : "女";
}
},
//根据身份证号码获取出生年月 年龄 性别
getInfo(idCard) {
let sex = null;
let birth = null;
let myDate = new Date();
let month = myDate.getMonth() + 1;
let day = myDate.getDate();
let age = 0;
if (idCard.length === 18) {
age = myDate.getFullYear() - idCard.substring(6, 10) - 1;
sex = idCard.substring(16, 17);
birth =
idCard.substring(6, 10) +
"-" +
idCard.substring(10, 12) +
"-" +
idCard.substring(12, 14);
if (
idCard.substring(10, 12) < month ||
(idCard.substring(10, 12) === month &&
idCard.substring(12, 14) <= day)
)
age++;
}
if (idCard.length === 15) {
age = myDate.getFullYear() - idCard.substring(6, 8) - 1901;
sex = idCard.substring(13, 14);
birth =
"19" +
idCard.substring(6, 8) +
"-" +
idCard.substring(8, 10) +
"-" +
idCard.substring(10, 12);
if (
idCard.substring(8, 10) < month ||
(idCard.substring(8, 10) === month && idCard.substring(10, 12) <= day)
)
age++;
}
if (sex % 2 === 0) sex = 0;
// 性别代码 1代表男,0代表女,暂时不涉及其他类型性别
else sex = 1;
return {
age,
sex,
birth,
};
},
onbirthday(date) {
this.birthday = formatDate(date, "yyyy-MM-dd ");
this.getdate();
this.showbirthday = false;
},
formatter(type, val) {
if (type === "year") {
return `${val}年`;
}
if (type === "month") {
return `${val}月`;
} else if (type === "day") {
return `${val}日`;
} else if (type === "hour") {
return `${val}时`;
} else if (type === "minute") {
return `${val}分`;
}
return val;
},
},
computed: {},
};
</script>
<style lang="scss" scoped>
.page4 {
}
</style>
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-19 17:25:44
* @Description:
-->
<template>
<div class="page5">
<van-field
colon
clearable
name="purpose"
label="来沪目的"
label-width="125px"
>
<template #input>
<van-radio-group v-model="purpose">
<van-cell-group>
<van-cell :key="index" v-for="(item, index) in purposeList">
<van-radio :name="item"> {{ item }}</van-radio>
</van-cell>
</van-cell-group>
</van-radio-group>
</template>
</van-field>
<van-field
colon
clearable
v-model="LeaveShangHai"
name="LeaveShangHai"
label="未出上海天数"
label-width="125px"
placeholder="多少天未出上海"
type="digit"
:rules="[{ required: true, message: '请填写多少天未出上海' }]"
>
<template #extra></template></van-field
>
<van-field
colon
clearable
readonly
clickable
name="unusualDate"
:value="unusualDate"
label="核酸检测异常时间"
label-width="125px"
placeholder="点击选择核酸检测异常时间"
@click="showUnusualDate = true"
:rules="[{ required: true, message: '请选择核酸检测异常时间' }]"
/>
<van-popup v-model="showUnusualDate" position="bottom">
<van-datetime-picker
type="date"
:min-date="minUnusualDate"
:max-date="maxDate"
@confirm="onUnusualDate"
@cancel="showUnusualDate = false"
:formatter="formatter"
/>
</van-popup>
<van-field
colon
clearable
readonly
clickable
name="normalDate"
:value="normalDate"
label-width="125px"
label="未发生异常时间"
placeholder="点击选择未发生异常时间"
@click="showNormalDate = true"
:rules="[{ required: true, message: '请选择未发生异常时间' }]"
/>
<van-popup v-model="showNormalDate" position="bottom">
<van-datetime-picker
type="date"
:min-date="minNormalDate"
:max-date="maxDate"
@confirm="onNormalDate"
@cancel="showNormalDate = false"
:formatter="formatter"
/>
</van-popup>
<van-field
colon
clearable
readonly
clickable
label-width="125px"
name="inHospitalDate"
:value="inHospitalDate"
label="120转运时间"
placeholder="点击选择120转运时间"
@click="showInHospitalDate = true"
:rules="[{ required: true, message: '请选择120转运时间' }]"
/>
<van-popup v-model="showInHospitalDate" position="bottom">
<van-datetime-picker
type="date"
:min-date="minInHospitalDate"
:max-date="maxDate"
@confirm="onInHospitalDate"
@cancel="showInHospitalDate = false"
:formatter="formatter"
/>
</van-popup>
<van-field
colon
clearable
name="HasSymptom"
label-width="125px"
label="有无症状"
@click="HasSymptomChange"
>
<template #input>
<van-radio-group v-model="HasSymptom" direction="horizontal">
<van-radio name="是"></van-radio>
<van-radio name="否"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
colon
clearable
v-if="HasSymptom == '是'"
name="symptom"
label="症状"
label-width="125px"
:rules="[
{
required: HasSymptom == '是' ? true : false,
message: '请选择症状',
},
]"
>
<template #input>
<van-checkbox-group v-model="symptom">
<van-cell-group>
<van-cell :key="index" v-for="(item, index) in symptomList">
<van-checkbox :name="item.element" shape="square">
{{ item.element }}</van-checkbox
>
</van-cell>
</van-cell-group>
</van-checkbox-group>
</template>
</van-field>
<van-field
colon
clearable
v-model="covidVaccine"
name="covidVaccine"
label="接种针数"
placeholder="接种针数"
label-width="125px"
type="number"
:rules="[{ required: true, message: '请填写接种针数' }]"
></van-field>
<van-field
v-if="covidVaccine > 0"
colon
clearable
name="vaccineType"
label-width="125px"
label="疫苗公司"
>
<template #input>
<van-radio-group v-model="vaccineType" direction="horizontal">
<van-cell-group>
<van-cell :key="index" v-for="(item, index) in vaccineTypeList">
<van-radio :name="item.element">{{ item.element }}</van-radio>
</van-cell>
</van-cell-group>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="covidVaccine > 0"
colon
clearable
readonly
clickable
name="vaccineDate"
:value="vaccineDate"
label="最后一次接种日期"
label-width="125px"
placeholder="点击选择最后一次接种日期"
@click="showVaccineDate = true"
:rules="[
{
required: covidVaccine > 0 ? true : false,
message: '请选择最后一次接种日期',
},
]"
/>,
<van-popup v-model="showVaccineDate" position="bottom">
<van-datetime-picker
type="date"
:min-date="minVaccineDate"
:max-date="maxDate"
@confirm="onVaccineDate"
@cancel="showVaccineDate = false"
:formatter="formatter"
/>
</van-popup>
</div>
</template>
<script>
import { mapState, mapMutations } from "vuex";
import { formatDate } from "../utils/common.js";
export default {
inject: ["setLoading"],
name: "page5",
data() {
return {
purpose: "学习", // 来沪目的
LeaveShangHai: "", //多少天未出上海
unusualDate: "", //核酸检测异常时间
normalDate: "", //未发生异常时间
inHospitalDate: "", //120转运时间
HasSymptom: "是", //有无症状
symptom: [], //患者症状
covidVaccine: 0, //接种针数
vaccineType: "", //疫苗公司
vaccineDate: "", //最后一次接种日期
vaccineTypeList: [],
symptomList: [],
showNormalDate: false, //未发生异常时间弹窗
showUnusualDate: false, //核酸时间弹窗
showInHospitalDate: false, //120时间弹窗
showVaccineDate: false, //120时间弹窗
purposeList: ["学习", "工作", "旅游", "商务", "其他"],
minNormalDate: new Date(2021, 0, 1),
minUnusualDate: new Date(2021, 0, 1),
minInHospitalDate: new Date(2021, 0, 1),
minVaccineDate: new Date(2020, 0, 1),
maxDate: new Date(),
};
},
mounted() {
this.getResource();
},
methods: {
getResource() {
this.setLoading(true);
this.$http.get(`/Research/Resource`, {}).then((data) => {
this.symptomList = data.filter((item) => {
return item.category == "症状";
});
this.vaccineTypeList = data.filter((item) => {
return item.category == "新冠疫苗种类";
});
this.setLoading(false);
});
},
HasSymptomChange() {
if (this.HasSymptom == "否") {
this.symptom = [];
}
},
formatter(type, val) {
if (type === "year") {
return `${val}年`;
}
if (type === "month") {
return `${val}月`;
} else if (type === "day") {
return `${val}日`;
} else if (type === "hour") {
return `${val}时`;
} else if (type === "minute") {
return `${val}分`;
}
return val;
},
onNormalDate(date) {
this.normalDate = formatDate(date, "yyyy-MM-dd ");
this.showNormalDate = false;
},
onUnusualDate(date) {
this.unusualDate = formatDate(date, "yyyy-MM-dd");
this.showUnusualDate = false;
},
onInHospitalDate(date) {
this.inHospitalDate = formatDate(date, "yyyy-MM-dd ");
this.showInHospitalDate = false;
},
onVaccineDate(date) {
this.vaccineDate = formatDate(date, "yyyy-MM-dd");
this.showVaccineDate = false;
},
},
computed: {},
};
</script>
<style lang="scss" scoped>
.page5 {
}
</style>
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-19 17:37:46
* @Description:
-->
<template>
<div class="page6">
<van-field
colon
clearable
name="hasHistoryAllergies"
label-width="125px"
label="过敏史"
>
<template #input>
<van-radio-group v-model="hasHistoryAllergies" direction="horizontal">
<van-radio name="有"></van-radio>
<van-radio name="无"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="hasHistoryAllergies == '有'"
colon
clearable
label-width="125px"
v-model="historyAllergies"
name="historyAllergies"
label="过敏原"
placeholder="过敏原"
:rules="[
{
required: hasHistoryAllergies == '有' ? true : false,
message: '请填写过敏原',
},
]"
></van-field>
<van-field
colon
clearable
name="hasHistorySurgery"
label-width="125px"
label="手术史"
>
<template #input>
<van-radio-group v-model="hasHistorySurgery" direction="horizontal">
<van-radio name="有"></van-radio>
<van-radio name="无"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="hasHistorySurgery == '有'"
colon
clearable
label-width="125px"
v-model="historySurgery"
name="historySurgery"
label="手术史具体内容"
placeholder="具体内容"
:rules="[
{
required: hasHistorySurgery == '有' ? true : false,
message: '请填写手术史具体内容',
},
]"
></van-field>
<van-field
colon
clearable
name="HasPreviousHistory"
label-width="125px"
label="有无既往史"
>
<template #input>
<van-radio-group v-model="HasPreviousHistory" direction="horizontal">
<van-radio name="是"></van-radio>
<van-radio name="否"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
colon
clearable
name="previousHistory"
label-width="125px"
label="既往史"
v-if="HasPreviousHistory != '否'"
:rules="[
{
required: HasPreviousHistory != '否' ? true : false,
message: '请选择既往史',
},
]"
>
<template #input>
<van-checkbox-group v-model="previousHistory">
<van-cell-group>
<van-cell v-for="(item, index) in previousHistoryList" :key="index">
<van-checkbox :name="item.element" shape="square">{{
item.element
}}</van-checkbox>
</van-cell>
</van-cell-group>
</van-checkbox-group>
</template>
</van-field>
<van-field
colon
clearable
readonly
clickable
label-width="125px"
v-if="HasPreviousHistory != '否'"
:rules="[
{
required: HasPreviousHistory != '否' ? true : false,
message: '请选择既往史发生时间',
},
]"
name="tuberculosisDate"
:value="tuberculosisDate"
label="既往史发生时间"
placeholder="点击选择既往史发生时间"
@click="showPicker = true"
/>
<van-popup v-model="showPicker" position="bottom">
<van-datetime-picker
:min-date="minDate"
:max-date="maxDate"
type="date"
@confirm="onConfirm"
@cancel="showPicker = false"
:formatter="formatter"
/>
</van-popup>
<van-field
colon
clearable
name="ChestCT"
label-width="125px"
label="有无新冠肺炎CT"
>
<template #input>
<van-radio-group v-model="ChestCT" direction="horizontal">
<van-radio name="是"></van-radio>
<van-radio name="否"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="ChestCT == '是'"
colon
clearable
readonly
clickable
name="ChestCTDate"
:value="ChestCTDate"
label="发生时间"
label-width="125px"
placeholder="点击选择新冠肺炎CT拍照时间"
@click="showCalendar = true"
:rules="[
{
required: ChestCT == '是' ? true : false,
message: '请选择新冠肺炎CT拍照时间',
},
]"
/>
<van-popup v-model="showCalendar" position="bottom">
<van-datetime-picker
type="date"
:min-date="minChestCTDate"
:max-date="maxDate"
@confirm="onChestCT"
@cancel="showCalendar = false"
:formatter="formatter"
/>
</van-popup>
</div>
</template>
<script>
import { mapState, mapMutations } from "vuex";
import { formatDate } from "../utils/common.js";
export default {
inject: ["setLoading"],
name: "page6",
data() {
return {
hasHistoryAllergies: "有", //过敏史
historyAllergies: "", //过敏原
hasHistorySurgery: "有", //手术史
historySurgery: "", //具体内容
HasPreviousHistory: "否", //有无既往史
previousHistory: [], //既往史
tuberculosisDate: "", //既往史发生时间
ChestCT: "是", //有无CT
ChestCTDate: "", //CT拍照时间
previousHistoryList: [],
showPicker: false,
showCalendar: false,
minChestCTDate: new Date(2020, 0, 1),
minDate: new Date(2010, 0, 1),
maxDate: new Date(),
};
},
mounted() {
this.getResource();
},
methods: {
getResource() {
this.setLoading(true);
this.$http.get(`/Research/Resource`, {}).then((data) => {
this.previousHistoryList = data.filter((item) => {
return item.category == "既往史";
});
this.setLoading(false);
});
},
onConfirm(date) {
this.tuberculosisDate = formatDate(date, "yyyy-MM");
this.showPicker = false;
},
onChestCT(date) {
this.ChestCTDate = formatDate(date, "yyyy-MM-dd ");
this.showCalendar = false;
},
formatter(type, val) {
if (type === "year") {
return `${val}年`;
}
if (type === "month") {
return `${val}月`;
} else if (type === "day") {
return `${val}日`;
} else if (type === "hour") {
return `${val}时`;
} else if (type === "minute") {
return `${val}分`;
}
return val;
},
},
computed: {},
};
</script>
<style lang="scss" scoped>
.page6 {
}
</style>
<!--
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-18 20:54:30
* @Description:
-->
<template>
<div class="page7">
<div class="page7_topbg">
<span class="page7_topbg_title">
您已完成本次填写内容 ,感谢您的帮助和支持。
</span>
</div>
<div class="page7_bottom">
<van-button
native-type="button"
class="index_form_next"
@click="goback"
round
type="info"
>返回</van-button
>
</div>
</div>
</template>
<script>
import { mapState, mapMutations } from "vuex";
export default {
name: "page7",
data() {
return {};
},
mounted() {},
methods: {
goback() {
this.$store.dispatch("user/setpage", 1);
},
},
computed: {},
};
</script>
<style lang="scss" scoped>
.page7 {
width: 100%;
height: 100vh;
overflow: hidden;
background-color: #f2f2f2;
&_topbg {
background-image: url("../assets/img/page1bg.png");
width: 100%;
height: 390px;
background-size: cover;
background-position: center center;
@include flex_column;
@include align_center;
justify-content: space-evenly;
position: relative;
&_title {
font-size: 24px;
font-family: Roboto-Bold, Roboto;
font-weight: bold;
color: #000000;
line-height: 28px;
position: absolute;
bottom: 50px;
text-align: center;
margin: 20px;
}
}
&_bottom {
width: 100%;
@include flex_column;
@include align_center;
position: absolute;
bottom: 350px;
}
}
</style>
<template>
<div>
<div id="canvas" ref="canvas"></div>
<p id="clearCanvas" ref="clearCanvas">清除</p>
<p id="saveCanvas" ref="saveCanvas">保存</p>
<!-- <div class="mySign" v-show="isSign">
<img :src="signSrc" alt="" />
</div> -->
</div>
</template>
<script>
export default {
data() {
return {
isSign: false,
signSrc: "",
};
},
created() {},
mounted() {
this.lineCanvas({
el: this.$refs.canvas, //绘制canvas的父级div
clearEl: this.$refs.clearCanvas, //清除按钮
saveEl: this.$refs.saveCanvas, //保存按钮
});
},
methods: {
lineCanvas(obj) {
this.linewidth = 2;
this.color = "#000000";
this.background = "#ffffff";
for (var i in obj) {
this[i] = obj[i];
}
this.canvas = document.createElement("canvas");
this.el.appendChild(this.canvas);
this.cxt = this.canvas.getContext("2d");
this.canvas.width = this.el.clientWidth;
this.canvas.height = this.el.clientHeight;
this.cxt.fillStyle = this.background;
this.cxt.fillRect(0, 0, this.canvas.width, this.canvas.width);
this.cxt.strokeStyle = this.color;
this.cxt.lineWidth = this.linewidth;
this.cxt.lineCap = "round";
//开始绘制
this.canvas.addEventListener(
"touchstart",
function(e) {
this.cxt.beginPath();
this.cxt.moveTo(e.changedTouches[0].pageX, e.changedTouches[0].pageY);
}.bind(this),
false
);
//绘制中
this.canvas.addEventListener(
"touchmove",
function(e) {
this.cxt.lineTo(e.changedTouches[0].pageX, e.changedTouches[0].pageY);
this.cxt.stroke();
}.bind(this),
false
);
//结束绘制
// this.canvas.addEventListener(
// "touchend",
// function() {
// this.cxt.closePath();
// let imgBase64 = this.canvas.toDataURL();
// console.log(imgBase64);
// this.signSrc = imgBase64;
// this.isSign = true;
// }.bind(this),
// false
// );
//清除画布
this.clearEl.addEventListener(
"click",
function() {
this.cxt.clearRect(0, 0, this.canvas.width, this.canvas.height);
}.bind(this),
false
);
//保存图片,直接转base64
this.saveEl.addEventListener(
"click",
function() {
let imgBase64 = this.canvas.toDataURL();
console.log(imgBase64);
this.signSrc = imgBase64;
this.isSign = true;
}.bind(this),
false
);
},
},
};
</script>
<style scoped lang="scss">
#canvas {
width: 100%;
height: calc(80vh - 40px);
position: relative;
canvas {
display: block;
}
}
#clearCanvas {
width: 50%;
height: 40px;
line-height: 40px;
text-align: center;
position: absolute;
bottom: 0;
left: 0;
border: 1px solid #dedede;
z-index: 1;
}
#saveCanvas {
width: 50%;
height: 40px;
line-height: 40px;
text-align: center;
position: absolute;
bottom: 0;
right: 0;
border: 1px solid #dedede;
z-index: 1;
}
</style>
/*
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-18 18:50:47
* @Description:
*/
import Vue from 'vue'
import axios from 'axios'
import { getItem } from '@/utils/auth'
axios.defaults.timeout = 120000
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=utf-8'
var domain = '/api'
function createHeader() {
const token = getItem('token')
return token ? { 'Authorization': `Bearer ${token}` } : {}
}
function errorMsg(d) {
// if (d.data.state == 4) {
// Vue.prototype.$notify({ type: 'danger', message: '登录信息失效,重新登录!' })
// sessionStorage.clear();
// Vue.prototype.$router.push("/login").catch((err) => {
// console.log("输出报错", err);
// }); //改变路由
// }
if (Vue.prototype.$notify) {
Vue.prototype.$notify({ type: 'danger', message: d.data.message || '服务器端错误' })
} else {
alert(d ? d.data.message : '服务器端错误')
}
}
export default {
post(url, params, option) {
return new Promise((resolve, reject) => {
axios.post(domain + url, params, { ...{ headers: createHeader() }, ...option }).then(res => {
// if (res.data.state !== 1) {
// errorMsg(res);
// reject(res.data);
// return
// }
resolve(res.data.data || res.data || res);
}).catch(error => {
errorMsg(error);
reject(error)
})
})
},
get(url, option) {
return new Promise((resolve, reject) => {
axios.get(domain + url, { ...{ headers: createHeader() }, ...option }).then(res => {
// if (res.data.state !== 1) {
// errorMsg(res)
// reject(res.data)
// return
// }
resolve(res.data.data || res.data || res)
}).catch(error => {
errorMsg(error)
reject(error)
})
})
}
}
\ No newline at end of file
import Vue from 'vue'
import App from './App.vue'
import store from './store'
import router from '@/router/index'
import 'lib-flexible/flexible.js'
import http from '@/http/index'
import vueWechatTitle from 'vue-wechat-title'
import Vant from 'vant'
import 'vant/lib/index.css';
Vue.use(Vant)
// 引入echarts
import echarts from 'echarts'
Vue.prototype.$echarts = echarts
Vue.config.productionTip = false;
Vue.use(vueWechatTitle)
Vue.prototype.$http = http
import {
setSession, getSession, clearSession,
} from '@/assets/script/storageFn.js'
Vue.prototype.$setSession = setSession;
Vue.prototype.$getSession = getSession;
Vue.prototype.$clearSession = clearSession;
//日期字符串截取
Vue.prototype.$sliceDate = function (dateStr) {
return typeof dateStr == 'string' ? dateStr.slice(0, 10) : "";
}
//键名
Vue.prototype.$keyName = function (id) { //键名
return 'key' + id;
}
//表单名
Vue.prototype.$formName = function (id) { //表单名
return 'form' + id;
}
//字符串转数组(2,4 => ['2','4'])
Vue.prototype.$string2Arr = function (str) {
str = str.replace(/,/g, "','");
return eval("['" + str + "']");
}
// 计算相差天数
Vue.prototype.$DateMinus = function (inDate, outDate) {
let indate = new Date(inDate.replace(/-/g, "/"));
let outdate = new Date(outDate.replace(/-/g, "/"));
let days = outdate.getTime() - indate.getTime();
let day = parseInt(days / (1000 * 60 * 60 * 24));
return day;
},
// 提取富文本 文本内容
Vue.prototype.$getExecStrs = function (html) {
if (html != null) {
var re1 = new RegExp("<.+?>", "g");//匹配html标签的正则表达式,"g"是搜索匹配多个符合的内容
var msg = html.replace(re1, '').replace(/&nbsp;/ig, "");//执行替换成空字符
return msg;
}
}
//判断字符是否为空的方法
Vue.prototype.$isEmpty = function isEmpty(obj) {
if (typeof obj == "undefined" || obj == null || obj == "") {
return false;
} else {
return true;
}
}
//数字string串转number
Vue.prototype.$string2Num = function (val) {
let int_reg = new RegExp("^-?\\d+$"); //整数
let float_reg = new RegExp("^[-+]?[0-9]+(\\.[0-9]+)?$"); //正负整数或小数
if (int_reg.test(val)) {
return parseInt(val);
} else if (float_reg.test(val)) {
return parseFloat(val);
} else {
return val;
}
}
//对象深拷贝
Vue.prototype.$deepCopy = function (data) {
try {
return JSON.parse(JSON.stringify(data));
} catch (error) {
return data;
}
}
new Vue({
router,
store,
render: h => h(App),
}).$mount('#app')
/*
* @Author: ninglupeng
* @Date: 2022-03-17 15:06:50
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-17 15:13:28
* @Description:
*/
import Vue from 'vue'
import Router from 'vue-router'
import store from '@/store'
//处理 路由中点击路径重复
const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(error => error)
}
Vue.use(Router)
// const whiteList = ['/login'] // 路由白名单 , 无token也可进入
const router = new Router({
routes: [
{
path: '/',
name: 'index',
redirect: 'index',
component: () => import('@/components/index'),
},
{
path: "/index",
name: 'index',
component: () => import('@/components/index')
},
// {
// path: '/login',
// name: 'login',
// component: () => import('@/components/login/login')
// },
]
})
router.beforeEach(async (to, from, next) => {
// const hasToken = getItem('token');
// // 让页面回到顶部
// document.documentElement.scrollTop = 0
// if (hasToken) {
// if (to.path === '/login') {
// next({ path: '/' })
// } else {
// const hasGetUserInfo = store.getters.token
// if (hasGetUserInfo) {
next()
// } else {
// try {
// // await store.dispatch('user/getInfo')
// await store.dispatch('user/setToken') // 刷新后token重新赋值
// next()
// } catch (error) {
// await store.dispatch('user/resetToken')
// next(`/login?redirect=${encodeURIComponent(to.fullPath)}`)
// }
// }
// }
// } else {
// if (whiteList.indexOf(to.path) !== -1) {
// next()
// } else {
// next(`/login?redirect=${to.path}`)
// }
// }
})
export default router;
\ No newline at end of file
/*
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-17 14:58:41
* @Description:
*/
const getters = {
token: state => state.user.token,
name: state => state.user.name,
userInfo: state => state.user.userInfo,
}
export default getters
/*
* @Author: ninglupeng
* @Date: 2020-11-24 16:18:58
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-17 14:58:46
* @Description:
*/
import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import getters from './getters'
Vue.use(Vuex)
const store = new Vuex.Store({
modules: {
user,
},
getters
})
export default store;
\ No newline at end of file
/*
* @Author: ninglupeng
* @Date: 2022-03-17 15:06:50
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-19 17:49:47
* @Description:
*/
import http from '@/http/index'
import { getItem, setItem, removeItem, clear } from '@/utils/auth'
// import { resetRouter } from '@/router'
const state = {
token: '',
name: '',
userInfo: {},
page: 1,
}
const mutations = {
SET_TOKEN: (state, token) => {
state.token = token
},
SET_NAME: (state, name) => {
state.name = name
},
SET_USERINFO: (state, userInfo) => {
state.userInfo = userInfo
},
SET_PAGE: (state, pageindex) => {
state.page = pageindex
},
}
const actions = {
// user login
login({ commit, dispatch }, userInfo) {
return new Promise((resolve, reject) => {
http.post('/Account/login', userInfo, {}).then(response => {
const data = response
setItem('token', data.access_token)
commit('SET_TOKEN', data.access_token)
dispatch('getInfo')
resolve(data)
}).catch(error => {
console.log("login -> error", error)
reject(error)
})
})
},
// get user info
getInfo({ commit, state }) {
return new Promise((resolve, reject) => {
http.post('/Account/selfinfo', state.token).then(response => {
let data = response
if (!data) {
reject('验证失败,请重新登录。')
}
commit('SET_NAME', data.realname)
setItem('user_name', data.realname)
commit('SET_USERINFO', data)
setItem('user_info', JSON.stringify(data))
resolve(data)
}).catch(error => {
reject(error)
})
})
},
setToken({ commit, state }) {
commit('SET_TOKEN', getItem('token'))
},
// remove token
resetToken({ commit }) {
return new Promise(resolve => {
commit('SET_TOKEN', '')
removeItem('token')
resolve()
})
},
setpage({ commit, state }, pageindex) {
commit('SET_PAGE', pageindex)
},
}
export default {
namespaced: true,
state,
mutations,
actions
}
\ No newline at end of file
import sessionstorage from 'sessionstorage'
export function getItem(key) {
return sessionstorage.getItem(key)
}
export function setItem(key,value) {
return sessionstorage.setItem(key, value)
}
export function removeItem(key) {
return sessionstorage.remove(key)
}
export function clear() {
return sessionstorage.clear()
}
\ No newline at end of file
/*
* @Author: ninglupeng
* @Date: 2022-03-17 15:06:50
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-18 17:53:24
* @Description:
*/
/**
* 加载js
* @param url url参数
* @param callback 回调函数
* loadJs($MODAL_URL + "js/SPE.min.js", function () {});
*/
export function loadJs(url, callback) {
var script = document.createElement('script');
script.type = "text/javascript";
if (typeof (callback) != "undefined") {
if (script.readyState) {
script.onreadystatechange = function () {
if (script.readyState == "loaded" || script.readyState == "complete") {
script.onreadystatechange = null;
callback();
}
}
} else {
script.onload = function () {
callback();
}
}
}
script.src = url;
document.body.appendChild(script);
}
export function formatDate(date, format) {
let time = {
"M+": date.getMonth() + 1,
"d+": date.getDate(),
"h+": date.getHours(),
"m+": date.getMinutes(),
"s+": date.getSeconds(),
"q+": Math.floor((date.getMonth() + 3) / 3),
"S+": date.getMilliseconds(),
};
if (/(y+)/i.test(format)) {
format = format.replace(
RegExp.$1,
(date.getFullYear() + "").substr(4 - RegExp.$1.length)
);
}
for (let key in time) {
if (new RegExp("(" + key + ")").test(format)) {
format = format.replace(
RegExp.$1,
RegExp.$1.length === 1
? time[key]
: ("00" + time[key]).substr(("" + time[key]).length)
);
}
}
return format;
}
/*
* @Author: ninglupeng
* @Date: 2022-03-17 15:06:50
* @LastEditors: ninglupeng
* @LastEditTime: 2022-03-18 21:54:52
* @Description:
*/
const path = require('path');
var assetsDir = 'web';
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
productionSourceMap: false,
publicPath: "./", //导出路径
assetsDir: assetsDir, //静态资源文件夹
// pluginOptions: {
// 'style-resources-loader': {
// preProcessor: 'scss',
// patterns: [
// // 这里假设你有 `src/variables.scss src/scss/mixin.scss` 这两个文件
// path.resolve(__dirname,""),
// path.resolve(__dirname,"./src/scss/mixin.scss")
// ]
// }
// },
configureWebpack: {
resolve: {
alias: {
'@': resolve('src')
}
}
},
css: {
loaderOptions: {
sass: {
data: `
@import "@/assets/scss/mixin.scss";
`
},
stylus: {
'resolve url': true,
'import': [
''
]
}
},
extract: true,
sourceMap: false,
modules: false
},
lintOnSave: false, //取消eslint
devServer: { //测试环境代理
port: 8032, //测试端口
proxy: {
'/api': {
target: 'http://flowtone.suvalue.com/',
ws: true, //如果要代理 websockets,配置这个参数
// secure: false, // 如果是https接口,需要配置这个参数
changeOrigin: true,
pathRewrite: {
'^/': '/'
}
}
}
},
}
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment