|
@@ -253,7 +253,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
|
|
|
+ <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
|
|
|
<div style="margin-top: -60px;float: right;margin-right: 40px;">
|
|
|
<el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
|
|
|
<div style="margin-top: -30px">
|
|
@@ -426,12 +426,12 @@
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
- /** 查询部门下拉树结构 */
|
|
|
- getTreeselect() {
|
|
|
- treeselect().then(response => {
|
|
|
- this.deptOptions = response.data;
|
|
|
- });
|
|
|
- },
|
|
|
+ /** 查询部门下拉树结构 */
|
|
|
+ getTreeselect() {
|
|
|
+ treeselect().then(response => {
|
|
|
+ this.deptOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 查询目录菜单 */
|
|
|
getMenuList() {
|
|
|
listMenu(this.queryMenu).then(response => {
|
|
@@ -483,7 +483,7 @@
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length!==1
|
|
|
+ this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
@@ -530,60 +530,60 @@
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
|
this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
|
|
|
- confirmButtonText: this.$t('确定'),
|
|
|
- cancelButtonText: this.$t('取消'),
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return delPublicdoc(ids);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.msgSuccess(this.$t('删除成功'));
|
|
|
- })
|
|
|
+ confirmButtonText: this.$t('确定'),
|
|
|
+ cancelButtonText: this.$t('取消'),
|
|
|
+ type: "warning"
|
|
|
+ }).then(function () {
|
|
|
+ return delPublicdoc(ids);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess(this.$t('删除成功'));
|
|
|
+ })
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|
|
|
this.$confirm(this.$t('是否确认导出所有公共盘文档数据项?'), this.$t('警告'), {
|
|
|
- confirmButtonText: this.$t('确定'),
|
|
|
- cancelButtonText: this.$t('取消'),
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return exportPublicdoc(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
- })
|
|
|
+ confirmButtonText: this.$t('确定'),
|
|
|
+ cancelButtonText: this.$t('取消'),
|
|
|
+ type: "warning"
|
|
|
+ }).then(function () {
|
|
|
+ return exportPublicdoc(queryParams);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /** 导入按钮操作 */
|
|
|
+ handleImport() {
|
|
|
+ this.upload.title = this.$t('用户导入');
|
|
|
+ this.upload.open = true;
|
|
|
+ },
|
|
|
+ /** 下载模板操作 */
|
|
|
+ importTemplate() {
|
|
|
+ this.$refs['downloadFileForm'].submit()
|
|
|
+ },
|
|
|
+ // 文件上传中处理
|
|
|
+ handleFileUploadProgress(event, file, fileList) {
|
|
|
+ this.upload.isUploading = true;
|
|
|
+ },
|
|
|
+ // 文件上传成功处理
|
|
|
+ handleFileSuccess(response, file, fileList) {
|
|
|
+ this.upload.open = false;
|
|
|
+ this.upload.isUploading = false;
|
|
|
+ this.$refs.upload.clearFiles();
|
|
|
+ if (response.data[0] != null) {
|
|
|
+ this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败') + "。", this.$t('导入结果'), {dangerouslyUseHTMLString: true});
|
|
|
+ } else {
|
|
|
+ this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), {dangerouslyUseHTMLString: true});
|
|
|
+ }
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ // 提交上传文件
|
|
|
+ submitFileForm(val) {
|
|
|
+ if (val == 1) {
|
|
|
+ this.$refs.upload.submit();
|
|
|
+ }
|
|
|
},
|
|
|
- /** 导入按钮操作 */
|
|
|
- handleImport() {
|
|
|
- this.upload.title = this.$t('用户导入');
|
|
|
- this.upload.open = true;
|
|
|
- },
|
|
|
- /** 下载模板操作 */
|
|
|
- importTemplate() {
|
|
|
- this.$refs['downloadFileForm'].submit()
|
|
|
- },
|
|
|
- // 文件上传中处理
|
|
|
- handleFileUploadProgress(event, file, fileList) {
|
|
|
- this.upload.isUploading = true;
|
|
|
- },
|
|
|
- // 文件上传成功处理
|
|
|
- handleFileSuccess(response, file, fileList) {
|
|
|
- this.upload.open = false;
|
|
|
- this.upload.isUploading = false;
|
|
|
- this.$refs.upload.clearFiles();
|
|
|
- if (response.data[0] != null) {
|
|
|
- this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败')+"。", this.$t('导入结果'), { dangerouslyUseHTMLString: true });
|
|
|
- }else {
|
|
|
- this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
|
|
|
- }
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- // 提交上传文件
|
|
|
- submitFileForm(val) {
|
|
|
- if(val == 1) {
|
|
|
- this.$refs.upload.submit();
|
|
|
- }
|
|
|
- },
|
|
|
/** 报告附件按钮操作 */
|
|
|
handleDoc(row) {
|
|
|
this.doc.id = row.id;
|
|
@@ -596,7 +596,7 @@
|
|
|
this.$refs.doc.clearFiles()
|
|
|
})
|
|
|
},
|
|
|
- getFileList (){
|
|
|
+ getFileList() {
|
|
|
allFileList(this.doc.queryParams).then(response => {
|
|
|
this.doc.commonfileList = response;
|
|
|
});
|
|
@@ -609,38 +609,17 @@
|
|
|
//附件上传成功处理
|
|
|
handleFileDocSuccess(response, file, fileList) {
|
|
|
this.doc.isUploading = false;
|
|
|
- this.$alert(response.msg, this.$t('导入结果') , { dangerouslyUseHTMLString: true });
|
|
|
+ this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
|
|
|
this.getFileList()
|
|
|
},
|
|
|
//pdf预览
|
|
|
- openPdf(){
|
|
|
- window.open(this.pdf.pdfUrl);//path是文件的全路径地址
|
|
|
- },
|
|
|
- handleSee (row){
|
|
|
- this.pdf.open =true
|
|
|
- this.pdf.pageNum = 1
|
|
|
- this.pdf.loadedRatio = 0
|
|
|
- this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
|
|
|
- this.pdf.title = row.fileName
|
|
|
- let loadingTask = null
|
|
|
- loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
|
|
|
- loadingTask.promise.then(pdf => {
|
|
|
- this.pdf.numPages = pdf.numPages
|
|
|
- }).catch(err => {
|
|
|
- this.msgError(this.$t('pdf加载失败'))
|
|
|
- })
|
|
|
+ openPdf() {
|
|
|
+ window.open(this.pdf.pdfUrl);//path是文件的全路径地址
|
|
|
},
|
|
|
- // pdf上一页
|
|
|
- prePage() {
|
|
|
- let page = this.pdf.pageNum
|
|
|
- page = page > 1 ? page - 1 : this.pdf.pageTotalNum
|
|
|
- this.pdf.pageNum = page
|
|
|
- },
|
|
|
- // pdf下一页
|
|
|
- nextPage() {
|
|
|
- let page = this.pdf.pageNum
|
|
|
- page = page < this.pdf.pageTotalNum ? page + 1 : 1
|
|
|
- this.pdf.pageNum = page
|
|
|
+ handleSee(row) {
|
|
|
+ this.pdf.open = true
|
|
|
+ this.pdf.title = row.fileName
|
|
|
+ this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDeleteDoc(row) {
|
|
@@ -649,7 +628,7 @@
|
|
|
confirmButtonText: this.$t('确定'),
|
|
|
cancelButtonText: this.$t('取消'),
|
|
|
type: "warning"
|
|
|
- }).then(function() {
|
|
|
+ }).then(function () {
|
|
|
return delCommonfile(ids);
|
|
|
}).then(() => {
|
|
|
this.getFileList()
|