|
@@ -49,6 +49,9 @@
|
|
|
@row-update="handleUpdate"
|
|
|
@row-save="handleSave"
|
|
|
@row-del="rowDel">
|
|
|
+ <template slot='stationCode' slot-scope="scope">
|
|
|
+ <span>{{ formatStationCode(scope.row) }}</span>
|
|
|
+ </template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button type="primary" size="small" icon="el-icon-edit" class="myButton"
|
|
|
@click.stop="handleEdit(row,index)">
|
|
@@ -123,17 +126,28 @@ export default {
|
|
|
let equipmentNo = this.findObject(this.tableOption.column, 'equipmentNo')
|
|
|
equipmentNo.rules = [{required: true, validator: _self.checkequipmentNo, trigger: 'blur'}]
|
|
|
/*场站添加change方法*/
|
|
|
- let stationCode = this.findObject(this.tableOption.column, 'stationCode')
|
|
|
- stationCode.change = (val)=>{
|
|
|
- if(val.value != ''){
|
|
|
- if(this.modId ==''){/*新增*/
|
|
|
- this.analyticUseOption(null,val.value)
|
|
|
- }else{/*编辑*/
|
|
|
- this.analyticUseOption(this.modId,val.value)
|
|
|
+ // let stationCode = this.findObject(this.tableOption.column, 'stationCode')
|
|
|
+ // stationCode.change = (val)=>{
|
|
|
+ // if(val.value != ''){
|
|
|
+ // if(this.modId ==''){/*新增*/
|
|
|
+ // this.analyticUseOption(null,val.value)
|
|
|
+ // }else{/*编辑*/
|
|
|
+ // this.analyticUseOption(this.modId,val.value)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ done()
|
|
|
+ },
|
|
|
+ formatStationCode(row) {
|
|
|
+ if (row.stationCode !== null) {
|
|
|
+ let b = ''
|
|
|
+ for (let i = 0; i < this.stationList.length; i++) {
|
|
|
+ if (row.stationCode === this.stationList[i].value) {
|
|
|
+ b += this.stationList[i].label
|
|
|
}
|
|
|
}
|
|
|
+ return b;
|
|
|
}
|
|
|
- done()
|
|
|
},
|
|
|
handleEdit(row, index) {
|
|
|
this.modId = row.id
|