Merge remote-tracking branch 'remotes/origin/dev' into test
This commit is contained in:
commit
68d13d935f
@ -27,7 +27,7 @@ export default {
|
|||||||
this.subscribeMessage(val);
|
this.subscribeMessage(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.beLogout': async function(val) {
|
'$store.state.socket.beLogoutCount': async function(val) {
|
||||||
this.$alert(this.$t('tip.logoutTips'), this.$t('tip.hint'), {
|
this.$alert(this.$t('tip.logoutTips'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
callback: action => {
|
callback: action => {
|
||||||
|
@ -12,90 +12,90 @@ Vue.component('QueryListPage', QueryListPage);
|
|||||||
Vue.component('TurnbackBar', TurnbackBar);
|
Vue.component('TurnbackBar', TurnbackBar);
|
||||||
|
|
||||||
Vue.prototype.$ConstSelect = (function() {
|
Vue.prototype.$ConstSelect = (function() {
|
||||||
ConstConfig.ConstSelect.translate = function(value, codeName) {
|
ConstConfig.ConstSelect.translate = function(value, codeName) {
|
||||||
if (codeName) {
|
if (codeName) {
|
||||||
const obj = this[codeName].filter(function(item) {
|
const obj = this[codeName].filter(function(item) {
|
||||||
return item.value === value;
|
return item.value === value;
|
||||||
})[0];
|
})[0];
|
||||||
return obj && obj.label;
|
return obj && obj.label;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return ConstConfig.ConstSelect;
|
return ConstConfig.ConstSelect;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
Vue.prototype.$Dictionary = Dictionary;
|
Vue.prototype.$Dictionary = Dictionary;
|
||||||
|
|
||||||
Vue.prototype.__windowResizeFlag = false;
|
Vue.prototype.__windowResizeFlag = false;
|
||||||
Vue.prototype.$addWindowResizeListener = function(cb) {
|
Vue.prototype.$addWindowResizeListener = function(cb) {
|
||||||
window.addEventListener('resize', function() {
|
window.addEventListener('resize', function() {
|
||||||
if (!Vue.__windowResizeFlag) {
|
if (!Vue.__windowResizeFlag) {
|
||||||
Vue.__windowResizeFlag = true;
|
Vue.__windowResizeFlag = true;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
Vue.__windowResizeFlag = false;
|
Vue.__windowResizeFlag = false;
|
||||||
cb();
|
cb();
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Vue.prototype.$theme = new Theme();
|
Vue.prototype.$theme = new Theme();
|
||||||
Vue.prototype.$messageBox = function(msge) {
|
Vue.prototype.$messageBox = function(msge) {
|
||||||
if (this.$confirm) {
|
if (this.$confirm) {
|
||||||
this.$confirm(`${msge || this.$t('global.processFailure')}!`, this.$t('global.tips'), {
|
this.$confirm(`${msge || this.$t('global.processFailure')}`, this.$t('global.tips'), {
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
showCancelButton: false,
|
showCancelButton: false,
|
||||||
center: true
|
center: true
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Vue.prototype.$convertField = function(fieldValue, enumList, converFormat, isList = false) {
|
Vue.prototype.$convertField = function(fieldValue, enumList, converFormat, isList = false) {
|
||||||
const arr = [];
|
const arr = [];
|
||||||
if (enumList && converFormat && converFormat.length >= 2) {
|
if (enumList && converFormat && converFormat.length >= 2) {
|
||||||
const value = converFormat[0];
|
const value = converFormat[0];
|
||||||
const label = converFormat[1];
|
const label = converFormat[1];
|
||||||
if (isList) {
|
if (isList) {
|
||||||
enumList.forEach((element, i) => {
|
enumList.forEach((element, i) => {
|
||||||
fieldValue.forEach((v, j) => {
|
fieldValue.forEach((v, j) => {
|
||||||
if ('' + fieldValue[j] === '' + enumList[i][value]) {
|
if ('' + fieldValue[j] === '' + enumList[i][value]) {
|
||||||
arr.push(enumList[i][label]);
|
arr.push(enumList[i][label]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
for (let i = 0; i < enumList.length; i++) {
|
for (let i = 0; i < enumList.length; i++) {
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
if ('' + fieldValue === '' + enumList[i][value]) {
|
||||||
return enumList[i][label];
|
return enumList[i][label];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return isList ? arr: '';
|
return isList ? arr : '';
|
||||||
};
|
};
|
||||||
|
|
||||||
Vue.prototype.$convertSpecifiedField = function(dataDict, enumList, key, value, fieldList) {
|
Vue.prototype.$convertSpecifiedField = function(dataDict, enumList, key, value, fieldList) {
|
||||||
if (dataDict && enumList && fieldList && enumList.length && fieldList.length) {
|
if (dataDict && enumList && fieldList && enumList.length && fieldList.length) {
|
||||||
fieldList.forEach(field => {
|
fieldList.forEach(field => {
|
||||||
enumList.forEach(elem => {
|
enumList.forEach(elem => {
|
||||||
if (elem[key] === dataDict[field]) {
|
if (elem[key] === dataDict[field]) {
|
||||||
dataDict[field] = elem[value];
|
dataDict[field] = elem[value];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Vue.prototype.$convertList = function(FromList, ToList, checktypeFunction) {
|
Vue.prototype.$convertList = function(FromList, ToList, checktypeFunction) {
|
||||||
if (FromList) {
|
if (FromList) {
|
||||||
ToList.length = 0;
|
ToList.length = 0;
|
||||||
FromList.forEach(elem => {
|
FromList.forEach(elem => {
|
||||||
if (checktypeFunction(elem)) {
|
if (checktypeFunction(elem)) {
|
||||||
ToList.push({ value: elem.code, label: elem.name });
|
ToList.push({ value: elem.code, label: elem.name });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -530,7 +530,7 @@ const map = {
|
|||||||
if (map && map.skinVO) {
|
if (map && map.skinVO) {
|
||||||
state.map = map;
|
state.map = map;
|
||||||
state.mapDevice = parser(map, map.skinVO.code);
|
state.mapDevice = parser(map, map.skinVO.code);
|
||||||
Vue.prototype.$jlmap.setMapDevice(state.mapDevice);
|
Vue.prototype.$jlmap && Vue.prototype.$jlmap.setMapDevice(state.mapDevice);
|
||||||
} else {
|
} else {
|
||||||
state.map = null;
|
state.map = null;
|
||||||
state.mapDevice = {};
|
state.mapDevice = {};
|
||||||
|
@ -9,9 +9,6 @@ function handle(state, data) {
|
|||||||
case 'Order_Pay_Result': // 订单支付结果消息
|
case 'Order_Pay_Result': // 订单支付结果消息
|
||||||
state.payOrder = msg;
|
state.payOrder = msg;
|
||||||
break;
|
break;
|
||||||
case 'Be_Logged_Out': // 重复登录被登出
|
|
||||||
state.beLogout = msg;
|
|
||||||
break;
|
|
||||||
case 'JointTraining_Room': // 综合演练室-房间消息
|
case 'JointTraining_Room': // 综合演练室-房间消息
|
||||||
if (!path.includes('/plan') || !path.includes('/dp/')) {
|
if (!path.includes('/plan') || !path.includes('/dp/')) {
|
||||||
state.jointRoomInfo = msg; // 房间信息
|
state.jointRoomInfo = msg; // 房间信息
|
||||||
@ -74,6 +71,9 @@ function handle(state, data) {
|
|||||||
case 'JointTraining_Device':
|
case 'JointTraining_Device':
|
||||||
state.realDeviceInfo++;
|
state.realDeviceInfo++;
|
||||||
break;
|
break;
|
||||||
|
case 'Be_Logged_Out': // 重复登录被登出
|
||||||
|
state.beLogoutCount++;
|
||||||
|
break;
|
||||||
case 'Simulation_Control_Pause': // 暂停中
|
case 'Simulation_Control_Pause': // 暂停中
|
||||||
store.dispatch('scriptRecord/updateSimulationPause', msg);
|
store.dispatch('scriptRecord/updateSimulationPause', msg);
|
||||||
break;
|
break;
|
||||||
@ -196,7 +196,6 @@ const socket = {
|
|||||||
|
|
||||||
state: {
|
state: {
|
||||||
payOrder: {}, // 支付消息
|
payOrder: {}, // 支付消息
|
||||||
beLogout: {}, // 被登出
|
|
||||||
jointRoomInfo: {}, // 受邀请房间信息
|
jointRoomInfo: {}, // 受邀请房间信息
|
||||||
chatContent: {}, // 聊天室聊天内容
|
chatContent: {}, // 聊天室聊天内容
|
||||||
roleList: [], // 设置角色信息
|
roleList: [], // 设置角色信息
|
||||||
@ -223,7 +222,8 @@ const socket = {
|
|||||||
permissionOver: {}, // 权限结束
|
permissionOver: {}, // 权限结束
|
||||||
|
|
||||||
tipOperateCount: 0, // 任务结束提示消息
|
tipOperateCount: 0, // 任务结束提示消息
|
||||||
realDeviceInfo: 0 // 真实设备信息
|
realDeviceInfo: 0, // 真实设备信息
|
||||||
|
beLogoutCount: 0 // 被登出
|
||||||
},
|
},
|
||||||
|
|
||||||
getters: {
|
getters: {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('map.mapName')" prop="name">
|
<el-form-item :label="$t('map.mapName')" prop="name">
|
||||||
<el-input v-model="newModel.name" />
|
<el-input v-model.trim="newModel.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('map.mapName')" prop="name">
|
<el-form-item :label="$t('map.mapName')" prop="name">
|
||||||
<el-input v-model="pullModel.name" />
|
<el-input v-model.trim="pullModel.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@ -96,7 +96,7 @@ export default {
|
|||||||
{ required: true, message: this.$t('rules.pleaseSelectMapSource'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseSelectMapSource'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
cityList: []
|
cityList: []
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('map.mapName')" prop="name">
|
<el-form-item :label="$t('map.mapName')" prop="name">
|
||||||
<el-input v-model="editModel.name" />
|
<el-input v-model.trim="editModel.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
@ -176,11 +176,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async confirm() {
|
confirm() {
|
||||||
const roleName = this.memberList.find(elem=>{ return elem.id == this.form.role; });
|
const roleName = this.memberList.find(elem=>{ return elem.id == this.form.role; });
|
||||||
this.$emit('selectQuest', this.row, this.form.role, this.mapLocation, roleName.role);
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.roleDoClose();
|
this.roleDoClose();
|
||||||
|
this.$emit('selectQuest', this.row, this.form.role, this.mapLocation, roleName.role);
|
||||||
},
|
},
|
||||||
|
|
||||||
roleDoClose() {
|
roleDoClose() {
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
:offset="offset"
|
:offset="offset"
|
||||||
:group="group"
|
:group="group"
|
||||||
@switchMode="switchMode"
|
@switchMode="switchMode"
|
||||||
|
@selectQuest="selectQuest"
|
||||||
/>
|
/>
|
||||||
<!--@runPlanViewShow="runPlanViewShow"
|
<!--@runPlanViewShow="runPlanViewShow"
|
||||||
@faultChooseShow="faultChooseShow"
|
@faultChooseShow="faultChooseShow"
|
||||||
|
@ -186,8 +186,6 @@ export default {
|
|||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
this.$store.dispatch('training/over').then(() => {
|
this.$store.dispatch('training/over').then(() => {
|
||||||
EventBus.$emit('runPlanStop');
|
|
||||||
EventBus.$emit('chatSubscribeStop');
|
|
||||||
history.go(-1);
|
history.go(-1);
|
||||||
Notification.closeAll();
|
Notification.closeAll();
|
||||||
});
|
});
|
||||||
|
@ -172,7 +172,7 @@ export default {
|
|||||||
this.$refs.addQuest.doShow();
|
this.$refs.addQuest.doShow();
|
||||||
},
|
},
|
||||||
viewScriptRoles() {
|
viewScriptRoles() {
|
||||||
const row = {id: this.$route.query.scriptId};
|
const row = {id: this.$route.query.scriptId, group:this.$route.query.group};
|
||||||
this.$refs.addQuest.handleLoad(1, row);
|
this.$refs.addQuest.handleLoad(1, row);
|
||||||
},
|
},
|
||||||
selectQuest(row, id, mapLocation, roleName) {
|
selectQuest(row, id, mapLocation, roleName) {
|
||||||
|
@ -104,7 +104,8 @@ export default {
|
|||||||
updateTime: ''
|
updateTime: ''
|
||||||
},
|
},
|
||||||
detailShow: false,
|
detailShow: false,
|
||||||
examIndex: 0
|
examIndex: 0,
|
||||||
|
scanInter:null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -115,12 +116,7 @@ export default {
|
|||||||
return this.$store.state.exam.totalTime - this.$store.state.exam.usedTime;
|
return this.$store.state.exam.totalTime - this.$store.state.exam.usedTime;
|
||||||
},
|
},
|
||||||
formatRemainTime() {
|
formatRemainTime() {
|
||||||
if (this.remainTime < 0) {
|
return this.remainTime >= 0 ? timeFormat(this.remainTime) : '';
|
||||||
this.$message.success(this.$t('display.exam.autoSubmit'));
|
|
||||||
this.submit();
|
|
||||||
}
|
|
||||||
|
|
||||||
return timeFormat(this.remainTime);
|
|
||||||
},
|
},
|
||||||
isFirst() {
|
isFirst() {
|
||||||
return this.examIndex == 0;
|
return this.examIndex == 0;
|
||||||
@ -129,8 +125,15 @@ export default {
|
|||||||
return this.examIndex == this.trainingList.length - 1;
|
return this.examIndex == this.trainingList.length - 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
watch: {
|
||||||
this.loadInitData();
|
'$store.state.map.mapViewLoadedCount': function() {
|
||||||
|
this.$store.dispatch('exam/stopCountTime');
|
||||||
|
this.loadInitData();
|
||||||
|
this.$store.dispatch('exam/countUsedTime');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.clearScanCommit();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
backList() {
|
backList() {
|
||||||
@ -170,13 +173,13 @@ export default {
|
|||||||
this.detailShow = false;
|
this.detailShow = false;
|
||||||
},
|
},
|
||||||
// 获取试题列表
|
// 获取试题列表
|
||||||
loadInitData() {
|
async loadInitData() {
|
||||||
// 刷新考试列表
|
// 刷新考试列表
|
||||||
refreshExamList(this.$route.query.userExamId).then(response => {
|
refreshExamList(this.$route.query.userExamId).then(response => {
|
||||||
this.examName = response.data.examName;
|
this.examName = response.data.examName;
|
||||||
this.$store.dispatch('exam/setUsedTime', response.data.usedTime);
|
this.$store.commit('exam/setUsedTime', response.data.usedTime);
|
||||||
this.$store.dispatch('exam/setTotalTime', response.data.duration);
|
this.$store.commit('exam/setTotalTime', response.data.duration);
|
||||||
this.$store.dispatch('trainingList/setTrainingList', response.data.userExamQuestionsVOs).then(response => { });
|
this.$store.commit('trainingList/setTrainingList', response.data.userExamQuestionsVOs);
|
||||||
const obj = {
|
const obj = {
|
||||||
trainingId: '',
|
trainingId: '',
|
||||||
id: ''
|
id: ''
|
||||||
@ -190,6 +193,7 @@ export default {
|
|||||||
obj.id = response.data.userExamQuestionsVOs[0].id;
|
obj.id = response.data.userExamQuestionsVOs[0].id;
|
||||||
}
|
}
|
||||||
this.selectedTraining(obj);
|
this.selectedTraining(obj);
|
||||||
|
this.scanCommit();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
// 如果时50009则表示考试已完成,不能再次进行y
|
// 如果时50009则表示考试已完成,不能再次进行y
|
||||||
if (error.code === 500009) {
|
if (error.code === 500009) {
|
||||||
@ -199,9 +203,22 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.shrink();
|
this.shrink();
|
||||||
},
|
},
|
||||||
|
scanCommit() {
|
||||||
|
this.clearScanCommit();
|
||||||
|
this.scanInter = setInterval(()=>{
|
||||||
|
if (this.remainTime < 0) {
|
||||||
|
this.$message.success(this.$t('display.exam.autoSubmit'));
|
||||||
|
this.clearScanCommit();
|
||||||
|
this.submit();
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
clearScanCommit() {
|
||||||
|
clearInterval(this.scanInter);
|
||||||
|
this.scanInter = null;
|
||||||
|
},
|
||||||
nextExam() {
|
nextExam() {
|
||||||
const obj = {
|
const obj = {
|
||||||
trainingId: '',
|
trainingId: '',
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-form ref="form" :model="newModel" label-width="140px" size="mini" :rules="rules" @submit.native.prevent>
|
<el-form ref="form" :model="newModel" label-width="140px" size="mini" :rules="rules" @submit.native.prevent>
|
||||||
<el-form-item :label="this.$t('planMonitor.runGraphName')+this.$t('global.colon')" prop="name">
|
<el-form-item :label="this.$t('planMonitor.runGraphName')+this.$t('global.colon')" prop="name">
|
||||||
<el-input v-model="newModel.name" autofocus />
|
<el-input v-model.trim="newModel.name" autofocus />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('planMonitor.runGraphName')+this.$t('global.colon')" prop="name">
|
<el-form-item :label="this.$t('planMonitor.runGraphName')+this.$t('global.colon')" prop="name">
|
||||||
<el-input v-model="pullModel.name" autofocus />
|
<el-input v-model.trim="pullModel.name" autofocus />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -91,8 +91,8 @@ export default {
|
|||||||
this.$message.success(this.$t('tip.runGraphNameModifiedSuccessfully'));
|
this.$message.success(this.$t('tip.runGraphNameModifiedSuccessfully'));
|
||||||
this.$emit('renewal');
|
this.$emit('renewal');
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch(() => {
|
}).catch(error => {
|
||||||
this.$messageBox(this.$t('tip.modifyRunGraphNameFailed'));
|
this.$messageBox(this.$t('tip.modifyRunGraphNameFailed') + error.message);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -356,6 +356,7 @@ export default {
|
|||||||
this.PlanConvert = this.$theme.loadPlanConvert(lineCode);
|
this.PlanConvert = this.$theme.loadPlanConvert(lineCode);
|
||||||
|
|
||||||
const editData = this.$store.state.runPlan.editData[this.editModel.serviceNumber];
|
const editData = this.$store.state.runPlan.editData[this.editModel.serviceNumber];
|
||||||
|
debugger;
|
||||||
if (editData) {
|
if (editData) {
|
||||||
const tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex; });
|
const tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex; });
|
||||||
const trainInfo = editData.trainMap[tripNumberList[0]];
|
const trainInfo = editData.trainMap[tripNumberList[0]];
|
||||||
|
@ -27,6 +27,7 @@ import { getStationList, queryRunPlan } from '@/api/runplan';
|
|||||||
import {getRpDetailByUserMapId, getUserMapDetailByMapId} from '@/api/designPlatform';
|
import {getRpDetailByUserMapId, getUserMapDetailByMapId} from '@/api/designPlatform';
|
||||||
import { loadMapDataById } from '@/utils/loaddata';
|
import { loadMapDataById } from '@/utils/loaddata';
|
||||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||||
|
import {getMapDetail} from '@/api/jmap/mapdraft';
|
||||||
import DataTable from './menus/components/dataTable';
|
import DataTable from './menus/components/dataTable';
|
||||||
import echarts from 'echarts';
|
import echarts from 'echarts';
|
||||||
|
|
||||||
@ -373,13 +374,20 @@ export default {
|
|||||||
this.$store.dispatch('runPlan/clear').then(() => {
|
this.$store.dispatch('runPlan/clear').then(() => {
|
||||||
this.loadInitChart().then(() => {
|
this.loadInitChart().then(() => {
|
||||||
if (this.$route.query.mapId) {
|
if (this.$route.query.mapId) {
|
||||||
loadMapDataById(this.$route.query.mapId);
|
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||||
|
getMapDetail(this.$route.query.mapId).then(response => {
|
||||||
|
this.$store.dispatch('map/setMapData', response.data).then(()=>{
|
||||||
|
this.$store.dispatch('map/clearJlmapTrainView');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
loadMapDataById(this.$route.query.mapId);
|
||||||
|
}
|
||||||
getStationList(this.$route.query.mapId).then(resp => {
|
getStationList(this.$route.query.mapId).then(resp => {
|
||||||
this.$store.dispatch('runPlan/setStations', resp.data).then(() => {
|
this.$store.dispatch('runPlan/setStations', resp.data).then(() => {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
if (this.planId) {
|
if (this.planId) {
|
||||||
this.myChart && this.myChart.showLoading();
|
this.myChart && this.myChart.showLoading();
|
||||||
|
|
||||||
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||||
getRpDetailByUserMapId(this.planId).then(rest => {
|
getRpDetailByUserMapId(this.planId).then(rest => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
||||||
|
@ -38,8 +38,8 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '150px',
|
labelWidth: '150px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'name', label: this.$t('scriptRecord.scriptName'), type: 'text', required: true},
|
{ prop: 'name', label: this.$t('scriptRecord.scriptName'), type: 'text' },
|
||||||
{ prop: 'description', label: this.$t('scriptRecord.scriptDescription'), type: 'textarea', required: true}
|
{ prop: 'description', label: this.$t('scriptRecord.scriptDescription'), type: 'textarea' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -47,18 +47,28 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const crules = {
|
const crules = {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: this.$t('scriptRecord.inputScriptName'), trigger: 'blur' },
|
// { required: true, message: this.$t('scriptRecord.inputScriptName'), trigger: 'blur' },
|
||||||
{ required: true, message: this.$t('scriptRecord.inputScriptName'), trigger: 'change' }
|
// { required: true, message: this.$t('scriptRecord.inputScriptName'), trigger: 'change' }
|
||||||
],
|
{ validator: this.validateScriptName, trigger: 'blur' },
|
||||||
description:[
|
{ validator: this.validateScriptName, trigger: 'change' }
|
||||||
{ required: true, message: this.$t('scriptRecord.inputScriptDescription'), trigger: 'blur' },
|
|
||||||
{ required: true, message: this.$t('scriptRecord.inputScriptDescription'), trigger: 'change' }
|
|
||||||
]
|
]
|
||||||
|
// description:[
|
||||||
|
// { required: true, message: this.$t('scriptRecord.inputScriptDescription'), trigger: 'blur' },
|
||||||
|
// { required: true, message: this.$t('scriptRecord.inputScriptDescription'), trigger: 'change' }
|
||||||
|
// ]
|
||||||
};
|
};
|
||||||
return crules;
|
return crules;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
validateScriptName(rule, value, callback) {
|
||||||
|
if (value.trim().length === 0) {
|
||||||
|
this.formModel.name = this.formModel.name.replace(/\s/g, '');
|
||||||
|
return callback(new Error(this.$t('scriptRecord.inputScriptName')));
|
||||||
|
} else {
|
||||||
|
return callback();
|
||||||
|
}
|
||||||
|
},
|
||||||
doShow(questid) {
|
doShow(questid) {
|
||||||
if (questid) {
|
if (questid) {
|
||||||
getQuestById(questid).then(resp=>{
|
getQuestById(questid).then(resp=>{
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<span> km/h</span>
|
<span> km/h</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('scriptRecord.signal')" class="conditionVO" prop="param.signal">
|
<el-form-item :label="$t('scriptRecord.signal')" class="conditionVO" prop="param.signal">
|
||||||
<el-input v-model="commandData.param.signal" disabled="disabled" style="width:130px" />
|
<el-input v-model="signalName" disabled="disabled" style="width:130px" />
|
||||||
<el-button
|
<el-button
|
||||||
:type="field === 'selectSingalCode' ? 'danger' : 'primary'"
|
:type="field === 'selectSingalCode' ? 'danger' : 'primary'"
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -58,7 +58,8 @@ export default {
|
|||||||
{id:'NRM', name:'NRM'}
|
{id:'NRM', name:'NRM'}
|
||||||
],
|
],
|
||||||
field: '',
|
field: '',
|
||||||
fieldS:''
|
fieldS:'',
|
||||||
|
signalName:''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -84,7 +85,8 @@ export default {
|
|||||||
},
|
},
|
||||||
deviceSelect(em) {
|
deviceSelect(em) {
|
||||||
if (this.field.toUpperCase() === 'selectSingalCode'.toUpperCase() && em._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (this.field.toUpperCase() === 'selectSingalCode'.toUpperCase() && em._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
this.commandData.param.signal = em.name;
|
this.commandData.param.signal = em.code;
|
||||||
|
this.signalName = em.name;
|
||||||
this.field = '';
|
this.field = '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user