修改禅道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
@@ -74,9 +74,9 @@
:title="$t('scopeOfApplication')">{{$t('scopeOfApplication')}}</span>
</div>
<a-form-model-item class="itemModel">
<!-- <a-input class="box-input"-->
<!-- :disabled="true"-->
<!-- v-model="formInline.shi4Yong4Fan4Wei2_dictText"/>-->
<!-- <a-input class="box-input"-->
<!-- :disabled="true"-->
<!-- v-model="formInline.shi4Yong4Fan4Wei2_dictText"/>-->
<j-multi-select-tag class="box-input" v-model="formInline.shi4Yong4Fan4Wei2"
@input="handleInput('shi4Yong4Fan4Wei2')"
:placeholder="$t('PleaseSelect')+$t('scopeOfApplication')"
@@ -521,7 +521,29 @@
return {
visible: 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: {},
disabled: false,
CategoryTreeList: []
@@ -545,7 +567,7 @@
this.$nextTick(() => {
this.formInline = item || {}
this.formInline.technologyTerritory = this.formInline.technologyTerritory ? this.formInline.technologyTerritory.split(',') : []
console.log(this.formInline.technologyTerritory)
this.$refs.ruleForm.clearValidate()
})
},
clickButtonToUpload(item) {
@@ -576,22 +598,26 @@
this.visible = false
},
handleSubmit() {
let formInline = JSON.parse(JSON.stringify(this.formInline))
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.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('editModelList')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
this.$refs.ruleForm.validate(valid => {
if (valid) {
let formInline = JSON.parse(JSON.stringify(this.formInline))
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.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('editModelList')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
})
},
@@ -184,9 +184,12 @@
:width="600"
:visible="visibleFile"
: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
class="table"
:columns="columnsFile"
@@ -196,7 +199,8 @@
:loading="loading"
>
<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')}}
</a>
<a class="text" @click="download(record)">
@@ -336,8 +340,8 @@
title: 'WVTA ID',
align: 'center',
dataIndex: 'wvtaId',
width: 100,
ellipsis: true
width: 180,
scopedSlots: { customRender: 'titleName' }
},
{
title: this.$t('certificationType'),
@@ -366,8 +370,8 @@
{
title: this.$t('remarks'),
align: 'center',
ellipsis: true,
dataIndex: 'remark'
dataIndex: 'remark',
scopedSlots: { customRender: 'titleName' }
},
{
@@ -568,7 +572,7 @@
},
//模板下载
handleModule() {
downloadFile(this.url.exportTemplate, this.$t('VirtualList')+this.$t('importTemplate')+'.xls', {})
downloadFile(this.url.exportTemplate, this.$t('VirtualList') + this.$t('importTemplate') + '.xls', {})
},
//导出
handleExport() {
@@ -579,7 +583,7 @@
ids: selectedRowKeys.join(','),
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() {
this.selectedRowKeys = []
@@ -737,6 +741,13 @@
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) {
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
} else {
this.dataSourceFile = []