Commit 9c17317a389b0aae06e7b5b6f659491adff311c3

Authored by 梁保满
1 parent 5e2e009a

集团管理添加学校学段请求接口

src/views/standard/setUp/conglomerate.vue
@@ -192,11 +192,12 @@ @@ -192,11 +192,12 @@
192 </el-form-item> 192 </el-form-item>
193 <el-form-item label="学段:" prop="sections"> 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>  
196 - <el-checkbox :label="2">初中</el-checkbox>  
197 - <el-checkbox :label="3">高中</el-checkbox>  
198 - <el-checkbox :label="4">本科</el-checkbox>  
199 - <el-checkbox :label="7">高补</el-checkbox> 195 + <el-checkbox
  196 + v-for="item in sectionsList"
  197 + :label="item.code"
  198 + :key="item.code"
  199 + >{{ item.name }}</el-checkbox
  200 + >
200 </el-checkbox-group> 201 </el-checkbox-group>
201 </el-form-item> 202 </el-form-item>
202 </el-form> 203 </el-form>
@@ -230,7 +231,9 @@ @@ -230,7 +231,9 @@
230 >确 定</el-button 231 >确 定</el-button
231 > 232 >
232 <el-button round @click="diaSchool2 = false">取 消</el-button> 233 <el-button round @click="diaSchool2 = false">取 消</el-button>
233 - <el-button round v-if="showDelSclBtn" @click="removeSchool">删除学校</el-button> 234 + <el-button round v-if="showDelSclBtn" @click="removeSchool"
  235 + >删除学校</el-button
  236 + >
234 </div> 237 </div>
235 </el-dialog> 238 </el-dialog>
236 </div> 239 </div>
@@ -249,6 +252,7 @@ export default { @@ -249,6 +252,7 @@ export default {
249 loading: false, 252 loading: false,
250 showId: "", //显示学校Id 253 showId: "", //显示学校Id
251 schoolTotal: 0, 254 schoolTotal: 0,
  255 + sectionsList: [],
252 tableList: [ 256 tableList: [
253 // 集团列表/区域列表 257 // 集团列表/区域列表
254 { 258 {
@@ -304,6 +308,7 @@ export default { @@ -304,6 +308,7 @@ export default {
304 created() { 308 created() {
305 this._QueryData(); 309 this._QueryData();
306 this.showSchool(); 310 this.showSchool();
  311 + this._QuerySectionList();
307 }, 312 },
308 methods: { 313 methods: {
309 edit() { 314 edit() {
@@ -348,6 +353,16 @@ export default { @@ -348,6 +353,16 @@ export default {
348 this.showDelSclBtn = num == 0 ? true : false; 353 this.showDelSclBtn = num == 0 ? true : false;
349 this.diaSchool2 = true; 354 this.diaSchool2 = true;
350 }, 355 },
  356 + async _QuerySectionList() {
  357 + //学校学段
  358 + const { data, status, info } = await this.$request.sectionList();
  359 + console.log(status);
  360 + if (status === 0) {
  361 + this.sectionsList = data?.list || [];
  362 + } else {
  363 + this.$message.error(info);
  364 + }
  365 + },
351 async removeSchool() { 366 async removeSchool() {
352 const { data, status, info } = await this.$request.removeSchool({ 367 const { data, status, info } = await this.$request.removeSchool({
353 schoolId: this.setFormSchool.schoolId, 368 schoolId: this.setFormSchool.schoolId,