@@ -524,6 +524,10 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const docIds = row.docId || this.ids;
+ if(docIds == null || docIds == undefined || docIds =='' || docIds.length < 0){
+ this.$modal.msgError(`最少选择一条数据`);
+ return;
+ }
this.$modal.confirm('是否确认删除?').then(function() {
return delDocument(docIds);
}).then(() => {
@@ -611,9 +615,13 @@ export default {
self.loadingDownload = false
},1000)
},
- /** 删除按钮操作 */
+ /** 发布操作 */
handlePush(row) {
const docIds = row.docId || this.ids;
+ if(docIds == null || docIds == undefined || docIds =='' || docIds.length < 0){
+ this.$modal.msgError(`最少选择一条数据`);
+ return;
+ }
this.$modal.confirm('是否确认发布?').then(function() {
return pushDoc(docIds);
}).then(() => {
diff --git a/src/views/tool/downloadFileDetail.vue b/src/views/tool/downloadFileDetail.vue
index 3a6f664..182ff9f 100644
--- a/src/views/tool/downloadFileDetail.vue
+++ b/src/views/tool/downloadFileDetail.vue
@@ -3,23 +3,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
- {{ parseTime(scope.row.createTime) }}
+ {{ parseTime(scope.row.createDate) }}
@@ -54,6 +42,7 @@
import editDocument from "../document/editDocument";
import { Base64 } from 'js-base64';
import iFrame from "@/components/iFrame/index"
+ import { listAttachment } from "@/api/attachment/attachment";
export default {
name: 'toolDetail',
@@ -68,7 +57,7 @@
data(){
return{
detailActiveName: 'first',
- docList: [],
+ attachmentList: [],
queryParams: {
pageNum: 1,
pageSize: 10,
@@ -91,7 +80,7 @@
}
},
created(){
- this.getDocList()
+ this.getAttachmentList()
this.getDiscussionsList()
},
watch: {
@@ -101,11 +90,12 @@
}
},
methods:{
- getDocList() {
+ getAttachmentList() {
this.loading = true;
- this.queryParams.toolId = this.toolDetail.toolId
- listDocument(this.queryParams).then(response => {
- this.docList = response.rows;
+ this.$set(this.queryParams,'del',"0")
+ this.$set(this.queryParams,'businessId',this.toolDetail.toolId)
+ listAttachment(this.queryParams).then(response => {
+ this.attachmentList = response.rows;
this.total = response.total;
this.loading = false;
}
@@ -116,7 +106,7 @@
},
editDocumentSubmit(){
this.open = false
- this.getDocList()
+ this.getAttachmentList()
},
handlePriew(row){
this.previewUrl = process.env.VUE_APP_TOOL_TECH_FILE_VIEW_API + '/onlinePreview?url=' + encodeURIComponent(Base64.encode(process.env.VUE_APP_BASE_API + row.docUrl));
@@ -139,12 +129,15 @@
handleDownload(row){
let self = this
self.loadingDownload = true
- this.$download.resource(row.docUrl);
+ this.$download.resource(row.fileUrl);
//保存下载记录
- if(this.toolDetail.toolId){
+ if(row.businessId){
let formData = {
- toolId: this.toolDetail.toolId
+ 'businessId': row.businessId,
+ 'businessType': 'tool',
+ 'attId': row.id,
+ 'attName': row.fileOldName
}
addCount(formData).then(res => {
});
diff --git a/src/views/tool/index.vue b/src/views/tool/index.vue
index 8c2547a..8f14b3c 100644
--- a/src/views/tool/index.vue
+++ b/src/views/tool/index.vue
@@ -614,6 +614,7 @@ export default {
handleDelete(list){
let _this = this
if (!list||list.length<1) {
+ this.$modal.msgError(`最少选择一条数据`);
return
}
_this.$modal.confirm('删除后,该流程待办任务将会被删除,请谨慎操作。是否确认执行?')
diff --git a/src/views/tool/toolDetail.vue b/src/views/tool/toolDetail.vue
index 0afc8f6..7f7dbc0 100644
--- a/src/views/tool/toolDetail.vue
+++ b/src/views/tool/toolDetail.vue
@@ -30,9 +30,9 @@
-
-
-
+
+
+
- {{ parseTime(scope.row.createTime) }}
+ {{ parseTime(scope.row.createDate) }}
@@ -55,7 +55,8 @@
size="mini"
type="text"
icon="el-icon-view"
- @click="handlePriew(scope.row)"
+ v-if="previewAuth(scope.row)"
+ @click="handlePreview(scope.row)"
>预览
下载
@@ -121,7 +122,7 @@
-
+