修改
This commit is contained in:
parent
319bf65a37
commit
27169a5fa9
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
|
<div
|
||||||
ref="shapechart"
|
ref="shapechart"
|
||||||
id="shapechart"
|
id="shapechart"
|
||||||
style="width: 400px; height: 250px; margin: 0 auto"
|
style="width: 100%; height: 300px; margin: 0 auto"
|
||||||
></div>
|
></div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 52%;
|
left: 50%;
|
||||||
top: 38%;
|
top: 45%;
|
||||||
transform: translate(-50%);
|
transform: translate(-50%);
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
@ -1157,6 +1157,57 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -1166,7 +1217,7 @@ import { synthesize } from "@/api/system/comprehensive";
|
|||||||
import { testBodyScoreInfo } from "@/api/system/quality";
|
import { testBodyScoreInfo } from "@/api/system/quality";
|
||||||
import { constitution } from "@/api/system/constitution";
|
import { constitution } from "@/api/system/constitution";
|
||||||
import { listAction } from "@/api/system/action";
|
import { listAction } from "@/api/system/action";
|
||||||
|
import { selectThisActionDevelopmentVO } from "@/api/system/personalecharts";
|
||||||
export default {
|
export default {
|
||||||
name: "personalecharts",
|
name: "personalecharts",
|
||||||
props: ["itemlists"],
|
props: ["itemlists"],
|
||||||
@ -1210,6 +1261,16 @@ export default {
|
|||||||
position4: 0, // 标记位置
|
position4: 0, // 标记位置
|
||||||
position2: 0, // 标记位置
|
position2: 0, // 标记位置
|
||||||
count: 0, //滑动位置
|
count: 0, //滑动位置
|
||||||
|
//运动处方
|
||||||
|
selectlist: [],
|
||||||
|
selectspanArr: [],
|
||||||
|
selectposition: 0, // 标记位置
|
||||||
|
selectspanArr2: [],
|
||||||
|
selectposition2: 0, // 标记位置
|
||||||
|
selectspanArr3: [],
|
||||||
|
selectposition3: 0, // 标记位置
|
||||||
|
selectspanArr4: [],
|
||||||
|
selectposition4: 0, // 标记位置
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -1219,6 +1280,7 @@ export default {
|
|||||||
this.quality();
|
this.quality();
|
||||||
this.constitutioninfo();
|
this.constitutioninfo();
|
||||||
this.listActioninfo();
|
this.listActioninfo();
|
||||||
|
this.select();
|
||||||
},
|
},
|
||||||
// watch: {
|
// watch: {
|
||||||
// itemlists: {
|
// itemlists: {
|
||||||
@ -1249,6 +1311,121 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
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
|
||||||
comprehensive() {
|
comprehensive() {
|
||||||
synthesize(this.echartslist).then((res) => {
|
synthesize(this.echartslist).then((res) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user