From 9aeeea9741d3e2bca01bc7ebb4864f834fe88ee7 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Mon, 18 Mar 2024 15:18:37 +0800
Subject: [PATCH] fix: 表格高度修改
---
src/views/hand/index.vue | 1
src/views/toCarryOutLegislativeReforms/delay/index.vue | 100 ++++++++++++++++++++++++++++++++++++--------------
2 files changed, 72 insertions(+), 29 deletions(-)
diff --git a/src/views/hand/index.vue b/src/views/hand/index.vue
index ca1d2d0..223a754 100644
--- a/src/views/hand/index.vue
+++ b/src/views/hand/index.vue
@@ -64,7 +64,6 @@
:data="tableData"
border
size="mini"
- max-height="680"
style="width: 100%"
:header-cell-style="{
color: '#101111', fontSize: '16px'
diff --git a/src/views/toCarryOutLegislativeReforms/delay/index.vue b/src/views/toCarryOutLegislativeReforms/delay/index.vue
index f5c0c48..77db1b6 100644
--- a/src/views/toCarryOutLegislativeReforms/delay/index.vue
+++ b/src/views/toCarryOutLegislativeReforms/delay/index.vue
@@ -1,13 +1,17 @@
<template>
<div class="main">
<div>
- <searchBar v-if="searchType" :search-type="searchType" @handleSearch="handleSearch" @handleAdd="handleOpenDialog(null,'add')" />
+ <searchBar
+ v-if="searchType"
+ :search-type="searchType"
+ @handleSearch="handleSearch"
+ @handleAdd="handleOpenDialog(null,'add')"
+ />
<div class="tab">
<el-table
:data="tableData"
border
size="mini"
- max-height="680"
style="width: 100%"
:header-cell-style="{
color: '#101111', fontSize: '16px'
@@ -67,22 +71,46 @@
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"
+ size="medium "
+ >
{{ 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"
+ size="medium "
+ >
{{ 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"
+ size="medium "
+ >
{{ 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"
+ size="medium "
+ >
{{ 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"
+ size="medium "
+ >
{{ 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"
+ size="medium "
+ >
{{ stateFormatter(scope.row) }}
</el-tag>
</template>
@@ -97,7 +125,6 @@
<template slot-scope="scope">
<div> {{ scope.row.escalationName }}</div>
<div> {{ updatUnitIdFormatter(scope.row) }}</div>
-
</template>
</el-table-column>
<el-table-column
@@ -119,8 +146,21 @@
label="������"
>
<template slot-scope="scope">
- <el-button type="text" size="medium" @click="openWorkOrdinDialog(scope.row,'detail')">������</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
+ type="text"
+ size="medium"
+ @click="openWorkOrdinDialog(scope.row,'detail')"
+ >
+ ������
+ </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>
</template>
</el-table-column>
</el-table>
@@ -138,7 +178,12 @@
/>
</div>
</div>
- <workOrderInformation v-if="workOrdinDialogVisible" :dialog-data="dialogData" :visible.sync="workOrdinDialogVisible" @handeleSumit="handeleWorkSumbit" />
+ <workOrderInformation
+ v-if="workOrdinDialogVisible"
+ :dialog-data="dialogData"
+ :visible.sync="workOrdinDialogVisible"
+ @handeleSumit="handeleWorkSumbit"
+ />
</div>
</template>
@@ -150,7 +195,7 @@
searchBar,
workOrderInformation
},
- data() {
+ data () {
return {
Dic: JSON.parse(localStorage.getItem('dict')),
dictObj: JSON.parse(localStorage.getItem('dictObj')),
@@ -172,16 +217,16 @@
searchData: {}
}
},
- created() {
+ created () {
this.getUnitList()
this.getContaminateList()
this.handleSearch()
},
methods: {
- handeleWorkSumbit() {
+ handeleWorkSumbit () {
this.handleSearch()
},
- handleSearch(obj) {
+ handleSearch (obj) {
this.searchData.isInvalid = 0
if (obj) {
this.searchData = obj
@@ -200,7 +245,7 @@
},
// ������
// ���������������������
- handleSizeChange(val) {
+ handleSizeChange (val) {
// ���������������������������
this.pagination.pageSize = val
// ���������������������������������������������������������������������������
@@ -208,13 +253,13 @@
this.handleSearch()
},
// ���������������
- handleCurrentChange(val) {
+ handleCurrentChange (val) {
// ���������������������
this.pagination.currentPage = val
this.handleSearch()
// console.log(val)
},
- openWorkOrdinDialog(row, type) {
+ openWorkOrdinDialog (row, type) {
this.$request({
url: '/allocationExtension/detail',
method: 'get',
@@ -243,29 +288,29 @@
}
})
},
- updatUnitIdFormatter(val) {
+ updatUnitIdFormatter (val) {
const data = this.unitList.find(item => item && item.unitId === val.escalationUnitId)
return data ? data.unitName : ''
},
- unitIdFormatter(val) {
+ unitIdFormatter (val) {
const data = this.unitList.find(item => item && item.unitId === val.unitId)
return data ? data.unitName : ''
},
- polluteTypeFormatter(val) {
+ polluteTypeFormatter (val) {
const data = this.polluteList.find(item => item && parseInt(item.dataKey) === val.polluteType)
return data ? data.dataValue : ''
},
- investigationTypeFormatter(val) {
+ investigationTypeFormatter (val) {
return this.dictObj.investigationEnum[val.investigationType]
},
- stateFormatter(val) {
+ stateFormatter (val) {
return this.dictObj.allocationApproveEnum[val.state]
},
- isInvalidFormatter(val) {
+ isInvalidFormatter (val) {
return this.dictObj.yesOrNo[val.isInvalid]
},
// ������������������list
- getUnitList() {
+ getUnitList () {
this.$request({
url: '/allocation/unit',
method: 'get'
@@ -274,7 +319,7 @@
console.log(' JSON.stringify(this.unitList)', this.unitList)
})
},
- getContaminateList() {
+ getContaminateList () {
this.$request({
url: '/allocation/contaminate',
method: 'get'
@@ -321,4 +366,3 @@
}
</style>
-
--
Gitblit v1.8.0