通用ibp&留言板管理&贵装备课程发布调整
This commit is contained in:
parent
68a0eadf9b
commit
855295ca75
@ -82,3 +82,19 @@ export function getPostByProjectCode(projectCode) {
|
||||
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
|
||||
});
|
||||
}
|
||||
|
@ -86,5 +86,6 @@ export default {
|
||||
authorApply: 'Grant application',
|
||||
AuthorList: 'Authorization code list',
|
||||
questionsRuleManage: 'Question rule manage',
|
||||
preTheoryData: 'Pre Theory Data'
|
||||
preTheoryData: 'Pre Theory Data',
|
||||
boardManage: 'Message Board Manage'
|
||||
};
|
||||
|
@ -91,5 +91,6 @@ export default {
|
||||
authorApply: '授权申请',
|
||||
AuthorList: '授权列表',
|
||||
questionsRuleManage: '出题规则管理',
|
||||
preTheoryData: '理论导入预处理'
|
||||
preTheoryData: '理论导入预处理',
|
||||
boardManage: '留言板管理'
|
||||
};
|
||||
|
@ -135,6 +135,7 @@ const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/ind
|
||||
const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport');
|
||||
const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule');
|
||||
const MessageBoard = () => import('@/views/messageBoard/index');
|
||||
const BoardManage = () => import('@/views/messageBoard/manage');
|
||||
|
||||
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||
// import { getSessionStorage } from '@/utils/auth';
|
||||
@ -778,6 +779,13 @@ export const asyncRouter = [
|
||||
i18n: 'router.companyManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'boardManage',
|
||||
component: BoardManage,
|
||||
meta: {
|
||||
i18n: 'router.boardManage'
|
||||
}
|
||||
},
|
||||
{ // 出题规则管理
|
||||
path: 'questionsRuleManage',
|
||||
hidden: true,
|
||||
|
@ -426,6 +426,8 @@ export const ProjectIcon = {
|
||||
};
|
||||
|
||||
export const ProjectCode = {
|
||||
login: 'DEFAULT',
|
||||
designlogin: 'DEFAULT',
|
||||
xty: 'XTY',
|
||||
designxty: 'XTY',
|
||||
gzb: 'GZB',
|
||||
@ -448,7 +450,7 @@ export const ProjectCode = {
|
||||
designsdy: 'SDY'
|
||||
};
|
||||
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 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']; // 登录页右下角主体不展示
|
||||
|
@ -2,11 +2,11 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// 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.129: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://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
@ -1,6 +1,41 @@
|
||||
<template>
|
||||
<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">
|
||||
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
@ -23,6 +58,7 @@ export default {
|
||||
formModel: {
|
||||
dataMapId: '',
|
||||
dataStationCode: '',
|
||||
common: false,
|
||||
stationCode: ''
|
||||
},
|
||||
mapList: [],
|
||||
@ -45,6 +81,12 @@ export default {
|
||||
},
|
||||
rules() {
|
||||
const crules = {
|
||||
dataMapId: [
|
||||
{ required: true, message: '请选择', trigger: 'change' }
|
||||
],
|
||||
dataStationCode: [
|
||||
{ required: true, message: '请选择', trigger: 'change' }
|
||||
],
|
||||
stationCode: [
|
||||
{ required: true, message: '请选择', trigger: 'change' }
|
||||
]
|
||||
@ -105,11 +147,11 @@ export default {
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doCreate() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
this.$refs.form.validate(() => {
|
||||
const param = {
|
||||
mapId: this.$route.params.mapId,
|
||||
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 => {
|
||||
this.$message.success('创建成功');
|
||||
@ -121,7 +163,7 @@ export default {
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.$refs.form.resetFields();
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
async changeMapId(val) {
|
||||
|
@ -1,6 +1,20 @@
|
||||
<template>
|
||||
<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">
|
||||
<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>
|
||||
@ -30,20 +44,12 @@ export default {
|
||||
stationList: [],
|
||||
ibpId: '',
|
||||
formModel: {
|
||||
stationCode: ''
|
||||
stationCode: '',
|
||||
common: false
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '150px',
|
||||
items: [
|
||||
{ prop: 'stationCode', label: '关联车站:', type: 'select', options: this.stationList }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
},
|
||||
rules() {
|
||||
const crules = {
|
||||
stationCode: [
|
||||
@ -82,6 +88,7 @@ export default {
|
||||
doShow(data) {
|
||||
if (data) {
|
||||
this.formModel.stationCode = data.stationCode;
|
||||
this.formModel.common = !data.stationCode;
|
||||
this.ibpId = data.id;
|
||||
this.isPut = true;
|
||||
} else {
|
||||
@ -90,10 +97,10 @@ export default {
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doCreate() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
this.$refs.form.validate(() => {
|
||||
const param = {
|
||||
mapId: this.$route.params.mapId,
|
||||
stationCode: this.formModel.stationCode
|
||||
stationCode: this.formModel.common ? null : this.formModel.stationCode
|
||||
};
|
||||
createIbp(param).then(resp => {
|
||||
this.$message.success('创建成功');
|
||||
@ -105,10 +112,10 @@ export default {
|
||||
});
|
||||
},
|
||||
putInfo() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
this.$refs.form.validate(() => {
|
||||
const param = {
|
||||
mapId: this.$route.params.mapId,
|
||||
stationCode: this.formModel.stationCode
|
||||
stationCode: this.formModel.common ? null : this.formModel.stationCode
|
||||
};
|
||||
putIbpBasicInfo(this.ibpId, param).then(resp => {
|
||||
this.$message.success('更新成功');
|
||||
@ -121,7 +128,7 @@ export default {
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.$refs.form.resetFields();
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
|
@ -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" @click="createByPublish">发布数据创建</el-button>
|
||||
</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="modifyScript" :title="'修改数据'" @reloadTable="reloadTable" />
|
||||
<copy-ibp ref="copyIbp" @reloadTable="reloadTable" />
|
||||
@ -123,6 +123,9 @@ export default {
|
||||
}
|
||||
},
|
||||
covertData(row) {
|
||||
if (!row.stationCode) {
|
||||
return '公共数据';
|
||||
}
|
||||
const staitonlist = this.stationList.filter(element => {
|
||||
return row.stationCode == element.code;
|
||||
});
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div class="clearfix">
|
||||
<div style="float: left;padding-top: 17px;">
|
||||
<span style="padding-top: 5px;">{{ $t('ibp.stationName') }}</span>
|
||||
<span>{{ stationCode }}</span>
|
||||
<span>{{ stationName }}</span>
|
||||
</div>
|
||||
<!-- <el-select v-model="stationCode" :placeholder="this.$t('rules.selectStation')" style="padding-top: 5px;" @change="changeStationCode">
|
||||
<el-option
|
||||
@ -98,10 +98,10 @@ export default {
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
stationCode() {
|
||||
stationName() {
|
||||
if (this.stationOptions.length) {
|
||||
const obj = this.stationOptions.find(ele => ele.value == this.$route.query.stationCode);
|
||||
return obj.label;
|
||||
return obj ? obj.label : '通用数据';
|
||||
}
|
||||
return this.$route.query.stationCode;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ export default {
|
||||
return {
|
||||
widthLeft: Number(localStore.get('LeftWidth')) || 450,
|
||||
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
|
||||
}
|
||||
};
|
||||
@ -40,11 +40,12 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$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() {
|
||||
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() {
|
||||
this.$refs.ibpPlate.show();
|
||||
|
@ -22,6 +22,7 @@ import { getToken } from '@/utils/auth';
|
||||
import { getIbpInfoByStation } from '@/api/ibp';
|
||||
import { getSimulationInfoNew, getIbpInitialState } from '@/api/simulation';
|
||||
import BuzzerAudio from '@/assets/buzzer.mp3';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
|
||||
export default {
|
||||
name: 'Ibp',
|
||||
@ -145,10 +146,22 @@ export default {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// const ibpDatas = ibpData[deviceCode];
|
||||
const resp = await getStationList(this.$route.query.mapId);
|
||||
const res = await getIbpInfoByStation(this.$route.query.mapId, deviceCode);
|
||||
const stationIndex = resp.data.findIndex((item) => item.code == deviceCode);
|
||||
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;
|
||||
getIbpInitialState(this.$route.query.group, this.stationCode).then(resp => {
|
||||
if (resp.data) {
|
||||
@ -182,6 +195,7 @@ export default {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error, '===');
|
||||
this.loading = false;
|
||||
this.$alert('当前ibp盘数据不存在', '信息', {
|
||||
confirmButtonText: '确定',
|
||||
@ -292,7 +306,6 @@ export default {
|
||||
},
|
||||
controlAudio(val) {
|
||||
const audio = document.getElementById('buzzer');
|
||||
// console.log(val, audio);
|
||||
if (audio !== null) {
|
||||
if (val) {
|
||||
audio.play();
|
||||
|
@ -70,7 +70,7 @@ export default {
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
|
||||
],
|
||||
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,
|
||||
mapId: this.$route.params.mapId,
|
||||
prdType: model.prdType,
|
||||
cityCode: model.cityCode
|
||||
cityCode: model.cityCode,
|
||||
classIdList: []
|
||||
};
|
||||
this.dialogShow = true;
|
||||
const project = getSessionStorage('project');
|
||||
|
87
src/views/messageBoard/create.vue
Normal file
87
src/views/messageBoard/create.vue
Normal 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>
|
@ -1,14 +1,22 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<create-draft ref="createDraft" :project-option-list="projectOptionList" @reloadTable="reloadTable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { queryPostPage } from '@/api/learn';
|
||||
import { ProjectList} from '@/scripts/ProjectConfig';
|
||||
import CreateDraft from './create';
|
||||
export default {
|
||||
name: 'Manage',
|
||||
components:{
|
||||
CreateDraft
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
projectOptionList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
@ -17,9 +25,9 @@ export default {
|
||||
labelWidth: '140px',
|
||||
reset: false,
|
||||
queryObject: {
|
||||
mapId: {
|
||||
project: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.mapName'),
|
||||
label: '所属项目',
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
@ -27,130 +35,76 @@ export default {
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
query: queryPostPage,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
prop: 'organizationName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionName'),
|
||||
prop: 'permissionName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.founder'),
|
||||
prop: 'userNickname'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.publicOrPrivate'),
|
||||
prop: 'canDistribute',
|
||||
title: '项目',
|
||||
prop: 'project',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||
columnValue: (row) => { return this.getProjectName(row.project); },
|
||||
tagType: (row) => {
|
||||
switch (row.canDistribute) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
return 'success';
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
prop: 'forever',
|
||||
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';
|
||||
}
|
||||
}
|
||||
title: '留言板名称',
|
||||
prop: 'title'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: this.$i18n.locale == 'en' ? '400' : '300',
|
||||
width: '350',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('orderAuthor.obtainQrCode'),
|
||||
handleClick: this.handleRtCodeShow,
|
||||
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; }
|
||||
name: '进入',
|
||||
handleClick: this.handleEnter
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('orderAuthor.createPackage'), handler: this.handleCreatePackage },
|
||||
{ text: '创建项目权限包', handler: this.handleCreateProjectPackage },
|
||||
{ text: this.$t('orderAuthor.receivingPermission'), handler: this.handlerPermission, show: process.env.NODE_ENV == 'development' }
|
||||
{ text: '创建留言板', handler: this.handleCreateMessageBoard }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
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:{
|
||||
|
||||
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>
|
||||
|
@ -23,7 +23,7 @@
|
||||
<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" @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-group>
|
||||
</div>
|
||||
@ -49,6 +49,8 @@ import Scheduling from '@/views/newMap/displayNew/demon/scheduling';
|
||||
import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs';
|
||||
import { getPostByProjectCode } from '@/api/learn';
|
||||
import { ProjectCode } from '@/scripts/ProjectConfig';
|
||||
export default {
|
||||
name:'DemonMenu',
|
||||
components:{
|
||||
@ -117,6 +119,7 @@ export default {
|
||||
deviceif:false,
|
||||
deviceShow: true,
|
||||
drivingShow: false,
|
||||
messageBoard: false,
|
||||
jl3dtrafficplan:this.$t('display.demon.trafficplantext'),
|
||||
jl3dtraffictrain:this.$t('display.demon.traffictraintext'),
|
||||
jl3dpassflow:this.$t('display.demon.passengerflow'),
|
||||
@ -148,6 +151,13 @@ export default {
|
||||
EventBus.$on('quitScene', () => {
|
||||
this.practiceDisabled = false;
|
||||
});
|
||||
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
|
||||
if (resp.data) {
|
||||
this.messageBoard = true;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取留言板信息失败');
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
menuClick() {
|
||||
|
@ -9,7 +9,7 @@
|
||||
</el-radio-group>
|
||||
<span class="display-time">{{ formatUsedTime }}</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>
|
||||
</div>
|
||||
<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 { EventBus } from '@/scripts/event-bus';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { getPostByProjectCode } from '@/api/learn';
|
||||
import { ProjectCode } from '@/scripts/ProjectConfig';
|
||||
|
||||
export default {
|
||||
name: 'MenuLesson',
|
||||
@ -73,6 +75,7 @@ export default {
|
||||
isDisable: false,
|
||||
backDisable: false,
|
||||
startLoading: false,
|
||||
messageBoard: false,
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
'02': '02', // 行调 => 行调
|
||||
@ -132,6 +135,15 @@ export default {
|
||||
this.resetTraining();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
|
||||
if (resp.data) {
|
||||
this.messageBoard = true;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取留言板信息失败');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
tipInfo(opt) {
|
||||
if (opt && opt.hasOwnProperty('color') && opt.hasOwnProperty('message')) {
|
||||
|
@ -17,7 +17,7 @@
|
||||
<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 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-group>
|
||||
<div class="trainExample">
|
||||
@ -104,6 +104,8 @@ import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { getPostByProjectCode } from '@/api/learn';
|
||||
import { ProjectCode } from '@/scripts/ProjectConfig';
|
||||
export default {
|
||||
name:'PracticeDisplay',
|
||||
components: {
|
||||
@ -124,7 +126,8 @@ export default {
|
||||
openWindow:null,
|
||||
flowDataList:[],
|
||||
currentFlowDataName:'',
|
||||
currentFlowDataId:''
|
||||
currentFlowDataId:'',
|
||||
messageBoard: false
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
@ -229,6 +232,13 @@ export default {
|
||||
this.group = this.$route.query.group;
|
||||
this.setWindowSize();
|
||||
this.initLoadData();
|
||||
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
|
||||
if (resp.data) {
|
||||
this.messageBoard = true;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取留言板信息失败');
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
async initLoadData() { // 加载地图数据
|
||||
|
@ -23,7 +23,7 @@
|
||||
<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="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>
|
||||
</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'}">
|
||||
@ -55,6 +55,8 @@ import { getSimulationQrcode } from '@/api/jointSimulation';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { NoSimulationQrCodeList } from '@/scripts/ProjectConfig';
|
||||
import { getPublishLessonListByMapId } from '@/api/jmap/lesson';
|
||||
import { getPostByProjectCode } from '@/api/learn';
|
||||
import { ProjectCode } from '@/scripts/ProjectConfig';
|
||||
|
||||
export default {
|
||||
name: 'MenuDemonJoint',
|
||||
@ -109,7 +111,8 @@ export default {
|
||||
isShow3dmodel :false,
|
||||
jl3dname: this.$t('display.demon.threeDimensionalView'),
|
||||
hoverBtn: false,
|
||||
btnWidth: 0
|
||||
btnWidth: 0,
|
||||
messageBoard: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -201,6 +204,13 @@ export default {
|
||||
},
|
||||
async mounted() {
|
||||
this.change3dname();
|
||||
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
|
||||
if (resp.data) {
|
||||
this.messageBoard = true;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取留言板信息失败');
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
this.menuClick();
|
||||
});
|
||||
|
@ -264,11 +264,14 @@ export default {
|
||||
message: this.$t('publish.setSuccess')
|
||||
});
|
||||
}).catch(res => {
|
||||
if (res.code == '500009') {
|
||||
this.$message({ type: 'warning', message: this.$t('error.paperHasUseNotDel') });
|
||||
} else {
|
||||
this.$message({ type: 'error', message: this.$t('error.deleteException') });
|
||||
}
|
||||
// if (res.code == '500009') {
|
||||
// this.$message({ type: 'warning', message: this.$t('error.paperHasUseNotDel') });
|
||||
// } else if (res.code == '10005') {
|
||||
// this.$message({ type: 'warning', message: '本试卷已被使用!'});
|
||||
// } else {
|
||||
// this.$message({ type: 'error', message: this.$t('error.deleteException') });
|
||||
// }
|
||||
this.$message({ type: 'error', message: '删除失败:' + res.message });
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
@ -461,8 +461,8 @@ export default {
|
||||
});
|
||||
that.$message.success('学生信息导入成功!');
|
||||
|
||||
}).catch(() => {
|
||||
that.$message.error('学生信息导入失败!');
|
||||
}).catch((error) => {
|
||||
that.$message.error('学生信息导入失败:' + error.message);
|
||||
that.loadingStudentInfo = false;
|
||||
});
|
||||
} catch (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user