| | |
| | | <span v-show="formInline.dataType !='type2'">{{item.tabDesc}}</span> |
| | | <div style="float: right; padding: 3px 0"> |
| | | <i |
| | | v-show=" formInline.dataType=='type2'" |
| | | v-if="showView(item.type) " |
| | | v-show="formInline.dataType=='type2' " |
| | | v-if="showView(item, /[]/)" |
| | | class="el-icon-view" |
| | | :title="$t('common.preview')" |
| | | @click="setAttatchFileView(index, item)" |
| | |
| | | this.dialog.isJpg = true; |
| | | } |
| | | this.dialog.dialogVisible = true; |
| | | this.dialog.isPdf = true; |
| | | |
| | | var url = BASE_URL + "/dataLib/downloadForView?guid=" + row.guid + "&token=" + getToken(); |
| | | this.dialog.src = url; |
| | | }, |
| | | showView(name) { |
| | | if (!name) return false |
| | | if (name.indexOf('pdf') || name.indexOf('jpg') != -1 || name.indexOf('gif') != -1 || name.indexOf('png') != -1 || name.indexOf('jpeg') != -1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | showView(res) { |
| | | var name = res.type |
| | | if (name) { |
| | | if (name.indexOf('pdf') != -1 || name.indexOf('jpg') != -1 || name.indexOf('gif') != -1 || name.indexOf('png') != -1 || name.indexOf('jpeg') != -1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | } |
| | | |
| | | }, |
| | | //附件刪除 |
| | | async setAttachDel() { |
| | |
| | | this.listData.pageIndex = 1; |
| | | this.listData.pageSize = val; |
| | | switch (this.formInline.dataType) { |
| | | |
| | | case "type2"://文件数据 |
| | | this.getQueryFileData(); |
| | | break; |
| | |
| | | handleCurrentChange(val) { |
| | | this.listData.pageIndex = val; |
| | | switch (this.formInline.dataType) { |
| | | |
| | | case "type2"://文件数据 |
| | | this.getQueryFileData(); |
| | | break; |
| | |
| | | //查询文件数据 |
| | | async getQueryFileData() { |
| | | this.listData.dirs = ""; |
| | | this.listData.count = 0; |
| | | |
| | | if (this.formInline.category.length != 0) { |
| | | this.listData.dirs += this.formInline.category.toString(); |
| | | } |