Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
8c245127e2
@ -98,3 +98,11 @@ export function createPost(data) {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 修改留言板
|
||||||
|
export function updatePost(postId, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/learn/${postId}`,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -54,12 +54,6 @@ export default class Line2 extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getBoundingRect() {
|
|
||||||
if (this.segment) {
|
|
||||||
return this.segment.getBoundingRect().clone();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
if (!this.isShowShape) return;
|
if (!this.isShowShape) return;
|
||||||
this.setLineType(model.type);
|
this.setLineType(model.type);
|
||||||
|
@ -116,7 +116,7 @@ export default {
|
|||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
return '进路交人工控';
|
return '进路收人工控';
|
||||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||||
return '进路交自动控';
|
return '进路交自动控';
|
||||||
}
|
}
|
||||||
|
@ -336,10 +336,13 @@ export default {
|
|||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (data.operation === OperationEvent.Signal.guide.menu.operation) {
|
switch (data.operation) {
|
||||||
|
case OperationEvent.Signal.guide.menu.operation:
|
||||||
this.$refs.routeGuide.doShow(data, data.selected, data.routesList);
|
this.$refs.routeGuide.doShow(data, data.selected, data.routesList);
|
||||||
} else if (data.operation === OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
break;
|
||||||
|
case OperationEvent.Signal.humanTrainRoute.menu.operation:
|
||||||
this.$refs.routeControl.doShow(data, data.selected);
|
this.$refs.routeControl.doShow(data, data.selected);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -85,7 +85,7 @@ export default {
|
|||||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '属性',
|
label: '显示站台信息',
|
||||||
handler: this.detail,
|
handler: this.detail,
|
||||||
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,6 @@ export default {
|
|||||||
this.menu = [...this.menuDirective];
|
this.menu = [...this.menuDirective];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.clickEvent();
|
this.clickEvent();
|
||||||
|
@ -262,14 +262,15 @@ export default {
|
|||||||
},
|
},
|
||||||
// 信号封锁
|
// 信号封锁
|
||||||
lock() {
|
lock() {
|
||||||
switch (this.popClass) {
|
// switch (this.popClass) {
|
||||||
case 'chengdou-03__systerm':
|
// case 'chengdou-03__systerm':
|
||||||
this.sendCommandNext(menuOperate.Signal.lock).then(operate => {
|
// this.sendCommandNext(menuOperate.Signal.lock).then(operate => {
|
||||||
this.$refs.password.doShow(operate);
|
// this.$refs.password.doShow(operate);
|
||||||
});
|
// });
|
||||||
break;
|
// break;
|
||||||
default: this.sendCommand(menuOperate.Signal.lock);
|
// default: this.sendCommand(menuOperate.Signal.lock);
|
||||||
}
|
// }
|
||||||
|
this.sendCommand(menuOperate.Signal.lock);
|
||||||
},
|
},
|
||||||
// 信号解封
|
// 信号解封
|
||||||
unlock() {
|
unlock() {
|
||||||
|
@ -58,7 +58,6 @@ export default {
|
|||||||
},
|
},
|
||||||
getMapByCode() {
|
getMapByCode() {
|
||||||
const project = getSessionStorage('project');
|
const project = getSessionStorage('project');
|
||||||
console.log(project, GetMapListByProjectList.includes(project));
|
|
||||||
return GetMapListByProjectList.includes(project);
|
return GetMapListByProjectList.includes(project);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="创建留言板"
|
:title="title"
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
width="30%"
|
width="30%"
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<el-input v-model="form.title" style="width: 200px;" />
|
<el-input v-model="form.title" style="width: 200px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="归属项目:" prop="project">
|
<el-form-item label="归属项目:" prop="project">
|
||||||
<el-select v-model="form.project" placeholder="请选择">
|
<el-select v-model="form.project" :disabled="update" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in projectOptionList"
|
v-for="item in projectOptionList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -22,13 +22,14 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
<el-button type="primary" @click="commit">确 定</el-button>
|
<el-button v-if="!update" type="primary" @click="commit">确 定</el-button>
|
||||||
|
<el-button v-if="update" type="primary" @click="updateCommit">修 改</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { createPost } from '@/api/learn';
|
import { createPost, updatePost } from '@/api/learn';
|
||||||
export default {
|
export default {
|
||||||
name: 'Create',
|
name: 'Create',
|
||||||
props:{
|
props:{
|
||||||
@ -42,10 +43,13 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
postId: '',
|
||||||
form:{
|
form:{
|
||||||
title: '',
|
title: '',
|
||||||
project: ''
|
project: ''
|
||||||
},
|
},
|
||||||
|
title: '',
|
||||||
|
update: false,
|
||||||
rules: {
|
rules: {
|
||||||
title: [
|
title: [
|
||||||
{ required: true, message: '请填写留言板名称', trigger: 'blur' }
|
{ required: true, message: '请填写留言板名称', trigger: 'blur' }
|
||||||
@ -58,11 +62,35 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClose() {
|
handleClose() {
|
||||||
|
this.form = { title: '', project: '' };
|
||||||
this.$refs.form.resetFields();
|
this.$refs.form.resetFields();
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
},
|
},
|
||||||
doShow() {
|
doShow(data) {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
|
this.postId = '';
|
||||||
|
this.update = false;
|
||||||
|
this.title = '创建留言板';
|
||||||
|
if (data) {
|
||||||
|
this.update = true;
|
||||||
|
this.title = '修改留言板';
|
||||||
|
this.form.title = data.title;
|
||||||
|
this.form.project = data.project;
|
||||||
|
this.postId = data.id;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updateCommit() {
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
updatePost(this.postId, this.form).then(resp => {
|
||||||
|
this.$emit('reloadTable');
|
||||||
|
this.handleClose();
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.error('修改留言板失败!');
|
||||||
|
this.handleClose();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
import { queryPostPage } from '@/api/learn';
|
import { queryPostPage } from '@/api/learn';
|
||||||
import { ProjectList} from '@/scripts/ProjectConfig';
|
import { ProjectList} from '@/scripts/ProjectConfig';
|
||||||
import CreateDraft from './create';
|
import CreateDraft from './create';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Manage',
|
name: 'Manage',
|
||||||
components:{
|
components:{
|
||||||
@ -60,6 +61,10 @@ export default {
|
|||||||
{
|
{
|
||||||
name: '进入',
|
name: '进入',
|
||||||
handleClick: this.handleEnter
|
handleClick: this.handleEnter
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '修改',
|
||||||
|
handleClick: this.handleUpdate
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -104,6 +109,9 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||||
|
},
|
||||||
|
handleUpdate(index, row) {
|
||||||
|
this.$refs.createDraft.doShow(row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -26,15 +26,15 @@
|
|||||||
<div class="trainExampleName">车站 颜色图例</div>
|
<div class="trainExampleName">车站 颜色图例</div>
|
||||||
<div class="eachTrainExample">
|
<div class="eachTrainExample">
|
||||||
<span class="smallExample" />
|
<span class="smallExample" />
|
||||||
<span class="eachTrainExampleName">0 ~ 40</span>
|
<span class="eachTrainExampleName">0 ~ 400</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="eachTrainExample">
|
<div class="eachTrainExample">
|
||||||
<span class="mediumExample" />
|
<span class="mediumExample" />
|
||||||
<span class="eachTrainExampleName">40 ~ 80</span>
|
<span class="eachTrainExampleName">400 ~ 800</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="eachTrainExample">
|
<div class="eachTrainExample">
|
||||||
<span class="bigExample" />
|
<span class="bigExample" />
|
||||||
<span class="eachTrainExampleName">80及以上</span>
|
<span class="eachTrainExampleName">800及以上</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="trainExampleR">
|
<div class="trainExampleR">
|
||||||
@ -45,11 +45,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="eachTrainExample">
|
<div class="eachTrainExample">
|
||||||
<span class="mediumExample" />
|
<span class="mediumExample" />
|
||||||
<span class="eachTrainExampleName">100 ~ 200</span>
|
<span class="eachTrainExampleName">100 ~ 400</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="eachTrainExample">
|
<div class="eachTrainExample">
|
||||||
<span class="bigExample" />
|
<span class="bigExample" />
|
||||||
<span class="eachTrainExampleName">200及以上</span>
|
<span class="eachTrainExampleName">1000及以上</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user