From edde2a3ea44ab5e9dfe6a69bbf933259c0e105c8 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Thu, 28 Sep 2023 13:00:52 +0800
Subject: [PATCH] fix:立行立改

---
 src/views/toCarryOutLegislativeReforms/summaryPage/components/pollutionClassificationEcharts.vue |    1 
 src/views/toCarryOutLegislativeReforms/components/queryForm.vue                                  |   91 +++++++-----
 src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue              |   10 +
 src/views/toCarryOutLegislativeReforms/delay/index.vue                                           |   42 ++++-
 src/views/toCarryOutLegislativeReforms/reform/index.vue                                          |   99 ++++++++++----
 src/views/toCarryOutLegislativeReforms/delay/componets/queryForm.vue                             |  150 +++++++++++++++++++++
 src/views/toCarryOutLegislativeReforms/summaryPage/index.vue                                     |    7 
 7 files changed, 320 insertions(+), 80 deletions(-)

diff --git a/src/views/toCarryOutLegislativeReforms/components/queryForm.vue b/src/views/toCarryOutLegislativeReforms/components/queryForm.vue
index 2e8e7df..1fc2650 100644
--- a/src/views/toCarryOutLegislativeReforms/components/queryForm.vue
+++ b/src/views/toCarryOutLegislativeReforms/components/queryForm.vue
@@ -2,23 +2,38 @@
   <div>
     <div class="search-form">
       <el-form :inline="true" :model="formData" class="demo-form-inline">
-        <el-form-item label="���������������">
+        <el-form-item label="���������������">
+          <el-input v-model="formData.allocationNum" placeholder="���������������" size="small" clearable />
+        </el-form-item>
+
+        <el-form-item label="���������������">
+          <el-date-picker
+            v-model="formData.startTime"
+            style="width:92%"
+            size="small"
+            value-format="yyyy-MM-dd"
+            type="date"
+            placeholder="������������"
+          />
+
+        </el-form-item>
+        <el-form-item label="���������������">
+          <el-date-picker
+            v-model="formData.endTime"
+            style="width:92%"
+            size="small"
+            value-format="yyyy-MM-dd"
+            type="date"
+            placeholder="������������"
+          />
+        </el-form-item>
+        <el-form-item label="���������������" class="rddd">
           <el-select v-model="formData.unitId" size="small" clearable placeholder="���������">
             <el-option
               v-for="item in unitList"
               :key="item.unitId"
               :label="item.unitName"
               :value="item.unitId"
-            />
-          </el-select>
-        </el-form-item>
-        <el-form-item v-if="searchType==='reform'" label="���������������">
-          <el-select v-model="formData.state" size="small" clearable placeholder="���������">
-            <el-option
-              v-for="item in Dic.allocationApproveEnum"
-              :key="item.value"
-              :label="item.name"
-              :value="item.value"
             />
           </el-select>
         </el-form-item>
@@ -42,6 +57,7 @@
             />
           </el-select>
         </el-form-item>
+
         <el-form-item label="���������������">
           <el-select v-model="formData.changeType" placeholder="���������" clearable size="small">
             <el-option
@@ -52,18 +68,18 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item label="���������������">
-          <el-date-picker
-            v-model="valueTime"
-            clearable
-            type="daterange"
-            value-format="yyyy-MM-dd"
-            range-separator="���"
-            start-placeholder="������������"
-            end-placeholder="������������"
-          />
+        <el-form-item label="���������������">
+          <el-select v-model="formData.state" size="small" clearable placeholder="���������">
+            <el-option
+              v-for="item in Dic.allocationApproveEnum"
+              :key="item.value"
+              :label="item.name"
+              :value="item.value"
+            />
+          </el-select>
         </el-form-item>
-        <el-form-item v-if="searchType==='reform'" label="���������������">
+
+        <el-form-item label="���������������">
           <el-select v-model="formData.isInvalid " placeholder="���������" clearable size="small">
             <el-option
               v-for="item in Dic.yesOrNo"
@@ -73,19 +89,9 @@
             />
           </el-select>
         </el-form-item>
-        <el-form-item v-if="searchType==='delay'" label="���������������">
-          <el-select v-model="formData.state" placeholder="���������" clearable size="small">
-            <el-option
-              v-for="item in Dic.allocationExtensionApproveEnum"
-              :key="item.value"
-              :label="item.name"
-              :value="item.value"
-            />
-          </el-select>
-        </el-form-item>
         <el-form-item>
           <el-button type="primary" size="small" @click="onSubmit">������</el-button>
-          <el-button v-if="searchType==='reform'" type="primary" size="small" @click="handleAdd">������</el-button>
+          <el-button type="primary" size="small" @click="handleAdd">������</el-button>
         </el-form-item>
       </el-form>
     </div>
@@ -99,7 +105,9 @@
   },
   data() {
     return {
-      formData: {},
+      formData: {
+        isInvalid: 0
+      },
       unitList: [],
       Dic: JSON.parse(localStorage.getItem('dict')),
       polluteList: [],
@@ -148,9 +156,18 @@
 <style scoped lang="scss">
 .search-form {
     margin: 20px;
-
-    /deep/.el-select {
-        width: 120px;
+    margin-bottom: 0px;
+   /deep/ .el-input__suffix{
+      right: 20;
     }
+   /deep/ .el-form-item__content{
+      width: auto;
+    }
+}
+/deep/.el-form-item__label{
+  font-size: 16px;
+}
+/deep/.el-form-item{
+  margin-bottom: 5px;
 }
 </style>
diff --git a/src/views/toCarryOutLegislativeReforms/delay/componets/queryForm.vue b/src/views/toCarryOutLegislativeReforms/delay/componets/queryForm.vue
new file mode 100644
index 0000000..aefdd20
--- /dev/null
+++ b/src/views/toCarryOutLegislativeReforms/delay/componets/queryForm.vue
@@ -0,0 +1,150 @@
+<template>
+  <div>
+    <div class="search-form">
+      <el-form :inline="true" :model="formData" class="demo-form-inline">
+        <el-form-item label="���������������">
+          <el-input v-model="formData.allocationNum" placeholder="���������������" size="small" clearable />
+        </el-form-item>
+        <el-form-item label="���������������">
+          <el-select v-model="formData.state" placeholder="���������" clearable size="small">
+            <el-option
+              v-for="item in Dic.allocationExtensionApproveEnum"
+              :key="item.value"
+              :label="item.name"
+              :value="item.value"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="���������������">
+          <el-date-picker
+            v-model="formData.startTime"
+            style="width:92%"
+            size="small"
+            value-format="yyyy-MM-dd"
+            type="date"
+            placeholder="������������"
+          />
+
+        </el-form-item>
+        <el-form-item label="���������������">
+          <el-date-picker
+            v-model="formData.endTime"
+            style="width:92%"
+            size="small"
+            value-format="yyyy-MM-dd"
+            type="date"
+            placeholder="������������"
+          />
+        </el-form-item>
+        <el-form-item label="���������������">
+          <el-select v-model="formData.unitId" size="small" clearable placeholder="���������">
+            <el-option
+              v-for="item in unitList"
+              :key="item.unitId"
+              :label="item.unitName"
+              :value="item.unitId"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="���������������">
+          <el-select v-model="formData.polluteType" size="small" clearable placeholder="���������">
+            <el-option
+              v-for="item in polluteList"
+              :key="item.dataKey"
+              :label="item.dataValue"
+              :value="item.dataKey"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="���������������">
+          <el-select v-model="formData.changeType" placeholder="���������" clearable size="small">
+            <el-option
+              v-for="item in Dic.changeEnum"
+              :key="item.value"
+              :label="item.name"
+              :value="item.value"
+            />
+          </el-select>
+        </el-form-item>
+
+        <el-form-item>
+          <el-button type="primary" size="small" @click="onSubmit">������</el-button>
+          <el-button v-if="searchType==='reform'" type="primary" size="small" @click="handleAdd">������</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    searchType: { type: String, default: '' }
+  },
+  data() {
+    return {
+      formData: {},
+      unitList: [],
+      Dic: JSON.parse(localStorage.getItem('dict')),
+      polluteList: [],
+      valueTime: [],
+      isReform: false
+    }
+  },
+
+  created() {
+    this.getUnitList()
+    this.getContaminateList()
+    console.log('searchType', this.searchType)
+  },
+  methods: {
+    // ������������������list
+    getUnitList() {
+      this.$request({
+        url: '/allocation/unit',
+        method: 'get'
+      }).then((res) => {
+        this.unitList = res.data
+      })
+    },
+    getContaminateList() {
+      this.$request({
+        url: '/allocation/contaminate',
+        method: 'get'
+      }).then((res) => {
+        this.polluteList = res.data
+      })
+    },
+    onSubmit() {
+      if (this.valueTime.length > 0) {
+        this.formData.endTime = this.valueTime[1]
+        this.formData.startTime = this.valueTime[0]
+      }
+      this.$emit('handleSearch', this.formData)
+    },
+    handleAdd() {
+      this.$emit('handleAdd', '12122')
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+
+.search-form {
+    margin: 20px;
+    margin-bottom: 0px;
+   /deep/ .el-input__suffix{
+      right: 20;
+    }
+   /deep/ .el-form-item__content{
+      width: auto;
+    }
+}
+/deep/.el-form-item__label{
+  font-size: 16px;
+}
+/deep/.el-form-item{
+  margin-bottom: 5px;
+}
+</style>
diff --git a/src/views/toCarryOutLegislativeReforms/delay/index.vue b/src/views/toCarryOutLegislativeReforms/delay/index.vue
index 20c511f..708d539 100644
--- a/src/views/toCarryOutLegislativeReforms/delay/index.vue
+++ b/src/views/toCarryOutLegislativeReforms/delay/index.vue
@@ -6,7 +6,7 @@
         <el-table
           :data="tableData"
           border
-          max-height=" 400px"
+          max-height="680"
           style="width: 100%"
           :header-cell-style="{
             color: '#101111', fontSize: '16px'
@@ -89,7 +89,7 @@
             prop="address"
             label="���������������������"
           >
-            <template slot="header" slot-scope="scope">
+            <template slot="header">
               <p>������������</p>
               <p>���������</p>
             </template>
@@ -102,7 +102,7 @@
           <el-table-column
             align="center"
           >
-            <template slot="header" slot-scope="scope">
+            <template slot="header">
               <p>���������</p>
               <p>������������</p>
             </template>
@@ -142,7 +142,7 @@
 
 <script>
 import workOrderInformation from '@/views/toCarryOutLegislativeReforms/components/workOrderInformation'
-import searchBar from '@/views/toCarryOutLegislativeReforms/components/queryForm'
+import searchBar from '@/views/toCarryOutLegislativeReforms/delay/componets/queryForm'
 export default {
   components: {
     searchBar,
@@ -280,18 +280,36 @@
 <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;
-    position: relative;
-    overflow-x: hidden;
-    max-height: 400px;
-}
+// /deep/ .el-table__body-wrapper {
+//     overflow: scroll;
+//     position: relative;
+//     overflow-x: hidden;
+//     max-height: 400px;
+// }
 .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;
+    }
+  }
+
 }
 </style>
+
diff --git a/src/views/toCarryOutLegislativeReforms/reform/index.vue b/src/views/toCarryOutLegislativeReforms/reform/index.vue
index 9b1cc60..df6afda 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">
@@ -188,6 +210,7 @@
   },
   data() {
     return {
+      errorClass: 'errorClass',
       searchType: 'reform',
       pagination: {
         currentPage: 1,
@@ -433,9 +456,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 +474,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>
diff --git a/src/views/toCarryOutLegislativeReforms/summaryPage/components/pollutionClassificationEcharts.vue b/src/views/toCarryOutLegislativeReforms/summaryPage/components/pollutionClassificationEcharts.vue
index a44c3d4..f8a130b 100644
--- a/src/views/toCarryOutLegislativeReforms/summaryPage/components/pollutionClassificationEcharts.vue
+++ b/src/views/toCarryOutLegislativeReforms/summaryPage/components/pollutionClassificationEcharts.vue
@@ -63,6 +63,7 @@
   methods: {
     initChart() {
       this.chart = echarts.init(this.$el, 'macarons')
+      this.chart.clear()
       this.setOptions()
     },
     setOptions() {
diff --git a/src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue b/src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue
index 388a22f..a81c9a0 100644
--- a/src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue
+++ b/src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue
@@ -1,5 +1,5 @@
 <template>
-  <div :class="className" :style="{ height: height, width: width }" />
+  <div id="myPieChart" :style="{ height: height, width: width }" />
 </template>
 
 <script>
@@ -40,6 +40,7 @@
       handler(newVal) {
         console.log('newVal', newVal)
         this.seriesData = []
+        this.namelist = []
         const arr = []
 
         newVal.forEach(item => {
@@ -74,7 +75,12 @@
   },
   methods: {
     initChart() {
-      this.chart = echarts.init(this.$el, 'macarons')
+      if (this.chart) {
+        this.chart.dispose()
+      }
+      const chartDom = document.getElementById('myPieChart')
+      this.chart = echarts.init(chartDom)
+      this.chart.clear()
       this.setOptions()
     },
     setOptions() {
diff --git a/src/views/toCarryOutLegislativeReforms/summaryPage/index.vue b/src/views/toCarryOutLegislativeReforms/summaryPage/index.vue
index 2148833..7b84de2 100644
--- a/src/views/toCarryOutLegislativeReforms/summaryPage/index.vue
+++ b/src/views/toCarryOutLegislativeReforms/summaryPage/index.vue
@@ -69,7 +69,7 @@
               <el-table
                 :data="tableData"
                 border
-                max-height=" 400px"
+                max-height="400"
                 style="width: 100%"
                 :header-cell-style="{
                   background: '#99D4FF', color: '#101111', fontSize: '16px'
@@ -258,6 +258,8 @@
         }
       }).then((res) => {
         if (res.code === 0) {
+          this.chartData = []
+          this.chartData = this.cylindricalityData
           this.chartData = res.data.polluteType
           this.cylindricalityData = res.data.escalationType
         } else {
@@ -315,6 +317,9 @@
 $bgcolorlist: $red $orange $yellow $green;
 
 .main {
+  /deep/ .el-table__row{
+  font-size: 18px;
+}
   background: #bbbbbb;
   min-height: 800px;
   padding: 15px 10px;

--
Gitblit v1.8.0