seimin 3 år sedan
förälder
incheckning
619689f407
2 ändrade filer med 43 tillägg och 28 borttagningar
  1. 2 2
      config/index.js
  2. 41 26
      src/views/repair.vue

+ 2 - 2
config/index.js

@@ -26,7 +26,7 @@ module.exports = {
26
     },
26
     },
27
 
27
 
28
     // Various Dev Server settings
28
     // Various Dev Server settings
29
-    host: 'localhost', // can be overwritten by process.env.HOST
29
+    host: '0.0.0.0', // can be overwritten by process.env.HOST
30
     // host: '127.0.0.1', // can be overwritten by process.env.HOST
30
     // host: '127.0.0.1', // can be overwritten by process.env.HOST
31
     // host: '192.168.199.177', // can be overwritten by process.env.HOST
31
     // host: '192.168.199.177', // can be overwritten by process.env.HOST
32
     // host: '192.168.31.32', // can be overwritten by process.env.HOST
32
     // host: '192.168.31.32', // can be overwritten by process.env.HOST
@@ -39,7 +39,7 @@ module.exports = {
39
     // notifyOnErrors: true,
39
     // notifyOnErrors: true,
40
     // poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
40
     // poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
41
 
41
 
42
-    
42
+
43
     /**
43
     /**
44
      * Source Maps
44
      * Source Maps
45
      */
45
      */

+ 41 - 26
src/views/repair.vue

@@ -1,6 +1,10 @@
1
 <template>
1
 <template>
2
   <div slot="content" class="bgColor">
2
   <div slot="content" class="bgColor">
3
-    <cube-form :model="model" @validate="validateHandler" @submit="submitHandler">
3
+    <cube-form
4
+      :model="model"
5
+      @validate="validateHandler"
6
+      @submit="submitHandler"
7
+    >
4
       <cube-form-group>
8
       <cube-form-group>
5
         <!-- <div class="label">
9
         <!-- <div class="label">
6
                     报修联系人</div>
10
                     报修联系人</div>
@@ -13,7 +17,8 @@
13
             @input="showDeptId(model.deptId)"
17
             @input="showDeptId(model.deptId)"
14
             @blur="model.deptId = deptIdText"
18
             @blur="model.deptId = deptIdText"
15
             v-model="model.deptId"
19
             v-model="model.deptId"
16
-          >{{model.deptId || '请输入报修科室'}}</cube-input>
20
+            >{{ model.deptId || "请输入报修科室" }}</cube-input
21
+          >
17
         </cube-form-item>
22
         </cube-form-item>
18
 
23
 
19
         <cube-form-item :field="fields[0]"></cube-form-item>
24
         <cube-form-item :field="fields[0]"></cube-form-item>
@@ -21,11 +26,16 @@
21
         <!-- <cube-form-item :field="fields[2]" class="btn_plcaeholde"></cube-form-item> -->
26
         <!-- <cube-form-item :field="fields[2]" class="btn_plcaeholde"></cube-form-item> -->
22
         <cube-form-item :field="fields[3]">
27
         <cube-form-item :field="fields[3]">
23
           <cube-input
28
           <cube-input
29
+            @focus="showAddress(model.address)"
24
             @input="showAddress(model.address)"
30
             @input="showAddress(model.address)"
25
             v-model="model.address"
31
             v-model="model.address"
26
-          >{{model.address || '请输入故障地点'}}</cube-input>
32
+            >{{ model.address || "请输入故障地点" }}</cube-input
33
+          >
27
         </cube-form-item>
34
         </cube-form-item>
28
-        <cube-form-item :field="fields[6]" v-if="ifCreate.valueconfig == 1"></cube-form-item>
35
+        <cube-form-item
36
+          :field="fields[6]"
37
+          v-if="ifCreate.valueconfig == 1"
38
+        ></cube-form-item>
29
         <div class="label">报修信息</div>
39
         <div class="label">报修信息</div>
30
         <cube-form-item :field="fields[4]"></cube-form-item>
40
         <cube-form-item :field="fields[4]"></cube-form-item>
31
         <div class="label">
41
         <div class="label">
@@ -49,7 +59,10 @@
49
       </cube-form-group>
59
       </cube-form-group>
50
     </cube-form>
60
     </cube-form>
51
     <load-ing v-show="loadShow"></load-ing>
61
     <load-ing v-show="loadShow"></load-ing>
52
-    <promp-ting :conents="promptingConent" :status="promptingStatus"></promp-ting>
62
+    <promp-ting
63
+      :conents="promptingConent"
64
+      :status="promptingStatus"
65
+    ></promp-ting>
53
   </div>
66
   </div>
54
 </template>
67
 </template>
55
 <script>
68
 <script>
@@ -190,7 +203,9 @@ export default {
190
         // "fileName":"upload",
203
         // "fileName":"upload",
191
         // "target":'http://localhost/service/common/common/uploadAttachment/wechatRequesterIncident/',
204
         // "target":'http://localhost/service/common/common/uploadAttachment/wechatRequesterIncident/',
192
         // "target":'http://weixintest.ngser.dashitech.com/service/common/common/uploadAttachment/wechatRequesterIncident/',
205
         // "target":'http://weixintest.ngser.dashitech.com/service/common/common/uploadAttachment/wechatRequesterIncident/',
193
-        target:this.$host+"/service/common/common/uploadAttachment/wechatRequesterIncident/",
206
+        target:
207
+          this.$host +
208
+          "/service/common/common/uploadAttachment/wechatRequesterIncident/",
194
         data: {}
209
         data: {}
195
       },
210
       },
196
       isUploading: false,
211
       isUploading: false,
@@ -371,10 +386,10 @@ export default {
371
         },
386
         },
372
         incident: JSON.parse(JSON.stringify(this.model))
387
         incident: JSON.parse(JSON.stringify(this.model))
373
       };
388
       };
374
-    //  报修主体是报修科室的时候,不传科室id艺洛
389
+      //  报修主体是报修科室的时候,不传科室id艺洛
375
-      if(this.repairMain.valueconfig == 2){
390
+      if (this.repairMain.valueconfig == 2) {
376
         reqData.incident.deptId = this.deptIdNum;
391
         reqData.incident.deptId = this.deptIdNum;
377
-      }else{
392
+      } else {
378
         delete reqData.incident.deptId;
393
         delete reqData.incident.deptId;
379
       }
394
       }
380
       this.$http
395
       this.$http
@@ -429,14 +444,14 @@ export default {
429
     validateHandler(result) {
444
     validateHandler(result) {
430
       this.validity = result.validity;
445
       this.validity = result.validity;
431
       this.valid = result.valid;
446
       this.valid = result.valid;
432
-      if (this.valid == false) {
447
+      // if (this.valid == false) {
433
-        $("#fade").fadeIn();
448
+      //   $("#fade").fadeIn();
434
-        this.promptingConent = "提交失败,请填写必填信息!";
449
+      //   this.promptingConent = "提交失败,请填写必填信息!";
435
-        this.promptingStatus = false;
450
+      //   this.promptingStatus = false;
436
-        setTimeout(function() {
451
+      //   setTimeout(function() {
437
-          $("#fade").fadeOut();
452
+      //     $("#fade").fadeOut();
438
-        }, 2000);
453
+      //   }, 2000);
439
-      }
454
+      // }
440
       this.valid = false;
455
       this.valid = false;
441
     },
456
     },
442
     // 展示故障地点搜索下拉
457
     // 展示故障地点搜索下拉
@@ -556,17 +571,17 @@ export default {
556
         incidentcategory: { selectType: "one" }
571
         incidentcategory: { selectType: "one" }
557
       })
572
       })
558
       .then(result => {
573
       .then(result => {
559
-        if(result.data.status ==200){
574
+        if (result.data.status == 200) {
560
           let arr = [];
575
           let arr = [];
561
-          result.data.list.forEach(item=>{
576
+          result.data.list.forEach(item => {
562
-            arr.push({value:item.id,text:item.category})
577
+            arr.push({ value: item.id, text: item.category });
563
-          })
578
+          });
564
           this.fields.forEach(item => {
579
           this.fields.forEach(item => {
565
-          // 初始化故障类型下拉框列表
580
+            // 初始化故障类型下拉框列表
566
-          if (item.modelKey == "categoryId") {
581
+            if (item.modelKey == "categoryId") {
567
-            item.props.options = arr;
582
+              item.props.options = arr;
568
-          }
583
+            }
569
-        });
584
+          });
570
         }
585
         }
571
       });
586
       });
572
   },
587
   },