大铁调整 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' method: 'get'
}) })
} }
// 保存指示灯关联信息 // 保存或更新指示灯关联信息
export function saveAssist(data, mapId) { export function saveAssist(data, mapId) {
return request({ return request({
// url: `/api/assist/indicator/section/save/${mapId}`, // url: `/api/assist/indicator/section/save/${mapId}`,

View File

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

View File

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

View File

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

View File

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

View File

@ -53,6 +53,36 @@
</el-select> </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>
<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> </el-form>
<div class="bigDraft"> <div class="bigDraft">
<el-button-group class="bigDraftBtn"> <el-button-group class="bigDraftBtn">
@ -68,6 +98,7 @@
import { saveAssist } from '@/api/assist'; import { saveAssist } from '@/api/assist';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
import { queryAssistListPaged } from '@/api/assist';
export default { export default {
name:'BigRouteInfo', name:'BigRouteInfo',
props: { props: {
@ -103,7 +134,10 @@
stationCode: '', stationCode: '',
labelEnum:'', labelEnum:'',
sectionList: [], sectionList: [],
signalCode: '' signalCode: '',
runModel: '',
runStatus: '',
relativeCode: ''
}, },
rules: { rules: {
'stationCode':[ 'stationCode':[
@ -119,8 +153,24 @@
'sectionList': [ 'sectionList': [
{ validator: checkSectionList, trigger: 'change' }, { validator: checkSectionList, trigger: 'change' },
{ required: true, message: '请选择关联区段', trigger: 'blur' } { 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: { computed: {
@ -132,9 +182,16 @@
]) ])
}, },
mounted() { mounted() {
this.initPage();
}, },
methods:{ methods:{
initPage() {}, initPage() {
if (this.mapInfo) {
queryAssistListPaged({pageNum: 1, pageSize: 999},this.mapInfo.id).then(resp => {
this.relativeList = resp.data.list;
});
}
},
hover(field) { hover(field) {
this.field = field === this.field ? '' : field; this.field = field === this.field ? '' : field;
}, },
@ -164,6 +221,7 @@
saveAssist(newModel, that.mapInfo.id).then(res=>{ saveAssist(newModel, that.mapInfo.id).then(res=>{
that.$message.success(that.$t('tip.creatingSuccessful')); that.$message.success(that.$t('tip.creatingSuccessful'));
that.loading = false; that.loading = false;
this.initPage();
that.clear(); that.clear();
}).catch(() => { }).catch(() => {
that.$messageBox(that.$t('tip.operationAbnormal')); that.$messageBox(that.$t('tip.operationAbnormal'));
@ -180,7 +238,10 @@
stationCode: '', stationCode: '',
labelEnum:'', labelEnum:'',
sectionList: [], sectionList: [],
signalCode: '' signalCode: '',
runModel: '',
runStatus: '',
relativeCode: ''
}; };
} }
} }