Merge remote-tracking branch 'origin/dev'
This commit is contained in:
commit
8c6009ecfc
9
src/api/system/personalecharts.js
Normal file
9
src/api/system/personalecharts.js
Normal file
@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function selectThisActionDevelopmentVO(query) {
|
||||
return request({
|
||||
url: '/system/testActionDevelopment/selectThisActionDevelopmentVO',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@ -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) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user