update 页面优化

This commit is contained in:
wangxinbo 2020-11-22 12:17:04 +08:00
parent b662833522
commit 3bbd9d4570
7 changed files with 359 additions and 273 deletions

View File

@ -212,7 +212,7 @@ aside {
} }
&.align-center { &.align-center {
align-content: center; align-items: center;
} }
&.justify-center { &.justify-center {

View File

@ -21,7 +21,11 @@ export default {
} }
if (title) { if (title) {
vnodes.push(<span slot='title'>{(title)}</span>) vnodes.push(
<el-tooltip slot='title' effect='dark' content={(title)} placement="bottom">
<span>{(title)}</span>
</el-tooltip>
)
} }
return vnodes return vnodes
} }

View File

@ -12,18 +12,23 @@
:label="item.dictLabel" :label="item.dictLabel"
:name="item.dictLabel" :name="item.dictLabel"
> >
<div> <h2 class="result-title">综合评估结果</h2>
<div class="comprehensive">
<radar-chart :psMsg="item.dictValue" /> <radar-chart :psMsg="item.dictValue" />
</div> </div>
<div> <h2 class="result-title">各项评估结果</h2>
<radar-chart_jk :psMsg="item.dictValue" /> <el-tabs
</div> v-model="childTab"
@tab-click="handleTabClick"
>
<el-tab-pane label="健康" name="one">
<radar-chart_jk :psMsg="item.dictValue" v-if="childTab === 'one'" />
<div class="block"> <div class="block">
<h2 class="block-item-title flex align-center">教育建议</h2> <h2 class="block-item-title flex align-center">教育建议</h2>
<div <div
class="block" class="block"
v-for="itemLy in assessmentcontentList.filter( v-for="itemLy in assessmentcontentList.filter(
(p) => p.parentId == item.dictValue && p.name == '健康' p => p.parentId == item.dictValue && p.name == '健康'
)" )"
:key="itemLy.id" :key="itemLy.id"
> >
@ -31,7 +36,7 @@
<div <div
class="block" class="block"
v-for="itemFzly in assessmentcontentList.filter( v-for="itemFzly in assessmentcontentList.filter(
(p) => p.parentId == itemLy.id p => p.parentId == itemLy.id
)" )"
:key="itemFzly.id" :key="itemFzly.id"
> >
@ -41,7 +46,7 @@
<ul class="block-content"> <ul class="block-content">
<li <li
v-for="itemMb in assessmentcontentList.filter( v-for="itemMb in assessmentcontentList.filter(
(p) => p.parentId == itemFzly.id p => p.parentId == itemFzly.id
)" )"
:key="itemMb.id" :key="itemMb.id"
> >
@ -52,7 +57,7 @@
<div <div
class="checkbox-content" class="checkbox-content"
v-for="itemYs in assessmentcontentList.filter( v-for="itemYs in assessmentcontentList.filter(
(p) => p.parentId == itemMb.id p => p.parentId == itemMb.id
)" )"
:key="itemYs.id" :key="itemYs.id"
> >
@ -65,7 +70,30 @@
</div> </div>
</div> </div>
</div> </div>
<div> </el-tab-pane>
<el-tab-pane label="语言" name="two">
<radar-chart_yy :psMsg="item.dictValue" v-if="childTab === 'two'" />
</el-tab-pane>
<el-tab-pane label="社会" name="three">
<radar-chart_sh
:psMsg="item.dictValue"
v-if="childTab === 'three'"
/>
</el-tab-pane>
<el-tab-pane label="科学" name="four">
<radar-chart_kx
:psMsg="item.dictValue"
v-if="childTab === 'four'"
/>
</el-tab-pane>
<el-tab-pane label="艺术" name="five">
<radar-chart_ys
:psMsg="item.dictValue"
v-if="childTab === 'five'"
/>
</el-tab-pane>
</el-tabs>
<!-- <div>
<radar-chart_yy :psMsg="item.dictValue" /> <radar-chart_yy :psMsg="item.dictValue" />
</div> </div>
<div> <div>
@ -76,7 +104,7 @@
</div> </div>
<div> <div>
<radar-chart_ys :psMsg="item.dictValue" /> <radar-chart_ys :psMsg="item.dictValue" />
</div> </div> -->
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@ -100,7 +128,7 @@ export default {
RadarChart_yy, RadarChart_yy,
RadarChart_sh, RadarChart_sh,
RadarChart_kx, RadarChart_kx,
RadarChart_ys, RadarChart_ys
}, },
data() { data() {
return { return {
@ -113,6 +141,7 @@ export default {
activeName: "", activeName: "",
// //
assessmentcontentList: [], assessmentcontentList: [],
childTab: "one"
}; };
}, },
created() { created() {
@ -127,13 +156,13 @@ export default {
methods: { methods: {
/** 查询幼儿未评估内容列表 */ /** 查询幼儿未评估内容列表 */
getNoAssessmentList() { getNoAssessmentList() {
listNoAssessmentcontentByChild(this.childId).then((response) => { listNoAssessmentcontentByChild(this.childId).then(response => {
// console.log("rows:" + response.rows); // console.log("rows:" + response.rows);
this.assessmentcontentList = response.rows; this.assessmentcontentList = response.rows;
}); });
}, },
getChild(childId) { getChild(childId) {
getChildByAssessment(childId).then((response) => { getChildByAssessment(childId).then(response => {
// console.log(response); // console.log(response);
if (response.code == "200") { if (response.code == "200") {
this.childName = response.data.name; this.childName = response.data.name;
@ -143,7 +172,7 @@ export default {
}, },
/** 查询评估内容列表 */ /** 查询评估内容列表 */
getList(childId) { getList(childId) {
getAssessmentDictData(childId).then((response) => { getAssessmentDictData(childId).then(response => {
// console.log("rows:" + response.dictdata.length); // console.log("rows:" + response.dictdata.length);
if (response.dictdata.length > 0) { if (response.dictdata.length > 0) {
this.activeName = response.dictdata[0].dictLabel; this.activeName = response.dictdata[0].dictLabel;
@ -157,7 +186,10 @@ export default {
// this.activeName = tab.name; // this.activeName = tab.name;
// console.log(tab.name); // console.log(tab.name);
}, },
}, handleTabClick(tab) {
this.childTab = tab.name;
}
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -170,6 +202,14 @@ div {
-ms-user-select: none; -ms-user-select: none;
user-select: none; user-select: none;
} }
.comprehensive {
margin-bottom: 40px;
}
.result-title {
font-size: 18px;
margin-bottom: 15px;
text-align: center;
}
.title { .title {
padding: 10px 0; padding: 10px 0;
font-weight: 600; font-weight: 600;

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="flex align-center justify-between"> <div class="flex align-center justify-between student-main-title">
<p class="title flex align-center"> <p class="title flex align-center">
<span>姓名{{ this.childName }} </span> <span>姓名{{ this.childName }} </span>
<span>出生日期{{ this.childCsrq }} </span> <span>出生日期{{ this.childCsrq }} </span>
@ -39,16 +39,17 @@
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane <el-tab-pane
v-for="itemLy in assessmentcontentList.filter( v-for="itemLy in assessmentcontentList.filter(
(p) => p.parentId == this.assessmentscope p => p.parentId == this.assessmentscope
)" )"
:key="itemLy.id" :key="itemLy.id"
:label="itemLy.name" :label="itemLy.name"
:name="itemLy.name" :name="itemLy.name"
> >
<div v-loading="loading" <div
v-loading="loading"
class="block" class="block"
v-for="itemFzly in assessmentcontentList.filter( v-for="itemFzly in assessmentcontentList.filter(
(p) => p.parentId == itemLy.id p => p.parentId == itemLy.id
)" )"
:key="itemFzly.id" :key="itemFzly.id"
> >
@ -58,7 +59,7 @@
<ul class="block-content"> <ul class="block-content">
<li <li
v-for="itemMb in assessmentcontentList.filter( v-for="itemMb in assessmentcontentList.filter(
(p) => p.parentId == itemFzly.id p => p.parentId == itemFzly.id
)" )"
:key="itemMb.id" :key="itemMb.id"
> >
@ -68,7 +69,7 @@
<div <div
class="checkbox-content" class="checkbox-content"
v-for="itemYs in assessmentcontentList.filter( v-for="itemYs in assessmentcontentList.filter(
(p) => p.parentId == itemMb.id p => p.parentId == itemMb.id
)" )"
:key="itemYs.id" :key="itemYs.id"
> >
@ -158,13 +159,13 @@ import {
delAssessmentcontent, delAssessmentcontent,
addAssessmentcontent, addAssessmentcontent,
updateAssessmentcontent, updateAssessmentcontent,
exportAssessmentcontent, exportAssessmentcontent
} from "@/api/benyi/assessmentcontent"; } from "@/api/benyi/assessmentcontent";
import { getChildByAssessment } from "@/api/benyi/child"; import { getChildByAssessment } from "@/api/benyi/child";
import { import {
addAssessmentchild, addAssessmentchild,
updateAssessmentchild, updateAssessmentchild
} from "@/api/benyi/assessmentchild"; } from "@/api/benyi/assessmentchild";
export default { export default {
@ -194,11 +195,11 @@ export default {
name: undefined, name: undefined,
iselement: undefined, iselement: undefined,
scope: undefined, scope: undefined,
sort: undefined, sort: undefined
}, },
activeName: "健康", activeName: "健康",
checked: false, checked: false,
checkList: [], checkList: []
}; };
}, },
created() { created() {
@ -210,7 +211,7 @@ export default {
}, },
methods: { methods: {
getChild(childId) { getChild(childId) {
getChildByAssessment(childId).then((response) => { getChildByAssessment(childId).then(response => {
// console.log(response); // console.log(response);
if (response.code == "200") { if (response.code == "200") {
this.childName = response.data.name; this.childName = response.data.name;
@ -219,7 +220,7 @@ export default {
this.bjmc = response.data.bjmc; this.bjmc = response.data.bjmc;
this.classid = response.data.classid; this.classid = response.data.classid;
this.zbjsxm = response.data.zbjsmc; this.zbjsxm = response.data.zbjsmc;
response.ByAssessmentchild.forEach((item) => response.ByAssessmentchild.forEach(item =>
this.checkList.push(item.contentid) this.checkList.push(item.contentid)
); );
if (response.isAssessment == "0") { if (response.isAssessment == "0") {
@ -236,7 +237,7 @@ export default {
/** 查询评估内容列表 */ /** 查询评估内容列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listAssessmentcontent(this.queryParams).then((response) => { listAssessmentcontent(this.queryParams).then(response => {
// console.log("rows:" + response.rows); // console.log("rows:" + response.rows);
this.assessmentcontentList = response.rows; this.assessmentcontentList = response.rows;
this.loading = false; this.loading = false;
@ -262,11 +263,11 @@ export default {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
callback: (action) => { callback: action => {
if (action === "confirm") { if (action === "confirm") {
// console.log(' ') // console.log(' ')
var items = ""; var items = "";
this.checkList.forEach((item) => { this.checkList.forEach(item => {
// //
items = items + item + ","; items = items + item + ",";
}); });
@ -281,7 +282,7 @@ export default {
this.form.type = "Y"; this.form.type = "Y";
this.form.xn = this.trem; this.form.xn = this.trem;
this.form.scope = this.assessmentscope; this.form.scope = this.assessmentscope;
addAssessmentchild(this.form).then((response) => { addAssessmentchild(this.form).then(response => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("评估成功"); this.msgSuccess("评估成功");
} }
@ -289,7 +290,7 @@ export default {
} }
} else { } else {
} }
}, }
}); });
}, },
handleClick(tab) { handleClick(tab) {
@ -302,8 +303,8 @@ export default {
// items = items + item + ","; // items = items + item + ",";
// }); // });
// console.log(items); // console.log(items);
}, }
}, }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -319,9 +320,12 @@ div {
.title { .title {
padding: 10px 0; padding: 10px 0;
font-weight: 600; font-weight: 600;
flex-wrap: wrap;
padding-right: 10px;
line-height: 20px;
span { span {
font-size: 16px; font-size: 16px;
padding: 2px; padding: 0 4px;
// &:nth-of-type(2) { // &:nth-of-type(2) {
// font-size: 14px; // font-size: 14px;
// font-weight: normal; // font-weight: normal;
@ -375,6 +379,18 @@ div {
padding-left: 10px; padding-left: 10px;
} }
} }
.el-checkbox {
display: flex;
white-space: normal;
.el-checkbox__input {
margin-top: 2px;
}
}
}
}
@media (max-width: 768.98px) {
.title span {
font-size: 12px;
} }
} }
</style> </style>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-row :gutter="20"> <el-row :gutter="20" type="flex">
<el-col :span="8" :xs="24"> <el-col :span="8" :xs="24">
<div class="head-container"> <div class="head-container">
<el-input <el-input
@ -11,8 +11,6 @@
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
style="margin-bottom: 20px" style="margin-bottom: 20px"
/> />
</div>
<div class="head-container">
<el-tree <el-tree
:data="treeOptions" :data="treeOptions"
:props="defaultProps" :props="defaultProps"
@ -43,7 +41,7 @@
import { import {
treeselectstudy, treeselectstudy,
getAssessmentcontent, getAssessmentcontent,
getAssessmentcontentbyparentid, getAssessmentcontentbyparentid
} from "@/api/benyi/assessmentcontent"; } from "@/api/benyi/assessmentcontent";
import { listAssessmentintroduce } from "@/api/benyi/assessmentintroduce"; import { listAssessmentintroduce } from "@/api/benyi/assessmentintroduce";
@ -62,19 +60,19 @@ export default {
// //
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "label", label: "label"
}, },
// //
queryParams: { queryParams: {
id: undefined, id: undefined
}, }
}; };
}, },
watch: { watch: {
// //
name(val) { name(val) {
this.$refs.tree.filter(val); this.$refs.tree.filter(val);
}, }
}, },
created() { created() {
this.getTreeselect(); this.getTreeselect();
@ -83,7 +81,7 @@ export default {
methods: { methods: {
/** 查询部门下拉树结构 */ /** 查询部门下拉树结构 */
getTreeselect() { getTreeselect() {
treeselectstudy().then((response) => { treeselectstudy().then(response => {
this.treeOptions = response.data; this.treeOptions = response.data;
}); });
}, },
@ -105,22 +103,22 @@ export default {
}, },
/**查询评估介绍 */ /**查询评估介绍 */
getNote() { getNote() {
listAssessmentintroduce(null).then((response) => { listAssessmentintroduce(null).then(response => {
// console.log(":" + response.rows[0].content); // console.log(":" + response.rows[0].content);
this.note = response.rows[0].content; this.note = response.rows[0].content;
}); });
}, },
/** 查询一日流程任务列表 */ /** 查询一日流程任务列表 */
getTaskList() { getTaskList() {
getAssessmentcontentbyparentid(this.queryParams.id).then((response) => { getAssessmentcontentbyparentid(this.queryParams.id).then(response => {
var tmp = ""; var tmp = "";
response.data.forEach((element) => { response.data.forEach(element => {
tmp = tmp + element.sort + ". " + element.name + "</br>"; tmp = tmp + element.sort + ". " + element.name + "</br>";
}); });
this.note = tmp; this.note = tmp;
}); });
}, }
}, }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -190,4 +188,12 @@ div {
-ms-user-select: none; -ms-user-select: none;
user-select: none; user-select: none;
} }
.el-tree{
max-height: calc(100vh - 180px);
overflow-y: auto;
}
.el-card {
max-height: calc(100vh - 130px);
overflow-y: auto;
}
</style> </style>

View File

@ -1,8 +1,9 @@
<template> <template>
<div :class="className" :style="{height:height,width:width}"> <div
<el-row :gutter="24"> class="xs-height"
<el-col :span="24" :xs="24"> :class="className"
<div> :style="{ height: height, width: width }"
>
<FullCalendar <FullCalendar
ref="fullCalendar" ref="fullCalendar"
defaultView="dayGridMonth" defaultView="dayGridMonth"
@ -16,9 +17,6 @@
@eventClick="handleEventClick" @eventClick="handleEventClick"
/> />
</div> </div>
</el-col>
</el-row>
</div>
</template> </template>
<script> <script>
@ -108,6 +106,9 @@ export default {
height: 100%; height: 100%;
} }
.fc-widget-content { .fc-widget-content {
.fc-scroller.fc-day-grid-container {
height: 100% !important;
}
.fc-sun, .fc-sun,
.fc-sat { .fc-sat {
background: rgba(245, 246, 248, 0.6); background: rgba(245, 246, 248, 0.6);
@ -122,8 +123,7 @@ export default {
width: auto; width: auto;
} }
} }
@media screen and (min-width: 769px) {
}
.el-col { .el-col {
margin-bottom: 10px; margin-bottom: 10px;
text-align: center; text-align: center;
@ -143,5 +143,18 @@ export default {
} }
} }
} }
@media (max-width: 768.98px) {
.xs-height {
height: 100% !important;
.fc button {
height: 30px;
}
.fc-toolbar h2 {
font-size: 16px !important;
}
.fc-ltr .fc-dayGrid-view .fc-day-top .fc-day-number {
font-size: 12px;
}
}
}
</style> </style>

View File

@ -88,6 +88,7 @@ export default {
background-color: rgb(240, 242, 245); background-color: rgb(240, 242, 245);
position: relative; position: relative;
.el-card.is-always-shadow { .el-card.is-always-shadow {
box-shadow: none; box-shadow: none;
border: 0; border: 0;
@ -95,7 +96,7 @@ export default {
.chart-wrapper { .chart-wrapper {
background: #fff; background: #fff;
padding: 16px 16px 0; padding: 16px;
margin-bottom: 32px; margin-bottom: 32px;
} }
} }
@ -113,8 +114,14 @@ export default {
} }
@media (max-width: 1024px) { @media (max-width: 1024px) {
.chart-wrapper { .dashboard-editor-container .chart-wrapper {
padding: 8px; padding: 8px;
} }
} }
@media (max-width: 768.98px) {
.dashboard-editor-container {
padding: 10px;
}
}
</style> </style>