大铁调整 n5

This commit is contained in:
fan 2022-05-23 15:11:55 +08:00
parent 0253210cf6
commit 7a7cbf9ae8
6 changed files with 106 additions and 23 deletions

View File

@ -17,7 +17,7 @@ export function queryAssistById(mapId){
method: 'get'
})
}
// 保存指示灯关联信息
// 保存或更新指示灯关联信息
export function saveAssist(data, mapId) {
return request({
// url: `/api/assist/indicator/section/save/${mapId}`,

View File

@ -24,13 +24,13 @@ export function handlerUrl(data) {
if (process.env.NODE_ENV === 'development') {
// const data = null;
// BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://114.116.51.125/jlcloud';
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪
// BASE_API = 'http://192.168.8.172:9200'; // 旭强
// BASE_API = 'http://192.168.3.15:9000'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛

View File

@ -499,7 +499,6 @@ export default {
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
console.log(list, stationCode, '=============');
this.$jlmap.updateShowStation(list, stationCode);
!setCenter && stationCode && this.setCenter(stationCode);
},

View File

@ -11,8 +11,8 @@
</el-dialog>
</template>
<script>
import { getBigRouteList } from '@/api/jmap/mapdraft';
import { queryAssistListPaged, deleteAssist } from '@/api/assist';
// import { getBigRouteList } from '@/api/jmap/mapdraft';
import { queryAssistListPaged, deleteAssist, saveAssist } from '@/api/assist';
export default {
name:'BigRouteDetail',
props: {
@ -21,6 +21,12 @@
default() {
return null;
}
},
relativeList: {
type: Array,
default() {
return [];
}
}
},
data() {
@ -30,7 +36,6 @@
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
filterRouteMap:{},
queryForm: {
show:false
},
@ -40,6 +45,10 @@
selectCheckShow: false,
indexShow: true,
columns: [
{
title: 'code',
prop: 'code'
},
{
title: '关联车站',
prop: 'stationCode',
@ -65,6 +74,18 @@
columnValue: (row) => { return this.getDeviceName(row.signalCode); },
tagType: (row) => { return ''; }
},
{
title: '闭塞类型',
prop: 'runModel'
},
{
title: '默认状态',
prop: 'runStatus'
},
{
title: '相对运行方向',
prop: 'relativeCode',
},
{
type: 'button',
title: this.$t('global.operate'),
@ -74,7 +95,11 @@
name: '删除',
handleClick: this.deleteRoute,
type: 'danger'
}
},
// {
// name: '',
// handleClick: this.handleUpdate,
// }
]
}
]
@ -84,14 +109,7 @@
methods:{
doShow() {
this.show = true;
if (this.mapInfo && this.mapInfo.id) {
getBigRouteList(this.mapInfo.id).then(response => {
response.data.forEach(route=>{
this.filterRouteMap[route.code] = route.name;
});
this.reloadTable();
}).catch(()=>{});
}
this.reloadTable();
},
doClose() {
this.show = false;
@ -127,8 +145,14 @@
}).catch(error=>{
this.$messageBox('删除指示灯关联信息失败:' + error.meessage);
});
}
},
handleUpdate(index, row) {
saveAssist(row, this.$route.params.mapId).then(res => {
this.$message.success('更新成功');
}).catch(() => {
this.$messageBox('操作异常');
});
},
}
};
</script>

View File

@ -12,7 +12,6 @@
<script>
import IndicatorAssociatedInfoDraft from './route';
import IndicatorAssociatedInfoDetail from './detail';
export default {
name: 'IndicatorAssociatedInfoOperate',
components: {

View File

@ -53,6 +53,36 @@
</el-select>
<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')">
<el-option
v-for="item in runModelList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="默认状态:" prop="runStatus">
<el-select v-model="addModel.runStatus" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in runStatusList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="相对运行方向编码:" prop="relativeCode">
<el-select v-model="addModel.relativeCode" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in relativeList"
:key="item.code"
:label="item.code"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-form>
<div class="bigDraft">
<el-button-group class="bigDraftBtn">
@ -68,6 +98,7 @@
import { saveAssist } from '@/api/assist';
import { mapGetters } from 'vuex';
import ConstConfig from '@/scripts/ConstConfig';
import { queryAssistListPaged } from '@/api/assist';
export default {
name:'BigRouteInfo',
props: {
@ -103,7 +134,10 @@
stationCode: '',
labelEnum:'',
sectionList: [],
signalCode: ''
signalCode: '',
runModel: '',
runStatus: '',
relativeCode: ''
},
rules: {
'stationCode':[
@ -119,8 +153,24 @@
'sectionList': [
{ validator: checkSectionList, trigger: 'change' },
{ required: true, message: '请选择关联区段', trigger: 'blur' }
],
'runModel': [
{ required: true, message: '请选择闭塞类型', trigger: 'change' }
],
'runStatus': [
{ required: true, message: '请选择默认状态', trigger: 'change' }
]
}
},
runModelList: [
{ label: '自动闭塞', value: 'A' },
{ label: '半自动闭塞', value: 'S' }
],
runStatusList: [
{ label: '接车口', value: 'R' },
{ label: '发车口', value: 'D' },
{ label: '无状态', value: 'NO' }
],
relativeList: []
};
},
computed: {
@ -132,9 +182,16 @@
])
},
mounted() {
this.initPage();
},
methods:{
initPage() {},
initPage() {
if (this.mapInfo) {
queryAssistListPaged({pageNum: 1, pageSize: 999},this.mapInfo.id).then(resp => {
this.relativeList = resp.data.list;
});
}
},
hover(field) {
this.field = field === this.field ? '' : field;
},
@ -164,6 +221,7 @@
saveAssist(newModel, that.mapInfo.id).then(res=>{
that.$message.success(that.$t('tip.creatingSuccessful'));
that.loading = false;
this.initPage();
that.clear();
}).catch(() => {
that.$messageBox(that.$t('tip.operationAbnormal'));
@ -180,7 +238,10 @@
stationCode: '',
labelEnum:'',
sectionList: [],
signalCode: ''
signalCode: '',
runModel: '',
runStatus: '',
relativeCode: ''
};
}
}