|
@@ -36,21 +36,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="addTime" label="创建时间" :show-overflow-tooltip="true" />
|
|
|
<el-table-column prop="releaseTime" label="发布时间" :show-overflow-tooltip="true" />
|
|
|
- <!-- <el-table-column prop="vestingDate" label="决策公示开始时间" width="140" :show-overflow-tooltip="true">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="vestingDate" label="决策公示结束时间" width="140" :show-overflow-tooltip="true">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="vestingDate" label="意见征集开始时间" width="140" :show-overflow-tooltip="true">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="vestingDate" label="意见征集结束时间" width="140" :show-overflow-tooltip="true">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="opinionFeedbackEnd" label="意见反馈开始时间" width="140" :show-overflow-tooltip="true">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="uploadTime" sortable label="意见反馈结束时间" width="140"></el-table-column> -->
|
|
|
<el-table-column label="操作" prop="examineState,id" width="220" slot="default" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button class="but" type="primary" @click="openDialog(scope.row.id)">查看</el-button>
|
|
|
- <el-button class="but" type="primary" @click="releaseDecision(scope.row.id)">发布</el-button>
|
|
|
+ <el-button :type="scope.row.state === 1 ? '' : scope.row.state === 0 ? 'primary' : ''"
|
|
|
+ :disabled="scope.row.state === 1 ? true : scope.row.state === 0 ? false : true" class="but"
|
|
|
+ @click="releaseDecision(scope.row.id)">发布</el-button>
|
|
|
<el-button class="but" type="primary" @click="openModifyWorkDialog(scope.row.id)">修改</el-button>
|
|
|
<el-button class="but" type="danger" @click="handleDelete(scope.row.id, scope.$index)">删除
|
|
|
</el-button>
|
|
@@ -81,7 +72,7 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="类型" prop="type">
|
|
|
- <el-select v-model="postManagement.type" placeholder="请选择类型" style="width: 100%">
|
|
|
+ <el-select v-model="postManagement.type" @change="handleSelectChange" placeholder="请选择类型" style="width: 100%">
|
|
|
<el-option v-for="(el, index) in typeSelectData" :key="index" :label="el.label"
|
|
|
:value="el.value"></el-option>
|
|
|
</el-select>
|
|
@@ -207,7 +198,6 @@
|
|
|
|
|
|
<script>
|
|
|
import TopTitle from '../components/TopTitle'
|
|
|
- import request from '../utils/request'
|
|
|
import api from '../api/index'
|
|
|
|
|
|
export default {
|
|
@@ -266,32 +256,32 @@
|
|
|
postTitle: '', //发文标题
|
|
|
opinionFeedbackEnd: '', //意见反馈结束时间
|
|
|
type: '', //类型
|
|
|
- file1: null,
|
|
|
- file2: null,
|
|
|
- file3: null,
|
|
|
- file4: null,
|
|
|
- file5: null
|
|
|
+ file1: '',
|
|
|
+ file2: '',
|
|
|
+ file3: '',
|
|
|
+ file4: '',
|
|
|
+ file5: ''
|
|
|
},
|
|
|
//类型选择框
|
|
|
typeSelectData: [{
|
|
|
label: '决策公示',
|
|
|
- value: 0
|
|
|
+ value: '0'
|
|
|
},
|
|
|
{
|
|
|
label: '意见征集',
|
|
|
- value: 1
|
|
|
+ value: '1'
|
|
|
},
|
|
|
{
|
|
|
label: '意见反馈',
|
|
|
- value: 2
|
|
|
+ value: '2'
|
|
|
},
|
|
|
{
|
|
|
label: '待公示',
|
|
|
- value: 3
|
|
|
+ value: '3'
|
|
|
},
|
|
|
{
|
|
|
label: '决策完成',
|
|
|
- value: 4
|
|
|
+ value: '4'
|
|
|
}
|
|
|
],
|
|
|
// 详细内容
|
|
@@ -304,6 +294,9 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleSelectChange() {
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
//上传文件
|
|
|
onChange(file, fileList, index) {
|
|
|
if (file.raw.type === 'application/pdf') {
|
|
@@ -390,11 +383,17 @@
|
|
|
api.getPostById(id).then(r => {
|
|
|
let data = r.data.data;
|
|
|
this.postManagement = data;
|
|
|
- this.postManagement.file1 = null;
|
|
|
- this.postManagement.file2 = null;
|
|
|
- this.postManagement.file3 = null;
|
|
|
- this.postManagement.file4 = null;
|
|
|
- this.postManagement.file5 = null;
|
|
|
+ this.postManagement.type = data.type + '';
|
|
|
+ this.postManagement.file1 = '';
|
|
|
+ this.postManagement.file2 = '';
|
|
|
+ this.postManagement.file3 = '';
|
|
|
+ this.postManagement.file4 = '';
|
|
|
+ this.postManagement.file5 = '';
|
|
|
+ this.postManagement.draftInterpretation = data.draftInterpretation ? data.draftInterpretation : '';
|
|
|
+ this.postManagement.draftDecision = data.draftDecision ? data.draftDecision : '';
|
|
|
+ this.postManagement.policyInterpretation = data.policyInterpretation ? data.policyInterpretation : '';
|
|
|
+ this.postManagement.makePolicy = data.makePolicy ? data.makePolicy : '';
|
|
|
+ this.postManagement.pdfContent = data.pdfContent ? data.pdfContent : '';
|
|
|
this.fileUploadList[0].fileList = data.draftInterpretation ? [{
|
|
|
name: data.draftInterpretation
|
|
|
}] : [];
|
|
@@ -428,24 +427,23 @@
|
|
|
return;
|
|
|
}
|
|
|
let fd = new FormData();
|
|
|
- fd.append('file1', this.postManagement.file1 ? this.postManagement.file1.raw : null);
|
|
|
- fd.append('file2', this.postManagement.file2 ? this.postManagement.file2.raw : null);
|
|
|
- fd.append('file3', this.postManagement.file3 ? this.postManagement.file3.raw : null);
|
|
|
- fd.append('file4', this.postManagement.file4 ? this.postManagement.file4.raw : null);
|
|
|
- fd.append('file5', this.postManagement.file5 ? this.postManagement.file5.raw : null);
|
|
|
+ fd.append('file1', this.postManagement.file1 ? this.postManagement.file1.raw : '');
|
|
|
+ fd.append('file2', this.postManagement.file2 ? this.postManagement.file2.raw : '');
|
|
|
+ fd.append('file3', this.postManagement.file3 ? this.postManagement.file3.raw : '');
|
|
|
+ fd.append('file4', this.postManagement.file4 ? this.postManagement.file4.raw : '');
|
|
|
+ fd.append('file5', this.postManagement.file5 ? this.postManagement.file5.raw : '');
|
|
|
fd.append('postTitle', this.postManagement.postTitle);
|
|
|
fd.append('opinionFeedbackEnd', this.postManagement.opinionFeedbackEnd);
|
|
|
fd.append('type', this.postManagement.type);
|
|
|
if (this.workTitle == '编辑决策事项') {
|
|
|
- console.log(this.postManagement);
|
|
|
fd.append('id', this.postManagement.id);
|
|
|
- fd.append('draftInterpretation', this.postManagement.file1 ? null : this.postManagement
|
|
|
+ fd.append('draftInterpretation', this.postManagement.file1 ? '' : this.postManagement
|
|
|
.draftInterpretation);
|
|
|
- fd.append('draftDecision', this.postManagement.file2 ? null : this.postManagement.draftDecision);
|
|
|
- fd.append('policyInterpretation', this.postManagement.file3 ? null : this.postManagement
|
|
|
+ fd.append('draftDecision', this.postManagement.file2 ? '' : this.postManagement.draftDecision);
|
|
|
+ fd.append('policyInterpretation', this.postManagement.file3 ? '' : this.postManagement
|
|
|
.policyInterpretation);
|
|
|
- fd.append('makePolicy', this.postManagement.file4 ? null : this.postManagement.makePolicy);
|
|
|
- fd.append('pdfContent', this.postManagement.file5 ? null : this.postManagement.pdfContent);
|
|
|
+ fd.append('makePolicy', this.postManagement.file4 ? '' : this.postManagement.makePolicy);
|
|
|
+ fd.append('pdfContent', this.postManagement.file5 ? '' : this.postManagement.pdfContent);
|
|
|
api.updatePostById(fd).then(r => {
|
|
|
if (r.data.result) {
|
|
|
this.$message.success('修改成功');
|