修改禅道bug

This commit is contained in:
qq787203167
2022-05-06 11:54:06 +08:00
parent 1c9d6bb86f
commit f12d455df0
11 changed files with 228 additions and 83 deletions
+5 -8
View File
@@ -5,9 +5,12 @@
:visible="visible" :visible="visible"
:confirm-loading="confirmLoading" :confirm-loading="confirmLoading"
:maskClosable="false" :maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
> >
<template slot="footer">
<a-button key="back" @click="visible = false">
{{$t('cancel')}}
</a-button>
</template>
<a-table <a-table
class="table" class="table"
:columns="columns" :columns="columns"
@@ -79,12 +82,6 @@
this.pageNo = 1 this.pageNo = 1
this.bussLogList() this.bussLogList()
}, },
handleOk() {
this.visible = false
},
handleCancel() {
this.visible = false
},
onChange(page, pageSize) { onChange(page, pageSize) {
this.pageNo = page this.pageNo = page
this.bussLogList() this.bussLogList()
@@ -227,9 +227,12 @@
:width="600" :width="600"
:visible="visibleFile" :visible="visibleFile"
:maskClosable="false" :maskClosable="false"
@ok="visibleFile = false"
@cancel="visibleFile = false"
> >
<template slot="footer">
<a-button key="back" @click="visibleFile = false">
{{$t('cancel')}}
</a-button>
</template>
<a-table <a-table
class="table" class="table"
:columns="columnsFile" :columns="columnsFile"
@@ -239,7 +242,9 @@
:loading="loading" :loading="loading"
> >
<span slot="fileOperation" slot-scope="record"> <span slot="fileOperation" slot-scope="record">
<a class="text" @click="pdfPreview(record)"> <a class="text" @click="pdfPreview(record)"
:disabled="record.fileSuffix == '.pdf' || record.fileSuffix == '.docx'
|| record.fileSuffix == '.xlsx' || record.fileSuffix == '.xls' ? false : true">
{{$t('See')}} {{$t('See')}}
</a> </a>
<a class="text" @click="download(record)"> <a class="text" @click="download(record)">
@@ -351,6 +356,13 @@
getAction('document/bussDocumentLibraryEO/getFileInfos', { id: item.join(',') }).then((res) => { getAction('document/bussDocumentLibraryEO/getFileInfos', { id: item.join(',') }).then((res) => {
if (res.success) { if (res.success) {
this.dataSourceFile = res.result this.dataSourceFile = res.result
this.dataSourceFile.forEach((val) => {
let fileName = val.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
})
this.loading = false this.loading = false
} else { } else {
this.dataSourceFile = [] this.dataSourceFile = []
@@ -74,9 +74,9 @@
:title="$t('scopeOfApplication')">{{$t('scopeOfApplication')}}</span> :title="$t('scopeOfApplication')">{{$t('scopeOfApplication')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<!-- <a-input class="box-input"--> <!-- <a-input class="box-input"-->
<!-- :disabled="true"--> <!-- :disabled="true"-->
<!-- v-model="formInline.shi4Yong4Fan4Wei2_dictText"/>--> <!-- v-model="formInline.shi4Yong4Fan4Wei2_dictText"/>-->
<j-multi-select-tag class="box-input" v-model="formInline.shi4Yong4Fan4Wei2" <j-multi-select-tag class="box-input" v-model="formInline.shi4Yong4Fan4Wei2"
@input="handleInput('shi4Yong4Fan4Wei2')" @input="handleInput('shi4Yong4Fan4Wei2')"
:placeholder="$t('PleaseSelect')+$t('scopeOfApplication')" :placeholder="$t('PleaseSelect')+$t('scopeOfApplication')"
@@ -521,7 +521,29 @@
return { return {
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
rules: {}, rules: {
subtitle: [
{
max: 100,
message: this.$t('subtitle') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
wvtaId: [
{
max: 100,
message: 'WVTA ID' + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
remark: [
{
max: 300,
message: this.$t('remarks') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
]
},
formInline: {}, formInline: {},
disabled: false, disabled: false,
CategoryTreeList: [] CategoryTreeList: []
@@ -545,7 +567,7 @@
this.$nextTick(() => { this.$nextTick(() => {
this.formInline = item || {} this.formInline = item || {}
this.formInline.technologyTerritory = this.formInline.technologyTerritory ? this.formInline.technologyTerritory.split(',') : [] this.formInline.technologyTerritory = this.formInline.technologyTerritory ? this.formInline.technologyTerritory.split(',') : []
console.log(this.formInline.technologyTerritory) this.$refs.ruleForm.clearValidate()
}) })
}, },
clickButtonToUpload(item) { clickButtonToUpload(item) {
@@ -576,22 +598,26 @@
this.visible = false this.visible = false
}, },
handleSubmit() { handleSubmit() {
let formInline = JSON.parse(JSON.stringify(this.formInline)) this.$refs.ruleForm.validate(valid => {
Object.keys(formInline).forEach(res => { if (valid) {
if (formInline[res] && formInline[res] instanceof Array) { let formInline = JSON.parse(JSON.stringify(this.formInline))
formInline[res] = formInline[res].join(',') Object.keys(formInline).forEach(res => {
} if (formInline[res] && formInline[res] instanceof Array) {
}) formInline[res] = formInline[res].join(',')
this.confirmLoading = true }
postAction(this.url.editModel, formInline).then((res) => { })
if (res.success) { this.confirmLoading = true
this.$message.success(this.$t('OperationSuccessful')) postAction(this.url.editModel, formInline).then((res) => {
this.visible = false if (res.success) {
this.confirmLoading = false this.$message.success(this.$t('OperationSuccessful'))
this.$emit('editModelList') this.visible = false
} else { this.confirmLoading = false
this.$message.warning(this.$t('operationFailed')) this.$emit('editModelList')
this.confirmLoading = false } else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
} }
}) })
}, },
@@ -184,9 +184,12 @@
:width="600" :width="600"
:visible="visibleFile" :visible="visibleFile"
:maskClosable="false" :maskClosable="false"
@ok="visibleFile = false"
@cancel="visibleFile = false"
> >
<template slot="footer">
<a-button key="back" @click="visibleFile = false">
{{$t('cancel')}}
</a-button>
</template>
<a-table <a-table
class="table" class="table"
:columns="columnsFile" :columns="columnsFile"
@@ -196,7 +199,8 @@
:loading="loading" :loading="loading"
> >
<span slot="fileOperation" slot-scope="record"> <span slot="fileOperation" slot-scope="record">
<a class="text" @click="pdfPreview(record)"> <a class="text" @click="pdfPreview(record)" :disabled="record.fileSuffix == '.pdf' || record.fileSuffix == '.docx'
|| record.fileSuffix == '.xlsx' || record.fileSuffix == '.xls' ? false : true">
{{$t('See')}} {{$t('See')}}
</a> </a>
<a class="text" @click="download(record)"> <a class="text" @click="download(record)">
@@ -336,8 +340,8 @@
title: 'WVTA ID', title: 'WVTA ID',
align: 'center', align: 'center',
dataIndex: 'wvtaId', dataIndex: 'wvtaId',
width: 100, width: 180,
ellipsis: true scopedSlots: { customRender: 'titleName' }
}, },
{ {
title: this.$t('certificationType'), title: this.$t('certificationType'),
@@ -366,8 +370,8 @@
{ {
title: this.$t('remarks'), title: this.$t('remarks'),
align: 'center', align: 'center',
ellipsis: true, dataIndex: 'remark',
dataIndex: 'remark' scopedSlots: { customRender: 'titleName' }
}, },
{ {
@@ -568,7 +572,7 @@
}, },
//模板下载 //模板下载
handleModule() { handleModule() {
downloadFile(this.url.exportTemplate, this.$t('VirtualList')+this.$t('importTemplate')+'.xls', {}) downloadFile(this.url.exportTemplate, this.$t('VirtualList') + this.$t('importTemplate') + '.xls', {})
}, },
//导出 //导出
handleExport() { handleExport() {
@@ -579,7 +583,7 @@
ids: selectedRowKeys.join(','), ids: selectedRowKeys.join(','),
dummyInventoryBaseId: this.$route.query.id dummyInventoryBaseId: this.$route.query.id
} }
downloadFile(this.url.exportData, this.$route.query.name + this.$t('VirtualList')+'.zip', query, this.Deselect) downloadFile(this.url.exportData, this.$route.query.name + this.$t('VirtualList') + '.zip', query, this.Deselect)
}, },
Deselect() { Deselect() {
this.selectedRowKeys = [] this.selectedRowKeys = []
@@ -737,6 +741,13 @@
getAction('sys/common/getFileInfos', { id: item }).then((res) => { getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) { if (res.success) {
this.dataSourceFile = res.result this.dataSourceFile = res.result
this.dataSourceFile.forEach((val) => {
let fileName = val.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
})
this.loading = false this.loading = false
} else { } else {
this.dataSourceFile = [] this.dataSourceFile = []
@@ -30,9 +30,12 @@
:width="600" :width="600"
:visible="visibleFile" :visible="visibleFile"
:maskClosable="false" :maskClosable="false"
@ok="visibleFile = false"
@cancel="visibleFile = false"
> >
<template slot="footer">
<a-button key="back" @click="visibleFile = false">
{{$t('cancel')}}
</a-button>
</template>
<a-table <a-table
class="table" class="table"
:columns="columnsFile" :columns="columnsFile"
@@ -42,8 +45,10 @@
:loading="loading" :loading="loading"
> >
<span slot="fileOperation" slot-scope="record"> <span slot="fileOperation" slot-scope="record">
<a class="text" @click="pdfPreview(record)"> <a class="text" @click="pdfPreview(record)"
{{ $t('See') }} :disabled="record.fileSuffix == '.pdf' || record.fileSuffix == '.docx'
|| record.fileSuffix == '.xlsx' || record.fileSuffix == '.xls' ? false : true">
{{$t('See')}}
</a> </a>
<a class="text" @click="download(record)"> <a class="text" @click="download(record)">
{{ $t('download') }} {{ $t('download') }}
@@ -146,6 +151,13 @@
getAction('sys/common/getFileInfos', { id: item }).then((res) => { getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) { if (res.success) {
this.dataSourceFile = res.result this.dataSourceFile = res.result
this.dataSourceFile.forEach((val) => {
let fileName = val.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
})
this.loading = false this.loading = false
} else { } else {
this.dataSourceFile = [] this.dataSourceFile = []
@@ -44,9 +44,12 @@
:width="600" :width="600"
:visible="visibleFile" :visible="visibleFile"
:maskClosable="false" :maskClosable="false"
@ok="visibleFile = false"
@cancel="visibleFile = false"
> >
<template slot="footer">
<a-button key="back" @click="visibleFile = false">
{{$t('cancel')}}
</a-button>
</template>
<a-table <a-table
class="table" class="table"
:columns="columnsFile" :columns="columnsFile"
@@ -56,8 +59,10 @@
:loading="loading" :loading="loading"
> >
<span slot="fileOperation" slot-scope="record"> <span slot="fileOperation" slot-scope="record">
<a class="text" @click="pdfPreview(record)"> <a class="text" @click="pdfPreview(record)"
{{ $t('See') }} :disabled="record.fileSuffix == '.pdf' || record.fileSuffix == '.docx'
|| record.fileSuffix == '.xlsx' || record.fileSuffix == '.xls' ? false : true">
{{$t('See')}}
</a> </a>
<a class="text" @click="download(record)"> <a class="text" @click="download(record)">
{{ $t('download') }} {{ $t('download') }}
@@ -232,6 +237,13 @@
getAction('sys/common/getFileInfos', { id: item }).then((res) => { getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) { if (res.success) {
this.dataSourceFile = res.result this.dataSourceFile = res.result
this.dataSourceFile.forEach((val) => {
let fileName = val.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
})
this.loading = false this.loading = false
} else { } else {
this.dataSourceFile = [] this.dataSourceFile = []
@@ -187,6 +187,7 @@
<script> <script>
import PersonnelSelection from '@/components/PersonnelSelection/index' import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage' import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default { export default {
name: 'addModel', name: 'addModel',
@@ -271,6 +272,7 @@
this.getNameList() this.getNameList()
}, },
methods: { methods: {
...mapGetters(['userInfo']),
getNameList() { getNameList() {
getAction('project/projectNameInfoEO/list', {}).then((res) => { getAction('project/projectNameInfoEO/list', {}).then((res) => {
if (res.success) { if (res.success) {
@@ -284,6 +286,8 @@
this.visible = true this.visible = true
this.title = '新增' this.title = '新增'
this.formInline = {} this.formInline = {}
this.formInline.studioEngineerName = this.userInfo().username
this.formInline.studioEngineer = this.userInfo().id
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
}) })
@@ -5,9 +5,12 @@
:visible="visible" :visible="visible"
:confirm-loading="confirmLoading" :confirm-loading="confirmLoading"
:maskClosable="false" :maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
> >
<template slot="footer">
<a-button key="back" @click="visible = false">
{{$t('cancel')}}
</a-button>
</template>
<a-table <a-table
class="table" class="table"
:columns="columns" :columns="columns"
@@ -48,7 +51,7 @@
title: this.$t('finalizationTime'), title: this.$t('finalizationTime'),
dataIndex: 'createTime', dataIndex: 'createTime',
align: 'center', align: 'center',
ellipsis: true, ellipsis: true
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
@@ -66,12 +69,6 @@
this.visible = true this.visible = true
this.historicalList() this.historicalList()
}, },
handleOk() {
this.visible = false
},
handleCancel() {
this.visible = false
},
historicalList() { historicalList() {
let query = { let query = {
projectLibraryId: this.$route.query.id projectLibraryId: this.$route.query.id
@@ -176,8 +176,9 @@
<span class="title-text-text" <span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span> :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="areaOfResponsibility"> <a-form-model-item class="itemModel" prop="dutyTerritory">
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory" <j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
@change="dutyTerritoryChange"
:disabled="formInline.roleCode == 0 ? false : true" :disabled="formInline.roleCode == 0 ? false : true"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')" :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'" :type="'select'"
@@ -653,6 +654,29 @@
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
rules: {}, rules: {},
rulesData: {
subtitle: [
{
max: 100,
message: this.$t('subtitle') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
wvtaId: [
{
max: 100,
message: 'WVTA ID' + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
remark: [
{
max: 300,
message: this.$t('remarks') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
]
},
formInline: {}, formInline: {},
regulatoryEngineerList: [], regulatoryEngineerList: [],
engineeringInterfacePersonList: [], engineeringInterfacePersonList: [],
@@ -669,17 +693,26 @@
mounted() { mounted() {
}, },
methods: { methods: {
dutyTerritoryChange(event) {
this.formInline.regulationOwnerId = undefined
this.formInline.engineeringInterfacePerson = undefined
this.formInline.homologationEngineerId = undefined
this.queryPersonByProject(event)
},
queryPersonByProject(row) { queryPersonByProject(row) {
let query = { let query = {
projectId: this.$route.query.id, projectId: this.$route.query.id,
dutyTerritory: row.dutyTerritory dutyTerritory: row.dutyTerritory || row
} }
getAction(this.url.queryPersonByProject, query).then((res) => { getAction(this.url.queryPersonByProject, query).then((res) => {
if (res.success) { if (res.success) {
this.regulatoryEngineerList = res.result.lawEngineerList //法规工程师 this.regulatoryEngineerList = res.result.lawEngineerList //法规工程师
this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList //工程接口人 this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList //工程接口人
this.certificationEngineerList = res.result.certificationEngineerList //认证工程师 this.certificationEngineerList = res.result.certificationEngineerList //认证工程师
this.getData(row, res) if (row.dutyTerritory) {
this.getData(row, res)
}
} }
}) })
}, },
@@ -796,27 +829,29 @@
} }
this.$nextTick(() => { this.$nextTick(() => {
this.rules = {} this.rules = {}
this.$refs.ruleForm.clearValidate()
switch (item.roleCode) { switch (item.roleCode) {
case 0: case '0':
this.studioLogic() this.studioLogic()
break break
case 1: case '1':
this.statuteLogic() this.statuteLogic()
break break
case 2: case '2':
this.authenticationLogic() this.authenticationLogic()
break break
case 3: case '3':
this.engineeringLogic() this.engineeringLogic()
break break
case 4: case '4':
this.authenticationOrengineerLogic() this.authenticationOrengineerLogic()
break break
} }
}) })
}, },
studioLogic() { studioLogic() {
this.rules = { let rules = {
...this.rulesData,
attestationRank: [ attestationRank: [
{ {
required: true, required: true,
@@ -824,6 +859,13 @@
trigger: 'change' trigger: 'change'
} }
], ],
dutyTerritory: [
{
required: true,
message: this.$t('areaOfResponsibility') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
homologationEngineerId: [ homologationEngineerId: [
{ {
required: true, required: true,
@@ -846,12 +888,16 @@
} }
] ]
} }
this.$set(this, 'rules', rules)
console.log(this.rules)
}, },
statuteLogic() { statuteLogic() {
let rules = { ...this.rulesData }
this.$set(this, 'rules', rules)
}, },
authenticationLogic() { authenticationLogic() {
this.rules = { let rules = {
...this.rulesData,
attestationRank: [ attestationRank: [
{ {
required: true, required: true,
@@ -860,12 +906,15 @@
} }
] ]
} }
this.$set(this, 'rules', rules)
}, },
engineeringLogic() { engineeringLogic() {
let rules = { ...this.rulesData }
this.$set(this, 'rules', rules)
}, },
authenticationOrengineerLogic() { authenticationOrengineerLogic() {
let rules = { ...this.rulesData }
this.$set(this, 'rules', rules)
}, },
clickButtonToUpload(item) { clickButtonToUpload(item) {
this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.perentHandleFunc()
@@ -147,7 +147,7 @@
</a> </a>
</span> </span>
<span slot="titleName" slot-scope="text,record" :title="text"> <span slot="titleName" slot-scope="text,record" :title="text">
{{ text && text.length > 20 ? text.slice(0, 19) + '...' : text }} {{ text && text.length > 10 ? text.slice(0, 9) + '...' : text }}
</span> </span>
<span slot="designDeliverableTemplateName" slot-scope="text,record"> <span slot="designDeliverableTemplateName" slot-scope="text,record">
<span>{{ record.designDeliverableType_dictText }}</span><br v-if="record.designDeliverableType_dictText"> <span>{{ record.designDeliverableType_dictText }}</span><br v-if="record.designDeliverableType_dictText">
@@ -230,9 +230,12 @@
:width="600" :width="600"
:visible="visibleFile" :visible="visibleFile"
:maskClosable="false" :maskClosable="false"
@ok="visibleFile = false"
@cancel="visibleFile = false"
> >
<template slot="footer">
<a-button key="back" @click="visibleFile = false">
{{$t('cancel')}}
</a-button>
</template>
<a-table <a-table
class="table" class="table"
:columns="columnsFile" :columns="columnsFile"
@@ -242,8 +245,10 @@
:loading="loading" :loading="loading"
> >
<span slot="fileOperation" slot-scope="record"> <span slot="fileOperation" slot-scope="record">
<a class="text" @click="pdfPreview(record)"> <a class="text" @click="pdfPreview(record)"
{{ $t('See') }} :disabled="record.fileSuffix == '.pdf' || record.fileSuffix == '.docx'
|| record.fileSuffix == '.xlsx' || record.fileSuffix == '.xls' ? false : true">
{{$t('See')}}
</a> </a>
<a class="text" @click="download(record)"> <a class="text" @click="download(record)">
{{ $t('download') }} {{ $t('download') }}
@@ -368,7 +373,8 @@
title: 'WVTA ID', title: 'WVTA ID',
align: 'center', align: 'center',
dataIndex: 'wvtaId', dataIndex: 'wvtaId',
ellipsis: true width: 180,
scopedSlots: { customRender: 'titleName' }
}, },
{ {
title: this.$t('areaOfResponsibility'), title: this.$t('areaOfResponsibility'),
@@ -397,8 +403,8 @@
{ {
title: this.$t('remarks'), title: this.$t('remarks'),
align: 'center', align: 'center',
ellipsis: true, dataIndex: 'remark',
dataIndex: 'remark' scopedSlots: { customRender: 'titleName' }
}, },
{ {
title: this.$t('confirmationOfDesignConformity'), title: this.$t('confirmationOfDesignConformity'),
@@ -1017,6 +1023,13 @@
getAction('sys/common/getFileInfos', { id: item }).then((res) => { getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) { if (res.success) {
this.dataSourceFile = res.result this.dataSourceFile = res.result
this.dataSourceFile.forEach((val) => {
let fileName = val.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
})
this.loading = false this.loading = false
} else { } else {
this.dataSourceFile = [] this.dataSourceFile = []
@@ -95,9 +95,12 @@
:width="600" :width="600"
:visible="visibleFile" :visible="visibleFile"
:maskClosable="false" :maskClosable="false"
@ok="visibleFile = false"
@cancel="visibleFile = false"
> >
<template slot="footer">
<a-button key="back" @click="visibleFile = false">
{{$t('cancel')}}
</a-button>
</template>
<a-table <a-table
class="table" class="table"
:columns="columnsFile" :columns="columnsFile"
@@ -107,8 +110,10 @@
:loading="loading" :loading="loading"
> >
<span slot="fileOperation" slot-scope="record"> <span slot="fileOperation" slot-scope="record">
<a class="text" @click="pdfPreview(record)"> <a class="text" @click="pdfPreview(record)"
{{ $t('See') }} :disabled="record.fileSuffix == '.pdf' || record.fileSuffix == '.docx'
|| record.fileSuffix == '.xlsx' || record.fileSuffix == '.xls' ? false : true">
{{$t('See')}}
</a> </a>
<a class="text" @click="download(record)"> <a class="text" @click="download(record)">
{{ $t('download') }} {{ $t('download') }}
@@ -492,6 +497,13 @@
getAction('sys/common/getFileInfos', { id: item }).then((res) => { getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) { if (res.success) {
this.dataSourceFile = res.result this.dataSourceFile = res.result
this.dataSourceFile.forEach((val) => {
let fileName = val.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
val.fileSuffix = fileSuffix
})
this.loading = false this.loading = false
} else { } else {
this.dataSourceFile = [] this.dataSourceFile = []