|
|
|
@ -1,80 +1,67 @@ |
|
|
|
<template> |
|
|
|
<div class="resi-container"> |
|
|
|
<div class="g-page" v-show="pageType == 'list'"> |
|
|
|
<el-card ref="searchCard" class="search-card"> |
|
|
|
<el-form |
|
|
|
ref="searchForm" |
|
|
|
:inline="true" |
|
|
|
:model="fmData" |
|
|
|
:label-width="'100px'" |
|
|
|
class="demo-form-inline" |
|
|
|
> |
|
|
|
<div class="g-page" |
|
|
|
v-show="pageType == 'list'"> |
|
|
|
<el-card ref="searchCard" |
|
|
|
class="search-card"> |
|
|
|
<el-form ref="searchForm" |
|
|
|
:inline="true" |
|
|
|
:model="fmData" |
|
|
|
:label-width="'100px'" |
|
|
|
class="demo-form-inline"> |
|
|
|
<div> |
|
|
|
<el-form-item label="项目标题" prop="title"> |
|
|
|
<el-input |
|
|
|
v-model="fmData.title" |
|
|
|
class="resi-cell-input" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
placeholder="请输入" |
|
|
|
> |
|
|
|
<el-form-item label="项目标题" |
|
|
|
prop="title"> |
|
|
|
<el-input v-model="fmData.title" |
|
|
|
class="resi-cell-input" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
placeholder="请输入"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="转项目时间" prop="date"> |
|
|
|
<el-date-picker |
|
|
|
v-model="fmData.startDate" |
|
|
|
size="small" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
style="width: 150px" |
|
|
|
placeholder="开始时间" |
|
|
|
> |
|
|
|
<el-form-item label="转项目时间" |
|
|
|
prop="date"> |
|
|
|
<el-date-picker v-model="fmData.startDate" |
|
|
|
size="small" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
style="width: 150px" |
|
|
|
placeholder="开始时间"> |
|
|
|
</el-date-picker> |
|
|
|
<span style="margin:0 8px;">至</span> |
|
|
|
<el-date-picker |
|
|
|
v-model="fmData.endDate" |
|
|
|
size="small" |
|
|
|
type="date" |
|
|
|
style="width: 150px" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="结束时间" |
|
|
|
> |
|
|
|
<el-date-picker v-model="fmData.endDate" |
|
|
|
size="small" |
|
|
|
type="date" |
|
|
|
style="width: 150px" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="结束时间"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="状态" prop="status"> |
|
|
|
<el-select |
|
|
|
v-model.trim="fmData.status" |
|
|
|
placeholder="请选择" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
style="width: 150px" |
|
|
|
class="resi-cell-select" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in optionsStatus" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
> |
|
|
|
<el-form-item label="状态" |
|
|
|
prop="status"> |
|
|
|
<el-select v-model.trim="fmData.status" |
|
|
|
placeholder="请选择" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
style="width: 150px" |
|
|
|
class="resi-cell-select"> |
|
|
|
<el-option v-for="item in optionsStatus" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item style="margin-left: 35px"> |
|
|
|
<el-button |
|
|
|
class="diy-button--search" |
|
|
|
size="small" |
|
|
|
@click="handleSearch" |
|
|
|
>查询</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
|
class="diy-button--reset" |
|
|
|
size="small" |
|
|
|
@click="resetForm('searchForm')" |
|
|
|
>重置</el-button |
|
|
|
> |
|
|
|
<el-button class="diy-button--search" |
|
|
|
size="small" |
|
|
|
@click="handleSearch">查询</el-button> |
|
|
|
<el-button class="diy-button--reset" |
|
|
|
size="small" |
|
|
|
@click="resetForm('searchForm')">重置</el-button> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
@ -82,185 +69,147 @@ |
|
|
|
|
|
|
|
<el-card class="resi-card-table"> |
|
|
|
<div class="resi-row-btn"> |
|
|
|
<el-button |
|
|
|
v-if="false" |
|
|
|
class="diy-button--add" |
|
|
|
size="small" |
|
|
|
@click="handleAdd" |
|
|
|
>新增</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
|
v-if="false" |
|
|
|
class="diy-button--export" |
|
|
|
size="small" |
|
|
|
@click="handleExportModule('room')" |
|
|
|
>下载模板</el-button |
|
|
|
> |
|
|
|
<el-upload :headers="$getElUploadHeaders()" |
|
|
|
v-if="false" |
|
|
|
ref="upload" |
|
|
|
class="upload-btn" |
|
|
|
action="uploadUlr" |
|
|
|
:limit="1" |
|
|
|
:accept="'.xls,.xlsx'" |
|
|
|
:with-credentials="true" |
|
|
|
:show-file-list="false" |
|
|
|
:auto-upload="true" |
|
|
|
:on-progress="handleProgress" |
|
|
|
:on-success="handleExcelSuccess" |
|
|
|
:before-upload="beforeExcelUpload" |
|
|
|
:http-request="uploadHttpRequest" |
|
|
|
> |
|
|
|
<el-button |
|
|
|
size="small" |
|
|
|
class="diy-button--delete" |
|
|
|
:loading="importLoading" |
|
|
|
>{{ importBtnTitle }}</el-button |
|
|
|
> |
|
|
|
<el-button v-if="false" |
|
|
|
class="diy-button--add" |
|
|
|
size="small" |
|
|
|
@click="handleAdd">新增</el-button> |
|
|
|
<el-button v-if="false" |
|
|
|
class="diy-button--export" |
|
|
|
size="small" |
|
|
|
@click="handleExportModule('room')">下载模板</el-button> |
|
|
|
<el-upload :headers="$getElUploadHeaders()" |
|
|
|
v-if="false" |
|
|
|
ref="upload" |
|
|
|
class="upload-btn" |
|
|
|
action="uploadUlr" |
|
|
|
:limit="1" |
|
|
|
:accept="'.xls,.xlsx'" |
|
|
|
:with-credentials="true" |
|
|
|
:show-file-list="false" |
|
|
|
:auto-upload="true" |
|
|
|
:on-progress="handleProgress" |
|
|
|
:on-success="handleExcelSuccess" |
|
|
|
:before-upload="beforeExcelUpload" |
|
|
|
:http-request="uploadHttpRequest"> |
|
|
|
<el-button size="small" |
|
|
|
class="diy-button--delete" |
|
|
|
:loading="importLoading">{{ importBtnTitle }}</el-button> |
|
|
|
</el-upload> |
|
|
|
|
|
|
|
<el-button @click="handleChu" class="diy-button--reset" size="small" |
|
|
|
>导出</el-button |
|
|
|
> |
|
|
|
<el-button @click="handleChu" |
|
|
|
class="diy-button--reset" |
|
|
|
size="small">导出</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-table |
|
|
|
:data="tableData" |
|
|
|
border |
|
|
|
style="width: 100%" |
|
|
|
class="resi-table" |
|
|
|
:height="maxTableHeight" |
|
|
|
> |
|
|
|
<el-table-column |
|
|
|
label="序号" |
|
|
|
fixed="left" |
|
|
|
type="index" |
|
|
|
align="center" |
|
|
|
width="50" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="gridName" |
|
|
|
align="center" |
|
|
|
label="所属网格" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
> |
|
|
|
<el-table :data="tableData" |
|
|
|
border |
|
|
|
style="width: 100%" |
|
|
|
class="resi-table" |
|
|
|
:height="maxTableHeight"> |
|
|
|
<el-table-column label="序号" |
|
|
|
fixed="left" |
|
|
|
type="index" |
|
|
|
align="center" |
|
|
|
width="50" /> |
|
|
|
<el-table-column prop="gridName" |
|
|
|
align="center" |
|
|
|
label="所属网格" |
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
prop="title" |
|
|
|
label="项目标题" |
|
|
|
align="center" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
> |
|
|
|
<el-table-column prop="title" |
|
|
|
label="项目标题" |
|
|
|
align="center" |
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
prop="shiftProjectTime" |
|
|
|
width="100" |
|
|
|
align="center" |
|
|
|
label="转项目时间" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
> |
|
|
|
<el-table-column prop="shiftProjectTime" |
|
|
|
width="100" |
|
|
|
align="center" |
|
|
|
label="转项目时间" |
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
prop="projectScheme" |
|
|
|
align="center" |
|
|
|
label="项目方案" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
> |
|
|
|
<el-table-column prop="projectScheme" |
|
|
|
align="center" |
|
|
|
label="项目方案" |
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
prop="internalRemark" |
|
|
|
align="center" |
|
|
|
label="内部备注" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
> |
|
|
|
<el-table-column prop="internalRemark" |
|
|
|
align="center" |
|
|
|
label="内部备注" |
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="originName" |
|
|
|
align="center" |
|
|
|
label="来源" |
|
|
|
width="100" |
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
prop="departmentNameList" |
|
|
|
align="center" |
|
|
|
label="当前处理部门 " |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
> |
|
|
|
<el-table-column prop="departmentNameList" |
|
|
|
align="center" |
|
|
|
label="当前处理部门 " |
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
prop="detentionDays" |
|
|
|
align="center" |
|
|
|
label="滞留工作日 " |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
> |
|
|
|
<el-table-column prop="detentionDays" |
|
|
|
align="center" |
|
|
|
label="滞留工作日 " |
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
fixed="right" |
|
|
|
label="操作" |
|
|
|
align="center" |
|
|
|
width="100" |
|
|
|
> |
|
|
|
<el-table-column fixed="right" |
|
|
|
label="操作" |
|
|
|
align="center" |
|
|
|
width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button |
|
|
|
v-if="scope.row.status == 'pending' && scope.row.processable" |
|
|
|
@click="handleEdit(scope.$index)" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
class="div-table-button--edit" |
|
|
|
>处理</el-button |
|
|
|
> |
|
|
|
|
|
|
|
<el-button |
|
|
|
v-else |
|
|
|
@click="handleWatch(scope.$index)" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
>查看</el-button |
|
|
|
> |
|
|
|
|
|
|
|
<el-popconfirm |
|
|
|
v-if="false" |
|
|
|
title="删除之后无法回复,确认删除?" |
|
|
|
@onConfirm="handleDel(scope.row, scope.$index)" |
|
|
|
@confirm="handleDel(scope.row, scope.$index)" |
|
|
|
> |
|
|
|
<el-button |
|
|
|
slot="reference" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
class="div-table-button--delete" |
|
|
|
style="margin-left: 10px" |
|
|
|
>删除</el-button |
|
|
|
> |
|
|
|
<el-button v-if="scope.row.status == 'pending' && scope.row.processable" |
|
|
|
@click="handleEdit(scope.$index)" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
class="div-table-button--edit">处理</el-button> |
|
|
|
|
|
|
|
<el-button v-else |
|
|
|
@click="handleWatch(scope.$index)" |
|
|
|
type="text" |
|
|
|
size="small">查看</el-button> |
|
|
|
|
|
|
|
<el-popconfirm v-if="false" |
|
|
|
title="删除之后无法回复,确认删除?" |
|
|
|
@onConfirm="handleDel(scope.row, scope.$index)" |
|
|
|
@confirm="handleDel(scope.row, scope.$index)"> |
|
|
|
<el-button slot="reference" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
class="div-table-button--delete" |
|
|
|
style="margin-left: 10px">删除</el-button> |
|
|
|
</el-popconfirm> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<div> |
|
|
|
<el-pagination |
|
|
|
@size-change="handleSizeChange" |
|
|
|
@current-change="handleCurrentChange" |
|
|
|
:current-page.sync="pageNo" |
|
|
|
:page-sizes="[20, 50, 100, 200]" |
|
|
|
:page-size="parseInt(pageSize)" |
|
|
|
layout="sizes, prev, pager, next, total" |
|
|
|
:total="total" |
|
|
|
> |
|
|
|
<el-pagination @size-change="handleSizeChange" |
|
|
|
@current-change="handleCurrentChange" |
|
|
|
:current-page.sync="pageNo" |
|
|
|
:page-sizes="[20, 50, 100, 200]" |
|
|
|
:page-size="parseInt(pageSize)" |
|
|
|
layout="sizes, prev, pager, next, total" |
|
|
|
:total="total"> |
|
|
|
</el-pagination> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="g-page" v-if="pageType == 'edit' || pageType == 'info'"> |
|
|
|
<project-info |
|
|
|
ref="eleEditForm" |
|
|
|
:type="pageType" |
|
|
|
:projectId="currentProject.projectId" |
|
|
|
@close="handleClose" |
|
|
|
@afterEdit="handleEditSuccess" |
|
|
|
/> |
|
|
|
<div class="g-page" |
|
|
|
v-if="pageType == 'edit' || pageType == 'info'"> |
|
|
|
<project-info ref="eleEditForm" |
|
|
|
:type="pageType" |
|
|
|
:projectId="currentProject.projectId" |
|
|
|
@close="handleClose" |
|
|
|
@afterEdit="handleEditSuccess" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -275,7 +224,7 @@ import axios from "axios"; |
|
|
|
export default { |
|
|
|
components: { projectInfo }, |
|
|
|
|
|
|
|
data() { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
pageType: "list", // 列表list 处理dispose 详情info 议题详情issue-info |
|
|
|
|
|
|
|
@ -315,7 +264,7 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
maxTableHeight() { |
|
|
|
maxTableHeight () { |
|
|
|
return this.$store.state.inIframe |
|
|
|
? this.clientHeight - 360 + this.iframeHeigh |
|
|
|
: this.clientHeight - 360; |
|
|
|
@ -333,11 +282,11 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted () { |
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async handleExportModule() { |
|
|
|
async handleExportModule () { |
|
|
|
let url = "/heart/iccommunityselforganization/import-template-download"; |
|
|
|
|
|
|
|
let params = {}; |
|
|
|
@ -374,18 +323,18 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 上传大图标成功 |
|
|
|
handleExcelSuccess(res, file) { |
|
|
|
handleExcelSuccess (res, file) { |
|
|
|
if (res.code === 0 && res.msg === "success") { |
|
|
|
console.log("resss---ppp", res); |
|
|
|
} else { |
|
|
|
this.$message.error(res.msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
handleProgress(event, file, fileList) { |
|
|
|
handleProgress (event, file, fileList) { |
|
|
|
console.log("percentage", file.percentage); |
|
|
|
}, |
|
|
|
|
|
|
|
beforeExcelUpload(file) { |
|
|
|
beforeExcelUpload (file) { |
|
|
|
console.log("file", file); |
|
|
|
const isType = file.type === "application/vnd.ms-excel"; |
|
|
|
const isTypeComputer = |
|
|
|
@ -402,7 +351,7 @@ export default { |
|
|
|
} |
|
|
|
return fileType && isLt1M; |
|
|
|
}, |
|
|
|
async uploadHttpRequest(file) { |
|
|
|
async uploadHttpRequest (file) { |
|
|
|
this.importLoading = true; |
|
|
|
this.importBtnTitle = "正在上传中..."; |
|
|
|
this.$message({ |
|
|
|
@ -457,29 +406,29 @@ export default { |
|
|
|
this.$refs.upload.clearFiles(); |
|
|
|
}, |
|
|
|
|
|
|
|
handleSizeChange(val) { |
|
|
|
handleSizeChange (val) { |
|
|
|
console.log(`每页 ${val} 条`); |
|
|
|
this.pageSize = val; |
|
|
|
window.localStorage.setItem("pageSize", val); |
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
|
handleCurrentChange(val) { |
|
|
|
handleCurrentChange (val) { |
|
|
|
console.log(`当前页: ${val}`); |
|
|
|
this.pageNo = val; |
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
|
|
|
|
|
handleSearch(val) { |
|
|
|
handleSearch (val) { |
|
|
|
console.log(this.fmData); |
|
|
|
this.pageNo = 1; |
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
|
resetForm(formName) { |
|
|
|
resetForm (formName) { |
|
|
|
this.$refs[formName].resetFields(); |
|
|
|
this.handleSearch(); |
|
|
|
}, |
|
|
|
|
|
|
|
async handleChu() { |
|
|
|
async handleChu () { |
|
|
|
const url = "/gov/project/project/project-list-export"; |
|
|
|
const { pageSize, pageNo, fmData } = this; |
|
|
|
axios({ |
|
|
|
@ -514,8 +463,8 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
async handleAdd() {}, |
|
|
|
async handleWatch(rowIndex) { |
|
|
|
async handleAdd () { }, |
|
|
|
async handleWatch (rowIndex) { |
|
|
|
let item = this.tableData[rowIndex]; |
|
|
|
this.currentProject = { |
|
|
|
projectId: item.projectId, |
|
|
|
@ -523,7 +472,7 @@ export default { |
|
|
|
this.pageType = "info"; |
|
|
|
}, |
|
|
|
|
|
|
|
async handleEdit(rowIndex) { |
|
|
|
async handleEdit (rowIndex) { |
|
|
|
let item = this.tableData[rowIndex]; |
|
|
|
this.currentProject = { |
|
|
|
projectId: item.projectId, |
|
|
|
@ -531,19 +480,19 @@ export default { |
|
|
|
this.pageType = "edit"; |
|
|
|
}, |
|
|
|
|
|
|
|
handleClose() { |
|
|
|
handleClose () { |
|
|
|
this.pageType = "list"; |
|
|
|
this.currentProject = { |
|
|
|
projectId: "", |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
handleEditSuccess() { |
|
|
|
handleEditSuccess () { |
|
|
|
this.handleClose(); |
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
|
|
|
|
|
async handleDel(rowData, rowIndex) { |
|
|
|
async handleDel (rowData, rowIndex) { |
|
|
|
console.log(rowData, rowIndex); |
|
|
|
const url = |
|
|
|
"/heart/iccommunityselforganization/delcommunityselforganization"; |
|
|
|
@ -561,7 +510,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async getTableData() { |
|
|
|
async getTableData () { |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/project-list"; |
|
|
|
const url = "/gov/project/project/project-list"; |
|
|
|
const { pageSize, pageNo, fmData } = this; |
|
|
|
@ -575,9 +524,28 @@ export default { |
|
|
|
this.total = data.total || 0; |
|
|
|
this.tableData = data.list |
|
|
|
? data.list.map((item) => { |
|
|
|
return item; |
|
|
|
}) |
|
|
|
return item; |
|
|
|
}) |
|
|
|
: []; |
|
|
|
|
|
|
|
|
|
|
|
this.tableData.forEach(item => { |
|
|
|
if (item.origin === 'issue') { |
|
|
|
item.originName = '议题 ' |
|
|
|
} else if (item.origin === 'agency') { |
|
|
|
item.originName = '项目立项' |
|
|
|
} else if (item.origin === 'resi_event') { |
|
|
|
item.originName = '旧版事件上报' |
|
|
|
} else if (item.origin === 'work_event') { |
|
|
|
item.originName = '巡查上报' |
|
|
|
} else if (item.origin === 'ic_event') { |
|
|
|
item.originName = '事件' |
|
|
|
} else { |
|
|
|
item.sourceTypeName = '--' |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
} else { |
|
|
|
} |
|
|
|
}, |
|
|
|
|