|
|
|
@ -58,6 +58,17 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-table-column prop="deptId" label="部门ID" width="150"></el-table-column>
|
|
|
|
<el-table-column prop="deptId" label="部门ID" width="150"></el-table-column>
|
|
|
|
<el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
|
|
|
|
<el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="附件" align="center" prop="docs" width="120">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
|
|
icon="el-icon-view"
|
|
|
|
|
|
|
|
v-hasPermi="['system:dept:docs']"
|
|
|
|
|
|
|
|
@click="handleFuJian(scope.row)"
|
|
|
|
|
|
|
|
>附件详情/编辑</el-button>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
|
|
|
|
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
|
|
|
|
<el-table-column prop="status" label="状态" width="100">
|
|
|
|
<el-table-column prop="status" label="状态" width="100">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
@ -155,11 +166,61 @@
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 附件详情对话框 -->
|
|
|
|
|
|
|
|
<el-dialog title="附件详情/编辑" :visible.sync="uploadFJ.open" width="900px" append-to-body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div v-for="item in uploadFJ.docDiscripList">
|
|
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
|
|
|
<el-col :span="3" style="text-align: right;">
|
|
|
|
|
|
|
|
<div class="my_required" style="margin-top: 10px;">附件主题</div>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
|
|
|
<el-input v-model.trim="item.title" placeholder="请输入附件主题"/>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-row :gutter="20" style="margin-top: 10px;">
|
|
|
|
|
|
|
|
<el-col :span="3" style="text-align: right;">
|
|
|
|
|
|
|
|
<div class="my_required" style="margin-top: 10px;">附件简介</div>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
|
|
|
<el-input type="textarea" v-model.trim="item.docDiscrip" placeholder="请输入附件简介"/>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="_con">
|
|
|
|
|
|
|
|
<div class="left">
|
|
|
|
|
|
|
|
<el-card style="margin-bottom: 10px;">
|
|
|
|
|
|
|
|
<div slot="header">
|
|
|
|
|
|
|
|
<span>已有附件</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-for="(item,index) in uploadFJ.fileList" :key="item.url" class="yy_fj_list">
|
|
|
|
|
|
|
|
<a :href="item.url" :download="item.name" target="_blank">{{ item.name }}</a>
|
|
|
|
|
|
|
|
<i class="el-icon-close" @click="uploadFJListRemove(index)"></i>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="right">
|
|
|
|
|
|
|
|
<el-upload ref="uploadFJ" :limit="5" :headers="uploadFJ.headers" :action="uploadFJ.url" multiple
|
|
|
|
|
|
|
|
:disabled="uploadFJ.isUploading" :on-progress="fileUploadProgressFJ" :on-success="fileSuccessFJ"
|
|
|
|
|
|
|
|
:auto-upload="true" drag>
|
|
|
|
|
|
|
|
<i class="el-icon-upload"></i>
|
|
|
|
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="updateFileFJ">确定</el-button>
|
|
|
|
|
|
|
|
<el-button @click="uploadFJ.open = false">取 消</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept"
|
|
|
|
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild, editDeptDocs } from "@/api/system/dept"
|
|
|
|
|
|
|
|
import { getToken } from "@/utils/auth"
|
|
|
|
import Treeselect from "@riophae/vue-treeselect"
|
|
|
|
import Treeselect from "@riophae/vue-treeselect"
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css"
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css"
|
|
|
|
|
|
|
|
|
|
|
|
@ -217,7 +278,24 @@ export default {
|
|
|
|
trigger: "blur"
|
|
|
|
trigger: "blur"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
// 附件详情参数
|
|
|
|
|
|
|
|
uploadFJ: {
|
|
|
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
|
|
|
open: false,
|
|
|
|
|
|
|
|
// 附件上传
|
|
|
|
|
|
|
|
fileList: [],
|
|
|
|
|
|
|
|
// 附件上传
|
|
|
|
|
|
|
|
docDiscripList: [],
|
|
|
|
|
|
|
|
// 是否禁用上传
|
|
|
|
|
|
|
|
isUploading: false,
|
|
|
|
|
|
|
|
// 设置上传的请求头部
|
|
|
|
|
|
|
|
headers: { Authorization: "Bearer " + getToken() },
|
|
|
|
|
|
|
|
// 上传的地址
|
|
|
|
|
|
|
|
url: process.env.VUE_APP_BASE_API + "/common/upload"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 修改内容行
|
|
|
|
|
|
|
|
updataRow: {},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
@ -335,7 +413,114 @@ export default {
|
|
|
|
this.getList()
|
|
|
|
this.getList()
|
|
|
|
this.$modal.msgSuccess("删除成功")
|
|
|
|
this.$modal.msgSuccess("删除成功")
|
|
|
|
}).catch(() => {})
|
|
|
|
}).catch(() => {})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 附件详情
|
|
|
|
|
|
|
|
handleFuJian(row){
|
|
|
|
|
|
|
|
this.updataRow = row;
|
|
|
|
|
|
|
|
this.uploadFJ.fileList = [];
|
|
|
|
|
|
|
|
this.uploadFJ.docDiscripList = [{
|
|
|
|
|
|
|
|
title:'',
|
|
|
|
|
|
|
|
docDiscrip:'',
|
|
|
|
|
|
|
|
}];
|
|
|
|
|
|
|
|
if(row.docs){
|
|
|
|
|
|
|
|
let arr = row.docs.split(';');
|
|
|
|
|
|
|
|
arr.forEach( item => {
|
|
|
|
|
|
|
|
let arr1 = item.split(',');
|
|
|
|
|
|
|
|
this.uploadFJ.fileList.push({
|
|
|
|
|
|
|
|
name: arr1[0],
|
|
|
|
|
|
|
|
url: arr1[1]
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.uploadFJ.docDiscripList = JSON.parse(row.docDiscrip);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.uploadFJ.open = true;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 已有附件
|
|
|
|
|
|
|
|
uploadFJListRemove(index){
|
|
|
|
|
|
|
|
this.uploadFJ.fileList.splice(index, 1);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
submitFileFormFJ(){
|
|
|
|
|
|
|
|
this.$refs.uploadFJ.submit()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 文件上传中处理
|
|
|
|
|
|
|
|
fileUploadProgressFJ(event, file, fileList) {
|
|
|
|
|
|
|
|
this.uploadFJ.isUploading = true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 文件上传成功处理
|
|
|
|
|
|
|
|
fileSuccessFJ(response, file, fileList) {
|
|
|
|
|
|
|
|
this.uploadFJ.isUploading = false
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
updateFileFJ(){
|
|
|
|
|
|
|
|
let flag = true;
|
|
|
|
|
|
|
|
if(!this.uploadFJ.docDiscripList[0].title){
|
|
|
|
|
|
|
|
flag = false;
|
|
|
|
|
|
|
|
this.$alert(`附近主题不能为空`, `提示`, {
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!this.uploadFJ.docDiscripList[0].docDiscrip){
|
|
|
|
|
|
|
|
flag = false;
|
|
|
|
|
|
|
|
this.$alert(`附近简介不能为空`, `提示`, {
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(flag){
|
|
|
|
|
|
|
|
let uploadFiles = this.$refs.uploadFJ.$data.uploadFiles;
|
|
|
|
|
|
|
|
let arr = []
|
|
|
|
|
|
|
|
this.uploadFJ.fileList.forEach(item=>{
|
|
|
|
|
|
|
|
arr.push(item.name+','+item.url);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
uploadFiles.forEach( item => {
|
|
|
|
|
|
|
|
arr.push(item.response.originalFilename+','+item.response.url);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.updataRow.docs = arr.join(';');
|
|
|
|
|
|
|
|
this.updataRow.docDiscrip =JSON.stringify(this.uploadFJ.docDiscripList);
|
|
|
|
|
|
|
|
editDeptDocs(this.updataRow).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
|
|
|
this.uploadFJ.open = false;
|
|
|
|
|
|
|
|
this.$refs.uploadFJ.clearFiles();
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
|
|
.el-dialog__body{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.my_required:before{
|
|
|
|
|
|
|
|
content: "*";
|
|
|
|
|
|
|
|
color: #f56c6c;
|
|
|
|
|
|
|
|
margin-right: 4px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
._con{
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
min-height: 400px;
|
|
|
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.left{
|
|
|
|
|
|
|
|
width: 480px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.yy_fj_list {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
height: 36px;
|
|
|
|
|
|
|
|
border-bottom: 1px solid #39CCCC;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
i{
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.right{
|
|
|
|
|
|
|
|
width: 360px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|