Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
96e2179bd7
@ -569,6 +569,12 @@ export default {
|
||||
signalSectionSuccessful: 'Signal close section created successfully!',
|
||||
signalSectionUpdateSucceeded: 'Update signal close to section successful!',
|
||||
|
||||
crossCoding:'Cross code',
|
||||
crossName:'Cross name',
|
||||
relateSwitchList:'Related switchList',
|
||||
cross:'cross',
|
||||
generateCross:'generate cross',
|
||||
|
||||
belongsSection: 'Belongs section:',
|
||||
coordinateMode: 'Coordinate mode',
|
||||
sectionAssociationMode: 'Section association mode',
|
||||
|
@ -25,6 +25,10 @@ export default {
|
||||
linkSelectName: 'Enter the Link name',
|
||||
linkSelectDisplayLength: 'Please enter the actual length of the Link',
|
||||
|
||||
pleaseSelectCross:'Please select cross',
|
||||
pleaseInputCrossName:'Please input cross name',
|
||||
pleaseSelectSwitch:'Please select switch',
|
||||
|
||||
lengthShow: 'According to the length of the:',
|
||||
lengthFact: 'The real length:',
|
||||
color: 'color:',
|
||||
|
@ -563,6 +563,12 @@ export default {
|
||||
interlockingBlocks: '联锁区段',
|
||||
alwaysRed: '是否总是显示红灯',
|
||||
|
||||
crossCoding:'岔心编号',
|
||||
crossName:'岔心名称',
|
||||
relateSwitchList:'关联道岔',
|
||||
cross:'岔心',
|
||||
generateCross:'一键生成岔心',
|
||||
|
||||
belongsSection: '所属区段:',
|
||||
coordinateMode: '坐标方式',
|
||||
sectionAssociationMode: '区段关联方式',
|
||||
|
@ -24,6 +24,10 @@ export default {
|
||||
linkSelectName: '请输入Link名称',
|
||||
linkSelectDisplayLength: '请输入Link实际长度',
|
||||
|
||||
pleaseSelectCross:'请选择岔心',
|
||||
pleaseInputCrossName:'请输入岔心名称',
|
||||
pleaseSelectSwitch:'请选择道岔',
|
||||
|
||||
lengthShow: '显示长度:',
|
||||
lengthFact: '真实长度:',
|
||||
color: '颜色:',
|
||||
|
@ -51,6 +51,18 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
logicMenu: [
|
||||
{
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
@ -82,17 +94,6 @@ export default {
|
||||
label: this.$t('menu.menuSection.sectionUnblock'),
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
|
||||
},
|
||||
{
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
@ -125,16 +126,6 @@ export default {
|
||||
label: this.$t('menu.menuSection.sectionUnblock'),
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -199,8 +190,14 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.selected.type != '04') {
|
||||
if (this.selected.type == '01' || this.selected.type == '03') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
} else if (this.selected.type == '02') {
|
||||
const logic = {
|
||||
Local: [...this.menuNormal.Local, ...this.logicMenu],
|
||||
Center: [...this.menuNormal.Center, ...this.logicMenu]
|
||||
};
|
||||
this.menu = MenuContextHandler.covert(logic);
|
||||
} else {
|
||||
this.menu = [];
|
||||
}
|
||||
|
@ -505,3 +505,9 @@ export const ProjectList = [
|
||||
{value: 'urtss', label: '陪标项目'},
|
||||
{value: 'sdy', label: '苏电院'}
|
||||
];
|
||||
export const localPackageProject = {
|
||||
localdesign: 'designheb',
|
||||
locallogin: 'heb',
|
||||
ntyldesign: 'designntyl',
|
||||
ntyllogin: 'ntyl'
|
||||
};
|
||||
|
@ -2,11 +2,11 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://api.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.8.129:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.8.119:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
@ -46,7 +46,7 @@
|
||||
<div class="btn-buy">
|
||||
<!-- <el-button v-if="!isLocal" :disabled="disabled" type="success" @click="buy">{{ $t('exam.buy') }}</el-button> -->
|
||||
<el-button v-if="hasPermssion && !isLocal" :disabled="disabled" type="primary" @click="distribute">{{ $t('exam.distributePermission') }}</el-button>
|
||||
<el-button v-if="hasPermssion && !$route.query.noPreLogout" :disabled="disabled" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
|
||||
<el-button v-if="hasPermssion && !$route.query.noPreLogout && !courseModel.systemFault" :disabled="disabled" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
|
||||
<el-button v-if="!$route.query.noPreLogout" type="primary" :disabled="disabled" @click="backLessonList">{{ $t('exam.returnCourseList') }}</el-button>
|
||||
<el-button v-if="$route.query.noPreLogout" type="primary" :disabled="disabled" @click="quit">退出</el-button>
|
||||
</div>
|
||||
@ -138,7 +138,8 @@ export default {
|
||||
prdType: resp.data.prdType,
|
||||
mapId: resp.data.mapId,
|
||||
PermissionType: PermissionType.EXAM,
|
||||
treeList: resp.data.examDefinitionList
|
||||
treeList: resp.data.examDefinitionList,
|
||||
systemFault: resp.data.systemFault
|
||||
};
|
||||
if (this.hasPermssion) {
|
||||
this.valid = true;
|
||||
|
@ -68,7 +68,7 @@ export default {
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
|
||||
],
|
||||
classIdList: [
|
||||
{ required: !(this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05')), message: '请选择课程归属班级', trigger: 'change' }
|
||||
{ required: true, message: '请选择课程归属班级', trigger: 'change' }
|
||||
]
|
||||
};
|
||||
},
|
||||
|
@ -138,7 +138,7 @@ import bgPsdImg from '@/assets/bg_psd.png';
|
||||
import HandRight from '@/assets/hand-o-right.png';
|
||||
import wchat from '@/assets/wchat.png';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { loginInfo, ProjectIcon, ProjectLoginStyleList, VersionBaseNoShow, MainBodyNoShow, NoQrcodeList} from '@/scripts/ProjectConfig';
|
||||
import { loginInfo, ProjectIcon, ProjectLoginStyleList, VersionBaseNoShow, MainBodyNoShow, NoQrcodeList, localPackageProject} from '@/scripts/ProjectConfig';
|
||||
import { removeToken, getToken } from '@/utils/auth';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import FloatPart from './floatPart';
|
||||
@ -206,14 +206,9 @@ export default {
|
||||
project() {
|
||||
const project = this.$route.query.project;
|
||||
const split = this.$route.path.split('/')[1];
|
||||
if (process.env.VUE_APP_PRO === 'local' && split == 'design') {
|
||||
return split + 'heb';
|
||||
} else if (process.env.VUE_APP_PRO === 'ntyl' && split == 'design') {
|
||||
return split + 'ntyl';
|
||||
} else if (process.env.VUE_APP_PRO === 'local' && split == 'login') {
|
||||
return 'heb';
|
||||
} else if (process.env.VUE_APP_PRO === 'ntyl' && split == 'login') {
|
||||
return 'ntyl';
|
||||
console.log(process.env.VUE_APP_PRO, localPackageProject);
|
||||
if (process.env.VUE_APP_PRO) {
|
||||
return localPackageProject[process.env.VUE_APP_PRO + split];
|
||||
} else if (split == 'design') {
|
||||
return project ? split + project : split;
|
||||
} else if (split == 'login') {
|
||||
|
@ -74,6 +74,7 @@
|
||||
:placeholder="item.placeholder"
|
||||
:disabled="item.disabled"
|
||||
:clearable="item.clearable"
|
||||
@change="((val)=>{deviceChange(val, item)})"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in item.options"
|
||||
|
173
src/views/newMap/newMapdraft/mapoperate/cross.vue
Normal file
173
src/views/newMap/newMapdraft/mapoperate/cross.vue
Normal file
@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="card">
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||
<operate-property
|
||||
ref="dataform"
|
||||
:form="form"
|
||||
:edit-model="editModel"
|
||||
:rules="rules"
|
||||
type="Line"
|
||||
@updateMapModel="updateMapModel"
|
||||
@clearDeviceSelect="clearDeviceSelect"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||
<create-operate
|
||||
ref="createForm"
|
||||
:create-form="createForm"
|
||||
:add-model="addModel"
|
||||
:create-rules="rules"
|
||||
@create="create"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.batchOperation')" name="third" :lazy="lazy">
|
||||
<div class="view-content" style="text-align:center;">
|
||||
<el-button type="primary" size="big" style="margin-top:10px" @click="generateCross">{{ $t('map.generateCross') }}</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
<script>
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import OperateProperty from './components/operateProperty';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import CreateOperate from './components/createOperate';
|
||||
|
||||
export default {
|
||||
name:'CrossDraft',
|
||||
components: {
|
||||
OperateProperty,
|
||||
CreateOperate
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'first',
|
||||
lazy: true,
|
||||
field: '',
|
||||
crossList:[],
|
||||
editModel: {
|
||||
code: '',
|
||||
name: '',
|
||||
relateSwitchList: []
|
||||
},
|
||||
addModel:{
|
||||
name: '',
|
||||
relateSwitchList: []
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectCross'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseInputCrossName'), trigger: 'blur' }
|
||||
],
|
||||
relateSwitchList:[
|
||||
{ required: true, message: this.$t('rules.pleaseSelectSwitch'), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'switchList'
|
||||
// 'crossList'
|
||||
]),
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '120px',
|
||||
items: {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.crossCoding'), type: 'select', optionLabel: 'code', optionValue: 'code',
|
||||
options: this.crossList, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.crossName'), type: 'input' },
|
||||
{ prop: 'relateSwitchList', label: this.$t('map.relateSwitchList'), type: 'multiSelect', optionLabel: 'name&&code',
|
||||
optionValue: 'code', options: this.switchList, disabled:true }
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
return form;
|
||||
},
|
||||
createForm() {
|
||||
const form = {
|
||||
labelWidth: '120px',
|
||||
items:{
|
||||
all:{
|
||||
name:'',
|
||||
item: [
|
||||
{ prop: 'name', label: this.$t('map.crossName'), type: 'input' },
|
||||
{ prop: 'relateSwitchList', label:this.$t('map.relateSwitchList'), type: 'multiSelectHover',
|
||||
optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, hover: this.hover,
|
||||
buttonType: 'relatedSwitch', buttonShowType: this.relatedSwitchButtonShow, deviceChange: this.changeSwitch }
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
return form;
|
||||
},
|
||||
relatedSwitchButtonShow() {
|
||||
return this.field === 'relatedSwitch';
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
hover(field) {
|
||||
this.field = field == this.field ? '' : field;
|
||||
if (this.field) {
|
||||
this.$emit('deviceSelect', 'Cross');
|
||||
} else {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
updateMapModel(data) {
|
||||
this.$emit('updateMapModel', data);
|
||||
},
|
||||
clearDeviceSelect() {
|
||||
this.$emit('deviceSelect', '');
|
||||
},
|
||||
create() {
|
||||
},
|
||||
generateCross() {
|
||||
|
||||
},
|
||||
changeSwitch(switchList) {
|
||||
const result = this.judgeRelateSwitch();
|
||||
if (!result) { this.addModel.relateSwitchList.pop(); }
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field != 'relatedSwitch') {
|
||||
|
||||
} else if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase() && this.field == 'relatedSwitch') {
|
||||
this.activeName = 'second';
|
||||
if (!this.addModel.relateSwitchList.includes(selected.code)) {
|
||||
this.judgeRelateSwitch() && this.addModel.relateSwitchList.push(selected.code);
|
||||
}
|
||||
}
|
||||
},
|
||||
judgeRelateSwitch() {
|
||||
if (this.addModel.relateSwitchList.length >= 4) {
|
||||
this.$message.error('关联的道岔不能超过4个');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.card {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
@ -66,6 +66,7 @@ import Arrow from './arrow';
|
||||
import SplitScreen from './splitScreen';
|
||||
import FloodGate from './floodGate';
|
||||
import DirectionRod from './directionRod';
|
||||
import Cross from './cross';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -95,7 +96,8 @@ export default {
|
||||
Arrow,
|
||||
SplitScreen,
|
||||
FloodGate,
|
||||
DirectionRod
|
||||
DirectionRod,
|
||||
Cross
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -135,7 +137,8 @@ export default {
|
||||
{label: '站间分隔', name:'SplitStation', menus:SplitStation},
|
||||
{label: '箭头', name:'Arrow', menus:Arrow},
|
||||
{label: '防淹门', name: 'FloodGate', menus: FloodGate},
|
||||
{label: '方向杆', name: 'DirectionRod', menus: DirectionRod}
|
||||
{label: '方向杆', name: 'DirectionRod', menus: DirectionRod},
|
||||
{label: this.$t('map.cross'), name: 'Cross', menus: Cross}
|
||||
],
|
||||
selectDevice:'',
|
||||
enabledTab: 'Section',
|
||||
|
@ -1,17 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
|
||||
<div style="text-align: center;">
|
||||
<span>生成地图:</span>
|
||||
<el-select v-model="mapId" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in mapList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="100px" :rules="rules">
|
||||
<el-form-item label="生成地图:" prop="mapId">
|
||||
<el-select v-model="form.mapId" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in mapList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" :loading="loading" @click="doCreate">{{ loading? '生成中':$t('global.confirm') }}</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
@ -34,8 +35,13 @@ export default {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
title: '一键生成课程和试卷',
|
||||
mapId: '',
|
||||
loading: false
|
||||
form: {mapId: ''},
|
||||
loading: false,
|
||||
rules: {
|
||||
mapId: [
|
||||
{ required: true, message: '请选择生成地图', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@ -43,16 +49,20 @@ export default {
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doCreate() {
|
||||
this.loading = true;
|
||||
aKeyGeneratingLesson([this.mapId]).then(resp => {
|
||||
this.$message.success('生成课程、试卷成功!');
|
||||
this.loading = false;
|
||||
this.dialogVisible = false;
|
||||
this.$emit('reloadTable');
|
||||
}).catch(() => {
|
||||
this.$message.error('生成课程、试卷失败!');
|
||||
this.dialogVisible = false;
|
||||
this.loading = false;
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
aKeyGeneratingLesson([this.mapId]).then(resp => {
|
||||
this.$message.success('生成课程、试卷成功!');
|
||||
this.loading = false;
|
||||
this.dialogVisible = false;
|
||||
this.$emit('reloadTable');
|
||||
}).catch(() => {
|
||||
this.$message.error('生成课程、试卷失败!');
|
||||
this.dialogVisible = false;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
|
@ -18,9 +18,9 @@
|
||||
<el-table-column :label="this.$t('global.operate')">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="goLesson(scope.row)">{{ $t('teach.enterTheCourse') }}</el-button>
|
||||
<el-button v-if="(isLessonCreator && userId === scope.row.creatorId) || isAdmin" size="mini" type="primary" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button v-if="(isLessonCreator && userId === scope.row.creatorId) || isAdmin" size="mini" type="warning" @click="handleSoldOut(scope.row)">下架</el-button>
|
||||
<el-button v-if="(isLessonCreator && userId === scope.row.creatorId) || isAdmin" size="mini" type="danger" @click="handleDelete(scope.row)">删除课程</el-button>
|
||||
<el-button v-if="((isLessonCreator && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="primary" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button v-if="((isLessonCreator && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="warning" @click="handleSoldOut(scope.row)">下架</el-button>
|
||||
<el-button v-if="((isLessonCreator && userId === scope.row.creatorId) || isAdmin) && !scope.row.systemFault" size="mini" type="danger" @click="handleDelete(scope.row)">删除课程</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -173,8 +173,9 @@ export default {
|
||||
if (checkId) {
|
||||
const checkIdDom = document.getElementById(checkId);
|
||||
const mapTreeDom = document.getElementById('trainingMapTree');
|
||||
mapTreeDom.scrollTop = checkIdDom.offsetTop;
|
||||
|
||||
if (checkIdDom && mapTreeDom) {
|
||||
mapTreeDom.scrollTop = checkIdDom.offsetTop;
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
}, 200);
|
||||
|
Loading…
Reference in New Issue
Block a user