Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
wangzhijiang
2023-03-29 11:13:07 +08:00
6 changed files with 114 additions and 34 deletions
+5
View File
@@ -1734,4 +1734,9 @@ module.exports = {
gnxtwh:'Functional system maintenance', gnxtwh:'Functional system maintenance',
gnxt:'Functional system', gnxt:'Functional system',
dykzq:'Corresponding controller', dykzq:'Corresponding controller',
releaseRegulatoryList:'Release of regulatory list',
preHomoFlow:'Pre-Homo flow',
verifyConformanceConfirmation:'Verify conformance confirmation',
designConformanceVerification:'Design conformance verification',
nomorethan:'No more than 10',
} }
+5
View File
@@ -1836,4 +1836,9 @@ module.exports = {
gnxtwh:'功能系统维护', gnxtwh:'功能系统维护',
gnxt:'功能系统', gnxt:'功能系统',
dykzq:'对应控制器', dykzq:'对应控制器',
releaseRegulatoryList:'法规清单发布',
preHomoFlow:'Pre-Homo流程',
verifyConformanceConfirmation:'验证符合性确认',
designConformanceVerification:'设计符合性确认',
nomorethan:'不能超过10个',
} }
@@ -28,7 +28,7 @@
> >
<span slot="detailText" slot-scope="text,record"> <span slot="detailText" slot-scope="text,record">
<span class="text" :title="text"> <span class="text" :title="text">
{{text && text.length > 10?text.slice(0,9)+'...':text}} {{text && text.length > 100?text.slice(0,99)+'...':text}}
</span> </span>
</span> </span>
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
@@ -58,7 +58,7 @@
</div> </div>
</a-drawer> </a-drawer>
<a-modal <a-modal
:title="$t('newlyAdded')" :title="title"
:width="600" :width="600"
:visible="visibleadd" :visible="visibleadd"
:confirm-loading="confirmLoading" :confirm-loading="confirmLoading"
@@ -66,7 +66,7 @@
@ok="handleaddOk" @ok="handleaddOk"
@cancel="handleaddCancel" @cancel="handleaddCancel"
> >
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm"> <a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm" style='margin-left: -40px'>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
@@ -75,32 +75,37 @@
<span class="title-text-text" :title="$t('gnxt')"> <span class="title-text-text" :title="$t('gnxt')">
{{$t('gnxt')}}</span> {{$t('gnxt')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="bazt"> <a-form-model-item class="itemModel" prop="gnxt">
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('gnxt')" <a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('gnxt')"
style='width: 80%;'
v-model="formInline.gnxt"></a-input> v-model="formInline.gnxt"></a-input>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<div v-for="(item,index) in formInline.dataList" :key="index"> <div v-for="(item,index) in formInline.dataList" :key="index">
<div class="header-text"> <div style='margin-left: 26px'>
{{$t('dykzq')}} <a-row :gutter="24" style='height:0px'>
<a-icon class="icon-text" @click="addClick(index)" type="plus-circle"/>
<a-icon class="icon-text" v-if="formInline.dataList.length > 1" @click="deleteClick(index)"
type="minus-circle" :disabled="disabled"/>
</div>
<div style='margin-left: 25px'>
<a-row :gutter="24">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" :title="$t('dykzq') + (index+1)">{{$t('dykzq') + (index+1)}}</span> <span class="title-text-text" :title="$t('dykzq') + (index+1)">{{$t('dykzq') + (index+1)}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel"
:prop="'dataList.'+index+'.dykzq'"
:rules="[{ required: true, message: $t('dykzq') + $t('cannotEmpty'), trigger: 'blur'},
{max: 50,message: $t('relevantSections') + $t('cannotExceed') + 50 + $t('Characters'),trigger: 'blur'
}]">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="item.dykzq" v-model="item.dykzq"
style='width: 87%;'
:placeholder="$t('PleaseEnter')+$t('dykzq')"/> :placeholder="$t('PleaseEnter')+$t('dykzq')"/>
</a-form-model-item> </a-form-model-item>
<div class="header-text">
<a-icon class="icon-text" @click="addClick(index)" type="plus-circle"/>
<a-icon class="icon-text" v-if="formInline.dataList.length > 1" @click="deleteClick(index)"
type="minus-circle" :disabled="disabled"/>
</div>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@@ -115,7 +120,7 @@
</template> </template>
<script> <script>
import { getAction, postAction ,deleteAction } from '@/api/manage' import { getAction, postAction ,deleteAction, putAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file' import uploadFile from '@/components/uploadFile/file'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@@ -128,6 +133,7 @@ export default {
return { return {
loading: false, loading: false,
dataSourcehistory:[], dataSourcehistory:[],
title:'',
columnshistory: [ columnshistory: [
{ {
title: this.$t('gnxt'), title: this.$t('gnxt'),
@@ -142,18 +148,34 @@ export default {
dataIndex: 'dykzq', dataIndex: 'dykzq',
align: 'left', align: 'left',
ellipsis: true, ellipsis: true,
width: 100,
scopedSlots: { customRender: 'detailText' } scopedSlots: { customRender: 'detailText' }
}, },
{ {
title: this.$t('operation'), title: this.$t('operation'),
align: 'left', align: 'left',
fixed: 'right', fixed: 'right',
width: 220, width: 100,
scopedSlots: { customRender: 'operation' } scopedSlots: { customRender: 'operation' }
} }
], ],
rules:[], rules: {
gnxt: [
{
required: true,
message: this.$t('gnxt') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{max: 50,message: this.$t('relevantSections') + this.$t('cannotExceed') + 50 + this.$t('Characters'),trigger: 'blur'
}
],
// dykzq: [
// {
// required: true,
// message: this.$t('dykzq') + this.$t('cannotEmpty'),
// trigger: 'blur'
// }
// ],
},
pageSizehistory: 10, pageSizehistory: 10,
total: 0, total: 0,
pageNohistory: 1, pageNohistory: 1,
@@ -161,7 +183,14 @@ export default {
visibleadd: false, visibleadd: false,
disabled: false, disabled: false,
showButton:false, showButton:false,
formInline: {}, formInline: {
dataList:[
{
dykzq:'',
}
],
gnxt:''
},
confirmLoading: false, confirmLoading: false,
acceptcode:'', acceptcode:'',
projectNameList: [], projectNameList: [],
@@ -169,7 +198,9 @@ export default {
url:{ url:{
addModel:'' addModel:''
}, },
record:{} record:{},
type:'',
id:'',
} }
}, },
mounted() { mounted() {
@@ -182,13 +213,37 @@ export default {
this.bussLogList() this.bussLogList()
}, },
addHandleClick(){ addHandleClick(){
this.title = this.$t('add')
this.type = 'add'
this.visibleadd = true this.visibleadd = true
this.formInline.gnxt = ''
this.id = ''
this.formInline.dataList = [{}] this.formInline.dataList = [{}]
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
}, },
editClick(){ editClick(item){
this.title = this.$t('edit')
this.type = 'edit'
this.formInline.gnxt = item.gnxt
this.id = item.id
let List = item.dykzq.split(',')
let arr = []
List.forEach((item,index)=>{
arr.push({dykzq:List[index]})
})
this.formInline.dataList = arr
this.visibleadd = true
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
}, },
addClick(index){ addClick(index){
if(this.formInline.dataList.length + 1 > 10){
this.$message.warning(this.$t('nomorethan'))
return
}
this.formInline.dataList.splice(index + 1, 0, {}) this.formInline.dataList.splice(index + 1, 0, {})
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
}, },
@@ -209,13 +264,23 @@ export default {
dykzqList.push(item.dykzq) dykzqList.push(item.dykzq)
}) })
this.formInline.dykzq = dykzqList.join(',') this.formInline.dykzq = dykzqList.join(',')
let url = ''
let action = ''
if(this.type == 'add'){
url = 'ota/otaBaSjGnxtwh/add'
action = postAction
}else{
url = 'ota/otaBaSjGnxtwh/edit'
action = putAction
}
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
let query = { let query = {
...this.formInline ...this.formInline,
id:this.id
} }
this.confirmLoading = true this.confirmLoading = true
postAction('ota/otaBaSjGnxtwh/add', query).then((res) => { action(url, query).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.visibleadd = false this.visibleadd = false
@@ -231,6 +296,7 @@ export default {
}, },
handleaddCancel() { handleaddCancel() {
this.visibleadd = false this.visibleadd = false
this.formInline = {}
}, },
onChangehistory(page, pageSize) { onChangehistory(page, pageSize) {
this.pageNohistory = page this.pageNohistory = page
@@ -320,6 +386,10 @@ export default {
} }
.header-text { .header-text {
position: relative;
top: 11px;
left: -70px;
width: 55px;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
} }
@@ -22,7 +22,7 @@
style="margin-bottom: 20px" style="margin-bottom: 20px"
> >
<span slot="functionname" slot-scope="text,record"> <span slot="functionname" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.gnmc" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.gnmc" :max-length="50"></a-input>
</span> </span>
<!-- 配置情况--> <!-- 配置情况-->
<span slot="configuration" slot-scope="text,record" > <span slot="configuration" slot-scope="text,record" >
@@ -21,7 +21,7 @@
style="margin-bottom: 20px" style="margin-bottom: 20px"
> >
<span slot="sys" slot-scope="text,record"> <span slot="sys" slot-scope="text,record">
<a-input :placeholder="$t('pleaseEnter')" v-model="record.xtlb" :max-length="500"></a-input> <a-input :placeholder="$t('pleaseEnter')" v-model="record.xtlb" :max-length="50"></a-input>
</span> </span>
<!-- 可升级--> <!-- 可升级-->
<span slot="systemclass" slot-scope="text,record"> <span slot="systemclass" slot-scope="text,record">
@@ -124,24 +124,24 @@
}, },
toggleSearchStatus: false, toggleSearchStatus: false,
taskTypeList: [ taskTypeList: [
// {
// name: this.$t('confirmationOfRegulationsList'),
// value: '10'
// },
{ {
name: this.$t('confirmationOfRegulationsList'), name: this.$t('releaseRegulatoryList'),
value: '10' value: '10'
}, },
{ {
name: this.$t('listTaskConfirmation'), name: this.$t('designConformanceVerification'),
value: '1'
},
{
name: this.$t('designComplianceReview'),
value: '2' value: '2'
}, },
{ {
name: this.$t('preHomeConfirmation'), name: this.$t('preHomoFlow'),
value: '3' value: '21'
}, },
{ {
name: this.$t('verificationComplianceReview'), name: this.$t('verifyConformanceConfirmation'),
value: '4' value: '4'
} }
], ],