-
{{ item.name }}
+
{{ item.name }}
{
+ getBusStandFileByAttId({
+ attId
+ }).then(res => {
+ if (res.ok) {
+ resolve(res.data)
+ } else {
+ reject()
+ }
+ }).catch(e => {
+ reject(e)
+ })
+ })
+ },
+ // 文件预览
+ filePreview(item) {
+ const attId = item.response.data.id
+ this.getBusStandFileByAttId(attId)
+ .then(res => {
+ console.log(res)
+ if(res){
+ const editFileInfo = res
+ console.log(editFileInfo)
+ if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){
+ window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
+ }else {
+ const nowTime = new Date().getTime()
+ // window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
+ window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
+ }
+ // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
+ }
+ // switch (res.convertState) {
+ // case 'ERROR':
+ // this.$message.warning('文档转换失败')
+ // break
+ // case 'LODING':
+ // this.$message.info('文档转换中,请稍后查看')
+ // break
+ // case 'SUCCESS':
+ // const { convertFileInfo } = res
+ // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id))
+ // break
+ // }
+ }).catch(e => {
+ console.log(e)
+ this.$message.warning('文件不存在,预览失败')
+ })
+ },
checkedRole (data) {
this.assigneeNewLoading = true
changeAssigneeNew({