seimin преди 3 години
родител
ревизия
96d9ce99ac
променени са 3 файла, в които са добавени 66 реда и са изтрити 66 реда
  1. 1 1
      config/index.js
  2. 39 39
      src/views/newIncident.vue
  3. 26 26
      src/views/processing.vue

+ 1 - 1
config/index.js

@@ -41,7 +41,7 @@ module.exports = {
41 41
 
42 42
     // https://webpack.js.org/configuration/devtool/#development
43 43
     // 住了一行
44
-    // devtool: 'cheap-module-eval-source-map',
44
+    devtool: 'source-map',
45 45
 
46 46
     // If you have problems debugging vue-files in devtools,
47 47
     // set this to false - it *may* help

+ 39 - 39
src/views/newIncident.vue

@@ -50,13 +50,13 @@
50 50
           :field="fields[21]"
51 51
         ></cube-form-item>
52 52
         <cube-form-item :field="fields[1]"></cube-form-item>
53
-        <!-- <cube-form-item :field="fields[2]" class="btn_plcaeholde">
53
+        <cube-form-item :field="fields[2]" class="btn_plcaeholde">
54 54
           <cube-button @click="showPlacePicker()">{{selectedPlaceTxt?selectedPlaceTxt:'请选择区域地点'}}</cube-button>
55
-        </cube-form-item>-->
55
+        </cube-form-item>
56 56
         <!-- 故障地点: -->
57
-        <cube-form-item :field="fields[19]" class="btn_plcaeholde btn_local">
57
+        <!-- <cube-form-item :field="fields[19]" class="btn_plcaeholde btn_local"> -->
58 58
           <!-- <cube-button @click="showPlacePicker()">{{selectedPlaceTxt?selectedPlaceTxt:'请输入故障地点'}}</cube-button> -->
59
-          <input
59
+          <!-- <input
60 60
             type="text"
61 61
             class="inp_local"
62 62
             placeholder="请输入故障地点"
@@ -64,8 +64,8 @@
64 64
             @input="changeLocalList()"
65 65
             @click="showPlacePicker()"
66 66
           />
67
-        </cube-form-item>
68
-        <!-- <cube-form-item :field="fields[3]"></cube-form-item> -->
67
+        </cube-form-item> -->
68
+        <cube-form-item :field="fields[3]"></cube-form-item>
69 69
         <cube-form-item :field="fields[4]" class="btn_plcaeholde">
70 70
           <cube-button @click="showCategoryPicker()">{{
71 71
             selectedCategoryTxt ? selectedCategoryTxt : "请选择事件分类"
@@ -897,18 +897,18 @@ export default {
897 897
         }
898 898
       });
899 899
       solutionType = a2;
900
-      // if (that.model.placeValue.length == 2) {
901
-      //   that.model.areaId =
902
-      //     that.model.placeValue[that.model.placeValue.length - 2];
903
-      //   that.model.placeId =
904
-      //     that.model.placeValue[that.model.placeValue.length - 1];
905
-      // } else if (that.model.placeValue.length == 1) {
906
-      //   that.model.areaId =
907
-      //     that.model.placeValue[that.model.placeValue.length - 1];
908
-      //   that.model.placeId = "";
909
-      // }
900
+      if (that.model.placeValue.length == 2) {
901
+        that.model.areaId =
902
+          that.model.placeValue[that.model.placeValue.length - 2];
903
+        that.model.placeId =
904
+          that.model.placeValue[that.model.placeValue.length - 1];
905
+      } else if (that.model.placeValue.length == 1) {
906
+        that.model.areaId =
907
+          that.model.placeValue[that.model.placeValue.length - 1];
908
+        that.model.placeId = "";
909
+      }
910 910
 
911
-      that.modelData.incident.houseNumber = that.model.address[0];
911
+      // that.modelData.incident.houseNumber = that.model.address[0];
912 912
       that.modelData.incident["repairType"] = that.valConfig;
913 913
       if (that.valConfig == 1) {
914 914
         // that.modelData.incident.requester = that.loginUser;
@@ -918,8 +918,8 @@ export default {
918 918
         that.modelData.incident.department = that.model.requester;
919 919
       }
920 920
 
921
-      // that.modelData.incident.area = { id: that.model.areaId };
922
-      // that.modelData.incident.place = { id: that.model.placeId };
921
+      that.modelData.incident.area = { id: that.model.areaId };
922
+      that.modelData.incident.place = { id: that.model.placeId };
923 923
       that.modelData.incident.category = {
924 924
         id: category[category.length - 1]
925 925
       };
@@ -929,7 +929,7 @@ export default {
929 929
       that.modelData.incident.contactsInformation =
930 930
         that.model.contactsInformation;
931 931
       that.modelData.incident.contacts = that.model.contacts;
932
-      // that.modelData.incident.houseNumber = that.model.houseNumber;
932
+      that.modelData.incident.houseNumber = that.model.houseNumber;
933 933
       that.modelData.incident.acceptUser = that.loginUser;
934 934
       that.modelData.incident.requester = {};
935 935
       that.modelData.incident.handlingPersonnelUser = { id: that.loginUser.id };
@@ -1325,22 +1325,22 @@ export default {
1325 1325
     },
1326 1326
     selectPlaceHandler(selectedVal, selectedIndex, selectedTxt) {
1327 1327
       console.log(selectedVal, selectedIndex, selectedTxt);
1328
-      this.inpLocalVal = this.model.address = selectedTxt; //seimin
1329
-      console.log(this.allPlace, "allPlace");
1330
-      this.allPlace.forEach(item => {
1331
-        if (item.id == selectedVal && item.place) {
1332
-          //如果存在地点
1333
-          this.selectHouseNumber = this.allPlace[selectedIndex];
1334
-        }
1335
-      });
1336
-      console.log(this.selectHouseNumber, 2222);
1337
-
1338
-      // this.model.houseNumber = this.selectedPlaceTxt = selectedTxt.join(" ");
1339
-      // var place = {
1340
-      //   index: selectedIndex,
1341
-      //   txt: this.model.houseNumber
1342
-      // };
1343
-      // localStorage.setItem("place", JSON.stringify(place));
1328
+      // this.inpLocalVal = this.model.address = selectedTxt; //seimin
1329
+      // console.log(this.allPlace, "allPlace");
1330
+      // this.allPlace.forEach(item => {
1331
+      //   if (item.id == selectedVal && item.place) {
1332
+      //     //如果存在地点
1333
+      //     this.selectHouseNumber = this.allPlace[selectedIndex];
1334
+      //   }
1335
+      // });
1336
+      // console.log(this.selectHouseNumber, 2222);
1337
+      this.model.placeValue = selectedVal;
1338
+      this.model.houseNumber = this.selectedPlaceTxt = selectedTxt.join(" ");
1339
+      var place = {
1340
+        index: selectedIndex,
1341
+        txt: this.model.houseNumber
1342
+      };
1343
+      localStorage.setItem("place", JSON.stringify(place));
1344 1344
     },
1345 1345
     // 报修科室
1346 1346
     showDeptPicker() {
@@ -1554,10 +1554,10 @@ export default {
1554 1554
     this.getsjnum();
1555 1555
     // 事件分类
1556 1556
     this.getIncidentcategory();
1557
-    // this.getAreaData();
1558
-    // this.getPlaceData();
1557
+    this.getAreaData();
1558
+    this.getPlaceData();
1559 1559
     // 获取故障地点
1560
-    this.getFaultLocation();
1560
+    // this.getFaultLocation();
1561 1561
     if (this.valConfig == 2) {
1562 1562
       this.getDept();
1563 1563
     }

+ 26 - 26
src/views/processing.vue

@@ -151,11 +151,11 @@
151 151
             <div class="handlerInfo">
152 152
               <cube-form :model="model" @validate="validateHandler" @submit="submitHandler">
153 153
                 <cube-form-group>
154
-                  <cube-form-item :field="fields[12]" class="btn_plcaeholde">
154
+                  <!-- <cube-form-item :field="fields[12]" class="btn_plcaeholde"> -->
155 155
                     <!-- <cube-button @click="showDatePicker">{{model.dateValue || 'Please select date'}}</cube-button> -->
156 156
                     <!-- <date-picker ref="datePicker" :min="[2008, 8, 8]" :max="[2020, 10, 20]" @select="dateSelectHandler"></date-picker> -->
157
-                  </cube-form-item>
158
-                  <cube-form-item :field="fields[13]" class="btn_plcaeholde"></cube-form-item>
157
+                  <!-- </cube-form-item> -->
158
+                  <!-- <cube-form-item :field="fields[13]" class="btn_plcaeholde"></cube-form-item> -->
159 159
                   <div class="handleRadio">
160 160
                     <cube-radio-group
161 161
                       v-model="order"
@@ -1123,15 +1123,15 @@ export default {
1123 1123
       var that = this;
1124 1124
 
1125 1125
       that.setLocalStroageData();
1126
-      that.modelData.incident.place = {
1127
-        area:{
1128
-          id:this.selectedAreaId,
1129
-          area:this.selectedAreaName
1130
-        },
1131
-        id:this.selectedPlaceId,
1132
-        place:this.selectedPlaceName
1133
-      };//增加区域地点
1134
-      console.log(that.modelData,11111);
1126
+      // that.modelData.incident.place = {
1127
+      //   area:{
1128
+      //     id:this.selectedAreaId,
1129
+      //     area:this.selectedAreaName
1130
+      //   },
1131
+      //   id:this.selectedPlaceId,
1132
+      //   place:this.selectedPlaceName
1133
+      // };//增加区域地点
1134
+      // console.log(that.modelData,11111);
1135 1135
       // console.log(this.selectedPlaceId,this.selectedAreaId,8888);//2020年4月25日16:12:55
1136 1136
       that.model.fileUrl = "url";
1137 1137
       that.loadShow = true;
@@ -1268,20 +1268,20 @@ export default {
1268 1268
   mounted() {
1269 1269
     console.log(this.modelData,this.model,999);
1270 1270
     // 获取区域列表
1271
-      this.getAreaList().then(res=>{
1272
-        if(this.modelData.incident.place){
1273
-          // 获取地点列表
1274
-          this.getPlaceList(this.modelData.incident.place.area.id)
1275
-          .then(res1=>{
1276
-            this.selectedAreaId = this.modelData.incident.place.area.id;
1277
-            this.selectedAreaName = this.modelData.incident.place.area.area;
1278
-            this.model.selectArea = this.modelData.incident.place.area.id;
1279
-            this.selectedPlaceId = this.modelData.incident.place.id;
1280
-            this.selectedPlaceName = this.modelData.incident.place.place;
1281
-            this.model.selectPlace = this.modelData.incident.place.id;
1282
-          });
1283
-        }
1284
-      })
1271
+      // this.getAreaList().then(res=>{
1272
+      //   if(this.modelData.incident.place){
1273
+      //     // 获取地点列表
1274
+      //     this.getPlaceList(this.modelData.incident.place.area.id)
1275
+      //     .then(res1=>{
1276
+      //       this.selectedAreaId = this.modelData.incident.place.area.id;
1277
+      //       this.selectedAreaName = this.modelData.incident.place.area.area;
1278
+      //       this.model.selectArea = this.modelData.incident.place.area.id;
1279
+      //       this.selectedPlaceId = this.modelData.incident.place.id;
1280
+      //       this.selectedPlaceName = this.modelData.incident.place.place;
1281
+      //       this.model.selectPlace = this.modelData.incident.place.id;
1282
+      //     });
1283
+      //   }
1284
+      // })
1285 1285
   },
1286 1286
   components: {
1287 1287
     CubePage,