|
@@ -92,8 +92,8 @@
|
|
|
|
|
|
<el-table v-loading="loading" :data="activitynoticeList" @selection-change="handleSelectionChange" :height="clientHeight" border>
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="党支部" align="center" prop="deptId" width="120" :formatter="deptListFormat"/>
|
|
|
- <el-table-column label="联系点领导" align="center" prop="contactLeaderString" width="120" />
|
|
|
+ <el-table-column label="党支部" align="center" prop="deptId" width="100" :formatter="deptListFormat"/>
|
|
|
+ <el-table-column label="联系点领导" align="center" prop="contactLeaderString" width="100" />
|
|
|
<el-table-column label="活动时间" align="center" prop="activityTime" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.activityTime, '{y}-{m}-{d}') }}</span>
|
|
@@ -103,6 +103,17 @@
|
|
|
<el-table-column label="活动内容" align="center" prop="activityContent" width="350" />
|
|
|
<el-table-column label="联系点领导参加情况" align="center" prop="leaderAttendance" width="120" />
|
|
|
<el-table-column label="备注" align="center" prop="remarks" width="120" />
|
|
|
+ <el-table-column label="附件" align="center" prop="filesId" width="100" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-folder"
|
|
|
+ @click="openFileDialog(scope.row)"
|
|
|
+ >查看附件
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -257,6 +268,55 @@
|
|
|
<el-button @click="upload.open = false">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 附件详情对话框 -->
|
|
|
+ <el-dialog title="附件详情" :visible.sync="file.open" width="60%" append-to-body>
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-upload
|
|
|
+ ref="doc"
|
|
|
+ :headers="doc.headers"
|
|
|
+ :action="doc.url+'?tableName=branchActivitynotice&tableId=' + doc.tableId"
|
|
|
+ :disabled="doc.isUploading"
|
|
|
+ :on-progress="handleFileDocProgress"
|
|
|
+ :on-success="handleFileDocSuccess"
|
|
|
+ :auto-upload="true"
|
|
|
+ :file-list="file.fileList"
|
|
|
+ >
|
|
|
+ <el-button type="primary"><i class="el-icon-upload"></i> 点击上传</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-table :data="file.dataList">
|
|
|
+ <el-table-column label="附件名称" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-document"
|
|
|
+ @click="handleSee(scope.row.url)">
|
|
|
+ {{ scope.row.name }}
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="上传人" align="center" prop="creater"/>
|
|
|
+ <el-table-column label="上传时间" align="center" prop="createdate">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDeleteFile(scope.row.id)"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -269,6 +329,7 @@ import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import { listUserNoPage } from "@/api/system/user";
|
|
|
import { listDept } from "@/api/system/dept";
|
|
|
+import {delFile, listFile} from "../../../../api/branch/file";
|
|
|
|
|
|
export default {
|
|
|
name: "Activitynotice",
|
|
@@ -276,6 +337,26 @@ export default {
|
|
|
// components: { Editor },
|
|
|
data() {
|
|
|
return {
|
|
|
+ file: {
|
|
|
+ id: null,
|
|
|
+ open: false,
|
|
|
+ fileList: [],
|
|
|
+ dataList: [],
|
|
|
+ },
|
|
|
+ doc: {
|
|
|
+ file: "",
|
|
|
+ // 是否显示弹出层(报告附件)
|
|
|
+ open: false,
|
|
|
+ // 弹出层标题(报告附件)
|
|
|
+ title: "",
|
|
|
+ // 是否禁用上传
|
|
|
+ isUploading: false,
|
|
|
+ // 设置上传的请求头部
|
|
|
+ headers: {Authorization: "Bearer " + getToken()},
|
|
|
+ tableId: 0,
|
|
|
+ // 上传的地址
|
|
|
+ url: process.env.VUE_APP_BASE_API + "/branch/file/uploadFile",
|
|
|
+ },
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
@@ -360,7 +441,42 @@ export default {
|
|
|
this.getList();
|
|
|
this.getTreeselect();
|
|
|
},
|
|
|
- methods: {
|
|
|
+ methods: {//附件上传中处理
|
|
|
+ handleFileDocProgress(event, file, fileList) {
|
|
|
+ this.doc.file = file;
|
|
|
+ },
|
|
|
+ //附件上传成功处理
|
|
|
+ handleFileDocSuccess(response, file, fileList) {
|
|
|
+ console.log(response.data, '-----', this.file.id);
|
|
|
+ this.$modal.msgSuccess("上传成功");
|
|
|
+ this.getFileList();
|
|
|
+ },
|
|
|
+ handleSee(url) {
|
|
|
+ window.open(process.env.VUE_APP_BASE_API + url);
|
|
|
+ },
|
|
|
+ openFileDialog(row) {
|
|
|
+ console.log(row)
|
|
|
+ this.file.open = true;
|
|
|
+ this.doc.tableId = row.noticeId;
|
|
|
+ this.getFileList();
|
|
|
+ },
|
|
|
+ getFileList() {
|
|
|
+ listFile({tableId: this.doc.tableId, tableName: 'branchActivitynotice'}).then(res => {
|
|
|
+ this.file.dataList = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleDeleteFile(id) {
|
|
|
+ this.$confirm('是否确认删除?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function () {
|
|
|
+ return delFile(id);
|
|
|
+ }).then(() => {
|
|
|
+ this.getFileList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ },
|
|
|
calcBudget() {
|
|
|
let sum = 0;
|
|
|
for (let i = 0; i< this.activitybudgetList.length; i++) {
|