| | |
| | | <template> |
| | | <div class="main" v-loading="loading"> |
| | | <div v-loading="loading" class="main"> |
| | | <div> |
| | | <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" /> |
| | |
| | | <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="exportData">导出</el-button> |
| | | <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> |
| | | |
| | |
| | | <div> |
| | | <div v-if="sealList.length>0"> |
| | | <div v-for="(item,index) in sealList" :key="index" :style="{'height':item.styleHeight}"> |
| | | <div class="yingzhang" v-if="item.isInvalid===1"> |
| | | <div class="seal-red"> 已作废 </div> |
| | | <div v-if="item.isInvalid===1" class="yingzhang"> |
| | | <div class="seal-red"> |
| | | 已作废 |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="position: absolute;top:0;width: 100%;"> |
| | | <el-table size="mini" :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange" :header-cell-style="{ |
| | | color: '#101111', |
| | | fontSize: '16px' |
| | | }"> |
| | | <el-table-column type="selection" width="40" align="center"> |
| | | </el-table-column> |
| | | <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"> |
| | |
| | | </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 type="text" v-if="scope.row.isCode==='1'" size="medium" @click="openEditDialog(scope.row)"> |
| | | <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 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 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-button type="primary" @click="handleInvalid">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="修改" v-if="dialogEditVisible" :visible.sync="dialogEditVisible" width="800px" top='5vh' :before-close="handleClose" center> |
| | | <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}} |
| | | {{ 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-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></el-divider> |
| | | <el-divider /> |
| | | <div> |
| | | <p class="editTile">修改操作</p> |
| | | <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="请选择"> |
| | |
| | | <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> |
| | | <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> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | // import { mixins } from './downLoadNotice' |
| | | import axios from 'axios' |
| | | import _ from 'lodash' |
| | | import qs from 'qs' |
| | |
| | | newWorkOrder, |
| | | workOrderInformation |
| | | }, |
| | | // mixins: [mixins], |
| | | data() { |
| | | return { |
| | | loading: false, |
| | |
| | | console.log(rows) |
| | | this.selectionRows = rows |
| | | }, |
| | | isNowDonw() { |
| | | this.$confirm('立即下载或者后台下载?', '提示', { |
| | | confirmButtonText: '立即下载', |
| | | cancelButtonText: '后台下载', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | this.loading = true |
| | | this.exportData() |
| | | }) |
| | | .catch(() => { |
| | | this.loading = false |
| | | this.exportData() |
| | | }) |
| | | }, |
| | | exportData() { |
| | | // this.dowOrgFile('交办单导出.xlsx') |
| | | let that = this |
| | | const CancelToken = axios.CancelToken |
| | | let cancel |
| | | let timer = setTimeout(() => { |
| | | cancel() |
| | | this.loading = false |
| | | this.$message.error('当前下载数据过多,请分批下载!') |
| | | }, 300000) |
| | | this.loading = true |
| | | 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', |
| | |
| | | cancelToken: new CancelToken(function executor(c) { |
| | | cancel = c |
| | | }), |
| | | 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 |
| | |
| | | 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) |
| | | } |
| | | }) |
| | |
| | | }) |
| | | }, |
| | | getOutExcel(fileName, res) { |
| | | let blob = new Blob([res], { type: 'application/x-xls' }) |
| | | const blob = new Blob([res], { type: 'application/x-xls' }) |
| | | if (window.navigator.msSaveOrOpenBlob) { |
| | | //兼容 IE & EDGE |
| | | // 兼容 IE & EDGE |
| | | this.loading = false |
| | | navigator.msSaveBlob(blob, fileName) |
| | | } else { |
| | | var link = document.createElement('a') |
| | | 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.success('下载完成!') |
| | | this.loading = false |
| | | } |
| | | }, |
| | |
| | | this.operatingLog = res.data |
| | | }) |
| | | .catch(err => { |
| | | this.$message.error(res.message) |
| | | this.$message.error(err.message) |
| | | console.log('请求Region失败') |
| | | console.log(err) |
| | | }) |
| | |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | this.$message.error(res.message) |
| | | this.$message.error(err.message) |
| | | console.log('请求Region失败') |
| | | console.log(err) |
| | | }) |
| | |
| | | }) |
| | | }, |
| | | handleSearchBut(obj) { |
| | | let pageSize = this.pagination.pageSize |
| | | const pageSize = this.pagination.pageSize |
| | | this.pagination = { |
| | | currentPage: 1, |
| | | // 总条数,根据接口获取数据长度(注意:这里不能为空) |
| | |
| | | }) |
| | | this.pagination.totalCount = res.data.page.totalNum |
| | | this.$nextTick(() => { |
| | | var rows = this.$el.querySelectorAll('table tr') |
| | | for (var i = 0; i < rows.length; i++) { |
| | | var row = rows[i] |
| | | var height = row.getBoundingClientRect().height |
| | | 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() |