修改禅道已知bug

This commit is contained in:
qq787203167
2022-08-11 11:11:23 +08:00
parent 42ec3c43ec
commit fcbd009619
2 changed files with 85 additions and 5 deletions
@@ -64,6 +64,7 @@
</div>
<a-form-model-item class="itemModel" prop="endTime">
<a-date-picker class="box-input"
:disabledDate="disabledDate"
:placeholder="$t('PleaseSelect')+$t('closingDate')"
@change="dateChange('endTime')"
:getCalendarContainer="(trigger) => trigger.parentNode"
@@ -347,6 +348,9 @@
}
})
},
disabledDate(current) {
return current && current < moment().subtract(1, 'day')
},
pageOnChange(page) {
this.pageNo = page
this.getList()
@@ -78,6 +78,18 @@
v-if="record.createBy == userInfoQuery.username && record.releaseState == 'draft'"
@click="deleteData(record)">{{$t('delete')}}</a>
</span>
<span slot="serialNumberRight" :title="text" slot-scope="text,record">
<a @click="serialNumberRightClick(record)">{{text}}</a>
</span>
<span slot="serialNumberLeft" :title="text" slot-scope="text,record">
<a @click="serialNumberLeftClick(record)">{{text}}</a>
</span>
<span slot="fileNameLeft" :title="text" slot-scope="text,record">
<a @click="fileNameLeftClick(record)">{{text}}</a>
</span>
<span slot="fileNameRight" :title="text" slot-scope="text,record">
<a @click="fileNameRightClick(record)">{{text}}</a>
</span>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
<a-pagination
@@ -96,8 +108,9 @@
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import { mapGetters } from 'vuex'
import { Base64 } from 'js-base64'
export default {
name: 'index',
@@ -112,6 +125,7 @@
loading: false,
dataSource: [],
selectedRowKeys: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
total: 0,
pageSize: 10,
pageNo: 1,
@@ -123,13 +137,17 @@
title: this.$t('standard') + 1,
align: 'center',
dataIndex: 'serialNumberLeft',
width: 170
width: 170,
ellipsis: true,
scopedSlots: { customRender: 'serialNumberLeft' }
},
{
title: this.$t('title') + 1,
align: 'center',
dataIndex: 'titleLeft',
width: 170
width: 170,
ellipsis: true,
scopedSlots: { customRender: 'serialNumberLeft' }
},
{
title: this.$t('TextStatus'),
@@ -143,18 +161,23 @@
align: 'center',
width: 270,
ellipsis: true,
dataIndex: 'fileNameLeft'
dataIndex: 'fileNameLeft',
scopedSlots: { customRender: 'fileNameLeft' }
},
{
title: this.$t('standard') + 2,
align: 'center',
dataIndex: 'serialNumberRight',
ellipsis: true,
scopedSlots: { customRender: 'serialNumberRight' },
width: 170
},
{
title: this.$t('title') + 2,
align: 'center',
dataIndex: 'titleRight',
scopedSlots: { customRender: 'serialNumberRight' },
ellipsis: true,
width: 170
},
{
@@ -169,7 +192,8 @@
align: 'center',
width: 270,
ellipsis: true,
dataIndex: 'fileNameRight'
dataIndex: 'fileNameRight',
scopedSlots: { customRender: 'fileNameRight' }
},
{
title: this.$t('releaseSituation'),
@@ -350,6 +374,58 @@
})
}
})
},
serialNumberRightClick(row) {
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: {
id: row.fileKeyRight
}
})
window.open(newUrl.href, '_blank')
},
serialNumberLeftClick(row) {
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: {
id: row.fileKeyLeft
}
})
window.open(newUrl.href, '_blank')
},
fileNameLeftClick(row) {
let fileName = row.fileNameLeft
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + row.fileIdLeft + '&userName=' + this.userInfo().username))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdLeft + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdLeft + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', row.fileNameLeft, { id: row.fileIdLeft })
}
},
fileNameRightClick(row) {
let fileName = row.fileNameRight
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + row.fileIdRight + '&userName=' + this.userInfo().username))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdRight + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + row.fileIdRight + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', row.fileNameRight, { id: row.fileIdRight })
}
}
}
}