Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly1
This commit is contained in:
commit
ed1ca1287b
@ -77,29 +77,24 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="" width="60">
|
<el-table-column label="" width="60">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button v-if="dataIndex === scope.$index" :id="constructionFillIn.domId" type="text" size="small" @click="saveData(scope.row, scope.$index)">保存</el-button>
|
||||||
<!-- :id="railFillInRegister.domId" -->
|
<!-- :id="railFillInRegister.domId" -->
|
||||||
<el-button v-if="dataIndex === scope.$index" type="text" size="small" @click="saveData(scope.row, scope.$index)">保存</el-button>
|
<!-- <el-button v-else type="text" size="small" @click="modifyData(scope.row, scope.$index)">修改</el-button> -->
|
||||||
<!-- :id="railFillInRegister.domId" -->
|
|
||||||
<el-button v-else type="text" size="small" @click="modifyData(scope.row, scope.$index)">修改</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
// equipmentConstructionFill
|
|
||||||
// equipmentConstructionQuery
|
|
||||||
// // a.保存:EQUIPMENT_CONSTRUCTION_INFO_SAVE
|
|
||||||
// // 参数:【下方实体字段,添加不要主键】
|
|
||||||
// // b.列表:EQUIPMENT_CONSTRUCTION_INFO_QUERY
|
|
||||||
// // 参数:stationCode【车站编码】
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
export default {
|
export default {
|
||||||
name:'EquipmentConstructionTable',
|
name:'EquipmentConstructionTable',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableData:[],
|
tableData:[],
|
||||||
isEdit:false,
|
isEditing:false, // 编辑中
|
||||||
|
// isAdd:false, // 是否添加
|
||||||
dataIndex: null
|
dataIndex: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -116,29 +111,41 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
add() {
|
add() {
|
||||||
const operate = {
|
if (!this.isEditing) {
|
||||||
start: true,
|
const operate = {
|
||||||
operation: this.constructionFill.constructionInput.operation
|
start: true,
|
||||||
};
|
operation: this.constructionFill.constructionInput.operation
|
||||||
this.$store.dispatch('trainingNew/next', operate).then(resp => {
|
|
||||||
const data = {
|
|
||||||
no: '', // 本月施工编号
|
|
||||||
projectName: '', // 施工项目
|
|
||||||
requestDate: '', // 请求施工登记时间
|
|
||||||
requestDetails: '', // 请求施工登记详情信息
|
|
||||||
planSpendTime:'', // 请求施工登记所需时间
|
|
||||||
acceptDetail:'', // 承认施工详情信息
|
|
||||||
confirmReviewDate:'', // 施工后开通检查确认、销记时间
|
|
||||||
confirmReviewDetail:'', // 施工后开通检查确认、销记详情
|
|
||||||
constructionOpenDetail:'', // 施工开通
|
|
||||||
remark:'' // 备注
|
|
||||||
};
|
};
|
||||||
this.dataIndex = this.tableData.length || 0;
|
this.$store.dispatch('trainingNew/next', operate).then(resp => {
|
||||||
this.tableData.push(data);
|
|
||||||
});
|
const data = {
|
||||||
|
no: '', // 本月施工编号
|
||||||
|
projectName: '', // 施工项目
|
||||||
|
requestDate: '', // 请求施工登记时间
|
||||||
|
requestDetails: '', // 请求施工登记详情信息
|
||||||
|
planSpendTime:'', // 请求施工登记所需时间
|
||||||
|
acceptDetail:'', // 承认施工详情信息
|
||||||
|
confirmReviewDate:'', // 施工后开通检查确认、销记时间
|
||||||
|
confirmReviewDetail:'', // 施工后开通检查确认、销记详情
|
||||||
|
constructionOpenDetail:'', // 施工开通
|
||||||
|
remark:'' // 备注
|
||||||
|
};
|
||||||
|
this.dataIndex = this.tableData.length || 0;
|
||||||
|
this.tableData.push(data);
|
||||||
|
this.isEditing = true;
|
||||||
|
this.isAdd = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
},
|
},
|
||||||
queryData() {
|
queryData() {
|
||||||
debugger;
|
const params = { stationCode: this.$store.state.training.roleDeviceCode};
|
||||||
|
commitOperate(menuOperate.Rail.equipmentConstructionQuery, params, 3).then(({valid, operate, response})=>{
|
||||||
|
this.tableData = response.data;
|
||||||
|
this.dataIndex = null;
|
||||||
|
}).catch(()=>{
|
||||||
|
this.$message.error('查询行车设备施工登记簿失败!');
|
||||||
|
});
|
||||||
},
|
},
|
||||||
numChange(val) {
|
numChange(val) {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -211,11 +218,25 @@ export default {
|
|||||||
this.$store.dispatch('trainingNew/next', operate);
|
this.$store.dispatch('trainingNew/next', operate);
|
||||||
},
|
},
|
||||||
saveData(data, index) {
|
saveData(data, index) {
|
||||||
|
// if (this.isAdd) {
|
||||||
|
const params = Object.assign({stationCode:this.$store.state.training.roleDeviceCode}, data);
|
||||||
|
commitOperate(menuOperate.Rail.equipmentConstructionFill, params, 3).then(({valid, operate})=>{
|
||||||
|
this.queryData();
|
||||||
|
this.isEditing = false;
|
||||||
|
this.isAdd = false;
|
||||||
|
}).catch(()=>{
|
||||||
|
this.$message.error('保存行车设备施工登记簿失败!');
|
||||||
|
});
|
||||||
|
// }
|
||||||
|
// }else{
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
},
|
|
||||||
modifyData(data, index) {
|
|
||||||
this.dataIndex = index;
|
|
||||||
}
|
}
|
||||||
|
// modifyData(data, index) {
|
||||||
|
// this.dataIndex = index;
|
||||||
|
// // this.isAdd = false;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user