Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -118,6 +118,35 @@
|
|||||||
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
|
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
|
||||||
<a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
<a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||||
</span>
|
</span>
|
||||||
|
<span slot="designDeliverableTemplateName" slot-scope="text,record">
|
||||||
|
<span>{{record.designDeliverableType_dictText}}</span><br>
|
||||||
|
<a v-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length == 1"
|
||||||
|
@click="pdfPreview(record)">>
|
||||||
|
{{record.designDeliverableTemplate}}
|
||||||
|
</a>
|
||||||
|
<a v-else-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length == 1"
|
||||||
|
@click="clickButtonToUpload(record.designDeliverableTemplate)">{{$t('viewFile')}}</a>
|
||||||
|
<a v-else>--</a>
|
||||||
|
</span>
|
||||||
|
<span slot="prehomoDeliverableTemplateName" slot-scope="text,record">
|
||||||
|
<span>{{record.prehomoDeliverableType_dictText}}</span><br>
|
||||||
|
<a v-if="record.prehomoDeliverableTemplate && record.prehomoDeliverableTemplate.split(',').length == 1">
|
||||||
|
{{record.prehomoDeliverableTemplate}}
|
||||||
|
</a>
|
||||||
|
<a v-else-if="record.prehomoDeliverableTemplate && record.prehomoDeliverableTemplate.split(',').length == 1"
|
||||||
|
@click="clickButtonToUpload(record.prehomoDeliverableTemplate)">{{$t('viewFile')}}</a>
|
||||||
|
<a v-else>--</a>
|
||||||
|
</span>
|
||||||
|
<span slot="verificationAndConformityconfirmation" slot-scope="text,record">
|
||||||
|
<span>{{record.verifyDeliverableType_dictText}}</span><br>
|
||||||
|
<a v-if="record.verifyDeliverableTemplate && record.verifyDeliverableTemplate.split(',').length == 1"
|
||||||
|
@click="pdfPreview(record)">>
|
||||||
|
{{record.verifyDeliverableTemplate}}
|
||||||
|
</a>
|
||||||
|
<a v-else-if="record.verifyDeliverableTemplate && record.verifyDeliverableTemplate.split(',').length == 1"
|
||||||
|
@click="clickButtonToUpload(record.verifyDeliverableTemplate)">{{$t('viewFile')}}</a>
|
||||||
|
<a v-else>--</a>
|
||||||
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
<listAddModel :url="url" @addModelList="addModelList" ref="addModelRef"/>
|
<listAddModel :url="url" @addModelList="addModelList" ref="addModelRef"/>
|
||||||
@@ -153,6 +182,32 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
<a-modal
|
||||||
|
:title="$t('deliverableTemplate')"
|
||||||
|
:width="600"
|
||||||
|
:visible="visibleFile"
|
||||||
|
:maskClosable="false"
|
||||||
|
@ok="visibleFile = false"
|
||||||
|
@cancel="visibleFile = false"
|
||||||
|
>
|
||||||
|
<a-table
|
||||||
|
class="table"
|
||||||
|
:columns="columnsFile"
|
||||||
|
:pagination="false"
|
||||||
|
:scroll="{x:500,y: 400}"
|
||||||
|
:data-source="dataSourceFile"
|
||||||
|
:loading="loading"
|
||||||
|
>
|
||||||
|
<span slot="fileOperation" slot-scope="record">
|
||||||
|
<a class="text" @click="pdfPreview(record)">
|
||||||
|
{{$t('See')}}
|
||||||
|
</a>
|
||||||
|
<a class="text" @click="download(record)">
|
||||||
|
{{$t('download')}}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
</a-modal>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -163,6 +218,7 @@
|
|||||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
import { Base64 } from 'js-base64'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'listOfRegulations',
|
name: 'listOfRegulations',
|
||||||
@@ -296,7 +352,8 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('Deliverables'),
|
title: this.$t('Deliverables'),
|
||||||
dataIndex: 'designDeliverableTemplateName',
|
dataIndex: 'designDeliverableTemplateName',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
scopedSlots: { customRender: 'designDeliverableTemplateName' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('Sponsor'),
|
title: this.$t('Sponsor'),
|
||||||
@@ -321,7 +378,8 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('Deliverables'),
|
title: this.$t('Deliverables'),
|
||||||
dataIndex: 'prehomoDeliverableTemplateName',
|
dataIndex: 'prehomoDeliverableTemplateName',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
scopedSlots: { customRender: 'prehomoDeliverableTemplateName' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('Sponsor'),
|
title: this.$t('Sponsor'),
|
||||||
@@ -346,7 +404,8 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('Deliverables'),
|
title: this.$t('Deliverables'),
|
||||||
dataIndex: 'verifyDeliverableTemplateName',
|
dataIndex: 'verifyDeliverableTemplateName',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
scopedSlots: { customRender: 'verifyDeliverableTemplateName' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('Sponsor'),
|
title: this.$t('Sponsor'),
|
||||||
@@ -373,6 +432,23 @@
|
|||||||
scopedSlots: { customRender: 'operation' }
|
scopedSlots: { customRender: 'operation' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
columnsFile: [
|
||||||
|
{
|
||||||
|
title: this.$t('deliverableTemplate'),
|
||||||
|
dataIndex: 'fileName',
|
||||||
|
align: 'center',
|
||||||
|
width: 260,
|
||||||
|
ellipsis: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('operation'),
|
||||||
|
align: 'center',
|
||||||
|
width: 130,
|
||||||
|
scopedSlots: { customRender: 'fileOperation' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
visibleFile: false,
|
||||||
|
dataSourceFile: [],
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
isDisplay: true,
|
isDisplay: true,
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
@@ -548,11 +624,11 @@
|
|||||||
if (this.dataSource[i].id == value[j]) {
|
if (this.dataSource[i].id == value[j]) {
|
||||||
if (this.dataSource[i].roleCode == 1 && this.dataSource[i].regulationOwnerSubmitStatus) {
|
if (this.dataSource[i].roleCode == 1 && this.dataSource[i].regulationOwnerSubmitStatus) {
|
||||||
isTrue = false
|
isTrue = false
|
||||||
this.$message.warning(this.$t('The') + (i+1) + this.$t('submitted'))
|
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
||||||
break
|
break
|
||||||
} else if (this.dataSource[i].roleCode == 2 && this.dataSource[i].homologationEngineerSubmitStatus) {
|
} else if (this.dataSource[i].roleCode == 2 && this.dataSource[i].homologationEngineerSubmitStatus) {
|
||||||
isTrue = false
|
isTrue = false
|
||||||
this.$message.warning(this.$t('The') + (i+1) + this.$t('submitted'))
|
this.$message.warning(this.$t('The') + (i + 1) + this.$t('submitted'))
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -604,6 +680,39 @@
|
|||||||
},
|
},
|
||||||
dateChange(item) {
|
dateChange(item) {
|
||||||
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
|
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
|
||||||
|
},
|
||||||
|
pdfPreview(fileQuery) {
|
||||||
|
let fileName = fileQuery.fileName
|
||||||
|
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=' + fileQuery.id))
|
||||||
|
} else if (fileSuffix == '.docx') {
|
||||||
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||||
|
window.open(url, '_blank')
|
||||||
|
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
||||||
|
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||||
|
window.open(url, '_blank')
|
||||||
|
} else {
|
||||||
|
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
|
||||||
|
}
|
||||||
|
},
|
||||||
|
download(item) {
|
||||||
|
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id })
|
||||||
|
},
|
||||||
|
clickButtonToUpload(item) {
|
||||||
|
this.loading = true
|
||||||
|
this.visibleFile = true
|
||||||
|
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dataSourceFile = res.result
|
||||||
|
this.loading = false
|
||||||
|
} else {
|
||||||
|
this.dataSourceFile = []
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user