Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly
This commit is contained in:
commit
b94a5d4842
@ -4668,40 +4668,242 @@ export const OperationEvent = {
|
||||
}
|
||||
}
|
||||
},
|
||||
FloodSafetyRegister: { // 薄册--防洪安全上岗签到表
|
||||
tabType: {
|
||||
typeChange: {
|
||||
operation: 'd000',
|
||||
domId: '_Tips-FloodSafetyRegister-tabType-typeChange'
|
||||
}
|
||||
},
|
||||
formInput: {
|
||||
submit: {
|
||||
operation: 'd001',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-submit'
|
||||
},
|
||||
update: {
|
||||
operation: 'd002',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-update'
|
||||
},
|
||||
stationCode: {
|
||||
operation: 'd003',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationCode'
|
||||
},
|
||||
supervisor: {
|
||||
operation: 'd004',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-supervisor'
|
||||
},
|
||||
signDateStr: {
|
||||
operation: 'd005',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-signDateStr'
|
||||
},
|
||||
supervisorNoticeInfoReporter: {
|
||||
operation: 'd006',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoReporter'
|
||||
},
|
||||
supervisorNoticeInfoNoticeStationTime: {
|
||||
operation: 'd007',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoNoticeStationTime'
|
||||
},
|
||||
supervisorNoticeInfoNoticeModel: {
|
||||
operation: 'd008',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoNoticeModel'
|
||||
},
|
||||
supervisorNoticeInfoHazardCategory: {
|
||||
operation: 'd009',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoHazardCategory'
|
||||
},
|
||||
supervisorNoticeInfoRainfallLevel: {
|
||||
operation: 'd0010',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoRainfallLevel'
|
||||
},
|
||||
supervisorNoticeInfoNoticeStationMasterTime: {
|
||||
operation: 'd0011',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoNoticeStationMasterTime'
|
||||
},
|
||||
supervisorNoticeInfoStationMasterArrivalTime: {
|
||||
operation: 'd0012',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoStationMasterArrivalTime'
|
||||
},
|
||||
supervisorNoticeInfoStationMasterSign: {
|
||||
operation: 'd0013',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoStationMasterSign'
|
||||
},
|
||||
supervisorNoticeInfoOccurredSite: {
|
||||
operation: 'd0014',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoOccurredSite'
|
||||
},
|
||||
supervisorNoticeInfoDrivingRequirement: {
|
||||
operation: 'd0015',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-supervisorNoticeInfoDrivingRequirement'
|
||||
},
|
||||
stationMasterNoticeListDepartment0: {
|
||||
operation: 'd0016',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListDepartment0'
|
||||
},
|
||||
stationMasterNoticeListReceiver0: {
|
||||
operation: 'd0017',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListReceiver0'
|
||||
},
|
||||
stationMasterNoticeListNoticeTime0: {
|
||||
operation: 'd0018',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeTime0'
|
||||
},
|
||||
stationMasterNoticeListNoticeModel0: {
|
||||
operation: 'd0019',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeModel0'
|
||||
},
|
||||
stationMasterNoticeListRemark0: {
|
||||
operation: 'd0020',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListRemark0'
|
||||
},
|
||||
stationMasterNoticeListDepartment1: {
|
||||
operation: 'd0021',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListDepartment1'
|
||||
},
|
||||
stationMasterNoticeListReceiver1: {
|
||||
operation: 'd0022',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListReceiver1'
|
||||
},
|
||||
stationMasterNoticeListNoticeTime1: {
|
||||
operation: 'd0023',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeTime1'
|
||||
},
|
||||
stationMasterNoticeListNoticeModel1: {
|
||||
operation: 'd0024',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeModel1'
|
||||
},
|
||||
stationMasterNoticeListRemark1: {
|
||||
operation: 'd0025',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListRemark1'
|
||||
},
|
||||
stationMasterNoticeListDepartment2: {
|
||||
operation: 'd0026',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListDepartment2'
|
||||
},
|
||||
stationMasterNoticeListReceiver2: {
|
||||
operation: 'd0027',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListReceiver2'
|
||||
},
|
||||
stationMasterNoticeListNoticeTime2: {
|
||||
operation: 'd0028',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeTime2'
|
||||
},
|
||||
stationMasterNoticeListNoticeModel2: {
|
||||
operation: 'd0029',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListNoticeModel2'
|
||||
},
|
||||
stationMasterNoticeListRemark2: {
|
||||
operation: 'd0030',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-stationMasterNoticeListRemark2'
|
||||
},
|
||||
workerSignInfoListDepartment0: {
|
||||
operation: 'd0031',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListDepartment0'
|
||||
},
|
||||
workerSignInfoListArriveTime0: {
|
||||
operation: 'd0032',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListArriveTime0'
|
||||
},
|
||||
workerSignInfoListAppointment0: {
|
||||
operation: 'd0033',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListAppointment0'
|
||||
},
|
||||
workerSignInfoListTelephone0: {
|
||||
operation: 'd0034',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListTelephone0'
|
||||
},
|
||||
workerSignInfoListSign0: {
|
||||
operation: 'd0035',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListSign0'
|
||||
},
|
||||
workerSignInfoListReturnTime0: {
|
||||
operation: 'd0036',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListReturnTime0'
|
||||
},
|
||||
workerSignInfoListDepartment1: {
|
||||
operation: 'd0037',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListDepartment1'
|
||||
},
|
||||
workerSignInfoListArriveTime1: {
|
||||
operation: 'd0038',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListArriveTime1'
|
||||
},
|
||||
workerSignInfoListAppointment1: {
|
||||
operation: 'd0039',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListAppointment1'
|
||||
},
|
||||
workerSignInfoListTelephone1: {
|
||||
operation: 'd0040',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListTelephone1'
|
||||
},
|
||||
workerSignInfoListSign1: {
|
||||
operation: 'd0041',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListSign1'
|
||||
},
|
||||
workerSignInfoListReturnTime1: {
|
||||
operation: 'd0042',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListReturnTime1'
|
||||
},
|
||||
workerSignInfoListDepartment2: {
|
||||
operation: 'd0043',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListDepartment2'
|
||||
},
|
||||
workerSignInfoListArriveTime2: {
|
||||
operation: 'd0044',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListArriveTime2'
|
||||
},
|
||||
workerSignInfoListAppointment2: {
|
||||
operation: 'd0045',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListAppointment2'
|
||||
},
|
||||
workerSignInfoListTelephone2: {
|
||||
operation: 'd0046',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListTelephone2'
|
||||
},
|
||||
workerSignInfoListSign2: {
|
||||
operation: 'd0047',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListSign2'
|
||||
},
|
||||
workerSignInfoListReturnTime2: {
|
||||
operation: 'd0048',
|
||||
domId: '_Tips-FloodSafetyRegister-formInput-workerSignInfoListReturnTime2'
|
||||
}
|
||||
}
|
||||
},
|
||||
Psl: {
|
||||
standChange: {
|
||||
change: {
|
||||
operation: 'c001',
|
||||
operation: 'e001',
|
||||
domId: '_Tips-Psl-standChange-Change'
|
||||
}
|
||||
},
|
||||
pslOperation: {
|
||||
turn: {
|
||||
operation: 'c002',
|
||||
operation: 'e002',
|
||||
domId: '_Tips-Psl-pslOperation-Turn'
|
||||
}
|
||||
},
|
||||
hsjcOperation: {
|
||||
turn: {
|
||||
operation: 'c003',
|
||||
operation: 'e003',
|
||||
domId: '_Tips-Psl-hsjcOperation-Turn'
|
||||
}
|
||||
},
|
||||
openDoor: {
|
||||
button: {
|
||||
operation: 'c004',
|
||||
operation: 'e004',
|
||||
domId: '_Tips-Psl-openDoor-Button'
|
||||
}
|
||||
},
|
||||
closeDoor: {
|
||||
button: {
|
||||
operation: 'c005',
|
||||
operation: 'e005',
|
||||
domId: '_Tips-Psl-closeDoor-Button'
|
||||
}
|
||||
},
|
||||
testLamp: {
|
||||
button: {
|
||||
operation: 'c006',
|
||||
operation: 'e006',
|
||||
domId: '_Tips-Psl-testLamp-Button'
|
||||
}
|
||||
}
|
||||
@ -4709,13 +4911,13 @@ export const OperationEvent = {
|
||||
Ibp: {
|
||||
buttonPressed: {
|
||||
button: {
|
||||
operation: 'd001',
|
||||
operation: 'f001',
|
||||
domId: '_Tips-Ibp-buttonPressed-Button'
|
||||
}
|
||||
},
|
||||
buttonRelease: {
|
||||
button: {
|
||||
operation: 'd002',
|
||||
operation: 'f002',
|
||||
domId: '_Tips-Ibp-buttonRelease-Button'
|
||||
}
|
||||
}
|
||||
|
@ -46,29 +46,29 @@
|
||||
<td colspan="2" align="center">
|
||||
<p>通知干部上岗
|
||||
<br>
|
||||
<el-input :id="formInput.noticeCadresTimeHour.domId" v-model="form.noticeCadresTime.hour" oninput="value=value.replace(/[^\d]/g,'')" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('noticeCadresTime', 'hour')" />时
|
||||
<el-input :id="formInput.noticeCadresTimeMinute.domId" v-model="form.noticeCadresTime.minute" oninput="value=value.replace(/[^\d]/g,'')" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('noticeCadresTime', 'minute')" />分
|
||||
<el-input :id="formInput.noticeCadresTimeHour.domId" v-model="form.noticeCadresTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('noticeCadresTime', 'hour')" @input="changeInputMaxVal($event, form.noticeCadresTime, 'hour', 23)" />时
|
||||
<el-input :id="formInput.noticeCadresTimeMinute.domId" v-model="form.noticeCadresTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('noticeCadresTime', 'minute')" @input="changeInputMaxVal($event, form.noticeCadresTime, 'minute', 59)" />分
|
||||
</p>
|
||||
</td>
|
||||
<td colspan="2" align="center">
|
||||
<p>报告列车调度员
|
||||
<br>
|
||||
<el-input :id="formInput.reportDispatcherTimeHour.domId" v-model="form.reportDispatcherTime.hour" oninput="value=value.replace(/[^\d]/g,'')" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportDispatcherTime', 'hour')" />时
|
||||
<el-input :id="formInput.reportDispatcherTimeMinute.domId" v-model="form.reportDispatcherTime.minute" oninput="value=value.replace(/[^\d]/g,'')" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportDispatcherTime', 'minute')" />分
|
||||
<el-input :id="formInput.reportDispatcherTimeHour.domId" v-model="form.reportDispatcherTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportDispatcherTime', 'hour')" @input="changeInputMaxVal($event, form.reportDispatcherTime, 'hour', 23)" />时
|
||||
<el-input :id="formInput.reportDispatcherTimeMinute.domId" v-model="form.reportDispatcherTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportDispatcherTime', 'minute')" @input="changeInputMaxVal($event, form.reportDispatcherTime, 'minute', 59)" />分
|
||||
</p>
|
||||
</td>
|
||||
<td colspan="2" align="center">
|
||||
<p>报告指挥中心
|
||||
<br>
|
||||
<el-input :id="formInput.reportCommandCentreTimeHour.domId" v-model="form.reportCommandCentreTime.hour" oninput="value=value.replace(/[^\d]/g,'')" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportCommandCentreTime', 'hour')" />时
|
||||
<el-input :id="formInput.reportCommandCentreTimeMinute.domId" v-model="form.reportCommandCentreTime.minute" oninput="value=value.replace(/[^\d]/g,'')" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportCommandCentreTime', 'minute')" />分
|
||||
<el-input :id="formInput.reportCommandCentreTimeHour.domId" v-model="form.reportCommandCentreTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportCommandCentreTime', 'hour')" @input="changeInputMaxVal($event, form.reportCommandCentreTime, 'hour', 23)" />时
|
||||
<el-input :id="formInput.reportCommandCentreTimeMinute.domId" v-model="form.reportCommandCentreTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('reportCommandCentreTime', 'minute')" @input="changeInputMaxVal($event, form.reportCommandCentreTime, 'minute', 59)" />分
|
||||
</p>
|
||||
</td>
|
||||
<td colspan="2" align="center">
|
||||
<p>监控干部到岗
|
||||
<br>
|
||||
<el-input :id="formInput.monitorArriveTimeHour.domId" v-model="form.monitorArriveTime.hour" oninput="value=value.replace(/[^\d]/g,'')" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('monitorArriveTime', 'hour')" />时
|
||||
<el-input :id="formInput.monitorArriveTimeMinute.domId" v-model="form.monitorArriveTime.minute" oninput="value=value.replace(/[^\d]/g,'')" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('monitorArriveTime', 'minute')" />分
|
||||
<el-input :id="formInput.monitorArriveTimeHour.domId" v-model="form.monitorArriveTime.hour" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('monitorArriveTime', 'hour')" @input="changeInputMaxVal($event, form.monitorArriveTime, 'hour', 23)" />时
|
||||
<el-input :id="formInput.monitorArriveTimeMinute.domId" v-model="form.monitorArriveTime.minute" oninput="value=value.replace(/[^\d]/g,''); value=value.slice(0, 2)" size="mini" class="timeInput" :disabled="!isCreat" @blur="blurChange('monitorArriveTime', 'minute')" @input="changeInputMaxVal($event, form.monitorArriveTime, 'minute', 59)" />分
|
||||
</p>
|
||||
</td>
|
||||
<td colspan="2" align="center">
|
||||
@ -158,6 +158,7 @@
|
||||
<script>
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
export default {
|
||||
name: 'ControlTable',
|
||||
props: {
|
||||
@ -180,6 +181,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
stationCode() {
|
||||
return this.$store.state.training.roleDeviceCode;
|
||||
},
|
||||
@ -195,6 +199,11 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeInputMaxVal(val, obj, key, max) {
|
||||
if (val > max) {
|
||||
this.$set(obj, key, `${max}`);
|
||||
}
|
||||
},
|
||||
listChange(key, index) {
|
||||
const val = this.form.registerInfoList[index][key];
|
||||
const operate = {
|
||||
@ -247,26 +256,37 @@ export default {
|
||||
return list;
|
||||
},
|
||||
getInfoData() {
|
||||
Object.keys(this.info).forEach(key => {
|
||||
this.form[key] = this.info[key];
|
||||
});
|
||||
const obj = deepAssign({}, this.info);
|
||||
this.form = obj;
|
||||
},
|
||||
submit() {
|
||||
const obj = deepAssign({}, this.form);
|
||||
const list = [];
|
||||
delete obj.id;
|
||||
obj.stationCode = this.stationCode;
|
||||
obj.registerInfoList.forEach(item => {
|
||||
const s = Object.values(item).every(ii => {
|
||||
return !ii;
|
||||
});
|
||||
if (!s) {
|
||||
list.push(item);
|
||||
// const list = [];
|
||||
// obj.registerInfoList.forEach(item => {
|
||||
// const s = Object.values(item).every(ii => {
|
||||
// return !ii;
|
||||
// });
|
||||
// if (!s) {
|
||||
// list.push(item);
|
||||
// }
|
||||
// });
|
||||
// obj.registerInfoList = list;
|
||||
const operate = {
|
||||
operation: this.formInput.submit.operation,
|
||||
param: obj
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
sendCommandNew(this.group, 'KEY_LINK_CONTROL_INFO_SAVE', obj).then((res) => {
|
||||
console.log(res, '---res');
|
||||
this.initFormData();
|
||||
}).catch(error => {
|
||||
this.$messageBox('提交失败:' + error.message);
|
||||
});
|
||||
}
|
||||
});
|
||||
obj.registerInfoList = list;
|
||||
this.$emit('creat', obj);
|
||||
this.initFormData();
|
||||
},
|
||||
initFormData() {
|
||||
this.form = {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-tabs :id="typeChange.domId" v-model="activeName" type="card" @tab-click="tabClick">
|
||||
<el-tab-pane label="填写" name="write">
|
||||
<div ref="writeTabPane" class="write-box" :style="{height: boxHeight + 'px'}">
|
||||
<ControlTable :is-creat="true" @creat="creatData" />
|
||||
<ControlTable :is-creat="true" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="查询" name="search">
|
||||
@ -77,22 +77,6 @@ export default {
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate);
|
||||
},
|
||||
creatData(obj) {
|
||||
const operate = {
|
||||
operation: this.formInput.submit.operation,
|
||||
param: obj,
|
||||
userOperationType: UserOperationType.LEFTCLICK
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
sendCommandNew(this.group, 'KEY_LINK_CONTROL_INFO_SAVE', obj).then((res) => {
|
||||
console.log(res, '---res');
|
||||
}).catch(error => {
|
||||
this.$messageBox('提交失败:' + error.message);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
getSearchList() {
|
||||
const params = { stationCode: this.$store.state.training.roleDeviceCode};
|
||||
sendCommandNew(this.group, 'KEY_LINK_CONTROL_INFO_QUERY', params).then((res) => {
|
||||
@ -112,6 +96,7 @@ export default {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
}
|
||||
.search-box {
|
||||
overflow: auto;
|
||||
|
@ -1,15 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
防洪安全上岗签到表
|
||||
<div class="FloodControlSafetyTable">
|
||||
<!-- -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss">
|
||||
.FloodControlSafetyTable{
|
||||
|
||||
}
|
||||
</style>
|
||||
设备施工
|
@ -0,0 +1,376 @@
|
||||
<template>
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="8" align="center">防洪安全上岗签到表</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="td-div">
|
||||
<span>车站:</span>
|
||||
<div class="td-div-input">
|
||||
<el-select :id="formInput.stationCode.domId" v-model="form.stationCode" size="mini" disabled placeholder="请选择" class="autoWidth" @change="blurChange('stationCode')">
|
||||
<el-option
|
||||
v-for="item in getStationList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="4">
|
||||
<div class="td-div">
|
||||
<span>车站值班员:</span>
|
||||
<div class="td-div-input">
|
||||
<el-input :id="formInput.supervisor.domId" v-model="form.supervisor" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisor')" />
|
||||
</div>
|
||||
</div></td>
|
||||
<td colspan="2">
|
||||
<div class="td-div">
|
||||
<span>日期:</span>
|
||||
<div class="td-div-input">
|
||||
<el-date-picker :id="formInput.signDateStr.domId" v-model="form.signDateStr" type="date" size="mini" format="yyyy年MM月dd日" value-format="yyyy年MM月dd日" placeholder="选择日期" class="autoWidth" :disabled="!isUpdate" @change="blurChange('signDateStr')" />
|
||||
</div>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="8" align="center">车站值班员收、发通知记录表</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">汇报人姓名</td>
|
||||
<td align="center">通知车站时间</td>
|
||||
<td align="center">通知方式</td>
|
||||
<td align="center">险情类别</td>
|
||||
<td align="center">雨量值(级)</td>
|
||||
<td align="center">通知站长时间</td>
|
||||
<td align="center">站长到岗时间</td>
|
||||
<td align="center">站长签名</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> <el-input :id="formInput.supervisorNoticeInfoReporter.domId" v-model="form.supervisorNoticeInfo.reporter" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','reporter')" /> </td>
|
||||
<td>
|
||||
<el-date-picker :id="formInput.supervisorNoticeInfoNoticeStationTime.domId" v-model="form.supervisorNoticeInfo.noticeStationTime" type="datetime" size="mini" format="yyyy年MM月dd日 HH:mm:ss" value-format="yyyy年MM月dd日 HH:mm:ss" placeholder="选择日期时间" class="dateTime" :disabled="!isUpdate" @change="blurChange('supervisorNoticeInfo','noticeStationTime')" />
|
||||
</td>
|
||||
<td> <el-input :id="formInput.supervisorNoticeInfoNoticeModel.domId" v-model="form.supervisorNoticeInfo.noticeModel" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','noticeModel')" /> </td>
|
||||
<td> <el-input :id="formInput.supervisorNoticeInfoHazardCategory.domId" v-model="form.supervisorNoticeInfo.hazardCategory" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','hazardCategory')" /> </td>
|
||||
<td> <el-input :id="formInput.supervisorNoticeInfoRainfallLevel.domId" v-model="form.supervisorNoticeInfo.rainfallLevel" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','rainfallLevel')" /> </td>
|
||||
<td>
|
||||
<el-date-picker :id="formInput.supervisorNoticeInfoNoticeStationMasterTime.domId" v-model="form.supervisorNoticeInfo.noticeStationMasterTime" type="datetime" size="mini" format="yyyy年MM月dd日 HH:mm:ss" value-format="yyyy年MM月dd日 HH:mm:ss" placeholder="选择日期时间" class="dateTime" :disabled="!isUpdate" @change="blurChange('supervisorNoticeInfo','noticeStationMasterTime')" />
|
||||
</td>
|
||||
<td>
|
||||
<el-date-picker :id="formInput.supervisorNoticeInfoStationMasterArrivalTime.domId" v-model="form.supervisorNoticeInfo.stationMasterArrivalTime" type="datetime" size="mini" format="yyyy年MM月dd日 HH:mm:ss" value-format="yyyy年MM月dd日 HH:mm:ss" placeholder="选择日期时间" class="dateTime" :disabled="!isUpdate" @change="blurChange('supervisorNoticeInfo','stationMasterArrivalTime')" />
|
||||
</td>
|
||||
<td> <el-input :id="formInput.supervisorNoticeInfoStationMasterSign.domId" v-model="form.supervisorNoticeInfo.stationMasterSign" size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','stationMasterSign')" /> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">发生雨量值(级)或险情地点:<el-input :id="formInput.supervisorNoticeInfoOccurredSite.domId" v-model="form.supervisorNoticeInfo.occurredSite" type="textarea" autosize size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','occurredSite')" /></td>
|
||||
<td colspan="4">行车要求:<el-input :id="formInput.supervisorNoticeInfoDrivingRequirement.domId" v-model="form.supervisorNoticeInfo.drivingRequirement" type="textarea" autosize size="mini" :disabled="!isUpdate" @blur="blurChange('supervisorNoticeInfo','drivingRequirement')" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="8" />
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="8" align="center">站长通知战区防洪小组记录表</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">序号</td>
|
||||
<td colspan="2" align="center">通知单位名称</td>
|
||||
<td align="center">接收人姓名</td>
|
||||
<td align="center">通知时间</td>
|
||||
<td align="center">通知方式</td>
|
||||
<td colspan="2" align="center">备注</td>
|
||||
</tr>
|
||||
<tr v-for="(item, index) in form.stationMasterNoticeList" :key="index">
|
||||
<td align="center"><span>{{ index + 1 }}</span></td>
|
||||
<td colspan="2"><el-input :id="formInput['stationMasterNoticeListDepartment' + index].domId" v-model="item.department" size="mini" :disabled="!isUpdate" @blur="listChange('stationMasterNoticeList','department', index)" /></td>
|
||||
<td><el-input :id="formInput['stationMasterNoticeListReceiver' + index].domId" v-model="item.receiver" size="mini" :disabled="!isUpdate" @blur="listChange('stationMasterNoticeList','receiver', index)" /></td>
|
||||
<td>
|
||||
<el-date-picker :id="formInput['stationMasterNoticeListNoticeTime' + index].domId" v-model="item.noticeTime" type="datetime" size="mini" format="yyyy年MM月dd日 HH:mm:ss" value-format="yyyy年MM月dd日 HH:mm:ss" placeholder="选择日期时间" class="dateTime" :disabled="!isUpdate" @change="listChange('stationMasterNoticeList','noticeTime', index)" />
|
||||
</td>
|
||||
<td><el-input :id="formInput['stationMasterNoticeListNoticeModel' + index].domId" v-model="item.noticeModel" size="mini" :disabled="!isUpdate" @blur="listChange('stationMasterNoticeList','noticeModel', index)" /></td>
|
||||
<td colspan="2"><el-input :id="formInput['stationMasterNoticeListRemark' + index].domId" v-model="item.remark" size="mini" :disabled="!isUpdate" @blur="listChange('stationMasterNoticeList','remark', index)" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="8" />
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="8" align="center">战区防洪人员签到记录表</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">序号</td>
|
||||
<td colspan="2" align="center">单位名称(工区)</td>
|
||||
<td align="center">到达时间</td>
|
||||
<td align="center">职务</td>
|
||||
<td align="center">联系电话</td>
|
||||
<td align="center">签名</td>
|
||||
<td align="center">返回时间</td>
|
||||
</tr>
|
||||
<tr v-for="(item, index) in form.workerSignInfoList" :key="'workerSignInfoList' + index">
|
||||
<td align="center"><span>{{ index + 1 }}</span></td>
|
||||
<td colspan="2"><el-input :id="formInput['workerSignInfoListDepartment' + index].domId" v-model="item.department" size="mini" :disabled="!isUpdate" @blur="listChange('workerSignInfoList','department', index)" /></td>
|
||||
<td>
|
||||
<el-date-picker :id="formInput['workerSignInfoListArriveTime' + index].domId" v-model="item.arriveTime" type="datetime" size="mini" format="yyyy年MM月dd日 HH:mm:ss" value-format="yyyy年MM月dd日 HH:mm:ss" placeholder="选择日期时间" class="dateTime" :disabled="!isUpdate" @change="listChange('workerSignInfoList','arriveTime', index)" />
|
||||
</td>
|
||||
<td><el-input :id="formInput['workerSignInfoListAppointment' + index].domId" v-model="item.appointment" size="mini" :disabled="!isUpdate" @blur="listChange('workerSignInfoList','appointment', index)" /></td>
|
||||
<td><el-input :id="formInput['workerSignInfoListTelephone' + index].domId" v-model="item.telephone" size="mini" :disabled="!isUpdate" @blur="listChange('workerSignInfoList','telephone', index)" /></td>
|
||||
<td><el-input :id="formInput['workerSignInfoListSign' + index].domId" v-model="item.sign" size="mini" :disabled="!isUpdate" @blur="listChange('workerSignInfoList','sign', index)" /></td>
|
||||
<td>
|
||||
<el-date-picker :id="formInput['workerSignInfoListReturnTime' + index].domId" v-model="item.returnTime" type="datetime" size="mini" format="yyyy年MM月dd日 HH:mm:ss" value-format="yyyy年MM月dd日 HH:mm:ss" placeholder="选择日期时间" class="dateTime" :disabled="!isUpdate" @change="listChange('workerSignInfoList','returnTime', index)" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="footer">
|
||||
<el-button v-if="active == 'write'" :id="formInput.submit.domId" type="primary" size="mini" @click="submit">提交</el-button>
|
||||
<el-button v-if="active == 'search'" :id="formInput.update.domId" :disabled="!isEdit" type="primary" size="mini" @click="update">更新</el-button>
|
||||
<el-button v-if="active == 'search'" size="mini" @click="changeEdit">{{ isEdit ? '取消' : '编辑' }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
export default {
|
||||
name: 'ControlTable',
|
||||
props: {
|
||||
info:{
|
||||
type: Object,
|
||||
default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
active: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isEdit: false,
|
||||
form: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
stationCode() {
|
||||
return this.$store.state.training.roleDeviceCode;
|
||||
},
|
||||
formInput() {
|
||||
return OperationEvent.FloodSafetyRegister.formInput;
|
||||
},
|
||||
isUpdate() {
|
||||
return (this.active == 'search' && this.isEdit) || this.active == 'write';
|
||||
},
|
||||
getStationList() {
|
||||
const sList = [];
|
||||
const filterArr = this.$store.state.training.memberList.filter(item => {
|
||||
return item.type == 'STATION_SUPERVISOR';
|
||||
});
|
||||
filterArr.forEach(item => {
|
||||
const name = this.getDeviceName(item.deviceCode);
|
||||
sList.push({
|
||||
value: item.deviceCode,
|
||||
label: name
|
||||
});
|
||||
});
|
||||
return sList;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.active == 'write') {
|
||||
this.initFormData();
|
||||
} else {
|
||||
this.getInfoData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDeviceName(receiverId) {
|
||||
let name = '';
|
||||
if (receiverId) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](receiverId);
|
||||
name = device ? device.name : '';
|
||||
}
|
||||
return name;
|
||||
},
|
||||
listChange(listKey, key, index) {
|
||||
const val = this.form[listKey][index][key];
|
||||
const n = listKey + key[0].toUpperCase() + key.substr(1);
|
||||
const operate = {
|
||||
operation: this.formInput[n + index].operation,
|
||||
param: {val: val}
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate);
|
||||
},
|
||||
blurChange() {
|
||||
const argList = [...arguments];
|
||||
let key = '';
|
||||
let val = '';
|
||||
argList.forEach((item, index) => {
|
||||
if (index == 0) {
|
||||
val = this.form[item];
|
||||
key = item;
|
||||
} else {
|
||||
val = val[item];
|
||||
const n = item[0].toUpperCase() + item.substr(1);
|
||||
key += n;
|
||||
}
|
||||
});
|
||||
const operate = {
|
||||
operation: this.formInput[key].operation,
|
||||
param: {val: val}
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate);
|
||||
},
|
||||
initNoticeData() {
|
||||
const list = [];
|
||||
const nameArr = ['', '', ''];
|
||||
nameArr.forEach(name => {
|
||||
const obj = {
|
||||
department: '',
|
||||
receiver: '',
|
||||
noticeTime: '',
|
||||
noticeModel: '',
|
||||
remark: ''
|
||||
};
|
||||
list.push(obj);
|
||||
});
|
||||
return list;
|
||||
},
|
||||
initSignInfoData() {
|
||||
const list = [];
|
||||
const nameArr = ['', '', ''];
|
||||
nameArr.forEach(name => {
|
||||
const obj = {
|
||||
department: '',
|
||||
arriveTime: '',
|
||||
appointment: '',
|
||||
telephone: '',
|
||||
sign: '',
|
||||
returnTime: ''
|
||||
};
|
||||
list.push(obj);
|
||||
});
|
||||
return list;
|
||||
},
|
||||
getInfoData() {
|
||||
const obj = deepAssign({}, this.info);
|
||||
this.form = obj;
|
||||
},
|
||||
submit() {
|
||||
const obj = deepAssign({}, this.form);
|
||||
delete obj.id;
|
||||
const operate = {
|
||||
operation: this.formInput.submit.operation,
|
||||
param: obj
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
sendCommandNew(this.group, 'CONTROL_FLOOD_SIGN_SAVE', obj).then((res) => {
|
||||
console.log(res, '---res');
|
||||
this.initFormData();
|
||||
}).catch(error => {
|
||||
this.$messageBox('提交失败:' + error.message);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
update() {
|
||||
const obj = deepAssign({}, this.form);
|
||||
const operate = {
|
||||
operation: this.formInput.update.operation,
|
||||
param: obj
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
sendCommandNew(this.group, 'CONTROL_FLOOD_SIGN_UPDATE', obj).then((res) => {
|
||||
console.log(res, '---res');
|
||||
this.isEdit = false;
|
||||
}).catch(error => {
|
||||
this.$messageBox('更新失败:' + error.message);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
changeEdit() {
|
||||
if (this.isEdit) {
|
||||
this.getInfoData();
|
||||
}
|
||||
this.isEdit = !this.isEdit;
|
||||
},
|
||||
initFormData() {
|
||||
this.form = {
|
||||
id: '',
|
||||
stationCode: this.stationCode,
|
||||
supervisor: '',
|
||||
signDateStr: '',
|
||||
supervisorNoticeInfo: { // 车站值班员收、发通知记录表
|
||||
reporter:'',
|
||||
noticeStationTime:'',
|
||||
noticeModel:'',
|
||||
hazardCategory:'',
|
||||
rainfallLevel:'',
|
||||
noticeStationMasterTime:'',
|
||||
stationMasterArrivalTime:'',
|
||||
stationMasterSign:'',
|
||||
occurredSite:'',
|
||||
drivingRequirement:''
|
||||
},
|
||||
stationMasterNoticeList: this.initNoticeData(), // 站长通知战区防洪小组记录表
|
||||
workerSignInfoList: this.initSignInfoData() // 战区防洪人员签到记录表
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
table {
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
td {
|
||||
padding: 5px;
|
||||
border: 1px solid black !important;
|
||||
}
|
||||
}
|
||||
.td-div {
|
||||
white-space:nowrap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.td-div-input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.timeInput {
|
||||
width: 40px;
|
||||
/deep/ .el-input__inner {
|
||||
padding: 0 10px !important;
|
||||
border: none !important;
|
||||
border-radius: 0px;
|
||||
border-bottom: 1px solid #DCDFE6 !important;
|
||||
}
|
||||
}
|
||||
.autoWidth {
|
||||
width: 100%;
|
||||
}
|
||||
.dateTime {
|
||||
min-width: 200px;
|
||||
}
|
||||
.checkBtn {
|
||||
width: 100%;
|
||||
height: 28px;
|
||||
}
|
||||
.footer {
|
||||
height: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tabs :id="typeChange.domId" v-model="activeName" type="card" @tab-click="tabClick">
|
||||
<el-tab-pane label="填写" name="write">
|
||||
<div ref="writeTabPane" class="write-box" :style="{height: boxHeight + 'px'}">
|
||||
<ControlTable :active="activeName" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="查询" name="search">
|
||||
<div v-if="activeName == 'search'" class="search-box" :style="{height: boxHeight + 'px'}">
|
||||
<div v-for="(item, index) in searchList" :key="index" class="search-item">
|
||||
<ControlTable :active="activeName" :info="item" />
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ControlTable from './controlTable';
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
import { UserOperationType } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: {
|
||||
ControlTable
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'write',
|
||||
searchList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
typeChange() {
|
||||
return OperationEvent.FloodSafetyRegister.tabType.typeChange;
|
||||
},
|
||||
formInput() {
|
||||
return OperationEvent.FloodSafetyRegister.formInput;
|
||||
},
|
||||
boxHeight() {
|
||||
const allH = this.$store.state.app.height;
|
||||
let h = allH - 103 - 39 - 30 - 41 - 15;
|
||||
h = h > 0 ? h : 0;
|
||||
return h;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
activeName() {
|
||||
if (this.activeName == 'search') {
|
||||
this.getSearchList();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.writeTabPane.addEventListener('scroll', this.handleScroll);
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$refs.writeTabPane.removeEventListener('scroll', this.handleScroll);
|
||||
},
|
||||
methods: {
|
||||
handleScroll() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
tabClick() {
|
||||
const operate = {
|
||||
operation: this.typeChange.operation,
|
||||
param: {val: this.activeName},
|
||||
userOperationType: UserOperationType.LEFTCLICK
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate);
|
||||
},
|
||||
getSearchList() {
|
||||
const params = { stationCode: this.$store.state.training.roleDeviceCode};
|
||||
sendCommandNew(this.group, 'CONTROL_FLOOD_SIGN_QUERY', params).then((res) => {
|
||||
console.log(res, '-QUERY--res');
|
||||
this.searchList = res.data;
|
||||
}).catch(error => {
|
||||
console.log('查询失败!', error);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped >
|
||||
.write-box {
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
}
|
||||
.search-box {
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.search-item {
|
||||
margin: 10px;
|
||||
}
|
||||
</style>
|
@ -111,7 +111,7 @@
|
||||
<script>
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import FloodControlSafetyTable from './floodControlSafetyTable';
|
||||
import FloodControlSafetyTable from './floodControlSafetyTable/index';
|
||||
import EquipmentConstructionTable from './equipmentConstructionTable';
|
||||
import AbnormalTrain from './abnormalTrain/index';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user