Hwt 2 лет назад
Родитель
Сommit
dfd1837771

+ 8 - 5
smart/src/views/onSiteVehicles/index.vue

@@ -53,7 +53,7 @@
         slot="parkingTime"
       >
         <!-- {{ shijianc( new Date(scope.row.entryTime).getTime()+ scope.row.parkingTime )  }} -->
-        {{shijianc(scope.row.parkingTime * 60000)}}
+        {{shijianc((scope.row.parkingTime * 60000))}}
       </template>
 
       <template
@@ -189,14 +189,17 @@ export default {
 
     },
     shijianc (time) {
+      console.log(time);
       var date = new Date(time)
-      // var Y = date.getFullYear() + '-'
-      // var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
-      var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + '天'
+      var Y = date.getFullYear();
+      var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
+      // (Y * 365) + (M * 30)
+      // var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + '天'
+      var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate())
       var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + '小时'
       var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + '分钟'
       var s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()) + '秒'
-      return D + h + m + s
+      return (((Number(Y) - 1970) * 365) + ((Number(M) - 1) * 30) + Number(D)) + '天' + h + m
 
     },
   },

+ 7 - 6
smart/src/views/parkingSpaceManagement/pageJump/parkingLotSaveEdits.vue

@@ -260,17 +260,13 @@ export default {
     },
 
     garageAreaListQuery () {
+      debugger
       this.garageAreaList = [];
       let onOption = '';
 
-
-
-
-
-
       console.log(this.ruleForm.garageId);
 
-      this.$http.post('/sc-community-web/parkingCar/findAreaInfo', { parkid: this.ruleForm.garageId }).then((res) => {
+      this.$http.post('/sc-community-web/parkingCar/findAreaInfo', { parkId: this.ruleForm.garageId }).then((res) => {
         res.data.map((res) => {
           onOption = {
             label: res.areaName,
@@ -288,9 +284,14 @@ export default {
   created () {
     //获取社区名称下拉列表
     this.communityNameList();
+    debugger
     if (this.params.todo == 'edit') {
+      this.garageNameList();
+
       this.codingStatus = false;
+      debugger
       this.ruleForm = this.params.data;
+      this.garageAreaListQuery();
     }
   }
 };

+ 5 - 4
smart/src/views/parkingSpaceManagement/parkingSpaceList.vue

@@ -16,7 +16,7 @@
           v-for="(item, index) in communityList"
           :label="item.label"
           :value="item.id"
-          @change="communityChoice"
+          @click.native="communityChoice"
           :key="index"
         ></el-option>
       </el-select>
@@ -174,14 +174,15 @@ export default {
         });
       });
     },
-    communityChoice (e) {
+    communityChoice () {
       this.garageNameList();
     },
     //获取车库名称下拉列表
     garageNameList () {
+      debugger
       this.garageList = [];
       let onOption = '';
-      this.$http.post('/sc-community/assets/garage/list', {}).then((res) => {
+      this.$http.post('/sc-community/assets/garage/list', { communityId: this.mixins_query.communityId }).then((res) => {
         res.data.map((res) => {
           onOption = {
             label: res.garageName,
@@ -270,7 +271,7 @@ export default {
   mounted () { },
   created () {
     this.communityNameList();
-    this.garageNameList();
+    // this.garageNameList();
     this.mixins_dataUrl = '/sc-community/assets/garage/parking/page';
     this.mixins_query = {};
     this.mixins_search();

+ 19 - 15
smart/src/views/vehicleInformation/setpPage/native.vue

@@ -82,32 +82,35 @@ export default {
     /** 控制树形单选 */
     checkChange (data, checked) {
       this.checkedData = {}
-      // if (checked) {
-      if (!!data.children && data.children.length > 0) {
-        console.log("有子节点不可选")
-      } else {
-        this.checkedData = data;
-        // 注意!!!
-        //1、下方的id和属性中 node-key="id"必须是同一个字段  
-        //2、$refs.tree 也需要和上方的属性匹配 ref="tree"
-        this.$refs.tenantstree.setCheckedKeys([data.value]);
-        this.value = data.value;
-        this.Information = data.name;
+      debugger
+      if (checked) {
+        if (!!data.children && data.children.length > 0) {
+          console.log("有子节点不可选")
+        } else {
+          this.checkedData = data;
+          // 注意!!!
+          //1、下方的id和属性中 node-key="id"必须是同一个字段  
+          //2、$refs.tree 也需要和上方的属性匹配 ref="tree"
+          this.$refs.tenantstree.setCheckedKeys([data.value]);
+          this.value = data.value;
+          this.Information = data.name;
+        }
       }
-      // }
-      // this.value = this.checkedData.value;
-      // console.log("checked data", data, this.checkedData)
-      // this.Information = this.checkedData.name
+      this.value = this.checkedData.value;
+      console.log("checked data", data, this.checkedData)
+      this.Information = this.checkedData.name
 
 
     },
     submit () {
+      debugger
       this.positionInformation.push({ positionInformation: this.Information, id: this.id, value: this.value });
       this.params.callback(this.positionInformation);
       this.$emit('close');
     },
 
     filterTreeData (trData) {
+      debugger
       trData.map((item, index) => {
         if (this.isNotEmpty(item.children)) {
           item.disabled = true;
@@ -121,6 +124,7 @@ export default {
       return arr && Array.isArray(arr) && arr.length > 0;
     },
     thisCheck (ev, node, data) {
+      debugger
       if (!data.disabled) {
         node.checked = !node.checked;
       }