2025修订内容更改
This commit is contained in:
@@ -8,13 +8,18 @@
|
||||
|
||||
<van-field v-model="trName" label="变压器类型" name="trName" required :rules="[{ required: true, message:'请至少选择一个变压器类型' }]" is-link input-align="right" placeholder="请选择" readonly @click="handelClcikTrShow = !showForm" />
|
||||
|
||||
<van-field v-input.numNo0 v-show="s15show" v-model="form.s15AboveNum" label="变压器S15及以上台数" type="number" required :rules="[{ required: s15show, message:'请输入变压器S15及以上台数' }]" label-width="180" input-align="right" placeholder="请输入" />
|
||||
<van-field v-input.numNo0 v-show="s14show" v-model="form.s14Num" label="变压器S14台数" type="number" required :rules="[{ required: s14show, message:'请输入变压器S14台数' }]" label-width="140" input-align="right" placeholder="请输入" />
|
||||
<van-field v-input.numNo0 v-show="s13show" v-model="form.s13Num" label="变压器S13台数" type="number" required :rules="[{ required: s13show, message:'请输入变压器S13台数' }]" label-width="140" input-align="right" placeholder="请输入" />
|
||||
<van-field v-input.numNo0 v-show="s12show" v-model="form.s12Num" label="变压器S12台数" type="number" required :rules="[{ required: s12show, message:'请输入变压器S12台数' }]" label-width="140" input-align="right" placeholder="请输入" />
|
||||
<van-field v-input.numNo0 v-show="s11show" v-model="form.s11Num" label="变压器S11台数" type="number" required :rules="[{ required: s11show, message:'请输入变压器S11台数' }]" label-width="140" input-align="right" placeholder="请输入" />
|
||||
<van-field v-input.numNo0 v-show="s10show" v-model="form.s10Num" label="变压器S10台数量" type="number" required :rules="[{ required: s10show, message:'请输入变压器S10台数量' }]" label-width="140" input-align="right" placeholder="请输入" />
|
||||
<van-field v-input.numNo0 v-show="s9show" v-model="form.s9Num" label="变压器S9台数" type="number" required :rules="[{ required: s9show, message:'请输入变压器S9台数' }]" label-width="140" input-align="right" placeholder="请输入" />
|
||||
<van-field v-input.numNo0 v-show="otherShow" v-model="form.otherNum" label="其他变压器数量" type="number" required :rules="[{ required: otherShow, message:'请输入其他变压器数量' }]" label-width="140" input-align="right" placeholder="请输入" />
|
||||
<van-field v-input.numNo0 v-show="s8show" v-model="form.s8Num" label="变压器S8台数" type="number" required :rules="[{ required: s8show, message:'请输入变压器S8台数' }]" label-width="140" input-align="right" placeholder="请输入" />
|
||||
<van-field v-input.numNo0 v-show="s7show" v-model="form.s7BelowNum" label="变压器S7及以下台数" type="number" required :rules="[{ required: s7show, message:'请输入变压器S7及以下台数' }]" label-width="180" input-align="right" placeholder="请输入" />
|
||||
<van-field v-input.numNo0 v-show="othershow" v-model="form.otherNum" label="其他变压器数量" type="number" required :rules="[{ required: othershow, message:'请输入其他变压器数量' }]" label-width="140" input-align="right" placeholder="请输入" />
|
||||
<van-field v-model="form.useYear" required :rules="[{ required: true, message:'请选择变压器最早投运年限' }]" label="变压器最早投运年限(年)" label-width="140" input-align="right" placeholder="请输入" is-link readonly @click="handelClickYear('useYear')" />
|
||||
<van-field label="变压器生产日期" v-model="form.produceDate" required :rules="[{ required: true }]" placeholder="请选择变压器生产日期" label-width="140" input-align="right" is-link readonly @click="datePicker = true" />
|
||||
|
||||
<van-field v-input.numNo0 v-model="form.distributeCapacity" label="总额定容量(kVA)" type="number" name="distributeCapacity" required :rules="[{ required: true, message:'请填写总额定容量' }]" label-width="100" input-align="right" placeholder="请输入" />
|
||||
|
||||
@@ -175,6 +180,10 @@
|
||||
|
||||
</VanPickerNew>
|
||||
|
||||
<!-- 年份选择 -->
|
||||
<van-popup v-model="datePicker" position="bottom">
|
||||
<van-datetime-picker v-model="currentDate" type="date" :max-date="maxDate" @confirm="onConfirmDate" @cancel="datePicker = false" />
|
||||
</van-popup>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
@@ -231,15 +240,20 @@ export default {
|
||||
distributeModiy: '', //是否进行过设备改造
|
||||
modifyMode: '', //改造方式
|
||||
modifyYear: '', //台区新增扩容改造年份
|
||||
s15AboveNum: '',
|
||||
s14Num: '',
|
||||
s13Num: '',
|
||||
s12Num: '',
|
||||
s11Num: '',
|
||||
s10Num: '',
|
||||
s9Num: '',
|
||||
s8Num: '',
|
||||
s7BelowNum: '',
|
||||
otherNum: '',
|
||||
useYear:'',
|
||||
makeModifyYear:'',
|
||||
addModifyYear:'',
|
||||
produceDate:''
|
||||
},
|
||||
//页面展示的中文名称
|
||||
formColumns: {
|
||||
@@ -257,15 +271,31 @@ export default {
|
||||
*/
|
||||
handelClcikTrShow: false,
|
||||
trName: '',
|
||||
s15show: false,
|
||||
s14show: false,
|
||||
s13show: false,
|
||||
s12show: false,
|
||||
s11show: false,
|
||||
s10show: false,
|
||||
s9show: false,
|
||||
otherShow: false,
|
||||
s8show: false,
|
||||
s7show: false,
|
||||
othershow: false,
|
||||
|
||||
//变压器类型数组
|
||||
trTypeList: [{
|
||||
// trTypeList: [],
|
||||
trTypeList: [
|
||||
{
|
||||
text: 's15',
|
||||
title:'s15AboveNum',
|
||||
value: '9',
|
||||
checked: false,
|
||||
},{
|
||||
text: 's14',
|
||||
title:'s14Num',
|
||||
value: '10',
|
||||
checked: false,
|
||||
},{
|
||||
text: 's13',
|
||||
title:'s13Num',
|
||||
value: '1',
|
||||
@@ -295,6 +325,18 @@ export default {
|
||||
value: '5',
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
text: 's8',
|
||||
title:'s8Num',
|
||||
value: '8',
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
text: 's7',
|
||||
title:'s7BelowNum',
|
||||
value: '7',
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
text: '其他',
|
||||
title:'otherNum',
|
||||
@@ -525,12 +567,16 @@ export default {
|
||||
this.handelClcikTrShow = false
|
||||
this.deviceTypeShow = false
|
||||
this.trName = ''
|
||||
this.s15show = false
|
||||
this.s14show = false
|
||||
this.s13show = false
|
||||
this.s12show = false
|
||||
this.s11show = false
|
||||
this.s10show = false
|
||||
this.s9show = false
|
||||
this.otherShow = false
|
||||
this.s8show = false
|
||||
this.s7show = false
|
||||
this.othershow = false
|
||||
this.v2Show = false
|
||||
this.resultTrList = []
|
||||
this.resultTrSpliceList = []
|
||||
@@ -634,126 +680,25 @@ export default {
|
||||
* editData变压器
|
||||
*/
|
||||
editDataTrName() {
|
||||
if (this.form.s13Num) {
|
||||
this.s13show = true
|
||||
this.resultTrList.push({
|
||||
text: 's13',
|
||||
title:'s13Num',
|
||||
value: '1',
|
||||
checked: true,
|
||||
})
|
||||
}
|
||||
|
||||
if (this.form.s12Num) {
|
||||
this.s12show = true
|
||||
this.resultTrList.push({
|
||||
text: 's12',
|
||||
title:'s12Num',
|
||||
value: '2',
|
||||
checked: true,
|
||||
})
|
||||
}
|
||||
|
||||
if (this.form.s11Num) {
|
||||
this.s11show = true
|
||||
this.resultTrList.push({
|
||||
text: 's11',
|
||||
title:'s11Num',
|
||||
value: '3',
|
||||
checked: true,
|
||||
})
|
||||
}
|
||||
|
||||
if (this.form.s10Num) {
|
||||
this.s10show = true
|
||||
this.resultTrList.push({
|
||||
text: 's10',
|
||||
title:'s10Num',
|
||||
value: '4',
|
||||
checked: true,
|
||||
})
|
||||
}
|
||||
|
||||
if (this.form.s9Num) {
|
||||
this.s9show = true
|
||||
this.resultTrList.push({
|
||||
text: 's9',
|
||||
title:'s9Num',
|
||||
value: '5',
|
||||
checked: true,
|
||||
})
|
||||
}
|
||||
|
||||
if (this.form.otherNum) {
|
||||
this.otherShow = true
|
||||
this.resultTrList.push({
|
||||
text: '其他',
|
||||
title:'otherNum',
|
||||
value: '6',
|
||||
checked: true,
|
||||
})
|
||||
}
|
||||
|
||||
if (!this.form.s13Num) {
|
||||
this.s13show = false
|
||||
this.resultTrSpliceList.push({
|
||||
text: 's13',
|
||||
title:'s13Num',
|
||||
value: '1',
|
||||
checked: false,
|
||||
})
|
||||
}
|
||||
|
||||
if (!this.form.s12Num) {
|
||||
this.s12show = false
|
||||
this.resultTrSpliceList.push({
|
||||
text: 's12',
|
||||
title:'s12Num',
|
||||
value: '2',
|
||||
checked: false,
|
||||
})
|
||||
}
|
||||
|
||||
if (!this.form.s11Num) {
|
||||
this.s11show = false
|
||||
this.resultTrSpliceList.push({
|
||||
text: 's11',
|
||||
title:'s11Num',
|
||||
value: '3',
|
||||
checked: false,
|
||||
})
|
||||
}
|
||||
|
||||
if (!this.form.s10Num) {
|
||||
this.s10show = false
|
||||
this.resultTrSpliceList.push({
|
||||
text: 's10',
|
||||
title:'s10Num',
|
||||
value: '4',
|
||||
checked: false,
|
||||
})
|
||||
}
|
||||
|
||||
if (!this.form.s9Num) {
|
||||
this.s9show = false
|
||||
this.resultTrSpliceList.push({
|
||||
text: 's9',
|
||||
title:'s9Num',
|
||||
value: '5',
|
||||
checked: false,
|
||||
})
|
||||
}
|
||||
|
||||
if (!this.form.otherNum) {
|
||||
this.otherShow = false
|
||||
this.resultTrSpliceList.push({
|
||||
text: '其他',
|
||||
title:'otherNum',
|
||||
value: '6',
|
||||
checked: false,
|
||||
})
|
||||
}
|
||||
this.trTypeList.map(item => {
|
||||
console.log(item, 'item');
|
||||
let key = item.value=='6'?'other':item.text
|
||||
console.log(key, this.form[key]);
|
||||
if(this.form[item.title]){
|
||||
this[key+'show'] = true
|
||||
this.resultTrList.push({...item,
|
||||
checked: true,
|
||||
})
|
||||
}else {
|
||||
this[key+'show'] = false
|
||||
this.resultTrSpliceList.push({...item,
|
||||
checked: false,
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
console.log(this.resultTrSpliceList, this.resultTrList, 'pppppppppppp');
|
||||
|
||||
this.trName = this.resultTrList.map((ele) => ele.text).join(',')
|
||||
this.form.transformerType = this.resultTrList.map((ele) => ele.value).join(',')
|
||||
|
||||
@@ -970,50 +915,23 @@ export default {
|
||||
this.trName = trName.map((ele)=> ele.text).join(',')
|
||||
this.form.transformerType = trName.map((ele)=> ele.value).join(',')
|
||||
this.resultTrList.forEach((v) => {
|
||||
if (v.text == 's13' && v.checked) {
|
||||
this.s13show = true
|
||||
}
|
||||
if (v.text == 's12' && v.checked) {
|
||||
this.s12show = true
|
||||
}
|
||||
if (v.text == 's11' && v.checked) {
|
||||
this.s11show = true
|
||||
}
|
||||
if (v.text == 's10' && v.checked) {
|
||||
this.s10show = true
|
||||
}
|
||||
if (v.text == 's9' && v.checked) {
|
||||
this.s9show = true
|
||||
}
|
||||
if (v.text == '其他' && v.checked) {
|
||||
this.otherShow = true
|
||||
}
|
||||
this.trTypeList.map(ele => {
|
||||
let key = ele.value=='6'?'other':ele.text
|
||||
if(v.text == ele.text&&v.checked){
|
||||
this[key+'show']=true
|
||||
}
|
||||
})
|
||||
})
|
||||
this.resultTrSpliceList.forEach((v) => {
|
||||
if (v.text == 's13' && !v.checked) {
|
||||
this.s13show = false
|
||||
this.form.s13Num = ''
|
||||
}
|
||||
if (v.text == 's12' && !v.checked) {
|
||||
this.s12show = false
|
||||
this.form.s12Num = ''
|
||||
}
|
||||
if (v.text == 's11' && !v.checked) {
|
||||
this.s11show = false
|
||||
this.form.s11Num = ''
|
||||
}
|
||||
if (v.text == 's10' && !v.checked) {
|
||||
this.s10show = false
|
||||
this.form.s10Num = ''
|
||||
}
|
||||
if (v.text == 's9' && !v.checked) {
|
||||
this.s9show = false
|
||||
this.form.s9Num = ''
|
||||
}
|
||||
if (v.text == '其他' && !v.checked) {
|
||||
this.otherShow = false
|
||||
this.form.otherNum = ''
|
||||
}
|
||||
|
||||
this.trTypeList.map(ele => {
|
||||
let key = ele.value=='6'?'other':ele.text
|
||||
if(v.text == ele.text&&!v.checked){
|
||||
this[key+'show']=false
|
||||
this.form[ele.title]=''
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
this.handelClcikTrShow = false
|
||||
@@ -1222,4 +1140,8 @@ export default {
|
||||
color: #ee0a24;
|
||||
font-size: 12px;
|
||||
}
|
||||
.content-main{
|
||||
height: calc(100% - 40px);
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user