yijianjun 1 mesiac pred
rodič
commit
8d5b5cb909
2 zmenil súbory, kde vykonal 69 pridanie a 132 odobranie
  1. 1 1
      src/views/board.vue
  2. 68 131
      src/views/modules/station/list.vue

+ 1 - 1
src/views/board.vue

@@ -3410,7 +3410,7 @@ export default {
         params: params,
       }).then(({ data }) => {
         if (data && data.code === 0) {
-          this.rainfalldataList = data.data;
+          this.rainfalldataList = data.data?.sort((a, b) => b?.temperature - a?.temperature);
         }
       });
     },

+ 68 - 131
src/views/modules/station/list.vue

@@ -32,7 +32,6 @@
             display: 'flex',
           }"
         >
-         
           <div
             :style="{
               alignItems: 'center',
@@ -62,79 +61,57 @@
               @change="getCompList()"
               clearable
             >
-              <el-option
-                v-for="item in cityList"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              />
+              <el-option v-for="item in cityList" :key="item.value" :label="item.label" :value="item.value" />
             </el-select>
           </div>
-		  <div
-		    :style="{
-		      alignItems: 'center',
-		      margin: '0 10px 0 0',
-		      display: 'flex',
-		    }"
-		  >
-		    <label
-		      :style="{
-		        margin: '0 10px 0 0',
-		        whiteSpace: 'nowrap',
-		        color: '#666',
-		        display: 'inline-block',
-		        lineHeight: '40px',
-		        fontSize: 'inherit',
-		        fontWeight: '500',
-		        height: '40px',
-		      }"
-		      class="item-label"
-		      >归属县旗</label
-		    >
-		    <el-select
-		      style="width: 100%"
-		      v-model="searchForm.compId"
-		      placeholder="归属县旗"
-		      @keydown.enter.native="search()"
-		      clearable
-		    >
-		      <el-option
-		        v-for="item in compList"
-		        :key="item.value"
-		        :label="item.label"
-		        :value="item.value"
-		      />
-		    </el-select>
-		  </div>
-		  <div
-		    :style="{
-		      alignItems: 'center',
-		      margin: '0 10px 0 0',
-		      display: 'flex',
-		    }"
-		  >
-		    <label
-		      :style="{
-		        margin: '0 10px 0 0',
-		        whiteSpace: 'nowrap',
-		        color: '#666',
-		        display: 'inline-block',
-		        lineHeight: '40px',
-		        fontSize: 'inherit',
-		        fontWeight: '500',
-		        height: '40px',
-		      }"
-		      class="item-label"
-		      >变电站</label
-		    >
-		    <el-input
-		      v-model="searchForm.subName"
-		      placeholder="变电站"
-		      @keydown.enter.native="search()"
-		      clearable
-		    ></el-input>
-		  </div>
-          
+          <div
+            :style="{
+              alignItems: 'center',
+              margin: '0 10px 0 0',
+              display: 'flex',
+            }"
+          >
+            <label
+              :style="{
+                margin: '0 10px 0 0',
+                whiteSpace: 'nowrap',
+                color: '#666',
+                display: 'inline-block',
+                lineHeight: '40px',
+                fontSize: 'inherit',
+                fontWeight: '500',
+                height: '40px',
+              }"
+              class="item-label"
+              >归属县旗</label
+            >
+            <el-select style="width: 100%" v-model="searchForm.compId" placeholder="归属县旗" @keydown.enter.native="search()" clearable>
+              <el-option v-for="item in compList" :key="item.value" :label="item.label" :value="item.value" />
+            </el-select>
+          </div>
+          <div
+            :style="{
+              alignItems: 'center',
+              margin: '0 10px 0 0',
+              display: 'flex',
+            }"
+          >
+            <label
+              :style="{
+                margin: '0 10px 0 0',
+                whiteSpace: 'nowrap',
+                color: '#666',
+                display: 'inline-block',
+                lineHeight: '40px',
+                fontSize: 'inherit',
+                fontWeight: '500',
+                height: '40px',
+              }"
+              class="item-label"
+              >变电站</label
+            >
+            <el-input v-model="searchForm.subName" placeholder="变电站" @keydown.enter.native="search()" clearable></el-input>
+          </div>
 
           <el-button class="search" type="success" @click="search()">
             <span
@@ -174,12 +151,7 @@
             ></span>
             添加
           </el-button>
-          <el-button
-            class="del"
-            :disabled="dataListSelections.length ? false : true"
-            type="danger"
-            @click="deleteHandler()"
-          >
+          <el-button class="del" :disabled="dataListSelections.length ? false : true" type="danger" @click="deleteHandler()">
             <span
               class="icon iconfont icon-xihuan"
               :style="{
@@ -222,19 +194,8 @@
           v-loading="dataListLoading"
           @selection-change="selectionChangeHandler"
         >
-          <el-table-column
-            :resizable="true"
-            type="selection"
-            align="center"
-            width="50"
-          ></el-table-column>
-          <el-table-column
-            :resizable="true"
-            :sortable="true"
-            label="序号"
-            type="index"
-            width="50"
-          />
+          <el-table-column :resizable="true" type="selection" align="center" width="50"></el-table-column>
+          <el-table-column :resizable="true" :sortable="true" label="序号" type="index" width="50" />
 
           <el-table-column :resizable="true" :sortable="true" prop="subName" label="变电站">
             <template slot-scope="scope">
@@ -261,32 +222,22 @@
               {{ scope.row.mainNum }}
             </template>
           </el-table-column>
-          <el-table-column
-            :resizable="true"
-            :sortable="true"
-            prop="mainCapacity"
-            label="主变容量(MVA)"
-          >
+          <el-table-column :resizable="true" :sortable="true" prop="mainCapacity" label="主变容量(MVA)">
             <template slot-scope="scope">
               {{ scope.row.mainCapacity }}
             </template>
           </el-table-column>
-		  <el-table-column :resizable="true" :sortable="true" prop="userGrowthRate" label="用户增长率">
-		    <template slot-scope="scope">
-		      {{ scope.row.userGrowthRate }}
-		    </template>
-		  </el-table-column>
-		  <el-table-column :resizable="true" :sortable="true" prop="userPower" label="用户使用功率">
-		    <template slot-scope="scope">
-		      {{ scope.row.userPower }}
-		    </template>
-		  </el-table-column>
-          <el-table-column
-            :resizable="true"
-            :sortable="true"
-            prop="alarmThreshold"
-            label="报警阀值"
-          >
+          <el-table-column :resizable="true" :sortable="true" prop="userGrowthRate" label="用户增长率(%)">
+            <template slot-scope="scope">
+              {{ scope.row.userGrowthRate }}
+            </template>
+          </el-table-column>
+          <el-table-column :resizable="true" :sortable="true" prop="userPower" label="用户使用功率">
+            <template slot-scope="scope">
+              {{ scope.row.userPower }}
+            </template>
+          </el-table-column>
+          <el-table-column :resizable="true" :sortable="true" prop="alarmThreshold" label="报警阀值">
             <template slot-scope="scope">
               {{ scope.row.alarmThreshold }}
             </template>
@@ -297,18 +248,14 @@
             prop="growRate"
             label="用户增长率(%)"
           /> -->
-         <!-- <el-table-column :resizable="true" :sortable="true" prop="remark" label="备注">
+          <!-- <el-table-column :resizable="true" :sortable="true" prop="remark" label="备注">
             <template slot-scope="scope">
               {{ scope.row.remark }}
             </template>
           </el-table-column> -->
           <el-table-column width="260" label="操作">
             <template slot-scope="scope">
-              <el-button
-                class="view"
-                type="success"
-                @click="addOrUpdateHandler(scope.row.id, 'view')"
-              >
+              <el-button class="view" type="success" @click="addOrUpdateHandler(scope.row.id, 'view')">
                 <span
                   class="icon iconfont icon-xihuan"
                   :style="{
@@ -321,11 +268,7 @@
                 ></span>
                 查看
               </el-button>
-              <el-button
-                class="edit"
-                type="success"
-                @click="addOrUpdateHandler(scope.row.id, 'edit')"
-              >
+              <el-button class="edit" type="success" @click="addOrUpdateHandler(scope.row.id, 'edit')">
                 <span
                   class="icon iconfont icon-xihuan"
                   :style="{
@@ -1018,13 +961,7 @@ export default {
   height: 100%;
 }
 
-.main-content
-  .el-pagination
-  ::v-deep
-  .el-pagination__sizes
-  .el-input
-  .el-input__suffix
-  .el-select__caret {
+.main-content .el-pagination ::v-deep .el-pagination__sizes .el-input .el-input__suffix .el-select__caret {
   cursor: pointer;
   color: #c0c4cc;
   width: 25px;