| | |
| | | <template> |
| | | <div class="main"> |
| | | <div v-loading="loading" class="main"> |
| | | <div> |
| | | <searchBar v-if="searchType" :search-type="'reform'" @handleSearch="handleSearch" @handleAdd="handleOpenDialog(null,'add')" /> |
| | | <newWorkOrder |
| | | v-if="centerDialogVisible" |
| | | ref="newWorkOrder" |
| | | :parent-form-data="parentFormData" |
| | | :title="title" |
| | | :page-state="pageState" |
| | | :visible.sync="centerDialogVisible" |
| | | @handleSubmit="newHandleSubmit" |
| | | /> |
| | | <searchBar v-if="searchType" :search-type="'reform'" @handleSearch="handleSearchBut" @handleAdd="handleOpenDialog(null, 'add')" /> |
| | | <newWorkOrder v-if="centerDialogVisible" ref="newWorkOrder" :parent-form-data="parentFormData" :title="title" :page-state="pageState" :visible.sync="centerDialogVisible" @handleSubmit="newHandleSubmit" /> |
| | | <!-- <el-divider></el-divider> --> |
| | | <div class="tab"> |
| | | <el-table |
| | | size="mini" |
| | | :data="tableData" |
| | | border |
| | | max-height="680" |
| | | style="width: 100%" |
| | | :header-cell-style="{ |
| | | color: '#101111', fontSize: '16px' |
| | | }" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | label="序号" |
| | | width="60px" |
| | | align="center" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | > |
| | | <template slot="header"> |
| | | <div>单号</div> |
| | | <div>上报时间</div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <div> {{ scope.row.allocationNum }}</div> |
| | | <div> {{ scope.row.escalationTime }}</div> |
| | | <div class="exportBox"> |
| | | <div>查询列表</div> |
| | | <div> |
| | | <el-button type="primary" size="mini" @click="handleOpenDialog(null, 'add')"> |
| | | 新建 |
| | | </el-button> |
| | | <el-button :disabled="!(selectionRows.length>0)" type="info" size="mini" @click="isNowDonw"> |
| | | 导出 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | prop="unitId" |
| | | label="责任主体" |
| | | :formatter="unitIdFormatter" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="polluteType" |
| | | label="污染分类" |
| | | width="120px" |
| | | :formatter="polluteTypeFormatter" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | > |
| | | <template slot="header"> |
| | | <div>整改方式</div> |
| | | <div>剩余天数</div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <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 style="position: relative;"> |
| | | <div> |
| | | <div v-if="sealList.length>0"> |
| | | <div v-for="(item,index) in sealList" :key="index" :style="{'height':item.styleHeight}"> |
| | | <div v-if="item.isInvalid===1" class="yingzhang"> |
| | | <div class="seal-red"> |
| | | 已作废 |
| | | </div> |
| | | </div> |
| | | </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"> |
| | | {{ stateFormatter(scope.row) }} |
| | | </el-tag> |
| | | <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"> |
| | | {{ stateFormatter(scope.row) }} |
| | | </el-tag> |
| | | <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"> |
| | | {{ stateFormatter(scope.row) }} |
| | | </el-tag> |
| | | <el-tag v-if="scope.row.state===30" type="warning"> |
| | | {{ stateFormatter(scope.row) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | prop="isInvalid" |
| | | label="是否作废" |
| | | width="60px" |
| | | :formatter="isInvalidFormatter" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | > |
| | | <template slot="header"> |
| | | <div>上报单位</div> |
| | | <div>上报人</div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <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="createTime" |
| | | 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===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&&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> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <div style="position: absolute;top:0;width: 100%;"> |
| | | <el-table size="mini" :data="tableData" border style="width: 100%" :header-cell-style="{ |
| | | color: '#101111', |
| | | fontSize: '16px' |
| | | }" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="40" align="center" /> |
| | | <el-table-column type="index" label="序号" width="60px" align="center" /> |
| | | <el-table-column align="center"> |
| | | <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" label="责任主体" width="150px" :formatter="unitIdFormatter" /> |
| | | <el-table-column align="center" prop="polluteType" label="污染分类" width="120px" :formatter="polluteTypeFormatter" /> |
| | | <el-table-column align="center"> |
| | | <template slot="header"> |
| | | <div>整改方式</div> |
| | | <div>剩余天数</div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <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"> |
| | | {{ stateFormatter(scope.row) }} |
| | | </el-tag> |
| | | <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"> |
| | | {{ stateFormatter(scope.row) }} |
| | | </el-tag> |
| | | <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"> |
| | | {{ stateFormatter(scope.row) }} |
| | | </el-tag> |
| | | <el-tag v-if="scope.row.state === 30" type="warning"> |
| | | {{ stateFormatter(scope.row) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column align="center" prop="isInvalid" label="是否作废" width="60px" :formatter="isInvalidFormatter" /> --> |
| | | <el-table-column align="center" width="150px"> |
| | | <template slot="header"> |
| | | <div>上报单位</div> |
| | | <div>上报人</div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <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="createTime" min-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.isCode==='1'" type="text" size="medium" @click="openEditDialog(scope.row)"> |
| | | 修改单位 |
| | | </el-button> |
| | | <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 && 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> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="pagina"> |
| | | <el-pagination |
| | | background |
| | | :current-page="pagination.currentPage" |
| | | :page-sizes="pagination.pageSizes" |
| | | :page-size="pagination.pageSize" |
| | | :total="pagination.totalCount" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | <el-pagination background :current-page="pagination.currentPage" :page-sizes="pagination.pageSizes" :page-size="pagination.pageSize" :total="pagination.totalCount" 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="handeleSumit" /> |
| | | <el-dialog |
| | | title="作废" |
| | | :visible.sync="dialogVisible" |
| | | width="600px" |
| | | :before-close="handleClose" |
| | | center |
| | | > |
| | | <el-dialog title="作废" :visible.sync="dialogVisible" width="600px" :before-close="handleClose" center> |
| | | <div> |
| | | <el-form label-width="100px"> |
| | | <el-form-item label="作废理由:" style="margin-right: 30px;"> |
| | | <el-input |
| | | v-model="invalidReason" |
| | | type="textarea" |
| | | :autosize="{ minRows: 2, maxRows: 10}" |
| | | placeholder="请输入内容" |
| | | /> |
| | | <el-form-item label="作废理由:" style="margin-right: 30px"> |
| | | <el-input v-model="invalidReason" type="textarea" :autosize="{ minRows: 2, maxRows: 10 }" placeholder="请输入内容" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | <el-button type="primary" @click="handleInvalid">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog v-if="dialogEditVisible" title="修改" :visible.sync="dialogEditVisible" width="800px" top="5vh" :before-close="handleClose" center> |
| | | <el-descriptions title="基本信息"> |
| | | <template slot="extra"> |
| | | <div> |
| | | {{ editEscalationUnitData.allocationNum }} |
| | | </div> |
| | | </template> |
| | | <el-descriptions-item label="上报时间" label-class-name="itemSpan"> |
| | | {{ editEscalationUnitData.escalationTime }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="责任单位" label-class-name="itemSpan"> |
| | | {{ updataUnitIdFormatter }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="污染分类" label-class-name="itemSpan"> |
| | | {{ polluteTypeeDITFormatter }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="整改类型" label-class-name="itemSpan"> |
| | | {{ dictObj.changeEnum[editEscalationUnitData.changeType] }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="期限天数" label-class-name="itemSpan"> |
| | | {{ editEscalationUnitData.changeDay || 0 }} 天 |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="上报单位" label-class-name="itemSpan"> |
| | | {{ updataEscalationUnitIdFormatter }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="上报人" label-class-name="itemSpan"> |
| | | {{ editEscalationUnitData.escalationName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="污染位置" label-class-name="itemSpan"> |
| | | {{ editEscalationUnitData.pollutePosition }} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <el-divider /> |
| | | <div> |
| | | <p class="editTile"> |
| | | 修改操作 |
| | | </p> |
| | | <el-form :inline="true" class="demo-form-inline"> |
| | | <el-form-item label="责任单位:"> |
| | | <el-select v-model="formInEdit.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="formInEdit.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> |
| | | </div> |
| | | <el-collapse> |
| | | <el-collapse-item title="修改记录" name="1"> |
| | | <div class="block"> |
| | | <el-timeline> |
| | | <el-timeline-item v-for="(activity, index) in operatingLog" :key="index" :color="'#0bbd87'" :timestamp="activity.createTime"> |
| | | <div v-if="activity.content"> |
| | | 操作人: {{ activity.userName }} |
| | | </div> |
| | | <div v-if="activity.content"> |
| | | 责任单位: {{ activity.content }} |
| | | </div> |
| | | <div v-if="activity.polluteType"> |
| | | 污染分类: {{ activity.polluteType }} |
| | | </div> |
| | | </el-timeline-item> |
| | | </el-timeline> |
| | | </div> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose">取 消</el-button> |
| | | <el-button type="primary" @click="handleEditChange">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // import { mixins } from './downLoadNotice' |
| | | import axios from 'axios' |
| | | import _ from 'lodash' |
| | | import qs from 'qs' |
| | | import searchBar from '@/views/toCarryOutLegislativeReforms/components/queryForm' |
| | | import newWorkOrder from '@/views/toCarryOutLegislativeReforms/components/newWorkOrder' |
| | | import workOrderInformation from '@/views/toCarryOutLegislativeReforms/components/workOrderInformation' |
| | |
| | | newWorkOrder, |
| | | workOrderInformation |
| | | }, |
| | | // mixins: [mixins], |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | selectionRows: [], |
| | | errorClass: 'errorClass', |
| | | searchType: 'reform', |
| | | pagination: { |
| | |
| | | // 总条数,根据接口获取数据长度(注意:这里不能为空) |
| | | totalCount: 0, |
| | | // 个数选择器(可修改) |
| | | pageSizes: [10, 20, 30, 40], |
| | | pageSizes: [10, 30, 60, 100], |
| | | // 默认每页显示的条数(可修改) |
| | | pageSize: 10 |
| | | }, |
| | | formData: {}, |
| | | tableData: [ |
| | | ], |
| | | tableData: [], |
| | | dialogData: { |
| | | title: '整改', |
| | | parentFormData: {}, |
| | |
| | | workOrdinDialogVisible: false, |
| | | centerDialogVisible: false, |
| | | dialogVisible: false, |
| | | dialogEditVisible: false, |
| | | unitList: [], |
| | | polluteList: [], |
| | | Dic: JSON.parse(localStorage.getItem('dict')), |
| | |
| | | title: '', |
| | | searchData: { |
| | | isInvalid: 0 |
| | | } |
| | | }, |
| | | editEscalationUnitData: {}, |
| | | formInEdit: { |
| | | polluteType: '', |
| | | unitId: '' |
| | | }, |
| | | operatingLog: [], |
| | | sealList: [] |
| | | } |
| | | }, |
| | | |
| | | computed: { |
| | | updataEscalationUnitIdFormatter: function () { |
| | | const data = this.unitList.find( |
| | | item => |
| | | item && item.unitId === this.editEscalationUnitData.escalationUnitId |
| | | ) |
| | | return data ? data.unitName : '' |
| | | }, |
| | | updataUnitIdFormatter: function () { |
| | | const data = this.unitList.find( |
| | | item => item && item.unitId === this.editEscalationUnitData.unitId |
| | | ) |
| | | return data ? data.unitName : '' |
| | | }, |
| | | polluteTypeeDITFormatter: function () { |
| | | const data = this.polluteList.find( |
| | | item => |
| | | item && |
| | | parseInt(item.dataKey) === this.editEscalationUnitData.polluteType |
| | | ) |
| | | return data ? data.dataValue : '' |
| | | } |
| | | }, |
| | | created() { |
| | | this.handleSearch() |
| | | this.handleSearch({ isInvalid: 0, state: [9, 20, 30] }) |
| | | this.getUnitList() |
| | | this.getContaminateList() |
| | | }, |
| | | methods: { |
| | | handleSelectionChange(rows) { |
| | | console.log(rows) |
| | | this.selectionRows = rows |
| | | }, |
| | | isNowDonw() { |
| | | this.$confirm('立即下载或者后台下载?', '提示', { |
| | | confirmButtonText: '立即下载', |
| | | cancelButtonText: '后台下载', |
| | | distinguishCancelAndClose: true, |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | this.loading = true |
| | | this.exportData() |
| | | }) |
| | | .catch(action => { |
| | | if (action === 'cancel') { |
| | | this.loading = false |
| | | this.exportData() |
| | | } else { |
| | | this.loading = false |
| | | } |
| | | }) |
| | | }, |
| | | exportData() { |
| | | // this.dowOrgFile('交办单导出.xlsx') |
| | | let that = this |
| | | const CancelToken = axios.CancelToken |
| | | let cancel |
| | | let timer |
| | | const totalSize = this.selectionRows.length * 1024 * 1024 |
| | | const uniSign = new Date().getTime() + '' // 可能会连续点击下载多个文件,这里用时间戳来区分每一次下载的文件 |
| | | if (this.loading) { |
| | | timer = setTimeout(() => { |
| | | cancel() |
| | | this.loading = false |
| | | this.$message.error('当前下载数据过多,请分批下载!') |
| | | }, 300000) |
| | | } |
| | | |
| | | // this.loading = true |
| | | this.$request({ |
| | | url: '/allocation/listExcel', |
| | | method: 'get', |
| | | responseType: 'blob', |
| | | params: { |
| | | id: this.selectionRows.map(item => item.allocationId) |
| | | }, |
| | | cancelToken: new CancelToken(function executor(c) { |
| | | cancel = c |
| | | }), |
| | | onDownloadProgress(progress) { |
| | | console.log('onDownloadProgress', progress) |
| | | const loaded = progress.loaded |
| | | // progress对象中的loaded表示已经下载的数量,total表示总数量,这里计算出百分比 |
| | | let downProgress = Math.round((loaded / totalSize) * 100) |
| | | console.log('downProgress', downProgress) |
| | | // 将此次下载的文件名和下载进度组成对象再用vuex状态管理 |
| | | if (!that.loading) { |
| | | that.$store.commit('downLoadProgress/SET_PROGRESS', { |
| | | path: uniSign, |
| | | progress: downProgress |
| | | }) |
| | | } |
| | | }, |
| | | paramsSerializer: params => { |
| | | return qs.stringify(params, { |
| | | indices: false |
| | | }) |
| | | } |
| | | }) |
| | | .then(res => { |
| | | clearTimeout(timer) |
| | | console.log('导出成功', res) |
| | | if (res.code === -1) { |
| | | this.$message.error(res.message) |
| | | } else { |
| | | if (!that.loading) { |
| | | that.$store.commit('downLoadProgress/SET_PROGRESS', { |
| | | path: uniSign, |
| | | progress: 100 |
| | | }) |
| | | } |
| | | this.getOutExcel('交办单导出.xlsx', res) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | clearTimeout(timer) |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | getOutExcel(fileName, res) { |
| | | const blob = new Blob([res], { type: 'application/x-xls' }) |
| | | if (window.navigator.msSaveOrOpenBlob) { |
| | | // 兼容 IE & EDGE |
| | | this.loading = false |
| | | navigator.msSaveBlob(blob, fileName) |
| | | } else { |
| | | const link = document.createElement('a') |
| | | // 兼容不同浏览器的URL对象 |
| | | const url = window.URL || window.webkitURL || window.moxURL |
| | | // 创建下载链接 |
| | | link.href = url.createObjectURL(blob) |
| | | // 命名下载名称 |
| | | link.download = fileName |
| | | // 点击触发下载 |
| | | link.click() |
| | | // 下载完成进行释放 |
| | | url.revokeObjectURL(link.href) |
| | | this.$message({ |
| | | showClose: true, |
| | | duration: 0, |
| | | message: '下载完成!', |
| | | type: 'success' |
| | | }) |
| | | this.loading = false |
| | | } |
| | | }, |
| | | openEditDialog(row) { |
| | | this.editEscalationUnitData = row |
| | | this.dialogEditVisible = true |
| | | this.$request({ |
| | | url: '/allocation/getLog', |
| | | method: 'get', |
| | | params: { |
| | | allocationNum: this.editEscalationUnitData.allocationNum |
| | | } |
| | | }) |
| | | .then(res => { |
| | | this.operatingLog = res.data |
| | | }) |
| | | .catch(err => { |
| | | this.$message.error(err.message) |
| | | console.log('请求Region失败') |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | handleCancel(row) { |
| | | this.dialogVisible = true |
| | | this.slectRow = row |
| | | }, |
| | | handleClose() { |
| | | this.dialogVisible = false |
| | | this.dialogEditVisible = false |
| | | }, |
| | | handleEditChange() { |
| | | if (this.formInEdit.polluteType === '' && this.formInEdit.unitId === '') { |
| | | this.$message({ |
| | | message: '请选择后再提交', |
| | | type: 'error' |
| | | }) |
| | | return |
| | | } |
| | | this.$request({ |
| | | url: '/allocation/updataUnit', |
| | | method: 'get', |
| | | params: { |
| | | id: this.editEscalationUnitData.allocationId, |
| | | ...this.formInEdit |
| | | } |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 0) { |
| | | this.$message({ |
| | | message: '修改成功', |
| | | type: 'success' |
| | | }) |
| | | this.dialogEditVisible = false |
| | | this.formInEdit = { |
| | | polluteType: '', |
| | | unitId: '' |
| | | } |
| | | this.handleSearch() |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | this.$message.error(err.message) |
| | | console.log('请求Region失败') |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | handleInvalid() { |
| | | this.$request({ |
| | |
| | | id: this.slectRow.allocationId, |
| | | invalidReason: this.invalidReason |
| | | } |
| | | }).then((res) => { |
| | | }).then(res => { |
| | | if (res.code === 0) { |
| | | this.$message({ |
| | | message: '处理成功', |
| | |
| | | params: { |
| | | id: row.allocationId |
| | | } |
| | | }).then((res) => { |
| | | }).then(res => { |
| | | this.parentFormData = res.data |
| | | console.log(this.parentFormData) |
| | | this.centerDialogVisible = true |
| | |
| | | } |
| | | }, |
| | | updatUnitIdFormatter(val) { |
| | | const data = this.unitList.find(item => item && item.unitId === val.escalationUnitId) |
| | | const data = this.unitList.find( |
| | | item => item && item.unitId === val.escalationUnitId |
| | | ) |
| | | return data ? data.unitName : '' |
| | | }, |
| | | unitIdFormatter(val) { |
| | | const data = this.unitList.find(item => item && item.unitId === val.unitId) |
| | | const data = this.unitList.find( |
| | | item => item && item.unitId === val.unitId |
| | | ) |
| | | return data ? data.unitName : '' |
| | | }, |
| | | polluteTypeFormatter(val) { |
| | | const data = this.polluteList.find(item => item && parseInt(item.dataKey) === val.polluteType) |
| | | const data = this.polluteList.find( |
| | | item => item && parseInt(item.dataKey) === val.polluteType |
| | | ) |
| | | return data ? data.dataValue : '' |
| | | }, |
| | | investigationTypeFormatter(val) { |
| | | return this.dictObj.investigationEnum[val.investigationType] |
| | | }, |
| | | stateFormatter(val) { |
| | | console.log('valval', val) |
| | | return this.dictObj.allocationApproveEnum[val.state] |
| | | }, |
| | | isInvalidFormatter(val) { |
| | |
| | | this.$request({ |
| | | url: '/allocation/unit', |
| | | method: 'get' |
| | | }).then((res) => { |
| | | }).then(res => { |
| | | if (res.code === 0) { |
| | | this.unitList = res.data |
| | | } else { |
| | |
| | | this.$request({ |
| | | url: '/allocation/contaminate', |
| | | method: 'get' |
| | | }).then((res) => { |
| | | }).then(res => { |
| | | if (res.code === 0) { |
| | | this.polluteList = res.data |
| | | } else { |
| | |
| | | data: { |
| | | ...obj |
| | | } |
| | | }).then((res) => { |
| | | }).then(res => { |
| | | if (res.code === 0) { |
| | | this.centerDialogVisible = false |
| | | |
| | |
| | | } |
| | | }) |
| | | }, |
| | | handleSearchBut(obj) { |
| | | const pageSize = this.pagination.pageSize |
| | | this.pagination = { |
| | | currentPage: 1, |
| | | // 总条数,根据接口获取数据长度(注意:这里不能为空) |
| | | totalCount: 0, |
| | | // 个数选择器(可修改) |
| | | pageSizes: [10, 30, 60, 100], |
| | | // 默认每页显示的条数(可修改) |
| | | pageSize: pageSize |
| | | } |
| | | this.handleSearch(obj) |
| | | }, |
| | | handleSearch(obj) { |
| | | this.searchData.isInvalid = 0 |
| | | this.selectionRows = [] |
| | | if (obj) { |
| | | this.searchData = obj |
| | | } |
| | |
| | | method: 'post', |
| | | data: { |
| | | ...this.searchData, |
| | | 'page': this.pagination |
| | | page: this.pagination |
| | | } |
| | | }).then((res) => { |
| | | }).then(res => { |
| | | if (res.code === 0) { |
| | | this.tableData = res.data.list |
| | | this.sealList = _.cloneDeep(res.data.list) || [] |
| | | this.sealList.unshift({ isInvalid: 0 }) |
| | | this.sealList.forEach(item => { |
| | | item.styleHeight = null |
| | | }) |
| | | this.pagination.totalCount = res.data.page.totalNum |
| | | this.$nextTick(() => { |
| | | const rows = this.$el.querySelectorAll('table tr') |
| | | for (let i = 0; i < rows.length; i++) { |
| | | const row = rows[i] |
| | | const height = row.getBoundingClientRect().height |
| | | this.sealList[i]['styleHeight'] = height + 'px' |
| | | } |
| | | this.$forceUpdate() |
| | | }) |
| | | } else { |
| | | this.$message.error(res.message) |
| | | } |
| | |
| | | // 每页显示的条数 |
| | | handleSizeChange(val) { |
| | | // 改变每页显示的条数 |
| | | console.log('345') |
| | | this.pagination.pageSize = val |
| | | // 注意:在改变每页显示的条数时,要将页码显示到第一页 |
| | | this.pagination.currentPage = 1 |
| | |
| | | // 显示第几页 |
| | | handleCurrentChange(val) { |
| | | // 改变默认的页数 |
| | | console.log('123') |
| | | this.pagination.currentPage = val |
| | | this.handleSearch() |
| | | // console.log(val) |
| | |
| | | params: { |
| | | id: row.allocationId |
| | | } |
| | | }).then((res) => { |
| | | }).then(res => { |
| | | this.parentFormData = res.data |
| | | this.workOrdinDialogVisible = true |
| | | if (type === 'work') { |
| | |
| | | } |
| | | } else if (type === 'detail') { |
| | | this.dialogData = { |
| | | title: '交办单', |
| | | title: '交办单详情', |
| | | parentFormData: res.data, |
| | | pageType: 'detail' |
| | | } |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .main{ |
| | | padding: 20px; |
| | | padding-top: 0px; |
| | | height: 100%; |
| | | overflow: overlay; |
| | | .main { |
| | | padding: 20px; |
| | | padding-top: 0px; |
| | | height: 100%; |
| | | overflow: overlay; |
| | | } |
| | | .tab { |
| | | margin-top: 0px; |
| | | /deep/ .el-tag{ |
| | | font-size: 16px; |
| | | } |
| | | min-height: 160px; |
| | | margin-top: 0px; |
| | | /deep/ .el-tag { |
| | | font-size: 16px; |
| | | } |
| | | } |
| | | // /deep/ .el-table__body-wrapper { |
| | | // overflow: scroll; |
| | |
| | | // overflow-x: hidden; |
| | | // max-height: 400px; |
| | | // } |
| | | .pagina{ |
| | | margin-top: 10px; |
| | | .pagina { |
| | | margin-top: 10px; |
| | | } |
| | | /deep/ .el-table__row{ |
| | | /deep/ .el-table__row { |
| | | font-size: 18px; |
| | | } |
| | | .el-pagination { |
| | | padding: 0; |
| | | .el-select{ |
| | | /deep/.el-input{ |
| | | margin:0; |
| | | .el-select { |
| | | /deep/.el-input { |
| | | margin: 0; |
| | | } |
| | | } |
| | | |
| | | } |
| | | .errorClass{ |
| | | .errorClass { |
| | | color: red; |
| | | } |
| | | .editTile { |
| | | color: #303133; |
| | | font-size: 16px; |
| | | font-weight: 700; |
| | | } |
| | | /deep/.el-collapse-item__header { |
| | | color: #303133; |
| | | font-size: 16px; |
| | | font-weight: 700; |
| | | } |
| | | .exportBox { |
| | | font-weight: 700; |
| | | font-size: 18px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 10px; |
| | | } |
| | | .yingzhang { |
| | | position: relative; |
| | | |
| | | .seal-red { |
| | | position: absolute; |
| | | left: 85px; |
| | | top: 18px; |
| | | z-index: 999; |
| | | // top: -85px; |
| | | display: inline-block; |
| | | border: solid 2px #e93e00; |
| | | border-radius: 0.2em; |
| | | color: #e24c06; |
| | | font-size: 19px; |
| | | line-height: 1; |
| | | opacity: 0; |
| | | padding: 0.1em 0.5em; |
| | | text-transform: uppercase; |
| | | opacity: 0; |
| | | transform: rotate(-2deg) scale(5); |
| | | animation: seal 0.3s cubic-bezier(0.6, 0.04, 0.98, 0.335) forwards; |
| | | } |
| | | |
| | | @keyframes seal { |
| | | 100% { |
| | | opacity: 0.75; |
| | | transform: rotate(-15deg) scale(1); |
| | | } |
| | | } |
| | | } |
| | | </style> |