Commit 6d7bd86229932a5de41defb9a7ddb17252985e95

Authored by 梁保满
1 parent 9309dc5d

飞书bug

public/331icon.ico 0 → 100644
No preview for this file type
public/index.html
@@ -5,13 +5,21 @@ @@ -5,13 +5,21 @@
5 <meta charset="utf-8"> 5 <meta charset="utf-8">
6 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7 <meta name="viewport" content="width=device-width,initial-scale=1.0"> 7 <meta name="viewport" content="width=device-width,initial-scale=1.0">
8 - <link rel="icon" href="<%= BASE_URL %>favicon.ico"> 8 + <!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> -->
9 <title> 9 <title>
10 <%= htmlWebpackPlugin.options.title %> 10 <%= htmlWebpackPlugin.options.title %>
11 </title> 11 </title>
12 </head> 12 </head>
13 13
14 <body> 14 <body>
  15 + <script>
  16 + var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
  17 + link.type = 'image/x-icon';
  18 + link.rel = 'shortcut icon';
  19 + var csCode = localStorage.getItem("csCode")||""
  20 + link.href = csCode?"./331icon.ico":"./favicon.ico";
  21 + document.getElementsByTagName('head')[0].appendChild(link);
  22 + </script>
15 <noscript> 23 <noscript>
16 <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. 24 <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
17 Please enable it to continue.</strong> 25 Please enable it to continue.</strong>
src/api/axios.js
@@ -56,6 +56,7 @@ service.interceptors.response.use( @@ -56,6 +56,7 @@ service.interceptors.response.use(
56 } 56 }
57 } 57 }
58 } 58 }
  59 + return
59 } else { 60 } else {
60 // Cookies.set("access_token", response.data.message, { expires: 1 / 12 }) 61 // Cookies.set("access_token", response.data.message, { expires: 1 / 12 })
61 } 62 }
@@ -64,32 +65,25 @@ service.interceptors.response.use( @@ -64,32 +65,25 @@ service.interceptors.response.use(
64 }, 65 },
65 (error) => { 66 (error) => {
66 const { data, status } = error.response; 67 const { data, status } = error.response;
67 -  
68 - Message({  
69 - message: error,  
70 - type: "error",  
71 - duration: 3 * 1000,  
72 - });  
73 if (error.response == undefined) { 68 if (error.response == undefined) {
74 return Promise.reject(error); 69 return Promise.reject(error);
75 } 70 }
76 71
77 if (status === 403 || status === 401) { 72 if (status === 403 || status === 401) {
78 if (data.status === 999) { 73 if (data.status === 999) {
79 - if (!location.href.includes("localhost")) {  
80 - if (data.data) { 74 + debugger
  75 + console.log(data.data)
  76 + if (data.data) {
81 window.location.href = data.data; 77 window.location.href = data.data;
82 - } else {  
83 - router.push({ path: "/login" });  
84 - if (res.message.includes("不存在")) {  
85 - Message({  
86 - message: data.info,  
87 - type: "error",  
88 - duration: 3 * 1000,  
89 - });  
90 - }  
91 - } 78 + } else {
  79 + Message({
  80 + message: data.info,
  81 + type: "error",
  82 + duration: 3 * 1000,
  83 + });
  84 + router.push({ path: "/login" });
92 } 85 }
  86 + return
93 } 87 }
94 Message.closeAll(); 88 Message.closeAll();
95 Message({ 89 Message({
@@ -109,6 +103,11 @@ service.interceptors.response.use( @@ -109,6 +103,11 @@ service.interceptors.response.use(
109 } 103 }
110 return; 104 return;
111 } 105 }
  106 + Message({
  107 + message: data.info || error,
  108 + type: "error",
  109 + duration: 3 * 1000,
  110 + });
112 return Promise.reject(error.response); // 返回接口返回的错误信息 111 return Promise.reject(error.response); // 返回接口返回的错误信息
113 } 112 }
114 ); 113 );
src/assets/images/331logo.png 0 → 100644

2.74 KB

src/assets/images/E/photo_cache/98d71c21c679eccd804eab61885fe378713eb851.dat deleted
No preview for this file type
src/router/index.js
@@ -220,7 +220,7 @@ let addrouters = [ //测试用,后续后端获取 @@ -220,7 +220,7 @@ let addrouters = [ //测试用,后续后端获取
220 { 220 {
221 path: "/", 221 path: "/",
222 iconCls: "fa fa-cog", 222 iconCls: "fa fa-cog",
223 - name: '学校设置', 223 + name: '学校管理',
224 component: Layout, 224 component: Layout,
225 children: [ 225 children: [
226 { 226 {
src/store/index.js
@@ -36,7 +36,7 @@ const store = new Vuex.Store({ @@ -36,7 +36,7 @@ const store = new Vuex.Store({
36 }, 36 },
37 setInfo(state, data) { 37 setInfo(state, data) {
38 state.info = { ...data }; 38 state.info = { ...data };
39 - sessionStorage.setItem("info", JSON.stringify(state.info)); 39 + sessionStorage.setItem("info", JSON.stringify(data));
40 }, 40 },
41 setRouters: (state, routers) => { 41 setRouters: (state, routers) => {
42 let aRouters = addrouters.filter((item) => { 42 let aRouters = addrouters.filter((item) => {
src/views/analysis/index.vue
@@ -136,7 +136,7 @@ export default { @@ -136,7 +136,7 @@ export default {
136 query: { 136 query: {
137 //搜索条件 137 //搜索条件
138 regionId: "", 138 regionId: "",
139 - gradeName: "", 139 + gradeName: "全部",
140 startDay: "", 140 startDay: "",
141 endDay: "", 141 endDay: "",
142 day: "", 142 day: "",
@@ -195,7 +195,7 @@ export default { @@ -195,7 +195,7 @@ export default {
195 that.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); 195 that.query.endDay = formatDate(new Date(), "yyyy-MM-dd");
196 break; 196 break;
197 case 4: 197 case 4:
198 - if (aMonth > 1 && aMonth < 4) { 198 + if (aMonth > 0 && aMonth < 4) {
199 aMonth = "01"; 199 aMonth = "01";
200 } else if (aMonth > 3 && aMonth < 7) { 200 } else if (aMonth > 3 && aMonth < 7) {
201 aMonth = "04"; 201 aMonth = "04";
@@ -239,7 +239,11 @@ export default { @@ -239,7 +239,11 @@ export default {
239 let query = {}; 239 let query = {};
240 for (let key in this.query) { 240 for (let key in this.query) {
241 if (this.query[key] != "") { 241 if (this.query[key] != "") {
242 - query[key] = this.query[key]; 242 + if (key == gradeName) {
  243 + query[key] = this.query[key]=="全部"?"":this.query[key];
  244 + } else {
  245 + query[key] = this.query[key];
  246 + }
243 } 247 }
244 } 248 }
245 if (this.role == "ROLE_JITUAN") { 249 if (this.role == "ROLE_JITUAN") {
@@ -247,7 +251,7 @@ export default { @@ -247,7 +251,7 @@ export default {
247 } else { 251 } else {
248 delete query.regionId; 252 delete query.regionId;
249 } 253 }
250 - this.tableData=[] 254 + this.tableData = [];
251 const Contrast = 255 const Contrast =
252 this.role != "ROLE_JITUAN" 256 this.role != "ROLE_JITUAN"
253 ? this.$request.usageAnalysis 257 ? this.$request.usageAnalysis
@@ -354,6 +358,10 @@ export default { @@ -354,6 +358,10 @@ export default {
354 }; 358 };
355 return gradeList; 359 return gradeList;
356 }) || []; 360 }) || [];
  361 + this.gradeList.unshift({
  362 + value: "",
  363 + label: "全部",
  364 + });
357 } else { 365 } else {
358 this.gradeList = 366 this.gradeList =
359 data.list?.map((item) => { 367 data.list?.map((item) => {
src/views/ask/analysis.vue
@@ -341,7 +341,7 @@ export default { @@ -341,7 +341,7 @@ export default {
341 if (this.editLoading) return; 341 if (this.editLoading) return;
342 this.editLoading = true; 342 this.editLoading = true;
343 const { data, status, info } = await this.$request.periodQuestionList({ 343 const { data, status, info } = await this.$request.periodQuestionList({
344 - examId: this.id, 344 + periodId: this.id,
345 }); 345 });
346 this.editLoading = false; 346 this.editLoading = false;
347 if (status === 0) { 347 if (status === 0) {
src/views/card/index.vue
@@ -100,17 +100,7 @@ export default { @@ -100,17 +100,7 @@ export default {
100 studentCode: "", 100 studentCode: "",
101 }, 101 },
102 gradeList: [], 102 gradeList: [],
103 - tableData: [  
104 - {  
105 - sn: 2543641,  
106 - className: "xxx",  
107 - studentName: "xxxx",  
108 - studentId: 563456,  
109 - type: "换卡",  
110 - desc: "xxxxx",  
111 - time: "20:00:00",  
112 - },  
113 - ], 103 + tableData: [],
114 }; 104 };
115 }, 105 },
116 created() { 106 created() {
src/views/device/index.vue
@@ -99,7 +99,7 @@ @@ -99,7 +99,7 @@
99 </div> 99 </div>
100 <el-table :data="tableData" border style="width: 100%"> 100 <el-table :data="tableData" border style="width: 100%">
101 <el-table-column 101 <el-table-column
102 - prop="deviceId" 102 + prop="sn"
103 label="设备编码" 103 label="设备编码"
104 align="center" 104 align="center"
105 ></el-table-column> 105 ></el-table-column>
@@ -126,23 +126,23 @@ @@ -126,23 +126,23 @@
126 </template> 126 </template>
127 </el-table-column> 127 </el-table-column>
128 <el-table-column 128 <el-table-column
129 - prop="otaVersionNumber" 129 + prop="otaVersionName"
130 label="固件版本号" 130 label="固件版本号"
131 align="center" 131 align="center"
132 ></el-table-column> 132 ></el-table-column>
133 <el-table-column 133 <el-table-column
134 - prop="latestReportTime" 134 + prop="onlineTime"
135 label="最近上报" 135 label="最近上报"
136 align="center" 136 align="center"
137 ></el-table-column> 137 ></el-table-column>
138 <el-table-column label="状态" align="center" 138 <el-table-column label="状态" align="center"
139 ><template slot-scope="scope"> 139 ><template slot-scope="scope">
140 {{ 140 {{
141 - scope.row.status == 1 141 + scope.row.onlineStatus == 1
142 ? "在线" 142 ? "在线"
143 - : scope.row.status == 0  
144 - ? "离线"  
145 - : "异常" 143 + : scope.row.onlineStatus == 2
  144 + ? "异常"
  145 + : "离线"
146 }} 146 }}
147 </template></el-table-column 147 </template></el-table-column
148 > 148 >
@@ -175,7 +175,7 @@ @@ -175,7 +175,7 @@
175 </el-table> 175 </el-table>
176 </div> 176 </div>
177 </div> 177 </div>
178 - <div v-if="type == 2"> 178 + <div v-else-if="type == 2">
179 <div class="chart-box" v-if="count"> 179 <div class="chart-box" v-if="count">
180 <div class="device-num"> 180 <div class="device-num">
181 <p class="p1">{{ count }}</p> 181 <p class="p1">{{ count }}</p>
@@ -235,15 +235,15 @@ @@ -235,15 +235,15 @@
235 </div> 235 </div>
236 <el-table :data="tableData" border style="width: 100%"> 236 <el-table :data="tableData" border style="width: 100%">
237 <el-table-column 237 <el-table-column
238 - prop="deviceId" 238 + prop="sn"
239 label="设备编码" 239 label="设备编码"
240 align="center" 240 align="center"
241 ></el-table-column> 241 ></el-table-column>
242 <el-table-column label="学生信息" align="center" 242 <el-table-column label="学生信息" align="center"
243 ><template slot-scope="scoped" 243 ><template slot-scope="scoped"
244 ><p 244 ><p
245 - v-for="item in scoped.row.studentList"  
246 - :key="item.studentId" 245 + v-for="(item, index) in scoped.row.studentList"
  246 + :key="index"
247 > 247 >
248 {{ item.studentName }} 248 {{ item.studentName }}
249 </p></template 249 </p></template
@@ -256,7 +256,7 @@ @@ -256,7 +256,7 @@
256 ></el-table-column> 256 ></el-table-column>
257 <el-table-column prop="class" label="关联班级" align="center"> 257 <el-table-column prop="class" label="关联班级" align="center">
258 <template slot-scope="scoped"> 258 <template slot-scope="scoped">
259 - <p v-for="item in scoped.row.classList" :key="item.classId"> 259 + <p v-for="(item, index) in scoped.row.classList" :key="index">
260 {{ item.className }} 260 {{ item.className }}
261 </p> 261 </p>
262 </template></el-table-column 262 </template></el-table-column
@@ -291,7 +291,7 @@ @@ -291,7 +291,7 @@
291 </el-table> 291 </el-table>
292 </div> 292 </div>
293 </div> 293 </div>
294 - <div v-if="type == 3"> 294 + <div v-else-if="type == 3">
295 <div class="table-box"> 295 <div class="table-box">
296 <div class="answer-header"> 296 <div class="answer-header">
297 <div class="sel-box"> 297 <div class="sel-box">
@@ -323,10 +323,10 @@ @@ -323,10 +323,10 @@
323 style="width: 100%" 323 style="width: 100%"
324 @selection-change="handleSelectionChange" 324 @selection-change="handleSelectionChange"
325 > 325 >
326 - <el-table-column type="selection" width="55"> </el-table-column> 326 + <el-table-column type="selection" width="55"></el-table-column>
327 <el-table-column prop="class" label="关联班级" align="center" 327 <el-table-column prop="class" label="关联班级" align="center"
328 ><template slot-scope="scoped"> 328 ><template slot-scope="scoped">
329 - <p v-for="item in scoped.row.classList" :key="item.classId"> 329 + <p v-for="(item, index) in scoped.row.classList" :key="index">
330 {{ item.className }} 330 {{ item.className }}
331 </p> 331 </p>
332 </template></el-table-column 332 </template></el-table-column
@@ -354,11 +354,11 @@ @@ -354,11 +354,11 @@
354 <el-table-column label="状态" align="center" 354 <el-table-column label="状态" align="center"
355 ><template slot-scope="scope"> 355 ><template slot-scope="scope">
356 {{ 356 {{
357 - scope.row.status == 1 357 + scope.row.onlineStatus == 1
358 ? "在线" 358 ? "在线"
359 - : scope.row.status == 2  
360 - ? "离线"  
361 - : "异常" 359 + : scope.row.onlineStatus == 2
  360 + ? "异常"
  361 + : "离线"
362 }} 362 }}
363 </template></el-table-column 363 </template></el-table-column
364 > 364 >
@@ -398,14 +398,14 @@ @@ -398,14 +398,14 @@
398 <el-button @click="diaUp = false">取 消</el-button> 398 <el-button @click="diaUp = false">取 消</el-button>
399 </div> 399 </div>
400 </el-dialog> 400 </el-dialog>
401 - <el-dialog title="添加答题器" :visible.sync="diaAnswerEqu" width="400"> 401 + <el-dialog title="修改基站" :visible.sync="diaAnswerEqu" width="400">
402 <el-form ref="forms" :model="form" :rules="formRules" label-width="140px"> 402 <el-form ref="forms" :model="form" :rules="formRules" label-width="140px">
403 - <el-form-item label="设备编码:" prop="number">  
404 - <el-col :span="10" 403 + <el-form-item label="设备编码:" prop="deviceId">
  404 + <el-col :span="16"
405 ><el-input 405 ><el-input
406 type="text" 406 type="text"
407 placeholder="输入设备编码" 407 placeholder="输入设备编码"
408 - v-model.trim="form.number" 408 + v-model.trim="form.deviceId"
409 maxlength="30" 409 maxlength="30"
410 size="45" 410 size="45"
411 show-word-limit 411 show-word-limit
@@ -414,7 +414,7 @@ @@ -414,7 +414,7 @@
414 ></el-col> 414 ></el-col>
415 </el-form-item> 415 </el-form-item>
416 <el-form-item label="频点:" prop="frequency"> 416 <el-form-item label="频点:" prop="frequency">
417 - <el-col :span="10" 417 + <el-col :span="16"
418 ><el-input 418 ><el-input
419 type="text" 419 type="text"
420 placeholder="输入频点" 420 placeholder="输入频点"
@@ -427,7 +427,7 @@ @@ -427,7 +427,7 @@
427 ></el-col> 427 ></el-col>
428 </el-form-item> 428 </el-form-item>
429 <el-form-item label="配对码:" prop="pairingCode"> 429 <el-form-item label="配对码:" prop="pairingCode">
430 - <el-col :span="10" 430 + <el-col :span="16"
431 ><el-input 431 ><el-input
432 type="text" 432 type="text"
433 placeholder="输入配对码" 433 placeholder="输入配对码"
@@ -439,20 +439,20 @@ @@ -439,20 +439,20 @@
439 </el-input 439 </el-input
440 ></el-col> 440 ></el-col>
441 </el-form-item> 441 </el-form-item>
442 - <el-form-item label="选择班级:" prop="classId">  
443 - <el-col :span="10"> 442 + <el-form-item label="选择班级:" prop="classIds">
  443 + <el-col :span="16">
444 <el-cascader 444 <el-cascader
445 - size="small" 445 + class="sel"
446 clearable 446 clearable
447 - v-model="form.classId" 447 + v-model="form.classIds"
448 :options="gradeList" 448 :options="gradeList"
449 - :props="{ expandTrigger: 'hover' }" 449 + :props="{ expandTrigger: 'hover',checkStrictly: true }"
450 :show-all-levels="false" 450 :show-all-levels="false"
451 ></el-cascader> 451 ></el-cascader>
452 </el-col> 452 </el-col>
453 </el-form-item> 453 </el-form-item>
454 <el-form-item label="所在教室:"> 454 <el-form-item label="所在教室:">
455 - <el-col :span="10" 455 + <el-col :span="16"
456 ><el-input 456 ><el-input
457 type="text" 457 type="text"
458 placeholder="输入所在教室" 458 placeholder="输入所在教室"
@@ -531,21 +531,21 @@ export default { @@ -531,21 +531,21 @@ export default {
531 { label: "3月以上", value: 6 }, 531 { label: "3月以上", value: 6 },
532 ], 532 ],
533 form: { 533 form: {
534 - number: "", 534 + deviceId:"",
535 frequency: "", 535 frequency: "",
536 pairingCode: "", 536 pairingCode: "",
537 - classId: "", 537 + classIds: [],
538 roomName: "", 538 roomName: "",
539 }, 539 },
540 formRules: { 540 formRules: {
541 - number: [ 541 + deviceId: [
542 { required: true, message: "请输入设备编码", trigger: "blur" }, 542 { required: true, message: "请输入设备编码", trigger: "blur" },
543 ], 543 ],
544 frequency: [{ required: true, message: "请输入频点", trigger: "blur" }], 544 frequency: [{ required: true, message: "请输入频点", trigger: "blur" }],
545 pairingCode: [ 545 pairingCode: [
546 { required: true, message: "请输入配对码", trigger: "blur" }, 546 { required: true, message: "请输入配对码", trigger: "blur" },
547 ], 547 ],
548 - classId: [{ required: true, message: "请选择班级", trigger: "blur" }], 548 + classIds: [{ required: true, message: "请选择班级", trigger: "blur" }],
549 }, 549 },
550 tableData: [], 550 tableData: [],
551 total: 0, 551 total: 0,
@@ -573,7 +573,19 @@ export default { @@ -573,7 +573,19 @@ export default {
573 } 573 }
574 }, 574 },
575 methods: { 575 methods: {
576 - edit() {}, 576 + edit(obj) {
  577 + for(let key in this.form){
  578 + if(key=="classIds"){
  579 + this.form[key] = obj.classList?.map(item=>{
  580 + return [item.classId]
  581 + })
  582 + }else{
  583 + this.form[key] = obj[key]
  584 +
  585 + }
  586 + }
  587 + this.diaAnswerEqu=true
  588 + },
577 linkTo(obj, type) { 589 linkTo(obj, type) {
578 this.$router.push({ 590 this.$router.push({
579 path: "/deviceLog", 591 path: "/deviceLog",
@@ -700,17 +712,28 @@ export default { @@ -700,17 +712,28 @@ export default {
700 }, 712 },
701 713
702 // 添加设备 714 // 添加设备
703 - async addAnswerEqu() {  
704 - if (this.loadingAnswerEqu) return;  
705 - this.loadingAnswerEqu = true;  
706 - const { data, status, info } = await this.$request.fetchgradeList();  
707 - this.loadingAnswerEqu = false;  
708 - console.log(status);  
709 - if (status === 0) {  
710 - this._QueryData();  
711 - } else {  
712 - this.$message.error(info);  
713 - } 715 + addAnswerEqu() {
  716 + this.$refs.forms.validate(async (valid) => {
  717 + if (valid) {
  718 + if (this.loadingAnswerEqu) return;
  719 + this.loadingAnswerEqu = true;
  720 + let query = {...this.form}
  721 + query.classIds = query.classIds.map(item=>{
  722 + return item[1]
  723 + })
  724 + const { data, status, info } = await this.$request.updateDevice({...query});
  725 + this.loadingAnswerEqu = false;
  726 + console.log(status);
  727 + if (status === 0) {
  728 + this.diaAnswerEqu=false
  729 + this._QueryData();
  730 + } else {
  731 + this.$message.error(info);
  732 + }
  733 + } else {
  734 + this.$message.warning("数据有误,请检查!");
  735 + }
  736 + });
714 }, 737 },
715 // 查找班级 738 // 查找班级
716 async _QueryGradeList() { 739 async _QueryGradeList() {
@@ -883,6 +906,7 @@ export default { @@ -883,6 +906,7 @@ export default {
883 this.role != "ROLE_JITUAN" 906 this.role != "ROLE_JITUAN"
884 ? this.$request.deviceList 907 ? this.$request.deviceList
885 : this.$request.tenantDeviceList; 908 : this.$request.tenantDeviceList;
  909 + this.tableData = [];
886 const { data, status, info } = await deviceList({ 910 const { data, status, info } = await deviceList({
887 ...query, 911 ...query,
888 deviceType: this.type, 912 deviceType: this.type,
@@ -912,6 +936,9 @@ export default { @@ -912,6 +936,9 @@ export default {
912 .tab-box { 936 .tab-box {
913 margin-bottom: 12px; 937 margin-bottom: 12px;
914 } 938 }
  939 +.sel{
  940 + width:100%;
  941 +}
915 .content { 942 .content {
916 background: #f8f8f8; 943 background: #f8f8f8;
917 border: 1px solid #e2e2e2; 944 border: 1px solid #e2e2e2;
src/views/device/log.vue
@@ -203,7 +203,7 @@ export default { @@ -203,7 +203,7 @@ export default {
203 that.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); 203 that.query.endDay = formatDate(new Date(), "yyyy-MM-dd");
204 break; 204 break;
205 case 4: 205 case 4:
206 - if (aMonth > 1 && aMonth < 4) { 206 + if (aMonth > 0 && aMonth < 4) {
207 aMonth = "01"; 207 aMonth = "01";
208 } else if (aMonth > 3 && aMonth < 7) { 208 } else if (aMonth > 3 && aMonth < 7) {
209 aMonth = "04"; 209 aMonth = "04";
src/views/layout/aside/aside.vue
@@ -2,15 +2,12 @@ @@ -2,15 +2,12 @@
2 <div class="aside-box"> 2 <div class="aside-box">
3 <el-aside id="asideNav"> 3 <el-aside id="asideNav">
4 <div class="logo-name"> 4 <div class="logo-name">
5 - <img  
6 - v-if="$store.getters.logoShow"  
7 - class="logo"  
8 - src="../../../assets/images/logo.png"  
9 - alt=""  
10 - /> 5 + <img v-if="$store.getters.logoShow" class="logo" :src="code?csLogo:logo" alt="" />
11 <template v-else> 6 <template v-else>
12 - <img class="logo" src="../../../assets/images/logo.png" alt="" />  
13 - <p class="ellipsis">中天易教中天易教中天易教</p> 7 + <img class="logo" :src="code?csLogo:logo" alt="" />
  8 + <p class="ellipsis">
  9 + {{ code ? "331互动课堂云平台" : "中天易教云平台" }}
  10 + </p>
14 </template> 11 </template>
15 </div> 12 </div>
16 <el-menu 13 <el-menu
@@ -39,7 +36,12 @@ @@ -39,7 +36,12 @@
39 36
40 <menu-tree :menuData="item.children"></menu-tree> 37 <menu-tree :menuData="item.children"></menu-tree>
41 </el-submenu> 38 </el-submenu>
42 - <el-menu-item :index="item.path" v-else :key="item.path" :class="path.includes(item.path)?'is-active':''"> 39 + <el-menu-item
  40 + :index="item.path"
  41 + v-else
  42 + :key="item.path"
  43 + :class="path.includes(item.path) ? 'is-active' : ''"
  44 + >
43 <i :class="item.iconCls ? item.iconCls : [fa, fa - file]" /> 45 <i :class="item.iconCls ? item.iconCls : [fa, fa - file]" />
44 <span slot="title">{{ item.name }}</span> 46 <span slot="title">{{ item.name }}</span>
45 </el-menu-item> 47 </el-menu-item>
@@ -52,7 +54,9 @@ @@ -52,7 +54,9 @@
52 54
53 <script> 55 <script>
54 import menuTree from "./menuTree"; 56 import menuTree from "./menuTree";
55 - 57 +import { getURLParams } from "@/utils";
  58 +const logo = require('../../../assets/images/logo.png')
  59 +const csLogo = require('../../../assets/images/331logo.png')
56 export default { 60 export default {
57 name: "asideNav", 61 name: "asideNav",
58 components: { 62 components: {
@@ -62,16 +66,20 @@ export default { @@ -62,16 +66,20 @@ export default {
62 // 监听浏览器直接输入路由,将此路由添加到tabnavBox 66 // 监听浏览器直接输入路由,将此路由添加到tabnavBox
63 "$route.path": function (val) { 67 "$route.path": function (val) {
64 // this.selectmenu(val); 68 // this.selectmenu(val);
65 - this.path = val 69 + this.path = val;
66 }, 70 },
67 }, 71 },
68 - data(){ 72 + data() {
69 return { 73 return {
70 - path:""  
71 - } 74 + path: "",
  75 + code: "",
  76 + logo:logo,
  77 + csLogo:csLogo,
  78 + };
72 }, 79 },
73 - created(){  
74 - this.path = this.$route.path 80 + created() {
  81 + this.code = getURLParams("code") || localStorage.getItem("csCode") || "";
  82 + this.path = this.$route.path;
75 }, 83 },
76 methods: { 84 methods: {
77 selectmenu(key, indexpath) { 85 selectmenu(key, indexpath) {
@@ -125,8 +133,8 @@ $right: right; @@ -125,8 +133,8 @@ $right: right;
125 #{$side}-#{$prop}: $value; 133 #{$side}-#{$prop}: $value;
126 } 134 }
127 } 135 }
128 -.aside-box{  
129 - max-width:200px; 136 +.aside-box {
  137 + max-width: 200px;
130 } 138 }
131 #asideNav { 139 #asideNav {
132 width: auto !important; 140 width: auto !important;
@@ -192,7 +200,7 @@ $right: right; @@ -192,7 +200,7 @@ $right: right;
192 } 200 }
193 } 201 }
194 } 202 }
195 -:deep(.is-active){  
196 - color:#fff 203 +:deep(.is-active) {
  204 + color: #fff;
197 } 205 }
198 </style> 206 </style>
src/views/layout/layout.vue
@@ -38,7 +38,7 @@ export default { @@ -38,7 +38,7 @@ export default {
38 }; 38 };
39 }, 39 },
40 created() { 40 created() {
41 - this.initRouter(); 41 + // this.initRouter();
42 }, 42 },
43 methods: { 43 methods: {
44 initRouter() { 44 initRouter() {
@@ -55,46 +55,7 @@ export default { @@ -55,46 +55,7 @@ export default {
55 code: this.code, 55 code: this.code,
56 }; 56 };
57 } 57 }
58 - // const { data = {}, message, code } = await loginCheck(params);  
59 - // if (code === 0) {  
60 - // if (data) {  
61 - const userInfo = {  
62 - permissions: [  
63 - {  
64 - role: "superAdmin",  
65 - roleName: "超级管理员",  
66 - },  
67 - ],  
68 - name: "李老师",  
69 - // avatar: data.avatar ? data.avatar : "",  
70 - // uid: data.id,  
71 - authorityRouter: [  
72 - "examinationPaper",  
73 - "examinationPaperAdd",  
74 - "examinationPaperEdit",  
75 - "examinationPaperRecycle",  
76 - "ask",  
77 - "askAnalysis",  
78 - "test",  
79 - "testAnalysis",  
80 - ],  
81 - };  
82 - await this.$store.commit("setInfo", { ...userInfo });  
83 - await this.$store.commit("setRouters", userInfo.authorityRouter);  
84 - let newAddRouters = this.$store.getters.addRouters;  
85 - newAddRouters.forEach((res) => {  
86 - this.$router.addRoute(res);  
87 - });  
88 - this.$router.addRoute({  
89 - path: "*",  
90 - redirect: "/404",  
91 - hidden: true,  
92 - children: [],  
93 - });  
94 - // }  
95 - // } else {  
96 - // this.$message.error(message);  
97 - // } 58 + this.$store.dispatch("CSLogin", this.code);
98 }, 59 },
99 }, 60 },
100 }; 61 };
src/views/login/index.vue
1 -<template>  
2 - <div class="login-container"> 1 +// <template>
  2 + <div class="login-container" v-loading="loading" element-loading-text="努力加载中...">
3 <el-form 3 <el-form
  4 + v-if="!code && !dockkey"
4 ref="loginForm" 5 ref="loginForm"
5 :model="loginForm" 6 :model="loginForm"
6 :rules="loginRules" 7 :rules="loginRules"
@@ -88,22 +89,26 @@ import { getURLParams } from &quot;@/utils&quot;; @@ -88,22 +89,26 @@ import { getURLParams } from &quot;@/utils&quot;;
88 export default { 89 export default {
89 data() { 90 data() {
90 return { 91 return {
  92 + loading:false,
91 disableClick: true, 93 disableClick: true,
92 passwordType: "password", 94 passwordType: "password",
93 loginForm: { 95 loginForm: {
94 // username: "15911715665", 96 // username: "15911715665",
95 // password: "Csiy88888", 97 // password: "Csiy88888",
96 - // username: "13610050254",  
97 - // password: "Pw050254#", 98 + username: "13610050254",
  99 + password: "Pw050254#",
98 // username: "18332123505", 100 // username: "18332123505",
99 // password: "Pw123505#", 101 // password: "Pw123505#",
  102 + // username: "18687826606",
  103 + // password: "Pw826606#",
100 // username: "18946034886", 104 // username: "18946034886",
101 // password: "Pw034886#", 105 // password: "Pw034886#",
102 // username: "18893712576", 106 // username: "18893712576",
103 // password: "Pw712576#", 107 // password: "Pw712576#",
104 - username: "13247726488",  
105 - password: "726488",  
106 - 108 + // username: "13247726488",
  109 + // password: "726488",
  110 + // username: "13319607658",
  111 + // password: "Pw607658#",
107 }, 112 },
108 loginRules: { 113 loginRules: {
109 username: [ 114 username: [
@@ -123,7 +128,8 @@ export default { @@ -123,7 +128,8 @@ export default {
123 this.code = getURLParams("code") || localStorage.getItem("csCode") || ""; 128 this.code = getURLParams("code") || localStorage.getItem("csCode") || "";
124 this.dockkey = getURLParams("dockkey") || ""; 129 this.dockkey = getURLParams("dockkey") || "";
125 if (this.code || this.dockkey) { 130 if (this.code || this.dockkey) {
126 - this._LoginCheck(); 131 + this.loading = true
  132 + // this._LoginCheck();
127 } 133 }
128 }, 134 },
129 methods: { 135 methods: {
@@ -188,7 +194,7 @@ $cursor: #000; @@ -188,7 +194,7 @@ $cursor: #000;
188 border-radius: 0px; 194 border-radius: 0px;
189 font-size: 16px; 195 font-size: 16px;
190 color: $light_gray; 196 color: $light_gray;
191 - height:48px; 197 + height: 48px;
192 line-height: 48px; 198 line-height: 48px;
193 caret-color: $cursor; 199 caret-color: $cursor;
194 &:-webkit-autofill { 200 &:-webkit-autofill {
src/views/setUp/conglomerate.vue
@@ -190,7 +190,7 @@ @@ -190,7 +190,7 @@
190 </el-option> 190 </el-option>
191 </el-select> 191 </el-select>
192 </el-form-item> 192 </el-form-item>
193 - <el-form-item label="学段:"> 193 + <el-form-item label="学段:" prop="sections">
194 <el-checkbox-group v-model="formSchool.sections"> 194 <el-checkbox-group v-model="formSchool.sections">
195 <el-checkbox :label="1">小学</el-checkbox> 195 <el-checkbox :label="1">小学</el-checkbox>
196 <el-checkbox :label="2">初中</el-checkbox> 196 <el-checkbox :label="2">初中</el-checkbox>
@@ -446,7 +446,7 @@ export default { @@ -446,7 +446,7 @@ export default {
446 this.$message.error(info); 446 this.$message.error(info);
447 } 447 }
448 } else { 448 } else {
449 - this.$message.error("学校名称数据有误,请检查!"); 449 + this.$message.error("数据有误,请检查!");
450 return false; 450 return false;
451 } 451 }
452 }); 452 });
src/views/setUp/student.vue
@@ -422,7 +422,6 @@ export default { @@ -422,7 +422,6 @@ export default {
422 max-height: 80vh; 422 max-height: 80vh;
423 .h-title { 423 .h-title {
424 height: 40px; 424 height: 40px;
425 - overflow-y: scroll;  
426 line-height: 40px; 425 line-height: 40px;
427 background: #eee; 426 background: #eee;
428 } 427 }
@@ -451,6 +450,7 @@ export default { @@ -451,6 +450,7 @@ export default {
451 } 450 }
452 &.active { 451 &.active {
453 color: #667ffd; 452 color: #667ffd;
  453 + background: #eee;
454 } 454 }
455 } 455 }
456 .sel { 456 .sel {