修改禅道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"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<template slot="footer">
<a-button key="back" @click="visible = false">
{{$t('cancel')}}
</a-button>
</template>
<a-table
class="table"
:columns="columns"
@@ -79,12 +82,6 @@
this.pageNo = 1
this.bussLogList()
},
handleOk() {
this.visible = false
},
handleCancel() {
this.visible = false
},
onChange(page, pageSize) {
this.pageNo = page
this.bussLogList()
@@ -227,9 +227,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"
@@ -239,7 +242,9 @@
: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)">
@@ -351,6 +356,13 @@
getAction('document/bussDocumentLibraryEO/getFileInfos', { id: item.join(',') }).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 = []
@@ -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 = []
@@ -30,9 +30,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"
@@ -42,8 +45,10 @@
:loading="loading"
>
<span slot="fileOperation" slot-scope="record">
<a class="text" @click="pdfPreview(record)">
{{ $t('See') }}
<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)">
{{ $t('download') }}
@@ -146,6 +151,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 = []
@@ -44,9 +44,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"
@@ -56,8 +59,10 @@
:loading="loading"
>
<span slot="fileOperation" slot-scope="record">
<a class="text" @click="pdfPreview(record)">
{{ $t('See') }}
<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)">
{{ $t('download') }}
@@ -232,6 +237,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 = []
@@ -187,6 +187,7 @@
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default {
name: 'addModel',
@@ -271,6 +272,7 @@
this.getNameList()
},
methods: {
...mapGetters(['userInfo']),
getNameList() {
getAction('project/projectNameInfoEO/list', {}).then((res) => {
if (res.success) {
@@ -284,6 +286,8 @@
this.visible = true
this.title = '新增'
this.formInline = {}
this.formInline.studioEngineerName = this.userInfo().username
this.formInline.studioEngineer = this.userInfo().id
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
@@ -5,9 +5,12 @@
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<template slot="footer">
<a-button key="back" @click="visible = false">
{{$t('cancel')}}
</a-button>
</template>
<a-table
class="table"
:columns="columns"
@@ -48,7 +51,7 @@
title: this.$t('finalizationTime'),
dataIndex: 'createTime',
align: 'center',
ellipsis: true,
ellipsis: true
},
{
title: this.$t('operation'),
@@ -66,12 +69,6 @@
this.visible = true
this.historicalList()
},
handleOk() {
this.visible = false
},
handleCancel() {
this.visible = false
},
historicalList() {
let query = {
projectLibraryId: this.$route.query.id
@@ -176,8 +176,9 @@
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</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"
@change="dutyTerritoryChange"
:disabled="formInline.roleCode == 0 ? false : true"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
@@ -653,6 +654,29 @@
visible: false,
confirmLoading: false,
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: {},
regulatoryEngineerList: [],
engineeringInterfacePersonList: [],
@@ -669,17 +693,26 @@
mounted() {
},
methods: {
dutyTerritoryChange(event) {
this.formInline.regulationOwnerId = undefined
this.formInline.engineeringInterfacePerson = undefined
this.formInline.homologationEngineerId = undefined
this.queryPersonByProject(event)
},
queryPersonByProject(row) {
let query = {
projectId: this.$route.query.id,
dutyTerritory: row.dutyTerritory
dutyTerritory: row.dutyTerritory || row
}
getAction(this.url.queryPersonByProject, query).then((res) => {
if (res.success) {
this.regulatoryEngineerList = res.result.lawEngineerList //法规工程师
this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList //工程接口人
this.certificationEngineerList = res.result.certificationEngineerList //认证工程师
this.getData(row, res)
if (row.dutyTerritory) {
this.getData(row, res)
}
}
})
},
@@ -796,27 +829,29 @@
}
this.$nextTick(() => {
this.rules = {}
this.$refs.ruleForm.clearValidate()
switch (item.roleCode) {
case 0:
case '0':
this.studioLogic()
break
case 1:
case '1':
this.statuteLogic()
break
case 2:
case '2':
this.authenticationLogic()
break
case 3:
case '3':
this.engineeringLogic()
break
case 4:
case '4':
this.authenticationOrengineerLogic()
break
}
})
},
studioLogic() {
this.rules = {
let rules = {
...this.rulesData,
attestationRank: [
{
required: true,
@@ -824,6 +859,13 @@
trigger: 'change'
}
],
dutyTerritory: [
{
required: true,
message: this.$t('areaOfResponsibility') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
homologationEngineerId: [
{
required: true,
@@ -846,12 +888,16 @@
}
]
}
this.$set(this, 'rules', rules)
console.log(this.rules)
},
statuteLogic() {
let rules = { ...this.rulesData }
this.$set(this, 'rules', rules)
},
authenticationLogic() {
this.rules = {
let rules = {
...this.rulesData,
attestationRank: [
{
required: true,
@@ -860,12 +906,15 @@
}
]
}
this.$set(this, 'rules', rules)
},
engineeringLogic() {
let rules = { ...this.rulesData }
this.$set(this, 'rules', rules)
},
authenticationOrengineerLogic() {
let rules = { ...this.rulesData }
this.$set(this, 'rules', rules)
},
clickButtonToUpload(item) {
this.$refs.uploadFile.perentHandleFunc()
@@ -147,7 +147,7 @@
</a>
</span>
<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 slot="designDeliverableTemplateName" slot-scope="text,record">
<span>{{ record.designDeliverableType_dictText }}</span><br v-if="record.designDeliverableType_dictText">
@@ -230,9 +230,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"
@@ -242,8 +245,10 @@
:loading="loading"
>
<span slot="fileOperation" slot-scope="record">
<a class="text" @click="pdfPreview(record)">
{{ $t('See') }}
<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)">
{{ $t('download') }}
@@ -368,7 +373,8 @@
title: 'WVTA ID',
align: 'center',
dataIndex: 'wvtaId',
ellipsis: true
width: 180,
scopedSlots: { customRender: 'titleName' }
},
{
title: this.$t('areaOfResponsibility'),
@@ -397,8 +403,8 @@
{
title: this.$t('remarks'),
align: 'center',
ellipsis: true,
dataIndex: 'remark'
dataIndex: 'remark',
scopedSlots: { customRender: 'titleName' }
},
{
title: this.$t('confirmationOfDesignConformity'),
@@ -1017,6 +1023,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 = []
@@ -95,9 +95,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"
@@ -107,8 +110,10 @@
:loading="loading"
>
<span slot="fileOperation" slot-scope="record">
<a class="text" @click="pdfPreview(record)">
{{ $t('See') }}
<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)">
{{ $t('download') }}
@@ -492,6 +497,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 = []