指示灯关联必填调整

This commit is contained in:
fan 2022-07-19 13:41:55 +08:00
parent 93930bb8c3
commit 3d9419b809
2 changed files with 272 additions and 280 deletions

View File

@ -42,7 +42,6 @@ export default {
this.initStationListMode();
},
'$store.state.training.simulationUserList': function(val) {
console.log('----------11');
this.initData();
},
'$store.state.socket.simulationRoleList':function(list) {

View File

@ -54,7 +54,7 @@
:value="item.code"
/>
</el-select>
<el-button :type="field === 'signalCode'? 'danger':'primary'" @click="hover('signalCode')">{{$t('map.activate')}}</el-button>
<el-button :type="field === 'signalCode'? 'danger':'primary'" @click="hover('signalCode')">{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="闭塞类型:" prop="runModel">
<el-select v-model="addModel.runModel" :placeholder="$t('map.pleaseSelect')">
@ -110,13 +110,13 @@
</div>
</template>
<script>
import { setUID } from '@/jmapNew/utils/Uid';
import { deepAssign } from '@/utils/index';
import { saveAssist } from '@/api/assist';
import { mapGetters } from 'vuex';
import ConstConfig from '@/scripts/ConstConfig';
import { queryAssistListPaged } from '@/api/assist';
export default {
// import { setUID } from '@/jmapNew/utils/Uid';
import { deepAssign } from '@/utils/index';
import { saveAssist } from '@/api/assist';
import { mapGetters } from 'vuex';
import ConstConfig from '@/scripts/ConstConfig';
import { queryAssistListPaged } from '@/api/assist';
export default {
name:'BigRouteInfo',
props: {
selected: {
@ -134,7 +134,7 @@
},
data() {
var checkSectionList = (rule, value, callback) => {
if (!value || value.length === 0){
if (!value || value.length === 0) {
callback(new Error('请选择关联区段!'));
} else {
callback();
@ -160,11 +160,11 @@
},
rules: {
'name':[
{ required: true, message: '请输入名称', trigger: 'blur' },
{ required: true, message: '请输入名称', trigger: 'blur' }
],
'stationCode':[
{ required: true, message: '请选择关联车站', trigger: 'blur' },
{ required: true, message: '请选择关联车站', trigger: 'change' },
{ required: true, message: '请选择关联车站', trigger: 'change' }
],
'labelEnum': [
{ required: true, message: '请选择运行方向', trigger: 'change' }
@ -181,13 +181,6 @@
],
'runStatus': [
{ required: true, message: '请选择默认状态', trigger: 'change' }
],
'relativeStationCode': [
{ required: true, message: '请选择相对运行车站', trigger: 'blur' },
{ required: true, message: '请选择相对运行车站', trigger: 'change' }
],
'relativeLabelEnum': [
{ required: true, message: '请选择相对运行方向', trigger: 'change' }
]
},
runModelList: [
@ -216,7 +209,7 @@
methods:{
initPage() {
if (this.mapInfo) {
queryAssistListPaged({pageNum: 1, pageSize: 999},this.mapInfo.id).then(resp => {
queryAssistListPaged({pageNum: 1, pageSize: 999}, this.mapInfo.id).then(resp => {
this.relativeList = resp.data.list;
});
}
@ -234,7 +227,7 @@
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'stationCode'.toUpperCase()) {
this.addModel.stationCode = selected.code;
this.field = '';
} else if (selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'signalCode'.toUpperCase()){
} else if (selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'signalCode'.toUpperCase()) {
this.addModel.signalCode = selected.code;
this.field = '';
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'relativeStationCode'.toUpperCase()) {
@ -279,7 +272,7 @@
}
}
}
};
};
</script>
<style lang="scss" scoped>
.BigRouteInfo{