From 7e1e05a15fd6d135a4ff58918a2f7df797a5ed6e Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Mon, 22 Apr 2024 10:20:12 +0800
Subject: [PATCH] fix: 单位修改
---
src/views/toCarryOutLegislativeReforms/delay/index.vue | 197 +++++++++++++++++++++++++++++++++---------------
1 files changed, 134 insertions(+), 63 deletions(-)
diff --git a/src/views/toCarryOutLegislativeReforms/delay/index.vue b/src/views/toCarryOutLegislativeReforms/delay/index.vue
index 20c511f..68a57c8 100644
--- a/src/views/toCarryOutLegislativeReforms/delay/index.vue
+++ b/src/views/toCarryOutLegislativeReforms/delay/index.vue
@@ -1,12 +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
- max-height=" 400px"
+ size="mini"
style="width: 100%"
:header-cell-style="{
color: '#101111', fontSize: '16px'
@@ -15,7 +20,7 @@
<el-table-column
type="index"
label="������"
- width="100px"
+ width="60px"
align="center"
/>
<el-table-column
@@ -46,79 +51,116 @@
label="������������"
>
<template slot-scope="scope">
- <p> {{ dictObj.changeEnum[scope.row.changeType] }}</p>
+ <div> {{ dictObj.changeEnum[scope.row.changeType] }}</div>
</template>
</el-table-column>
<el-table-column
align="center"
prop="extensionNum"
+ width="60px"
label="������������"
>
<template slot-scope="scope">
- <p> {{ scope.row.extensionNum }}���</p>
+ <div> {{ scope.row.extensionNum }}���</div>
</template>
</el-table-column>
<el-table-column
align="center"
prop="address"
+ width="80px"
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>
- </el-table-column>
- <el-table-column
- align="center"
- prop="address"
- label="���������������������"
- >
- <template slot="header" slot-scope="scope">
- <p>������������</p>
- <p>���������</p>
- </template>
- <template slot-scope="scope">
- <p> {{ scope.row.escalationName }}</p>
- <p> {{ updatUnitIdFormatter(scope.row) }}</p>
-
</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.escalationName }}</div>
+ <div> {{ updatUnitIdFormatter(scope.row) }}</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ align="center"
+ >
+ <template slot="header">
+ <div>���������</div>
+ <div>������������</div>
+ </template>
+ <template slot-scope="scope">
+ <div>{{ scope.row.updateName }}</div>
+ <div>{{ scope.row.updateTime }}</div>
</template>
</el-table-column>
<el-table-column
align="center"
prop="address"
+ width="100px"
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" 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>
@@ -128,27 +170,32 @@
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"
/>
</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>
<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,
workOrderInformation
},
- data() {
+ data () {
return {
Dic: JSON.parse(localStorage.getItem('dict')),
dictObj: JSON.parse(localStorage.getItem('dictObj')),
@@ -163,22 +210,27 @@
// ������������������������������������������(���������������������������)
totalCount: 0,
// ������������������������������
- pageSizes: [10, 20, 30, 40],
+ pageSizes: [10, 50, 100, 200],
// ������������������������������������������
pageSize: 10
- }
+ },
+ 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
+ }
this.$request({
url: '/allocationExtension/page',
method: 'post',
@@ -193,19 +245,21 @@
},
// ������
// ���������������������
- handleSizeChange(val) {
+ handleSizeChange (val) {
// ���������������������������
- this.pagination.PageSize = val
+ this.pagination.pageSize = val
// ���������������������������������������������������������������������������
this.pagination.currentPage = 1
+ 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',
@@ -234,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'
@@ -265,7 +319,7 @@
console.log(' JSON.stringify(this.unitList)', this.unitList)
})
},
- getContaminateList() {
+ getContaminateList () {
this.$request({
url: '/allocation/contaminate',
method: 'get'
@@ -280,18 +334,35 @@
<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>
--
Gitblit v1.8.0