|
@@ -0,0 +1,885 @@
|
|
|
+<template>
|
|
|
+ <div class="yxnaContent">
|
|
|
+ <!-- 操作栏-->
|
|
|
+ <div style="display: flex;justify-content: space-between;margin-bottom: 10px">
|
|
|
+ <el-button type="primary" class="add" @click="openAddWork">新增</el-button>
|
|
|
+ <!-- <div style="display: flex">
|
|
|
+ <el-select ref="querySelect" style="width: 200px" clearable v-model="form.region" placeholder="请选择搜索方式"
|
|
|
+ @change="selectRegion">
|
|
|
+ <el-option label="作品电话" value="uploaderPhone"></el-option>
|
|
|
+ <el-option label="作品名称" value="pictureTitle"></el-option>
|
|
|
+ <el-option label="作品作者" value="pictureAuthor"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-input v-model.trim="form.name" clearable @clear="clearreset" style="margin: 0 10px;width: 200px">
|
|
|
+ </el-input>
|
|
|
+ <el-button type="primary" class="search" @click="serachWork">搜索</el-button>
|
|
|
+ <el-button type="primary" class="search" @click="reset" style="margin-left: 5px">重置</el-button>
|
|
|
+ </div> -->
|
|
|
+ </div>
|
|
|
+ <!--表格-->
|
|
|
+ <el-table :data="tableData" border ref='multipleTable' :height="tableH" stripe
|
|
|
+ :header-cell-style="{ background: '#e5e8ed', color: '#666', textAlign: 'center' }" :cell-style="tableStyle"
|
|
|
+ style="cursor: default">
|
|
|
+ <el-table-column width="50" label="序号">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ (sorts.page - 1) * sorts.limit + scope.$index + 1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="postTitle" label="发文标题" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column prop="state" label="发布状态" :show-overflow-tooltip="true">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-if="scope.row.state == 0">未发布</el-tag>
|
|
|
+ <el-tag type="success" v-else-if="scope.row.state == 1">已发布</el-tag>
|
|
|
+ </template>
|
|
|
+ </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 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>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="block">
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
+ :current-page="sorts.page" :page-sizes="[10, 20, 30, 40, 50]" :page-size="sorts.limit"
|
|
|
+ layout="prev, pager,next,jumper,total,sizes" :total="total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ <!-- 新增/编辑决策事项 -->
|
|
|
+ <el-dialog :visible.sync="workDialog" width="80%" class="detailDialog" :close-on-click-modal="false" top="40px">
|
|
|
+ <div slot="title">
|
|
|
+ <div class="addTitle">{{workTitle}}</div>
|
|
|
+ </div>
|
|
|
+ <div style="height:65vh;overflow: auto;padding-right: 20px">
|
|
|
+ <el-form :model="postManagement" label-width="140px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="发文标题" prop="postTitle">
|
|
|
+ <el-input v-model="postManagement.postTitle" placeholder="请输入发文标题" clearable>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="类型" prop="type">
|
|
|
+ <el-select v-model="postManagement.type" placeholder="请选择类型" style="width: 100%">
|
|
|
+ <el-option v-for="(el, index) in typeSelectData" :key="index" :label="el.label"
|
|
|
+ :value="el.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="意见反馈结束时间" prop="opinionFeedbackEnd">
|
|
|
+ <el-date-picker v-model="postManagement.opinionFeedbackEnd" type="datetime"
|
|
|
+ placeholder="请选择意见反馈结束时间" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div v-for="(item, index) in fileUploadList" style="display: flex;">
|
|
|
+ <el-form-item :label="item.value"></el-form-item>
|
|
|
+ <el-upload action="#" ref="upload" :auto-upload="false" accept="application/pdf"
|
|
|
+ :file-list="item.fileList"
|
|
|
+ :on-change="function(file, fileList) {return onChange(file,fileList, index)}"
|
|
|
+ :on-remove="function(file, fileList) {return handleRemove(file,fileList, index)}">
|
|
|
+ <el-button type="primary" slot="trigger" style="margin-left: 10px">上传文件</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" size="mini" @click="saveWork">提交</el-button>
|
|
|
+ <el-button @click="goBackyynn" size="mini">返回</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!--查看详细-->
|
|
|
+ <el-dialog :visible.sync="dialogTableVisible" :append-to-body="true" class="detailDialog" width="80%"
|
|
|
+ top="40px">
|
|
|
+ <div slot="title">
|
|
|
+ <div class="addTitle">查看决策事项详情</div>
|
|
|
+ </div>
|
|
|
+ <div style="height: 65vh;overflow: auto;padding-right: 20px">
|
|
|
+ <el-form :model="tableDetail" class="demo-form-inline" label-width="130px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="发文标题">
|
|
|
+ <el-input disabled v-model="tableDetail.postTitle" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="部门名称">
|
|
|
+ <el-input disabled v-model="tableDetail.deptName" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="类型">
|
|
|
+ <el-select disabled v-model="tableDetail.type" style="width: 100%">
|
|
|
+ <el-option v-for="(el, index) in typeSelectData" :key="index" :label="el.label"
|
|
|
+ :value="el.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="发布时间">
|
|
|
+ <el-date-picker v-model="tableDetail.releaseTime" type="datetime"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%" disabled>
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="意见反馈结束时间">
|
|
|
+ <el-date-picker v-model="tableDetail.opinionFeedbackEnd" type="datetime"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%" disabled>
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="决策草案">
|
|
|
+ <el-input disabled v-model="tableDetail.draftInterpretation" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="草案解读">
|
|
|
+ <el-input disabled v-model="tableDetail.draftDecision" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="政策解读">
|
|
|
+ <el-input disabled v-model="tableDetail.policyInterpretation" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="决策文件">
|
|
|
+ <el-input disabled v-model="tableDetail.makePolicy" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="征集情况反馈">
|
|
|
+ <el-input disabled v-model="tableDetail.pdfContent" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import api from '../../api/index'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ created() {
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ mounted() {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ fileUploadList: [{
|
|
|
+ value: '决策草案',
|
|
|
+ fileList: []
|
|
|
+ }, {
|
|
|
+ value: '草案解读',
|
|
|
+ fileList: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '政策解读',
|
|
|
+ fileList: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '决策文件',
|
|
|
+ fileList: []
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '征集情况反馈',
|
|
|
+ fileList: []
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ tableStyle: {
|
|
|
+ textAlign: 'center',
|
|
|
+ },
|
|
|
+ tableH: 'calc(100vh - 230px)',
|
|
|
+ label: "决策事项管理",
|
|
|
+ // 搜索参数
|
|
|
+ form: {
|
|
|
+ name: '',
|
|
|
+ region: '',
|
|
|
+ type: []
|
|
|
+ },
|
|
|
+ // 列表数据
|
|
|
+ tableData: [],
|
|
|
+ // 总数
|
|
|
+ total: 0,
|
|
|
+ // 查看详细界面
|
|
|
+ dialogTableVisible: false,
|
|
|
+ //新增/编辑决策事项界面
|
|
|
+ workDialog: false,
|
|
|
+ //新增/编辑决策事项标题
|
|
|
+ workTitle: '新增决策事项',
|
|
|
+ // 新增/编辑表单
|
|
|
+ postManagement: {
|
|
|
+ postTitle: '', //发文标题
|
|
|
+ opinionFeedbackEnd: '', //意见反馈结束时间
|
|
|
+ type: '', //类型
|
|
|
+ file1: null,
|
|
|
+ file2: null,
|
|
|
+ file3: null,
|
|
|
+ file4: null,
|
|
|
+ file5: null
|
|
|
+ },
|
|
|
+ //类型选择框
|
|
|
+ typeSelectData: [{
|
|
|
+ label: '决策公示',
|
|
|
+ value: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '意见征集',
|
|
|
+ value: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '意见反馈',
|
|
|
+ value: 2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '待公示',
|
|
|
+ value: 3
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '决策完成',
|
|
|
+ value: 4
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ // 详细内容
|
|
|
+ tableDetail: {},
|
|
|
+ // 分页
|
|
|
+ sorts: {
|
|
|
+ page: 1,
|
|
|
+ limit: 10,
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //上传文件
|
|
|
+ onChange(file, fileList, index) {
|
|
|
+ if (file.raw.type === 'application/pdf') {
|
|
|
+ this.assignFile(index, file);
|
|
|
+ // 覆盖上次上传的文件
|
|
|
+ if (fileList.length > 0) {
|
|
|
+ this.fileUploadList[index].fileList = [fileList[fileList.length - 1]];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.fileUploadList[index].fileList.length == 0) {
|
|
|
+ this.fileUploadList[index].fileList = [];
|
|
|
+ } else {
|
|
|
+ this.fileUploadList[index].fileList = [fileList[0]];
|
|
|
+ }
|
|
|
+ this.$message.error('只能上传PDF!');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //删除文件
|
|
|
+ handleRemove(file, fileList, index) {
|
|
|
+ switch (index) {
|
|
|
+ case 0:
|
|
|
+ this.postManagement.draftInterpretation = '';
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ this.postManagement.draftDecision = '';
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ this.postManagement.policyInterpretation = '';
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ this.postManagement.makePolicy = '';
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ this.postManagement.pdfContent = '';
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ this.assignFile(index, null);
|
|
|
+ },
|
|
|
+ //文件流赋值
|
|
|
+ assignFile(index, file) {
|
|
|
+ switch (index) {
|
|
|
+ case 0:
|
|
|
+ this.postManagement.file1 = file;
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ this.postManagement.file2 = file;
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ this.postManagement.file3 = file;
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ this.postManagement.file4 = file;
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ this.postManagement.file5 = file;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //返回
|
|
|
+ goBackyynn() {
|
|
|
+ this.workDialog = false;
|
|
|
+ },
|
|
|
+ //打开新增决策事项
|
|
|
+ openAddWork() {
|
|
|
+ this.postManagement = {
|
|
|
+ postTitle: '',
|
|
|
+ opinionFeedbackEnd: '',
|
|
|
+ type: '',
|
|
|
+ file1: null,
|
|
|
+ file2: null,
|
|
|
+ file3: null,
|
|
|
+ file4: null,
|
|
|
+ file5: null
|
|
|
+ };
|
|
|
+ this.fileUploadList.forEach(element => {
|
|
|
+ element.fileList = [];
|
|
|
+ });
|
|
|
+ this.workTitle = '新增决策事项'
|
|
|
+ this.workDialog = true;
|
|
|
+ },
|
|
|
+ //打开修改决策事项
|
|
|
+ openModifyWorkDialog(id) {
|
|
|
+ this.workTitle = '编辑决策事项';
|
|
|
+ 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.fileUploadList[0].fileList = data.draftInterpretation ? [{
|
|
|
+ name: data.draftInterpretation
|
|
|
+ }] : [];
|
|
|
+ this.fileUploadList[1].fileList = data.draftDecision ? [{
|
|
|
+ name: data.draftDecision
|
|
|
+ }] : [];
|
|
|
+ this.fileUploadList[2].fileList = data.policyInterpretation ? [{
|
|
|
+ name: data.policyInterpretation
|
|
|
+ }] : [];
|
|
|
+ this.fileUploadList[3].fileList = data.makePolicy ? [{
|
|
|
+ name: data.makePolicy
|
|
|
+ }] : [];
|
|
|
+ this.fileUploadList[4].fileList = data.pdfContent ? [{
|
|
|
+ name: data.pdfContent
|
|
|
+ }] : [];
|
|
|
+ this.workDialog = true;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //保存
|
|
|
+ saveWork() {
|
|
|
+ if (!this.postManagement.postTitle) {
|
|
|
+ this.$message.error('请输入发文标题!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.postManagement.type) {
|
|
|
+ this.$message.error('请选择类型!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.postManagement.opinionFeedbackEnd) {
|
|
|
+ this.$message.error('请选择意见反馈结束时间!');
|
|
|
+ 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('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
|
|
|
+ .draftInterpretation);
|
|
|
+ fd.append('draftDecision', this.postManagement.file2 ? null : this.postManagement.draftDecision);
|
|
|
+ fd.append('policyInterpretation', this.postManagement.file3 ? null : this.postManagement
|
|
|
+ .policyInterpretation);
|
|
|
+ fd.append('makePolicy', this.postManagement.file4 ? null : this.postManagement.makePolicy);
|
|
|
+ fd.append('pdfContent', this.postManagement.file5 ? null : this.postManagement.pdfContent);
|
|
|
+ api.updatePostById(fd).then(r => {
|
|
|
+ if (r.data.result) {
|
|
|
+ this.$message.success('修改成功');
|
|
|
+ this.getData();
|
|
|
+ this.workDialog = false;
|
|
|
+ } else {
|
|
|
+ this.$message.error("修改失败");
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message.error("修改失败");
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ api.savePost(fd).then(r => {
|
|
|
+ if (r.data.result) {
|
|
|
+ this.$message.success('新增成功');
|
|
|
+ this.getData();
|
|
|
+ this.workDialog = false;
|
|
|
+ } else {
|
|
|
+ this.$message.error("新增失败");
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message.error("新增失败");
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //选取条件
|
|
|
+ selectRegion() {
|
|
|
+ // console.log(this.form.region)
|
|
|
+ },
|
|
|
+ //根据条件查询
|
|
|
+ serachWork() {
|
|
|
+ // if (this.form.region !== '') {
|
|
|
+ // if (this.form.region === 'uploaderPhone') {
|
|
|
+ // // let params = {
|
|
|
+ // // page: 1,
|
|
|
+ // // limit: 10,
|
|
|
+ // // uploaderPhone: this.form.name
|
|
|
+ // // }
|
|
|
+ // this.sorts.uploaderPhone = this.form.name;
|
|
|
+ // this.sorts.pictureTitle = '';
|
|
|
+ // this.sorts.pictureAuthor = '';
|
|
|
+ // this.sorts.page = 1;
|
|
|
+ // let params = this.sorts;
|
|
|
+ // api.queryWork({
|
|
|
+ // params
|
|
|
+ // }).then(res => {
|
|
|
+ // this.total = res.data.count
|
|
|
+ // this.tableData = res.data.data
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // if (this.form.region === 'pictureTitle') {
|
|
|
+ // // let params = {
|
|
|
+ // // page: 1,
|
|
|
+ // // limit: 10,
|
|
|
+ // // pictureTitle: this.form.name
|
|
|
+ // // }
|
|
|
+ // this.sorts.pictureTitle = this.form.name;
|
|
|
+ // this.sorts.uploaderPhone = '';
|
|
|
+ // this.sorts.pictureAuthor = '';
|
|
|
+ // this.sorts.page = 1;
|
|
|
+ // let params = this.sorts;
|
|
|
+ // api.queryWork({
|
|
|
+ // params
|
|
|
+ // }).then(res => {
|
|
|
+ // this.total = res.data.count
|
|
|
+ // this.tableData = res.data.data
|
|
|
+ // // console.log(this.tableData);
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // if (this.form.region === 'pictureAuthor') {
|
|
|
+ // // let params = {
|
|
|
+ // // page: 1,
|
|
|
+ // // limit: 10,
|
|
|
+ // // pictureAuthor: this.form.name
|
|
|
+ // // }
|
|
|
+ // this.sorts.pictureTitle = '';
|
|
|
+ // this.sorts.uploaderPhone = '';
|
|
|
+ // this.sorts.pictureAuthor = this.form.name;
|
|
|
+ // this.sorts.page = 1;
|
|
|
+ // let params = this.sorts;
|
|
|
+ // api.queryWork({
|
|
|
+ // params
|
|
|
+ // }).then(res => {
|
|
|
+ // this.total = res.data.count
|
|
|
+ // this.tableData = res.data.data
|
|
|
+ // // console.log(this.tableData);
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // this.$refs.multipleTable.clearSort();
|
|
|
+ // this.column = undefined
|
|
|
+ // this.sorts.page = 1
|
|
|
+ // this.sorts = {
|
|
|
+ // page: 1,
|
|
|
+ // limit: 10,
|
|
|
+ // isAlbum: '',
|
|
|
+ // examineState: '',
|
|
|
+ // pictureType: '',
|
|
|
+ // uploadTime: '',
|
|
|
+ // updateTime: '',
|
|
|
+ // uploaderPhone: '',
|
|
|
+ // pictureTitle: '',
|
|
|
+ // pictureAuthor: '',
|
|
|
+ // }
|
|
|
+ // let params = this.sorts
|
|
|
+ // // this.getData()
|
|
|
+ // api.queryWork({
|
|
|
+ // params
|
|
|
+ // }).then(res => {
|
|
|
+ // this.total = res.data.count
|
|
|
+ // this.tableData = res.data.data
|
|
|
+ // // console.log(this.tableData);
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+
|
|
|
+ },
|
|
|
+ //发布事项
|
|
|
+ releaseDecision(id) {
|
|
|
+ let params = {
|
|
|
+ id: id
|
|
|
+ }
|
|
|
+ this.$confirm('是否发布该事项?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ api.updateState({
|
|
|
+ params
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.result) {
|
|
|
+ this.getData();
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '发布成功!'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '发布失败!'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消发布'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //切换列表条数
|
|
|
+ handleSizeChange(pageSize) {
|
|
|
+ this.sorts.limit = pageSize
|
|
|
+ this.sorts.page = 1;
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ //切换页码
|
|
|
+ handleCurrentChange(currentPage) {
|
|
|
+ this.$refs.multipleTable.bodyWrapper.scrollTop = 0;
|
|
|
+ this.sorts.page = currentPage;
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ //删除
|
|
|
+ handleDelete(id, index) {
|
|
|
+ this.$confirm("您确定要删除该数据吗?", "提示", {
|
|
|
+ cancelButtonClass: "btn-custom-cancel",
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ api.deletePostById(id).then(res => {
|
|
|
+ if (res.data.result) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!'
|
|
|
+ });
|
|
|
+ this.tableData.splice(index, 1);
|
|
|
+ this.getData();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '删除失败!'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //查看
|
|
|
+ openDialog(id) {
|
|
|
+ this.dialogTableVisible = true;
|
|
|
+ api.getPostById(id).then(r => {
|
|
|
+ this.tableDetail = r.data.data;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取列表数据
|
|
|
+ getData() {
|
|
|
+ if (this.form.region !== '') {
|
|
|
+ if (this.form.region === 'uploaderPhone') {
|
|
|
+ let params = {
|
|
|
+ page: this.sorts.page,
|
|
|
+ limit: this.sorts.limit,
|
|
|
+ uploaderPhone: this.form.name
|
|
|
+ }
|
|
|
+ api.selectPostList({
|
|
|
+ params
|
|
|
+ }).then(r => {
|
|
|
+ this.total = r.data.count
|
|
|
+ this.tableData = r.data.data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.form.region === 'pictureTitle') {
|
|
|
+ let params = {
|
|
|
+ page: this.sorts.page,
|
|
|
+ limit: this.sorts.limit,
|
|
|
+ pictureTitle: this.form.name
|
|
|
+ }
|
|
|
+ api.selectPostList({
|
|
|
+ params
|
|
|
+ }).then(r => {
|
|
|
+ this.total = r.data.count
|
|
|
+ this.tableData = r.data.data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.form.region === 'pictureAuthor') {
|
|
|
+ let params = {
|
|
|
+ page: this.sorts.page,
|
|
|
+ limit: this.sorts.limit,
|
|
|
+ pictureAuthor: this.form.name
|
|
|
+ }
|
|
|
+ api.selectPostList({
|
|
|
+ params
|
|
|
+ }).then(r => {
|
|
|
+ this.total = r.data.count
|
|
|
+ this.tableData = r.data.data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ let params = {
|
|
|
+ page: this.sorts.page,
|
|
|
+ limit: this.sorts.limit,
|
|
|
+ }
|
|
|
+ api.selectPostList({
|
|
|
+ params
|
|
|
+ }).then(r => {
|
|
|
+ this.total = r.data.count
|
|
|
+ this.tableData = r.data.data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 清空输入框
|
|
|
+ clearreset() {
|
|
|
+ this.form.name = ''
|
|
|
+ },
|
|
|
+ // 清空输入框
|
|
|
+ reset() {
|
|
|
+ this.form.region = ''
|
|
|
+ this.form.name = ''
|
|
|
+ this.getData()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="less">
|
|
|
+ /* 禁用后的勾选*/
|
|
|
+ /deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
|
|
|
+ border-color: #def5cb;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
|
|
|
+ background-color: #157de9;
|
|
|
+ border-color: #DCDFE6;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ [data-v-2cde7735] .el-upload-list--picture .el-upload-list__item-name {
|
|
|
+ display: block;
|
|
|
+ margin-top: 0px;
|
|
|
+ margin-left: -78px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-upload-list--picture .el-upload-list__item {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column-reverse;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-upload-list--picture .el-upload-list__item-name i {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-upload-list--picture .el-upload-list__item-name {
|
|
|
+ display: block;
|
|
|
+ margin-top: 0px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-upload-list--picture .el-upload-list__item-thumbnail {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-dialog__body {
|
|
|
+ padding: 0 0 30px 20px;
|
|
|
+ color: #606266;
|
|
|
+ font-size: 14px;
|
|
|
+ word-break: break-all;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-form-item__label {
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .yxnaContent {
|
|
|
+ padding: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .addTitle {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .btn-custom-cancel {
|
|
|
+ float: right !important;
|
|
|
+ margin-left: 10px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .add {
|
|
|
+ width: 66px;
|
|
|
+ height: 38px;
|
|
|
+ margin-left: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-message-box__btns .el-button:nth-child(2) {
|
|
|
+ margin-right: 10px;
|
|
|
+ float: right;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-col-12 {
|
|
|
+ width: 50%;
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+
|
|
|
+ .search {
|
|
|
+ width: 66px;
|
|
|
+ height: 38px;
|
|
|
+ margin-left: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-form-item__label {
|
|
|
+ height: 40px;
|
|
|
+ width: 110px;
|
|
|
+ background-color: #FAFAFA;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #DCDFE6;
|
|
|
+ border-radius: 2px 0 0 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-button.is-disabled {
|
|
|
+ color: #C0C4CC !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/.el-button--primary.is-disabled {
|
|
|
+ color: #FFF !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-input__inner {
|
|
|
+ border-radius: 2px 0 0 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-select>.el-input {
|
|
|
+ width: 200px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-textarea__inner {
|
|
|
+ height: 100px;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /deep/ .el-dialog__title {
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-pagination__total {
|
|
|
+ margin-left: 10px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-pagination {
|
|
|
+ margin: 0;
|
|
|
+ margin-top: 10px;
|
|
|
+ /* position: fixed;
|
|
|
+ left: 13rem; */
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-table--scrollable-x .el-table__body-wrapper {
|
|
|
+ z-index: 2;
|
|
|
+ }
|
|
|
+
|
|
|
+ .imgBox {
|
|
|
+ width: 100%;
|
|
|
+ /*height: 55vh;*/
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .but {
|
|
|
+ width: 36px;
|
|
|
+ height: 22px;
|
|
|
+ padding: 0;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-checkbox {
|
|
|
+ margin: 0;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .bewrite>.el-form-item__label {
|
|
|
+ width: 100%;
|
|
|
+ text-align: left;
|
|
|
+ padding-left: 21px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-form--inline .el-form-item {
|
|
|
+ margin-right: 0px;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ [data-v-2cde7735] .el-form-item__label {
|
|
|
+ border: 1px solid #DCDFE6;
|
|
|
+ /*border-right: transparent;*/
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 空白框*/
|
|
|
+ /deep/ .formTempBox {
|
|
|
+ height: 38px;
|
|
|
+ border: 1px solid #DCDFE6;
|
|
|
+ width: 100%;
|
|
|
+ border-left: transparent;
|
|
|
+ background-color: #FAFAFA;
|
|
|
+ }
|
|
|
+</style>
|