From d1b793c51a67e7aebf04d35c0200b21681337024 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Sun, 08 Oct 2023 15:13:54 +0800
Subject: [PATCH] fix:接口修改和echarts修改

---
 src/views/toCarryOutLegislativeReforms/reform/index.vue |  120 +++++++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 86 insertions(+), 34 deletions(-)

diff --git a/src/views/toCarryOutLegislativeReforms/reform/index.vue b/src/views/toCarryOutLegislativeReforms/reform/index.vue
index 9b1cc60..ea5f8c4 100644
--- a/src/views/toCarryOutLegislativeReforms/reform/index.vue
+++ b/src/views/toCarryOutLegislativeReforms/reform/index.vue
@@ -13,9 +13,10 @@
       />
       <div class="tab">
         <el-table
+          size="mini"
           :data="tableData"
           border
-          max-height="500px"
+          max-height="680"
           style="width: 100%"
           :header-cell-style="{
             color: '#101111', fontSize: '16px'
@@ -24,14 +25,22 @@
           <el-table-column
             type="index"
             label="������"
-            width="100px"
+            width="60px"
             align="center"
           />
           <el-table-column
             align="center"
-            prop="escalationTime"
-            label="������������������"
-          />
+          >
+            <template slot="header">
+              <div>������</div>
+              <div>������������</div>
+            </template>
+            <template slot-scope="scope">
+              <div> {{ scope.row.allocationNum }}</div>
+              <div> {{ scope.row.escalationTime }}</div>
+
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             prop="unitId"
@@ -42,48 +51,59 @@
             align="center"
             prop="polluteType"
             label="������������"
+            width="120px"
             :formatter="polluteTypeFormatter"
           />
           <el-table-column
             align="center"
           >
-            <template slot="header" slot-scope="scope">
-              <p>������������</p>
-              <p>������������</p>
+            <template slot="header">
+              <div>������������</div>
+              <div>������������</div>
             </template>
             <template slot-scope="scope">
-              <p>  {{ dictObj.changeEnum[scope.row.changeType] }}</p>
-              <p v-show="scope.row.changeType && scope.row.changeType===2">  {{ scope.row.residueDay }}���</p>
+              <div>  {{ dictObj.changeEnum[scope.row.changeType] }}</div>
+              <div v-show="scope.row.changeType && scope.row.changeType===2" :class="[Number(scope.row.residueDay) < 0 ? errorClass : '']">
+                <span v-if="Number(scope.row.residueDay) < 0">
+                  ������ {{ Math.abs(scope.row.residueDay) }}���
+                </span>
+                <span v-else>
+                  {{ scope.row.residueDay }}���
+                </span>
+
+              </div>
             </template>
           </el-table-column>
           <el-table-column
             align="center"
             prop="investigationType"
             label="������������"
+            width="100px"
             :formatter="investigationTypeFormatter"
           />
           <el-table-column
             align="center"
             prop="state"
+            width="100px"
             label="������������"
           >
             <template slot-scope="scope">
-              <el-tag v-if="scope.row.state===40" type="success" size="medium ">
+              <el-tag v-if="scope.row.state===40" type="success">
                 {{ stateFormatter(scope.row) }}
               </el-tag>
-              <el-tag v-if="scope.row.state===50" type="danger" size="medium ">
+              <el-tag v-if="scope.row.state===50" type="danger">
                 {{ stateFormatter(scope.row) }}
               </el-tag>
-              <el-tag v-if="scope.row.state===9" type="info" size="medium ">
+              <el-tag v-if="scope.row.state===9" type="info">
                 {{ stateFormatter(scope.row) }}
               </el-tag>
-              <el-tag v-if="scope.row.state===20" type="warning" size="medium ">
+              <el-tag v-if="scope.row.state===20" type="warning">
                 {{ stateFormatter(scope.row) }}
               </el-tag>
-              <el-tag v-if="scope.row.state===10" type="warning" size="medium ">
+              <el-tag v-if="scope.row.state===10" type="warning">
                 {{ stateFormatter(scope.row) }}
               </el-tag>
-              <el-tag v-if="scope.row.state===30" type="warning" size="medium ">
+              <el-tag v-if="scope.row.state===30" type="warning">
                 {{ stateFormatter(scope.row) }}
               </el-tag>
             </template>
@@ -92,36 +112,38 @@
             align="center"
             prop="isInvalid"
             label="������������"
+            width="60px"
             :formatter="isInvalidFormatter"
           />
           <el-table-column
             align="center"
           >
-            <template slot="header" slot-scope="scope">
-              <p>���������</p>
-              <p>���������</p>
+            <template slot="header">
+              <div>������������</div>
+              <div>���������</div>
             </template>
             <template slot-scope="scope">
-              <p> {{ scope.row.escalationName }}</p>
-              <p> {{ updatUnitIdFormatter(scope.row) }}</p>
+              <div> {{ scope.row.escalationName }}</div>
+              <div> {{ updatUnitIdFormatter(scope.row) }}</div>
 
             </template>
           </el-table-column>
           <el-table-column
             align="center"
           >
-            <template slot="header" slot-scope="scope">
-              <p>���������</p>
-              <p>������������</p>
+            <template slot="header">
+              <div>���������</div>
+              <div>������������</div>
             </template>
             <template slot-scope="scope">
-              <p>{{ scope.row.updateName }}</p>
-              <p>{{ scope.row.updateTime }}</p>
+              <div>{{ scope.row.updateName }}</div>
+              <div>{{ scope.row.updateTime }}</div>
             </template>
           </el-table-column>
           <el-table-column
             align="center"
             prop="createTime"
+            width="100px"
             label="������"
           >
             <template slot-scope="scope">
@@ -129,7 +151,7 @@
               <el-button v-if="scope.row.state===9" type="text" size="medium" @click="handleOpenDialog(scope.row,'edit')">������</el-button>
               <el-button v-if="scope.row.state>30&&scope.row.isInvalid===0" type="text" size="medium" @click="handleCancel(scope.row)">������</el-button>
               <el-button v-if="scope.row.state===20" type="text" size="medium" @click="openWorkOrdinDialog(scope.row,'work')">������</el-button>
-              <el-button v-if="scope.row.state===30" type="text" size="medium" @click="openWorkOrdinDialog(scope.row,'approve')">������</el-button>
+              <el-button v-if="scope.row.state===30&&scope.row.isApprove===1" type="text" size="medium" @click="openWorkOrdinDialog(scope.row,'approve')">������</el-button>
               <el-button v-if="scope.row.state===20&&scope.row.changeType===2&&scope.row.applyState===0" type="text" size="medium" @click="openWorkOrdinDialog(scope.row,'delay')">������������</el-button>
             </template>
           </el-table-column>
@@ -140,9 +162,9 @@
           background
           :current-page="pagination.currentPage"
           :page-sizes="pagination.pageSizes"
-          :page-size="pagination.PageSize"
+          :page-size="pagination.pageSize"
           :total="pagination.totalCount"
-          layout="sizes,prev, pager, next, jumper"
+          layout="total, sizes, prev, pager, next, jumper"
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
         />
@@ -188,6 +210,7 @@
   },
   data() {
     return {
+      errorClass: 'errorClass',
       searchType: 'reform',
       pagination: {
         currentPage: 1,
@@ -218,7 +241,10 @@
       pageState: 'add',
       invalidReason: '',
       slectRow: {},
-      title: ''
+      title: '',
+      searchData: {
+        isInvalid: 0
+      }
     }
   },
 
@@ -353,11 +379,15 @@
       })
     },
     handleSearch(obj) {
+      this.searchData.isInvalid = 0
+      if (obj) {
+        this.searchData = obj
+      }
       this.$request({
         url: '/allocation/page',
         method: 'post',
         data: {
-          ...obj,
+          ...this.searchData,
           'page': this.pagination
         }
       }).then((res) => {
@@ -373,14 +403,16 @@
     // ���������������������
     handleSizeChange(val) {
       // ���������������������������
-      this.pagination.PageSize = val
+      this.pagination.pageSize = val
       // ���������������������������������������������������������������������������
       this.pagination.currentPage = 1
+      this.handleSearch()
     },
     // ���������������
     handleCurrentChange(val) {
       // ���������������������
       this.pagination.currentPage = val
+      this.handleSearch()
       // console.log(val)
     },
     openWorkOrdinDialog(row, type) {
@@ -433,9 +465,15 @@
 <style scoped lang="scss">
 .main{
     padding: 20px;
+    padding-top: 0px;
+    height: 100%;
+    overflow: overlay;
 }
 .tab {
-    margin-top: 10px;
+    margin-top: 0px;
+   /deep/ .el-tag{
+      font-size: 16px;
+    }
 }
 // /deep/ .el-table__body-wrapper {
 //     overflow: scroll;
@@ -445,6 +483,20 @@
 // }
 .pagina{
     margin-top: 10px;
-    text-align: right;
+}
+/deep/ .el-table__row{
+  font-size: 18px;
+}
+.el-pagination {
+  padding: 0;
+  .el-select{
+    /deep/.el-input{
+      margin:0;
+    }
+  }
+
+}
+.errorClass{
+  color: red;
 }
 </style>

--
Gitblit v1.8.0