|
|
@ -1,194 +1,183 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<el-form |
|
|
|
:model="queryParams" |
|
|
|
ref="queryForm" |
|
|
|
:inline="true" |
|
|
|
v-show="showSearch" |
|
|
|
label-width="68px" |
|
|
|
> |
|
|
|
<el-form-item label="年度" prop="year"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.data.year" |
|
|
|
placeholder="请输入年度" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="approvalUnit"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.data.approvalUnit" |
|
|
|
placeholder="请输入批复单位" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="approvalOpinionNumber"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.data.approvalOpinionNumber" |
|
|
|
placeholder="请输入批复单位" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="filingsUnit"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.data.filingsUnit" |
|
|
|
placeholder="请输入批复单位" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="type"> |
|
|
|
<el-select |
|
|
|
v-model="queryParams.data.type" |
|
|
|
placeholder="请选择批复单位" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
> |
|
|
|
<el-option label="请选择字典生成" value="" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="createUid"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.data.createUid" |
|
|
|
placeholder="请输入批复单位" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="updateUid"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.data.updateUid" |
|
|
|
placeholder="请输入批复单位" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="proCode"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.data.proCode" |
|
|
|
placeholder="请输入批复单位" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="proNo"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.data.proNo" |
|
|
|
placeholder="请输入批复单位" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="owerDept"> |
|
|
|
<el-input |
|
|
|
v-model="queryParams.data.owerDept" |
|
|
|
placeholder="请输入批复单位" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button |
|
|
|
type="cyan" |
|
|
|
icon="el-icon-search" |
|
|
|
size="mini" |
|
|
|
@click="handleQuery" |
|
|
|
>搜索</el-button |
|
|
|
> |
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
|
|
|
>重置</el-button |
|
|
|
> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<div class="listTitle"> |
|
|
|
<span>整体措施方案</span> |
|
|
|
<span class="addBtn" @click="handleAdd(1)"> |
|
|
|
<i class="el-icon-plus"></i> |
|
|
|
添加 |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<el-table v-loading="loading" :data="filingsList1"> |
|
|
|
<el-table-column label="序号" type="index" width="50" align="center" /> |
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8"> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
icon="el-icon-plus" |
|
|
|
size="mini" |
|
|
|
@click="handleAdd" |
|
|
|
v-hasPermi="['build:filings:add']" |
|
|
|
>新增</el-button |
|
|
|
> |
|
|
|
</el-col> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="success" |
|
|
|
icon="el-icon-edit" |
|
|
|
size="mini" |
|
|
|
:disabled="single" |
|
|
|
@click="handleUpdate" |
|
|
|
v-hasPermi="['build:filings:edit']" |
|
|
|
>修改</el-button |
|
|
|
> |
|
|
|
</el-col> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="danger" |
|
|
|
icon="el-icon-delete" |
|
|
|
size="mini" |
|
|
|
:disabled="multiple" |
|
|
|
@click="handleDelete" |
|
|
|
v-hasPermi="['build:filings:remove']" |
|
|
|
>删除</el-button |
|
|
|
> |
|
|
|
</el-col> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="warning" |
|
|
|
icon="el-icon-download" |
|
|
|
size="mini" |
|
|
|
@click="handleExport" |
|
|
|
v-hasPermi="['build:filings:export']" |
|
|
|
>导出</el-button |
|
|
|
> |
|
|
|
</el-col> |
|
|
|
<right-toolbar |
|
|
|
:showSearch.sync="showSearch" |
|
|
|
@queryTable="getList" |
|
|
|
></right-toolbar> |
|
|
|
</el-row> |
|
|
|
<el-table-column |
|
|
|
label="年度" |
|
|
|
align="center" |
|
|
|
prop="year" |
|
|
|
min-width="120" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
label="内容描述" |
|
|
|
align="center" |
|
|
|
prop="content" |
|
|
|
min-width="120" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
label="备注" |
|
|
|
align="center" |
|
|
|
prop="remarks" |
|
|
|
min-width="120" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
label="附件" |
|
|
|
align="center" |
|
|
|
prop="attachment" |
|
|
|
min-width="120" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div |
|
|
|
v-for="(item, index) in JSON.parse( |
|
|
|
scope.row.attachment ? scope.row.attachment : JSON.stringify({}) |
|
|
|
)" |
|
|
|
:key="item + index" |
|
|
|
> |
|
|
|
<i class="el-icon-document"></i> |
|
|
|
{{ item.name }} |
|
|
|
<i |
|
|
|
class="el-icon-download" |
|
|
|
@click="downloadFile(scope, index)" |
|
|
|
style="cursor: pointer" |
|
|
|
></i> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table |
|
|
|
v-loading="loading" |
|
|
|
:data="filingsList" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
> |
|
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
|
<el-table-column label="序号" type="index" width="50" align="center" /> |
|
|
|
<el-table-column |
|
|
|
label="操作" |
|
|
|
align="center" |
|
|
|
class-name="small-padding fixed-width" |
|
|
|
width="180" |
|
|
|
fixed="right" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
icon="el-icon-edit" |
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
v-hasPermi="['build:filings:edit']" |
|
|
|
>修改</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
icon="el-icon-delete" |
|
|
|
@click="handleDelete(scope.row)" |
|
|
|
v-hasPermi="['build:filings:remove']" |
|
|
|
>删除</el-button |
|
|
|
> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<el-table-column label="年度" align="center" prop="year" /> |
|
|
|
<el-table-column label="内容描述" align="center" prop="content" /> |
|
|
|
<el-table-column label="内容描述" align="center" prop="remarks" /> |
|
|
|
<el-table-column label="批复单位" align="center" prop="approvalUnit" /> |
|
|
|
<div class="listTitle"> |
|
|
|
<span>度汛方案</span> |
|
|
|
<span class="addBtn" @click="handleAdd(2)"> |
|
|
|
<i class="el-icon-plus"></i> |
|
|
|
添加 |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<el-table v-loading="loading" :data="filingsList2"> |
|
|
|
<el-table-column label="序号" type="index" width="50" align="center" /> |
|
|
|
<el-table-column |
|
|
|
label="年度" |
|
|
|
align="center" |
|
|
|
prop="year" |
|
|
|
min-width="120" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
label="批复单位" |
|
|
|
align="center" |
|
|
|
prop="approvalUnit" |
|
|
|
min-width="120" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
label="备案单位" |
|
|
|
align="center" |
|
|
|
prop="filingsUnit" |
|
|
|
min-width="120" |
|
|
|
/> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
label="批复意见文号" |
|
|
|
align="center" |
|
|
|
prop="approvalOpinionNumber" |
|
|
|
min-width="120" |
|
|
|
/> |
|
|
|
<el-table-column label="批复单位" align="center" prop="filingsUnit" /> |
|
|
|
<el-table-column label="批复单位" align="center" prop="type" /> |
|
|
|
<el-table-column label="批复单位" align="center" prop="createUid" /> |
|
|
|
<el-table-column label="批复单位" align="center" prop="updateUid" /> |
|
|
|
<el-table-column label="批复单位" align="center" prop="proCode" /> |
|
|
|
<el-table-column label="批复单位" align="center" prop="proNo" /> |
|
|
|
<el-table-column label="批复单位" align="center" prop="owerDept" /> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
label="内容描述" |
|
|
|
align="center" |
|
|
|
prop="content" |
|
|
|
min-width="120" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
label="备案内容" |
|
|
|
align="center" |
|
|
|
prop="filingsContent" |
|
|
|
min-width="120" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div |
|
|
|
v-for="(item, index) in JSON.parse( |
|
|
|
scope.row.filingsContent |
|
|
|
? scope.row.filingsContent |
|
|
|
: JSON.stringify({}) |
|
|
|
)" |
|
|
|
:key="item + index" |
|
|
|
> |
|
|
|
<i class="el-icon-document"></i> |
|
|
|
{{ item.name }} |
|
|
|
<i |
|
|
|
class="el-icon-download" |
|
|
|
@click="downloadFile(scope, index)" |
|
|
|
style="cursor: pointer" |
|
|
|
></i> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
label="批复意见" |
|
|
|
align="center" |
|
|
|
prop="approvalOpinion" |
|
|
|
min-width="120" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div |
|
|
|
v-for="(item, index) in JSON.parse( |
|
|
|
scope.row.approvalOpinion |
|
|
|
? scope.row.approvalOpinion |
|
|
|
: JSON.stringify({}) |
|
|
|
)" |
|
|
|
:key="item + index" |
|
|
|
> |
|
|
|
<i class="el-icon-document"></i> |
|
|
|
{{ item.name }} |
|
|
|
<i |
|
|
|
class="el-icon-download" |
|
|
|
@click="downloadFile(scope, index)" |
|
|
|
style="cursor: pointer" |
|
|
|
></i> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
label="操作" |
|
|
|
align="center" |
|
|
|
class-name="small-padding fixed-width" |
|
|
|
width="180" |
|
|
|
fixed="right" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button |
|
|
@ -211,65 +200,152 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<pagination |
|
|
|
<!-- <pagination |
|
|
|
v-show="total > 0" |
|
|
|
:total="total" |
|
|
|
:page.sync="queryParams.pageNum" |
|
|
|
:limit.sync="queryParams.pageSize" |
|
|
|
@pagination="getList" |
|
|
|
/> |
|
|
|
/> --> |
|
|
|
|
|
|
|
<!-- 添加或修改安全备案对话框 --> |
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
|
|
<el-dialog |
|
|
|
:title="title" |
|
|
|
:visible.sync="open" |
|
|
|
width="1200px" |
|
|
|
append-to-body |
|
|
|
@close="closeDialog" |
|
|
|
:close-on-click-modal="false" |
|
|
|
> |
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> |
|
|
|
<el-form-item label="年度" prop="year"> |
|
|
|
<el-input v-model="form.year" placeholder="请输入年度" /> |
|
|
|
<!-- <el-input v-model="form.year" placeholder="请输入年度" /> --> |
|
|
|
<el-date-picker |
|
|
|
v-model="form.year" |
|
|
|
type="year" |
|
|
|
placeholder="请选择年度" |
|
|
|
style="width: 100%" |
|
|
|
value-format="yyyy" |
|
|
|
> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="内容描述" prop="content"> |
|
|
|
<el-form-item label="内容描述" prop="content" v-if="form.type == 1"> |
|
|
|
<el-input |
|
|
|
v-model="form.content" |
|
|
|
type="textarea" |
|
|
|
placeholder="请输入内容" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="内容描述" prop="remarks"> |
|
|
|
<el-form-item label="备注" prop="remarks" v-if="form.type == 1"> |
|
|
|
<el-input |
|
|
|
v-model="form.remarks" |
|
|
|
type="textarea" |
|
|
|
placeholder="请输入内容" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="approvalUnit"> |
|
|
|
<el-form-item label="附件" prop="attachment" v-if="form.type == 1"> |
|
|
|
<!-- <el-input |
|
|
|
v-model="form.attachment" |
|
|
|
type="textarea" |
|
|
|
placeholder="请输入内容" |
|
|
|
/> --> |
|
|
|
<el-upload |
|
|
|
class="upload-demo" |
|
|
|
action="thinking/common/upload" |
|
|
|
:headers="headers" |
|
|
|
:on-preview="handlePreview" |
|
|
|
:on-remove="handleRemove1" |
|
|
|
:before-remove="beforeRemove" |
|
|
|
multiple |
|
|
|
:on-success="submitUpload1" |
|
|
|
:file-list="fileList1" |
|
|
|
> |
|
|
|
<el-button size="small" type="primary" plain> |
|
|
|
<i class="el-icon-upload el-icon--right"></i> |
|
|
|
点击上传 |
|
|
|
</el-button> |
|
|
|
<div slot="tip" class="el-upload__tip"> |
|
|
|
支持jpg/png/pdf/word/excel文件等,不超过100M |
|
|
|
</div> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item |
|
|
|
label="批复单位" |
|
|
|
prop="approvalUnit" |
|
|
|
v-if="form.type == 2" |
|
|
|
> |
|
|
|
<el-input v-model="form.approvalUnit" placeholder="请输入批复单位" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="approvalOpinionNumber"> |
|
|
|
<el-form-item |
|
|
|
label="批复意见文号" |
|
|
|
prop="approvalOpinionNumber" |
|
|
|
v-if="form.type == 2" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
v-model="form.approvalOpinionNumber" |
|
|
|
placeholder="请输入批复单位" |
|
|
|
placeholder="请输入批复意见文号" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="filingsUnit"> |
|
|
|
<el-input v-model="form.filingsUnit" placeholder="请输入批复单位" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="type"> |
|
|
|
<el-select v-model="form.type" placeholder="请选择批复单位"> |
|
|
|
<el-option label="请选择字典生成" value="" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="createUid"> |
|
|
|
<el-input v-model="form.createUid" placeholder="请输入批复单位" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="updateUid"> |
|
|
|
<el-input v-model="form.updateUid" placeholder="请输入批复单位" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="proCode"> |
|
|
|
<el-input v-model="form.proCode" placeholder="请输入批复单位" /> |
|
|
|
<el-form-item label="备案单位" prop="filingsUnit" v-if="form.type == 2"> |
|
|
|
<el-input v-model="form.filingsUnit" placeholder="请输入备案单位" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="proNo"> |
|
|
|
<el-input v-model="form.proNo" placeholder="请输入批复单位" /> |
|
|
|
<el-form-item |
|
|
|
label="备案内容" |
|
|
|
prop="filingsContent" |
|
|
|
v-if="form.type == 2" |
|
|
|
> |
|
|
|
<!-- <el-input |
|
|
|
v-model="form.filingsContent" |
|
|
|
placeholder="请输入备案内容" |
|
|
|
/> --> |
|
|
|
<el-upload |
|
|
|
class="upload-demo" |
|
|
|
action="thinking/common/upload" |
|
|
|
:headers="headers" |
|
|
|
:on-preview="handlePreview" |
|
|
|
:on-remove="handleRemove2" |
|
|
|
:before-remove="beforeRemove" |
|
|
|
multiple |
|
|
|
:on-success="submitUpload2" |
|
|
|
:file-list="fileList2" |
|
|
|
> |
|
|
|
<el-button size="small" type="primary" plain> |
|
|
|
<i class="el-icon-upload el-icon--right"></i> |
|
|
|
点击上传 |
|
|
|
</el-button> |
|
|
|
<div slot="tip" class="el-upload__tip"> |
|
|
|
支持jpg/png/pdf/word/excel文件等,不超过100M |
|
|
|
</div> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="批复单位" prop="owerDept"> |
|
|
|
<el-input v-model="form.owerDept" placeholder="请输入批复单位" /> |
|
|
|
<el-form-item |
|
|
|
label="批复意见" |
|
|
|
prop="approvalOpinion" |
|
|
|
v-if="form.type == 2" |
|
|
|
> |
|
|
|
<!-- <el-input |
|
|
|
v-model="form.approvalOpinion" |
|
|
|
placeholder="请输入批复意见" |
|
|
|
/> --> |
|
|
|
<el-upload |
|
|
|
class="upload-demo" |
|
|
|
action="thinking/common/upload" |
|
|
|
:headers="headers" |
|
|
|
:on-preview="handlePreview" |
|
|
|
:on-remove="handleRemove3" |
|
|
|
:before-remove="beforeRemove" |
|
|
|
multiple |
|
|
|
:on-success="submitUpload3" |
|
|
|
:file-list="fileList3" |
|
|
|
> |
|
|
|
<el-button size="small" type="primary" plain> |
|
|
|
<i class="el-icon-upload el-icon--right"></i> |
|
|
|
点击上传 |
|
|
|
</el-button> |
|
|
|
<div slot="tip" class="el-upload__tip"> |
|
|
|
支持jpg/png/pdf/word/excel文件等,不超过100M |
|
|
|
</div> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
@ -289,9 +365,12 @@ import { |
|
|
|
updateFilings, |
|
|
|
exportFilings, |
|
|
|
} from "@/api/build/filings"; |
|
|
|
import { getToken } from "@/utils/auth"; |
|
|
|
import { getFileStream } from "@/api/system/upload"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "Filings", |
|
|
|
props: ["proNo", "proCode"], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
// 遮罩层 |
|
|
@ -307,7 +386,8 @@ export default { |
|
|
|
// 总条数 |
|
|
|
total: 0, |
|
|
|
// 安全备案表格数据 |
|
|
|
filingsList: [], |
|
|
|
filingsList1: [], |
|
|
|
filingsList2: [], |
|
|
|
// 弹出层标题 |
|
|
|
title: "", |
|
|
|
// 是否显示弹出层 |
|
|
@ -336,18 +416,33 @@ export default { |
|
|
|
form: {}, |
|
|
|
// 表单校验 |
|
|
|
rules: {}, |
|
|
|
fileList1: [], |
|
|
|
fileList2: [], |
|
|
|
fileList3: [], |
|
|
|
// 请求头 |
|
|
|
headers: { |
|
|
|
jianwei: "jwtech " + getToken(), |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
closeDialog() { |
|
|
|
this.fileList1 = []; |
|
|
|
this.fileList2 = []; |
|
|
|
this.fileList3 = []; |
|
|
|
}, |
|
|
|
/** 查询安全备案列表 */ |
|
|
|
getList() { |
|
|
|
this.loading = true; |
|
|
|
this.queryParams.data.proNo = this.proNo; |
|
|
|
this.queryParams.data.proCode = this.proCode; |
|
|
|
listFilings(this.queryParams).then((response) => { |
|
|
|
this.filingsList = response.records; |
|
|
|
this.total = response.total; |
|
|
|
this.filingsList1 = response.records.filter((item) => item.type == 1); |
|
|
|
this.filingsList2 = response.records.filter((item) => item.type == 2); |
|
|
|
// this.total = response.total; |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
@ -419,10 +514,15 @@ export default { |
|
|
|
this.multiple = !selection.length; |
|
|
|
}, |
|
|
|
/** 新增按钮操作 */ |
|
|
|
handleAdd() { |
|
|
|
handleAdd(type) { |
|
|
|
this.reset(); |
|
|
|
this.open = true; |
|
|
|
this.title = "添加安全备案"; |
|
|
|
this.form.type = type; |
|
|
|
if (this.form.type == 1) { |
|
|
|
this.title = "添加整体措施方案"; |
|
|
|
} else { |
|
|
|
this.title = "添加度汛方案"; |
|
|
|
} |
|
|
|
}, |
|
|
|
/** 修改按钮操作 */ |
|
|
|
handleUpdate(row) { |
|
|
@ -431,13 +531,35 @@ export default { |
|
|
|
getFilings(id).then((response) => { |
|
|
|
this.form = response.data; |
|
|
|
this.open = true; |
|
|
|
this.title = "修改安全备案"; |
|
|
|
// console.log("this.form", this.form); |
|
|
|
if (this.form.type == 1) { |
|
|
|
this.title = "修改整体措施方案"; |
|
|
|
if (response.data.attachment) |
|
|
|
this.fileList1 = JSON.parse(response.data.attachment); |
|
|
|
} else { |
|
|
|
this.title = "修改度汛方案"; |
|
|
|
if (response.data.filingsContent) |
|
|
|
this.fileList2 = JSON.parse(response.data.filingsContent); |
|
|
|
if (response.data.approvalOpinion) |
|
|
|
this.fileList3 = JSON.parse(response.data.approvalOpinion); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
/** 提交按钮 */ |
|
|
|
submitForm() { |
|
|
|
this.$refs["form"].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
this.form.proNo = this.proNo; |
|
|
|
this.form.proCode = this.proCode; |
|
|
|
if (this.fileList1.length > 0) { |
|
|
|
this.form.attachment = JSON.stringify(this.fileList1); |
|
|
|
} |
|
|
|
if (this.fileList2.length > 0) { |
|
|
|
this.form.filingsContent = JSON.stringify(this.fileList2); |
|
|
|
} |
|
|
|
if (this.fileList3.length > 0) { |
|
|
|
this.form.approvalOpinion = JSON.stringify(this.fileList3); |
|
|
|
} |
|
|
|
if (this.form.id != null) { |
|
|
|
updateFilings(this.form).then((response) => { |
|
|
|
if (response.code === 200) { |
|
|
@ -479,28 +601,126 @@ export default { |
|
|
|
this.$message.warning("请选择要删除的数据!!"); |
|
|
|
} |
|
|
|
}, |
|
|
|
/** 导出按钮操作 */ |
|
|
|
handleExport() { |
|
|
|
const queryParams = this.queryParams; |
|
|
|
let message = "是否确认导出所有的数据项?"; |
|
|
|
if (this.ids) { |
|
|
|
message = "是否确认导出选中的数据项?"; |
|
|
|
queryParams.ids = this.ids; |
|
|
|
} |
|
|
|
this.$confirm(message, "警告", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(function () { |
|
|
|
return exportFilings(queryParams); |
|
|
|
}) |
|
|
|
.then((response) => { |
|
|
|
this.downloadFile(response, true, response.msg); |
|
|
|
// this.download(response.msg); |
|
|
|
}) |
|
|
|
.catch(function () {}); |
|
|
|
// 上传附件 |
|
|
|
submitUpload1(_, fileList) { |
|
|
|
console.log("fileList1", fileList); |
|
|
|
this.fileList1.push({ |
|
|
|
name: fileList.name, |
|
|
|
fileName: fileList.response.fileName, |
|
|
|
url: fileList.response.url, |
|
|
|
uid: fileList.uid, |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleRemove1(file, fileList) { |
|
|
|
// console.log(file, fileList); |
|
|
|
let index = this.fileList1.findIndex((item) => item.uid === file.uid); |
|
|
|
// 删除文件 |
|
|
|
this.fileList1.splice(index, 1); |
|
|
|
}, |
|
|
|
// 表格中下载 |
|
|
|
downloadFile_1(scope, index) { |
|
|
|
console.log(scope); |
|
|
|
let file = JSON.parse(scope.row.attachment)[index]; |
|
|
|
this.handlePreview(file); |
|
|
|
}, |
|
|
|
// 上传附件 |
|
|
|
submitUpload2(_, fileList) { |
|
|
|
console.log("fileList2", fileList); |
|
|
|
this.fileList2.push({ |
|
|
|
name: fileList.name, |
|
|
|
fileName: fileList.response.fileName, |
|
|
|
url: fileList.response.url, |
|
|
|
uid: fileList.uid, |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleRemove2(file, fileList) { |
|
|
|
// console.log(file, fileList); |
|
|
|
let index = this.fileList2.findIndex((item) => item.uid === file.uid); |
|
|
|
// 删除文件 |
|
|
|
this.fileList2.splice(index, 1); |
|
|
|
}, |
|
|
|
// 表格中下载 |
|
|
|
downloadFile_2(scope, index) { |
|
|
|
console.log(scope); |
|
|
|
let file = JSON.parse(scope.row.filingsContent)[index]; |
|
|
|
this.handlePreview(file); |
|
|
|
}, |
|
|
|
// 上传附件 |
|
|
|
submitUpload3(_, fileList) { |
|
|
|
console.log("fileList3", fileList); |
|
|
|
this.fileList3.push({ |
|
|
|
name: fileList.name, |
|
|
|
fileName: fileList.response.fileName, |
|
|
|
url: fileList.response.url, |
|
|
|
uid: fileList.uid, |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleRemove3(file, fileList) { |
|
|
|
// console.log(file, fileList); |
|
|
|
let index = this.fileList3.findIndex((item) => item.uid === file.uid); |
|
|
|
// 删除文件 |
|
|
|
this.fileList3.splice(index, 1); |
|
|
|
}, |
|
|
|
// 表格中下载 |
|
|
|
downloadFile_3(scope, index) { |
|
|
|
console.log(scope); |
|
|
|
let file = JSON.parse(scope.row.approvalOpinion)[index]; |
|
|
|
this.handlePreview(file); |
|
|
|
}, |
|
|
|
// 查看信息中, 下载 |
|
|
|
downloadFile2(info, index) { |
|
|
|
console.log(info); |
|
|
|
this.handlePreview(info); |
|
|
|
}, |
|
|
|
|
|
|
|
// 点击预览的文件进行下载 |
|
|
|
handlePreview(file) { |
|
|
|
// console.log(file); |
|
|
|
getFileStream({ fileName: file.fileName }).then((res) => { |
|
|
|
const blob = new Blob([res], { |
|
|
|
// type类型后端返回来的数据中会有,根据自己实际进行修改 |
|
|
|
// 表格下载为 application/xlsx,压缩包为 application/zip等, |
|
|
|
type: "application/xlsx", |
|
|
|
}); //excel,pdf等 |
|
|
|
const href = URL.createObjectURL(blob); //创建新的URL表示指定的blob对象 |
|
|
|
const a = document.createElement("a"); //创建a标签 |
|
|
|
a.style.display = "none"; |
|
|
|
a.href = href; // 指定下载链接 |
|
|
|
a.download = file.name; //指定下载文件名 |
|
|
|
a.click(); //触发下载 |
|
|
|
URL.revokeObjectURL(a.href); //释放URL对象 |
|
|
|
}); |
|
|
|
}, |
|
|
|
beforeRemove(file, fileList) { |
|
|
|
return this.$confirm(`确定移除 ${file.name}?`); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
@import "@/assets/css/dialog.scss"; |
|
|
|
// ::v-deep { |
|
|
|
// .el-dialog { |
|
|
|
// margin-top: 10vh !important; |
|
|
|
// } |
|
|
|
// } |
|
|
|
.listTitle { |
|
|
|
font-size: 14px; |
|
|
|
padding-left: 10px; |
|
|
|
padding-right: 30px; |
|
|
|
margin: 20px 0; |
|
|
|
border-left: 2px solid #36b29e; |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
span:nth-child(1) { |
|
|
|
font-weight: bold; |
|
|
|
} |
|
|
|
.addBtn { |
|
|
|
color: #36b29e; |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
.addBtn:hover { |
|
|
|
color: #31a08e; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|