| | |
| | | <!-- 下载按钮 --> |
| | | <image v-show="showBtn" src="/static/icon_down.png" @click="downloadFile(file)" |
| | | style="height: 25px; width: 25px; margin-right: 10px;"></image> |
| | | <!-- <button size="mini" @click="downloadFile(file)"> |
| | | <view class="icon-download">下载</view> |
| | | </button> --> |
| | | <!-- 删除按钮 --> |
| | | <image v-show="showBtn" src="/static/icon_del.png" @click="deleteFile(index)" |
| | | style="height: 25px; width: 25px;"></image> |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="flex margin-bottom-xs"> |
| | | <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" |
| | | @click="goReportRepair()">报修</button> |
| | | <button v-if="authIncludes('eam:reportRepair:add')" class="flex-sub cu-btn bg-blue margin-sm lg" |
| | | hover-class="is-hover" @click="goReportRepair()">报修</button> |
| | | <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" |
| | | @click="goCheck()">点检</button> |
| | | <button class="flex-sub cu-btn bg-blue margin-sm lg" hover-class="is-hover" |
| | |
| | | msg1Title: "" |
| | | } |
| | | }, |
| | | mounted() { |
| | | console.log('从 store 获取的 auth:', this.$store.getters.getAuth) |
| | | }, |
| | | computed: { |
| | | authList() { |
| | | return this.$store.getters.getAuth || [] |
| | | }, |
| | | top() { |
| | | return this.CustomBar * 2 + 160 |
| | | }, |
| | |
| | | this.getFileList() |
| | | }, |
| | | methods: { |
| | | authIncludes(code) { |
| | | return this.authList.some(auth => auth.action === code) |
| | | }, |
| | | downloadFile(item) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | // downFile(item) { |
| | | // this.$http.download(this.url.downloadFile, { |
| | | // params: { |
| | | // id:item.id |
| | | // }, |
| | | // }).then(res => { |
| | | // if (!res) { |
| | | // this.$message.warning('文件下载失败') |
| | | // return |
| | | // } else { |
| | | // let fileName = item.fileName; |
| | | // if (typeof window.navigator.msSaveBlob !== 'undefined') { |
| | | // window.navigator.msSaveBlob(new Blob([res]), fileName); |
| | | // } else { |
| | | // let url = window.URL.createObjectURL(new Blob([res])); |
| | | // let link = document.createElement('a'); |
| | | // link.style.display = 'none'; |
| | | // link.href = url; |
| | | // link.setAttribute('download', fileName); |
| | | // document.body.appendChild(link); |
| | | // link.click() |
| | | // document.body.removeChild(link) //下载完成移除元素 |
| | | // window.URL.revokeObjectURL(url) //释放掉blob对象 |
| | | // } |
| | | // } |
| | | // }).catch((err) => { |
| | | // uni.showToast({ |
| | | // title: '获取文件列表失败', |
| | | // icon: 'none' |
| | | // }); |
| | | // }); |
| | | // }, |
| | | |
| | | |
| | | getFileList() { |
| | | this.$http.get(this.url.fileList, { |
| | | params: { |
| | |
| | | uni.redirectTo({ |
| | | url: `/pages/reportRepair/reportRepair?equipmentId=${encodeURIComponent(this.id)}` |
| | | }); |
| | | |
| | | }, |
| | | /** |
| | | * 点检 |