功能系统维护对接
This commit is contained in:
@@ -1734,4 +1734,5 @@ module.exports = {
|
|||||||
gnxtwh:'Functional system maintenance',
|
gnxtwh:'Functional system maintenance',
|
||||||
gnxt:'Functional system',
|
gnxt:'Functional system',
|
||||||
dykzq:'Corresponding controller',
|
dykzq:'Corresponding controller',
|
||||||
|
nomorethan:'No more than 10',
|
||||||
}
|
}
|
||||||
@@ -1836,4 +1836,5 @@ module.exports = {
|
|||||||
gnxtwh:'功能系统维护',
|
gnxtwh:'功能系统维护',
|
||||||
gnxt:'功能系统',
|
gnxt:'功能系统',
|
||||||
dykzq:'对应控制器',
|
dykzq:'对应控制器',
|
||||||
|
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,8 @@ export default {
|
|||||||
url:{
|
url:{
|
||||||
addModel:''
|
addModel:''
|
||||||
},
|
},
|
||||||
record:{}
|
record:{},
|
||||||
|
type:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -182,13 +212,35 @@ 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.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
|
||||||
|
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 +261,22 @@ 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
|
||||||
}
|
}
|
||||||
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 +292,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 +382,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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user