修改禅道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
@@ -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 = []