This commit is contained in:
曹辉 2022-10-12 08:38:10 +08:00
parent 7b480e3ede
commit 9856fbc64a
17 changed files with 351 additions and 189 deletions

View File

@ -5,7 +5,7 @@ VUE_APP_TITLE = 智慧幼儿体质评估与促进系统
ENV = 'development'
# 智慧幼儿体质评估与促进系统/开发环境
VUE_APP_BASE_API = 'http://192.168.16.62:8080'
VUE_APP_BASE_API = 'http://192.168.16.81:8081'
#'/dev-api'
# 路由懒加载

View File

@ -105,4 +105,12 @@ export function getStudentFraction(studentId, itemId, itemScore) {
url: `system/testItemScore/getStudentFraction?studentId=${studentId}&itemId=${itemId}&itemScore=${itemScore}`,
method: 'get'
})
}
// 获取个人成绩得分
export function WgetStudentFraction(studentId, itemId, itemScore, hwfFraction) {
return request({
url: `system/testItemScore/getStudentFraction?studentId=${studentId}&itemId=${itemId}&itemScore=${itemScore}&hwfFraction=${hwfFraction}`,
method: 'get'
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
src/assets/images/bj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -27,7 +27,7 @@ export default {
name: 'HeaderSearch',
data() {
return {
search: '',
search: '搜索',
options: [],
searchPool: [],
show: false,

View File

@ -1,5 +1,5 @@
<template>
<section class="app-main">
<section class="app-main" >
<transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<router-view :key="key" />
@ -10,19 +10,26 @@
<script>
export default {
name: 'AppMain',
name: "AppMain",
data() {
return {
show: true,
};
},
computed: {
cachedViews() {
return this.$store.state.tagsView.cachedViews
return this.$store.state.tagsView.cachedViews;
},
key() {
return this.$route.path
}
}
}
return this.$route.path;
},
},
};
</script>
<style lang="scss" scoped>
.app-main {
/* 50= navbar 50 */
min-height: calc(100vh - 50px);
@ -31,7 +38,7 @@ export default {
overflow: hidden;
}
.fixed-header+.app-main {
.fixed-header + .app-main {
padding-top: 50px;
}
@ -41,7 +48,7 @@ export default {
min-height: calc(100vh - 84px);
}
.fixed-header+.app-main {
.fixed-header + .app-main {
padding-top: 84px;
}
}

View File

@ -1,33 +1,44 @@
<template>
<div class="navbar">
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
<hamburger
id="hamburger-container"
:is-active="sidebar.opened"
class="hamburger-container"
@toggleClick="toggleSideBar"
/>
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<breadcrumb
id="breadcrumb-container"
class="breadcrumb-container"
v-if="!topNav"
/>
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
<div class="right-menu">
<template v-if="device!=='mobile'">
<template v-if="device !== 'mobile'">
<search id="header-search" class="right-menu-item" />
<el-tooltip content="源码地址" effect="dark" placement="bottom">
<!-- <ruo-yi-git id="xinyilu-git" class="right-menu-item hover-effect" /> -->
</el-tooltip>
<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">
<ruo-yi-git id="xinyilu-git" class="right-menu-item hover-effect" />
</el-tooltip>-->
<el-tooltip content="文档地址" effect="dark" placement="bottom">
<!-- <ruo-yi-doc id="xinyilu-doc" class="right-menu-item hover-effect" /> -->
</el-tooltip>
<!-- <el-tooltip content="文档地址" effect="dark" placement="bottom">
<ruo-yi-doc id="xinyilu-doc" class="right-menu-item hover-effect" />
</el-tooltip> -->
<screenfull id="screenfull" class="right-menu-item hover-effect" />
<el-tooltip content="布局大小" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip>
</template>
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<el-dropdown
class="avatar-container right-menu-item hover-effect"
trigger="click"
>
<div class="avatar-wrapper">
<img :src="avatar" class="user-avatar">
<img :src="avatar" class="user-avatar" />
<i class="el-icon-caret-bottom" />
</div>
<el-dropdown-menu slot="dropdown">
@ -47,15 +58,15 @@
</template>
<script>
import { mapGetters } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb'
import TopNav from '@/components/TopNav'
import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch'
import xinyiluGit from '@/components/xinyilu/Git'
import xinyiluDoc from '@/components/xinyilu/Doc'
import { mapGetters } from "vuex";
import Breadcrumb from "@/components/Breadcrumb";
import TopNav from "@/components/TopNav";
import Hamburger from "@/components/Hamburger";
import Screenfull from "@/components/Screenfull";
import SizeSelect from "@/components/SizeSelect";
import Search from "@/components/HeaderSearch";
import xinyiluGit from "@/components/xinyilu/Git";
import xinyiluDoc from "@/components/xinyilu/Doc";
export default {
components: {
@ -66,48 +77,46 @@ export default {
SizeSelect,
Search,
xinyiluGit,
xinyiluDoc
xinyiluDoc,
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'device'
]),
...mapGetters(["sidebar", "avatar", "device"]),
setting: {
get() {
return this.$store.state.settings.showSettings
return this.$store.state.settings.showSettings;
},
set(val) {
this.$store.dispatch('settings/changeSetting', {
key: 'showSettings',
value: val
})
}
this.$store.dispatch("settings/changeSetting", {
key: "showSettings",
value: val,
});
},
},
topNav: {
get() {
return this.$store.state.settings.topNav
}
}
return this.$store.state.settings.topNav;
},
},
},
methods: {
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
this.$store.dispatch("app/toggleSideBar");
},
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/index';
this.$confirm("确定注销并退出系统吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$store.dispatch("LogOut").then(() => {
location.href = "/index";
});
})
}).catch(() => {});
}
}
}
.catch(() => {});
},
},
};
</script>
<style lang="scss" scoped>
@ -116,18 +125,18 @@ export default {
overflow: hidden;
position: relative;
background: #fff;
box-shadow: 0 1px 4px rgba(0,21,41,.08);
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
.hamburger-container {
line-height: 46px;
height: 100%;
float: left;
cursor: pointer;
transition: background .3s;
-webkit-tap-highlight-color:transparent;
transition: background 0.3s;
-webkit-tap-highlight-color: transparent;
&:hover {
background: rgba(0, 0, 0, .025)
background: rgba(0, 0, 0, 0.025);
}
}
@ -164,10 +173,10 @@ export default {
&.hover-effect {
cursor: pointer;
transition: background .3s;
transition: background 0.3s;
&:hover {
background: rgba(0, 0, 0, .025)
background: rgba(0, 0, 0, 0.025);
}
}
}

View File

@ -1,45 +1,80 @@
<template>
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<div
class="sidebar-logo-container"
:class="{ collapse: collapse }"
:style="{
backgroundColor:
sideTheme === 'theme-dark'
? variables.menuBackground
: variables.menuLightBackground,
}"
>
<transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<router-link
v-if="collapse"
key="collapse"
class="sidebar-logo-link"
to="/"
>
<img v-if="logo" :src="logo" class="sidebar-logo" />
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
<h1
v-else
class="sidebar-title"
:style="{
color:
sideTheme === 'theme-dark'
? variables.logoTitleColor
: variables.logoLightTitleColor,
}"
>
{{ title }}
</h1>
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" />
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
<h1
class="sidebar-title"
:style="{
color:
sideTheme === 'theme-dark'
? variables.logoTitleColor
: variables.logoLightTitleColor,
}"
>
{{ title }}
</h1>
</router-link>
</transition>
</div>
</template>
<script>
import logoImg from '@/assets/logo/logo.png'
import variables from '@/assets/styles/variables.scss'
import logoImg from "@/assets/logo/logo.png";
import variables from "@/assets/styles/variables.scss";
export default {
name: 'SidebarLogo',
name: "SidebarLogo",
props: {
collapse: {
type: Boolean,
required: true
}
required: true,
},
},
computed: {
variables() {
return variables;
},
sideTheme() {
return this.$store.state.settings.sideTheme
}
return this.$store.state.settings.sideTheme;
},
},
data() {
return {
title: '智慧幼儿体质评估与促进系统',
logo: logoImg
}
}
}
title: "智慧幼儿体质评估与促进系统",
logo: logoImg,
};
},
};
</script>
<style lang="scss" scoped>
@ -66,23 +101,19 @@ export default {
width: 100%;
& .sidebar-logo {
width: 18px;
height: 32px;
width: 40px;
height: 40px;
vertical-align: middle;
}
& .sidebar-title {
display: inline-block;
display: inline;
margin: 0;
color: #fff;
font-weight: 600;
line-height: 50px;
font-size: 14px;
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
vertical-align: middle;
}
}

View File

@ -1,111 +1,154 @@
<template>
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
<div
:class="classObj"
class="app-wrapper"
:style="{ '--current-color': theme }"
>
<div
v-if="device === 'mobile' && sidebar.opened"
class="drawer-bg"
@click="handleClickOutside"
/>
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<navbar />
<tags-view v-if="needTagsView" />
<div
:class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
class="main-container"
>
<div :class="show ? 'bj' : ''">
<div :class="{ 'fixed-header': fixedHeader }">
<navbar />
<tags-view v-if="needTagsView" />
</div>
<app-main />
<right-panel>
<settings />
</right-panel>
</div>
<app-main />
<right-panel>
<settings />
</right-panel>
</div>
</div>
</template>
<script>
import RightPanel from '@/components/RightPanel'
import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
import ResizeMixin from './mixin/ResizeHandler'
import { mapState } from 'vuex'
import variables from '@/assets/styles/variables.scss'
import RightPanel from "@/components/RightPanel";
import { AppMain, Navbar, Settings, Sidebar, TagsView } from "./components";
import ResizeMixin from "./mixin/ResizeHandler";
import { mapState } from "vuex";
import variables from "@/assets/styles/variables.scss";
export default {
name: 'Layout',
name: "Layout",
components: {
AppMain,
Navbar,
RightPanel,
Settings,
Sidebar,
TagsView
TagsView,
},
data() {
return {
show: true,
};
},
mixins: [ResizeMixin],
computed: {
...mapState({
theme: state => state.settings.theme,
sideTheme: state => state.settings.sideTheme,
sidebar: state => state.app.sidebar,
device: state => state.app.device,
needTagsView: state => state.settings.tagsView,
fixedHeader: state => state.settings.fixedHeader
theme: (state) => state.settings.theme,
sideTheme: (state) => state.settings.sideTheme,
sidebar: (state) => state.app.sidebar,
device: (state) => state.app.device,
needTagsView: (state) => state.settings.tagsView,
fixedHeader: (state) => state.settings.fixedHeader,
}),
classObj() {
return {
hideSidebar: !this.sidebar.opened,
openSidebar: this.sidebar.opened,
withoutAnimation: this.sidebar.withoutAnimation,
mobile: this.device === 'mobile'
}
mobile: this.device === "mobile",
};
},
variables() {
return variables;
}
},
},
created(){
this.info()
},
watch: {
$route(to, from) {
console.log(to.path, from.path);
if (to.path != "/index") {
this.show = false;
} else {
this.show = true;
}
},
},
methods: {
info(){
console.log(this.$router.path)
if (this.$router.path != "/index") {
this.show = false;
} else {
this.show = true;
}
},
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
}
}
}
this.$store.dispatch("app/closeSideBar", { withoutAnimation: false });
},
},
};
</script>
<style lang="scss" scoped>
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.bj {
background-image: url("../assets/images/bj.png");
-moz-background-size: 100% 100%;
background-size: 100% 100%;
}
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
&.mobile.openSidebar {
position: fixed;
top: 0;
}
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.fixed-header {
&.mobile.openSidebar {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$base-sidebar-width});
transition: width 0.28s;
}
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.sidebarHide .fixed-header {
width: 100%;
}
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$base-sidebar-width});
transition: width 0.28s;
}
.mobile .fixed-header {
width: 100%;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}
.sidebarHide .fixed-header {
width: 100%;
}
.mobile .fixed-header {
width: 100%;
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<div class="app-container home">
<el-row :gutter="20">
<el-col :sm="24" :lg="12" style="padding-left: 20px">
<!-- <el-row :gutter="20"> -->
<!-- <el-col :sm="24" :lg="12" style="padding-left: 20px">
<h2>新医路后台管理框架</h2>
<p>
一直想做一款后台管理系统看了很多优秀的开源项目但是发现没有合适自己的于是利用空闲休息时间开始自己写一套后台系统如此有了新医路管理系统它可以用于所有的Web应用程序如网站管理后台网站会员中心CMSCRMOA等等当然您也可以对她进行深度定制以做出更强系统所有前端后台代码封装过后十分精简易上手出错概率低同时支持移动客户端访问系统会陆续更新一些实用功能
@ -54,9 +54,9 @@
</ul>
</el-col>
</el-row>
</el-col>
</el-row>
<el-divider />
</el-col> -->
<!-- </el-row> -->
<!-- <el-divider /> -->
</div>
</template>

View File

@ -81,7 +81,7 @@
<img
src="../assets/images/rw2.png"
alt=""
style="width: 400px; height: 364px"
style="width: 400px; height: 364px; border-radius: 0 6px 6px 0"
/>
</div>

View File

@ -186,12 +186,13 @@
</el-row>
</div>
</template>
<script type="text/javascript" src="../jquery.min.js"></script>
<script>
import * as echarts from "echarts";
import student from "@/views/assembly/student.vue";
import { getRoleInfo } from "@/api/system/quality";
import { synthesize } from "@/api/system/comprehensive";
export default {
name: "comprehensive",
components: { student },
@ -322,6 +323,21 @@ export default {
myChart.setOption(option);
this.itemshow2 = false;
this.itemshow = true;
console.log(myChart.getDataURL());
// postImage();
// function postImage() {
// // .
// console.log("1");
// $.ajax({
// type: "POST",
// dataType: "json",
// url: "http://192.168.16.62:8080",
// data: { picInfo: },
// success: function () {
// alert("post!");
// },
// });
// }
}
// var myChart = echarts.init(document.getElementById("chart"));

View File

@ -1207,6 +1207,7 @@ import {
testScoreBatch,
getAllTestItemScoreInfo,
getStudentFraction,
WgetStudentFraction,
} from "@/api/system/testItemScore";
import {
tKindergartenInfo,
@ -1345,57 +1346,104 @@ export default {
},
testitems: [],
selection2: {},
//
Height: "",
};
},
created() {
this.getList();
},
methods: {
oninputscore2(item) {
if (item.itemCode == "H001") {
this.Height = item.itemScore;
}
if (item.itemScore == "") {
console.log(1);
this.form.itemScoreList.forEach((e) => {
if (e.testItemId == item.testItemId) {
e.itemFraction = "";
}
});
} else {
console.log(item);
getStudentFraction(
this.addqueryParams.studentId,
item.testItemId,
item.itemScore
).then((res) => {
this.form.itemScoreList.forEach((e) => {
if (e.testItemId == res.data.itemId) {
e.itemFraction = res.data.fraction;
}
if (item.itemCode == "W001") {
if (this.Height == "") {
this.$message.error("请先添加身高成绩!");
item.itemScore = "";
item.itemFraction = "";
} else {
WgetStudentFraction(
this.addqueryParams.studentId,
item.testItemId,
this.Height,
item.itemScore
).then((res) => {
console.log(res);
this.form.itemScoreList.forEach((e) => {
if (e.testItemId == res.data.itemId) {
e.itemFraction = res.data.fraction;
}
});
});
}
} else {
getStudentFraction(
this.addqueryParams.studentId,
item.testItemId,
item.itemScore
).then((res) => {
this.form.itemScoreList.forEach((e) => {
if (e.testItemId == res.data.itemId) {
e.itemFraction = res.data.fraction;
}
});
});
});
}
}
},
oninputscore(item) {
console.log(item);
if (item.itemCode == "H001") {
this.Height = item.itemScore;
}
if (item.itemScore == "") {
console.log(1);
this.form.itemScoreList.forEach((e) => {
if (e.itemId == item.itemId) {
e.itemFraction = "";
}
});
} else {
getStudentFraction(
this.addqueryParams.studentId,
item.itemId,
item.itemScore
).then((res) => {
this.form.itemScoreList.forEach((e) => {
if (e.itemId == res.data.itemId) {
e.itemFraction = res.data.fraction;
}
if (item.itemCode == "W001") {
if (this.Height == "") {
this.$message.error("请先添加身高成绩!");
item.itemScore = "";
item.itemFraction = "";
} else {
WgetStudentFraction(
this.addqueryParams.studentId,
item.itemId,
this.Height,
item.itemScore
).then((res) => {
console.log(res);
this.form.itemScoreList.forEach((e) => {
if (e.itemId == res.data.itemId) {
e.itemFraction = res.data.fraction;
}
});
});
}
} else {
getStudentFraction(
this.addqueryParams.studentId,
item.itemId,
item.itemScore
).then((res) => {
this.form.itemScoreList.forEach((e) => {
if (e.itemId == res.data.itemId) {
e.itemFraction = res.data.fraction;
}
});
});
});
}
}
},
handledbClick(row, event, column) {