Browse Source

后台同步筛查

newMaster
1747191978@qq.com 3 months ago
parent
commit
89823432be
  1. 77
      acupuncture-后台/src/api/screening.js
  2. 758
      acupuncture-后台/src/views/screening/h5.vue
  3. 362
      acupuncture-后台/src/views/screening/index.vue
  4. 375
      acupuncture-后台/src/views/screening/qrCode.vue

77
acupuncture-后台/src/api/screening.js

@ -0,0 +1,77 @@
import request from "@/utils/request";
// ------ 筛查上报相关接口 ------
// 通过组织id查询医院信息
export function queryHospitalNoToken(data) {
return request({
url: "admin/web/queryTenantById",
method: "post",
data: data,
});
}
// 创建筛查
export function create(data) {
return request({
url: "admin/screening/createNoToken",
method: "post",
data: data,
});
}
// 通过code提交数据
export function screenSave(data) {
return request({
url: "admin/screening/save",
method: "post",
data: data,
});
}
// 提交筛查上报数据
export function screenSubmit(data) {
return request({
url: "admin/screening/submitNoToken",
method: "post",
data: data,
});
}
// ------ 筛查二维码相关接口 ------
// 筛查二维码 列表
export function queryScreenList(data) {
return request({
url: "admin/wxQrCode/queryScreenList",
method: "post",
data: data,
});
}
// 添加筛查二维码
export function addScreen(data) {
return request({
url: "admin/wxQrCode/addScreen",
method: "post",
data: data,
});
}
// 删除筛查二维码
export function deleteScreen(data) {
return request({
url: "admin/wxQrCode/deleteScreen",
method: "post",
data: data,
});
}
// // 导出二维码
export function exportQr(data) {
return request({
url: "admin/wxQrCode/exportScreen",
method: "post",
data: data,
});
}
// ------ 筛查列表 ------
export function queryDetail(data) {
return request({
url: "admin/screening/queryDetail",
method: "post",
data: data,
});
}

758
acupuncture-后台/src/views/screening/h5.vue

@ -0,0 +1,758 @@
<template>
<div class="app-container" v-loading="loading">
<div class="hospital">{{ tenantName || "- - - -" }}</div>
<el-form
v-if="stepNum == 1"
:rules="rules"
ref="form"
:model="form"
label-width="110px"
>
<!-- 姓名性别单选出生日期年龄联系方式 -->
<div class="card">
<div class="card-title">基本信息</div>
<div>
<!-- <el-upload
name="file"
accept=".img,.png,.jpg"
:action="uploadFileUrl"
list-type="picture-card"
class="idcardupd"
:show-file-list="false"
:on-success="changeFile"
:on-change="uploader"
:on-progress="handleProgress"
>
<div slot="trigger" class="idcardupd-but">
<img
src="@/assets/images/idcard.png"
class="img-icon"
style="margin-right: 5px"
/>
<span>扫描身份证</span>
</div>
</el-upload> -->
<el-form-item label="姓名" prop="SCWJ-NAME">
<el-input
v-model="form['SCWJ-NAME']"
placeholder="请输入姓名"
></el-input>
</el-form-item>
<el-form-item label="性别" prop="SCWJ-SEX">
<el-radio-group v-model="form['SCWJ-SEX']">
<el-radio label="男"></el-radio>
<el-radio label="女"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="出生日期" prop="SCWJ-BIRTH">
<el-date-picker
v-model="form['SCWJ-BIRTH']"
type="date"
placeholder="选择日期"
@change="calculateAge"
>
</el-date-picker>
</el-form-item>
<el-form-item label="年龄" prop="SCWJ-AGE">
<el-input
v-model="form['SCWJ-AGE']"
type="number"
placeholder="请输入年龄"
></el-input>
</el-form-item>
<el-form-item label="联系方式" prop="SCWJ-PHONE">
<el-input
v-model="form['SCWJ-PHONE']"
type="number"
placeholder="请输入联系方式"
></el-input>
</el-form-item>
</div>
</div>
<!-- 身高体重BMI -->
<div class="card">
<div class="card-title">体重自评</div>
<el-form-item label="身高cm" prop="SCWJ-HEIGHT">
<el-input
@blur="calculateBMI"
v-model="form['SCWJ-HEIGHT']"
type="number"
placeholder="请输入身高"
></el-input>
</el-form-item>
<el-form-item label="体重kg" prop="SCWJ-WEIGHT">
<el-input
@blur="calculateBMI"
v-model="form['SCWJ-WEIGHT']"
type="number"
placeholder="请输入体重"
></el-input>
</el-form-item>
<el-form-item label="BMI" prop="SCWJ-BMI">
<el-input
:disabled="true"
v-model="form['SCWJ-BMI']"
type="number"
placeholder="BMI"
></el-input>
</el-form-item>
<el-form-item label="结论" prop="SCWJ-JL">
<span :class="`BIMTips${BMIVerdict[form['SCWJ-JL']]}`">
{{ form["SCWJ-JL"] || "- - -" }}</span
>
</el-form-item>
</div>
</el-form>
<div v-if="stepNum == 2">
<div class="card">
<div class="card-title">失眠自评SRSS</div>
<div
class="item-container"
v-for="(item, index) in scaleList"
:key="index"
>
<div class="item-title">{{ index + 1 }}. {{ item.question }}</div>
<div class="item-radio-box">
<el-radio-group v-model="form[`topic${index + 1}`]">
<el-radio
class="item-radio"
v-for="(criteria, index) in item.options"
:key="index"
:label="criteria.score"
>{{ criteria.label }}
</el-radio>
</el-radio-group>
</div>
</div>
<div class="card-tips">
SRSS共有10个项目每个项目分5级评分1~5总分为每个项目得分之和评分愈高说明睡眠问题愈严重此量表最低分为10分基本无睡眠问题最高分为50分最严重
</div>
</div>
<div class="card">
<div class="card-title">可接受的治疗方式</div>
<el-checkbox-group v-model="form['SCWJ-ZLFS']">
<el-checkbox label="饮食治疗" class="item-radio">
饮食治疗中药代饮减脂餐营养制剂
</el-checkbox>
<el-checkbox label="运动治疗" class="item-radio">
运动治疗功率踏车有氧运动跑步
</el-checkbox>
<el-checkbox label="中医治疗" class="item-radio">
中医治疗针灸拔罐埋线
</el-checkbox>
</el-checkbox-group>
</div>
<div class="card">
<div class="card-title">可接受的治疗周期</div>
<el-radio-group v-model="form['SCWJ-ZLZQ']">
<el-radio class="item-radio" :label="1">1个月</el-radio>
<el-radio class="item-radio" :label="2">2个月</el-radio>
<el-radio class="item-radio" :label="3">3个月</el-radio>
</el-radio-group>
</div>
</div>
<div class="submit-box" v-if="stepNum == 1">
<el-button type="primary" class="submit-box-but" @click="submitForm">
下一步
</el-button>
</div>
<div class="submit-box" v-if="stepNum == 2 && disabled">
<el-button type="primary" class="submit-box-but" @click="scaleSubmitForm">
提交
</el-button>
</div>
<div class="hospital1">{{ tenantName || "- - - -" }}</div>
</div>
</template>
<script>
import {
create,
screenSave,
screenSubmit,
queryHospitalNoToken,
} from "@/api/screening.js";
export default {
name: "Notice",
data() {
return {
loading: false,
disabled: true,
tenantId: "",
tenantName: "",
stepNum: 1, //
uploadFileUrl: process.env.VUE_APP_BASE_URL + "/baidu/ocr/idcardInfo", //
fileList: [],
BMITips: [
{
label: "体重过轻",
score: 18.5,
},
{
label: "正常",
score: 23.9,
},
{
label: "超重",
score: 27.9,
},
{
label: "肥胖",
score: 28,
},
],
BMIVerdict: {
体重过轻: "1",
正常: "2",
超重: "3",
肥胖: "4",
},
// 1. ?
//
// 2. ?
//
// 3., ?
// 0~5 6~12 13~18 ) 19~24 25~31
// 4. ?
// 9 7~8 5~6 3~4 1~2
// 5. ?
// 0~5 6~12 13~18 19~24 25~31
// 6. ?
// 0~5 6~12 13~18 19~24 25~31
// 7. ?
// 0~5 61~2 13~18 19~24 25~31
// 8. ?
// 0~5 61~2 13~18 19~24 25~31
// 9. , ?
// 0~5 61~2 13~18 19~24 25~31
// 10. ?
//
scaleList: [
{
question: "您觉得平时睡眠足够吗 ?",
options: [
{ label: "睡眠过多了", score: 1 },
{ label: "睡眠正好", score: 2 },
{ label: "睡眠欠一些", score: 3 },
{ label: "睡眠不够", score: 4 },
{ label: "睡眠时间远远不够", score: 5 },
],
},
{
question: "您在睡眠后是否已觉得充分休息过了 ?",
options: [
{ label: "觉得充分休息过了", score: 1 },
{ label: "觉得休息过了", score: 2 },
{ label: "觉得休息了一点", score: 3 },
{ label: "不觉得休息过了", score: 4 },
{ label: "觉得一点儿也没休息", score: 5 },
],
},
{
question: "您晚上已睡过觉,白天是否打瞌睡 ?",
options: [
{ label: "0~5 天", score: 1 },
{ label: "很少 (6~12 天)", score: 2 },
{ label: "有时 (13~18 天)", score: 3 },
{ label: "经常(19~24 天)", score: 4 },
{ label: "总是(25~31 天)", score: 5 },
],
},
{
question: "您平均每个晚上大约能睡几小时 ?",
options: [
{ label: "≥9小时", score: 1 },
{ label: "7~8 小时", score: 2 },
{ label: "5~6 小时", score: 3 },
{ label: "3~4 小时", score: 4 },
{ label: "1~2 小时", score: 5 },
],
},
{
question: "您是否有入睡困难 ?",
options: [
{ label: "0~5 天", score: 1 },
{ label: "很少 (6~12 天)", score: 2 },
{ label: "有时(13~18 天 )", score: 3 },
{ label: "经常(19~24 天)", score: 4 },
{ label: "总是(25~31 天)", score: 5 },
],
},
{
question: "您入睡后中间是否易醒 ?",
options: [
{ label: "0~5 天", score: 1 },
{ label: "很少(6~12 天)", score: 2 },
{ label: "有时(13~18 天)", score: 3 },
{ label: "经常 (19~24 天)", score: 4 },
{ label: "总是(25~31 天)", score: 5 },
],
},
{
question: "您在醒后是否难于再入睡 ?",
options: [
{ label: "0~5天", score: 1 },
{ label: "很少(6~12 天)", score: 2 },
{ label: "有时 (13~18 天)", score: 3 },
{ label: "经常 (19~24 天)", score: 4 },
{ label: "总是 (25~31 天)", score: 5 },
],
},
{
question: "您是否多梦或常被恶梦惊醒 ?",
options: [
{ label: "0~5天", score: 1 },
{ label: "很少(6~12 天)", score: 2 },
{ label: "有时 (13~18 天)", score: 3 },
{ label: "经常 (19~24 天)", score: 4 },
{ label: "总是 (25~31 天)", score: 5 },
],
},
{
question: "为了睡眠 , 您是否吃安眠药 ?",
options: [
{ label: "0~5天", score: 1 },
{ label: "很少(6~12 天)", score: 2 },
{ label: "有时 (13~18 天)", score: 3 },
{ label: "经常 (19~24 天)", score: 4 },
{ label: "总是 (25~31 天)", score: 5 },
],
},
{
question: "您失眠后心情(心境)如何 ?",
options: [
{ label: "无不适", score: 1 },
{ label: "无所谓", score: 2 },
{ label: "有时心烦、急躁", score: 3 },
{ label: "心慌、气短", score: 4 },
{ label: "乏力、没精神、做事效率低", score: 5 },
],
},
], //
form: {
"SCWJ-NAME": "",
"SCWJ-SEX": "男",
"SCWJ-BIRTH": "",
"SCWJ-AGE": "",
"SCWJ-PHONE": "",
"SCWJ-HEIGHT": "",
"SCWJ-WEIGHT": "",
"SCWJ-BMI": "",
"SCWJ-JL": "",
"SCWJ-ZLFS": [],
// "SCWJ-NAME": "2",
// "SCWJ-SEX": "",
// "SCWJ-BIRTH": "1945-01-01",
// "SCWJ-AGE": "70",
// "SCWJ-PHONE": "18534353638",
// "SCWJ-HEIGHT": "170",
// "SCWJ-WEIGHT": "80",
// "SCWJ-BMI": "24.56",
// "SCWJ-JL": "",
// "SCWJ-ZLFS": [],
},
//
rules: {
"SCWJ-NAME": [
{
required: true,
message: "姓名不能为空",
trigger: "blur",
},
],
"SCWJ-SEX": [
{
required: true,
message: "性别不能为空",
trigger: "change",
},
],
"SCWJ-BIRTH": [
{
required: true,
message: "出生日期不能为空",
trigger: "change",
},
],
"SCWJ-AGE": [
{
required: true,
message: "年龄不能为空",
trigger: "change",
},
],
"SCWJ-PHONE": [
{
required: true,
message: "联系方式不能为空",
trigger: "blur",
},
{
pattern: /^1[3456789]\d{9}$/,
message: "格式不正确",
trigger: "change",
},
],
"SCWJ-HEIGHT": [
{
required: true,
message: "身高不能为空",
trigger: "blur",
},
],
"SCWJ-WEIGHT": [
{
required: true,
message: "体重不能为空",
trigger: "blur",
},
],
"SCWJ-BMI": [
{
required: false,
message: "BMI不能为空",
trigger: "blur",
},
],
},
loading: false,
};
},
created() {
this.tenantId = this.$route.query.tenantId;
console.log("this.tenantId", this.tenantId);
this.getQueryHospitalNoToken(); // id
},
methods: {
//
calculateAge() {
const birthDate = new Date(this.form["SCWJ-BIRTH"]);
const today = new Date();
let age = today.getFullYear() - birthDate.getFullYear();
const monthDiff = today.getMonth() - birthDate.getMonth();
if (
monthDiff < 0 ||
(monthDiff === 0 && today.getDate() < birthDate.getDate())
) {
age--;
}
this.form["SCWJ-AGE"] = age;
},
// ,
async changeFile(e) {
this.loading = false;
console.log("上传身份信息: ", e);
const { code, data } = e;
console.log("data: ", data);
if (code === 200) {
this.spinning = false;
this.codeValue["SCWJ-NAME"] = data.name;
this.codeValue["SCWJ-SEX"] = data.sex;
this.codeValue["SCWJ-idCard"] = data.idcard;
this.codeValue["SCWJ-AGE"] = data.age;
await this.setValueByIdCard(data.idcard);
// await this.saveAnswer(data.name, "SCWJ-NAME");
// await this.saveAnswer(data.idcard, "SCWJ-idCard");
}
},
handleProgress() {
this.loading = true;
},
uploader(res) {
this.loading = false;
},
// id
getQueryHospitalNoToken() {
let params = {
id: this.$route.query.tenantId,
};
queryHospitalNoToken(params).then((response) => {
this.tenantName = response.data.name || "";
});
},
// BIM
calculateBMI() {
if (this.form["SCWJ-WEIGHT"] && this.form["SCWJ-HEIGHT"]) {
const weight = parseFloat(this.form["SCWJ-WEIGHT"]);
const height = parseFloat(this.form["SCWJ-HEIGHT"]);
const bmi = weight / (height / 100) ** 2;
this.form["SCWJ-BMI"] = bmi.toFixed(2);
this.getBMITips(bmi);
}
},
// BIM
// <18.5
// 18.5~23.9
// 24~27.9
// 28
getBMITips(bmi) {
let tips = "";
if (bmi < 18.5) {
tips = "体重过轻";
}
if (bmi >= 18.5 && bmi < 23.9) {
tips = "正常";
}
if (bmi >= 24 && bmi < 27.9) {
tips = "超重";
}
if (bmi >= 28) {
tips = "肥胖";
}
this.form["SCWJ-JL"] = tips;
},
// - pdg
handleUploadPdfAdd1(res) {
if (res.code == 200) {
this.importOpen = false;
this.getList();
this.$modal.msgSuccess("导入成功");
} else {
this.$message.error(res.msg || "导入失败");
this.fileList = [];
}
},
// -
handleBeforeUpload1(file) {
const isLt2M = file.size / 1024 / 1024 < 100;
//
if (!isLt2M) {
this.$message.error("上传文件大小不能超过 100MB!");
}
return isLt2M;
},
// -
handleBeforePdfUpload1(file) {
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1);
const whiteList = ["xlsx", "xls"];
if (whiteList.indexOf(fileSuffix) === -1) {
this.$message.error("上传文件只能是.xlsx, .xls");
return false;
}
},
/** 查询公告列表 */
getList() {
this.loading = true;
queryPatient(this.queryParams).then((res) => {
this.listDat = res.data.list;
this.total = res.data.total;
this.loading = false;
});
},
/** 基本信息 */
submitForm: function () {
this.$refs["form"].validate(async (valid) => {
if (valid) {
//
window.scrollTo(0, 0);
this.stepNum++;
}
});
},
//
async scaleSubmitForm() {
try {
// ------ ------
let score = 0;
// , topic${i}
for (let i = 1; i <= 24; i++) {
if (this.form[`topic${i}`] !== undefined) {
score += this.form[`topic${i}`];
}
}
// ------ ------
const params = {
param: {
type: 33,
tenantId: this.tenantId,
centerId: this.tenantId,
},
};
create(params).then(async (res) => {
this.loading = true;
this.detailId = res.data.detailId;
this.id = res.data.id;
// ------ ------
//
await this.saveAnswer(this.form["SCWJ-NAME"], "SCWJ-NAME");
await this.saveAnswer(this.form["SCWJ-SEX"], "SCWJ-SEX");
await this.saveAnswer(this.form["SCWJ-BIRTH"], "SCWJ-BIRTH");
await this.saveAnswer(this.form["SCWJ-AGE"], "SCWJ-AGE");
await this.saveAnswer(this.form["SCWJ-PHONE"], "SCWJ-PHONE");
await this.saveAnswer(this.form["SCWJ-HEIGHT"], "SCWJ-HEIGHT");
await this.saveAnswer(this.form["SCWJ-WEIGHT"], "SCWJ-WEIGHT");
await this.saveAnswer(this.form["SCWJ-BMI"], "SCWJ-BMI");
await this.saveAnswer(this.form["SCWJ-JL"], "SCWJ-JL");
//
await this.saveAnswer(score, "SCWJ-RESULT");
await this.saveAnswer(this.form["SCWJ-ZLFS"].toString(), "SCWJ-ZLFS"); //
await this.saveAnswer(this.form["SCWJ-ZLZQ"], "SCWJ-ZLZQ"); //
// ------ ------
const submitParams = { param: { detailId: this.detailId } };
await screenSubmit(submitParams).then((response) => {
this.loading = false;
this.disabled = false;
this.$modal.msgSuccess("提交成功");
});
});
} catch (error) {
this.loading = false;
this.disabled = false;
console.log("提交失败:", error);
this.$message.error("提交失败,请稍后重试!");
}
},
//
async saveAnswer(value, str) {
try {
const params = {
param: {
answer: value,
code: str,
detailId: this.detailId,
},
};
await screenSave(params).then((response) => {});
} catch (error) {
this.loading = false;
this.disabled = false;
console.log("保存失败:", error);
this.$message.error("保存失败,请稍后重试!");
}
},
},
};
</script>
<style scoped src="@/assets/styles/common.css"></style>
<style scoped>
.idcardupd {
height: 44px;
margin-bottom: 14px;
}
.idcardupd-but {
height: 44px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}
.idcardupd-but span {
padding-top: 1px;
}
.idcardupd-but img {
width: 20px;
height: 20px;
}
.idcardupd >>> .el-upload {
height: 44px;
border: none;
background: #c6a268;
}
.hospital1 {
text-align: center;
font-size: 14px;
color: #999;
}
.hospital {
background: #fff;
font-size: 20px;
color: #70483e;
line-height: 50px;
font-weight: 600;
margin-bottom: 10px;
border-radius: 6px;
text-align: center;
}
.BIMTips1 {
color: #cccccc;
}
.BIMTips2 {
color: #66cc00;
}
.BIMTips3 {
color: #c3c300;
}
.BIMTips4 {
color: #ff9900;
}
.item-radio {
display: block;
margin-bottom: 10px;
}
.item-title {
font-size: 18px;
font-weight: bold;
color: #3d3d3d;
line-height: 26px;
}
.item-radio-box {
margin: 16px 0px;
}
>>> .el-radio__label {
font-size: 16px;
color: #555555;
line-height: 20px;
}
.submit-box {
display: flex;
justify-content: center;
align-items: center;
}
.submit-box .submit-box-but {
background: #c6a268;
width: 100%;
font-size: 16px;
margin-bottom: 10px;
}
.card {
padding: 16px;
background: #fff;
border-radius: 6px;
margin-bottom: 14px;
}
.card-title {
font-weight: 600;
font-size: 20px;
margin-bottom: 16px;
}
.card-tips {
font-size: 14px;
color: #999999;
}
/* */
.app-container {
/* background: linear-gradient(to bottom, #70483e, #f7f8fa); */
background: #70483e;
min-height: 100vh;
}
>>> .el-input__inner {
border: none;
border-bottom: 1px solid #dcdfe6;
border-radius: 0;
}
>>> .el-date-editor.el-input {
width: 100% !important;
}
>>> .el-form-item--medium .el-form-item__label {
padding-right: 30px;
}
>>> .el-radio input[aria-hidden="true"] {
display: none !important;
}
>>> .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled)
.el-radio__inner {
box-shadow: none !important;
}
</style>
<!-- >>> .el-input__inner {
padding: 0 15px !important;
} -->

362
acupuncture-后台/src/views/screening/index.vue

@ -0,0 +1,362 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="" prop="noticeTitle">
<el-input
style="width: 300px"
v-model="queryParams.param.keywords"
placeholder="支持姓名、全拼、简拼、手机号码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="年龄范围" prop="createBy">
<div class="form-item-age">
<el-input
v-model="queryParams.param.startAge"
placeholder="最小年龄"
clearable
@keyup.enter.native="handleQuery"
/>
<span></span>
<el-input
v-model="queryParams.param.endAge"
placeholder="最大年龄"
clearable
@keyup.enter.native="handleQuery"
/>
</div>
</el-form-item>
<el-form-item label="建档组织" prop="tenantId">
<el-select
v-model="queryParams.param.tenantId"
placeholder="请选择"
clearable
filterable
>
<el-option
v-for="(item, index) in tenantsListData"
:label="item.name"
:value="item.id"
:key="index"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-form-item label="创建时间" prop="doctorNo">
<el-date-picker
v-model="queryTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
重置
</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="listDat"
@selection-change="handleSelectionChange"
max-height="600"
row-key="id"
>
<el-table-column
type="selection"
width="55"
align="center"
:reserve-selection="true"
/>
<el-table-column
label="姓名"
align="center"
prop="SCWJ-NAME"
min-width="100"
show-overflow-tooltip
fixed
/>
<el-table-column
label="性别"
align="center"
prop="SCWJ-SEX"
min-width="100"
/>
<el-table-column
label="出生日期"
align="center"
prop="SCWJ-BIRTH"
min-width="100"
/>
<el-table-column
label="年龄"
align="center"
prop="SCWJ-AGE"
min-width="100"
/>
<el-table-column
label="联系方式"
align="center"
prop="SCWJ-PHONE"
min-width="120"
/>
<el-table-column
label="身高cm"
align="center"
prop="SCWJ-HEIGHT"
min-width="100"
/>
<el-table-column
label="体重kg"
align="center"
prop="SCWJ-WEIGHT"
min-width="100"
/>
<el-table-column
label="BMI"
align="center"
prop="SCWJ-BMI"
min-width="100"
/>
<el-table-column
show-overflow-tooltip
label="结论"
align="center"
prop="SCWJ-JL"
min-width="150"
>
</el-table-column>
<el-table-column
label="失眠自评(SRSS)"
align="center"
prop="SCWJ-RESULT"
min-width="150"
/>
<el-table-column
label="可接受的治疗方式"
align="center"
prop="SCWJ-ZLFS"
min-width="200"
/>
<el-table-column
label="可接受的治疗周期"
align="center"
prop="SCWJ-ZLZQ"
min-width="150"
/>
<el-table-column
fixed="right"
label="创建时间"
align="center"
min-width="140"
>
<template slot-scope="scope">
<span>{{
parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}")
}}</span>
</template>
</el-table-column>
<el-table-column
label="组织"
align="center"
prop="tenantName"
min-width="150"
show-overflow-tooltip
fixed="right"
/>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { queryDetail } from "@/api/screening.js";
import { tenantsList } from "@/api/member";
export default {
name: "Notice",
dicts: ["sys_notice_status", "sys_notice_type"],
data() {
return {
queryTime: [], //
tenantsListData: [], //
loading: false, //
ids: [], //
single: true, //
multiple: true, //
showSearch: true, //
total: 0, //
listDat: [], //
//
queryParams: {
pageNum: 1,
pageSize: 10,
param: {
keywords: "", //
startAge: "", //
endAge: "", //
tenantId: "", //
createBy: "", //
sourceId: "", //
},
},
};
},
created() {
// this.getLastWeekDays(); //
this.getList(); //
this.getTenantsList(); //
},
methods: {
//
getLastWeekDays() {
let obj = {
startTime: "",
endTime: "",
};
obj.startTime = this.$moment(
this.$moment()
.week(this.$moment().week() - 1)
.startOf("week")
.add(1, "days")
.valueOf()
).format("YYYY-MM-DD");
obj.endTime = this.$moment(
this.$moment()
.week(this.$moment().week() - 1)
.endOf("week")
.add(1, "days")
.valueOf()
).format("YYYY-MM-DD");
this.queryTime = [obj.startTime, obj.endTime];
},
//
getTenantsList() {
tenantsList({
pageNum: -1,
param: {},
}).then((res) => {
this.tenantsListData = res.data.list;
});
},
/** 查询公告列表 */
getList() {
this.loading = true;
//
this.queryParams.param.startTime = "";
this.queryParams.param.endTime = "";
if (this.queryTime?.length) {
this.queryParams.param.startTime = this.queryTime[0] + " " + "00:00:00";
this.queryParams.param.endTime = this.queryTime[1] + " " + "23:59:59";
}
queryDetail(this.queryParams).then((res) => {
this.listDat = res.data.list;
this.listDat.forEach((item) => {
if (item.detailList) {
item.detailList?.forEach((row) => {
item[row.questionCode] = row.answer;
});
}
});
this.total = res.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.param = {
keywords: "", //
startAge: "", //
endAge: "", //
tenantId: "", //
};
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 导出按钮操作 */
handleExport() {
let data = JSON.parse(JSON.stringify(this.queryParams));
data.param.idList = this.ids;
this.download1(
"/screening/exportScreen",
{
...data,
},
`筛查列表.xlsx`
);
},
},
};
</script>
<style scoped src="@/assets/styles/common.css"></style>
<style scoped>
.form-item-age {
display: flex;
align-items: center;
}
.form-item-age span {
margin: 0 10px;
}
.form-item-age >>> .el-input {
width: 100px;
}
</style>
<!-- >>> .el-input__inner {
padding: 0 15px !important;
} -->

375
acupuncture-后台/src/views/screening/qrCode.vue

@ -0,0 +1,375 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="组织" prop="tenantId">
<el-select
v-model="queryParams.param.tenantId"
placeholder="请选择"
clearable
filterable
>
<el-option
v-for="(item, index) in tenantsListData"
:label="item.name"
:value="item.id"
:key="index"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
重置
</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col> -->
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="listDat"
@selection-change="handleSelectionChange"
max-height="600"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
label="二维码"
align="center"
prop="name"
min-width="120"
>
<template slot-scope="scope">
<img
:src="qzUrl + '/acupuncture' + scope.row.url"
alt=""
width="100"
height="100"
@click="Original(scope.row.url)"
/>
</template>
</el-table-column>
<el-table-column
label="组织"
align="center"
prop="tenantName"
min-width="100"
/>
<el-table-column label="创建人/创建时间" align="center" min-width="140">
<template slot-scope="scope">
<div>{{ scope.row.createBy }}</div>
<span>{{
parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}")
}}</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="150">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-download"
@click="handleExport(scope.row)"
>导出
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改公告对话框 -->
<el-dialog
class="popup"
:title="title"
:visible.sync="open"
width="780px"
append-to-body
>
<el-form
class="formStep"
ref="form"
:model="form"
:rules="rules"
label-width="60px"
>
<el-form-item label="组织" prop="tenantId">
<el-select
v-model="form.tenantId"
placeholder="请选择"
clearable
filterable
>
<el-option
v-for="(item, index) in tenantsListData"
:label="item.name"
:value="item.id"
:key="index"
/>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-image
:preview-src-list="imgUrl"
ref="preview"
style="display: none"
></el-image>
</div>
</template>
<script>
import {
queryScreenList,
addScreen,
deleteScreen,
exportQr,
} from "@/api/screening.js";
import { tenantsList } from "@/api/member";
export default {
name: "Notice",
dicts: ["sys_notice_status", "sys_notice_type"],
data() {
return {
qzUrl: process.env.VUE_APP_API_QZURL, //
imgUrl: [],
tenantsListData: [], //
loading: false, //
ids: [], //
single: true, //
multiple: true, //
showSearch: true, //
total: 0, //
listDat: [], //
title: "", //
open: false, //
importOpen: false, //
//
queryParams: {
pageNum: 1,
pageSize: 10,
param: {
tenantId: "", //
},
},
//
form: {},
//
rules: {
tenantId: [
{
required: true,
message: "组织不能为空",
trigger: "blur",
},
],
},
};
},
created() {
this.getList(); //
this.getTenantsList(); //
},
methods: {
Original(_url) {
this.imgUrl = [];
if (_url) {
this.imgUrl.push(this.imgPrefix + _url);
}
this.$refs.preview.clickHandler();
},
//
getTenantsList() {
tenantsList({
pageNum: -1,
param: {},
}).then((res) => {
this.tenantsListData = res.data.list;
});
},
/** 查询公告列表 */
getList() {
this.loading = true;
queryScreenList(this.queryParams).then((res) => {
this.listDat = res.data.list;
this.total = res.data.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.param = {
tenantId: "", //
};
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "新增筛查二维码";
},
/** 提交按钮 */
submitForm: function () {
let path = process.env.VUE_APP_H5_URL;
this.$refs["form"].validate((valid) => {
if (valid) {
let data = JSON.parse(JSON.stringify(this.form));
let tenantName =
this.tenantsListData.filter((item) => item.id == data.tenantId)[0]
?.name || "";
data.path = `${path}?tenantId=${data.tenantId}&tenantName=${tenantName}`;
if (data.id != undefined) {
addScreen(data).then((response) => {
this.$modal.msgSuccess("二维码已重新生成,请及时更换");
this.open = false;
this.getList();
});
} else {
addScreen(data).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const idList = row.id ? [row.id] : this.ids;
this.$modal
.confirm("是否确认删除当前选择的数据?")
.then(function () {
return deleteScreen({
idList: idList,
});
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport(row) {
let data = {
tenantId: row.tenantId,
url: row.url,
};
exportQr(data).then((res) => {
window.open(`${process.env.VUE_APP_API_QZURL}/acupuncture/${res.data}`);
});
},
},
};
</script>
<style scoped src="@/assets/styles/common.css"></style>
<style scoped>
.form-item-age {
display: flex;
align-items: center;
}
.form-item-age span {
margin: 0 10px;
}
.form-item-age >>> .el-input {
width: 100px;
}
</style>
<!-- >>> .el-input__inner {
padding: 0 15px !important;
} -->
Loading…
Cancel
Save