This commit is contained in:
xiezhijun 2021-03-23 18:46:24 +08:00
commit c2d6a3c3df
9 changed files with 234 additions and 220 deletions

View File

@ -29,10 +29,21 @@
> >
<div v-for="con in item.content" :key="con.value"> <div v-for="con in item.content" :key="con.value">
<text-info <text-info
v-if="item.title !== '体检报告'"
:title="con.title" :title="con.title"
:value="data[con.value]" :value="data[con.value]"
extraclass="text-info-extra" extraclass="text-info-extra"
/> />
<div v-else>
<span :style="{ color: '#8c8c8c' }">{{ con.title }}:</span>
<el-image
title="点击大图预览"
fit="contain"
style="width: auto; height: 80px"
:src="getImgUrl(data[con.value])"
:preview-src-list="[getImgUrl(data[con.value])]"
/>
</div>
</div> </div>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
@ -229,6 +240,9 @@ export default {
}; };
}, },
methods: { methods: {
getImgUrl(path) {
return `${window.location.origin}${path}`;
},
handleOnRemark() { handleOnRemark() {
this.open = true; this.open = true;
}, },

View File

@ -6,228 +6,211 @@
@closed="onClosed" @closed="onClosed"
:width="dialogWidth" :width="dialogWidth"
> >
<div style="display:flex;flex-direction:row"> <div style="display: flex; flex-direction: row">
<div v-if="showFlag" style="float: left;width: 900px"> <div v-if="showFlag" style="float: left; width: 900px">
<div
style="float: right; margin-top: -10px; margin-bottom: 10px"
v-show="dataList.length > 0"
>
<!-- 只有新版健康评估信息才可修改旧的体征数据不支持修改 -->
<el-button
type="info"
v-show="dataType == 0"
@click="generateReport()"
plain
>下载报告</el-button
>
<el-button
type="info"
v-show="dataType == 0"
@click="handleEditGuidanceClick()"
plain
>减脂指导</el-button
>
<el-button
v-hasPermi="['custom:healthy:edit']"
type="info"
v-show="dataType == 0"
@click="handleEditRemarkClick()"
plain
>修改备注</el-button
>
<el-button
v-hasPermi="['custom:healthy:edit']"
type="warning"
v-show="dataType == 0"
@click="handleEditHealthyClick()"
plain
>修改信息</el-button
>
<el-button
type="danger"
v-hasPermi="['custom:healthy:remove']"
@click="handleDelete()"
plain
>删除信息</el-button
>
</div>
<!-- 客户健康评估 -->
<div v-if="dataList.length > 0 && dataType == 0">
<!-- 基础信息 -->
<div <div
v-for="(item, index) in dataList.slice(0, 1)" style="float: right; margin-top: -10px; margin-bottom: 10px"
style="margin-bottom: 50px" v-show="dataList.length > 0"
:key="index"
> >
<div> <!-- 只有新版健康评估信息才可修改旧的体征数据不支持修改 -->
<p class="p_title_1" style="margin-top: 5px"> <el-button
{{ titleArray[index] }} type="info"
</p> v-show="dataType == 0"
<table-detail-message :data="item"></table-detail-message> @click="generateReport()"
</div> plain
<!-- 备注 --> >下载报告</el-button
<el-table
:data="remarkList"
:show-header="false"
border
:cell-style="remarkColumnStyle"
style="width: 100%"
> >
<el-table-column width="140" prop="remarkTitle"> </el-table-column> <el-button
<el-table-column prop="remarkValue"> type="info"
<template slot-scope="scope"> v-show="dataType == 0"
<auto-hide-message @click="handleEditGuidanceClick()"
:data="scope.row.remarkValue" plain
:maxLength="100" >减脂指导</el-button
/></template> >
</el-table-column> <el-button
</el-table> v-hasPermi="['custom:healthy:edit']"
<!-- 指导 --> type="info"
<el-table v-show="dataType == 0"
:data="guidanceList" @click="handleEditRemarkClick()"
:show-header="false" plain
border >修改备注</el-button
:cell-style="remarkColumnStyle" >
style="width: 100%" <el-button
v-hasPermi="['custom:healthy:edit']"
type="warning"
v-show="dataType == 0"
@click="handleEditHealthyClick()"
plain
>修改信息</el-button
>
<el-button
type="danger"
v-hasPermi="['custom:healthy:remove']"
@click="handleDelete()"
plain
>删除信息</el-button
> >
<el-table-column width="140" prop="guidanceTitle">
</el-table-column>
<el-table-column prop="guidanceValue">
<template slot-scope="scope">
<auto-hide-message
:data="scope.row.guidanceValue"
:maxLength="100"
/></template>
</el-table-column>
</el-table>
</div> </div>
<!-- 其他信息 --> <!-- 客户健康评估 -->
<div style="height: 390px; overflow: auto"> <div v-if="dataList.length > 0 && dataType == 0">
<!-- 基础信息 -->
<div <div
v-for="(item, index) in dataList.slice(1, 10)" v-for="(item, index) in dataList.slice(0, 1)"
style="margin-bottom: 50px" style="margin-bottom: 50px"
:key="index" :key="index"
> >
<div> <div>
<p class="p_title_1" style="margin-top: 5px"> <p class="p_title_1" style="margin-top: 5px">
{{ titleArray[index + 1] }} {{ titleArray[index] }}
</p> </p>
<table-detail-message <table-detail-message :data="item"></table-detail-message>
:data="item" </div>
v-if="index != dataList.length - 2" <!-- 备注 -->
></table-detail-message> <el-table
<el-table :data="remarkList"
:show-header="false" :show-header="false"
v-if="index == dataList.length - 2" border
:data="item" :cell-style="remarkColumnStyle"
border style="width: 100%"
:cell-style="columnStyle" >
style="width: 100%" <el-table-column width="140" prop="remarkTitle">
> </el-table-column>
<el-table-column width="140" prop="attr_name_one"> <el-table-column prop="remarkValue">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="value_one"> <auto-hide-message
<template slot-scope="scope"> :data="scope.row.remarkValue"
<auto-hide-message :maxLength="100"
:data=" /></template>
scope.row.value_one == null </el-table-column>
? '' </el-table>
: scope.row.value_one + '' <!-- 指导 -->
" <el-table
:maxLength="20" :data="guidanceList"
/> :show-header="false"
<el-button border
type="primary" :cell-style="remarkColumnStyle"
v-show="scope.row.value_one" style="width: 100%"
@click="downloadFile(medicalReportPathArray[0])" >
>下载</el-button <el-table-column width="140" prop="guidanceTitle">
> </el-table-column>
</template> <el-table-column prop="guidanceValue">
</el-table-column> <template slot-scope="scope">
<el-table-column <auto-hide-message
width="140" :data="scope.row.guidanceValue"
prop="attr_name_two" :maxLength="100"
></el-table-column> /></template>
<el-table-column prop="value_two"> </el-table-column>
<template slot-scope="scope"> </el-table>
<auto-hide-message </div>
:data=" <!-- 其他信息 -->
scope.row.value_two == null <div style="height: 390px; overflow: auto">
? '' <div
: scope.row.value_two + '' v-for="(item, index) in dataList.slice(1, 10)"
" style="margin-bottom: 50px"
:maxLength="20" :key="index"
/> >
<el-button <div>
type="primary" <p class="p_title_1" style="margin-top: 5px">
v-show="scope.row.value_two" {{ titleArray[index + 1] }}
@click="downloadFile(medicalReportPathArray[1])" </p>
>下载</el-button <table-detail-message
> :data="item"
</template> v-if="index != dataList.length - 2"
</el-table-column> ></table-detail-message>
<el-table-column <el-table
width="140" :show-header="false"
prop="attr_name_three" v-if="index == dataList.length - 2"
></el-table-column> :data="item"
<el-table-column prop="value_three"> border
<template slot-scope="scope"> :cell-style="columnStyle"
<auto-hide-message style="width: 100%"
:data=" >
scope.row.value_three == null <el-table-column width="140" prop="attr_name_one">
? '' </el-table-column>
: scope.row.value_three + '' <el-table-column prop="value_one">
" <template slot-scope="scope">
:maxLength="20" <el-image
/> v-if="scope.row.value_one"
<el-button title="点击大图预览"
type="primary" style="width: auto; height: 80px"
v-show="scope.row.value_three" fit="contain"
@click="downloadFile(medicalReportPathArray[2])" :src="getImgUrl(0)"
>下载</el-button :preview-src-list="[getImgUrl(0)]"
> />
</template> </template>
</el-table-column> </el-table-column>
</el-table> <el-table-column
width="140"
prop="attr_name_two"
></el-table-column>
<el-table-column prop="value_two">
<template slot-scope="scope">
<el-image
v-if="scope.row.value_two"
title="点击大图预览"
fit="contain"
style="width: auto; height: 80px"
:src="getImgUrl(1)"
:preview-src-list="[getImgUrl(1)]"
/>
</template>
</el-table-column>
<el-table-column
width="140"
prop="attr_name_three"
></el-table-column>
<el-table-column prop="value_three">
<template slot-scope="scope">
<el-image
v-if="scope.row.value_three"
title="点击大图预览"
fit="contain"
style="width: auto; height: 80px"
:src="getImgUrl(2)"
:preview-src-list="[getImgUrl(2)]"
/>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
</div>
<!-- 客户体征 -->
<div v-else>
<table-detail-message
v-show="dataList.length > 0"
:data="dataList"
></table-detail-message>
<div
v-show="dataList.length == 0"
style="font-size: 20px; text-align: center"
>
<VueQr :text="copyValue" :logoSrc="logo" :size="256" />
<div style="text-align: center; margin-top: 20px">
<el-button
icon="el-icon-share"
size="small"
title="点击复制链接"
class="copyBtn"
type="primary"
:data-clipboard-text="copyValue"
@click="handleCopy()"
>健康评估表链接
</el-button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 客户体征 --> <div style="width: 200px" v-show="guidanceShow">
<div v-else> <!-- 编辑减脂指导 -->
<table-detail-message <physicalSigns-guidance
v-show="dataList.length > 0" ref="physicalSignsGuidanceDialog"
:data="dataList" @close="editGuidanceShow(false)"
></table-detail-message> @refreshHealthyData="getCustomerHealthyByCusId()"
<div ></physicalSigns-guidance>
v-show="dataList.length == 0"
style="font-size: 20px; text-align: center"
>
<VueQr :text="copyValue" :logoSrc="logo" :size="256" />
<div style="text-align: center; margin-top: 20px">
<el-button
icon="el-icon-share"
size="small"
title="点击复制链接"
class="copyBtn"
type="primary"
:data-clipboard-text="copyValue"
@click="handleCopy()"
>健康评估表链接
</el-button>
</div>
</div>
</div> </div>
</div> </div>
<div style="width: 200px;" v-show="guidanceShow">
<!-- 编辑减脂指导 -->
<physicalSigns-guidance
ref="physicalSignsGuidanceDialog"
@close="editGuidanceShow(false)"
@refreshHealthyData="getCustomerHealthyByCusId()"
></physicalSigns-guidance>
</div>
</div>
<!-- 编辑 --> <!-- 编辑 -->
<physicalSigns-edit <physicalSigns-edit
ref="physicalSignsEditDialog" ref="physicalSignsEditDialog"
@ -238,7 +221,6 @@
ref="physicalSignsRemarkDialog" ref="physicalSignsRemarkDialog"
@refreshHealthyData="getCustomerHealthyByCusId()" @refreshHealthyData="getCustomerHealthyByCusId()"
></physicalSigns-remark> ></physicalSigns-remark>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
@ -411,11 +393,13 @@ export default {
copyValue: "", copyValue: "",
detailHealthy: null, detailHealthy: null,
dialogWidth: "950px", dialogWidth: "950px",
guidanceShow : false guidanceShow: false,
}; };
}, },
methods: { methods: {
getImgUrl(idx) {
return `${window.location.origin}${this.medicalReportPathArray[idx]}`;
},
// //
columnStyle({ row, column, rowIndex, columnIndex }) { columnStyle({ row, column, rowIndex, columnIndex }) {
if (columnIndex % 2 === 0) { if (columnIndex % 2 === 0) {
@ -781,7 +765,9 @@ export default {
return signList.length > 0 ? signStr.substring(1) : signStr; return signList.length > 0 ? signStr.substring(1) : signStr;
}, },
downloadFile(fileName) { downloadFile(fileName) {
this.downloadResource(fileName); // this.downloadResource(fileName);
// this.previewVisible = true;
// this.previewUrl = `${window.location.origin}${fileName}`;
}, },
generateReport() { generateReport() {
let data = this.detailHealthy; let data = this.detailHealthy;
@ -868,15 +854,15 @@ export default {
this.healthyData this.healthyData
); );
}, },
editGuidanceShow(flag){ editGuidanceShow(flag) {
this.guidanceShow = flag; this.guidanceShow = flag;
this.dialogWidth = flag ? "1200px" : "950px"; this.dialogWidth = flag ? "1200px" : "950px";
} },
}, },
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
.margin-top-20 { .margin-top-20 {
margin-top: 20px; margin-top: 20px;
} }
@ -885,4 +871,13 @@ export default {
font-weight: bold; font-weight: bold;
margin-top: 20px; margin-top: 20px;
} }
.preview_dialog_wrapper {
.preview_content {
text-align: center;
.preview_img {
max-height: 600px;
width: auto;
}
}
}
</style> </style>

View File

@ -175,7 +175,7 @@ export default {
}, },
methods: { methods: {
showDrawer(data) { showDrawer(data) {
console.log(data); // console.log(data);
this.data = data; this.data = data;
if (!this.data) { if (!this.data) {
return; return;
@ -288,7 +288,7 @@ export default {
this.reset(); this.reset();
}, },
handleOnDelete(data) { handleOnDelete(data) {
console.log(data); // console.log(data);
this.$confirm("此操作将删除对计划的食谱, 是否继续?", "提示", { this.$confirm("此操作将删除对计划的食谱, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

View File

@ -609,6 +609,12 @@ export function dealHealthy(customerHealthy) {
? `${customerHealthy.otherOperationHistory}` ? `${customerHealthy.otherOperationHistory}`
: ""; : "";
} }
if (customerHealthy.hasOwnProperty("medicalReport")) {
const urls = customerHealthy.medicalReport.split(",");
customerHealthy.medicalReport_one = urls[0];
customerHealthy.medicalReport_two = urls[1];
customerHealthy.medicalReport_three = urls[2];
}
if (customerHealthy.hasOwnProperty("defecationNum")) { if (customerHealthy.hasOwnProperty("defecationNum")) {
customerHealthy.defecationNum += "次/天"; customerHealthy.defecationNum += "次/天";
} }

View File

@ -732,7 +732,7 @@ export default {
}); });
}, },
handleOnUploadPreview(file) { handleOnUploadPreview(file) {
console.log(file); // console.log(file);
this.previewTitle = file.name; this.previewTitle = file.name;
this.previewVisible = true; this.previewVisible = true;
this.previewUrl = file.url; this.previewUrl = file.url;

View File

@ -113,9 +113,8 @@ export default {
left: 100, left: 100,
itemWidth: 8, itemWidth: 8,
itemHeight: 8, itemHeight: 8,
pageIconSize: 10,
textStyle: { textStyle: {
fontSize: 10, fontSize: 12,
}, },
}, },
dataset: { dataset: {

View File

@ -144,7 +144,7 @@ export default {
itemHeight: 8, itemHeight: 8,
pageIconSize: 10, pageIconSize: 10,
textStyle: { textStyle: {
fontSize: 10, fontSize: 12,
}, },
}, },
tooltip: { tooltip: {
@ -173,7 +173,7 @@ export default {
name: this.type === "weight" ? "质量/克" : "热量/千卡", name: this.type === "weight" ? "质量/克" : "热量/千卡",
nameTextStyle: { nameTextStyle: {
color: "#262626", color: "#262626",
fontSize: 10, fontSize: 12,
}, },
}, },
series: source[0].slice(1).map((name, idx) => ({ series: source[0].slice(1).map((name, idx) => ({

View File

@ -50,7 +50,7 @@ export default {
this.activeName = tab.name; this.activeName = tab.name;
}, },
handleOnDayClick(data) { handleOnDayClick(data) {
console.log(data); // console.log(data);
const { id, numDay } = data; const { id, numDay } = data;
if (this.selectedIgd !== id) { if (this.selectedIgd !== id) {
this.selectedIgd = id; this.selectedIgd = id;

View File

@ -90,7 +90,7 @@ export default {
typeName: this.menuTypeDict[type], typeName: this.menuTypeDict[type],
values: mData[type], values: mData[type],
})); }));
console.log(mMenus); // console.log(mMenus);
return mMenus; return mMenus;
}, },
...mapState(["cusUnitDict", "cusWeightDict", "menuTypeDict"]), ...mapState(["cusUnitDict", "cusWeightDict", "menuTypeDict"]),