通用ibp&留言板管理&贵装备课程发布调整

This commit is contained in:
fan 2020-12-17 13:19:12 +08:00
parent 68a0eadf9b
commit 855295ca75
21 changed files with 330 additions and 149 deletions

View File

@ -82,3 +82,19 @@ export function getPostByProjectCode(projectCode) {
method: 'get' method: 'get'
}); });
} }
// 分页查询留言板
export function queryPostPage(params) {
return request({
url: `/api/learn/post`,
method: 'get',
params
});
}
// 创建留言版
export function createPost(data) {
return request({
url: `/api/learn/post`,
method: 'post',
data
});
}

View File

@ -86,5 +86,6 @@ export default {
authorApply: 'Grant application', authorApply: 'Grant application',
AuthorList: 'Authorization code list', AuthorList: 'Authorization code list',
questionsRuleManage: 'Question rule manage', questionsRuleManage: 'Question rule manage',
preTheoryData: 'Pre Theory Data' preTheoryData: 'Pre Theory Data',
boardManage: 'Message Board Manage'
}; };

View File

@ -91,5 +91,6 @@ export default {
authorApply: '授权申请', authorApply: '授权申请',
AuthorList: '授权列表', AuthorList: '授权列表',
questionsRuleManage: '出题规则管理', questionsRuleManage: '出题规则管理',
preTheoryData: '理论导入预处理' preTheoryData: '理论导入预处理',
boardManage: '留言板管理'
}; };

View File

@ -135,6 +135,7 @@ const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/ind
const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport'); const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport');
const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule'); const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule');
const MessageBoard = () => import('@/views/messageBoard/index'); const MessageBoard = () => import('@/views/messageBoard/index');
const BoardManage = () => import('@/views/messageBoard/manage');
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig'; // import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth'; // import { getSessionStorage } from '@/utils/auth';
@ -778,6 +779,13 @@ export const asyncRouter = [
i18n: 'router.companyManage' i18n: 'router.companyManage'
} }
}, },
{
path: 'boardManage',
component: BoardManage,
meta: {
i18n: 'router.boardManage'
}
},
{ // 出题规则管理 { // 出题规则管理
path: 'questionsRuleManage', path: 'questionsRuleManage',
hidden: true, hidden: true,

View File

@ -426,6 +426,8 @@ export const ProjectIcon = {
}; };
export const ProjectCode = { export const ProjectCode = {
login: 'DEFAULT',
designlogin: 'DEFAULT',
xty: 'XTY', xty: 'XTY',
designxty: 'XTY', designxty: 'XTY',
gzb: 'GZB', gzb: 'GZB',
@ -448,7 +450,7 @@ export const ProjectCode = {
designsdy: 'SDY' designsdy: 'SDY'
}; };
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号 export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl']; // 实训设计平台通过项目code获取地图列表的项目 export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd']; // 实训设计平台通过项目code获取地图列表的项目
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目 export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示 export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示 export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示

View File

@ -2,11 +2,11 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// 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://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.8.129:9000'; // 旭强 // BASE_API = 'http://192.168.8.129:9000'; // 旭强
// BASE_API = 'http://192.168.8.119:9000'; // 张赛 // BASE_API = 'http://192.168.8.119:9000'; // 张赛
BASE_API = 'http://192.168.8.110:9000'; // 杜康 // BASE_API = 'http://192.168.8.110: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

@ -1,6 +1,41 @@
<template> <template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center> <el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" /> <!--<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />-->
<el-form ref="form" :model="formModel" label-width="120px" :rules="rules">
<el-form-item label="发布数据地图" prop="dataMapId">
<el-select v-model="formModel.dataMapId" placeholder="请选择" @change="changeMapId">
<el-option
v-for="item in mapList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="发布地图车站" prop="dataStationCode">
<el-select v-model="formModel.dataStationCode" placeholder="请选择">
<el-option
v-for="item in dataStationList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="公共数据" prop="common">
<el-switch v-model="formModel.common" />
</el-form-item>
<el-form-item v-if="!formModel.common" label="关联车站" prop="stationCode">
<el-select v-model="formModel.stationCode" placeholder="请选择">
<el-option
v-for="item in stationList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button> <el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button> <el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
@ -23,6 +58,7 @@ export default {
formModel: { formModel: {
dataMapId: '', dataMapId: '',
dataStationCode: '', dataStationCode: '',
common: false,
stationCode: '' stationCode: ''
}, },
mapList: [], mapList: [],
@ -45,6 +81,12 @@ export default {
}, },
rules() { rules() {
const crules = { const crules = {
dataMapId: [
{ required: true, message: '请选择', trigger: 'change' }
],
dataStationCode: [
{ required: true, message: '请选择', trigger: 'change' }
],
stationCode: [ stationCode: [
{ required: true, message: '请选择', trigger: 'change' } { required: true, message: '请选择', trigger: 'change' }
] ]
@ -105,11 +147,11 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
}, },
doCreate() { doCreate() {
this.$refs.dataform.validateForm(() => { this.$refs.form.validate(() => {
const param = { const param = {
mapId: this.$route.params.mapId, mapId: this.$route.params.mapId,
ibpId: this.ibpMap[this.formModel.dataMapId + '-' + this.formModel.dataStationCode], ibpId: this.ibpMap[this.formModel.dataMapId + '-' + this.formModel.dataStationCode],
stationCode: this.formModel.stationCode stationCode: this.formModel.common ? null : this.formModel.stationCode
}; };
copyIbpData(param).then(resp => { copyIbpData(param).then(resp => {
this.$message.success('创建成功'); this.$message.success('创建成功');
@ -121,7 +163,7 @@ export default {
}); });
}, },
doClose() { doClose() {
this.$refs.dataform.resetForm(); this.$refs.form.resetFields();
this.dialogVisible = false; this.dialogVisible = false;
}, },
async changeMapId(val) { async changeMapId(val) {

View File

@ -1,6 +1,20 @@
<template> <template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center> <el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" /> <el-form ref="form" :model="formModel" label-width="80px" :rules="rules">
<el-form-item label="公共数据" prop="common">
<el-switch v-model="formModel.common" />
</el-form-item>
<el-form-item v-if="!formModel.common" label="关联车站" prop="stationCode">
<el-select v-model="formModel.stationCode" placeholder="请选择">
<el-option
v-for="item in stationList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button v-if="!isPut" type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button> <el-button v-if="!isPut" type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
<el-button v-if="isPut" type="primary" @click="putInfo">更新</el-button> <el-button v-if="isPut" type="primary" @click="putInfo">更新</el-button>
@ -30,20 +44,12 @@ export default {
stationList: [], stationList: [],
ibpId: '', ibpId: '',
formModel: { formModel: {
stationCode: '' stationCode: '',
common: false
} }
}; };
}, },
computed: { computed: {
form() {
const form = {
labelWidth: '150px',
items: [
{ prop: 'stationCode', label: '关联车站:', type: 'select', options: this.stationList }
]
};
return form;
},
rules() { rules() {
const crules = { const crules = {
stationCode: [ stationCode: [
@ -82,6 +88,7 @@ export default {
doShow(data) { doShow(data) {
if (data) { if (data) {
this.formModel.stationCode = data.stationCode; this.formModel.stationCode = data.stationCode;
this.formModel.common = !data.stationCode;
this.ibpId = data.id; this.ibpId = data.id;
this.isPut = true; this.isPut = true;
} else { } else {
@ -90,10 +97,10 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
}, },
doCreate() { doCreate() {
this.$refs.dataform.validateForm(() => { this.$refs.form.validate(() => {
const param = { const param = {
mapId: this.$route.params.mapId, mapId: this.$route.params.mapId,
stationCode: this.formModel.stationCode stationCode: this.formModel.common ? null : this.formModel.stationCode
}; };
createIbp(param).then(resp => { createIbp(param).then(resp => {
this.$message.success('创建成功'); this.$message.success('创建成功');
@ -105,10 +112,10 @@ export default {
}); });
}, },
putInfo() { putInfo() {
this.$refs.dataform.validateForm(() => { this.$refs.form.validate(() => {
const param = { const param = {
mapId: this.$route.params.mapId, mapId: this.$route.params.mapId,
stationCode: this.formModel.stationCode stationCode: this.formModel.common ? null : this.formModel.stationCode
}; };
putIbpBasicInfo(this.ibpId, param).then(resp => { putIbpBasicInfo(this.ibpId, param).then(resp => {
this.$message.success('更新成功'); this.$message.success('更新成功');
@ -121,7 +128,7 @@ export default {
}); });
}, },
doClose() { doClose() {
this.$refs.dataform.resetForm(); this.$refs.form.resetFields();
this.dialogVisible = false; this.dialogVisible = false;
} }
} }

View File

@ -5,7 +5,7 @@
<el-button size="small" type="primary" class="createScript" style="margin-top: 5px" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button> <el-button size="small" type="primary" class="createScript" style="margin-top: 5px" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button>
<el-button size="small" type="primary" class="createScript" @click="createByPublish">发布数据创建</el-button> <el-button size="small" type="primary" class="createScript" @click="createByPublish">发布数据创建</el-button>
</div> </div>
<QueryListPage ref="queryListPage" :cardPadding="50" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" /> <QueryListPage ref="queryListPage" :card-padding="50" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
<create-ibp ref="createScript" :title="'创建数据'" @reloadTable="reloadTable" /> <create-ibp ref="createScript" :title="'创建数据'" @reloadTable="reloadTable" />
<create-ibp ref="modifyScript" :title="'修改数据'" @reloadTable="reloadTable" /> <create-ibp ref="modifyScript" :title="'修改数据'" @reloadTable="reloadTable" />
<copy-ibp ref="copyIbp" @reloadTable="reloadTable" /> <copy-ibp ref="copyIbp" @reloadTable="reloadTable" />
@ -123,6 +123,9 @@ export default {
} }
}, },
covertData(row) { covertData(row) {
if (!row.stationCode) {
return '公共数据';
}
const staitonlist = this.stationList.filter(element => { const staitonlist = this.stationList.filter(element => {
return row.stationCode == element.code; return row.stationCode == element.code;
}); });

View File

@ -4,7 +4,7 @@
<div class="clearfix"> <div class="clearfix">
<div style="float: left;padding-top: 17px;"> <div style="float: left;padding-top: 17px;">
<span style="padding-top: 5px;">{{ $t('ibp.stationName') }}</span> <span style="padding-top: 5px;">{{ $t('ibp.stationName') }}</span>
<span>{{ stationCode }}</span> <span>{{ stationName }}</span>
</div> </div>
<!-- <el-select v-model="stationCode" :placeholder="this.$t('rules.selectStation')" style="padding-top: 5px;" @change="changeStationCode"> <!-- <el-select v-model="stationCode" :placeholder="this.$t('rules.selectStation')" style="padding-top: 5px;" @change="changeStationCode">
<el-option <el-option
@ -98,10 +98,10 @@ export default {
}; };
}, },
computed:{ computed:{
stationCode() { stationName() {
if (this.stationOptions.length) { if (this.stationOptions.length) {
const obj = this.stationOptions.find(ele => ele.value == this.$route.query.stationCode); const obj = this.stationOptions.find(ele => ele.value == this.$route.query.stationCode);
return obj.label; return obj ? obj.label : '通用数据';
} }
return this.$route.query.stationCode; return this.$route.query.stationCode;
} }

View File

@ -27,7 +27,7 @@ export default {
return { return {
widthLeft: Number(localStore.get('LeftWidth')) || 450, widthLeft: Number(localStore.get('LeftWidth')) || 450,
size: { size: {
width: this.$store.state.app.width - 521 - Number(localStore.get('LeftWidth')) || 450, width: this.$store.state.app.width - 521 - (Number(localStore.get('LeftWidth')) || 450),
height: this.$store.state.app.height - 60 height: this.$store.state.app.height - 60
} }
}; };
@ -40,11 +40,12 @@ export default {
}, },
watch: { watch: {
'$store.state.app.windowSizeCount': function() { '$store.state.app.windowSizeCount': function() {
this.$store.dispatch('config/resize', { width: this.$store.state.app.width - this.widthLeft, height: this.$store.state.app.height - 60 }); this.size = { width: this.$store.state.app.width - 521 - this.widthLeft, height: this.$store.state.app.height - 60 };
this.$store.dispatch('config/resize', { width: this.$store.state.app.width - 521 - this.widthLeft, height: this.$store.state.app.height - 60 });
} }
}, },
created() { created() {
this.$store.dispatch('config/resize', { width: this.$store.state.app.width - this.widthLeft, height: this.$store.state.app.height - 60 }); this.$store.dispatch('config/resize', { width: this.$store.state.app.width - 521 - this.widthLeft, height: this.$store.state.app.height - 60 });
}, },
mounted() { mounted() {
this.$refs.ibpPlate.show(); this.$refs.ibpPlate.show();

View File

@ -22,6 +22,7 @@ import { getToken } from '@/utils/auth';
import { getIbpInfoByStation } from '@/api/ibp'; import { getIbpInfoByStation } from '@/api/ibp';
import { getSimulationInfoNew, getIbpInitialState } from '@/api/simulation'; import { getSimulationInfoNew, getIbpInitialState } from '@/api/simulation';
import BuzzerAudio from '@/assets/buzzer.mp3'; import BuzzerAudio from '@/assets/buzzer.mp3';
import { getStationList } from '@/api/runplan';
export default { export default {
name: 'Ibp', name: 'Ibp',
@ -145,10 +146,22 @@ export default {
return; return;
} }
try { try {
// const ibpDatas = ibpData[deviceCode]; const resp = await getStationList(this.$route.query.mapId);
const res = await getIbpInfoByStation(this.$route.query.mapId, deviceCode); const res = await getIbpInfoByStation(this.$route.query.mapId, deviceCode);
const stationIndex = resp.data.findIndex((item) => item.code == deviceCode);
if (res.data.data) { if (res.data.data) {
const ibpDatas = JSON.parse(res.data.data).drawData; let jsonData = res.data.data.replace(/R<>/g, resp.data[stationIndex].name);
if (resp.data[stationIndex - 1]) {
jsonData = jsonData.replace(/R<pre>/g, resp.data[stationIndex - 1].name);
} else {
jsonData = jsonData.replace(/R<pre>/g, '');
}
if (resp.data[stationIndex + 1]) {
jsonData = jsonData.replace(/R<next>/g, resp.data[stationIndex + 1].name);
} else {
jsonData = jsonData.replace(/R<next>/g, '');
}
const ibpDatas = JSON.parse(jsonData).drawData;
this.stationCode = deviceCode; this.stationCode = deviceCode;
getIbpInitialState(this.$route.query.group, this.stationCode).then(resp => { getIbpInitialState(this.$route.query.group, this.stationCode).then(resp => {
if (resp.data) { if (resp.data) {
@ -182,6 +195,7 @@ export default {
}); });
} }
} catch (error) { } catch (error) {
console.log(error, '===');
this.loading = false; this.loading = false;
this.$alert('当前ibp盘数据不存在', '信息', { this.$alert('当前ibp盘数据不存在', '信息', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -292,7 +306,6 @@ export default {
}, },
controlAudio(val) { controlAudio(val) {
const audio = document.getElementById('buzzer'); const audio = document.getElementById('buzzer');
// console.log(val, audio);
if (audio !== null) { if (audio !== null) {
if (val) { if (val) {
audio.play(); audio.play();

View File

@ -70,7 +70,7 @@ export default {
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' } { required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
], ],
classIdList: [ classIdList: [
{ required: true, message: '请选择课程归属班级', trigger: 'change' } { required: !(this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05')), message: '请选择课程归属班级', trigger: 'change' }
] ]
}; };
}, },
@ -89,7 +89,8 @@ export default {
name: model.name, name: model.name,
mapId: this.$route.params.mapId, mapId: this.$route.params.mapId,
prdType: model.prdType, prdType: model.prdType,
cityCode: model.cityCode cityCode: model.cityCode,
classIdList: []
}; };
this.dialogShow = true; this.dialogShow = true;
const project = getSessionStorage('project'); const project = getSessionStorage('project');

View File

@ -0,0 +1,87 @@
<template>
<el-dialog
title="创建留言板"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="留言板名称:" prop="title">
<el-input v-model="form.title" style="width: 200px;" />
</el-form-item>
<el-form-item label="归属项目:" prop="project">
<el-select v-model="form.project" placeholder="请选择">
<el-option
v-for="item in projectOptionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="commit"> </el-button>
</span>
</el-dialog>
</template>
<script>
import { createPost } from '@/api/learn';
export default {
name: 'Create',
props:{
projectOptionList:{
type: Array,
default() {
return [];
}
}
},
data() {
return {
dialogVisible: false,
form:{
title: '',
project: ''
},
rules: {
title: [
{ required: true, message: '请填写留言板名称', trigger: 'blur' }
],
project: [
{ required: true, message: '请选择归属项目', trigger: 'change' }
]
}
};
},
methods: {
handleClose() {
this.$refs.form.resetFields();
this.dialogVisible = false;
},
doShow() {
this.dialogVisible = true;
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
createPost(this.form).then(resp => {
this.$emit('reloadTable');
this.handleClose();
}).catch(() => {
this.$message.error('创建留言板失败!');
this.handleClose();
});
}
});
}
}
};
</script>
<style scoped>
</style>

View File

@ -1,14 +1,22 @@
<template> <template>
<div> <div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" /> <QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<create-draft ref="createDraft" :project-option-list="projectOptionList" @reloadTable="reloadTable" />
</div> </div>
</template> </template>
<script> <script>
import { queryPostPage } from '@/api/learn';
import { ProjectList} from '@/scripts/ProjectConfig';
import CreateDraft from './create';
export default { export default {
name: 'Manage', name: 'Manage',
components:{
CreateDraft
},
data() { data() {
return { return {
projectOptionList: [],
pagerConfig: { pagerConfig: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageIndex: 'pageNum' pageIndex: 'pageNum'
@ -17,9 +25,9 @@ export default {
labelWidth: '140px', labelWidth: '140px',
reset: false, reset: false,
queryObject: { queryObject: {
mapId: { project: {
type: 'select', type: 'select',
label: this.$t('orderAuthor.mapName'), label: '所属项目',
config: { config: {
data: [] data: []
} }
@ -27,130 +35,76 @@ export default {
} }
}, },
queryList: { queryList: {
query: this.queryFunction, query: queryPostPage,
selectCheckShow: false, selectCheckShow: false,
indexShow: true, indexShow: true,
columns: [ columns: [
{ {
title: this.$t('orderAuthor.organizationOrEnterprise'), title: '项目',
prop: 'organizationName' prop: 'project',
},
{
title: this.$t('orderAuthor.permissionName'),
prop: 'permissionName'
},
{
title: this.$t('orderAuthor.founder'),
prop: 'userNickname'
},
{
title: this.$t('orderAuthor.publicOrPrivate'),
prop: 'canDistribute',
type: 'tag', type: 'tag',
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); }, columnValue: (row) => { return this.getProjectName(row.project); },
tagType: (row) => { tagType: (row) => {
switch (row.canDistribute) { return 'success';
case true: return 'success';
case false: return 'danger';
}
} }
}, },
{ {
title: this.$t('orderAuthor.permanenceOrNot'), title: '留言板名称',
prop: 'forever', prop: 'title'
type: 'tag',
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
tagType: (row) => {
switch (row.forever) {
case true: return 'success';
case false: return 'danger';
}
}
},
{
title: this.$t('global.amount'),
prop: 'amount'
},
{
title: this.$t('global.remains'),
prop: 'remains'
},
{
title: this.$t('orderAuthor.startTime'),
prop: 'startTime',
type: 'formatter',
formatter: this.formatterDate
},
{
title: this.$t('orderAuthor.endTime'),
prop: 'endTime',
type: 'formatter',
formatter: this.formatterDate
},
{
title: this.$t('global.status'),
prop: 'status',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
tagType: (row) => {
switch (row.status) {
case '1': return 'success';
default: return 'danger';
}
}
}, },
{ {
type: 'button', type: 'button',
title: this.$t('global.operate'), title: this.$t('global.operate'),
width: this.$i18n.locale == 'en' ? '400' : '300', width: '350',
buttons: [ buttons: [
{ {
name: this.$t('orderAuthor.obtainQrCode'), name: '进入',
handleClick: this.handleRtCodeShow, handleClick: this.handleEnter
type: '',
showControl: (row) => { return row.status == '1'; }
},
{
name: this.$t('orderAuthor.setupFailure'),
handleClick: this.handleDelete,
type: '',
showControl: (row) => { return row.status == '1'; }
},
{
name: this.$t('orderAuthor.authorityDetails'),
handleClick: this.handlePermissionDetail,
type: '',
showControl: (row) => { return row.status == '1' && (row.source == '02' || row.source == '04'); }
},
{
name: this.$t('orderAuthor.distributionAttribution'),
handleClick: this.handleBelongs,
type: '',
showControl: (row) => { return row.amount !== row.remains; }
},
{
name: this.$t('orderAuthor.recovery'),
handleClick: this.handleRestore,
type: 'danger',
showControl: (row) => { return row.status == '1' && row.canRestore; }
} }
] ]
} }
], ],
actions: [ actions: [
{ text: this.$t('orderAuthor.createPackage'), handler: this.handleCreatePackage }, { text: '创建留言板', handler: this.handleCreateMessageBoard }
{ text: '创建项目权限包', handler: this.handleCreateProjectPackage },
{ text: this.$t('orderAuthor.receivingPermission'), handler: this.handlerPermission, show: process.env.NODE_ENV == 'development' }
] ]
} }
}; };
}, },
mounted() { mounted() {
this.loadInitData(); this.projectOptionList = [{value: 'DEFAULT', label: '玖琏云平台'}];
ProjectList.forEach(item => {
this.projectOptionList.push({value: item.value.toUpperCase(), label: item.label});
});
this.queryForm.queryObject.project.config.data = this.projectOptionList;
}, },
methods:{ methods:{
getProjectName(projectCode) {
let name;
this.projectOptionList.forEach(item => {
if (item.value.toUpperCase() == projectCode) {
name = item.label;
}
});
return name;
},
handleCreateMessageBoard() {
this.$refs.createDraft.doShow();
},
reloadTable() {
if (this.queryList && this.queryList.reload) {
this.queryList.reload();
}
},
handleEnter(index, row) {
const routeData = this.$router.resolve({
path:'/messageBoard',
query:{
project: row.project.toLowerCase(),
noPreLogout: true
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
}
} }
}; };
</script> </script>

View File

@ -23,7 +23,7 @@
<el-button v-if="schedulePreviewShow" type="primary" size="small" @click="schedulingView">派班计划预览</el-button> <el-button v-if="schedulePreviewShow" type="primary" size="small" @click="schedulingView">派班计划预览</el-button>
<el-button v-if="isContest" size="small" :disabled="practiceDisabled" @click="fieldPractice">实操练习</el-button> <el-button v-if="isContest" size="small" :disabled="practiceDisabled" @click="fieldPractice">实操练习</el-button>
<el-button v-if="isContest" size="small" @click="goTheoryQuiz">理论考试</el-button> <el-button v-if="isContest" size="small" @click="goTheoryQuiz">理论考试</el-button>
<el-button v-if="isContest || project === 'gzb'" size="small" @click="messageBoardShow">留言板</el-button> <el-button v-if="messageBoard" size="small" @click="messageBoardShow">留言板</el-button>
<el-button v-if="isContest" size="small" @click="contectUs">联系方式</el-button> <el-button v-if="isContest" size="small" @click="contectUs">联系方式</el-button>
</el-button-group> </el-button-group>
</div> </div>
@ -49,6 +49,8 @@ import Scheduling from '@/views/newMap/displayNew/demon/scheduling';
import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView'; import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs'; import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs';
import { getPostByProjectCode } from '@/api/learn';
import { ProjectCode } from '@/scripts/ProjectConfig';
export default { export default {
name:'DemonMenu', name:'DemonMenu',
components:{ components:{
@ -117,6 +119,7 @@ export default {
deviceif:false, deviceif:false,
deviceShow: true, deviceShow: true,
drivingShow: false, drivingShow: false,
messageBoard: false,
jl3dtrafficplan:this.$t('display.demon.trafficplantext'), jl3dtrafficplan:this.$t('display.demon.trafficplantext'),
jl3dtraffictrain:this.$t('display.demon.traffictraintext'), jl3dtraffictrain:this.$t('display.demon.traffictraintext'),
jl3dpassflow:this.$t('display.demon.passengerflow'), jl3dpassflow:this.$t('display.demon.passengerflow'),
@ -148,6 +151,13 @@ export default {
EventBus.$on('quitScene', () => { EventBus.$on('quitScene', () => {
this.practiceDisabled = false; this.practiceDisabled = false;
}); });
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
}, },
methods:{ methods:{
menuClick() { menuClick() {

View File

@ -9,7 +9,7 @@
</el-radio-group> </el-radio-group>
<span class="display-time">{{ formatUsedTime }}</span> <span class="display-time">{{ formatUsedTime }}</span>
<span v-if="demoMode === TrainingMode.TEST" class="display-score">{{ $t('display.lesson.score') }}{{ formatScore }}</span> <span v-if="demoMode === TrainingMode.TEST" class="display-score">{{ $t('display.lesson.score') }}{{ formatScore }}</span>
<el-button v-if="project == 'gzb'" size="small" @click="messageBoardShow">留言板</el-button> <el-button v-if="messageBoard" size="small" @click="messageBoardShow">留言板</el-button>
</el-row> </el-row>
</div> </div>
<div id="teachGroupButton" class="display-draft" :style="{bottom: offsetBottom + 'px'}"> <div id="teachGroupButton" class="display-draft" :style="{bottom: offsetBottom + 'px'}">
@ -37,6 +37,8 @@ import { timeFormat } from '@/utils/date';
import { getTrainingStepsDetailNew, loadTrainingInSimulation } from '@/api/jmap/training'; import { getTrainingStepsDetailNew, loadTrainingInSimulation } from '@/api/jmap/training';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import { getSessionStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
import { getPostByProjectCode } from '@/api/learn';
import { ProjectCode } from '@/scripts/ProjectConfig';
export default { export default {
name: 'MenuLesson', name: 'MenuLesson',
@ -73,6 +75,7 @@ export default {
isDisable: false, isDisable: false,
backDisable: false, backDisable: false,
startLoading: false, startLoading: false,
messageBoard: false,
prdTypeMap: { prdTypeMap: {
'01': '01', // => '01': '01', // =>
'02': '02', // => '02': '02', // =>
@ -132,6 +135,15 @@ export default {
this.resetTraining(); this.resetTraining();
} }
}, },
mounted() {
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
},
methods: { methods: {
tipInfo(opt) { tipInfo(opt) {
if (opt && opt.hasOwnProperty('color') && opt.hasOwnProperty('message')) { if (opt && opt.hasOwnProperty('color') && opt.hasOwnProperty('message')) {

View File

@ -17,7 +17,7 @@
<el-button size="small" @click="dispatcherWorkStation">ATS行调工作站</el-button> <el-button size="small" @click="dispatcherWorkStation">ATS行调工作站</el-button>
<!-- <el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('joinTraining.runGraphLoading') }}</el-button> --> <!-- <el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('joinTraining.runGraphLoading') }}</el-button> -->
<el-button size="small" @click="distribute">权限分发</el-button> <el-button size="small" @click="distribute">权限分发</el-button>
<el-button size="small" @click="messageBoardShow">留言板</el-button> <el-button v-if="messageBoard" size="small" @click="messageBoardShow">留言板</el-button>
<el-button size="small" @click="contectUs">联系方式</el-button> <el-button size="small" @click="contectUs">联系方式</el-button>
</el-button-group> </el-button-group>
<div class="trainExample"> <div class="trainExample">
@ -104,6 +104,8 @@ import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { getPostByProjectCode } from '@/api/learn';
import { ProjectCode } from '@/scripts/ProjectConfig';
export default { export default {
name:'PracticeDisplay', name:'PracticeDisplay',
components: { components: {
@ -124,7 +126,8 @@ export default {
openWindow:null, openWindow:null,
flowDataList:[], flowDataList:[],
currentFlowDataName:'', currentFlowDataName:'',
currentFlowDataId:'' currentFlowDataId:'',
messageBoard: false
}; };
}, },
computed:{ computed:{
@ -229,6 +232,13 @@ export default {
this.group = this.$route.query.group; this.group = this.$route.query.group;
this.setWindowSize(); this.setWindowSize();
this.initLoadData(); this.initLoadData();
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
}, },
methods:{ methods:{
async initLoadData() { // async initLoadData() { //

View File

@ -23,7 +23,7 @@
<el-button v-if="deviceManageShow" size="small" @click="handleEquipment">设备管理</el-button> <el-button v-if="deviceManageShow" size="small" @click="handleEquipment">设备管理</el-button>
<el-button v-if="teachSystemShow" size="small" @click="handleTeach">教学系统</el-button> <el-button v-if="teachSystemShow" size="small" @click="handleTeach">教学系统</el-button>
<el-button v-if="examSystemShow" size="small" @click="handleExam">考试系统</el-button> <el-button v-if="examSystemShow" size="small" @click="handleExam">考试系统</el-button>
<el-button v-if="project == 'gzb'" size="small" @click="messageBoardShow">留言板</el-button> <el-button v-if="messageBoard" size="small" @click="messageBoardShow">留言板</el-button>
</el-button-group> </el-button-group>
</div> </div>
<div class="display-draft" :class="{'display-type-hb': lineCode == '07' && $store.state.training.prdType=='01', 'haerbin_btn_box': lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}"> <div class="display-draft" :class="{'display-type-hb': lineCode == '07' && $store.state.training.prdType=='01', 'haerbin_btn_box': lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}">
@ -55,6 +55,8 @@ import { getSimulationQrcode } from '@/api/jointSimulation';
import { getSessionStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
import { NoSimulationQrCodeList } from '@/scripts/ProjectConfig'; import { NoSimulationQrCodeList } from '@/scripts/ProjectConfig';
import { getPublishLessonListByMapId } from '@/api/jmap/lesson'; import { getPublishLessonListByMapId } from '@/api/jmap/lesson';
import { getPostByProjectCode } from '@/api/learn';
import { ProjectCode } from '@/scripts/ProjectConfig';
export default { export default {
name: 'MenuDemonJoint', name: 'MenuDemonJoint',
@ -109,7 +111,8 @@ export default {
isShow3dmodel :false, isShow3dmodel :false,
jl3dname: this.$t('display.demon.threeDimensionalView'), jl3dname: this.$t('display.demon.threeDimensionalView'),
hoverBtn: false, hoverBtn: false,
btnWidth: 0 btnWidth: 0,
messageBoard: false
}; };
}, },
computed: { computed: {
@ -201,6 +204,13 @@ export default {
}, },
async mounted() { async mounted() {
this.change3dname(); this.change3dname();
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
this.$nextTick(() => { this.$nextTick(() => {
this.menuClick(); this.menuClick();
}); });

View File

@ -264,11 +264,14 @@ export default {
message: this.$t('publish.setSuccess') message: this.$t('publish.setSuccess')
}); });
}).catch(res => { }).catch(res => {
if (res.code == '500009') { // if (res.code == '500009') {
this.$message({ type: 'warning', message: this.$t('error.paperHasUseNotDel') }); // this.$message({ type: 'warning', message: this.$t('error.paperHasUseNotDel') });
} else { // } else if (res.code == '10005') {
this.$message({ type: 'error', message: this.$t('error.deleteException') }); // this.$message({ type: 'warning', message: '使'});
} // } else {
// this.$message({ type: 'error', message: this.$t('error.deleteException') });
// }
this.$message({ type: 'error', message: '删除失败:' + res.message });
}); });
}).catch(() => { }); }).catch(() => { });
}, },

View File

@ -461,8 +461,8 @@ export default {
}); });
that.$message.success('学生信息导入成功!'); that.$message.success('学生信息导入成功!');
}).catch(() => { }).catch((error) => {
that.$message.error('学生信息导入失败'); that.$message.error('学生信息导入失败:' + error.message);
that.loadingStudentInfo = false; that.loadingStudentInfo = false;
}); });
} catch (error) { } catch (error) {