Browse Source

Merge remote-tracking branch 'origin/gzb' into wzl

gzb
wangzhonglu 1 year ago
parent
commit
43a60ab54f
3 changed files with 56 additions and 14 deletions
  1. 24
    7
      src/views/school/index.vue
  2. 25
    4
      src/views/service/index.vue
  3. 7
    3
      src/views/trial/index.vue

+ 24
- 7
src/views/school/index.vue View File

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

+ 25
- 4
src/views/service/index.vue View File

20
     <div>
20
     <div>
21
       <Table border :data="service.list" :columns="columns">
21
       <Table border :data="service.list" :columns="columns">
22
         <template slot-scope="{ row }" slot="scpic">
22
         <template slot-scope="{ row }" slot="scpic">
23
-          <img class="img" v-if="row.scpic" :src="$api.showImageUrl +row.scpic" v-viewer />
23
+          <img
24
+            class="img"
25
+            v-if="row.scpic"
26
+            :src="$api.showImageUrl + row.scpic"
27
+            v-viewer
28
+          />
24
         </template>
29
         </template>
25
       </Table>
30
       </Table>
26
       <div class="foot_page" v-if="service.total > 0">
31
       <div class="foot_page" v-if="service.total > 0">
46
         :rules="addFormRules"
51
         :rules="addFormRules"
47
         :model="add_form"
52
         :model="add_form"
48
       >
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>
49
         <FormItem label="服务案例" prop="scname">
60
         <FormItem label="服务案例" prop="scname">
50
           <Input v-model="add_form.scname" placeholder="请输入服务案例" />
61
           <Input v-model="add_form.scname" placeholder="请输入服务案例" />
51
         </FormItem>
62
         </FormItem>
206
           width: 70,
217
           width: 70,
207
           render: (h, params) => {
218
           render: (h, params) => {
208
             return h(
219
             return h(
209
-                "span",
210
-                params.index +
220
+              "span",
221
+              params.index +
211
                 (this.form_search.page - 1) * this.form_search.size +
222
                 (this.form_search.page - 1) * this.form_search.size +
212
                 1
223
                 1
213
             );
224
             );
309
         show: false,
320
         show: false,
310
         scname: "",
321
         scname: "",
311
         scpic: "",
322
         scpic: "",
312
-        scorder: 0
323
+        scorder: 0,
324
+        ltype: 1
313
       },
325
       },
314
       revise_data: {
326
       revise_data: {
315
         show: false,
327
         show: false,
332
         ]
344
         ]
333
       },
345
       },
334
       addFormRules: {
346
       addFormRules: {
347
+        ltype: [
348
+          {
349
+            required: true,
350
+            type: "number",
351
+            message: "请选择语言",
352
+            trigger: "change"
353
+          }
354
+        ],
335
         scname: [
355
         scname: [
336
           {
356
           {
337
             required: true,
357
             required: true,
374
     add() {
394
     add() {
375
       this.$refs["AddForm"].resetFields();
395
       this.$refs["AddForm"].resetFields();
376
       this.add_form.show = true;
396
       this.add_form.show = true;
397
+      this.add_form.ltype = JSON.parse(JSON.stringify(this.form_search.ltype));
377
       this.add_form.scorder = this.service.total + 1;
398
       this.add_form.scorder = this.service.total + 1;
378
     },
399
     },
379
     revise() {
400
     revise() {

+ 7
- 3
src/views/trial/index.vue View File

1
 <template>
1
 <template>
2
   <div class="userinfo">
2
   <div class="userinfo">
3
     <div class="header">
3
     <div class="header">
4
-      <div>
4
+      <div style="height: 32px; line-height: 32px">
5
         <RadioGroup v-model="form_search.ltype" @on-change="seach">
5
         <RadioGroup v-model="form_search.ltype" @on-change="seach">
6
           <Radio :label="1" :value="1">申请试用</Radio>
6
           <Radio :label="1" :value="1">申请试用</Radio>
7
           <Radio :label="2" :value="2">申请试用负责人</Radio>
7
           <Radio :label="2" :value="2">申请试用负责人</Radio>
8
         </RadioGroup>
8
         </RadioGroup>
9
         <Input
9
         <Input
10
+          v-if="form_search.ltype == 1"
10
           style="width: 200px; margin-left: 20px"
11
           style="width: 200px; margin-left: 20px"
11
           placeholder="请输入联系人"
12
           placeholder="请输入联系人"
12
           @on-enter="seach"
13
           @on-enter="seach"
28
       >
29
       >
29
       </Table>
30
       </Table>
30
       <Table v-else border :data="userinfo.list" :columns="columns1"> </Table>
31
       <Table v-else border :data="userinfo.list" :columns="columns1"> </Table>
31
-      <div class="foot_page" v-if="userinfo.total > 0">
32
+      <div
33
+        class="foot_page"
34
+        v-if="userinfo.total > 0 && form_search.ltype == 1"
35
+      >
32
         <Page
36
         <Page
33
           :total="userinfo.total"
37
           :total="userinfo.total"
34
           @on-change="changePage"
38
           @on-change="changePage"
231
           }
235
           }
232
         },
236
         },
233
         {
237
         {
234
-          title: "联系人",
238
+          title: "负责人",
235
           key: "account",
239
           key: "account",
236
           align: "center"
240
           align: "center"
237
         },
241
         },

Loading…
Cancel
Save