Commit 560c12f202d2440c2af8154c8f7a3c8c8a92cf77

Authored by 阿宝
1 parent 23a6dc5f

学校设置,软件下载

src/api/apis/setUp.js renamed to src/api/apis/apis.js
1 1
2 import service from "../axios" 2 import service from "../axios"
3 -import setUpUrls from "../urls/setUp" 3 +import setUpUrls from "../urls/apis"
4 4
5 export default { 5 export default {
6 // 学校管理员首页数据 6 // 学校管理员首页数据
  7 + teacherIndex(data) {
  8 + return service({
  9 + url: setUpUrls.teacherIndex,
  10 + method: 'POST',
  11 + data
  12 + })
  13 + },
  14 + // 学校管理员首页数据
7 schoolIndex(data) { 15 schoolIndex(data) {
8 return service({ 16 return service({
9 url: setUpUrls.schoolIndex, 17 url: setUpUrls.schoolIndex,
src/api/apis/device.js deleted
1 -  
2 -import service from "../axios"  
3 -import deviceUrls from "../urls/device"  
4 -  
5 -export default {  
6 - // 下载设备模板  
7 - downDevice(data) {  
8 - return service({  
9 - url: deviceUrls.downDevice,  
10 - method: 'POST',  
11 - data  
12 - })  
13 - },  
14 - // 设备列表  
15 - fetchDeviceList(data) {  
16 - return service({  
17 - url: deviceUrls.deviceList,  
18 - method: 'POST',  
19 - data  
20 - })  
21 - },  
22 - // autoUpDate  
23 - autoUpDate(data) {  
24 - return service({  
25 - url: deviceUrls.autoUpDate,  
26 - method: 'POST',  
27 - data  
28 - })  
29 - },  
30 - // 设备列表  
31 - stopUpdate(data) {  
32 - return service({  
33 - url: deviceUrls.stopUpdate,  
34 - method: 'POST',  
35 - data  
36 - })  
37 - },  
38 -  
39 -}  
src/api/urls/setUp.js renamed to src/api/urls/apis.js
1 1
2 export default { 2 export default {
  3 + // 授课老师首页数据
  4 + teacherIndex: "/api_html/teaching/index",
3 // 学校管理员首页数据 5 // 学校管理员首页数据
4 schoolIndex: "/api_html/school/manager/index", 6 schoolIndex: "/api_html/school/manager/index",
5 // 查询角色列表 7 // 查询角色列表
src/api/urls/device.js deleted
1 -  
2 -export default {  
3 - // 设备文件上传  
4 - upLoadDevice: "/web/upLoadDevice",  
5 - // 设备模板下载  
6 - downDevice: "/web/downDevice",  
7 - // 设备列表  
8 - deviceList: "/web/deviceList",  
9 - // 自动更新  
10 - autoUpDate: "/web/autoUpDate",  
11 - // 关闭自动更新  
12 - stopUpdate: "/web/stopUpdate",  
13 -}  
src/assets/images/zan.png 0 → 100644

1.8 KB

src/views/down/client.vue
1 <template> 1 <template>
2 - <div>授课端配置下载</div> 2 + <div class="page-container">
  3 + <back-box>
  4 + <template slot="title">
  5 + <span>授课端下载</span>
  6 + </template>
  7 + </back-box>
  8 + <div class="page-content">
  9 + <div class="content-top">
  10 + <div class="cont-info">
  11 + <img class="logo" :src="info.appImage" alt="" />
  12 + <div>
  13 + <p class="name">{{ `${info.appName} ${info.versionName}` }}</p>
  14 + <p class="txt">文件大小:{{ `${info.fileSize}` }}M</p>
  15 + <p class="txt">最近更新:{{ info.modifiedTime }}</p>
  16 + </div>
  17 + </div>
  18 + <div class="down-box">
  19 + <p class="txt">默认参数配置</p>
  20 + <el-button
  21 + class="down-btn"
  22 + type="primary"
  23 + @click="getAppDownloadUrl(false)"
  24 + >立即下载</el-button
  25 + >
  26 + </div>
  27 + </div>
  28 + <ul class="down-ul">
  29 + <li class="down-li" v-for="item in tableData" :key="item.id">
  30 + <span @click="edit(item)">{{ item.configName }}</span>
  31 + <el-button plan round @click="getAppDownloadUrl(item.id)"
  32 + >下载</el-button
  33 + >
  34 + </li>
  35 + <li class="down-li">
  36 + <span>自定义软件功能</span>
  37 + <el-button plan round icon="el-icon-plus">参数设置</el-button>
  38 + </li>
  39 + </ul>
  40 + </div>
  41 + <div class="edit-dia" v-show="dialogVis" width="1000px" height="100%">
  42 + <div class="back">
  43 + <div class="back-l" @click="dialogVis = false">
  44 + <i class="fa fa-mail-reply-all"></i>
  45 + <p>参数设置</p>
  46 + </div>
  47 + </div>
  48 + <div class="form-box">
  49 + <el-form :model="formData" :rules="ruleForm" label-width="160px">
  50 + <el-form-item label="主菜单设置:" prop="mainMenu">
  51 + <el-checkbox-group v-model="formData.mainMenu" :max="4">
  52 + <el-checkbox v-for="item in menuList" :label="item" :key="item">{{
  53 + item
  54 + }}</el-checkbox>
  55 + </el-checkbox-group>
  56 + </el-form-item>
  57 + <el-form-item label="弹出菜单组:" prop="popupMenu">
  58 + <el-radio-group v-model="formData.popupMenu">
  59 + <p class="popup-menu">
  60 + <el-radio :label="1"
  61 + ><span>1:签到点名</span> <span> 2:导入导出</span>
  62 + <span>3:班级管理</span> <span>4:系统设置</span></el-radio
  63 + >
  64 + </p>
  65 + <p class="popup-menu popup-menu1">
  66 + <el-radio :label="2">
  67 + <span>1:签到点名</span> <span> 2:导入导出</span>
  68 + <span>3:考试任务</span> <span>4:系统设置</span></el-radio
  69 + >
  70 + </p>
  71 + </el-radio-group>
  72 + </el-form-item>
  73 + <el-form-item label="成绩等级设置:">
  74 + <el-col :span="12">
  75 + <p class="silde-p">
  76 + <el-slider v-model="formData.failedSet"></el-slider
  77 + ><span>不及格</span>
  78 + </p>
  79 + <p class="silde-p">
  80 + <el-slider v-model="formData.passSet"></el-slider
  81 + ><span>及格</span>
  82 + </p>
  83 + <p class="silde-p">
  84 + <el-slider v-model="formData.goodSet"></el-slider
  85 + ><span>良好</span>
  86 + </p>
  87 + <p class="silde-p">
  88 + <el-slider v-model="formData.excellenSet"></el-slider
  89 + ><span>优秀</span>
  90 + </p>
  91 + </el-col>
  92 + </el-form-item>
  93 + <el-form-item label="抢答设置:" prop="viesAnswerSet">
  94 + <el-radio-group v-model="formData.popupMenu">
  95 + <el-radio :label="0">倒计时抢答</el-radio>
  96 + <el-radio :label="1">即时抢答</el-radio>
  97 + <el-radio :label="2">老师选择</el-radio>
  98 + </el-radio-group>
  99 + <el-input-number
  100 + size="small"
  101 + class="count-down"
  102 + v-model="formData.countdown"
  103 + :step="1"
  104 + :step-strictly="true"
  105 + ></el-input-number
  106 + >秒
  107 + </el-form-item>
  108 + <el-form-item label="抽答设置:" prop="viesAnswerSet">
  109 + <el-radio-group v-model="formData.ballotAnswerSet">
  110 + <el-radio :label="0">点名抽答</el-radio>
  111 + <el-radio :label="1">随机抽答</el-radio>
  112 + </el-radio-group>
  113 + </el-form-item>
  114 + </el-form>
  115 + </div>
  116 + </div>
  117 + </div>
3 </template> 118 </template>
4 119
5 <script> 120 <script>
6 export default { 121 export default {
7 -  
8 -} 122 + data() {
  123 + return {
  124 + page: 1,
  125 + size: 20,
  126 + info: {
  127 + appName: "",
  128 + appImage: "",
  129 + versionName: "",
  130 + fileSize: "",
  131 + modifiedTime: "",
  132 + },
  133 + tableData: [],
  134 + dialogVis: true,
  135 + formData: {
  136 + mainMenu: ["问"],
  137 + popupMenu: 1,
  138 + failedSet: 60,
  139 + passSet: 80,
  140 + goodSet: 90,
  141 + excellenSet: 98,
  142 + viesAnswerSet: 0,
  143 + countdown: 5,
  144 + ballotAnswerSet: 0,
  145 + },
  146 + ruleForm: {
  147 + mainMenu: [
  148 + { required: true, message: "请选择主菜单", trigger: "blur" },
  149 + ],
  150 + popupMenu: [
  151 + { required: true, message: "请选择弹出菜单", trigger: "blur" },
  152 + ],
  153 + viesAnswerSet: [
  154 + { required: true, message: "请选择抢答类型", trigger: "blur" },
  155 + ],
  156 + countdown: [
  157 + { required: true, message: "请输入抢答倒计时", trigger: "blur" },
  158 + ],
  159 + ballotAnswerSet: [
  160 + { required: true, message: "请选择抽答类型", trigger: "blur" },
  161 + ],
  162 + },
  163 + menuList: ["问", "测", "析"],
  164 + };
  165 + },
  166 + created() {
  167 + this.latestVersion();
  168 + this.appConfigList();
  169 + },
  170 + methods: {
  171 + async latestVersion() {
  172 + const { data, status, info } = await this.$request.latestVersion();
  173 + if (status == 0) {
  174 + this.info = { ...data };
  175 + this.info.fileSize =
  176 + (this.info.fileSize && (this.info.fileSize / 1024).toFixed(0)) ||
  177 + "--";
  178 + } else {
  179 + this.$message.error(info);
  180 + }
  181 + },
  182 + async appConfigList() {
  183 + const { data, status, info } = await this.$request.appConfigList({
  184 + page: this.page,
  185 + size: this.size,
  186 + });
  187 + if (status == 0) {
  188 + this.tableData = [...data.list] || [];
  189 + } else {
  190 + this.$message.error(info);
  191 + }
  192 + },
  193 + async getAppDownloadUrl(configId) {
  194 + const { data, status, info } = await this.$request.getAppDownloadUrl({
  195 + configId: configId || "",
  196 + });
  197 + if (status == 0) {
  198 + // this.tableData = [...data.list] || [];
  199 + } else {
  200 + this.$message.error(info);
  201 + }
  202 + },
  203 + },
  204 +};
9 </script> 205 </script>
10 206
11 -<style>  
12 - 207 +<style lang="scss" scoped>
  208 +.page-container {
  209 + position: relative;
  210 +}
  211 +.page-content {
  212 + padding: 30px;
  213 + .content-top {
  214 + padding: 20px 50px 20px 20px;
  215 + display: flex;
  216 + justify-content: space-between;
  217 + align-items: center;
  218 + .cont-info {
  219 + flex: 1;
  220 + display: flex;
  221 + align-items: center;
  222 + .logo {
  223 + width: 140px;
  224 + margin-right: 16px;
  225 + }
  226 + .name {
  227 + font-size: 20px;
  228 + color: #333;
  229 + line-height: 24px;
  230 + padding-bottom: 12px;
  231 + }
  232 + .txt {
  233 + font-size: 15px;
  234 + color: #7f7f7f;
  235 + line-height: 25px;
  236 + }
  237 + }
  238 + .down-box {
  239 + width: 200px;
  240 + text-align: center;
  241 + .txt {
  242 + font-size: 16px;
  243 + padding-bottom: 8px;
  244 + }
  245 + .down-btn {
  246 + font-size: 20px;
  247 + }
  248 + }
  249 + }
  250 + .down-ul {
  251 + display: flex;
  252 + flex-wrap: wrap;
  253 + padding: 0 20px;
  254 + .down-li {
  255 + width: calc(50% - 12px);
  256 + height: 72px;
  257 + padding: 0 16px;
  258 + box-sizing: border-box;
  259 + display: flex;
  260 + justify-content: space-between;
  261 + align-items: center;
  262 + margin: 0 24px 30px 0;
  263 + border-radius: 10px;
  264 + background: #f8f8f8;
  265 + box-shadow: 2px 2px 5px #ccc;
  266 + &:nth-child(2n) {
  267 + margin-right: 0;
  268 + }
  269 + font-size: 16px;
  270 + color: #667ffd;
  271 + }
  272 + }
  273 +}
  274 +:deep(.el-button.is-round) {
  275 + width: 120px;
  276 + text-align: center;
  277 + padding: 10px 0;
  278 +}
  279 +.edit-dia {
  280 + position: absolute;
  281 + left: 0;
  282 + top: 0;
  283 + right: 0;
  284 + bottom: 0;
  285 + width: 100%;
  286 + height: calc(100vh - 80px);
  287 + background: #fff;
  288 + overflow-y: auto;
  289 + .back {
  290 + width: 100%;
  291 + height: 56px;
  292 + border-bottom: 1px solid #e2e2e2;
  293 + display: flex;
  294 + align-items: center;
  295 + padding: 0 20px;
  296 + box-sizing: border-box;
  297 + .back-l {
  298 + display: flex;
  299 + align-items: center;
  300 + cursor: pointer;
  301 + flex-shrink: 0;
  302 + font-size: 18px;
  303 + font-weight: 500;
  304 + }
  305 + .fa-mail-reply-all {
  306 + font-size: 28px;
  307 + color: #b3b3b3;
  308 + margin-right: 12px;
  309 + }
  310 + }
  311 + .form-box {
  312 + padding: 20px;
  313 + .popup-menu {
  314 + padding-bottom: 16px;
  315 + span {
  316 + padding-right: 12px;
  317 + }
  318 + }
  319 + .popup-menu1 {
  320 + padding-bottom: 0;
  321 + }
  322 + .count-down {
  323 + width: 48px;
  324 + margin: 0 8px 0 20px;
  325 + :deep(.el-input__inner) {
  326 + width: 48px;
  327 + height: 32px;
  328 + line-height: 32px;
  329 + border-radius: 20px;
  330 + border-color: #667ffd;
  331 + padding: 0;
  332 + }
  333 + :deep(.el-input-number__decrease) {
  334 + display: none;
  335 + }
  336 + :deep(.el-input-number__increase) {
  337 + display: none;
  338 + }
  339 + }
  340 + .silde-p {
  341 + display: flex;
  342 + align-items: center;
  343 + height:36px;
  344 + line-height:36px;
  345 + & > span {
  346 + width: 48px;
  347 + margin-left: 10px;
  348 + flex-shrink: 0;
  349 + }
  350 + :deep(.el-slider) {
  351 + flex: 1;
  352 + }
  353 + :deep(.el-slider__runway) {
  354 + margin:5px 0;
  355 + }
  356 + }
  357 + }
  358 +}
13 </style> 359 </style>
14 \ No newline at end of file 360 \ No newline at end of file
src/views/down/index.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 - <router-link to="/downClient">授课端下载</router-link>  
4 - <back-box> 3 + <back-box>
5 <template slot="title"> 4 <template slot="title">
6 <span>软件下载</span> 5 <span>软件下载</span>
7 </template> 6 </template>
8 </back-box> 7 </back-box>
9 - <div class=""></div> 8 + <div class="page-content">
  9 + <div class="down-item">
  10 + <p class="txt">
  11 + K12公私立学校、高等院校、教育培训机构的课堂互动教学、即时课堂测验
  12 + </p>
  13 + <el-button plan round @click="links">授课端下载</el-button>
  14 + </div>
  15 + <div class="down-item">
  16 + <p class="txt">
  17 + 配合发卡器硬件,方便学校管理员进行发卡补卡操作的软件。
  18 + </p>
  19 + <el-button plan round>发卡软件下载</el-button>
  20 + </div>
  21 + </div>
10 </div> 22 </div>
11 </template> 23 </template>
12 24
13 <script> 25 <script>
14 export default { 26 export default {
15 -  
16 -} 27 + methods:{
  28 + links(){
  29 + this.$router.push({
  30 + path:'/downClient'
  31 + })
  32 + }
  33 + }
  34 +};
17 </script> 35 </script>
18 36
19 -<style>  
20 - 37 +<style lang="scss" scoped>
  38 +.page-content {
  39 + padding: 50px;
  40 + display: flex;
  41 + justify-content: center;
  42 + .down-item {
  43 + width: 200px;
  44 + padding: 50px 20px;
  45 + border-radius: 20px;
  46 + margin: 20px;
  47 + display: flex;
  48 + flex-direction: column;
  49 + justify-content: center;
  50 + align-items: center;
  51 + background: #f8f8f8;
  52 + box-shadow: 2px 2px 5px #ccc;
  53 + .txt {
  54 + font-size: 16px;
  55 + color: #7f7f7f;
  56 + line-height: 24px;
  57 + height: 120px;
  58 + }
  59 + }
  60 +}
21 </style> 61 </style>
22 \ No newline at end of file 62 \ No newline at end of file
src/views/index/mainIndex.vue
@@ -71,19 +71,19 @@ @@ -71,19 +71,19 @@
71 <img class="icon" :src="getImgs(item.path)" alt="" /> 71 <img class="icon" :src="getImgs(item.path)" alt="" />
72 <div class="text" v-if="item.path == '/examinationPaper'"> 72 <div class="text" v-if="item.path == '/examinationPaper'">
73 <p class="p1">备题组卷</p> 73 <p class="p1">备题组卷</p>
74 - <p class="p2">管理32套答题卡。</p> 74 + <p class="p2">管理{{schoolInfo.paperCount}}套答题卡。</p>
75 </div> 75 </div>
76 <div class="text" v-else-if="item.path == '/portrait'"> 76 <div class="text" v-else-if="item.path == '/portrait'">
77 <p class="p1">学生画像</p> 77 <p class="p1">学生画像</p>
78 - <p class="p2">共分析532名学生成绩。</p> 78 + <p class="p2">共分析{{schoolInfo.imagesCount}}名学生成绩。</p>
79 </div> 79 </div>
80 <div class="text" v-else-if="item.path == '/ask'"> 80 <div class="text" v-else-if="item.path == '/ask'">
81 <p class="p1">随堂问报表</p> 81 <p class="p1">随堂问报表</p>
82 - <p class="p2">对41套随堂问答题记录分析。</p> 82 + <p class="p2">对{{schoolInfo.classPeriodCount}}套随堂问答题记录分析。</p>
83 </div> 83 </div>
84 <div class="text" v-else-if="item.path == '/test'"> 84 <div class="text" v-else-if="item.path == '/test'">
85 <p class="p1">即时测报表</p> 85 <p class="p1">即时测报表</p>
86 - <p class="p2">对28套即时测答题记录分析。</p> 86 + <p class="p2">对{{schoolInfo.examCount}}套即时测答题记录分析。</p>
87 </div> 87 </div>
88 </li> 88 </li>
89 </template> 89 </template>
@@ -116,6 +116,8 @@ export default { @@ -116,6 +116,8 @@ export default {
116 }) 116 })
117 if(this.type == "ROLE_XUEXIAO"){ 117 if(this.type == "ROLE_XUEXIAO"){
118 this.schoolIndex() 118 this.schoolIndex()
  119 + }else if(this.type == "ROLE_JIAOSHI" || this.type == "ROLE_BANZHUREN"){
  120 + this.teacherIndex()
119 } 121 }
120 }, 122 },
121 methods: { 123 methods: {
@@ -127,6 +129,14 @@ export default { @@ -127,6 +129,14 @@ export default {
127 path: path, 129 path: path,
128 }); 130 });
129 }, 131 },
  132 + async teacherIndex() {
  133 + const { data, status, info } = await this.$request.teacherIndex();
  134 + if (status === 0) {
  135 + this.schoolInfo = { ...data };
  136 + } else {
  137 + this.$message.error(info);
  138 + }
  139 + },
130 async schoolIndex() { 140 async schoolIndex() {
131 const { data, status, info } = await this.$request.schoolIndex(); 141 const { data, status, info } = await this.$request.schoolIndex();
132 if (status === 0) { 142 if (status === 0) {
src/views/setUp/school.vue
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 </back-box> 19 </back-box>
20 <div class="page-content"> 20 <div class="page-content">
21 <div class="content-box"> 21 <div class="content-box">
22 - <i class="el-icon-edit"></i> 22 + <i class="el-icon-edit" @click="diaSchool = true"></i>
23 <ul class="school-info"> 23 <ul class="school-info">
24 <li class="school-item"> 24 <li class="school-item">
25 <span class="s1">学校名称:</span> 25 <span class="s1">学校名称:</span>
@@ -91,6 +91,54 @@ @@ -91,6 +91,54 @@
91 <el-button @click="diaUp = false">取 消</el-button> 91 <el-button @click="diaUp = false">取 消</el-button>
92 </div> 92 </div>
93 </el-dialog> 93 </el-dialog>
  94 + <el-dialog title="修改学校信息" :visible.sync="diaSchool" width="400">
  95 + <el-form
  96 + class="form-box"
  97 + :model="formSchool"
  98 + :rules="rulesSchool"
  99 + label-width="160px"
  100 + >
  101 + <el-form-item label="学段:" prop="sections">
  102 + <el-checkbox-group v-model="formSchool.sections">
  103 + <el-checkbox
  104 + v-for="item in sectionsList"
  105 + :label="item.id"
  106 + :key="item.id"
  107 + >{{ item.name }}</el-checkbox
  108 + >
  109 + </el-checkbox-group>
  110 + </el-form-item>
  111 + <el-form-item label="授课端管理密码:" prop="managePwd">
  112 + <el-col :span="10">
  113 + <el-input
  114 + maxlength="30"
  115 + v-model="formSchool.managePwd"
  116 + placeholder="请输入授课端管理密码"
  117 + ></el-input>
  118 + </el-col>
  119 + </el-form-item>
  120 + <el-form-item label="联系人:" prop="contactPerson"
  121 + ><el-col :span="10"
  122 + ><el-input
  123 + maxlength="30"
  124 + v-model="formSchool.contactPerson"
  125 + placeholder="请输入联系人"
  126 + ></el-input></el-col
  127 + ></el-form-item>
  128 + <el-form-item label="手机号码:" prop="contactPhone"
  129 + ><el-col :span="10"
  130 + ><el-input
  131 + maxlength="11"
  132 + v-model="formSchool.contactPhone"
  133 + placeholder="请输入联系人手机号码"
  134 + ></el-input></el-col
  135 + ></el-form-item>
  136 + </el-form>
  137 + <div class="dialog-footer" slot="footer">
  138 + <el-button @click="editSchool">确 定</el-button>
  139 + <el-button @click="diaSchool = false">取 消</el-button>
  140 + </div>
  141 + </el-dialog>
94 </div> 142 </div>
95 </template> 143 </template>
96 144
@@ -131,9 +179,10 @@ export default { @@ -131,9 +179,10 @@ export default {
131 }, 179 },
132 data() { 180 data() {
133 return { 181 return {
  182 + loading: false,
134 url: "xxx", 183 url: "xxx",
135 diaUp: false, 184 diaUp: false,
136 - loading: false, 185 + diaSchool: false,
137 school: { 186 school: {
138 schoolName: "长水实验中学", 187 schoolName: "长水实验中学",
139 managePwd: "123456", 188 managePwd: "123456",
@@ -143,6 +192,25 @@ export default { @@ -143,6 +192,25 @@ export default {
143 tenantName: "长水集团", 192 tenantName: "长水集团",
144 }, 193 },
145 tableData: [], 194 tableData: [],
  195 + formSchool: {
  196 + sections: "",
  197 + managePwd: "",
  198 + contactPerson: "",
  199 + contactPhone: "",
  200 + },
  201 + rulesSchool: {
  202 + sections: [{ required: true, message: "请选择学段", trigger: "blur" }],
  203 + managePwd: [
  204 + { required: true, message: "请填写管理密码", trigger: "blur" },
  205 + ],
  206 + },
  207 + sectionsList: [
  208 + { id: "1", name: "小学" },
  209 + { id: "2", name: "初中" },
  210 + { id: "3", name: "高中" },
  211 + { id: "4", name: "大学" },
  212 + { id: "7", name: "高补" },
  213 + ],
146 }; 214 };
147 }, 215 },
148 created() { 216 created() {
@@ -151,6 +219,31 @@ export default { @@ -151,6 +219,31 @@ export default {
151 }, 219 },
152 methods: { 220 methods: {
153 setGrade(obj) {}, 221 setGrade(obj) {},
  222 + async editSchool() {
  223 + if (!this.formSchool.sections.length) {
  224 + this.$message.error("请选择学段!");
  225 + return;
  226 + }
  227 + if (!this.formSchool.managePwd) {
  228 + this.$message.error("请填写密码!");
  229 + return;
  230 + }
  231 + if (this.loading) {
  232 + return;
  233 + }
  234 + this.loading = true;
  235 + let form = {...this.formSchool}
  236 + form.sections = this.formSchool.sections.join(',')
  237 + const { data, status, info } = await this.$request.updateSchool({...form});
  238 + this.loading = false;
  239 + if (status === 0) {
  240 + this.$message.success("修改成功~");
  241 + this.diaSchool = false;
  242 + this._QueryDataSchool();
  243 + } else {
  244 + this.$message.error(info);
  245 + }
  246 + },
154 async _QueryDataSchool() { 247 async _QueryDataSchool() {
155 this.loading = true; 248 this.loading = true;
156 const { data, status, info } = await this.$request.schoolDetail(); 249 const { data, status, info } = await this.$request.schoolDetail();
@@ -158,6 +251,10 @@ export default { @@ -158,6 +251,10 @@ export default {
158 console.log(status); 251 console.log(status);
159 if (status === 0) { 252 if (status === 0) {
160 this.school = { ...data }; 253 this.school = { ...data };
  254 + for (let key in this.formSchool) {
  255 + this.formSchool[key] = data[key] || "";
  256 + }
  257 + this.formSchool.sections = this.formSchool.sections.split(",");
161 } else { 258 } else {
162 this.$message.error(info); 259 this.$message.error(info);
163 } 260 }
@@ -245,9 +342,9 @@ export default { @@ -245,9 +342,9 @@ export default {
245 border-radius: 10px; 342 border-radius: 10px;
246 box-shadow: 1px 1px 3px #888; 343 box-shadow: 1px 1px 3px #888;
247 cursor: pointer; 344 cursor: pointer;
248 - transition: all .5s;  
249 - &:hover{  
250 - transform: translate(-2px,-5px); 345 + transition: all 0.5s;
  346 + &:hover {
  347 + transform: translate(-2px, -5px);
251 box-shadow: 5px 5px 10px #888; 348 box-shadow: 5px 5px 10px #888;
252 } 349 }
253 } 350 }
@@ -274,4 +371,7 @@ export default { @@ -274,4 +371,7 @@ export default {
274 } 371 }
275 } 372 }
276 } 373 }
  374 +.form-box {
  375 + margin: 0 20px;
  376 +}
277 </style> 377 </style>
278 \ No newline at end of file 378 \ No newline at end of file
src/views/setUp/student.vue
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div> 2 <div>
3 <back-box> 3 <back-box>
4 <template slot="title"> 4 <template slot="title">
5 - <span>教师管理</span> 5 + <span>学生管理</span>
6 </template> 6 </template>
7 <template slot="btns"> 7 <template slot="btns">
8 <el-tooltip effect="dark" content="添加学生" placement="bottom"> 8 <el-tooltip effect="dark" content="添加学生" placement="bottom">
@@ -40,8 +40,8 @@ @@ -40,8 +40,8 @@
40 class="stu-item" 40 class="stu-item"
41 v-for="item in classList" 41 v-for="item in classList"
42 :key="item.classCode" 42 :key="item.classCode"
43 - :class="query.classId == item.classCode ? 'avtive' : ''"  
44 - @click="classDetail(item.classCode)" 43 + :class="query.classId == item.id ? 'active' : ''"
  44 + @click="classDetail(item.id)"
45 > 45 >
46 <i class="el-icon-edit-outline"></i> 46 <i class="el-icon-edit-outline"></i>
47 {{ item.className }}({{ item.studentCount }}) 47 {{ item.className }}({{ item.studentCount }})
@@ -140,7 +140,7 @@ export default { @@ -140,7 +140,7 @@ export default {
140 }, 140 },
141 async created() { 141 async created() {
142 await this._QueryDataGrade(); 142 await this._QueryDataGrade();
143 - this._QueryClass(); 143 + await this._QueryClass();
144 this._QueryData(3); 144 this._QueryData(3);
145 }, 145 },
146 methods: { 146 methods: {
@@ -201,6 +201,7 @@ export default { @@ -201,6 +201,7 @@ export default {
201 }); 201 });
202 if (status === 0) { 202 if (status === 0) {
203 this.classList = [...data.list] || []; 203 this.classList = [...data.list] || [];
  204 + this.query.classId = this.classList[0]?.id;
204 } else { 205 } else {
205 this.$message.error(info); 206 this.$message.error(info);
206 } 207 }
src/views/setUp/teacher.vue
@@ -99,7 +99,7 @@ @@ -99,7 +99,7 @@
99 <div class="detail-top"> 99 <div class="detail-top">
100 <p class="p-item">手机号码:{{ teacherDetail.loginName }}</p> 100 <p class="p-item">手机号码:{{ teacherDetail.loginName }}</p>
101 <p class="p-item"> 101 <p class="p-item">
102 - 状态:{{ teacherDetail.available == 1 ? "正常" : "不可用" }} 102 + 状态:{{ teacherDetail.available == 1 ? "不可用" : "正常" }}
103 </p> 103 </p>
104 <p class="p-item"> 104 <p class="p-item">
105 性别:{{ 105 性别:{{