Merge remote-tracking branch 'origin/dev'

This commit is contained in:
纪寒 2022-11-29 10:22:38 +08:00
commit 8c6009ecfc
2 changed files with 190 additions and 4 deletions

View File

@ -0,0 +1,9 @@
import request from '@/utils/request'
export function selectThisActionDevelopmentVO(query) {
return request({
url: '/system/testActionDevelopment/selectThisActionDevelopmentVO',
method: 'get',
params: query
})
}

View File

@ -606,14 +606,14 @@
<div
ref="shapechart"
id="shapechart"
style="width: 400px; height: 250px; margin: 0 auto"
style="width: 100%; height: 300px; margin: 0 auto"
></div>
<div
style="
position: absolute;
left: 52%;
top: 38%;
left: 50%;
top: 45%;
transform: translate(-50%);
"
>
@ -1157,6 +1157,57 @@
</el-card>
</el-col>
</el-row>
<!-- 体质评估运动处方 -->
<div class="title" style="margin: 40px auto">体质评估运动处方</div>
<el-row :gutter="24">
<div style="margin: 10px auto; width: 100%">
<el-table
:data="selectlist"
border
style="width: 100%; margin: 0 auto"
:span-method="selectlistMethod"
>
<el-table-column prop="physicalQualityName" label="" align="center">
</el-table-column>
<el-table-column
prop="degreeMovement"
label="运动程度"
align="center"
>
</el-table-column>
<el-table-column prop="motionType" label="运动类型" align="center">
</el-table-column>
<el-table-column
prop="motionFrequency"
label="运动频率"
align="center"
>
</el-table-column>
<el-table-column
prop="motionStrength"
label="运动强度"
align="center"
>
</el-table-column>
<el-table-column prop="motionTime" label="运动时间" align="center">
</el-table-column>
<el-table-column prop="motionCapacity" label="运动量" align="center">
</el-table-column>
<el-table-column
prop="advancedTime"
label="进阶时间(可选择)"
align="center"
>
</el-table-column>
<el-table-column
prop="advancedScheme"
label="进阶方案"
align="center"
>
</el-table-column>
</el-table>
</div>
</el-row>
</div>
</template>
<script>
@ -1166,7 +1217,7 @@ import { synthesize } from "@/api/system/comprehensive";
import { testBodyScoreInfo } from "@/api/system/quality";
import { constitution } from "@/api/system/constitution";
import { listAction } from "@/api/system/action";
import { selectThisActionDevelopmentVO } from "@/api/system/personalecharts";
export default {
name: "personalecharts",
props: ["itemlists"],
@ -1210,6 +1261,16 @@ export default {
position4: 0, //
position2: 0, //
count: 0, //
//
selectlist: [],
selectspanArr: [],
selectposition: 0, //
selectspanArr2: [],
selectposition2: 0, //
selectspanArr3: [],
selectposition3: 0, //
selectspanArr4: [],
selectposition4: 0, //
};
},
mounted() {
@ -1219,6 +1280,7 @@ export default {
this.quality();
this.constitutioninfo();
this.listActioninfo();
this.select();
},
// watch: {
// itemlists: {
@ -1249,6 +1311,121 @@ export default {
};
},
methods: {
//
select() {
this.selectspanArr = [];
this.selectposition = 0;
this.selectspanArr2 = [];
this.selectposition2 = 0;
this.selectspanArr3 = [];
this.selectposition3 = 0;
this.selectspanArr4 = [];
this.selectposition4 = 0;
selectThisActionDevelopmentVO(this.echartslist).then((res) => {
this.selectlist = res.data;
this.selectlistforeach();
});
},
selectlistforeach() {
this.selectlist.forEach((item, index) => {
if (index == 0) {
this.selectspanArr.push(1);
this.selectposition = 0;
this.selectspanArr2.push(1);
this.selectposition2 = 0;
this.selectspanArr3.push(1);
this.selectposition3 = 0;
this.selectspanArr4.push(1);
this.selectposition4 = 0;
} else {
// a
if (
this.selectlist[index].physicalQualityName ==
this.selectlist[index - 1].physicalQualityName
) {
// 1
this.selectspanArr[this.selectposition] += 1;
this.selectspanArr.push(0); // 0
} else {
this.selectspanArr.push(1); // 1
this.selectposition = index; //
}
if (
this.selectlist[index].physicalQualityName ==
this.selectlist[index - 1].physicalQualityName &&
this.selectlist[index].degreeMovement ==
this.selectlist[index - 1].degreeMovement
) {
this.selectspanArr2[this.selectposition2] += 1;
this.selectspanArr2.push(0); // 0
} else {
this.selectspanArr2.push(1); // 1
this.selectposition2 = index; //
}
if (
this.selectlist[index].physicalQualityName ==
this.selectlist[index - 1].physicalQualityName &&
this.selectlist[index].motionCapacity ==
this.selectlist[index - 1].motionCapacity
) {
this.selectspanArr3[this.selectposition3] += 1;
this.selectspanArr3.push(0); // 0
} else {
this.selectspanArr3.push(1); // 1
this.selectposition3 = index; //
}
if (
this.selectlist[index].physicalQualityName ==
this.selectlist[index - 1].physicalQualityName &&
this.selectlist[index].advancedScheme ==
this.selectlist[index - 1].advancedScheme
) {
this.selectspanArr4[this.selectposition4] += 1;
this.selectspanArr4.push(0); // 0
} else {
this.selectspanArr4.push(1); // 1
this.selectposition4 = index; //
}
}
});
},
selectlistMethod({ row, column, rowIndex, columnIndex }) {
console.log(columnIndex);
if (columnIndex == 0) {
const _row = this.selectspanArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
if (columnIndex == 1) {
const _row = this.selectspanArr2[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
if (columnIndex == 6) {
const _row = this.selectspanArr3[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
if (columnIndex == 8) {
const _row = this.selectspanArr4[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
},
// comprehensive
comprehensive() {
synthesize(this.echartslist).then((res) => {