修改
This commit is contained in:
@@ -188,6 +188,8 @@ import Year from '../common-vue/year.vue'
|
||||
import mixin from '@/mixins/mixin'
|
||||
import { dataMode, getCodeCommon } from '../common'
|
||||
import Radio from '../common-vue/radio.vue'
|
||||
import { getNxzdPower } from '@/api/api.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name:'dis',
|
||||
@@ -375,6 +377,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['cityIsNx']),
|
||||
showForm() {
|
||||
if(this.tidCid.taskId) {
|
||||
return false
|
||||
@@ -427,7 +430,7 @@ export default {
|
||||
created() {
|
||||
this.tidCid = JSON.parse(sessionStorage.getItem('tidCid'))
|
||||
},
|
||||
mounted() {
|
||||
async mounted() {
|
||||
this.$store.commit('pageData/GET_DIS', this.typeId)
|
||||
this.editData()
|
||||
},
|
||||
@@ -438,6 +441,18 @@ export default {
|
||||
this.clearData()
|
||||
},
|
||||
methods: {
|
||||
async getData(){
|
||||
let {code, data} = await getNxzdPower(this.tidCid.customerId)
|
||||
if(code==0){
|
||||
Object.keys(data).map(ele => {
|
||||
this.form[ele] = data[ele]
|
||||
})
|
||||
//电压等级
|
||||
this.getList()
|
||||
//变压器
|
||||
this.editDataTrName()
|
||||
}
|
||||
},
|
||||
changeTips () {
|
||||
this.tips0 = false
|
||||
if (Number(this.form.maxNeed) > Number(this.form.distributeCapacity)) {
|
||||
@@ -602,6 +617,9 @@ export default {
|
||||
for (const key in this.form) {
|
||||
this.form[key] = ''
|
||||
}
|
||||
if(this.cityIsNx){
|
||||
this.getData()
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user