OnePsycho 1 year ago
parent
commit
cccfc83669

+ 1 - 1
TEAMModelOS/ClientApp/package.json

@@ -83,7 +83,7 @@
     "vuex": "^3.0.1",
     "vuex-oidc": "^3.3.0",
     "vuex-router-sync": "^5.0.0",
-    "wangeditor": "4.4.1",
+    "wangeditor": "^4.4.1",
     "webpack": "^4.46.0",
     "xlsx": "^0.17.1"
   },

+ 4 - 2
TEAMModelOS/ClientApp/src/components/public/frontEndMain/Index.vue

@@ -90,8 +90,8 @@
 <template>
     <div id="login" :class="[isShowZY ? 'login zylogin':'login']" :style="{backgroundImage:bgImg}">
         <div class="login-mark" v-show="isShowTMD">
-            <img height="42" src="@/assets/login/ies5_logo_2.svg">
-            <span class="login-title">
+            <img height="30" src="@/assets/login/ies5_logo_2.svg">
+            <span class="login-title" v-if="!queryCode">
                 {{$t('system.title')}}
             </span>
         </div>
@@ -136,6 +136,7 @@ export default {
             version: '',
             isShowTMD: false,
             isShowZY: false,
+            queryCode:''
         }
     },
     computed: {
@@ -164,6 +165,7 @@ export default {
     created() {
         let queryData = this.$route.query
         console.log(this.$route)
+        this.queryCode = queryData.code
         // 統一處理預設登入學校
         this.setLoginSchoolCode()
         this.$api.login.getSystemInfo({}).then(

+ 2 - 2
TEAMModelOS/ClientApp/src/view/art/AreaArt.vue

@@ -613,10 +613,10 @@
 				this.$api.elegant
 					.findElegantStatistics({
 						scope: "area",
-						code: sessionStorage.getItem("areaId")
+						code: sessionStorage.getItem("areaId"),
+						periodType: this.periodId
 					})
 					.then((res) => {
-						console.log(res);
 						this.artBarData = res.schoolDatas.map((school) => {
 							return {
 								name: school.name,

+ 76 - 71
TEAMModelOS/ClientApp/src/view/elegant/BaseElegantDash.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="elegant-dash-container">
-        <Spin fix v-if="isLoading"></Spin>
+		<Spin fix v-if="isLoading"></Spin>
 		<!-- <div class="title">
 			<span>数据总览</span>
 			<span class="btn-details" @click="goDetails">数据详情 ></span>
@@ -9,32 +9,32 @@
 			<div class="count-item">
 				<p class="label">全部活动数</p>
 				<p class="value">{{ countArr[0] }}</p>
-                <img src="../../assets/source/folder.png">
+				<img src="../../assets/source/folder.png" />
 			</div>
 			<div class="count-item">
 				<p class="label">德育风采数</p>
 				<p class="value">{{ countArr[1] }}</p>
-                <img src="../../assets/mark/5.png" style="width: 70px">
+				<img src="../../assets/mark/5.png" style="width: 70px" />
 			</div>
 			<div class="count-item">
 				<p class="label">艺术特色数</p>
 				<p class="value">{{ countArr[2] }}</p>
-                <img src="../../assets/mark/7.png" style="width: 70px">
+				<img src="../../assets/mark/7.png" style="width: 70px" />
 			</div>
 			<div class="count-item">
 				<p class="label">图片总数</p>
 				<p class="value">{{ countArr[3] }}</p>
-                <img src="../../assets/source/image.png">
+				<img src="../../assets/source/image.png" />
 			</div>
 			<div class="count-item">
 				<p class="label">视频总数</p>
 				<p class="value">{{ countArr[4] }}</p>
-                <img src="../../assets/source/video.png">
+				<img src="../../assets/source/video.png" />
 			</div>
 			<div class="count-item">
 				<p class="label">文档总数</p>
 				<p class="value">{{ countArr[5] }}</p>
-                <img src="../../assets/source/pdf.png">
+				<img src="../../assets/source/pdf.png" />
 			</div>
 		</div>
 		<div class="chart-wrap">
@@ -46,12 +46,12 @@
 					<BasePie echartsId="pie1" :echartData="artCount"></BasePie>
 				</div>
 			</div>
-            <div class="chart-block" style="margin: 0 1%;width: 26%">
+			<div class="chart-block" style="margin: 0 1%; width: 26%">
 				<div class="chart-title">
 					<p class="title">艺术特色素材文字云</p>
 				</div>
 				<div class="chart-content">
-                    <BaseElegantCloud echartsId="cloud1" :echartData="keyCounts"></BaseElegantCloud>
+					<BaseElegantCloud echartsId="cloud1" :echartData="keyCounts"></BaseElegantCloud>
 				</div>
 			</div>
 			<div class="chart-block chart-right">
@@ -64,7 +64,7 @@
 			</div>
 		</div>
 		<div class="chart-wrap">
-			<div class="chart-block" style="width: 26%;">
+			<div class="chart-block" style="width: 26%">
 				<div class="chart-title">
 					<p class="title">德育风采素材类型</p>
 				</div>
@@ -72,7 +72,7 @@
 					<BasePie echartsId="pie2" :echartData="elegantCount"></BasePie>
 				</div>
 			</div>
-			<div class="chart-block"  style="margin: 0 1%;width: 26%">
+			<div class="chart-block" style="margin: 0 1%; width: 26%">
 				<div class="chart-title">
 					<p class="title">德育风采素材文字云</p>
 				</div>
@@ -126,63 +126,68 @@
 	import BaseUploadLine from "./BaseUploadLine.vue";
 	import BaseElegantCloud from "./BaseElegantCloud.vue";
 	export default {
-		props:['schoolCode'],
+		props: ["schoolCode"],
 		components: {
 			BasePie,
 			BaseBar,
 			BaseUploadLine,
-            BaseElegantCloud
+			BaseElegantCloud
+		},
+		data() {
+			return {
+				isLoading: false,
+				elegantCount: [],
+				artCount: [],
+				keyCounts: [],
+				countArr: [0, 0, 0, 0, 0, 0]
+			};
+		},
+		created() {
+			this.initDash();
 		},
-        data(){
-            return {
-                isLoading:false,
-                elegantCount:[],
-                artCount:[],
-                keyCounts:[],
-                countArr:[0,0,0,0,0,0]
-            }
-        },
-        created(){
-            this.isLoading = true
-            this.$api.elegant.findElegantStatistics({
-                "scope": "school",
-                "code": this.schoolCode || localStorage.getItem("login_schoolCode")
-            })
-            .then((res) => {
-                console.log(res);
-                this.isLoading = false
-                let artItems = ['艺术特色','课程活动','艺术社团','艺术活动',"理想信念","社会责任","行为习惯","演奏", "影视", "舞蹈", "戏剧", "常规活动", "获奖活动"]
-                let elegantItems = ['德育风采',"理想信念","社会责任","行为习惯","读书分享","思想沙龙","文学创作","社会服务","文化交流","思德教育","反思日志","小组合作","行为习惯挑战"]
-                let elegantCount = elegantItems.map(item => {
-                    return {
-                        name:item,
-                        count: res.items.find(i => i.id === item) ? res.items.find(i => i.id === item).count : 0
-                    }
-                })
-                let artCount = artItems.map(item => {
-                    return {
-                        name:item,
-                        count: res.items.find(i => i.id === item) ? res.items.find(i => i.id === item).count : 0
-                    }
-                })
-                this.keyCounts = res.itemKeys
-                this.elegantCount = elegantCount
-                this.artCount = artCount
-                console.error(artCount)
-                this.countArr = [
-                    elegantCount[0].count + artCount[0].count,
-                    elegantCount[0].count,
-                    artCount[0].count,
-                    res.imageCount,
-                    res.videoCount,
-                    res.docCount
-                ]
-            });
-        },
 		methods: {
+			initDash() {
+				this.isLoading = true;
+				this.$api.elegant
+					.findElegantStatistics({
+						scope: "school",
+						code: this.schoolCode || localStorage.getItem("login_schoolCode"),
+						periodId: this.$store.state.user.curPeriod.id
+					})
+					.then((res) => {
+						console.log(res);
+						this.isLoading = false;
+						let artItems = ["艺术特色", "课程活动", "艺术社团", "艺术活动", "理想信念", "社会责任", "行为习惯", "演奏", "影视", "舞蹈", "戏剧", "常规活动", "获奖活动"];
+						let elegantItems = ["德育风采", "理想信念", "社会责任", "行为习惯", "读书分享", "思想沙龙", "文学创作", "社会服务", "文化交流", "思德教育", "反思日志", "小组合作", "行为习惯挑战"];
+						let elegantCount = elegantItems.map((item) => {
+							return {
+								name: item,
+								count: res.items.find((i) => i.id === item) ? res.items.find((i) => i.id === item).count : 0
+							};
+						});
+						let artCount = artItems.map((item) => {
+							return {
+								name: item,
+								count: res.items.find((i) => i.id === item) ? res.items.find((i) => i.id === item).count : 0
+							};
+						});
+						this.keyCounts = res.itemKeys;
+						this.elegantCount = elegantCount;
+						this.artCount = artCount;
+						this.countArr = [elegantCount[0].count + artCount[0].count, elegantCount[0].count, artCount[0].count, res.imageCount, res.videoCount, res.docCount];
+					});
+			},
 			goDetails() {
 				this.$emit("goDetails");
 			}
+		},
+		watch: {
+			"$store.state.user.curSemester": {
+				deep: true,
+				handler(n, old) {
+					this.initDash();
+				}
+			}
 		}
 	};
 </script>
@@ -220,7 +225,7 @@
 				flex-direction: column;
 				justify-content: space-between;
 				padding: 20px;
-                position: relative;
+				position: relative;
 				.label {
 					font-size: 14px;
 					color: #818181;
@@ -232,13 +237,13 @@
 					color: #0d78be;
 					letter-spacing: 1px;
 				}
-                img{
-                    width: 60px;
-                    position: absolute;
-                    bottom: 20px;
-                    right: 20px;
-                    opacity: .3;
-                }
+				img {
+					width: 60px;
+					position: absolute;
+					bottom: 20px;
+					right: 20px;
+					opacity: 0.3;
+				}
 			}
 		}
 		.chart-wrap {
@@ -258,14 +263,14 @@
 
 				.title {
 					font-size: 14px;
-                    display: flex;
-                    align-items: center;
+					display: flex;
+					align-items: center;
 					&::before {
 						content: "";
 						display: inline-block;
 						border: 3px solid #0d78be;
 						border-radius: 4px;
-                        height: 14px;
+						height: 14px;
 						margin-right: 10px;
 					}
 				}
@@ -277,7 +282,7 @@
 			}
 
 			.chart-right {
-                flex:1;
+				flex: 1;
 				// width: 71%;
 				// margin-left: 1%;
 			}

+ 24 - 11
TEAMModelOS/ClientApp/src/view/elegant/Elegant.vue

@@ -4,8 +4,8 @@
 		<div class="elegant-details-box">
 			<div class="container-title">
 				<div style="display: flex; align-items: center">
-					<span>{{isShowDash ? '数据总览' : '数据详情'}}</span>
-					<span class="btn-details" @click="isShowDash = !isShowDash">{{!isShowDash ? '数据总览' : '数据详情'}} ></span>
+					<span>{{ isShowDash ? "数据总览" : "数据详情" }}</span>
+					<span class="btn-details" @click="isShowDash = !isShowDash">{{ !isShowDash ? "数据总览" : "数据详情" }} ></span>
 				</div>
 				<div class="tools">
 					<Button shape="circle" @click="onAddElegant" icon="md-add">添加素材</Button>
@@ -175,7 +175,7 @@
 				isLoading: false,
 				allList: [],
 				typeList: [],
-				filterVal: ['0'],
+				filterVal: ["0"],
 				props: {
 					multiple: false,
 					value: "id",
@@ -317,22 +317,23 @@
 			};
 		},
 		created() {
-			this.typeList = this._.cloneDeep(this.bizTypeData)
+			this.typeList = this._.cloneDeep(this.bizTypeData);
 			this.typeList.unshift({
 				value: "0",
 				label: "全部素材",
-				children:[]
-			})
+				children: []
+			});
 			this.schoolProfile = JSON.parse(decodeURIComponent(localStorage.school_profile || "{}", "utf-8"));
 			this.$api.elegant
 				.findElegants({
 					admin: "1", //表示管理列表,其他则只获取有效的publish
+					periodId: this.$store.state.user.curPeriod.id,
 					stime: null, //可选
 					etime: null //可选
 				})
 				.then((res) => {
 					this.originList = res.elegants.reverse();
-					this.onFilterTypeChange(['0']);
+					this.onFilterTypeChange(["0"]);
 					this.getTargetList();
 				});
 		},
@@ -362,9 +363,9 @@
 				excel.export_array_to_excel(params);
 				this.isLoading = false;
 			},
-			onFilterTypeChange(val,origin) {
-				let lastLabel = origin ? origin[origin.length - 1].label : ''
-				this.elegantList = val.includes('0') ? this._.cloneDeep(this.originList) : this.originList.filter((i) => i.bizType && i.bizType.includes(lastLabel));
+			onFilterTypeChange(val, origin) {
+				let lastLabel = origin ? origin[origin.length - 1].label : "";
+				this.elegantList = val.includes("0") ? this._.cloneDeep(this.originList) : this.originList.filter((i) => i.bizType && i.bizType.includes(lastLabel));
 			},
 			onPreview(file) {
 				let fullLink = this.getFullPath(file.url);
@@ -578,6 +579,7 @@
 					params.type = "school";
 					params.startTime = 111;
 					params.endTime = 222;
+					params.periodId = this.curPeriod.id;
 					this.$api.elegant.upsertElegants(params).then((res) => {
 						if (!res.error) {
 							this.btnLoading = false;
@@ -692,7 +694,18 @@
 			"$store.state.user.curSemester": {
 				deep: true,
 				handler(n, old) {
-					this.getTargetList();
+					this.$api.elegant
+						.findElegants({
+							admin: "1", //表示管理列表,其他则只获取有效的publish
+							periodId: this.$store.state.user.curPeriod.id,
+							stime: null, //可选
+							etime: null //可选
+						})
+						.then((res) => {
+							this.originList = res.elegants.reverse();
+							this.onFilterTypeChange(["0"]);
+							this.getTargetList();
+						});
 				}
 			}
 		}

+ 19 - 2
TEAMModelOS/ClientApp/src/view/login/page/Student.less

@@ -21,6 +21,23 @@
             
         }
     }
+
+    .query-school-info{
+        position: absolute;
+        top: 40px;
+        left: auto;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        font-size: 50px;
+        color: #fff;
+        padding-bottom: 20px;
+        margin-bottom: 10px;
+
+        img {
+            margin-right: 15px;
+        }
+    }
 }
 .errlable{
     text-align: right;
@@ -182,7 +199,7 @@
 }
 .left-box {
     padding: 0px 70px;
-    height: 480px;
+    height: 430px;
     display: flex;
     align-items: center;
     justify-content: center;
@@ -194,7 +211,7 @@
     // box-shadow: -2px 0px 15px 0px rgba(75, 113, 136, 0.9);
     display: flex;
     // align-items: center;
-    height: 431px;
+    height: 380px;
     min-width: 600px;
 }
 .student-login-img {

+ 10 - 7
TEAMModelOS/ClientApp/src/view/login/page/Student.vue

@@ -116,10 +116,14 @@
 		<div class="left-box">
 			<!-- 这张图片需要裁剪顶部 -->
 			<img src="@/assets/login/icon_student.svg" class="student-login-img" style="margin-top: -30px" />
-			<p class="client-label">
+			<p class="client-label" v-if="!queryCode">
 				{{ $t("login.stuCli") }}
 			</p>
 		</div>
+		<div class="query-school-info" v-if="queryCode">
+			<img :src="querySchoolInfo.picture" alt="" srcset="" width="60px" />
+			<span>{{ querySchoolInfo.name }}</span>
+		</div>
 		<div class="right-box">
 			<!-- 醍摩豆表单登录 -->
 			<div v-show="!qrloginFlag && !queryCode" class="tmd-login-box">
@@ -229,10 +233,9 @@
 			</div>
 			<!-- 校内账号登录 -->
 			<div class="school-login-box">
-				<div class="school-info" v-if="queryCode">
-					<img :src="querySchoolInfo.picture" alt="" srcset="" width="40px" />
-					<span>{{ querySchoolInfo.name }}</span>
-				</div>
+				<!-- <div class="school-info" v-if="queryCode">
+					{{ $t("login.stuCli") }}
+				</div> -->
 				<p class="teacher-login-title">{{ $t("login.title.schoolLogin") }}</p>
 				<p class="teacher-login-decr">{{ $t("login.subTitle.schoolLogin") }}</p>
 				<Form class="loginForm" ref="studForm" :model="studForm" :rules="studRule" :show-message="false" @keydown.enter.native="loginSubmit('studForm')">
@@ -264,9 +267,9 @@
 					<Checkbox v-model="isRememberForm" style="color: #fff; float: right">{{ $t("login.title.rememberPsw") }}</Checkbox>
 				</Form>
 				<!-- 三方登录 -->
-				<Divider class="login-divider" style="margin-top: 24px">{{ $t("login.communy.title") }}</Divider>
+				<Divider class="login-divider" style="margin-top: 34px">{{ $t("login.communy.title") }}</Divider>
 				<div class="other-login-box" style="margin-top: 0px; display: flex; flex-direction: column; align-items: center">
-					<p style="color: #39d0e4; cursor: pointer" @click="queryCode = null" v-if="queryCode">{{ $t("schoolBaseInfo.goNormalLogin") }}</p>
+					<!-- <p style="color: #39d0e4; cursor: pointer" @click="queryCode = null" v-if="queryCode">{{ $t("schoolBaseInfo.goNormalLogin") }}</p> -->
 					<!-- 教育雲 -->
 					<div class="other-login-item" @click="oauthLogin('educloudtwl')" v-if="srvAdr == 'Global'">
 						<v-icon iconClass="educloudtw" class="icon-educlowudtw"></v-icon>