|
@@ -51,6 +51,12 @@
|
51
|
51
|
:rules="addFormRules"
|
52
|
52
|
:model="add_form"
|
53
|
53
|
>
|
|
54
|
+ <FormItem label="语言" prop="ltype">
|
|
55
|
+ <RadioGroup v-model="add_form.ltype">
|
|
56
|
+ <Radio :label="1">中文</Radio>
|
|
57
|
+ <Radio :label="2">英文</Radio>
|
|
58
|
+ </RadioGroup>
|
|
59
|
+ </FormItem>
|
54
|
60
|
<FormItem label="服务案例" prop="schoolname">
|
55
|
61
|
<Input v-model="add_form.schoolname" placeholder="请输入学校名称" />
|
56
|
62
|
</FormItem>
|
|
@@ -211,8 +217,8 @@ export default {
|
211
|
217
|
width: 70,
|
212
|
218
|
render: (h, params) => {
|
213
|
219
|
return h(
|
214
|
|
- "span",
|
215
|
|
- params.index +
|
|
220
|
+ "span",
|
|
221
|
+ params.index +
|
216
|
222
|
(this.form_search.page - 1) * this.form_search.size +
|
217
|
223
|
1
|
218
|
224
|
);
|
|
@@ -314,7 +320,8 @@ export default {
|
314
|
320
|
show: false,
|
315
|
321
|
schoolname: "",
|
316
|
322
|
schoollogo: "",
|
317
|
|
- slorder: 0
|
|
323
|
+ slorder: 0,
|
|
324
|
+ ltype: 1
|
318
|
325
|
},
|
319
|
326
|
revise_data: {
|
320
|
327
|
show: false,
|
|
@@ -337,6 +344,14 @@ export default {
|
337
|
344
|
]
|
338
|
345
|
},
|
339
|
346
|
addFormRules: {
|
|
347
|
+ ltype: [
|
|
348
|
+ {
|
|
349
|
+ required: true,
|
|
350
|
+ type: "number",
|
|
351
|
+ message: "请选择语言",
|
|
352
|
+ trigger: "change"
|
|
353
|
+ }
|
|
354
|
+ ],
|
340
|
355
|
schoolname: [
|
341
|
356
|
{
|
342
|
357
|
required: true,
|
|
@@ -379,6 +394,7 @@ export default {
|
379
|
394
|
add() {
|
380
|
395
|
this.$refs["AddForm"].resetFields();
|
381
|
396
|
this.add_form.show = true;
|
|
397
|
+ this.add_form.ltype = JSON.parse(JSON.stringify(this.form_search.ltype));
|
382
|
398
|
this.add_form.slorder = this.school.total + 1;
|
383
|
399
|
},
|
384
|
400
|
revise() {
|
|
@@ -392,7 +408,8 @@ export default {
|
392
|
408
|
schoolname: this.revise_data.data.schoolname,
|
393
|
409
|
schoollogo: this.revise_data.data.schoollogo,
|
394
|
410
|
slorder: this.revise_data.data.slorder,
|
395
|
|
- scid: this.revise_data.data.scid
|
|
411
|
+ slid: this.revise_data.data.slid,
|
|
412
|
+ ltype: this.revise_data.data.ltype
|
396
|
413
|
}).then((res) => {
|
397
|
414
|
if (res.code == 0) {
|
398
|
415
|
this.revise_data.show = false;
|
|
@@ -406,7 +423,7 @@ export default {
|
406
|
423
|
});
|
407
|
424
|
},
|
408
|
425
|
del(data) {
|
409
|
|
- sl_del({ scid: data.scid }).then((res) => {
|
|
426
|
+ sl_del({ slid: data.slid }).then((res) => {
|
410
|
427
|
if (res.code == 0) {
|
411
|
428
|
if (this.form_search.page != 1 && this.school.list.length == 1) {
|
412
|
429
|
this.form_search.page--;
|
|
@@ -429,7 +446,7 @@ export default {
|
429
|
446
|
sl_save({
|
430
|
447
|
schoolname: this.add_form.schoolname,
|
431
|
448
|
schoollogo: this.add_form.schoollogo,
|
432
|
|
- ltype: this.form_search.ltype,
|
|
449
|
+ ltype: this.add_form.ltype,
|
433
|
450
|
slorder: this.add_form.slorder,
|
434
|
451
|
createid: this.userInfo.userid
|
435
|
452
|
}).then((res) => {
|
|
@@ -463,7 +480,7 @@ export default {
|
463
|
480
|
}
|
464
|
481
|
let formData = new FormData();
|
465
|
482
|
formData.append("file", file);
|
466
|
|
- formData.append("savefolder", "servicecase");
|
|
483
|
+ formData.append("savefolder", "schoollogo");
|
467
|
484
|
let url = that.$api.baseUrl + "file/upload";
|
468
|
485
|
that.showLoading = true;
|
469
|
486
|
axios
|