Merge remote-tracking branch 'origin/test'
This commit is contained in:
commit
fd5af534af
@ -23,7 +23,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getToken, getUserIdKey } from '@/utils/auth';
|
import { getToken, getUserIdKey } from '@/utils/auth';
|
||||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||||
import { loginInfo } from '@/scripts/ProjectConfig';
|
|
||||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||||
import LoadingImg from '@/assets/loading.gif';
|
import LoadingImg from '@/assets/loading.gif';
|
||||||
import AppLoading from '@/assets/appLoading.png';
|
import AppLoading from '@/assets/appLoading.png';
|
||||||
@ -68,7 +67,7 @@ export default {
|
|||||||
callback: action => {
|
callback: action => {
|
||||||
removeToken();
|
removeToken();
|
||||||
this.$store.dispatch('exit').then(resp => {
|
this.$store.dispatch('exit').then(resp => {
|
||||||
this.$router.push({path: loginInfo[this.$store.state.projectConfig.markKey].loginPath});
|
this.$router.push({path: `/login?project=${this.$store.state.projectConfig.markKey}`});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -314,3 +314,18 @@ export function getClientDataById(mapId) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 发布地图根据id生成实训 */
|
||||||
|
export function generateTrainingData(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/v2/training/rule/generate/mapId`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 根据mapId获取列车信息 */
|
||||||
|
export function getTrainListByMapId(mapId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/map/${mapId}/trains`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -187,3 +187,35 @@ export function setGroupReadMessage(groupId, data) {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送私聊文字信息
|
||||||
|
* @param {String} groupId 房间号
|
||||||
|
* @param {Object} data
|
||||||
|
* @param {Number} data.memberId 角色id
|
||||||
|
* @param {String} data.content 文字内容
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function sendPrivateText(groupId, data) {
|
||||||
|
return request({
|
||||||
|
url: `/simulation/${groupId}/operate/Conversation_Group_Private_Text_Chat`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送私聊BASE64信息
|
||||||
|
* @param {String} groupId 房间号
|
||||||
|
* @param {Object} data
|
||||||
|
* @param {Number} data.memberId 角色id
|
||||||
|
* @param {String} data.fileBase64Str 文件base64码
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export function sendPrivateBase64(groupId, data) {
|
||||||
|
return request({
|
||||||
|
url: `/simulation/${groupId}/operate/Conversation_Group_Private_Audio_Base64`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
10
src/api/record.js
Normal file
10
src/api/record.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
/** 查询用户使用记录统计 */
|
||||||
|
export function queryUserSimulationRecord(params, userId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/record/stats/list/criteria/${userId}`,
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
@ -193,3 +193,11 @@ export function queryTemplateMapFunPaged(params) {
|
|||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 线路功能覆盖生成(主要用于客户端重新生成后线路功能里客户端重新匹配) */
|
||||||
|
export function generateMapFun(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/mapFunction/generate/mapIds`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -130,9 +130,8 @@ export default {
|
|||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
},
|
},
|
||||||
expandPath() {
|
// expandPath() {
|
||||||
console.log('展开进路预览');
|
// },
|
||||||
},
|
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||||
|
@ -348,9 +348,26 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
checkStationControl(device) {
|
||||||
|
let cenStationCode = '';
|
||||||
|
if (['Section', 'Signal', 'Switch', 'GuideLock', 'AutoTurnBack'].includes(device._type)) {
|
||||||
|
cenStationCode = device.stationCode;
|
||||||
|
} else if (device._type === 'Stand') {
|
||||||
|
cenStationCode = device.deviceStationCode;
|
||||||
|
}
|
||||||
|
if (!cenStationCode) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const cenStation = this.$store.getters['map/getDeviceByCode'](cenStationCode);
|
||||||
|
const flag = cenStation.controlMode === 'Emergency' || cenStation.controlMode === 'Local';
|
||||||
|
if (!flag) {
|
||||||
|
this.$message.info('请先切换到站控或紧急站控');
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
},
|
||||||
selectedChange() {
|
selectedChange() {
|
||||||
const model = this.$store.state.menuOperation.selected;
|
const model = this.$store.state.menuOperation.selected;
|
||||||
if (model && model._type) {
|
if (model && model._type && this.checkStationControl(model)) {
|
||||||
switch (this.$store.state.menuOperation.buttonOperation) {
|
switch (this.$store.state.menuOperation.buttonOperation) {
|
||||||
case OperationEvent.Station.guideLock.button.operation : {
|
case OperationEvent.Station.guideLock.button.operation : {
|
||||||
if (model && model._type == 'GuideLock') {
|
if (model && model._type == 'GuideLock') {
|
||||||
|
@ -58,7 +58,7 @@ export default {
|
|||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
disabledClose: false,
|
disabledClose: false,
|
||||||
disabledCommit: false,
|
disabledCommit: false,
|
||||||
stationType: '01',
|
stationType: '',
|
||||||
station:{},
|
station:{},
|
||||||
stationCode: '',
|
stationCode: '',
|
||||||
stationName: '',
|
stationName: '',
|
||||||
@ -113,6 +113,7 @@ export default {
|
|||||||
this.operate = operate || {};
|
this.operate = operate || {};
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
|
this.stationType = '';
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
|
@ -86,9 +86,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
expandPath() {
|
|
||||||
console.log('展开进路预览');
|
|
||||||
},
|
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
>确定</el-button>
|
>确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:100%; padding-top: 20px">
|
<div style="width:100%; padding-top: 20px">
|
||||||
<span v-if="!thirdLogin"> 版权所有(C)2010-2011 北京玖琏科技有限公司</span>
|
<span v-if="copyrightShow"> 版权所有(C)2010-2011 北京玖琏科技有限公司</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -40,8 +40,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { NoCopyrightList } from '@/scripts/ProjectConfig';
|
import {mapGetters} from 'vuex';
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ManageUser',
|
name: 'ManageUser',
|
||||||
data() {
|
data() {
|
||||||
@ -61,6 +60,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapGetters('projectConfig', [
|
||||||
|
'copyrightShow'
|
||||||
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
@ -72,9 +74,6 @@ export default {
|
|||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '关于ControlMonitor';
|
return '关于ControlMonitor';
|
||||||
},
|
|
||||||
thirdLogin() {
|
|
||||||
return NoCopyrightList.includes(getSessionStorage('project'));
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -165,6 +165,7 @@ export default {
|
|||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.operate = operate || {};
|
this.operate = operate || {};
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
|
this.formModel.stationType = '';
|
||||||
}
|
}
|
||||||
this.initControlModeList();
|
this.initControlModeList();
|
||||||
// this.$store.state.training.prdType
|
// this.$store.state.training.prdType
|
||||||
|
@ -135,8 +135,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.menuOperation.selectedCount': function(val) {
|
'$store.state.menuOperation.selectedCount': function(val) {
|
||||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Section') {
|
const device = this.$store.state.menuOperation.selected;
|
||||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
if (this.buttonOperation && device._type == 'Section') {
|
||||||
|
const cenStation = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
||||||
|
if (cenStation.controlMode !== 'Emergency' && cenStation.controlMode !== 'Local') {
|
||||||
|
this.$message.info('请先切换到站控或紧急站控');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.operationHandler(this.buttonOperation, device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -200,7 +206,7 @@ export default {
|
|||||||
// this.$refs.sectionUnLock.doShow(operate, this.selected);
|
// this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||||
}
|
}
|
||||||
}).catch(error=>{
|
}).catch(()=>{
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@ -213,7 +219,7 @@ export default {
|
|||||||
// this.$refs.sectionUnLock.doShow(operate, this.selected);
|
// this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||||
}
|
}
|
||||||
}).catch(error=>{
|
}).catch(()=>{
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
@ -202,8 +202,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.menuOperation.selectedCount': function(val) {
|
'$store.state.menuOperation.selectedCount': function(val) {
|
||||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Signal') {
|
const device = this.$store.state.menuOperation.selected;
|
||||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
if (this.buttonOperation && device._type == 'Signal') {
|
||||||
|
const cenStation = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
||||||
|
if (cenStation.controlMode !== 'Emergency' && cenStation.controlMode !== 'Local') {
|
||||||
|
this.$message.info('请先切换到站控或紧急站控');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.operationHandler(this.buttonOperation, device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -175,8 +175,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.menuOperation.selectedCount': function(val) {
|
'$store.state.menuOperation.selectedCount': function(val) {
|
||||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Switch') {
|
const device = this.$store.state.menuOperation.selected;
|
||||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
if (this.buttonOperation && device._type == 'Switch') {
|
||||||
|
const cenStation = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
||||||
|
if (cenStation.controlMode !== 'Emergency' && cenStation.controlMode !== 'Local') {
|
||||||
|
this.$message.info('请先切换到站控或紧急站控');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.operationHandler(this.buttonOperation, device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="width:100%; padding-top: 20px">
|
<div style="width:100%; padding-top: 20px">
|
||||||
<!-- <span >版权所有(C)2010-2021 北京玖琏科技有限公司</span> -->
|
<!-- <span >版权所有(C)2010-2021 北京玖琏科技有限公司</span> -->
|
||||||
<span v-if="!thirdLogin">{{ $t('menu.menuDialog.copyright') }}</span>
|
<span v-if="copyrightShow">{{ $t('menu.menuDialog.copyright') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -40,8 +40,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import {mapGetters} from 'vuex';
|
||||||
import { NoCopyrightList } from '@/scripts/ProjectConfig';
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ManageUser',
|
name: 'ManageUser',
|
||||||
data() {
|
data() {
|
||||||
@ -61,6 +60,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapGetters('projectConfig', [
|
||||||
|
'copyrightShow'
|
||||||
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
@ -72,9 +74,6 @@ export default {
|
|||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return this.$t('menu.menuDialog.about');
|
return this.$t('menu.menuDialog.about');
|
||||||
},
|
|
||||||
thirdLogin() {
|
|
||||||
return NoCopyrightList.includes(getSessionStorage('project'));
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -126,7 +126,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
this.setMap(this.mapData, this.mapDevice);
|
this.setMap(this.mapData, this.mapDevice);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('[ERROR] ', error);
|
console.error('[ERROR] ', error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置地图
|
// 设置地图
|
||||||
|
@ -153,9 +153,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
expandPath() {
|
|
||||||
console.log('展开进路预览');
|
|
||||||
},
|
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
|
@ -113,9 +113,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
expandPath() {
|
|
||||||
console.log('展开进路预览');
|
|
||||||
},
|
|
||||||
doShow(data) {
|
doShow(data) {
|
||||||
this.activeName = data.active;
|
this.activeName = data.active;
|
||||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||||
|
@ -98,9 +98,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
expandPath() {
|
// expandPath() {
|
||||||
console.log('展开进路预览');
|
// },
|
||||||
},
|
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||||
|
@ -1,188 +1,187 @@
|
|||||||
<template>
|
<!--<template>-->
|
||||||
<div style="display:inline-block">
|
<!-- <div style="display:inline-block">-->
|
||||||
<div class="avatar-container" style="display:inline-block;margin-right:10px">
|
<!-- <div class="avatar-container" style="display:inline-block;margin-right:10px">-->
|
||||||
<el-menu-item v-for="item in entryList" v-show="!item.hidden" :key="item.name" class="avatar-wrapper" :index="$route.fullPath" :style="item.style" @click="item.handle">
|
<!-- <el-menu-item v-for="item in entryList" v-show="!item.hidden" :key="item.name" class="avatar-wrapper" :index="$route.fullPath" :style="item.style" @click="item.handle">-->
|
||||||
<el-tooltip v-if="item.tip" effect="dark" :content="$t('login.clickSwitchLanguage')" placement="bottom-end">
|
<!-- <el-tooltip v-if="item.tip" effect="dark" :content="$t('login.clickSwitchLanguage')" placement="bottom-end">-->
|
||||||
<span style="color: white;">{{ item.name }}</span>
|
<!-- <span style="color: white;">{{ item.name }}</span>-->
|
||||||
</el-tooltip>
|
<!-- </el-tooltip>-->
|
||||||
<el-dropdown v-else-if="item.isHelp" class="avatar-container" trigger="hover" :show-timeout="100" style="height:58px">
|
<!-- <el-dropdown v-else-if="item.isHelp" class="avatar-container" trigger="hover" :show-timeout="100" style="height:58px">-->
|
||||||
<div class="avatar-wrapper">
|
<!-- <div class="avatar-wrapper">-->
|
||||||
<span style="color: white;">
|
<!-- <span style="color: white;">-->
|
||||||
{{ $t(item.name) }}
|
<!-- {{ $t(item.name) }}-->
|
||||||
</span>
|
<!-- </span>-->
|
||||||
<i class="el-icon-caret-bottom" style="color: #909399;" />
|
<!-- <i class="el-icon-caret-bottom" style="color: #909399;" />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<el-dropdown-menu slot="dropdown" class="user-dropdown">
|
<!-- <el-dropdown-menu slot="dropdown" class="user-dropdown">-->
|
||||||
<el-dropdown-item v-for="(el, i) in caseList" :key="i">
|
<!-- <el-dropdown-item v-for="(el, i) in caseList" :key="i">-->
|
||||||
<span style="display:block;" @click="goToCaseShow(el)">{{ el.name }}</span>
|
<!-- <span style="display:block;" @click="goToCaseShow(el)">{{ el.name }}</span>-->
|
||||||
</el-dropdown-item>
|
<!-- </el-dropdown-item>-->
|
||||||
</el-dropdown-menu>
|
<!-- </el-dropdown-menu>-->
|
||||||
</el-dropdown>
|
<!-- </el-dropdown>-->
|
||||||
<span v-else style="color: white;">{{ $t(item.name) }}</span>
|
<!-- <span v-else style="color: white;">{{ $t(item.name) }}</span>-->
|
||||||
</el-menu-item>
|
<!-- </el-menu-item>-->
|
||||||
<deomon-list ref="deomonList" @enterQcode="qcodeEntry" />
|
<!-- <deomon-list ref="deomonList" @enterQcode="qcodeEntry" />-->
|
||||||
<qcode ref="qcode" />
|
<!-- <qcode ref="qcode" />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
|
|
||||||
<script>
|
<!--<script>-->
|
||||||
import DeomonList from '@/views/demonstration/deomonList/index';
|
<!--import DeomonList from '@/views/demonstration/deomonList/index';-->
|
||||||
import Qcode from './Qcode';
|
<!--import Qcode from './Qcode';-->
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
<!--import { getSessionStorage } from '@/utils/auth';-->
|
||||||
import LangStorage from '@/utils/lang';
|
<!--import LangStorage from '@/utils/lang';-->
|
||||||
import {goOtherPlatformMenu, CaseHideProjectList} from '@/scripts/ProjectConfig';
|
|
||||||
|
|
||||||
export default {
|
<!--export default {-->
|
||||||
name: 'Entry',
|
<!-- name: 'Entry',-->
|
||||||
components: {
|
<!-- components: {-->
|
||||||
DeomonList,
|
<!-- DeomonList,-->
|
||||||
Qcode
|
<!-- Qcode-->
|
||||||
},
|
<!-- },-->
|
||||||
data() {
|
<!-- data() {-->
|
||||||
|
|
||||||
return {
|
<!-- return {-->
|
||||||
entryList: [
|
<!-- entryList: [-->
|
||||||
{
|
<!-- {-->
|
||||||
name: 'global.designPlatformEntrance', // 设计平台入口
|
<!-- name: 'global.designPlatformEntrance', // 设计平台入口-->
|
||||||
handle: this.goToDesign,
|
<!-- handle: this.goToDesign,-->
|
||||||
hidden: getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')] || getSessionStorage('project').startsWith('teaching')
|
<!-- hidden: getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')] || getSessionStorage('project').startsWith('teaching')-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
name: 'global.trainingPlatformEntrance', // 实训平台入口
|
<!-- name: 'global.trainingPlatformEntrance', // 实训平台入口-->
|
||||||
handle: this.goToTraining,
|
<!-- handle: this.goToTraining,-->
|
||||||
hidden: !getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')]
|
<!-- hidden: !getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')]-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
name: 'global.caseShow', // 案例展示
|
<!-- name: 'global.caseShow', // 案例展示-->
|
||||||
handle: this.goEmpty,
|
<!-- handle: this.goEmpty,-->
|
||||||
isHelp:true,
|
<!-- isHelp:true,-->
|
||||||
style:'padding-right:0px;',
|
<!-- style:'padding-right:0px;',-->
|
||||||
hidden: CaseHideProjectList.includes(getSessionStorage('project'))
|
<!-- hidden: CaseHideProjectList.includes(getSessionStorage('project'))-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
name: 'global.scan', // 扫码
|
<!-- name: 'global.scan', // 扫码-->
|
||||||
handle: this.qcodeEntry,
|
<!-- handle: this.qcodeEntry,-->
|
||||||
hidden: process.env.NODE_ENV != 'development' || getSessionStorage('project').startsWith('design') || process.env.VUE_APP_PRO === 'local'
|
<!-- hidden: process.env.NODE_ENV != 'development' || getSessionStorage('project').startsWith('design') || process.env.VUE_APP_PRO === 'local'-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
name: 'global.quickEntry', // 快速入口
|
<!-- name: 'global.quickEntry', // 快速入口-->
|
||||||
handle: this.quickEntry,
|
<!-- handle: this.quickEntry,-->
|
||||||
hidden: getSessionStorage('project').startsWith('design')
|
<!-- hidden: getSessionStorage('project').startsWith('design')-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
name: LangStorage.getLang('zh') === 'zh' ? 'English' : '中文',
|
<!-- name: LangStorage.getLang('zh') === 'zh' ? 'English' : '中文',-->
|
||||||
handle: this.switchLanguage,
|
<!-- handle: this.switchLanguage,-->
|
||||||
hidden: false,
|
<!-- hidden: false,-->
|
||||||
tip: true
|
<!-- tip: true-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
name: 'global.help',
|
<!-- name: 'global.help',-->
|
||||||
handle: this.goToHelp,
|
<!-- handle: this.goToHelp,-->
|
||||||
hidden: false
|
<!-- hidden: false-->
|
||||||
// hidden: this.hideHelp
|
<!-- // hidden: this.hideHelp-->
|
||||||
}
|
<!-- }-->
|
||||||
|
|
||||||
],
|
<!-- ],-->
|
||||||
caseList: [
|
<!-- caseList: [-->
|
||||||
{
|
<!-- {-->
|
||||||
name: '西安铁路职业技术学院',
|
<!-- name: '西安铁路职业技术学院',-->
|
||||||
url: 'https://joylink.club/oss/portal/cases/西安铁路职业技术学院.pdf'
|
<!-- url: 'https://joylink.club/oss/portal/cases/西安铁路职业技术学院.pdf'-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
name: '贵州装备制造职业学院',
|
<!-- name: '贵州装备制造职业学院',-->
|
||||||
url: 'https://joylink.club/oss/portal/cases/贵州装备制造职业学院机电技术专业实训室建设.pdf'
|
<!-- url: 'https://joylink.club/oss/portal/cases/贵州装备制造职业学院机电技术专业实训室建设.pdf'-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
name: '江苏电子信息职业学院',
|
<!-- name: '江苏电子信息职业学院',-->
|
||||||
url: 'https://joylink.club/oss/portal/cases/江苏电子信息职业学院-城市轨道交通行车组织综合实训室.pdf'
|
<!-- url: 'https://joylink.club/oss/portal/cases/江苏电子信息职业学院-城市轨道交通行车组织综合实训室.pdf'-->
|
||||||
}
|
<!-- }-->
|
||||||
],
|
<!-- ],-->
|
||||||
stomp: null,
|
<!-- stomp: null,-->
|
||||||
header: null,
|
<!-- header: null,-->
|
||||||
lang: 'zh'
|
<!-- lang: 'zh'-->
|
||||||
};
|
<!-- };-->
|
||||||
},
|
<!-- },-->
|
||||||
computed: {
|
<!-- computed: {-->
|
||||||
username() {
|
<!-- username() {-->
|
||||||
return this.$store.state.user.nickname;
|
<!-- return this.$store.state.user.nickname;-->
|
||||||
},
|
<!-- },-->
|
||||||
project() {
|
<!-- project() {-->
|
||||||
return getSessionStorage('project');
|
<!-- return getSessionStorage('project');-->
|
||||||
}
|
<!-- }-->
|
||||||
// hideHelp() {
|
<!-- // hideHelp() {-->
|
||||||
// return !(getSessionStorage('project') == 'login' || getSessionStorage('project') == 'design');
|
<!-- // return !(getSessionStorage('project') == 'login' || getSessionStorage('project') == 'design');-->
|
||||||
// }
|
<!-- // }-->
|
||||||
},
|
<!-- },-->
|
||||||
watch: {
|
<!-- watch: {-->
|
||||||
},
|
<!-- },-->
|
||||||
mounted() {
|
<!-- mounted() {-->
|
||||||
const nowLang = LangStorage.getLang('zh');
|
<!-- const nowLang = LangStorage.getLang('zh');-->
|
||||||
if (nowLang === 'zh') {
|
<!-- if (nowLang === 'zh') {-->
|
||||||
this.lang = 'en';
|
<!-- this.lang = 'en';-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
methods: {
|
<!-- methods: {-->
|
||||||
quickEntry() {
|
<!-- quickEntry() {-->
|
||||||
this.$refs.deomonList.doShow();
|
<!-- this.$refs.deomonList.doShow();-->
|
||||||
},
|
<!-- },-->
|
||||||
qcodeEntry() {
|
<!-- qcodeEntry() {-->
|
||||||
this.$refs.qcode.doShow();
|
<!-- this.$refs.qcode.doShow();-->
|
||||||
},
|
<!-- },-->
|
||||||
goToDesign() {
|
<!-- goToDesign() {-->
|
||||||
const routeData = this.$router.resolve({
|
<!-- const routeData = this.$router.resolve({-->
|
||||||
path: this.getPath()
|
<!-- path: this.getPath()-->
|
||||||
});
|
<!-- });-->
|
||||||
window.open(routeData.href, '_blank');
|
<!-- window.open(routeData.href, '_blank');-->
|
||||||
},
|
<!-- },-->
|
||||||
goToHelp() {
|
<!-- goToHelp() {-->
|
||||||
let href = '';
|
<!-- let href = '';-->
|
||||||
// if (getSessionStorage('project').startsWith('design')) {
|
<!-- // if (getSessionStorage('project').startsWith('design')) {-->
|
||||||
// href = 'https://joylink.club/docs-design';
|
<!-- // href = 'https://joylink.club/docs-design';-->
|
||||||
// } else {
|
<!-- // } else {-->
|
||||||
// href = 'https://joylink.club/docs';
|
<!-- // href = 'https://joylink.club/docs';-->
|
||||||
// }
|
<!-- // }-->
|
||||||
href = this.$store.state.user.baseSite + '/docs/';
|
<!-- href = this.$store.state.user.baseSite + '/docs/';-->
|
||||||
window.open(href, '_blank');
|
<!-- window.open(href, '_blank');-->
|
||||||
},
|
<!-- },-->
|
||||||
goEmpty() {},
|
<!-- goEmpty() {},-->
|
||||||
goToCaseShow(item) {
|
<!-- goToCaseShow(item) {-->
|
||||||
window.open(item.url, '_blank');
|
<!-- window.open(item.url, '_blank');-->
|
||||||
},
|
<!-- },-->
|
||||||
goToTraining() {
|
<!-- goToTraining() {-->
|
||||||
const routeData = this.$router.resolve({
|
<!-- const routeData = this.$router.resolve({-->
|
||||||
path: this.getPath()
|
<!-- path: this.getPath()-->
|
||||||
});
|
<!-- });-->
|
||||||
window.open(routeData.href, '_blank');
|
<!-- window.open(routeData.href, '_blank');-->
|
||||||
},
|
<!-- },-->
|
||||||
switchLanguage() {
|
<!-- switchLanguage() {-->
|
||||||
this.$i18n.locale = this.lang;
|
<!-- this.$i18n.locale = this.lang;-->
|
||||||
LangStorage.setLang(this.lang);
|
<!-- LangStorage.setLang(this.lang);-->
|
||||||
},
|
<!-- },-->
|
||||||
getPath() {
|
<!-- getPath() {-->
|
||||||
return goOtherPlatformMenu[this.project];
|
<!-- return goOtherPlatformMenu[this.project];-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
};
|
<!--};-->
|
||||||
</script>
|
<!--</script>-->
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<!--<style rel="stylesheet/scss" lang="scss" scoped>-->
|
||||||
.avatar-wrapper{
|
<!--.avatar-wrapper{-->
|
||||||
display: inline-block;
|
<!-- display: inline-block;-->
|
||||||
}
|
<!--}-->
|
||||||
.linkClass{
|
<!--.linkClass{-->
|
||||||
color: white;
|
<!-- color: white;-->
|
||||||
height: 30px;
|
<!-- height: 30px;-->
|
||||||
display:inline-block;
|
<!-- display:inline-block;-->
|
||||||
line-height:30px;
|
<!-- line-height:30px;-->
|
||||||
font-size:14px;
|
<!-- font-size:14px;-->
|
||||||
margin-top:17px;
|
<!-- margin-top:17px;-->
|
||||||
}
|
<!--}-->
|
||||||
.linkDiv{
|
<!--.linkDiv{-->
|
||||||
display: inline-block;
|
<!-- display: inline-block;-->
|
||||||
height: 60px;
|
<!-- height: 60px;-->
|
||||||
padding: 0 20px;
|
<!-- padding: 0 20px;-->
|
||||||
font-size: 0;
|
<!-- font-size: 0;-->
|
||||||
vertical-align: top;
|
<!-- vertical-align: top;-->
|
||||||
}
|
<!--}-->
|
||||||
</style>
|
<!--</style>-->
|
||||||
|
@ -111,7 +111,6 @@
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import SystemTitle from './Title';
|
import SystemTitle from './Title';
|
||||||
import {getSessionStorage } from '@/utils/auth';
|
import {getSessionStorage } from '@/utils/auth';
|
||||||
import { ThirdLoginList } from '@/scripts/ProjectConfig';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -131,7 +130,7 @@ export default {
|
|||||||
'routers'
|
'routers'
|
||||||
]),
|
]),
|
||||||
thirdLogin() {
|
thirdLogin() {
|
||||||
return ThirdLoginList.includes(getSessionStorage('project'));
|
return this.$store.state.user.thirdLogin;
|
||||||
},
|
},
|
||||||
username() {
|
username() {
|
||||||
return this.$store.state.user.nickname;
|
return this.$store.state.user.nickname;
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
</transition>
|
</transition>
|
||||||
</section>
|
</section>
|
||||||
<el-footer class="footers" style="height:30px;">
|
<el-footer class="footers" style="height:30px;">
|
||||||
<div v-if="!bottomColumnOnlyConInfo.includes(project)" style="font-size:14px;float:left;">{{ $t('global.companyInfo') }} {{ $t('global.companyTel') }}</div>
|
<div style="font-size:14px;float:left;">{{ bottomCompanyInfo }}</div>
|
||||||
<div style="font-size:14px;float:right;height: 30px;line-height: 30px;">{{ bottomColumnOnlyConInfo.includes(project)? companyInfo : $t('global.companyICP') }}</div>
|
<div style="font-size:14px;float:right;height: 30px;line-height: 30px;">{{ bottomRecordNumber }}</div>
|
||||||
<img v-if="bottomIcon" style="float:right;height: 26px;margin: 2px 10px;" :src="bottomIcon">
|
<!-- <img v-if="bottomIcon" style="float:right;height: 26px;margin: 2px 10px;" :src="bottomIcon">-->
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -33,7 +33,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { Navbar } from './components'; // Sidebar
|
import { Navbar } from './components'; // Sidebar
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
import { loginInfo, BottomColumnOnlyConInfo} from '@/scripts/ProjectConfig';
|
// import { loginInfo, BottomColumnOnlyConInfo} from '@/scripts/ProjectConfig';
|
||||||
|
import {mapGetters} from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Layout',
|
name: 'Layout',
|
||||||
@ -42,11 +43,15 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false
|
||||||
bottomColumnOnlyConInfo: BottomColumnOnlyConInfo
|
// bottomColumnOnlyConInfo: BottomColumnOnlyConInfo
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapGetters('projectConfig', [
|
||||||
|
'bottomCompanyInfo',
|
||||||
|
'bottomRecordNumber'
|
||||||
|
]),
|
||||||
sidebar() {
|
sidebar() {
|
||||||
return this.$store.state.app.sidebar;
|
return this.$store.state.app.sidebar;
|
||||||
},
|
},
|
||||||
@ -70,13 +75,10 @@ export default {
|
|||||||
},
|
},
|
||||||
dialogMessage() {
|
dialogMessage() {
|
||||||
return this.$store.state.app.dialogMessage;
|
return this.$store.state.app.dialogMessage;
|
||||||
},
|
|
||||||
companyInfo() {
|
|
||||||
return loginInfo[getSessionStorage('project')] ? loginInfo[getSessionStorage('project')].bottomColumn : '';
|
|
||||||
},
|
|
||||||
bottomIcon() {
|
|
||||||
return loginInfo[getSessionStorage('project')] ? loginInfo[getSessionStorage('project')].bottomIcon : '';
|
|
||||||
}
|
}
|
||||||
|
// bottomIcon() {
|
||||||
|
// return loginInfo[getSessionStorage('project')] ? loginInfo[getSessionStorage('project')].bottomIcon : '';
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
'$store.state.app.dialogMessage':function(val) {
|
'$store.state.app.dialogMessage':function(val) {
|
||||||
|
@ -63,7 +63,7 @@ const UserExam = () => import('@/views/system/userExam/index');
|
|||||||
// const UserSimulation = () => import('@/views/system/userSimulation/index');
|
// const UserSimulation = () => import('@/views/system/userSimulation/index');
|
||||||
const ExistingSimulation = () => import('@/views/system/existingSimulation/index');
|
const ExistingSimulation = () => import('@/views/system/existingSimulation/index');
|
||||||
const CacheControl = () => import('@/views/system/cacheControl/index');
|
const CacheControl = () => import('@/views/system/cacheControl/index');
|
||||||
const SystemGenerate = () => import('@/views/system/systemGenerate/index');
|
// const SystemGenerate = () => import('@/views/system/systemGenerate/index');
|
||||||
const News = () => import('@/views/system/news/index');
|
const News = () => import('@/views/system/news/index');
|
||||||
const CommandDictionary = () => import('@/views/system/commandDictionary/index');
|
const CommandDictionary = () => import('@/views/system/commandDictionary/index');
|
||||||
const CommandDictionaryDetail = () => import('@/views/system/commandDictionary/edit');
|
const CommandDictionaryDetail = () => import('@/views/system/commandDictionary/edit');
|
||||||
@ -165,8 +165,8 @@ const CompanyManage = () => import('@/views/system/companyManage/index');
|
|||||||
const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/index');
|
const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/index');
|
||||||
const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport');
|
const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport');
|
||||||
|
|
||||||
const MessageBoard = () => import('@/views/messageBoard/index');
|
// const MessageBoard = () => import('@/views/messageBoard/index');
|
||||||
const BoardManage = () => import('@/views/messageBoard/manage');
|
// const BoardManage = () => import('@/views/messageBoard/manage');
|
||||||
const OrganizationManage = () => import('@/views/organization/index');
|
const OrganizationManage = () => import('@/views/organization/index');
|
||||||
const PersonalInfo = () => import('@/views/info/personalInfo');
|
const PersonalInfo = () => import('@/views/info/personalInfo');
|
||||||
const OrgClassManage = () => import('@/views/organization/classManage/index');
|
const OrgClassManage = () => import('@/views/organization/classManage/index');
|
||||||
@ -199,7 +199,7 @@ const UeditorDraftList = () => import('@/views/editor/listDraft');
|
|||||||
const UploadPdfList = () => import('@/views/uploadPdf/list');
|
const UploadPdfList = () => import('@/views/uploadPdf/list');
|
||||||
|
|
||||||
const ThirdLogin = () => import('@/views/thirdLogin');
|
const ThirdLogin = () => import('@/views/thirdLogin');
|
||||||
const ProjectServer = () => import('@/views/system/serverManage');
|
// const ProjectServer = () => import('@/views/system/serverManage');
|
||||||
const VoiceManage = () => import('@/views/fileManage/voiceManage');
|
const VoiceManage = () => import('@/views/fileManage/voiceManage');
|
||||||
const ProjectManage = () => import('@/views/system/projectManage');
|
const ProjectManage = () => import('@/views/system/projectManage');
|
||||||
const FrontProjectConfigManage = () => import('@/views/system/frontProjectConfigManage');
|
const FrontProjectConfigManage = () => import('@/views/system/frontProjectConfigManage');
|
||||||
@ -538,11 +538,11 @@ export const publicAsyncRoute = [
|
|||||||
component: ExamResult,
|
component: ExamResult,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: '/messageBoard',
|
// path: '/messageBoard',
|
||||||
component: MessageBoard,
|
// component: MessageBoard,
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
path: '/info',
|
path: '/info',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
@ -664,114 +664,114 @@ export const publicAsyncRoute = [
|
|||||||
];
|
];
|
||||||
// 城市轨道项目
|
// 城市轨道项目
|
||||||
export const asyncRouter = [
|
export const asyncRouter = [
|
||||||
{ // 公共地图
|
// { // 公共地图
|
||||||
path: '/design',
|
// path: '/design',
|
||||||
component: Layout,
|
// component: Layout,
|
||||||
redirect: '/design/home',
|
// redirect: '/design/home',
|
||||||
meta: {
|
// meta: {
|
||||||
roles: [admin, user]
|
// roles: [admin, user]
|
||||||
},
|
// },
|
||||||
hidden: true,
|
// hidden: true,
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: '',
|
// path: '',
|
||||||
redirect: '/design/home',
|
// redirect: '/design/home',
|
||||||
component: DesignPlatform,
|
// component: DesignPlatform,
|
||||||
meta: {
|
// meta: {
|
||||||
i18n: 'router.designhomePage',
|
// i18n: 'router.designhomePage',
|
||||||
icon: 'design'
|
// icon: 'design'
|
||||||
},
|
// },
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: 'home',
|
// path: 'home',
|
||||||
component: DesignPlatformHome,
|
// component: DesignPlatformHome,
|
||||||
meta: {
|
// meta: {
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{ // 运行图设计
|
// { // 运行图设计
|
||||||
path: 'runPlan/detail/:mapId',
|
// path: 'runPlan/detail/:mapId',
|
||||||
component: PlanMonitorDetail,
|
// component: PlanMonitorDetail,
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{ // 剧本
|
// { // 剧本
|
||||||
path: 'script/home/:mapId',
|
// path: 'script/home/:mapId',
|
||||||
component: ScriptmanageHome,
|
// component: ScriptmanageHome,
|
||||||
meta: {
|
// meta: {
|
||||||
i18n: 'router.scriptManage'
|
// i18n: 'router.scriptManage'
|
||||||
},
|
// },
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{ // 课程列表
|
// { // 课程列表
|
||||||
path: 'lesson/home/:mapId',
|
// path: 'lesson/home/:mapId',
|
||||||
component: LessonHome,
|
// component: LessonHome,
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{ // 三维课程列表
|
// { // 三维课程列表
|
||||||
path: 'lesson/lesson3d',
|
// path: 'lesson/lesson3d',
|
||||||
component: Lesson3d,
|
// component: Lesson3d,
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{ // 操作定义
|
// { // 操作定义
|
||||||
path: 'lesson/trainingRule',
|
// path: 'lesson/trainingRule',
|
||||||
component: TrainingRuleList,
|
// component: TrainingRuleList,
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{ // 操作定义步骤
|
// { // 操作定义步骤
|
||||||
path: 'lesson/trainingRule/detail',
|
// path: 'lesson/trainingRule/detail',
|
||||||
hidden: true,
|
// hidden: true,
|
||||||
component: TrainingRuleEdit
|
// component: TrainingRuleEdit
|
||||||
},
|
// },
|
||||||
{ // 任务管理
|
// { // 任务管理
|
||||||
path: 'lesson/taskManage',
|
// path: 'lesson/taskManage',
|
||||||
component: Taskmanage,
|
// component: Taskmanage,
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{ // 实训管理
|
// { // 实训管理
|
||||||
path: 'lesson/trainingManage',
|
// path: 'lesson/trainingManage',
|
||||||
component: TrainingmanageOld,
|
// component: TrainingmanageOld,
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{ // 创建课程
|
// { // 创建课程
|
||||||
path: 'lesson/edit/:type',
|
// path: 'lesson/edit/:type',
|
||||||
component: LessonEdit,
|
// component: LessonEdit,
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{ // 课程详情
|
// { // 课程详情
|
||||||
path: 'lesson/details',
|
// path: 'lesson/details',
|
||||||
component: LessonDetail,
|
// component: LessonDetail,
|
||||||
hidden: true,
|
// hidden: true,
|
||||||
children: [
|
// children: [
|
||||||
{
|
// {
|
||||||
path: 'edit/:type',
|
// path: 'edit/:type',
|
||||||
component: LessonEdit,
|
// component: LessonEdit,
|
||||||
hidden: true
|
// hidden: true
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{ // 新版地图预览
|
// { // 新版地图预览
|
||||||
path: 'mapPreviewNew/:mapId',
|
// path: 'mapPreviewNew/:mapId',
|
||||||
component: MapPreviewNew,
|
// component: MapPreviewNew,
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: 'bigScreen/:mapId',
|
// path: 'bigScreen/:mapId',
|
||||||
component: BigScreen,
|
// component: BigScreen,
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{ // ibp列表
|
// { // ibp列表
|
||||||
path: 'ibp/home/:mapId',
|
// path: 'ibp/home/:mapId',
|
||||||
component: IbpHome,
|
// component: IbpHome,
|
||||||
hidden: true
|
// hidden: true
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: 'ibp/edit',
|
// path: 'ibp/edit',
|
||||||
component: IbpDraw,
|
// component: IbpDraw,
|
||||||
hidden: true
|
// hidden: true
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{ // 实训平台
|
{ // 实训平台
|
||||||
path: '/trainingPlatform',
|
path: '/trainingPlatform',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
@ -1082,13 +1082,13 @@ export const asyncRouter = [
|
|||||||
component: OrgDetail,
|
component: OrgDetail,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: 'boardManage',
|
// path: 'boardManage',
|
||||||
component: BoardManage,
|
// component: BoardManage,
|
||||||
meta: {
|
// meta: {
|
||||||
i18n: 'router.boardManage'
|
// i18n: 'router.boardManage'
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{ // 出题规则管理
|
{ // 出题规则管理
|
||||||
path: 'questionsRuleManage',
|
path: 'questionsRuleManage',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
@ -1133,14 +1133,14 @@ export const asyncRouter = [
|
|||||||
i18n: 'router.existingSimulation'
|
i18n: 'router.existingSimulation'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
// 子系统生成
|
// // 子系统生成
|
||||||
path: 'systemGenerate',
|
// path: 'systemGenerate',
|
||||||
component: SystemGenerate,
|
// component: SystemGenerate,
|
||||||
meta: {
|
// meta: {
|
||||||
i18n: 'router.subsystemGeneration'
|
// i18n: 'router.subsystemGeneration'
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{ // 消息公告
|
{ // 消息公告
|
||||||
path: 'news',
|
path: 'news',
|
||||||
component: News,
|
component: News,
|
||||||
@ -1210,13 +1210,13 @@ export const asyncRouter = [
|
|||||||
i18n: 'router.voiceTraining'
|
i18n: 'router.voiceTraining'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: 'projectServer',
|
// path: 'projectServer',
|
||||||
component: ProjectServer,
|
// component: ProjectServer,
|
||||||
meta: {
|
// meta: {
|
||||||
i18n: 'router.projectServer'
|
// i18n: 'router.projectServer'
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
path: 'iscsDeviceManage',
|
path: 'iscsDeviceManage',
|
||||||
component: IscsDeviceManage,
|
component: IscsDeviceManage,
|
||||||
|
@ -77,28 +77,29 @@ export default {
|
|||||||
{ label: '车务段段长', value: 'TRAIN_MASTER', enLabel: 'Train_Master' }
|
{ label: '车务段段长', value: 'TRAIN_MASTER', enLabel: 'Train_Master' }
|
||||||
],
|
],
|
||||||
roleTypeList: [
|
roleTypeList: [
|
||||||
{label: '行调', value: 'DISPATCHER'},
|
{label: 'NCC调度', value: 'NCC_DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||||
{label: 'NCC调度', value: 'NCC_DISPATCHER'},
|
{label: '信息调度', value: 'OCC_DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||||
{label: '行值', value: 'STATION_SUPERVISOR'},
|
{label: '行调', value: 'DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||||
{label: '司机', value: 'DRIVER'},
|
{label: '行值', value: 'STATION_SUPERVISOR', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||||
{label: '通号', value: 'MAINTAINER'},
|
{label: '司机', value: 'DRIVER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||||
{label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER'},
|
{label: '通号', value: 'MAINTAINER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
|
||||||
{label: '车辆段/停车场信号楼', value: 'SIGNAL_BUILDING'},
|
{label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER', simTypeList: ['METRO']},
|
||||||
{label: '车站助理', value: 'STATION_ASSISTANT'},
|
{label: '车辆段/停车场信号楼', value: 'SIGNAL_BUILDING', simTypeList: ['METRO']},
|
||||||
{label: '车站站长', value: 'STATION_MASTER'},
|
{label: '车站助理', value: 'STATION_ASSISTANT', simTypeList: ['RAILWAY']},
|
||||||
{label: '车站信号员', value: 'STATION_SIGNALER'},
|
{label: '车站站长', value: 'STATION_MASTER', simTypeList: ['RAILWAY']},
|
||||||
{label: '车站客运员', value: 'STATION_PASSENGER'},
|
{label: '车站信号员', value: 'STATION_SIGNALER', simTypeList: ['RAILWAY']},
|
||||||
{label: '车站扳道员', value: 'STATION_SWITCH_MAN'},
|
{label: '车站客运员', value: 'STATION_PASSENGER', simTypeList: ['RAILWAY']},
|
||||||
{label: '车站引导员', value: 'STATION_FACILITATOR'},
|
{label: '车站扳道员', value: 'STATION_SWITCH_MAN', simTypeList: ['RAILWAY']},
|
||||||
{label: '车站工务工', value: 'STATION_WORKER'},
|
{label: '车站引导员', value: 'STATION_FACILITATOR', simTypeList: ['RAILWAY']},
|
||||||
{label: '车务段段长', value: 'TRAIN_MASTER'},
|
{label: '车站工务工', value: 'STATION_WORKER', simTypeList: ['RAILWAY']},
|
||||||
{label: '工电调度', value: 'ELECTRIC_DISPATCHER'},
|
{label: '车务段段长', value: 'TRAIN_MASTER', simTypeList: ['METRO']},
|
||||||
{ label: '电力工务', value: 'STATION_ELECTRIC_WORKER'},
|
{label: '工电调度', value: 'ELECTRIC_DISPATCHER', simTypeList: ['METRO']},
|
||||||
{label: '上级部分', value: 'PARENT_DEPARTMENT'},
|
{label: '电力工务', value: 'STATION_ELECTRIC_WORKER', simTypeList: ['METRO']},
|
||||||
{label: '派班员', value: 'SCHEDULING'},
|
{label: '上级部分', value: 'PARENT_DEPARTMENT', simTypeList: ['METRO']},
|
||||||
{label: '设备管理员', value: 'DEVICE_MANAGER'},
|
{label: '派班员', value: 'SCHEDULING', simTypeList: ['METRO']},
|
||||||
{label: '值班主任', value: 'SHIFT_MANAGER'},
|
{label: '设备管理员', value: 'DEVICE_MANAGER', simTypeList: ['RAILWAY']},
|
||||||
{label: '环控调度', value: 'ENVIRONMENT_DISPATCHER'}
|
{label: '值班主任', value: 'SHIFT_MANAGER', simTypeList: ['METRO']},
|
||||||
|
{label: '环控调度', value: 'ENVIRONMENT_DISPATCHER', simTypeList: ['METRO']}
|
||||||
],
|
],
|
||||||
releaseReview: [
|
releaseReview: [
|
||||||
{ enlabel: 'Unpublished', label: '未发布', value: '0' },
|
{ enlabel: 'Unpublished', label: '未发布', value: '0' },
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -514,7 +514,9 @@ export default {
|
|||||||
CMD_Conversation_Chat_Text: {value: 'Conversation_Chat_Text', label: '发送文本消息'},
|
CMD_Conversation_Chat_Text: {value: 'Conversation_Chat_Text', label: '发送文本消息'},
|
||||||
CMD_Conversation_Chat_Audio_Base64: {value: 'Conversation_Chat_Audio_Base64', label: '发送语音消息'},
|
CMD_Conversation_Chat_Audio_Base64: {value: 'Conversation_Chat_Audio_Base64', label: '发送语音消息'},
|
||||||
CMD_Conversation_Group_Text_Chat: {value: 'Conversation_Group_Text_Chat', label: '发送会话群文字消息'},
|
CMD_Conversation_Group_Text_Chat: {value: 'Conversation_Group_Text_Chat', label: '发送会话群文字消息'},
|
||||||
CMD_Conversation_Group_Audio_Base64: {value: 'Conversation_Group_Audio_Base64', label: '发送会话群语音消息'}
|
CMD_Conversation_Group_Audio_Base64: {value: 'Conversation_Group_Audio_Base64', label: '发送会话群语音消息'},
|
||||||
|
CMD_Conversation_Group_Private_Text_Chat: {value: 'Conversation_Group_Private_Text_Chat', label: '发送私聊文字消息'},
|
||||||
|
CMD_Conversation_Group_Private_Audio_Base64: {value: 'Conversation_Group_Private_Audio_Base64', label: '发送私聊语音消息'}
|
||||||
},
|
},
|
||||||
PSL: {
|
PSL: {
|
||||||
CMD_PSL_PRESS_BUTTON: {value: 'PSL_PRESS_BUTTON', label: 'PSL按钮操作'}
|
CMD_PSL_PRESS_BUTTON: {value: 'PSL_PRESS_BUTTON', label: 'PSL按钮操作'}
|
||||||
|
@ -180,6 +180,12 @@ class Handler {
|
|||||||
operation3.operationType = CMD.Conversation.CMD_Conversation_Group_Audio_Base64.value;
|
operation3.operationType = CMD.Conversation.CMD_Conversation_Group_Audio_Base64.value;
|
||||||
operation3.params.id = operation.params.id;
|
operation3.params.id = operation.params.id;
|
||||||
}
|
}
|
||||||
|
if (operation.operationType == CMD.Conversation.CMD_Conversation_Group_Private_Text_Chat.value) { // 私聊新会话接口
|
||||||
|
step2.description = `私聊选中:${operation.params.groupName},点击录制语音`;
|
||||||
|
operation2.params.memberId = operation.params.memberId;
|
||||||
|
operation3.operationType = CMD.Conversation.CMD_Conversation_Group_Private_Audio_Base64.value;
|
||||||
|
operation3.params.memberId = operation.params.memberId;
|
||||||
|
}
|
||||||
const step3 = {
|
const step3 = {
|
||||||
description: `请说出“${operation.params.content}”后,再次点击发送语音!`,
|
description: `请说出“${operation.params.content}”后,再次点击发送语音!`,
|
||||||
memberId: stepInfo.memberId,
|
memberId: stepInfo.memberId,
|
||||||
|
@ -38,6 +38,18 @@ const projectConfig = {
|
|||||||
},
|
},
|
||||||
browserTitle: (state) => {
|
browserTitle: (state) => {
|
||||||
return state.viewSetting.browserTitle;
|
return state.viewSetting.browserTitle;
|
||||||
|
},
|
||||||
|
isRichor: (state) => {
|
||||||
|
return state.viewSetting.isRichor;
|
||||||
|
},
|
||||||
|
copyrightShow: (state) => {
|
||||||
|
return state.viewSetting.copyrightShow;
|
||||||
|
},
|
||||||
|
bottomCompanyInfo: (state) => {
|
||||||
|
return state.viewSetting.bottomCompanyInfo;
|
||||||
|
},
|
||||||
|
bottomRecordNumber: (state) => {
|
||||||
|
return state.viewSetting.bottomRecordNumber;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
|
@ -49,7 +49,8 @@ const training = {
|
|||||||
domConfig: {}, // 线路功能前端配置项
|
domConfig: {}, // 线路功能前端配置项
|
||||||
simulationUserType: '', // 仿真用户角色
|
simulationUserType: '', // 仿真用户角色
|
||||||
simulationCreator: false,
|
simulationCreator: false,
|
||||||
chatBoxMin: true // 聊天框最小化
|
chatBoxMin: true, // 聊天框最小化
|
||||||
|
memberTreeData: [] // 仿真成员树数据
|
||||||
},
|
},
|
||||||
|
|
||||||
getters: {
|
getters: {
|
||||||
@ -273,6 +274,8 @@ const training = {
|
|||||||
state.simulationUserList.push(item);
|
state.simulationUserList.push(item);
|
||||||
} else if (item.messageType === 'KICK_OUT' && memberIndex > -1) {
|
} else if (item.messageType === 'KICK_OUT' && memberIndex > -1) {
|
||||||
state.simulationUserList.splice(memberIndex, 1);
|
state.simulationUserList.splice(memberIndex, 1);
|
||||||
|
} else if (item.messageType === 'EXIT' && memberIndex > -1) {
|
||||||
|
state.simulationUserList.splice(memberIndex, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.messageType === 'PLAY_CHANGE') {
|
if (item.messageType === 'PLAY_CHANGE') {
|
||||||
@ -322,6 +325,9 @@ const training = {
|
|||||||
},
|
},
|
||||||
setChatBoxMin: (state, chatBoxMin) => {
|
setChatBoxMin: (state, chatBoxMin) => {
|
||||||
state.chatBoxMin = chatBoxMin;
|
state.chatBoxMin = chatBoxMin;
|
||||||
|
},
|
||||||
|
setMemberTreeData: (state, memberTreeData) => {
|
||||||
|
state.memberTreeData = memberTreeData;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -658,6 +664,9 @@ const training = {
|
|||||||
},
|
},
|
||||||
setChatBoxMin: ({ commit }, chatBoxMin) => {
|
setChatBoxMin: ({ commit }, chatBoxMin) => {
|
||||||
commit('setChatBoxMin', chatBoxMin);
|
commit('setChatBoxMin', chatBoxMin);
|
||||||
|
},
|
||||||
|
setMemberTreeData: ({ commit }, memberTreeData) => {
|
||||||
|
commit('setMemberTreeData', memberTreeData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -22,6 +22,7 @@ const user = {
|
|||||||
companyAdmin: false,
|
companyAdmin: false,
|
||||||
companyName: '',
|
companyName: '',
|
||||||
companyProjectList: [],
|
companyProjectList: [],
|
||||||
|
thirdLogin: false,
|
||||||
baseUrl:'',
|
baseUrl:'',
|
||||||
// resourcesUrl: '',
|
// resourcesUrl: '',
|
||||||
// uploadUrl: '',
|
// uploadUrl: '',
|
||||||
@ -69,6 +70,9 @@ const user = {
|
|||||||
SET_COMPANYPROJECTLIST: (state, companyProjectList) => {
|
SET_COMPANYPROJECTLIST: (state, companyProjectList) => {
|
||||||
state.companyProjectList = companyProjectList;
|
state.companyProjectList = companyProjectList;
|
||||||
},
|
},
|
||||||
|
SET_THIRDLOGIN: (state, thirdLogin) => {
|
||||||
|
state.thirdLogin = thirdLogin;
|
||||||
|
},
|
||||||
CLEAR_AUTO_PARAMS: () => {
|
CLEAR_AUTO_PARAMS: () => {
|
||||||
Cookies.remove('UserDesignName');
|
Cookies.remove('UserDesignName');
|
||||||
Cookies.remove('UserDesignToken');
|
Cookies.remove('UserDesignToken');
|
||||||
@ -159,6 +163,7 @@ const user = {
|
|||||||
commit('SET_COMPANYADMIN', user.companyAdmin);
|
commit('SET_COMPANYADMIN', user.companyAdmin);
|
||||||
commit('SET_COMPANYNAME', user.companyName);
|
commit('SET_COMPANYNAME', user.companyName);
|
||||||
commit('SET_COMPANYPROJECTLIST', user.projectCodes);
|
commit('SET_COMPANYPROJECTLIST', user.projectCodes);
|
||||||
|
commit('SET_THIRDLOGIN', user.thirdLogin);
|
||||||
resolve(user);
|
resolve(user);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error);
|
reject(error);
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
import { getSessionStorage } from '@/utils/auth';
|
// import { getSessionStorage } from '@/utils/auth';
|
||||||
// listPublishMap
|
// listPublishMap
|
||||||
import { getMapListByProjectCode, getPublishMapListOnline } from '@/api/jmap/map';
|
import { getMapListByProjectCode, getPublishMapListOnline } from '@/api/jmap/map';
|
||||||
import { ProjectCode } from '@/scripts/ProjectConfig';
|
// import { ProjectCode } from '@/scripts/ProjectConfig';
|
||||||
|
|
||||||
export async function getMapListByProject() {
|
export async function getMapListByProject() {
|
||||||
const project = getSessionStorage('project');
|
// const project = getSessionStorage('project');
|
||||||
let mapList = [];
|
let mapList = [];
|
||||||
if (project.endsWith('xty') || project.endsWith('gzb') || project.endsWith('heb') || project.endsWith('teaching')) {
|
// if (project.endsWith('xty') || project.endsWith('gzb') || project.endsWith('heb') || project.endsWith('teaching')) {
|
||||||
mapList = await getMapListByProjectCode(ProjectCode[project]);
|
// mapList = await getMapListByProjectCode(ProjectCode[project]);
|
||||||
} else {
|
// } else {
|
||||||
// mapList = await listPublishMap({ 'drawWay': true });
|
// mapList = await listPublishMap({ 'drawWay': true });
|
||||||
mapList = await getPublishMapListOnline();
|
mapList = await getPublishMapListOnline();
|
||||||
}
|
// }
|
||||||
return mapList;
|
return mapList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,13 @@ function callback(Response) {
|
|||||||
} else if (Response.headers.destination.includes('sysTime')) {
|
} else if (Response.headers.destination.includes('sysTime')) {
|
||||||
store.dispatch('socket/setSimulationTimeSync', Number.parseInt(Response.body));
|
store.dispatch('socket/setSimulationTimeSync', Number.parseInt(Response.body));
|
||||||
} else if (Response.headers.destination.includes('state')) {
|
} else if (Response.headers.destination.includes('state')) {
|
||||||
store.dispatch('socket/handleSimulationState', Number.parseInt(Response.body));
|
const msg = JSON.parse(Response.body);
|
||||||
|
if (msg.hasOwnProperty('state')) {
|
||||||
|
store.dispatch('socket/handleSimulationState', Number.parseInt(msg.state));
|
||||||
|
}
|
||||||
|
if (msg.hasOwnProperty('speed')) {
|
||||||
|
store.dispatch('socket/setSimulationSpeed', Number.parseInt(msg.speed));
|
||||||
|
}
|
||||||
} else if (Response.headers.destination.includes('iscs/psd') || Response.headers.destination.includes('iscs/gate')) {
|
} else if (Response.headers.destination.includes('iscs/psd') || Response.headers.destination.includes('iscs/gate')) {
|
||||||
store.dispatch('socket/handleIscsState', JSON.parse(Response.body));
|
store.dispatch('socket/handleIscsState', JSON.parse(Response.body));
|
||||||
} else if (Response.headers.destination.includes('iscs/pa')) {
|
} else if (Response.headers.destination.includes('iscs/pa')) {
|
||||||
|
@ -8,7 +8,13 @@ export function sysTimeCallback(Response) {
|
|||||||
store.dispatch('socket/setSimulationTimeSync', Number.parseInt(Response.body));
|
store.dispatch('socket/setSimulationTimeSync', Number.parseInt(Response.body));
|
||||||
}
|
}
|
||||||
export function stateCallback(Response) {
|
export function stateCallback(Response) {
|
||||||
store.dispatch('socket/handleSimulationState', Number.parseInt(Response.body));
|
const msg = JSON.parse(Response.body);
|
||||||
|
if (msg.hasOwnProperty('state')) {
|
||||||
|
store.dispatch('socket/handleSimulationState', Number.parseInt(msg.state));
|
||||||
|
}
|
||||||
|
if (msg.hasOwnProperty('speed')) {
|
||||||
|
store.dispatch('socket/setSimulationSpeed', Number.parseInt(msg.speed));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
export function iscsPsdCallback(Response) {
|
export function iscsPsdCallback(Response) {
|
||||||
store.dispatch('socket/handleIscsState', JSON.parse(Response.body));
|
store.dispatch('socket/handleIscsState', JSON.parse(Response.body));
|
||||||
|
@ -1,304 +1,304 @@
|
|||||||
<template>
|
<!--<template>-->
|
||||||
<div v-loading="loading" class="map-list-main">
|
<!-- <div v-loading="loading" class="map-list-main">-->
|
||||||
<div>
|
<!-- <div>-->
|
||||||
<div class="mapListName">
|
<!-- <div class="mapListName">-->
|
||||||
<span>{{ $t('map.publishedMapList') }}</span>
|
<!-- <span>{{ $t('map.publishedMapList') }}</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<template v-if="!getMapByCode">
|
<!-- <template v-if="!getMapByCode">-->
|
||||||
<filter-city ref="filerCity" filter-empty :local-param-name="localParamName" @filterSelectChange="refresh" />
|
<!-- <filter-city ref="filerCity" filter-empty :local-param-name="localParamName" @filterSelectChange="refresh" />-->
|
||||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
<!-- <el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="text_item">
|
<!-- <div class="text_item">-->
|
||||||
<el-tree ref="tree" :data="treeList" :default-expanded-keys="defaultShowKeys" node-key="id" :props="defaultProps" highlight-current :span="22" :filter-node-method="filterNode" @node-click="clickEvent">
|
<!-- <el-tree ref="tree" :data="treeList" :default-expanded-keys="defaultShowKeys" node-key="id" :props="defaultProps" highlight-current :span="22" :filter-node-method="filterNode" @node-click="clickEvent">-->
|
||||||
<span slot-scope="{ node:tnode, data }">
|
<!-- <span slot-scope="{ node:tnode, data }">-->
|
||||||
<span class="el-icon-tickets" :style="{color: data.valid ? 'green':''}" />
|
<!-- <span class="el-icon-tickets" :style="{color: data.valid ? 'green':''}" />-->
|
||||||
<span> {{ tnode.label }}</span>
|
<!-- <span> {{ tnode.label }}</span>-->
|
||||||
</span>
|
<!-- </span>-->
|
||||||
</el-tree>
|
<!-- </el-tree>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
<script>
|
<!--<script>-->
|
||||||
import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map';
|
<!--import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map';-->
|
||||||
import { UrlConfig } from '@/scripts/ConstDic';
|
<!--import { UrlConfig } from '@/scripts/ConstDic';-->
|
||||||
import { superAdmin, admin, lessonCreater } from '@/router/index';
|
<!--import { superAdmin, admin, lessonCreater } from '@/router/index';-->
|
||||||
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
<!--import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';-->
|
||||||
import FilterCity from '@/views/components/filterCity';
|
<!--import FilterCity from '@/views/components/filterCity';-->
|
||||||
import localStore from 'storejs';
|
<!--import localStore from 'storejs';-->
|
||||||
import { ProjectCode, GetMapListByProjectList } from '@/scripts/ProjectConfig';
|
<!--import { ProjectCode, GetMapListByProjectList } from '@/scripts/ProjectConfig';-->
|
||||||
import { createSimulationNew } from '@/api/simulation';
|
<!--import { createSimulationNew } from '@/api/simulation';-->
|
||||||
|
|
||||||
export default {
|
<!--export default {-->
|
||||||
name: 'PublicMapList',
|
<!-- name: 'PublicMapList',-->
|
||||||
components: {
|
<!-- components: {-->
|
||||||
FilterCity
|
<!-- FilterCity-->
|
||||||
},
|
<!-- },-->
|
||||||
data() {
|
<!-- data() {-->
|
||||||
return {
|
<!-- return {-->
|
||||||
loading: true,
|
<!-- loading: true,-->
|
||||||
widthLeft:0,
|
<!-- widthLeft:0,-->
|
||||||
defaultShowKeys: [],
|
<!-- defaultShowKeys: [],-->
|
||||||
filterText: '',
|
<!-- filterText: '',-->
|
||||||
treeData: [],
|
<!-- treeData: [],-->
|
||||||
treeList: [],
|
<!-- treeList: [],-->
|
||||||
selected: {},
|
<!-- selected: {},-->
|
||||||
defaultProps: {
|
<!-- defaultProps: {-->
|
||||||
children: 'children',
|
<!-- children: 'children',-->
|
||||||
label: 'name'
|
<!-- label: 'name'-->
|
||||||
},
|
<!-- },-->
|
||||||
node: {
|
<!-- node: {-->
|
||||||
},
|
<!-- },-->
|
||||||
localParamName: 'publish_cityCode'
|
<!-- localParamName: 'publish_cityCode'-->
|
||||||
};
|
<!-- };-->
|
||||||
},
|
<!-- },-->
|
||||||
computed: {
|
<!-- computed: {-->
|
||||||
project() {
|
<!-- project() {-->
|
||||||
return getSessionStorage('project');
|
<!-- return getSessionStorage('project');-->
|
||||||
},
|
<!-- },-->
|
||||||
getMapByCode() {
|
<!-- getMapByCode() {-->
|
||||||
const project = getSessionStorage('project');
|
<!-- const project = getSessionStorage('project');-->
|
||||||
return GetMapListByProjectList.includes(project);
|
<!-- return GetMapListByProjectList.includes(project);-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
watch: {
|
<!-- watch: {-->
|
||||||
filterText(val) {
|
<!-- filterText(val) {-->
|
||||||
this.treeList = this.treeData.filter((res) => {
|
<!-- this.treeList = this.treeData.filter((res) => {-->
|
||||||
return res.name.includes(val);
|
<!-- return res.name.includes(val);-->
|
||||||
});
|
<!-- });-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
beforeDestroy () {
|
<!-- beforeDestroy () {-->
|
||||||
removeSessionStorage('demonList');
|
<!-- removeSessionStorage('demonList');-->
|
||||||
},
|
<!-- },-->
|
||||||
mounted() {
|
<!-- mounted() {-->
|
||||||
if (this.getMapByCode) {
|
<!-- if (this.getMapByCode) {-->
|
||||||
this.refresh();
|
<!-- this.refresh();-->
|
||||||
}
|
<!-- }-->
|
||||||
if (this.$route.query.mapId || this.$route.params.mapId) {
|
<!-- if (this.$route.query.mapId || this.$route.params.mapId) {-->
|
||||||
const mapId = this.$route.query.mapId || this.$route.params.mapId;
|
<!-- const mapId = this.$route.query.mapId || this.$route.params.mapId;-->
|
||||||
this.defaultShowKeys = [mapId];
|
<!-- this.defaultShowKeys = [mapId];-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
methods: {
|
<!-- methods: {-->
|
||||||
filterNode(value, data) {
|
<!-- filterNode(value, data) {-->
|
||||||
if (!value) return true;
|
<!-- if (!value) return true;-->
|
||||||
return data.name.indexOf(value) !== -1;
|
<!-- return data.name.indexOf(value) !== -1;-->
|
||||||
},
|
<!-- },-->
|
||||||
showContextMenu(e, obj, node, vueElem) {
|
<!-- showContextMenu(e, obj, node, vueElem) {-->
|
||||||
if (obj) {
|
<!-- if (obj) {-->
|
||||||
this.node = node;
|
<!-- this.node = node;-->
|
||||||
this.selected = obj;
|
<!-- this.selected = obj;-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
clickEvent(obj, data, ele) {
|
<!-- clickEvent(obj, data, ele) {-->
|
||||||
switch (obj.type) {
|
<!-- switch (obj.type) {-->
|
||||||
case 'scriptDesign': {
|
<!-- case 'scriptDesign': {-->
|
||||||
const query = {lineCode:obj.lineCode};
|
<!-- const query = {lineCode:obj.lineCode};-->
|
||||||
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?`, query});
|
<!-- this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?`, query});-->
|
||||||
break;
|
<!-- break;-->
|
||||||
}
|
<!-- }-->
|
||||||
case 'lessonDesign': {
|
<!-- case 'lessonDesign': {-->
|
||||||
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}?lineCode=${obj.lineCode}&cityCode=${obj.cityCode}` });
|
<!-- this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}?lineCode=${obj.lineCode}&cityCode=${obj.cityCode}` });-->
|
||||||
break;
|
<!-- break;-->
|
||||||
}
|
<!-- }-->
|
||||||
case 'lesson3dDesign': {
|
<!-- case 'lesson3dDesign': {-->
|
||||||
this.$router.push({ path: `${UrlConfig.design.lesson3d}`});
|
<!-- this.$router.push({ path: `${UrlConfig.design.lesson3d}`});-->
|
||||||
break;
|
<!-- break;-->
|
||||||
}
|
<!-- }-->
|
||||||
case 'runPlanDesign': {
|
<!-- case 'runPlanDesign': {-->
|
||||||
this.$router.push({ path: `${UrlConfig.design.runPlan}/${obj.mapId}?lineCode=${obj.lineCode}` });
|
<!-- this.$router.push({ path: `${UrlConfig.design.runPlan}/${obj.mapId}?lineCode=${obj.lineCode}` });-->
|
||||||
break;
|
<!-- break;-->
|
||||||
}
|
<!-- }-->
|
||||||
case 'map': {
|
<!-- case 'map': {-->
|
||||||
setSessionStorage('demonList', obj.id);
|
<!-- setSessionStorage('demonList', obj.id);-->
|
||||||
break;
|
<!-- break;-->
|
||||||
}
|
<!-- }-->
|
||||||
case 'mapPreview': {
|
<!-- case 'mapPreview': {-->
|
||||||
this.$router.push({ path: `${UrlConfig.design.mapPreviewNew}/${obj.mapId}` });
|
<!-- this.$router.push({ path: `${UrlConfig.design.mapPreviewNew}/${obj.mapId}` });-->
|
||||||
break;
|
<!-- break;-->
|
||||||
}
|
<!-- }-->
|
||||||
case 'ibpDesign': {
|
<!-- case 'ibpDesign': {-->
|
||||||
this.$router.push({ path: `${UrlConfig.design.ibpHome}/${obj.mapId}`, query: {cityCode: obj.cityCode} });
|
<!-- this.$router.push({ path: `${UrlConfig.design.ibpHome}/${obj.mapId}`, query: {cityCode: obj.cityCode} });-->
|
||||||
break;
|
<!-- break;-->
|
||||||
}
|
<!-- }-->
|
||||||
case 'bigScreen': {
|
<!-- case 'bigScreen': {-->
|
||||||
this.$router.push({ path: `/design/bigScreen/${obj.mapId}` });
|
<!-- this.$router.push({ path: `/design/bigScreen/${obj.mapId}` });-->
|
||||||
break;
|
<!-- break;-->
|
||||||
}
|
<!-- }-->
|
||||||
case 'bigSplitScreen': {
|
<!-- case 'bigSplitScreen': {-->
|
||||||
this.$store.dispatch('app/transitionAnimations');
|
<!-- this.$store.dispatch('app/transitionAnimations');-->
|
||||||
this.$router.push({ path: `/bigSplitScreen/${obj.mapId}` });
|
<!-- this.$router.push({ path: `/bigSplitScreen/${obj.mapId}` });-->
|
||||||
break;
|
<!-- break;-->
|
||||||
}
|
<!-- }-->
|
||||||
case 'trainingDesign': {
|
<!-- case 'trainingDesign': {-->
|
||||||
const data = { mapId: obj.mapId, prdType: '01' };
|
<!-- const data = { mapId: obj.mapId, prdType: '01' };-->
|
||||||
createSimulationNew(data).then(resp => {
|
<!-- createSimulationNew(data).then(resp => {-->
|
||||||
this.$store.dispatch('app/transitionAnimations');
|
<!-- this.$store.dispatch('app/transitionAnimations');-->
|
||||||
const query = { mapId: obj.mapId, group: resp.data, lineCode:obj.lineCode};
|
<!-- const query = { mapId: obj.mapId, group: resp.data, lineCode:obj.lineCode};-->
|
||||||
this.$router.push({ path: `/trainingDesign`, query });
|
<!-- this.$router.push({ path: `/trainingDesign`, query });-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
<!-- this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);-->
|
||||||
});
|
<!-- });-->
|
||||||
break;
|
<!-- break;-->
|
||||||
}
|
<!-- }-->
|
||||||
case 'trainingPreview': {
|
<!-- case 'trainingPreview': {-->
|
||||||
const data = { mapId: obj.mapId };
|
<!-- const data = { mapId: obj.mapId };-->
|
||||||
createSimulationNew(data).then(resp => {
|
<!-- createSimulationNew(data).then(resp => {-->
|
||||||
this.$store.dispatch('app/transitionAnimations');
|
<!-- this.$store.dispatch('app/transitionAnimations');-->
|
||||||
this.$store.dispatch('training/setPrdType', '02');
|
<!-- this.$store.dispatch('training/setPrdType', '02');-->
|
||||||
const query = { ...data, group: resp.data, scriptId: obj.id, lineCode:obj.lineCode};
|
<!-- const query = { ...data, group: resp.data, scriptId: obj.id, lineCode:obj.lineCode};-->
|
||||||
this.$router.push({ path: `/trainingPreview`, query });
|
<!-- this.$router.push({ path: `/trainingPreview`, query });-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
<!-- this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);-->
|
||||||
});
|
<!-- });-->
|
||||||
break;
|
<!-- break;-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
async refresh(filterSelect) {
|
<!-- async refresh(filterSelect) {-->
|
||||||
this.loading = true;
|
<!-- this.loading = true;-->
|
||||||
this.treeData = this.treeList = [];
|
<!-- this.treeData = this.treeList = [];-->
|
||||||
const that = this;
|
<!-- const that = this;-->
|
||||||
try {
|
<!-- try {-->
|
||||||
let res = '';
|
<!-- let res = '';-->
|
||||||
if (this.getMapByCode) {
|
<!-- if (this.getMapByCode) {-->
|
||||||
res = await getMapListByProjectCode(ProjectCode[this.project]);
|
<!-- res = await getMapListByProjectCode(ProjectCode[this.project]);-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
res = await listPublishMap({cityCode: filterSelect});
|
<!-- res = await listPublishMap({cityCode: filterSelect});-->
|
||||||
}
|
<!-- }-->
|
||||||
res.data && res.data.forEach(elem=>{
|
<!-- res.data && res.data.forEach(elem=>{-->
|
||||||
elem.children = [
|
<!-- elem.children = [-->
|
||||||
{
|
<!-- {-->
|
||||||
id: '1',
|
<!-- id: '1',-->
|
||||||
name: this.$t('designPlatform.mapPreview'),
|
<!-- name: this.$t('designPlatform.mapPreview'),-->
|
||||||
type: 'mapPreview',
|
<!-- type: 'mapPreview',-->
|
||||||
mapId: elem.id,
|
<!-- mapId: elem.id,-->
|
||||||
cityCode: elem.cityCode
|
<!-- cityCode: elem.cityCode-->
|
||||||
}
|
<!-- }-->
|
||||||
];
|
<!-- ];-->
|
||||||
this.isAdministrator() ? elem.children.push({id: '2', name: this.$t('designPlatform.lessonDesign'), type: 'lessonDesign', mapId: elem.id, cityCode: elem.cityCode, lineCode: elem.lineCode}) : '';
|
<!-- this.isAdministrator() ? elem.children.push({id: '2', name: this.$t('designPlatform.lessonDesign'), type: 'lessonDesign', mapId: elem.id, cityCode: elem.cityCode, lineCode: elem.lineCode}) : '';-->
|
||||||
elem.children.push(
|
<!-- elem.children.push(-->
|
||||||
{
|
<!-- {-->
|
||||||
id: '3',
|
<!-- id: '3',-->
|
||||||
name: this.$t('designPlatform.scriptDesign'),
|
<!-- name: this.$t('designPlatform.scriptDesign'),-->
|
||||||
type: 'scriptDesign',
|
<!-- type: 'scriptDesign',-->
|
||||||
mapId: elem.id,
|
<!-- mapId: elem.id,-->
|
||||||
cityCode: elem.cityCode,
|
<!-- cityCode: elem.cityCode,-->
|
||||||
lineCode: elem.lineCode
|
<!-- lineCode: elem.lineCode-->
|
||||||
// code:elem.children.find(n => { return n.name.includes("行调")})
|
<!-- // code:elem.children.find(n => { return n.name.includes("行调")})-->
|
||||||
});
|
<!-- });-->
|
||||||
elem.children.push(
|
<!-- elem.children.push(-->
|
||||||
{
|
<!-- {-->
|
||||||
id: '4',
|
<!-- id: '4',-->
|
||||||
name: this.$t('designPlatform.runPlanDesign'),
|
<!-- name: this.$t('designPlatform.runPlanDesign'),-->
|
||||||
type: 'runPlanDesign',
|
<!-- type: 'runPlanDesign',-->
|
||||||
mapId: elem.id,
|
<!-- mapId: elem.id,-->
|
||||||
lineCode: elem.lineCode,
|
<!-- lineCode: elem.lineCode,-->
|
||||||
cityCode: elem.cityCode
|
<!-- cityCode: elem.cityCode-->
|
||||||
}
|
<!-- }-->
|
||||||
);
|
<!-- );-->
|
||||||
if (process.env.VUE_APP_PRO !== 'local') {
|
<!-- if (process.env.VUE_APP_PRO !== 'local') {-->
|
||||||
elem.children.push(
|
<!-- elem.children.push(-->
|
||||||
{
|
<!-- {-->
|
||||||
id: '5',
|
<!-- id: '5',-->
|
||||||
name: 'IBP盘设计',
|
<!-- name: 'IBP盘设计',-->
|
||||||
type: 'ibpDesign',
|
<!-- type: 'ibpDesign',-->
|
||||||
mapId: elem.id,
|
<!-- mapId: elem.id,-->
|
||||||
lineCode: elem.lineCode,
|
<!-- lineCode: elem.lineCode,-->
|
||||||
cityCode: elem.cityCode
|
<!-- cityCode: elem.cityCode-->
|
||||||
}
|
<!-- }-->
|
||||||
);
|
<!-- );-->
|
||||||
}
|
<!-- }-->
|
||||||
elem.children.push({
|
<!-- elem.children.push({-->
|
||||||
id: '6',
|
<!-- id: '6',-->
|
||||||
name: '大屏预览',
|
<!-- name: '大屏预览',-->
|
||||||
type: 'bigScreen',
|
<!-- type: 'bigScreen',-->
|
||||||
mapId: elem.id,
|
<!-- mapId: elem.id,-->
|
||||||
lineCode: elem.lineCode,
|
<!-- lineCode: elem.lineCode,-->
|
||||||
cityCode: elem.cityCode
|
<!-- cityCode: elem.cityCode-->
|
||||||
});
|
<!-- });-->
|
||||||
elem.children.push({
|
<!-- elem.children.push({-->
|
||||||
id: '7',
|
<!-- id: '7',-->
|
||||||
name: '大屏分屏预览',
|
<!-- name: '大屏分屏预览',-->
|
||||||
type: 'bigSplitScreen',
|
<!-- type: 'bigSplitScreen',-->
|
||||||
mapId: elem.id,
|
<!-- mapId: elem.id,-->
|
||||||
lineCode: elem.lineCode,
|
<!-- lineCode: elem.lineCode,-->
|
||||||
cityCode: elem.cityCode
|
<!-- cityCode: elem.cityCode-->
|
||||||
});
|
<!-- });-->
|
||||||
this.isAdministrator() ? elem.children.push({id: '8', name: this.$t('designPlatform.lesson3dDesign'), type: 'lesson3dDesign'}) : '';
|
<!-- this.isAdministrator() ? elem.children.push({id: '8', name: this.$t('designPlatform.lesson3dDesign'), type: 'lesson3dDesign'}) : '';-->
|
||||||
elem.children.push(
|
<!-- elem.children.push(-->
|
||||||
{
|
<!-- {-->
|
||||||
id: '9',
|
<!-- id: '9',-->
|
||||||
name: '实训设计',
|
<!-- name: '实训设计',-->
|
||||||
type: 'trainingDesign',
|
<!-- type: 'trainingDesign',-->
|
||||||
mapId: elem.id,
|
<!-- mapId: elem.id,-->
|
||||||
lineCode: elem.lineCode,
|
<!-- lineCode: elem.lineCode,-->
|
||||||
cityCode: elem.cityCode
|
<!-- cityCode: elem.cityCode-->
|
||||||
}
|
<!-- }-->
|
||||||
);
|
<!-- );-->
|
||||||
elem.children.push(
|
<!-- elem.children.push(-->
|
||||||
{
|
<!-- {-->
|
||||||
id: '10',
|
<!-- id: '10',-->
|
||||||
name: '实训预览',
|
<!-- name: '实训预览',-->
|
||||||
type: 'trainingPreview',
|
<!-- type: 'trainingPreview',-->
|
||||||
mapId: elem.id,
|
<!-- mapId: elem.id,-->
|
||||||
lineCode: elem.lineCode,
|
<!-- lineCode: elem.lineCode,-->
|
||||||
cityCode: elem.cityCode
|
<!-- cityCode: elem.cityCode-->
|
||||||
}
|
<!-- }-->
|
||||||
);
|
<!-- );-->
|
||||||
});
|
<!-- });-->
|
||||||
|
|
||||||
this.treeData = res.data;
|
<!-- this.treeData = res.data;-->
|
||||||
this.treeList = this.filterText
|
<!-- this.treeList = this.filterText-->
|
||||||
? res.data.filter(elem => { return elem.name.includes(this.filterText); })
|
<!-- ? res.data.filter(elem => { return elem.name.includes(this.filterText); })-->
|
||||||
: res.data;
|
<!-- : res.data;-->
|
||||||
this.$nextTick(() => {
|
<!-- this.$nextTick(() => {-->
|
||||||
const mapId = getSessionStorage('demonList') || null;
|
<!-- const mapId = getSessionStorage('demonList') || null;-->
|
||||||
this.$refs.tree.setCurrentKey(mapId);
|
<!-- this.$refs.tree.setCurrentKey(mapId);-->
|
||||||
this.loading = false;
|
<!-- this.loading = false;-->
|
||||||
});
|
<!-- });-->
|
||||||
} catch (error) {
|
<!-- } catch (error) {-->
|
||||||
this.loading = false;
|
<!-- this.loading = false;-->
|
||||||
this.$messageBox(that.$t('error.refreshFailed'));
|
<!-- this.$messageBox(that.$t('error.refreshFailed'));-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
resize() {
|
<!-- resize() {-->
|
||||||
this.widthLeft = Number(localStore.get('LeftWidth')) || this.widthLeft;
|
<!-- this.widthLeft = Number(localStore.get('LeftWidth')) || this.widthLeft;-->
|
||||||
const width = this.$store.state.app.width - 521 - this.widthLeft;
|
<!-- const width = this.$store.state.app.width - 521 - this.widthLeft;-->
|
||||||
const height = this.$store.state.app.height - 90;
|
<!-- const height = this.$store.state.app.height - 90;-->
|
||||||
this.$store.dispatch('config/resize', { width: width, height: height });
|
<!-- this.$store.dispatch('config/resize', { width: width, height: height });-->
|
||||||
},
|
<!-- },-->
|
||||||
isAdministrator() {
|
<!-- isAdministrator() {-->
|
||||||
return this.$store.state.user.roles.includes(superAdmin) || this.$store.state.user.roles.includes(admin) || this.$store.state.user.roles.includes(lessonCreater);
|
<!-- return this.$store.state.user.roles.includes(superAdmin) || this.$store.state.user.roles.includes(admin) || this.$store.state.user.roles.includes(lessonCreater);-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
};
|
<!--};-->
|
||||||
</script>
|
<!--</script>-->
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<!--<style rel="stylesheet/scss" lang="scss" scoped>-->
|
||||||
.text_item{
|
<!-- .text_item{-->
|
||||||
width: 100%;
|
<!-- width: 100%;-->
|
||||||
flex: 1;
|
<!-- flex: 1;-->
|
||||||
overflow: auto;
|
<!-- overflow: auto;-->
|
||||||
padding-bottom: 10px;
|
<!-- padding-bottom: 10px;-->
|
||||||
padding-top: 5px;
|
<!-- padding-top: 5px;-->
|
||||||
}
|
<!-- }-->
|
||||||
|
|
||||||
.map-list-main{
|
<!-- .map-list-main{-->
|
||||||
height: 100%;
|
<!-- height: 100%;-->
|
||||||
display:flex;
|
<!-- display:flex;-->
|
||||||
flex-direction:column;
|
<!-- flex-direction:column;-->
|
||||||
}
|
<!-- }-->
|
||||||
.mapListName{
|
<!-- .mapListName{-->
|
||||||
padding: 15px 0px 15px 20px;
|
<!-- padding: 15px 0px 15px 20px;-->
|
||||||
border-bottom: 1px solid #EBEEF5;
|
<!-- border-bottom: 1px solid #EBEEF5;-->
|
||||||
}
|
<!-- }-->
|
||||||
</style>
|
<!--</style>-->
|
||||||
<style>
|
<!--<style>-->
|
||||||
.el-tree {
|
<!-- .el-tree {-->
|
||||||
overflow-x: hidden;
|
<!-- overflow-x: hidden;-->
|
||||||
}
|
<!-- }-->
|
||||||
.el-tree-node.is-current>.el-tree-node__content {
|
<!-- .el-tree-node.is-current>.el-tree-node__content {-->
|
||||||
background-color: #e4e3e3 !important;
|
<!-- background-color: #e4e3e3 !important;-->
|
||||||
}
|
<!-- }-->
|
||||||
</style>
|
<!--</style>-->
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="designPlatform" :style="'padding-left:'+(widthLeft)+'px'">
|
<div class="designPlatform" :style="'padding-left:'+(widthLeft)+'px'">
|
||||||
<div class="designPubMapList" :style="{width: widthLeft+'px'}">
|
<div class="designPubMapList" :style="{width: widthLeft+'px'}">
|
||||||
<demon-list ref="demonList" />
|
<!-- <demon-list ref="demonList" />-->
|
||||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
||||||
</div>
|
</div>
|
||||||
<transition>
|
<transition>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import demonList from './demonList';
|
// import demonList from './demonList';
|
||||||
import drapLeft from '@/views/components/drapLeft/index';
|
import drapLeft from '@/views/components/drapLeft/index';
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||||
@ -19,7 +19,7 @@ import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
|||||||
export default {
|
export default {
|
||||||
name: 'DesignPlatform',
|
name: 'DesignPlatform',
|
||||||
components: {
|
components: {
|
||||||
demonList,
|
// demonList,
|
||||||
drapLeft
|
drapLeft
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
|
||||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||||
import bgPsdImg from '@/assets/bg_psd.png';
|
import bgPsdImg from '@/assets/bg_psd.png';
|
||||||
// import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
|
// import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
|
||||||
|
@ -57,7 +57,6 @@ import DevicefaultList from '@/views/jlmap3d/maintainer/component/devicefaultlis
|
|||||||
import FaultDevice from '@/views/jlmap3d/maintainer/component/faultdevice';
|
import FaultDevice from '@/views/jlmap3d/maintainer/component/faultdevice';
|
||||||
|
|
||||||
import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu';
|
import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu';
|
||||||
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
|
||||||
|
|
||||||
import bgPsdImg from '@/assets/bg_psd.png';
|
import bgPsdImg from '@/assets/bg_psd.png';
|
||||||
// import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
|
// import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
|
||||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||||
import bgPsdImg from '@/assets/bg_psd.png';
|
import bgPsdImg from '@/assets/bg_psd.png';
|
||||||
// import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
|
// import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
|
||||||
|
@ -70,9 +70,6 @@
|
|||||||
import {
|
import {
|
||||||
getSelectLesson3dList
|
getSelectLesson3dList
|
||||||
} from '@/api/jmap/lesson3d';
|
} from '@/api/jmap/lesson3d';
|
||||||
import {
|
|
||||||
ProjectIcon
|
|
||||||
} from '@/scripts/ProjectConfig';
|
|
||||||
import {
|
import {
|
||||||
JL3D_LOCAL_STATIC
|
JL3D_LOCAL_STATIC
|
||||||
} from '@/api/jlmap3d/assets3d.js';
|
} from '@/api/jlmap3d/assets3d.js';
|
||||||
|
@ -51,7 +51,6 @@ import Vue from 'vue';
|
|||||||
import Video from 'video.js';
|
import Video from 'video.js';
|
||||||
import 'video.js/dist/video-js.css';
|
import 'video.js/dist/video-js.css';
|
||||||
import { Jl3dpassflow } from '@/jlmap3d/jl3dpassflow/jl3dpassflownew.js';
|
import { Jl3dpassflow } from '@/jlmap3d/jl3dpassflow/jl3dpassflownew.js';
|
||||||
import { ProjectIcon, loginInfo } from '@/scripts/ProjectConfig';
|
|
||||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||||
export default {
|
export default {
|
||||||
name: 'Passflow',
|
name: 'Passflow',
|
||||||
@ -101,8 +100,10 @@ export default {
|
|||||||
if (this.loadingProjectList.includes(this.$route.query.project)) {
|
if (this.loadingProjectList.includes(this.$route.query.project)) {
|
||||||
this.$store.dispatch('app/transitionAnimations');
|
this.$store.dispatch('app/transitionAnimations');
|
||||||
}
|
}
|
||||||
document.querySelector("link[rel*='icon']").href =
|
if(this.$store.state.projectConfig.loginProLogo) {
|
||||||
loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
|
document.querySelector("link[rel*='icon']").href = this.$store.state.projectConfig.loginProLogo;
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// mounted() {
|
// mounted() {
|
||||||
// if (this.lineCode == '07') {
|
// if (this.lineCode == '07') {
|
||||||
|
@ -54,7 +54,6 @@ import { JLmap3d } from '@/jlmap3d/jl3dsimulation/jlmap3d.js';
|
|||||||
import Jlmap3dMenu from '@/views/jlmap3d/simulation/show/menu';
|
import Jlmap3dMenu from '@/views/jlmap3d/simulation/show/menu';
|
||||||
|
|
||||||
import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu';
|
import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu';
|
||||||
import { ProjectIcon, loginInfo } from '@/scripts/ProjectConfig';
|
|
||||||
|
|
||||||
// import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
|
// import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
|
||||||
|
|
||||||
@ -109,7 +108,9 @@ export default {
|
|||||||
if (this.loadingProjectList.includes(this.$route.query.project)) {
|
if (this.loadingProjectList.includes(this.$route.query.project)) {
|
||||||
this.$store.dispatch('app/transitionAnimations');
|
this.$store.dispatch('app/transitionAnimations');
|
||||||
}
|
}
|
||||||
document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
|
if(this.$store.state.projectConfig.loginProLogo) {
|
||||||
|
document.querySelector("link[rel*='icon']").href = this.$store.state.projectConfig.loginProLogo;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.updatemenulist = this.updatemenulist;
|
window.updatemenulist = this.updatemenulist;
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { Jl3dTrafficPlan } from '@/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js';
|
import { Jl3dTrafficPlan } from '@/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js';
|
||||||
import { ProjectIcon, loginInfo } from '@/scripts/ProjectConfig';
|
|
||||||
|
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||||
@ -78,7 +77,9 @@ export default {
|
|||||||
if (this.loadingProjectList.includes(this.$route.query.project)) {
|
if (this.loadingProjectList.includes(this.$route.query.project)) {
|
||||||
this.$store.dispatch('app/transitionAnimations');
|
this.$store.dispatch('app/transitionAnimations');
|
||||||
}
|
}
|
||||||
document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
|
if(this.$store.state.projectConfig.loginProLogo) {
|
||||||
|
document.querySelector("link[rel*='icon']").href = this.$store.state.projectConfig.loginProLogo;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e));
|
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e));
|
||||||
|
@ -1,447 +1,447 @@
|
|||||||
<template>
|
<!--<template>-->
|
||||||
<div id="elDialog" class="message-board-box">
|
<!-- <div id="elDialog" class="message-board-box">-->
|
||||||
<div class="message-board-title">留言板</div>
|
<!-- <div class="message-board-title">留言板</div>-->
|
||||||
<div class="message-board-content">
|
<!-- <div class="message-board-content">-->
|
||||||
<div v-if="postCommentList.length">
|
<!-- <div v-if="postCommentList.length">-->
|
||||||
<template v-for="(item,i) in postCommentList">
|
<!-- <template v-for="(item,i) in postCommentList">-->
|
||||||
<div :key="i" class="eachPostComment">
|
<!-- <div :key="i" class="eachPostComment">-->
|
||||||
<div style="margin-bottom: 10px;display: flex;align-items: center;">
|
<!-- <div style="margin-bottom: 10px;display: flex;align-items: center;">-->
|
||||||
<img :src="avatarUrl(item)" class="head_portrait">
|
<!-- <img :src="avatarUrl(item)" class="head_portrait">-->
|
||||||
<div class="MBCcreatorNickName">{{ item.creatorNickName }}</div>
|
<!-- <div class="MBCcreatorNickName">{{ item.creatorNickName }}</div>-->
|
||||||
<div style="display: inline-block;">{{ item.createTime }}</div>
|
<!-- <div style="display: inline-block;">{{ item.createTime }}</div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div style="margin-left: 60px;" v-html="$escapeHTML(`${item.content}`)" />
|
<!-- <div style="margin-left: 60px;" v-html="$escapeHTML(`${item.content}`)" />-->
|
||||||
<div style="width: 100%;display:flex;align-items: center;justify-content: flex-end;">
|
<!-- <div style="width: 100%;display:flex;align-items: center;justify-content: flex-end;">-->
|
||||||
<img :src="replyIcon" class="replyIcon" @click="replyLeaveMessage(item.id, i)">
|
<!-- <img :src="replyIcon" class="replyIcon" @click="replyLeaveMessage(item.id, i)">-->
|
||||||
<img v-if="userId == item.creatorId || superAdmin" :src="deleteIcon" class="deleteIcon" @click="deleteMessage(item.id)">
|
<!-- <img v-if="userId == item.creatorId || superAdmin" :src="deleteIcon" class="deleteIcon" @click="deleteMessage(item.id)">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div v-if="item.comments && item.comments.total > 0" class="eachComment">
|
<!-- <div v-if="item.comments && item.comments.total > 0" class="eachComment">-->
|
||||||
<div v-if="moreMessageId == item.id">
|
<!-- <div v-if="moreMessageId == item.id">-->
|
||||||
<template v-for="(elem,j) in allCommentList">
|
<!-- <template v-for="(elem,j) in allCommentList">-->
|
||||||
<div :key="j" style="font-size: 14px;margin-top: 10px;">
|
<!-- <div :key="j" style="font-size: 14px;margin-top: 10px;">-->
|
||||||
<span style="margin-right: 5px;">{{ computedCommentName(elem) }}</span>
|
<!-- <span style="margin-right: 5px;">{{ computedCommentName(elem) }}</span>-->
|
||||||
<span style="margin-right: 15px;" v-html="$escapeHTML(`${elem.content}`)" />
|
<!-- <span style="margin-right: 15px;" v-html="$escapeHTML(`${elem.content}`)" />-->
|
||||||
<span style="margin-right: 10px;">{{ elem.commentTime }}</span>
|
<!-- <span style="margin-right: 10px;">{{ elem.commentTime }}</span>-->
|
||||||
<span class="replyLeaveMessage" @click="replyLeaveMessage(item.id, i,elem.id, elem.userNickname)">回复</span>
|
<!-- <span class="replyLeaveMessage" @click="replyLeaveMessage(item.id, i,elem.id, elem.userNickname)">回复</span>-->
|
||||||
<span v-if="userId == elem.userId || superAdmin" style="color:#409EFF;cursor: pointer;" type="text" @click="deleteComment(item.id, i, elem.id)">删除</span>
|
<!-- <span v-if="userId == elem.userId || superAdmin" style="color:#409EFF;cursor: pointer;" type="text" @click="deleteComment(item.id, i, elem.id)">删除</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div v-else>
|
<!-- <div v-else>-->
|
||||||
<template v-for="(elem,j) in item.comments.list">
|
<!-- <template v-for="(elem,j) in item.comments.list">-->
|
||||||
<div :key="j" style="font-size: 14px;margin-top: 18px;">
|
<!-- <div :key="j" style="font-size: 14px;margin-top: 18px;">-->
|
||||||
<span style="margin-right: 5px;">{{ computedCommentName(elem) }}</span>
|
<!-- <span style="margin-right: 5px;">{{ computedCommentName(elem) }}</span>-->
|
||||||
<span style="margin-right: 15px;" v-html="$escapeHTML(`${elem.content}`)" />
|
<!-- <span style="margin-right: 15px;" v-html="$escapeHTML(`${elem.content}`)" />-->
|
||||||
<span style="margin-right: 10px;">{{ elem.commentTime }}</span>
|
<!-- <span style="margin-right: 10px;">{{ elem.commentTime }}</span>-->
|
||||||
<span class="replyLeaveMessage" @click="replyLeaveMessage(item.id, i,elem.id, elem.userNickname)">回复</span>
|
<!-- <span class="replyLeaveMessage" @click="replyLeaveMessage(item.id, i,elem.id, elem.userNickname)">回复</span>-->
|
||||||
<span v-if="userId == elem.userId || superAdmin" style="color:#409EFF;cursor: pointer;" type="text" @click="deleteComment(item.id, i, elem.id)">删除</span>
|
<!-- <span v-if="userId == elem.userId || superAdmin" style="color:#409EFF;cursor: pointer;" type="text" @click="deleteComment(item.id, i, elem.id)">删除</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div v-if="item.comments.total > 3 && moreMessageId != item.id" style="margin-top: 10px;">
|
<!-- <div v-if="item.comments.total > 3 && moreMessageId != item.id" style="margin-top: 10px;">-->
|
||||||
<span class="view_more" @click="viewMoreComment(item)">{{ `共${item.comments.total}条回复,点击查看更多>>` }}</span>
|
<!-- <span class="view_more" @click="viewMoreComment(item)">{{ `共${item.comments.total}条回复,点击查看更多>>` }}</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div v-if="replyMessageId == item.id" style="width: 80%;margin-left: 10%;text-align: center;">
|
<!-- <div v-if="replyMessageId == item.id" style="width: 80%;margin-left: 10%;text-align: center;">-->
|
||||||
<quill-editor
|
<!-- <quill-editor-->
|
||||||
:ref="'answerInput' + item.id"
|
<!-- :ref="'answerInput' + item.id"-->
|
||||||
v-model="commentContent"
|
<!-- v-model="commentContent"-->
|
||||||
style="width: 80%;margin-left: 10%;margin-top: 10px;"
|
<!-- style="width: 80%;margin-left: 10%;margin-top: 10px;"-->
|
||||||
class-name="answer_input"
|
<!-- class-name="answer_input"-->
|
||||||
:margin-bottom="20"
|
<!-- :margin-bottom="20"-->
|
||||||
editor-type="onlyEmoji"
|
<!-- editor-type="onlyEmoji"-->
|
||||||
:no-handle-p="true"
|
<!-- :no-handle-p="true"-->
|
||||||
:height="100"
|
<!-- :height="100"-->
|
||||||
:placeholder="replyUserName"
|
<!-- :placeholder="replyUserName"-->
|
||||||
/>
|
<!-- />-->
|
||||||
<div>
|
<!-- <div>-->
|
||||||
<el-button type="danger" size="small" @click="commentMessage">回复</el-button>
|
<!-- <el-button type="danger" size="small" @click="commentMessage">回复</el-button>-->
|
||||||
<el-button size="small" @click="cancelComment">取消</el-button>
|
<!-- <el-button size="small" @click="cancelComment">取消</el-button>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div v-else class="empty-text">
|
<!-- <div v-else class="empty-text">-->
|
||||||
<span>暂无留言</span>
|
<!-- <span>暂无留言</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div style="width: 100%;text-align: center;">
|
<!-- <div style="width: 100%;text-align: center;">-->
|
||||||
<el-pagination
|
<!-- <el-pagination-->
|
||||||
:current-page.sync="pageNum"
|
<!-- :current-page.sync="pageNum"-->
|
||||||
:page-size="pageSize"
|
<!-- :page-size="pageSize"-->
|
||||||
layout="total, prev, pager, next,jumper"
|
<!-- layout="total, prev, pager, next,jumper"-->
|
||||||
:total="total"
|
<!-- :total="total"-->
|
||||||
@current-change="handleCurrentChange"
|
<!-- @current-change="handleCurrentChange"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<quill-editor ref="quillEditor" v-model="content" style="width: 80%;margin-left: 10%;" :margin-bottom="20" editor-type="imgEmoji" :no-handle-p="true" />
|
<!-- <quill-editor ref="quillEditor" v-model="content" style="width: 80%;margin-left: 10%;" :margin-bottom="20" editor-type="imgEmoji" :no-handle-p="true" />-->
|
||||||
<span id="boardBottom" class="dialog-footer">
|
<!-- <span id="boardBottom" class="dialog-footer">-->
|
||||||
<el-button @click="handleClear">清空</el-button>
|
<!-- <el-button @click="handleClear">清空</el-button>-->
|
||||||
<el-button type="danger" @click="commitComment">留言</el-button>
|
<!-- <el-button type="danger" @click="commitComment">留言</el-button>-->
|
||||||
</span>
|
<!-- </span>-->
|
||||||
<el-button size="mini" type="danger" class="goSlide" @click="goSlide">我要留言</el-button>
|
<!-- <el-button size="mini" type="danger" class="goSlide" @click="goSlide">我要留言</el-button>-->
|
||||||
<div v-show="imgShow" class="popUpImgView" @click="handelCloseImg">
|
<!-- <div v-show="imgShow" class="popUpImgView" @click="handelCloseImg">-->
|
||||||
<img id="targetImg" src="" class="popUpImg">
|
<!-- <img id="targetImg" src="" class="popUpImg">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
|
|
||||||
<script>
|
<!--<script>-->
|
||||||
import { answerPost, queryMessagePagingByProjectCode, deleteMessageByAdmin, deleteMessageBySelf, commentLevelMessage, commentComents,
|
<!--import { answerPost, queryMessagePagingByProjectCode, deleteMessageByAdmin, deleteMessageBySelf, commentLevelMessage, commentComents,-->
|
||||||
queryMessageCommentList, deleteCommentByAdmin, deleteCommentBySelf, getPostByProjectCode } from '@/api/learn';
|
<!-- queryMessageCommentList, deleteCommentByAdmin, deleteCommentBySelf, getPostByProjectCode } from '@/api/learn';-->
|
||||||
import lick_icon from '@/assets/like.png';
|
<!--import lick_icon from '@/assets/like.png';-->
|
||||||
import unlike_icon from '@/assets/unlike.png';
|
<!--import unlike_icon from '@/assets/unlike.png';-->
|
||||||
import reply_icon from '@/assets/reply.png';
|
<!--import reply_icon from '@/assets/reply.png';-->
|
||||||
import delete_icon from '@/assets/delete.png';
|
<!--import delete_icon from '@/assets/delete.png';-->
|
||||||
import { superAdmin } from '@/router/index';
|
<!--import { superAdmin } from '@/router/index';-->
|
||||||
import { ProjectCode } from '@/scripts/ProjectConfig';
|
<!--import { ProjectCode } from '@/scripts/ProjectConfig';-->
|
||||||
import QuillEditor from '@/components/QuillEditor/index';
|
<!--import QuillEditor from '@/components/QuillEditor/index';-->
|
||||||
export default {
|
<!--export default {-->
|
||||||
name: 'MessageBoard',
|
<!-- name: 'MessageBoard',-->
|
||||||
components: {
|
<!-- components: {-->
|
||||||
QuillEditor
|
<!-- QuillEditor-->
|
||||||
},
|
<!-- },-->
|
||||||
data() {
|
<!-- data() {-->
|
||||||
return {
|
<!-- return {-->
|
||||||
content: '',
|
<!-- content: '',-->
|
||||||
postCommentList: [],
|
<!-- postCommentList: [],-->
|
||||||
pageSize: 10,
|
<!-- pageSize: 10,-->
|
||||||
pageNum: 0,
|
<!-- pageNum: 0,-->
|
||||||
total: 0,
|
<!-- total: 0,-->
|
||||||
imgShow: false,
|
<!-- imgShow: false,-->
|
||||||
lickIcon: lick_icon,
|
<!-- lickIcon: lick_icon,-->
|
||||||
unlikeIcon: unlike_icon,
|
<!-- unlikeIcon: unlike_icon,-->
|
||||||
replyIcon: reply_icon,
|
<!-- replyIcon: reply_icon,-->
|
||||||
deleteIcon: delete_icon,
|
<!-- deleteIcon: delete_icon,-->
|
||||||
replyMessageId: '',
|
<!-- replyMessageId: '',-->
|
||||||
commentContent: '',
|
<!-- commentContent: '',-->
|
||||||
replyCommentId: '',
|
<!-- replyCommentId: '',-->
|
||||||
replyMessageIndex: '',
|
<!-- replyMessageIndex: '',-->
|
||||||
allCommentList: [],
|
<!-- allCommentList: [],-->
|
||||||
moreMessageId: '',
|
<!-- moreMessageId: '',-->
|
||||||
replyUserName: '',
|
<!-- replyUserName: '',-->
|
||||||
postId: ''
|
<!-- postId: ''-->
|
||||||
};
|
<!-- };-->
|
||||||
},
|
<!-- },-->
|
||||||
computed: {
|
<!-- computed: {-->
|
||||||
userId() {
|
<!-- userId() {-->
|
||||||
return this.$store.state.user.id;
|
<!-- return this.$store.state.user.id;-->
|
||||||
},
|
<!-- },-->
|
||||||
superAdmin() {
|
<!-- superAdmin() {-->
|
||||||
return this.$store.state.user.roles.includes(superAdmin);
|
<!-- return this.$store.state.user.roles.includes(superAdmin);-->
|
||||||
},
|
<!-- },-->
|
||||||
projectCode() {
|
<!-- projectCode() {-->
|
||||||
const project = this.$route.query.project;
|
<!-- const project = this.$route.query.project;-->
|
||||||
return ProjectCode[project];
|
<!-- return ProjectCode[project];-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
created() {
|
<!-- created() {-->
|
||||||
const that = this;
|
<!-- const that = this;-->
|
||||||
window.handleZoomImg = function () {
|
<!-- window.handleZoomImg = function () {-->
|
||||||
that.imgShow = true;
|
<!-- that.imgShow = true;-->
|
||||||
document.getElementById('targetImg').src = event.target.currentSrc;
|
<!-- document.getElementById('targetImg').src = event.target.currentSrc;-->
|
||||||
};
|
<!-- };-->
|
||||||
},
|
<!-- },-->
|
||||||
mounted() {
|
<!-- mounted() {-->
|
||||||
getPostByProjectCode(this.projectCode).then(resp => {
|
<!-- getPostByProjectCode(this.projectCode).then(resp => {-->
|
||||||
this.postId = resp.data.id;
|
<!-- this.postId = resp.data.id;-->
|
||||||
});
|
<!-- });-->
|
||||||
this.handleCurrentChange();
|
<!-- this.handleCurrentChange();-->
|
||||||
},
|
<!-- },-->
|
||||||
methods: {
|
<!-- methods: {-->
|
||||||
commitComment() {
|
<!-- commitComment() {-->
|
||||||
const images = this.content.match(/<img/g);
|
<!-- const images = this.content.match(/<img/g);-->
|
||||||
const answerContent = this.handleEmojiContent(this.content);
|
<!-- const answerContent = this.handleEmojiContent(this.content);-->
|
||||||
if (images && images.length > 3) {
|
<!-- if (images && images.length > 3) {-->
|
||||||
this.$message.error('留言内容使用图片应小于三张!');
|
<!-- this.$message.error('留言内容使用图片应小于三张!');-->
|
||||||
return;
|
<!-- return;-->
|
||||||
}
|
<!-- }-->
|
||||||
if (answerContent.length > 1000) {
|
<!-- if (answerContent.length > 1000) {-->
|
||||||
this.$message.error('留言内容超出最大长度!');
|
<!-- this.$message.error('留言内容超出最大长度!');-->
|
||||||
return;
|
<!-- return;-->
|
||||||
}
|
<!-- }-->
|
||||||
if (!answerContent) {
|
<!-- if (!answerContent) {-->
|
||||||
this.$message.error('留言内容不能为空!');
|
<!-- this.$message.error('留言内容不能为空!');-->
|
||||||
return;
|
<!-- return;-->
|
||||||
}
|
<!-- }-->
|
||||||
answerPost({postId: this.postId, content: answerContent}).then(resp => {
|
<!-- answerPost({postId: this.postId, content: answerContent}).then(resp => {-->
|
||||||
this.pageNum = 1;
|
<!-- this.pageNum = 1;-->
|
||||||
this.handleCurrentChange();
|
<!-- this.handleCurrentChange();-->
|
||||||
this.content = '';
|
<!-- this.content = '';-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('留言失败 !');
|
<!-- this.$message.error('留言失败 !');-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
handleCurrentChange() {
|
<!-- handleCurrentChange() {-->
|
||||||
queryMessagePagingByProjectCode(this.projectCode, {pageSize: this.pageSize, pageNum: this.pageNum}).then(resp => {
|
<!-- queryMessagePagingByProjectCode(this.projectCode, {pageSize: this.pageSize, pageNum: this.pageNum}).then(resp => {-->
|
||||||
this.postCommentList = [];
|
<!-- this.postCommentList = [];-->
|
||||||
(resp.data.list || []).forEach(item => {
|
<!-- (resp.data.list || []).forEach(item => {-->
|
||||||
item.content = this.replaceEmoji(item.content);
|
<!-- item.content = this.replaceEmoji(item.content);-->
|
||||||
item.comments && item.comments.list && item.comments.list.forEach(elem => {
|
<!-- item.comments && item.comments.list && item.comments.list.forEach(elem => {-->
|
||||||
elem.content = this.replaceEmoji(elem.content);
|
<!-- elem.content = this.replaceEmoji(elem.content);-->
|
||||||
});
|
<!-- });-->
|
||||||
this.postCommentList.push(item);
|
<!-- this.postCommentList.push(item);-->
|
||||||
});
|
<!-- });-->
|
||||||
this.total = resp.data.total;
|
<!-- this.total = resp.data.total;-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
replaceEmoji(content) {
|
<!-- replaceEmoji(content) {-->
|
||||||
let value = content.replace(/<img/g, '<img style="width: 100px;height: auto;cursor: zoom-in;" onclick="handleZoomImg()"');
|
<!-- let value = content.replace(/<img/g, '<img style="width: 100px;height: auto;cursor: zoom-in;" onclick="handleZoomImg()"');-->
|
||||||
const list = value.match(/<<<([^>]*)>>>/g);
|
<!-- const list = value.match(/<<<([^>]*)>>>/g);-->
|
||||||
(list || []).forEach(elem => {
|
<!-- (list || []).forEach(elem => {-->
|
||||||
const targetValue = elem.substring(3, elem.length - 3);
|
<!-- const targetValue = elem.substring(3, elem.length - 3);-->
|
||||||
value = value.replace(elem, `<span class="ql-emojiblot" data-name="${targetValue}"><span contenteditable="false"><span class="ap ap-${targetValue}">ss</span></span></span>`);
|
<!-- value = value.replace(elem, `<span class="ql-emojiblot" data-name="${targetValue}"><span contenteditable="false"><span class="ap ap-${targetValue}">ss</span></span></span>`);-->
|
||||||
});
|
<!-- });-->
|
||||||
return value;
|
<!-- return value;-->
|
||||||
},
|
<!-- },-->
|
||||||
goSlide() {
|
<!-- goSlide() {-->
|
||||||
const bottom = document.getElementById('boardBottom');
|
<!-- const bottom = document.getElementById('boardBottom');-->
|
||||||
const element = document.getElementById('elDialog').childNodes[0];
|
<!-- const element = document.getElementById('elDialog').childNodes[0];-->
|
||||||
element.scrollTop = bottom.offsetTop;
|
<!-- element.scrollTop = bottom.offsetTop;-->
|
||||||
this.$refs.quillEditor.getFocus();
|
<!-- this.$refs.quillEditor.getFocus();-->
|
||||||
},
|
<!-- },-->
|
||||||
avatarUrl(val) {
|
<!-- avatarUrl(val) {-->
|
||||||
if (val && val.creatorAvatarPath) {
|
<!-- if (val && val.creatorAvatarPath) {-->
|
||||||
return this.$store.state.user.ossUrl + val.creatorAvatarPath;
|
<!-- return this.$store.state.user.ossUrl + val.creatorAvatarPath;-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
return 'https://joylink.club/oss/wxmicro_assistant/userhead/defaultuser.png';
|
<!-- return 'https://joylink.club/oss/wxmicro_assistant/userhead/defaultuser.png';-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
|
|
||||||
handleClear() {
|
<!-- handleClear() {-->
|
||||||
this.content = '';
|
<!-- this.content = '';-->
|
||||||
},
|
<!-- },-->
|
||||||
handelCloseImg() {
|
<!-- handelCloseImg() {-->
|
||||||
this.imgShow = false;
|
<!-- this.imgShow = false;-->
|
||||||
document.getElementById('targetImg').src = '';
|
<!-- document.getElementById('targetImg').src = '';-->
|
||||||
},
|
<!-- },-->
|
||||||
replyLeaveMessage(messageId, messageIndex, commentId, userNickname) {
|
<!-- replyLeaveMessage(messageId, messageIndex, commentId, userNickname) {-->
|
||||||
this.cancelComment();
|
<!-- this.cancelComment();-->
|
||||||
this.replyMessageId = messageId;
|
<!-- this.replyMessageId = messageId;-->
|
||||||
this.replyCommentId = commentId;
|
<!-- this.replyCommentId = commentId;-->
|
||||||
this.replyMessageIndex = messageIndex;
|
<!-- this.replyMessageIndex = messageIndex;-->
|
||||||
if (commentId) {
|
<!-- if (commentId) {-->
|
||||||
this.replyUserName = '@' + userNickname + ' ';
|
<!-- this.replyUserName = '@' + userNickname + ' ';-->
|
||||||
this.commentContent = '';
|
<!-- this.commentContent = '';-->
|
||||||
}
|
<!-- }-->
|
||||||
this.$nextTick(()=>{
|
<!-- this.$nextTick(()=>{-->
|
||||||
this.$refs['answerInput' + messageId][0].getFocus();
|
<!-- this.$refs['answerInput' + messageId][0].getFocus();-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
cancelComment() {
|
<!-- cancelComment() {-->
|
||||||
this.replyMessageId = '';
|
<!-- this.replyMessageId = '';-->
|
||||||
this.commentContent = '';
|
<!-- this.commentContent = '';-->
|
||||||
this.replyCommentId = '';
|
<!-- this.replyCommentId = '';-->
|
||||||
this.replyMessageIndex = '';
|
<!-- this.replyMessageIndex = '';-->
|
||||||
this.replyUserName = '';
|
<!-- this.replyUserName = '';-->
|
||||||
},
|
<!-- },-->
|
||||||
commentMessage() {
|
<!-- commentMessage() {-->
|
||||||
const contentValue = this.handleEmojiContent(this.commentContent);
|
<!-- const contentValue = this.handleEmojiContent(this.commentContent);-->
|
||||||
if (contentValue.length > 300) {
|
<!-- if (contentValue.length > 300) {-->
|
||||||
this.$message.error('回复内容超出最大长度!');
|
<!-- this.$message.error('回复内容超出最大长度!');-->
|
||||||
return;
|
<!-- return;-->
|
||||||
}
|
<!-- }-->
|
||||||
if (this.replyCommentId) {
|
<!-- if (this.replyCommentId) {-->
|
||||||
commentComents(this.replyMessageId, this.replyCommentId, {content:contentValue}).then(resp => {
|
<!-- commentComents(this.replyMessageId, this.replyCommentId, {content:contentValue}).then(resp => {-->
|
||||||
this.getCommentList(this.replyMessageId, this.replyMessageIndex);
|
<!-- this.getCommentList(this.replyMessageId, this.replyMessageIndex);-->
|
||||||
this.cancelComment();
|
<!-- this.cancelComment();-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('评论回复失败!');
|
<!-- this.$message.error('评论回复失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
commentLevelMessage(this.replyMessageId, {content:contentValue}).then(resp => {
|
<!-- commentLevelMessage(this.replyMessageId, {content:contentValue}).then(resp => {-->
|
||||||
this.getCommentList(this.replyMessageId, this.replyMessageIndex);
|
<!-- this.getCommentList(this.replyMessageId, this.replyMessageIndex);-->
|
||||||
this.cancelComment();
|
<!-- this.cancelComment();-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('评论回复失败!');
|
<!-- this.$message.error('评论回复失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
getCommentList(messageId, messageIndex) {
|
<!-- getCommentList(messageId, messageIndex) {-->
|
||||||
queryMessageCommentList(messageId).then(resp => {
|
<!-- queryMessageCommentList(messageId).then(resp => {-->
|
||||||
const replaceValue = [];
|
<!-- const replaceValue = [];-->
|
||||||
resp.data && resp.data.forEach(item => {
|
<!-- resp.data && resp.data.forEach(item => {-->
|
||||||
item.content = this.replaceEmoji(item.content);
|
<!-- item.content = this.replaceEmoji(item.content);-->
|
||||||
replaceValue.push(item);
|
<!-- replaceValue.push(item);-->
|
||||||
});
|
<!-- });-->
|
||||||
if (this.moreMessageId == messageId) {
|
<!-- if (this.moreMessageId == messageId) {-->
|
||||||
this.allCommentList = replaceValue;
|
<!-- this.allCommentList = replaceValue;-->
|
||||||
}
|
<!-- }-->
|
||||||
if (replaceValue.length > 3) {
|
<!-- if (replaceValue.length > 3) {-->
|
||||||
this.postCommentList[messageIndex].comments.list = replaceValue.slice(0, 3);
|
<!-- this.postCommentList[messageIndex].comments.list = replaceValue.slice(0, 3);-->
|
||||||
this.postCommentList[messageIndex].comments.total = replaceValue.length;
|
<!-- this.postCommentList[messageIndex].comments.total = replaceValue.length;-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
this.postCommentList[messageIndex].comments.list = replaceValue;
|
<!-- this.postCommentList[messageIndex].comments.list = replaceValue;-->
|
||||||
this.postCommentList[messageIndex].comments.total = replaceValue.length;
|
<!-- this.postCommentList[messageIndex].comments.total = replaceValue.length;-->
|
||||||
}
|
<!-- }-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('更新回复失败!');
|
<!-- this.$message.error('更新回复失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
computedCommentName(elem) {
|
<!-- computedCommentName(elem) {-->
|
||||||
if (elem.replyUserNickName) {
|
<!-- if (elem.replyUserNickName) {-->
|
||||||
return `${elem.userNickname} 回复@ ${elem.replyUserNickName}:`;
|
<!-- return `${elem.userNickname} 回复@ ${elem.replyUserNickName}:`;-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
return elem.userNickname + ':';
|
<!-- return elem.userNickname + ':';-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
deleteMessage(messageId) {
|
<!-- deleteMessage(messageId) {-->
|
||||||
if (this.superAdmin) {
|
<!-- if (this.superAdmin) {-->
|
||||||
deleteMessageByAdmin(messageId).then(resp => {
|
<!-- deleteMessageByAdmin(messageId).then(resp => {-->
|
||||||
// this.$message.success('删除留言成功!');
|
<!-- // this.$message.success('删除留言成功!');-->
|
||||||
this.handleCurrentChange();
|
<!-- this.handleCurrentChange();-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('删除留言失败!');
|
<!-- this.$message.error('删除留言失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
deleteMessageBySelf(messageId).then(resp => {
|
<!-- deleteMessageBySelf(messageId).then(resp => {-->
|
||||||
// this.$message.success('删除留言成功!');
|
<!-- // this.$message.success('删除留言成功!');-->
|
||||||
this.handleCurrentChange();
|
<!-- this.handleCurrentChange();-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('删除留言失败!');
|
<!-- this.$message.error('删除留言失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
deleteComment(messageId, messageIndex, commentId) {
|
<!-- deleteComment(messageId, messageIndex, commentId) {-->
|
||||||
if (this.superAdmin) {
|
<!-- if (this.superAdmin) {-->
|
||||||
deleteCommentByAdmin(commentId).then(resp => {
|
<!-- deleteCommentByAdmin(commentId).then(resp => {-->
|
||||||
this.getCommentList(messageId, messageIndex);
|
<!-- this.getCommentList(messageId, messageIndex);-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('删除回复失败!');
|
<!-- this.$message.error('删除回复失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
deleteCommentBySelf(commentId).then(resp => {
|
<!-- deleteCommentBySelf(commentId).then(resp => {-->
|
||||||
this.getCommentList(messageId, messageIndex);
|
<!-- this.getCommentList(messageId, messageIndex);-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('删除回复失败!');
|
<!-- this.$message.error('删除回复失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
viewMoreComment(data) {
|
<!-- viewMoreComment(data) {-->
|
||||||
queryMessageCommentList(data.id).then(resp => {
|
<!-- queryMessageCommentList(data.id).then(resp => {-->
|
||||||
this.allCommentList = [];
|
<!-- this.allCommentList = [];-->
|
||||||
resp.data && resp.data.forEach(item => {
|
<!-- resp.data && resp.data.forEach(item => {-->
|
||||||
item.content = this.replaceEmoji(item.content);
|
<!-- item.content = this.replaceEmoji(item.content);-->
|
||||||
this.allCommentList.push(item);
|
<!-- this.allCommentList.push(item);-->
|
||||||
});
|
<!-- });-->
|
||||||
this.moreMessageId = data.id;
|
<!-- this.moreMessageId = data.id;-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
handleEmojiContent(content) {
|
<!-- handleEmojiContent(content) {-->
|
||||||
const list = content.match(/<span class="ql-emojiblot" data-name="(\S*)"><span contenteditable="false"><span class="ap ap-(\S*)<\/span><\/span><\/span>/g);
|
<!-- const list = content.match(/<span class="ql-emojiblot" data-name="(\S*)"><span contenteditable="false"><span class="ap ap-(\S*)<\/span><\/span><\/span>/g);-->
|
||||||
(list || []).forEach(item => {
|
<!-- (list || []).forEach(item => {-->
|
||||||
let targetValue = item.split(' ')[2];
|
<!-- let targetValue = item.split(' ')[2];-->
|
||||||
targetValue = targetValue.substring(11, targetValue.length - 8);
|
<!-- targetValue = targetValue.substring(11, targetValue.length - 8);-->
|
||||||
content = content.replace(item, '<<<' + targetValue + '>>>');
|
<!-- content = content.replace(item, '<<<' + targetValue + '>>>');-->
|
||||||
});
|
<!-- });-->
|
||||||
return content;
|
<!-- return content;-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
};
|
<!--};-->
|
||||||
</script>
|
<!--</script>-->
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<!--<style lang="scss" scoped>-->
|
||||||
.dialog-footer{
|
<!-- .dialog-footer{-->
|
||||||
margin: 0 auto;
|
<!-- margin: 0 auto;-->
|
||||||
padding: 10px 0 30px;
|
<!-- padding: 10px 0 30px;-->
|
||||||
display: flex;
|
<!-- display: flex;-->
|
||||||
justify-content: center;
|
<!-- justify-content: center;-->
|
||||||
}
|
<!-- }-->
|
||||||
.empty-text{
|
<!-- .empty-text{-->
|
||||||
text-align: center;
|
<!-- text-align: center;-->
|
||||||
width: 100%;
|
<!-- width: 100%;-->
|
||||||
height: 50px;
|
<!-- height: 50px;-->
|
||||||
line-height: 50px;
|
<!-- line-height: 50px;-->
|
||||||
font-size: 18px;
|
<!-- font-size: 18px;-->
|
||||||
color: #ccc;
|
<!-- color: #ccc;-->
|
||||||
}
|
<!-- }-->
|
||||||
.head_portrait{
|
<!-- .head_portrait{-->
|
||||||
width: 50px;
|
<!-- width: 50px;-->
|
||||||
height: 50px;
|
<!-- height: 50px;-->
|
||||||
border-radius: 25px;
|
<!-- border-radius: 25px;-->
|
||||||
}
|
<!-- }-->
|
||||||
.view_more {
|
<!-- .view_more {-->
|
||||||
cursor: pointer;
|
<!-- cursor: pointer;-->
|
||||||
}
|
<!-- }-->
|
||||||
.view_more:hover {
|
<!-- .view_more:hover {-->
|
||||||
cursor: pointer;
|
<!-- cursor: pointer;-->
|
||||||
color: #409EFF;
|
<!-- color: #409EFF;-->
|
||||||
}
|
<!-- }-->
|
||||||
.img-box{
|
<!-- .img-box{-->
|
||||||
width: 100px;
|
<!-- width: 100px;-->
|
||||||
height: auto;
|
<!-- height: auto;-->
|
||||||
}
|
<!-- }-->
|
||||||
.message-board-box{
|
<!-- .message-board-box{-->
|
||||||
width: 100%;
|
<!-- width: 100%;-->
|
||||||
background-image:url('../../assets/bg_board.jpg');
|
<!-- background-image:url('../../assets/bg_board.jpg');-->
|
||||||
background-size: 100% 100%;
|
<!-- background-size: 100% 100%;-->
|
||||||
min-height: 100%;
|
<!-- min-height: 100%;-->
|
||||||
}
|
<!-- }-->
|
||||||
/deep/.ql-container{
|
<!-- /deep/.ql-container{-->
|
||||||
height: 80%;
|
<!-- height: 80%;-->
|
||||||
}
|
<!-- }-->
|
||||||
.message-board-title{
|
<!-- .message-board-title{-->
|
||||||
font-size: 30px;
|
<!-- font-size: 30px;-->
|
||||||
color: #F00;
|
<!-- color: #F00;-->
|
||||||
font-family: 'fangsong';
|
<!-- font-family: 'fangsong';-->
|
||||||
font-weight: bolder;
|
<!-- font-weight: bolder;-->
|
||||||
width: 100%;
|
<!-- width: 100%;-->
|
||||||
text-align: center;
|
<!-- text-align: center;-->
|
||||||
height: 80px;
|
<!-- height: 80px;-->
|
||||||
line-height: 80px;
|
<!-- line-height: 80px;-->
|
||||||
}
|
<!-- }-->
|
||||||
.message-board-content{
|
<!-- .message-board-content{-->
|
||||||
width: 80%;
|
<!-- width: 80%;-->
|
||||||
margin-left: 10%;
|
<!-- margin-left: 10%;-->
|
||||||
padding: 20px;
|
<!-- padding: 20px;-->
|
||||||
margin-bottom: 20px;
|
<!-- margin-bottom: 20px;-->
|
||||||
background-color: rgba(255,255,255,0);
|
<!-- background-color: rgba(255,255,255,0);-->
|
||||||
border: 1px solid #ebeef5;
|
<!-- border: 1px solid #ebeef5;-->
|
||||||
border-radius: 4px;
|
<!-- border-radius: 4px;-->
|
||||||
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
|
<!-- box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);-->
|
||||||
}
|
<!-- }-->
|
||||||
.eachPostComment{
|
<!-- .eachPostComment{-->
|
||||||
border: 1px solid #C0C0C0;
|
<!-- border: 1px solid #C0C0C0;-->
|
||||||
border-radius: 5px;
|
<!-- border-radius: 5px;-->
|
||||||
margin-bottom: 20px;
|
<!-- margin-bottom: 20px;-->
|
||||||
box-shadow: 2px 2px 3px #808080;
|
<!-- box-shadow: 2px 2px 3px #808080;-->
|
||||||
padding: 10px 20px;
|
<!-- padding: 10px 20px;-->
|
||||||
background-color: #fff
|
<!-- background-color: #fff-->
|
||||||
}
|
<!-- }-->
|
||||||
.eachComment{
|
<!-- .eachComment{-->
|
||||||
background: #F5F5F5;
|
<!-- background: #F5F5F5;-->
|
||||||
margin-top: 10px;
|
<!-- margin-top: 10px;-->
|
||||||
width: calc(100% - 120px);
|
<!-- width: calc(100% - 120px);-->
|
||||||
margin-left: 60px;
|
<!-- margin-left: 60px;-->
|
||||||
border-radius: 5px;
|
<!-- border-radius: 5px;-->
|
||||||
padding: 1px 10px 10px;
|
<!-- padding: 1px 10px 10px;-->
|
||||||
}
|
<!-- }-->
|
||||||
.replyLeaveMessage{color:#409EFF;cursor: pointer;margin-right: 10px;}
|
<!-- .replyLeaveMessage{color:#409EFF;cursor: pointer;margin-right: 10px;}-->
|
||||||
.MBCcreatorNickName{display: inline-block;margin-right: 20px;margin-left:10px;font-size: 18px;color: #000;}
|
<!-- .MBCcreatorNickName{display: inline-block;margin-right: 20px;margin-left:10px;font-size: 18px;color: #000;}-->
|
||||||
.replyIcon{width: 16px;height: auto;margin-right: 30px;cursor: pointer;}
|
<!-- .replyIcon{width: 16px;height: auto;margin-right: 30px;cursor: pointer;}-->
|
||||||
.deleteIcon{width: 16px;height: auto;cursor:pointer;}
|
<!-- .deleteIcon{width: 16px;height: auto;cursor:pointer;}-->
|
||||||
.goSlide{position: fixed; left: 91%;top: 80px;width: 90px;}
|
<!-- .goSlide{position: fixed; left: 91%;top: 80px;width: 90px;}-->
|
||||||
.popUpImgView{position: fixed;width: 100%;height: 100%;left: 0;top: 0;background: rgba(0,0,0,0.5);cursor: zoom-out;}
|
<!-- .popUpImgView{position: fixed;width: 100%;height: 100%;left: 0;top: 0;background: rgba(0,0,0,0.5);cursor: zoom-out;}-->
|
||||||
.popUpImg{position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);min-width: 500px;max-height: 80%;height: auto;}
|
<!-- .popUpImg{position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);min-width: 500px;max-height: 80%;height: auto;}-->
|
||||||
</style>
|
<!--</style>-->
|
||||||
<style>
|
<!--<style>-->
|
||||||
.ql-size-small {
|
<!--.ql-size-small {-->
|
||||||
font-size: 0.75em;
|
<!-- font-size: 0.75em;-->
|
||||||
}
|
<!--}-->
|
||||||
.ql-size-large{
|
<!--.ql-size-large{-->
|
||||||
font-size: 1.5em;
|
<!-- font-size: 1.5em;-->
|
||||||
}
|
<!--}-->
|
||||||
.ql-size-huge{
|
<!--.ql-size-huge{-->
|
||||||
font-size: 2.5em;
|
<!-- font-size: 2.5em;-->
|
||||||
}
|
<!--}-->
|
||||||
</style>
|
<!--</style>-->
|
||||||
|
@ -1,121 +1,121 @@
|
|||||||
<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" />
|
<!-- <create-draft ref="createDraft" :project-option-list="projectOptionList" @reloadTable="reloadTable" />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
|
|
||||||
<script>
|
<!--<script>-->
|
||||||
import { queryPostPage } from '@/api/learn';
|
<!--import { queryPostPage } from '@/api/learn';-->
|
||||||
import { ProjectList} from '@/scripts/ProjectConfig';
|
<!--import { ProjectList} from '@/scripts/ProjectConfig';-->
|
||||||
import CreateDraft from './create';
|
<!--import CreateDraft from './create';-->
|
||||||
export default {
|
<!--export default {-->
|
||||||
name: 'Manage',
|
<!-- name: 'Manage',-->
|
||||||
components:{
|
<!-- components:{-->
|
||||||
CreateDraft
|
<!-- CreateDraft-->
|
||||||
},
|
<!-- },-->
|
||||||
data() {
|
<!-- data() {-->
|
||||||
return {
|
<!-- return {-->
|
||||||
projectOptionList: [],
|
<!-- projectOptionList: [],-->
|
||||||
pagerConfig: {
|
<!-- pagerConfig: {-->
|
||||||
pageSize: 'pageSize',
|
<!-- pageSize: 'pageSize',-->
|
||||||
pageIndex: 'pageNum'
|
<!-- pageIndex: 'pageNum'-->
|
||||||
},
|
<!-- },-->
|
||||||
queryForm: {
|
<!-- queryForm: {-->
|
||||||
labelWidth: '140px',
|
<!-- labelWidth: '140px',-->
|
||||||
reset: false,
|
<!-- reset: false,-->
|
||||||
queryObject: {
|
<!-- queryObject: {-->
|
||||||
project: {
|
<!-- project: {-->
|
||||||
type: 'select',
|
<!-- type: 'select',-->
|
||||||
label: '所属项目',
|
<!-- label: '所属项目',-->
|
||||||
config: {
|
<!-- config: {-->
|
||||||
data: []
|
<!-- data: []-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
queryList: {
|
<!-- queryList: {-->
|
||||||
query: queryPostPage,
|
<!-- query: queryPostPage,-->
|
||||||
selectCheckShow: false,
|
<!-- selectCheckShow: false,-->
|
||||||
indexShow: true,
|
<!-- indexShow: true,-->
|
||||||
columns: [
|
<!-- columns: [-->
|
||||||
{
|
<!-- {-->
|
||||||
title: '项目',
|
<!-- title: '项目',-->
|
||||||
prop: 'project',
|
<!-- prop: 'project',-->
|
||||||
type: 'tag',
|
<!-- type: 'tag',-->
|
||||||
columnValue: (row) => { return this.getProjectName(row.project); },
|
<!-- columnValue: (row) => { return this.getProjectName(row.project); },-->
|
||||||
tagType: (row) => {
|
<!-- tagType: (row) => {-->
|
||||||
return 'success';
|
<!-- return 'success';-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
title: '留言板名称',
|
<!-- title: '留言板名称',-->
|
||||||
prop: 'title'
|
<!-- prop: 'title'-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
type: 'button',
|
<!-- type: 'button',-->
|
||||||
title: this.$t('global.operate'),
|
<!-- title: this.$t('global.operate'),-->
|
||||||
width: '350',
|
<!-- width: '350',-->
|
||||||
buttons: [
|
<!-- buttons: [-->
|
||||||
{
|
<!-- {-->
|
||||||
name: '进入',
|
<!-- name: '进入',-->
|
||||||
handleClick: this.handleEnter
|
<!-- handleClick: this.handleEnter-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
name: '修改',
|
<!-- name: '修改',-->
|
||||||
handleClick: this.handleUpdate
|
<!-- handleClick: this.handleUpdate-->
|
||||||
}
|
<!-- }-->
|
||||||
]
|
<!-- ]-->
|
||||||
}
|
<!-- }-->
|
||||||
],
|
<!-- ],-->
|
||||||
actions: [
|
<!-- actions: [-->
|
||||||
{ text: '创建留言板', handler: this.handleCreateMessageBoard }
|
<!-- { text: '创建留言板', handler: this.handleCreateMessageBoard }-->
|
||||||
]
|
<!-- ]-->
|
||||||
}
|
<!-- }-->
|
||||||
};
|
<!-- };-->
|
||||||
},
|
<!-- },-->
|
||||||
mounted() {
|
<!-- mounted() {-->
|
||||||
this.projectOptionList = [{value: 'DEFAULT', label: '玖琏云平台'}];
|
<!-- this.projectOptionList = [{value: 'DEFAULT', label: '玖琏云平台'}];-->
|
||||||
ProjectList.forEach(item => {
|
<!-- ProjectList.forEach(item => {-->
|
||||||
this.projectOptionList.push({value: item.value.toUpperCase(), label: item.label});
|
<!-- this.projectOptionList.push({value: item.value.toUpperCase(), label: item.label});-->
|
||||||
});
|
<!-- });-->
|
||||||
this.queryForm.queryObject.project.config.data = this.projectOptionList;
|
<!-- this.queryForm.queryObject.project.config.data = this.projectOptionList;-->
|
||||||
},
|
<!-- },-->
|
||||||
methods:{
|
<!-- methods:{-->
|
||||||
getProjectName(projectCode) {
|
<!-- getProjectName(projectCode) {-->
|
||||||
let name;
|
<!-- let name;-->
|
||||||
this.projectOptionList.forEach(item => {
|
<!-- this.projectOptionList.forEach(item => {-->
|
||||||
if (item.value.toUpperCase() == projectCode) {
|
<!-- if (item.value.toUpperCase() == projectCode) {-->
|
||||||
name = item.label;
|
<!-- name = item.label;-->
|
||||||
}
|
<!-- }-->
|
||||||
});
|
<!-- });-->
|
||||||
return name;
|
<!-- return name;-->
|
||||||
},
|
<!-- },-->
|
||||||
handleCreateMessageBoard() {
|
<!-- handleCreateMessageBoard() {-->
|
||||||
this.$refs.createDraft.doShow();
|
<!-- this.$refs.createDraft.doShow();-->
|
||||||
},
|
<!-- },-->
|
||||||
reloadTable() {
|
<!-- reloadTable() {-->
|
||||||
if (this.queryList && this.queryList.reload) {
|
<!-- if (this.queryList && this.queryList.reload) {-->
|
||||||
this.queryList.reload();
|
<!-- this.queryList.reload();-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
handleEnter(index, row) {
|
<!-- handleEnter(index, row) {-->
|
||||||
const routeData = this.$router.resolve({
|
<!-- const routeData = this.$router.resolve({-->
|
||||||
path:'/messageBoard',
|
<!-- path:'/messageBoard',-->
|
||||||
query:{
|
<!-- query:{-->
|
||||||
project: row.project.toLowerCase(),
|
<!-- project: row.project.toLowerCase(),-->
|
||||||
noPreLogout: true
|
<!-- noPreLogout: true-->
|
||||||
}
|
<!-- }-->
|
||||||
});
|
<!-- });-->
|
||||||
window.open(routeData.href, '_blank');
|
<!-- window.open(routeData.href, '_blank');-->
|
||||||
},
|
<!-- },-->
|
||||||
handleUpdate(index, row) {
|
<!-- handleUpdate(index, row) {-->
|
||||||
this.$refs.createDraft.doShow(row);
|
<!-- this.$refs.createDraft.doShow(row);-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
};
|
<!--};-->
|
||||||
</script>
|
<!--</script>-->
|
||||||
|
|
||||||
<style scoped>
|
<!--<style scoped>-->
|
||||||
|
|
||||||
</style>
|
<!--</style>-->
|
||||||
|
@ -1,103 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="alarm-button">
|
<div>
|
||||||
<el-button type="warning" icon="el-icon-message-solid" circle @click="showAlarm" />
|
|
||||||
<div v-if="alarmDetailMessageList.length>0" class="alarm-counter">{{ alarmDetailMessageList.length }}</div>
|
|
||||||
<audio ref="audio" />
|
<audio ref="audio" />
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
:modal="false"
|
|
||||||
:visible.sync="showAlarmMessageList"
|
|
||||||
width="900px"
|
|
||||||
title="设备故障!!!"
|
|
||||||
>
|
|
||||||
<el-table
|
|
||||||
:data="tableData"
|
|
||||||
border
|
|
||||||
:cell-style="{'text-align':'center'}"
|
|
||||||
:header-cell-style="{'text-align':'center'}"
|
|
||||||
style="width: 100%"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
@select-all="handleSelectionAll"
|
|
||||||
>
|
|
||||||
<el-table-column
|
|
||||||
type="selection"
|
|
||||||
width="40"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="date"
|
|
||||||
label="时间"
|
|
||||||
width="110"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="name"
|
|
||||||
label="故障设备"
|
|
||||||
width="110"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="id"
|
|
||||||
label="故障编号"
|
|
||||||
width="90"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="message"
|
|
||||||
label="故障信息"
|
|
||||||
/>
|
|
||||||
<el-table-column label="操作">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
@click="goToDetail(scope.$index,scope.row)"
|
|
||||||
>详情</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
:type="dealAlarmMessage[scope.$index] ? 'success' : 'danger'"
|
|
||||||
@click="handleAlarmMessage(scope.$index,scope.row)"
|
|
||||||
>{{ dealAlarmMessage[scope.$index] ? '故障信息已处理' : '故障信息未处理' }}</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="tag"
|
|
||||||
label="标签"
|
|
||||||
width="100"
|
|
||||||
:filters="[{ text: '一般故障', value: '一般故障' }, { text: '中等故障', value: '中等故障' }, { text: '重大故障', value: '重大故障' }]"
|
|
||||||
:filter-method="filterTag"
|
|
||||||
filter-placement="bottom-end"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag
|
|
||||||
:type="scope.row.tag === '一般故障' ? 'warning' : 'danger'"
|
|
||||||
disable-transitions
|
|
||||||
>{{ scope.row.tag }}</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-dialog>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
title="提示"
|
|
||||||
:visible.sync="dialogVisible"
|
|
||||||
width="30%"
|
|
||||||
>
|
|
||||||
<span>进行全选操作</span>
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
||||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
||||||
</span>
|
|
||||||
:class="itemsstyle[index]"
|
|
||||||
</el-dialog> -->
|
|
||||||
<div v-if="showAlarmMessageList">
|
<div v-if="showAlarmMessageList">
|
||||||
<div v-for="(item, index) in alarmDetailMessageList" :key="index">
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-dialogDrag
|
v-dialogDrag
|
||||||
title="设备故障"
|
title="设备故障"
|
||||||
:modal="false"
|
:modal="false"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:visible.sync="item.show"
|
:visible.sync="showAlarmImportantMessage.show"
|
||||||
width="40%"
|
width="40%"
|
||||||
class="yellow"
|
class="yellow"
|
||||||
:class="[{'orange':item.color == 'O','red':item.color == 'R'},itemsstyle[index]]"
|
:class="{'orange':showAlarmImportantMessage.color == 'O','red':showAlarmImportantMessage.color == 'R'}"
|
||||||
>
|
>
|
||||||
<div class="alarm-message-detail">
|
<div class="alarm-message-detail">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
@ -106,19 +21,22 @@
|
|||||||
<el-button style="float: right; padding: 3px 0" type="text" @click="goToAlarmDetail">详情</el-button>
|
<el-button style="float: right; padding: 3px 0" type="text" @click="goToAlarmDetail">详情</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="text item">
|
<div class="text item">
|
||||||
时间:{{ item.time }}
|
时间:{{ showAlarmImportantMessage.time }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text item">
|
<div class="text item">
|
||||||
级别:{{ item.levelNew }}
|
级别:{{ showAlarmImportantMessage.levelNew }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text item">
|
<div class="text item">
|
||||||
设备:{{ item.deviceCodeNew }}
|
设备:{{ showAlarmImportantMessage.deviceCodeNew }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text item">
|
<div class="text item">
|
||||||
类型:{{ item.typeNew }}
|
类型:{{ showAlarmImportantMessage.typeNew }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text item">
|
<div class="text item">
|
||||||
信息:{{ item.descriptionNew }}
|
信息:{{ showAlarmImportantMessage.descriptionNew }}
|
||||||
|
</div>
|
||||||
|
<div class="text item">
|
||||||
|
原因:{{ showAlarmImportantMessage.reason }}
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
@ -126,15 +44,66 @@
|
|||||||
<span>辅助决策信息</span>
|
<span>辅助决策信息</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text item">
|
<div class="text item">
|
||||||
(1)信息报送人员/群组:{{ item.showDecisionMessage.personGroup }}
|
(1)信息报送人员/群组:{{ showAlarmImportantMessage.showDecisionMessage.personGroup }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text item">
|
<div class="text item">
|
||||||
(2)电话通报:{{ item.showDecisionMessage.telephoneNotified }}
|
(2)电话通报:{{ showAlarmImportantMessage.showDecisionMessage.telephoneNotified }}
|
||||||
</div></el-card>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="showAlarmImportantMessage.color == 'O'" class="text item">
|
||||||
|
(3)PIS信息模版:{{ showAlarmImportantMessage.pisTemplate }}
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
<div class="alarm-message-All">
|
||||||
|
<el-card class="box-card">
|
||||||
|
<el-table
|
||||||
|
:data="alarmDetailMessageListShow"
|
||||||
|
border
|
||||||
|
:cell-style="{'text-align':'center'}"
|
||||||
|
:header-cell-style="{'text-align':'center'}"
|
||||||
|
style="width: 100%"
|
||||||
|
max-height="250"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
prop="time"
|
||||||
|
label="时间"
|
||||||
|
width="100"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="levelNew"
|
||||||
|
label="级别"
|
||||||
|
width="70"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="deviceCodeNew"
|
||||||
|
label="设备"
|
||||||
|
width="105"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="typeNew"
|
||||||
|
label="类型"
|
||||||
|
width="80"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="descriptionNew"
|
||||||
|
label="信息"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="reason"
|
||||||
|
label="原因"
|
||||||
|
width="105"
|
||||||
|
/>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pagination.currentPage"
|
||||||
|
:page-size="2"
|
||||||
|
layout="total, prev, pager, next"
|
||||||
|
:total="pagination.total"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
/>
|
||||||
|
</el-card></div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -145,22 +114,8 @@ export default {
|
|||||||
name: 'ErrrorMessageBox',
|
name: 'ErrrorMessageBox',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
activeName: '0',
|
||||||
dealAlarmMessage:[true, false],
|
|
||||||
showAlarmMessageList:false,
|
showAlarmMessageList:false,
|
||||||
tableData: [{
|
|
||||||
date: '2023-04-17',
|
|
||||||
name: '车厢编号10',
|
|
||||||
id: '001',
|
|
||||||
message:'电路信号故障,车辆二次设备无法运行',
|
|
||||||
tag: '一般故障'
|
|
||||||
}, {
|
|
||||||
date: '2023-04-21',
|
|
||||||
name: '车厢编号8',
|
|
||||||
id: '005',
|
|
||||||
message:'新的故障信息',
|
|
||||||
tag: '重大故障'
|
|
||||||
}],
|
|
||||||
decisionMessage:[{
|
decisionMessage:[{
|
||||||
personGroup:'主要领导、应急管理部负责人、应急管理室负责人报送,并发党群信息群;故障群/应急群发布。',
|
personGroup:'主要领导、应急管理部负责人、应急管理室负责人报送,并发党群信息群;故障群/应急群发布。',
|
||||||
telephoneNotified:'如故障属于I类信息,分公司值班领导、主要领导、党群工作部、线网管控中心负责人、分管领导、应急管理部负责人、应急管理室负责人。'
|
telephoneNotified:'如故障属于I类信息,分公司值班领导、主要领导、党群工作部、线网管控中心负责人、分管领导、应急管理部负责人、应急管理室负责人。'
|
||||||
@ -177,7 +132,14 @@ export default {
|
|||||||
]),
|
]),
|
||||||
showDecisionMessage:{},
|
showDecisionMessage:{},
|
||||||
alarmDetailMessageList:[],
|
alarmDetailMessageList:[],
|
||||||
itemsstyle: ['item0', 'item1', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7', 'item8', 'item9']
|
alarmDetailMessageListShow:[],
|
||||||
|
showAlarmImportantMessage:{},
|
||||||
|
alarmReasonMap:[],
|
||||||
|
oldShowAlarmMessage:{},
|
||||||
|
pagination:{
|
||||||
|
total:1,
|
||||||
|
currentPage: 1
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -186,27 +148,17 @@ export default {
|
|||||||
]),
|
]),
|
||||||
alarmDetailMessage() {
|
alarmDetailMessage() {
|
||||||
return this.$store.state.socket.simulationAlarmInfo;
|
return this.$store.state.socket.simulationAlarmInfo;
|
||||||
},
|
|
||||||
finishDealAlarmMessage() {
|
|
||||||
return this.dealAlarmMessage.reduce((prev, curr)=> curr === false ? prev + 1 : prev, 0);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
alarmDetailMessage(newValue, oldValue) {
|
alarmDetailMessage(newValue, oldValue) {
|
||||||
if (newValue.length > 0) {
|
if (newValue.length > 0 && newValue[0].handleMethod === 'NCC') {
|
||||||
const clone = JSON.parse(JSON.stringify(this.alarmDetailMessage));
|
const clone = JSON.parse(JSON.stringify(this.alarmDetailMessage));
|
||||||
this.alarmDetailMessageList.push(...clone);
|
this.alarmDetailMessageList.unshift(...clone);
|
||||||
let index;
|
|
||||||
this.alarmDetailMessageList.forEach((item, i)=>{
|
this.alarmDetailMessageList.forEach((item, i)=>{
|
||||||
this.$set(item, 'show', true);
|
this.$set(item, 'show', true);
|
||||||
if (new Date(newValue[0].time).getTime() - new Date(item.time).getTime() > 90000) {
|
|
||||||
index = i;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
if (index !== undefined) {
|
if (this.$store.getters['map/getDeviceByCode'](this.alarmDetailMessageList[0].deviceCode) !== undefined) {
|
||||||
this.alarmDetailMessageList.splice(0, index + 1);
|
|
||||||
}
|
|
||||||
if (newValue[0].handleMethod === 'NCC' && this.$store.getters['map/getDeviceByCode'](this.alarmDetailMessageList[0].deviceCode) !== undefined) {
|
|
||||||
this.showAlarmPlayAlarmMusic();
|
this.showAlarmPlayAlarmMusic();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -217,24 +169,28 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
playAlarmMusic() {
|
|
||||||
let alarmMusic = new Audio();
|
|
||||||
alarmMusic = require('@/assets/buzzer.mp3');
|
|
||||||
this.$refs.audio.src = alarmMusic;
|
|
||||||
this.$refs.audio.play();
|
|
||||||
},
|
|
||||||
showAlarmPlayAlarmMusic() {
|
showAlarmPlayAlarmMusic() {
|
||||||
if (this.$refs.audio.paused) {
|
if (this.$refs.audio.paused) {
|
||||||
this.playAlarmMusic();
|
this.playAlarmMusic();
|
||||||
}
|
}
|
||||||
this.showAlarm();
|
this.showAlarm();
|
||||||
},
|
},
|
||||||
|
playAlarmMusic() {
|
||||||
|
let alarmMusic = new Audio();
|
||||||
|
alarmMusic = require('@/assets/buzzer.mp3');
|
||||||
|
this.$refs.audio.src = alarmMusic;
|
||||||
|
this.$refs.audio.play();
|
||||||
|
},
|
||||||
showAlarm() {
|
showAlarm() {
|
||||||
this.alarmDetailMessageList.forEach((showAlarmMessage)=>{
|
this.alarmDetailMessageList.forEach((showAlarmMessage)=>{
|
||||||
showAlarmMessage.show = true;
|
showAlarmMessage.show = true;
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](showAlarmMessage.deviceCode);
|
const station = this.$store.getters['map/getDeviceByCode'](showAlarmMessage.deviceCode);
|
||||||
showAlarmMessage.levelNew = this.mapAlarmMessage.get(showAlarmMessage.level);
|
showAlarmMessage.levelNew = this.mapAlarmMessage.get(showAlarmMessage.level);
|
||||||
|
if (station.tripNumber !== undefined) {
|
||||||
showAlarmMessage.deviceCodeNew = '列车' + station.serviceNumber + station.tripNumber;
|
showAlarmMessage.deviceCodeNew = '列车' + station.serviceNumber + station.tripNumber;
|
||||||
|
} else {
|
||||||
|
showAlarmMessage.deviceCodeNew = '列车' + showAlarmMessage.deviceCode;
|
||||||
|
}
|
||||||
showAlarmMessage.typeNew = this.mapAlarmMessage.get(showAlarmMessage.type);
|
showAlarmMessage.typeNew = this.mapAlarmMessage.get(showAlarmMessage.type);
|
||||||
const index = showAlarmMessage.description.indexOf('列车');
|
const index = showAlarmMessage.description.indexOf('列车');
|
||||||
showAlarmMessage.descriptionNew = showAlarmMessage.description.slice(0, index) + showAlarmMessage.deviceCodeNew + showAlarmMessage.description.substring(index + 7);
|
showAlarmMessage.descriptionNew = showAlarmMessage.description.slice(0, index) + showAlarmMessage.deviceCodeNew + showAlarmMessage.description.substring(index + 7);
|
||||||
@ -246,49 +202,27 @@ export default {
|
|||||||
showAlarmMessage.showDecisionMessage = this.decisionMessage[1];
|
showAlarmMessage.showDecisionMessage = this.decisionMessage[1];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const newAlarmMessage = this.alarmDetailMessageList[0];
|
||||||
|
if (this.oldShowAlarmMessage.level == undefined) {
|
||||||
|
this.oldShowAlarmMessage = newAlarmMessage;
|
||||||
|
this.showAlarmImportantMessage = newAlarmMessage;
|
||||||
|
} else if (newAlarmMessage.color == 'O') {
|
||||||
|
this.oldShowAlarmMessage = newAlarmMessage;
|
||||||
|
this.showAlarmImportantMessage = newAlarmMessage;
|
||||||
|
} else if (newAlarmMessage.color == 'Y' && this.oldShowAlarmMessage.color == 'O') {
|
||||||
|
this.showAlarmImportantMessage = this.oldShowAlarmMessage;
|
||||||
|
} else {
|
||||||
|
this.showAlarmImportantMessage = newAlarmMessage;
|
||||||
|
}
|
||||||
|
this.alarmDetailMessageListShow = this.alarmDetailMessageList.slice(0, 2);
|
||||||
|
this.pagination.total = this.alarmDetailMessageList.length;
|
||||||
this.showAlarmMessageList = true;
|
this.showAlarmMessageList = true;
|
||||||
},
|
},
|
||||||
handleSelectionChange(val) {
|
|
||||||
if (val.length === this.tableData.length) {
|
|
||||||
this.dialogVisible = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleSelectionAll(val) {
|
|
||||||
if (val.length > 0) {
|
|
||||||
this.dialogVisible = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleAlarmMessage(index, row) {
|
|
||||||
this.$confirm('此操作将处理故障信息, 是否继续?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.dealAlarmMessage.splice(index, 1, !this.dealAlarmMessage[index]);
|
|
||||||
this.$message({
|
|
||||||
type: 'success',
|
|
||||||
message: '处理成功!'
|
|
||||||
});
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message({
|
|
||||||
type: 'info',
|
|
||||||
message: '已取消处理'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goToDetail(index, row) {
|
|
||||||
/* const routeUrl = this.$router.resolve({
|
|
||||||
path: '/thirdLogin'
|
|
||||||
// query: { id: 96 }
|
|
||||||
});
|
|
||||||
window.open(routeUrl.href, '_blank'); */
|
|
||||||
//
|
|
||||||
|
|
||||||
},
|
|
||||||
filterTag(value, row) {
|
|
||||||
return row.tag === value;
|
|
||||||
},
|
|
||||||
goToAlarmDetail() {
|
goToAlarmDetail() {
|
||||||
|
},
|
||||||
|
handleCurrentChange(page) {
|
||||||
|
this.pagination.currentPage = page;
|
||||||
|
this.alarmDetailMessageListShow = this.alarmDetailMessageList.slice((page - 1) * 2, page * 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -305,24 +239,6 @@ export default {
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.alarm-button{
|
|
||||||
position: absolute;
|
|
||||||
left: 20px;
|
|
||||||
bottom: 58%;
|
|
||||||
.alarm-counter{
|
|
||||||
position: absolute;
|
|
||||||
left: 20px;
|
|
||||||
bottom: 62%;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background-color: red;
|
|
||||||
text-align: center;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.alarm-message-detail {
|
.alarm-message-detail {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -345,6 +261,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.alarm-message-All{
|
||||||
|
margin-top:10px;
|
||||||
|
.box-card{
|
||||||
|
padding:10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.yellow{
|
.yellow{
|
||||||
/deep/ .el-dialog__body{
|
/deep/ .el-dialog__body{
|
||||||
padding: 0 10px 10px;
|
padding: 0 10px 10px;
|
||||||
@ -372,45 +294,4 @@ export default {
|
|||||||
background-color: red;
|
background-color: red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item0 {
|
|
||||||
top: 0px;
|
|
||||||
z-index: 1501 !important;
|
|
||||||
}
|
|
||||||
.item1 {
|
|
||||||
top:50px;
|
|
||||||
z-index: 1502 !important;
|
|
||||||
}
|
|
||||||
.item2 {
|
|
||||||
top:100px;
|
|
||||||
z-index: 1503 !important;
|
|
||||||
}
|
|
||||||
.item3 {
|
|
||||||
top: 150px;
|
|
||||||
z-index: 1504 !important;
|
|
||||||
}
|
|
||||||
.item4 {
|
|
||||||
top:200px;
|
|
||||||
z-index: 1505 !important;
|
|
||||||
}
|
|
||||||
.item5 {
|
|
||||||
top:250px;
|
|
||||||
z-index: 1506 !important;
|
|
||||||
}
|
|
||||||
.item6 {
|
|
||||||
top:300px;
|
|
||||||
z-index: 1507 !important;
|
|
||||||
}
|
|
||||||
.item7 {
|
|
||||||
top:350px;
|
|
||||||
z-index: 1508 !important;
|
|
||||||
}
|
|
||||||
.item8 {
|
|
||||||
top:400px;
|
|
||||||
z-index: 1509 !important;
|
|
||||||
}
|
|
||||||
.item9 {
|
|
||||||
top:450px;
|
|
||||||
z-index: 1510 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -30,8 +30,8 @@ import TrainingTip from './trainingList/trainingTip';
|
|||||||
import TrainingPositionTip from './trainingList/trainingPositionTip.vue';
|
import TrainingPositionTip from './trainingList/trainingPositionTip.vue';
|
||||||
import TrainingMenu from './trainingList/trainingMenu';
|
import TrainingMenu from './trainingList/trainingMenu';
|
||||||
import TrainingDesign from './trainingDesign/designPane.vue';
|
import TrainingDesign from './trainingDesign/designPane.vue';
|
||||||
// import ChatBox from './newChat/index.vue';
|
import ChatBox from './newChat/index.vue';
|
||||||
import ChatBox from './chatBox';
|
// import ChatBox from './chatBox';
|
||||||
import TrainingLeftSlider from './trainingList/trainingLeftSlider';
|
import TrainingLeftSlider from './trainingList/trainingLeftSlider';
|
||||||
import LineBoard from './lineBoard';
|
import LineBoard from './lineBoard';
|
||||||
import BottomTable from './bottomTable';
|
import BottomTable from './bottomTable';
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { addSimulationMember } from '@/api/jointSimulation';
|
import { addSimulationMember } from '@/api/jointSimulation';
|
||||||
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
export default {
|
export default {
|
||||||
name: 'AddMember',
|
name: 'AddMember',
|
||||||
props: {
|
props: {
|
||||||
@ -78,27 +79,30 @@ export default {
|
|||||||
'STATION_FACILITATOR',
|
'STATION_FACILITATOR',
|
||||||
'STATION_WORKER',
|
'STATION_WORKER',
|
||||||
'DEVICE_MANAGER'
|
'DEVICE_MANAGER'
|
||||||
],
|
|
||||||
typeList: [
|
|
||||||
{label: '行调', value: 'DISPATCHER'},
|
|
||||||
{label: 'NCC调度', value: 'NCC_DISPATCHER'},
|
|
||||||
{label: '通号', value: 'MAINTAINER'},
|
|
||||||
{label: '车站值班员', value: 'STATION_SUPERVISOR'},
|
|
||||||
{label: '车站助理', value: 'STATION_ASSISTANT'},
|
|
||||||
{label: '车站站长', value: 'STATION_MASTER'},
|
|
||||||
{label: '车站信号员', value: 'STATION_SIGNALER'},
|
|
||||||
{label: '车站客运员', value: 'STATION_PASSENGER'},
|
|
||||||
{label: '车站扳道员', value: 'STATION_SWITCH_MAN'},
|
|
||||||
{label: '车站引导员', value: 'STATION_FACILITATOR'},
|
|
||||||
{label: '车站工务工', value: 'STATION_WORKER'},
|
|
||||||
{label: '设备管理员', value: 'DEVICE_MANAGER'},
|
|
||||||
{label: '车务段段长', value: 'TRAIN_MASTER'}
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '添加仿真角色成员';
|
return '添加仿真角色成员';
|
||||||
|
},
|
||||||
|
simType() {
|
||||||
|
return this.$route.query.simType || 'METRO';
|
||||||
|
},
|
||||||
|
typeList() {
|
||||||
|
const list = [];
|
||||||
|
ConstConfig.ConstSelect.roleTypeList.forEach(item => {
|
||||||
|
if (item.simTypeList.includes(this.simType)) {
|
||||||
|
const obj = {
|
||||||
|
...item
|
||||||
|
};
|
||||||
|
if (item.value == 'STATION_SUPERVISOR' && this.simType == 'RAILWAY') {
|
||||||
|
obj.label = '车站值班员';
|
||||||
|
}
|
||||||
|
list.push(obj);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -58,6 +58,7 @@ import eMembers from './e-members';
|
|||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import { assignUsersPlayRoles } from '@/api/jointSimulation';
|
import { assignUsersPlayRoles } from '@/api/jointSimulation';
|
||||||
import AddMember from './addMember';
|
import AddMember from './addMember';
|
||||||
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
export default {
|
export default {
|
||||||
name: 'MembersManage',
|
name: 'MembersManage',
|
||||||
components: {
|
components: {
|
||||||
@ -94,10 +95,13 @@ export default {
|
|||||||
doorList: [],
|
doorList: [],
|
||||||
memberData: {},
|
memberData: {},
|
||||||
treeData: [{
|
treeData: [{
|
||||||
labelName: '行调',
|
labelName: 'NCC调度',
|
||||||
children: []
|
children: []
|
||||||
}, {
|
}, {
|
||||||
labelName: 'NCC调度',
|
labelName: '信息调度',
|
||||||
|
children: []
|
||||||
|
}, {
|
||||||
|
labelName: '行调',
|
||||||
children: []
|
children: []
|
||||||
}, {
|
}, {
|
||||||
labelName: '车站值班员',
|
labelName: '车站值班员',
|
||||||
@ -156,6 +160,9 @@ export default {
|
|||||||
group() {
|
group() {
|
||||||
return this.$route.query.group;
|
return this.$route.query.group;
|
||||||
},
|
},
|
||||||
|
simType() {
|
||||||
|
return this.$route.query.simType || 'METRO';
|
||||||
|
},
|
||||||
userId() {
|
userId() {
|
||||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||||
},
|
},
|
||||||
@ -178,6 +185,7 @@ export default {
|
|||||||
this.memberData = this.$store.state.training.memberData;
|
this.memberData = this.$store.state.training.memberData;
|
||||||
const dispatcherList = [];
|
const dispatcherList = [];
|
||||||
const nccDispatcherList = [];
|
const nccDispatcherList = [];
|
||||||
|
const occDispatcherList = [];
|
||||||
const electricDispatcherList = [];
|
const electricDispatcherList = [];
|
||||||
const depotDispatcherList = [];
|
const depotDispatcherList = [];
|
||||||
const stationSupervisorList = [];
|
const stationSupervisorList = [];
|
||||||
@ -194,27 +202,41 @@ export default {
|
|||||||
const deviceManagerList = [];
|
const deviceManagerList = [];
|
||||||
const trainMasterList = [];
|
const trainMasterList = [];
|
||||||
const stationElectricWorkerList = [];
|
const stationElectricWorkerList = [];
|
||||||
|
const signalBuildingList = [];
|
||||||
|
const shiftManagerList = [];
|
||||||
|
const environmentDispatherList = [];
|
||||||
|
const parentDepartmentList = [];
|
||||||
|
const schedulingList = [];
|
||||||
|
const t = this.simType == 'METRO' ? '行值-' : '值班员-';
|
||||||
val.forEach(item => {
|
val.forEach(item => {
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
case 'DISPATCHER':
|
|
||||||
this.memberData[item.id].labelName = '行调' + (item.name || '');
|
|
||||||
dispatcherList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'NCC_DISPATCHER':
|
case 'NCC_DISPATCHER':
|
||||||
this.memberData[item.id].labelName = 'NCC调度' + (item.name || '');
|
this.memberData[item.id].labelName = 'NCC调度' + (item.name || '');
|
||||||
nccDispatcherList.push(this.memberData[item.id]);
|
nccDispatcherList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
|
case 'OCC_DISPATCHER':
|
||||||
|
this.memberData[item.id].labelName = item.name || '';
|
||||||
|
occDispatcherList.push(this.memberData[item.id]);
|
||||||
|
break;
|
||||||
|
case 'DISPATCHER':
|
||||||
|
this.memberData[item.id].labelName = '行调' + (item.name || '');
|
||||||
|
dispatcherList.push(this.memberData[item.id]);
|
||||||
|
break;
|
||||||
case 'ELECTRIC_DISPATCHER':
|
case 'ELECTRIC_DISPATCHER':
|
||||||
this.memberData[item.id].labelName = '电力调度' + (item.name || '');
|
this.memberData[item.id].labelName = '工电调度' + (item.name || '');
|
||||||
electricDispatcherList.push(this.memberData[item.id]);
|
electricDispatcherList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
case 'DEPOT_DISPATCHER':
|
case 'DEPOT_DISPATCHER':
|
||||||
this.memberData[item.id].labelName = '信号楼-' + device.name + (item.name || '');
|
this.memberData[item.id].labelName = '车辆段调度-' + device.name + (item.name || '');
|
||||||
depotDispatcherList.push(this.memberData[item.id]);
|
depotDispatcherList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
|
case 'SIGNAL_BUILDING':
|
||||||
|
this.memberData[item.id].labelName = '信号楼-' + device.name + (item.name || '');
|
||||||
|
signalBuildingList.push(this.memberData[item.id]);
|
||||||
|
break;
|
||||||
case 'STATION_SUPERVISOR':
|
case 'STATION_SUPERVISOR':
|
||||||
this.memberData[item.id].labelName = '值班员-' + device.name + (item.name ? `-${item.name }` : '');
|
this.memberData[item.id].labelName = t + device.name + (item.name ? `-${item.name }` : '');
|
||||||
stationSupervisorList.push(this.memberData[item.id]);
|
stationSupervisorList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
case 'DRIVER':
|
case 'DRIVER':
|
||||||
@ -262,103 +284,176 @@ export default {
|
|||||||
deviceManagerList.push(this.memberData[item.id]);
|
deviceManagerList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
case 'TRAIN_MASTER':
|
case 'TRAIN_MASTER':
|
||||||
// device.name;
|
|
||||||
this.memberData[item.id].labelName = '车务段段长-' + (item.name ? `-${item.name }` : '');
|
this.memberData[item.id].labelName = '车务段段长-' + (item.name ? `-${item.name }` : '');
|
||||||
trainMasterList.push(this.memberData[item.id]);
|
trainMasterList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
|
case 'SHIFT_MANAGER':
|
||||||
|
this.memberData[item.id].labelName = '值班主任-' + (item.name ? `-${item.name }` : '');
|
||||||
|
shiftManagerList.push(this.memberData[item.id]);
|
||||||
|
break;
|
||||||
|
case 'ENVIRONMENT_DISPATCHER':
|
||||||
|
this.memberData[item.id].labelName = '环控调度-' + (item.name ? `-${item.name }` : '');
|
||||||
|
environmentDispatherList.push(this.memberData[item.id]);
|
||||||
|
break;
|
||||||
case 'PARENT_DEPARTMENT':
|
case 'PARENT_DEPARTMENT':
|
||||||
this.memberData[item.id].labelName = '上级部门' + (item.name ? `-${item.name }` : '');
|
this.memberData[item.id].labelName = '上级部门' + (item.name ? `-${item.name }` : '');
|
||||||
|
parentDepartmentList.push(this.memberData[item.id]);
|
||||||
|
break;
|
||||||
|
case 'SCHEDULING':
|
||||||
|
this.memberData[item.id].labelName = '派班员' + (item.name ? `-${item.name }` : '');
|
||||||
|
schedulingList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
case 'STATION_ELECTRIC_WORKER':
|
case 'STATION_ELECTRIC_WORKER':
|
||||||
this.memberData[item.id].labelName = '电力工务' + (item.name || '');
|
this.memberData[item.id].labelName = '电力工务' + (item.name || '');
|
||||||
stationElectricWorkerList.push(this.memberData[item.id]);
|
stationElectricWorkerList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
// DEVICE_MANAGER:'设备管理员' deviceManager
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.treeData = [{
|
this.treeData = [{
|
||||||
labelName: '行调',
|
|
||||||
id: 'dispatcher',
|
|
||||||
children: dispatcherList
|
|
||||||
}, {
|
|
||||||
labelName: 'NCC调度',
|
labelName: 'NCC调度',
|
||||||
id: 'nccDispatcher',
|
id: 'nccDispatcher',
|
||||||
|
memberType: 'NCC_DISPATCHER',
|
||||||
children: nccDispatcherList
|
children: nccDispatcherList
|
||||||
}, {
|
}, {
|
||||||
labelName: '车站值班员',
|
labelName: '信息调度',
|
||||||
|
id: 'occDispatcher',
|
||||||
|
memberType: 'OCC_DISPATCHER',
|
||||||
|
children: occDispatcherList
|
||||||
|
}, {
|
||||||
|
labelName: '行调',
|
||||||
|
id: 'dispatcher',
|
||||||
|
memberType: 'DISPATCHER',
|
||||||
|
children: dispatcherList
|
||||||
|
}, {
|
||||||
|
labelName: this.simType == 'METRO' ? '行值' : '车站值班员',
|
||||||
id: 'stationSupervisor',
|
id: 'stationSupervisor',
|
||||||
|
memberType: 'STATION_SUPERVISOR',
|
||||||
children: stationSupervisorList
|
children: stationSupervisorList
|
||||||
}, {
|
}, {
|
||||||
labelName: '司机',
|
labelName: '司机',
|
||||||
id: 'driver',
|
id: 'driver',
|
||||||
|
memberType: 'DRIVER',
|
||||||
children: driverList
|
children: driverList
|
||||||
}, {
|
}, {
|
||||||
labelName: '通号',
|
labelName: '通号',
|
||||||
id: 'maintainer',
|
id: 'maintainer',
|
||||||
|
memberType: 'MAINTAINER',
|
||||||
children: maintainerList
|
children: maintainerList
|
||||||
}, {
|
}, {
|
||||||
labelName: '车辆段信号楼',
|
labelName: '车辆段调度',
|
||||||
id: 'depotDispatcher',
|
id: 'depotDispatcher',
|
||||||
|
memberType: 'DEPOT_DISPATCHER',
|
||||||
children: depotDispatcherList
|
children: depotDispatcherList
|
||||||
}, {
|
}, {
|
||||||
labelName: '电力调度',
|
labelName: '车辆段信号楼',
|
||||||
|
id: 'signalBuilding',
|
||||||
|
memberType: 'SIGNAL_BUILDING',
|
||||||
|
children: signalBuildingList
|
||||||
|
}, {
|
||||||
|
labelName: '工电调度',
|
||||||
id: 'electricDispatcher',
|
id: 'electricDispatcher',
|
||||||
|
memberType: 'ELECTRIC_DISPATCHER',
|
||||||
children: electricDispatcherList
|
children: electricDispatcherList
|
||||||
}, {
|
}, {
|
||||||
labelName: 'CTC操作员',
|
labelName: 'CTC操作员',
|
||||||
id: 'ctcOperator',
|
id: 'ctcOperator',
|
||||||
|
memberType: 'RAIL_CTC',
|
||||||
children: ctcOperatorList
|
children: ctcOperatorList
|
||||||
}, {
|
}, {
|
||||||
labelName: '车站助理',
|
labelName: '车站助理',
|
||||||
id: 'stationAssistant',
|
id: 'stationAssistant',
|
||||||
|
memberType: 'STATION_ASSISTANT',
|
||||||
children: stationAssistantList
|
children: stationAssistantList
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
labelName: '车站站长',
|
labelName: '车站站长',
|
||||||
id: 'stationMaster',
|
id: 'stationMaster',
|
||||||
|
memberType: 'STATION_MASTER',
|
||||||
children: stationMasterList
|
children: stationMasterList
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
labelName: '车站信号员',
|
labelName: '车站信号员',
|
||||||
id: 'stationSignaler',
|
id: 'stationSignaler',
|
||||||
|
memberType: 'STATION_SIGNALER',
|
||||||
children: stationSignalerList
|
children: stationSignalerList
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
labelName: '车站客运员',
|
labelName: '车站客运员',
|
||||||
id: 'stationPassenger',
|
id: 'stationPassenger',
|
||||||
|
memberType: 'STATION_PASSENGER',
|
||||||
children: stationPassengerList
|
children: stationPassengerList
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
labelName: '车站扳道员',
|
labelName: '车站扳道员',
|
||||||
id: 'stationSwitchMan',
|
id: 'stationSwitchMan',
|
||||||
|
memberType: 'STATION_SWITCH_MAN',
|
||||||
children: stationSwitchManList
|
children: stationSwitchManList
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
labelName: '车站引导员',
|
labelName: '车站引导员',
|
||||||
id: 'stationFacilitator',
|
id: 'stationFacilitator',
|
||||||
|
memberType: 'STATION_FACILITATOR',
|
||||||
children: stationFacilitatorList
|
children: stationFacilitatorList
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
labelName: '车站工务工',
|
labelName: '车站工务工',
|
||||||
id: 'stationWorker',
|
id: 'stationWorker',
|
||||||
|
memberType: 'STATION_WORKER',
|
||||||
children: stationWorkerList
|
children: stationWorkerList
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
labelName: '设备管理员',
|
labelName: '设备管理员',
|
||||||
id: 'deviceManager',
|
id: 'deviceManager',
|
||||||
|
memberType: 'DEVICE_MANAGER',
|
||||||
children: deviceManagerList
|
children: deviceManagerList
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
labelName: '车务段段长 ',
|
labelName: '车务段段长 ',
|
||||||
id: 'trainMaster',
|
id: 'trainMaster',
|
||||||
|
memberType: 'TRAIN_MASTER',
|
||||||
children: trainMasterList
|
children: trainMasterList
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
labelName: '值班主任 ',
|
||||||
|
id: 'shiftManager',
|
||||||
|
memberType: 'SHIFT_MANAGER',
|
||||||
|
children: shiftManagerList
|
||||||
|
},
|
||||||
|
{
|
||||||
|
labelName: '环控调度 ',
|
||||||
|
id: 'environmentDispather',
|
||||||
|
memberType: 'ENVIRONMENT_DISPATCHER',
|
||||||
|
children: environmentDispatherList
|
||||||
|
},
|
||||||
{
|
{
|
||||||
labelName: '电力工务 ',
|
labelName: '电力工务 ',
|
||||||
id: 'stationElectricWorker',
|
id: 'stationElectricWorker',
|
||||||
|
memberType: 'STATION_ELECTRIC_WORKER',
|
||||||
children: stationElectricWorkerList
|
children: stationElectricWorkerList
|
||||||
|
},
|
||||||
|
{
|
||||||
|
labelName: '上级部门 ',
|
||||||
|
id: 'parentDepartment',
|
||||||
|
memberType: 'PARENT_DEPARTMENT',
|
||||||
|
children: parentDepartmentList
|
||||||
|
},
|
||||||
|
{
|
||||||
|
labelName: '派班员 ',
|
||||||
|
id: 'scheduling',
|
||||||
|
memberType: 'SCHEDULING',
|
||||||
|
children: schedulingList
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
const sType = [];
|
||||||
|
ConstConfig.ConstSelect.roleTypeList.forEach(ii => {
|
||||||
|
if (ii.simTypeList.includes(this.simType)) {
|
||||||
|
sType.push(ii.value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.treeData = this.treeData.filter(ii => {
|
||||||
|
return sType.includes(ii.memberType);
|
||||||
|
});
|
||||||
|
this.$store.dispatch('training/setMemberTreeData', this.treeData);
|
||||||
EventBus.$emit('trainTicketMember', [...stationSupervisorList, ...stationAssistantList]);
|
EventBus.$emit('trainTicketMember', [...stationSupervisorList, ...stationAssistantList]);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.$refs.tree) {
|
if (this.$refs.tree) {
|
||||||
|
@ -1,451 +1,451 @@
|
|||||||
<template>
|
<!--<template>-->
|
||||||
<div id="elDialog" class="message-board-box">
|
<!-- <div id="elDialog" class="message-board-box">-->
|
||||||
<div class="message-board-title">留言板</div>
|
<!-- <div class="message-board-title">留言板</div>-->
|
||||||
<div class="message-board-content">
|
<!-- <div class="message-board-content">-->
|
||||||
<div v-if="postCommentList.length">
|
<!-- <div v-if="postCommentList.length">-->
|
||||||
<template v-for="(item,i) in postCommentList">
|
<!-- <template v-for="(item,i) in postCommentList">-->
|
||||||
<div :key="i" class="eachPostComment">
|
<!-- <div :key="i" class="eachPostComment">-->
|
||||||
<div style="margin-bottom: 10px;display: flex;align-items: center;">
|
<!-- <div style="margin-bottom: 10px;display: flex;align-items: center;">-->
|
||||||
<img :src="avatarUrl(item)" class="head_portrait">
|
<!-- <img :src="avatarUrl(item)" class="head_portrait">-->
|
||||||
<div class="MBCcreatorNickName">{{ item.creatorNickName }}</div>
|
<!-- <div class="MBCcreatorNickName">{{ item.creatorNickName }}</div>-->
|
||||||
<div style="display: inline-block;">{{ item.createTime }}</div>
|
<!-- <div style="display: inline-block;">{{ item.createTime }}</div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div style="margin-left: 60px;" v-html="$escapeHTML(`${item.content}`)" />
|
<!-- <div style="margin-left: 60px;" v-html="$escapeHTML(`${item.content}`)" />-->
|
||||||
<div style="width: 100%;display:flex;align-items: center;justify-content: flex-end;">
|
<!-- <div style="width: 100%;display:flex;align-items: center;justify-content: flex-end;">-->
|
||||||
<img :src="replyIcon" class="replyIcon" @click="replyLeaveMessage(item.id, i)">
|
<!-- <img :src="replyIcon" class="replyIcon" @click="replyLeaveMessage(item.id, i)">-->
|
||||||
<img v-if="userId == item.creatorId || superAdmin" :src="deleteIcon" class="deleteIcon" @click="deleteMessage(item.id)">
|
<!-- <img v-if="userId == item.creatorId || superAdmin" :src="deleteIcon" class="deleteIcon" @click="deleteMessage(item.id)">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div v-if="item.comments && item.comments.total > 0" class="eachComment">
|
<!-- <div v-if="item.comments && item.comments.total > 0" class="eachComment">-->
|
||||||
<div v-if="moreMessageId == item.id">
|
<!-- <div v-if="moreMessageId == item.id">-->
|
||||||
<template v-for="(elem,j) in allCommentList">
|
<!-- <template v-for="(elem,j) in allCommentList">-->
|
||||||
<div :key="j" style="font-size: 14px;margin-top: 10px;">
|
<!-- <div :key="j" style="font-size: 14px;margin-top: 10px;">-->
|
||||||
<span style="margin-right: 5px;">{{ computedCommentName(elem) }}</span>
|
<!-- <span style="margin-right: 5px;">{{ computedCommentName(elem) }}</span>-->
|
||||||
<span style="margin-right: 15px;" v-html="$escapeHTML(`${elem.content}`)" />
|
<!-- <span style="margin-right: 15px;" v-html="$escapeHTML(`${elem.content}`)" />-->
|
||||||
<span style="margin-right: 10px;">{{ elem.commentTime }}</span>
|
<!-- <span style="margin-right: 10px;">{{ elem.commentTime }}</span>-->
|
||||||
<span class="replyLeaveMessage" @click="replyLeaveMessage(item.id, i,elem.id, elem.userNickname)">回复</span>
|
<!-- <span class="replyLeaveMessage" @click="replyLeaveMessage(item.id, i,elem.id, elem.userNickname)">回复</span>-->
|
||||||
<span v-if="userId == elem.userId || superAdmin" style="color:#409EFF;cursor: pointer;" type="text" @click="deleteComment(item.id, i, elem.id)">删除</span>
|
<!-- <span v-if="userId == elem.userId || superAdmin" style="color:#409EFF;cursor: pointer;" type="text" @click="deleteComment(item.id, i, elem.id)">删除</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div v-else>
|
<!-- <div v-else>-->
|
||||||
<template v-for="(elem,j) in item.comments.list">
|
<!-- <template v-for="(elem,j) in item.comments.list">-->
|
||||||
<div :key="j" style="font-size: 14px;margin-top: 18px;">
|
<!-- <div :key="j" style="font-size: 14px;margin-top: 18px;">-->
|
||||||
<span style="margin-right: 5px;">{{ computedCommentName(elem) }}</span>
|
<!-- <span style="margin-right: 5px;">{{ computedCommentName(elem) }}</span>-->
|
||||||
<span style="margin-right: 15px;" v-html="$escapeHTML(`${elem.content}`)" />
|
<!-- <span style="margin-right: 15px;" v-html="$escapeHTML(`${elem.content}`)" />-->
|
||||||
<span style="margin-right: 10px;">{{ elem.commentTime }}</span>
|
<!-- <span style="margin-right: 10px;">{{ elem.commentTime }}</span>-->
|
||||||
<span class="replyLeaveMessage" @click="replyLeaveMessage(item.id, i,elem.id, elem.userNickname)">回复</span>
|
<!-- <span class="replyLeaveMessage" @click="replyLeaveMessage(item.id, i,elem.id, elem.userNickname)">回复</span>-->
|
||||||
<span v-if="userId == elem.userId || superAdmin" style="color:#409EFF;cursor: pointer;" type="text" @click="deleteComment(item.id, i, elem.id)">删除</span>
|
<!-- <span v-if="userId == elem.userId || superAdmin" style="color:#409EFF;cursor: pointer;" type="text" @click="deleteComment(item.id, i, elem.id)">删除</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div v-if="item.comments.total > 3 && moreMessageId != item.id" style="margin-top: 10px;">
|
<!-- <div v-if="item.comments.total > 3 && moreMessageId != item.id" style="margin-top: 10px;">-->
|
||||||
<span class="view_more" @click="viewMoreComment(item)">{{ `共${item.comments.total}条回复,点击查看更多>>` }}</span>
|
<!-- <span class="view_more" @click="viewMoreComment(item)">{{ `共${item.comments.total}条回复,点击查看更多>>` }}</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div v-if="replyMessageId == item.id" style="width: 80%;margin-left: 10%;text-align: center;">
|
<!-- <div v-if="replyMessageId == item.id" style="width: 80%;margin-left: 10%;text-align: center;">-->
|
||||||
<quill-editor
|
<!-- <quill-editor-->
|
||||||
:ref="'answerInput' + item.id"
|
<!-- :ref="'answerInput' + item.id"-->
|
||||||
v-model="commentContent"
|
<!-- v-model="commentContent"-->
|
||||||
style="width: 80%;margin-left: 10%;margin-top: 10px;"
|
<!-- style="width: 80%;margin-left: 10%;margin-top: 10px;"-->
|
||||||
class-name="answer_input"
|
<!-- class-name="answer_input"-->
|
||||||
:margin-bottom="20"
|
<!-- :margin-bottom="20"-->
|
||||||
editor-type="onlyEmoji"
|
<!-- editor-type="onlyEmoji"-->
|
||||||
:no-handle-p="true"
|
<!-- :no-handle-p="true"-->
|
||||||
:height="100"
|
<!-- :height="100"-->
|
||||||
:placeholder="replyUserName"
|
<!-- :placeholder="replyUserName"-->
|
||||||
/>
|
<!-- />-->
|
||||||
<div>
|
<!-- <div>-->
|
||||||
<el-button type="danger" size="small" @click="commentMessage">回复</el-button>
|
<!-- <el-button type="danger" size="small" @click="commentMessage">回复</el-button>-->
|
||||||
<el-button size="small" @click="cancelComment">取消</el-button>
|
<!-- <el-button size="small" @click="cancelComment">取消</el-button>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div v-else class="empty-text">
|
<!-- <div v-else class="empty-text">-->
|
||||||
<span>暂无留言</span>
|
<!-- <span>暂无留言</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div style="width: 100%;text-align: center;">
|
<!-- <div style="width: 100%;text-align: center;">-->
|
||||||
<el-pagination
|
<!-- <el-pagination-->
|
||||||
:current-page.sync="pageNum"
|
<!-- :current-page.sync="pageNum"-->
|
||||||
:page-size="pageSize"
|
<!-- :page-size="pageSize"-->
|
||||||
layout="total, prev, pager, next,jumper"
|
<!-- layout="total, prev, pager, next,jumper"-->
|
||||||
:total="total"
|
<!-- :total="total"-->
|
||||||
@current-change="handleCurrentChange"
|
<!-- @current-change="handleCurrentChange"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<quill-editor ref="quillEditor" v-model="content" style="width: 80%;margin-left: 10%;" :margin-bottom="20" editor-type="imgEmoji" :no-handle-p="true" />
|
<!-- <quill-editor ref="quillEditor" v-model="content" style="width: 80%;margin-left: 10%;" :margin-bottom="20" editor-type="imgEmoji" :no-handle-p="true" />-->
|
||||||
<span id="boardBottom" class="dialog-footer">
|
<!-- <span id="boardBottom" class="dialog-footer">-->
|
||||||
<el-button @click="handleClear">清空</el-button>
|
<!-- <el-button @click="handleClear">清空</el-button>-->
|
||||||
<el-button type="danger" @click="commitComment">留言</el-button>
|
<!-- <el-button type="danger" @click="commitComment">留言</el-button>-->
|
||||||
</span>
|
<!-- </span>-->
|
||||||
<el-button size="mini" type="danger" class="goSlide" @click="goSlide">我要留言</el-button>
|
<!-- <el-button size="mini" type="danger" class="goSlide" @click="goSlide">我要留言</el-button>-->
|
||||||
<div v-show="imgShow" class="popUpImgView" @click="handelCloseImg">
|
<!-- <div v-show="imgShow" class="popUpImgView" @click="handelCloseImg">-->
|
||||||
<img id="targetImg" src="" class="popUpImg">
|
<!-- <img id="targetImg" src="" class="popUpImg">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
|
|
||||||
<script>
|
<!--<script>-->
|
||||||
import { answerPost, queryMessagePagingByProjectCode, deleteMessageByAdmin, deleteMessageBySelf, commentLevelMessage, commentComents,
|
<!--import { answerPost, queryMessagePagingByProjectCode, deleteMessageByAdmin, deleteMessageBySelf, commentLevelMessage, commentComents,-->
|
||||||
queryMessageCommentList, deleteCommentByAdmin, deleteCommentBySelf, getPostByProjectCode } from '@/api/learn';
|
<!-- queryMessageCommentList, deleteCommentByAdmin, deleteCommentBySelf, getPostByProjectCode } from '@/api/learn';-->
|
||||||
import lick_icon from '@/assets/like.png';
|
<!--import lick_icon from '@/assets/like.png';-->
|
||||||
import unlike_icon from '@/assets/unlike.png';
|
<!--import unlike_icon from '@/assets/unlike.png';-->
|
||||||
import reply_icon from '@/assets/reply.png';
|
<!--import reply_icon from '@/assets/reply.png';-->
|
||||||
import delete_icon from '@/assets/delete.png';
|
<!--import delete_icon from '@/assets/delete.png';-->
|
||||||
import { superAdmin } from '@/router/index';
|
<!--import { superAdmin } from '@/router/index';-->
|
||||||
import { ProjectCode } from '@/scripts/ProjectConfig';
|
<!--import { ProjectCode } from '@/scripts/ProjectConfig';-->
|
||||||
import QuillEditor from '@/components/QuillEditor/index';
|
<!--import QuillEditor from '@/components/QuillEditor/index';-->
|
||||||
export default {
|
<!--export default {-->
|
||||||
name: 'MessageBoard',
|
<!-- name: 'MessageBoard',-->
|
||||||
components: {
|
<!-- components: {-->
|
||||||
QuillEditor
|
<!-- QuillEditor-->
|
||||||
},
|
<!-- },-->
|
||||||
data() {
|
<!-- data() {-->
|
||||||
return {
|
<!-- return {-->
|
||||||
content: '',
|
<!-- content: '',-->
|
||||||
postCommentList: [],
|
<!-- postCommentList: [],-->
|
||||||
pageSize: 10,
|
<!-- pageSize: 10,-->
|
||||||
pageNum: 0,
|
<!-- pageNum: 0,-->
|
||||||
total: 0,
|
<!-- total: 0,-->
|
||||||
imgShow: false,
|
<!-- imgShow: false,-->
|
||||||
lickIcon: lick_icon,
|
<!-- lickIcon: lick_icon,-->
|
||||||
unlikeIcon: unlike_icon,
|
<!-- unlikeIcon: unlike_icon,-->
|
||||||
replyIcon: reply_icon,
|
<!-- replyIcon: reply_icon,-->
|
||||||
deleteIcon: delete_icon,
|
<!-- deleteIcon: delete_icon,-->
|
||||||
replyMessageId: '',
|
<!-- replyMessageId: '',-->
|
||||||
commentContent: '',
|
<!-- commentContent: '',-->
|
||||||
replyCommentId: '',
|
<!-- replyCommentId: '',-->
|
||||||
replyMessageIndex: '',
|
<!-- replyMessageIndex: '',-->
|
||||||
allCommentList: [],
|
<!-- allCommentList: [],-->
|
||||||
moreMessageId: '',
|
<!-- moreMessageId: '',-->
|
||||||
replyUserName: '',
|
<!-- replyUserName: '',-->
|
||||||
postId: ''
|
<!-- postId: ''-->
|
||||||
};
|
<!-- };-->
|
||||||
},
|
<!-- },-->
|
||||||
computed: {
|
<!-- computed: {-->
|
||||||
userId() {
|
<!-- userId() {-->
|
||||||
return this.$store.state.user.id;
|
<!-- return this.$store.state.user.id;-->
|
||||||
},
|
<!-- },-->
|
||||||
superAdmin() {
|
<!-- superAdmin() {-->
|
||||||
return this.$store.state.user.roles.includes(superAdmin);
|
<!-- return this.$store.state.user.roles.includes(superAdmin);-->
|
||||||
},
|
<!-- },-->
|
||||||
projectCode() {
|
<!-- projectCode() {-->
|
||||||
const project = this.$route.query.project;
|
<!-- const project = this.$route.query.project;-->
|
||||||
return ProjectCode[project];
|
<!-- return ProjectCode[project];-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
created() {
|
<!-- created() {-->
|
||||||
const that = this;
|
<!-- const that = this;-->
|
||||||
window.handleZoomImg = function () {
|
<!-- window.handleZoomImg = function () {-->
|
||||||
that.imgShow = true;
|
<!-- that.imgShow = true;-->
|
||||||
document.getElementById('targetImg').src = event.target.currentSrc;
|
<!-- document.getElementById('targetImg').src = event.target.currentSrc;-->
|
||||||
};
|
<!-- };-->
|
||||||
},
|
<!-- },-->
|
||||||
mounted() {
|
<!-- mounted() {-->
|
||||||
getPostByProjectCode(this.projectCode).then(resp => {
|
<!-- getPostByProjectCode(this.projectCode).then(resp => {-->
|
||||||
this.postId = resp.data.id;
|
<!-- this.postId = resp.data.id;-->
|
||||||
});
|
<!-- });-->
|
||||||
this.handleCurrentChange();
|
<!-- this.handleCurrentChange();-->
|
||||||
},
|
<!-- },-->
|
||||||
methods: {
|
<!-- methods: {-->
|
||||||
commitComment() {
|
<!-- commitComment() {-->
|
||||||
const images = this.content.match(/<img/g);
|
<!-- const images = this.content.match(/<img/g);-->
|
||||||
const answerContent = this.handleEmojiContent(this.content);
|
<!-- const answerContent = this.handleEmojiContent(this.content);-->
|
||||||
if (images && images.length > 3) {
|
<!-- if (images && images.length > 3) {-->
|
||||||
this.$message.error('留言内容使用图片应小于三张!');
|
<!-- this.$message.error('留言内容使用图片应小于三张!');-->
|
||||||
return;
|
<!-- return;-->
|
||||||
}
|
<!-- }-->
|
||||||
if (answerContent.length > 1000) {
|
<!-- if (answerContent.length > 1000) {-->
|
||||||
this.$message.error('留言内容超出最大长度!');
|
<!-- this.$message.error('留言内容超出最大长度!');-->
|
||||||
return;
|
<!-- return;-->
|
||||||
}
|
<!-- }-->
|
||||||
if (!answerContent) {
|
<!-- if (!answerContent) {-->
|
||||||
this.$message.error('留言内容不能为空!');
|
<!-- this.$message.error('留言内容不能为空!');-->
|
||||||
return;
|
<!-- return;-->
|
||||||
}
|
<!-- }-->
|
||||||
answerPost({postId: this.postId, content: answerContent}).then(resp => {
|
<!-- answerPost({postId: this.postId, content: answerContent}).then(resp => {-->
|
||||||
this.pageNum = 1;
|
<!-- this.pageNum = 1;-->
|
||||||
this.handleCurrentChange();
|
<!-- this.handleCurrentChange();-->
|
||||||
this.content = '';
|
<!-- this.content = '';-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('留言失败 !');
|
<!-- this.$message.error('留言失败 !');-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
handleCurrentChange() {
|
<!-- handleCurrentChange() {-->
|
||||||
queryMessagePagingByProjectCode(this.projectCode, {pageSize: this.pageSize, pageNum: this.pageNum}).then(resp => {
|
<!-- queryMessagePagingByProjectCode(this.projectCode, {pageSize: this.pageSize, pageNum: this.pageNum}).then(resp => {-->
|
||||||
this.postCommentList = [];
|
<!-- this.postCommentList = [];-->
|
||||||
(resp.data.list || []).forEach(item => {
|
<!-- (resp.data.list || []).forEach(item => {-->
|
||||||
item.content = this.replaceEmoji(item.content);
|
<!-- item.content = this.replaceEmoji(item.content);-->
|
||||||
item.comments && item.comments.list && item.comments.list.forEach(elem => {
|
<!-- item.comments && item.comments.list && item.comments.list.forEach(elem => {-->
|
||||||
elem.content = this.replaceEmoji(elem.content);
|
<!-- elem.content = this.replaceEmoji(elem.content);-->
|
||||||
});
|
<!-- });-->
|
||||||
this.postCommentList.push(item);
|
<!-- this.postCommentList.push(item);-->
|
||||||
});
|
<!-- });-->
|
||||||
this.total = resp.data.total;
|
<!-- this.total = resp.data.total;-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
replaceEmoji(content) {
|
<!-- replaceEmoji(content) {-->
|
||||||
let value = content.replace(/<img/g, '<img style="width: 100px;height: auto;cursor: zoom-in;" onclick="handleZoomImg()"');
|
<!-- let value = content.replace(/<img/g, '<img style="width: 100px;height: auto;cursor: zoom-in;" onclick="handleZoomImg()"');-->
|
||||||
const list = value.match(/<<<([^>]*)>>>/g);
|
<!-- const list = value.match(/<<<([^>]*)>>>/g);-->
|
||||||
(list || []).forEach(elem => {
|
<!-- (list || []).forEach(elem => {-->
|
||||||
const targetValue = elem.substring(3, elem.length - 3);
|
<!-- const targetValue = elem.substring(3, elem.length - 3);-->
|
||||||
value = value.replace(elem, `<span class="ql-emojiblot" data-name="${targetValue}"><span contenteditable="false"><span class="ap ap-${targetValue}">ss</span></span></span>`);
|
<!-- value = value.replace(elem, `<span class="ql-emojiblot" data-name="${targetValue}"><span contenteditable="false"><span class="ap ap-${targetValue}">ss</span></span></span>`);-->
|
||||||
});
|
<!-- });-->
|
||||||
return value;
|
<!-- return value;-->
|
||||||
},
|
<!-- },-->
|
||||||
goSlide() {
|
<!-- goSlide() {-->
|
||||||
const bottom = document.getElementById('boardBottom');
|
<!-- const bottom = document.getElementById('boardBottom');-->
|
||||||
const element = document.getElementById('elDialog').childNodes[0];
|
<!-- const element = document.getElementById('elDialog').childNodes[0];-->
|
||||||
element.scrollTop = bottom.offsetTop;
|
<!-- element.scrollTop = bottom.offsetTop;-->
|
||||||
this.$refs.quillEditor.getFocus();
|
<!-- this.$refs.quillEditor.getFocus();-->
|
||||||
},
|
<!-- },-->
|
||||||
avatarUrl(val) {
|
<!-- avatarUrl(val) {-->
|
||||||
if (val && val.creatorAvatarPath) {
|
<!-- if (val && val.creatorAvatarPath) {-->
|
||||||
return this.$store.state.user.ossUrl + val.creatorAvatarPath;
|
<!-- return this.$store.state.user.ossUrl + val.creatorAvatarPath;-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
return 'https://joylink.club/oss/wxmicro_assistant/userhead/defaultuser.png';
|
<!-- return 'https://joylink.club/oss/wxmicro_assistant/userhead/defaultuser.png';-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
|
|
||||||
handleClear() {
|
<!-- handleClear() {-->
|
||||||
this.content = '';
|
<!-- this.content = '';-->
|
||||||
},
|
<!-- },-->
|
||||||
handelCloseImg() {
|
<!-- handelCloseImg() {-->
|
||||||
this.imgShow = false;
|
<!-- this.imgShow = false;-->
|
||||||
document.getElementById('targetImg').src = '';
|
<!-- document.getElementById('targetImg').src = '';-->
|
||||||
},
|
<!-- },-->
|
||||||
replyLeaveMessage(messageId, messageIndex, commentId, userNickname) {
|
<!-- replyLeaveMessage(messageId, messageIndex, commentId, userNickname) {-->
|
||||||
this.cancelComment();
|
<!-- this.cancelComment();-->
|
||||||
this.replyMessageId = messageId;
|
<!-- this.replyMessageId = messageId;-->
|
||||||
this.replyCommentId = commentId;
|
<!-- this.replyCommentId = commentId;-->
|
||||||
this.replyMessageIndex = messageIndex;
|
<!-- this.replyMessageIndex = messageIndex;-->
|
||||||
if (commentId) {
|
<!-- if (commentId) {-->
|
||||||
this.replyUserName = '@' + userNickname + ' ';
|
<!-- this.replyUserName = '@' + userNickname + ' ';-->
|
||||||
this.commentContent = '';
|
<!-- this.commentContent = '';-->
|
||||||
}
|
<!-- }-->
|
||||||
this.$nextTick(()=>{
|
<!-- this.$nextTick(()=>{-->
|
||||||
this.$refs['answerInput' + messageId][0].getFocus();
|
<!-- this.$refs['answerInput' + messageId][0].getFocus();-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
cancelComment() {
|
<!-- cancelComment() {-->
|
||||||
this.replyMessageId = '';
|
<!-- this.replyMessageId = '';-->
|
||||||
this.commentContent = '';
|
<!-- this.commentContent = '';-->
|
||||||
this.replyCommentId = '';
|
<!-- this.replyCommentId = '';-->
|
||||||
this.replyMessageIndex = '';
|
<!-- this.replyMessageIndex = '';-->
|
||||||
this.replyUserName = '';
|
<!-- this.replyUserName = '';-->
|
||||||
},
|
<!-- },-->
|
||||||
commentMessage() {
|
<!-- commentMessage() {-->
|
||||||
const contentValue = this.handleEmojiContent(this.commentContent);
|
<!-- const contentValue = this.handleEmojiContent(this.commentContent);-->
|
||||||
if (contentValue.length > 300) {
|
<!-- if (contentValue.length > 300) {-->
|
||||||
this.$message.error('回复内容超出最大长度!');
|
<!-- this.$message.error('回复内容超出最大长度!');-->
|
||||||
return;
|
<!-- return;-->
|
||||||
}
|
<!-- }-->
|
||||||
if (this.replyCommentId) {
|
<!-- if (this.replyCommentId) {-->
|
||||||
commentComents(this.replyMessageId, this.replyCommentId, {content:contentValue}).then(resp => {
|
<!-- commentComents(this.replyMessageId, this.replyCommentId, {content:contentValue}).then(resp => {-->
|
||||||
this.getCommentList(this.replyMessageId, this.replyMessageIndex);
|
<!-- this.getCommentList(this.replyMessageId, this.replyMessageIndex);-->
|
||||||
this.cancelComment();
|
<!-- this.cancelComment();-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('评论回复失败!');
|
<!-- this.$message.error('评论回复失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
commentLevelMessage(this.replyMessageId, {content:contentValue}).then(resp => {
|
<!-- commentLevelMessage(this.replyMessageId, {content:contentValue}).then(resp => {-->
|
||||||
this.getCommentList(this.replyMessageId, this.replyMessageIndex);
|
<!-- this.getCommentList(this.replyMessageId, this.replyMessageIndex);-->
|
||||||
this.cancelComment();
|
<!-- this.cancelComment();-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('评论回复失败!');
|
<!-- this.$message.error('评论回复失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
getCommentList(messageId, messageIndex) {
|
<!-- getCommentList(messageId, messageIndex) {-->
|
||||||
queryMessageCommentList(messageId).then(resp => {
|
<!-- queryMessageCommentList(messageId).then(resp => {-->
|
||||||
const replaceValue = [];
|
<!-- const replaceValue = [];-->
|
||||||
resp.data && resp.data.forEach(item => {
|
<!-- resp.data && resp.data.forEach(item => {-->
|
||||||
item.content = this.replaceEmoji(item.content);
|
<!-- item.content = this.replaceEmoji(item.content);-->
|
||||||
replaceValue.push(item);
|
<!-- replaceValue.push(item);-->
|
||||||
});
|
<!-- });-->
|
||||||
if (this.moreMessageId == messageId) {
|
<!-- if (this.moreMessageId == messageId) {-->
|
||||||
this.allCommentList = replaceValue;
|
<!-- this.allCommentList = replaceValue;-->
|
||||||
}
|
<!-- }-->
|
||||||
if (replaceValue.length > 3) {
|
<!-- if (replaceValue.length > 3) {-->
|
||||||
this.postCommentList[messageIndex].comments.list = replaceValue.slice(0, 3);
|
<!-- this.postCommentList[messageIndex].comments.list = replaceValue.slice(0, 3);-->
|
||||||
this.postCommentList[messageIndex].comments.total = replaceValue.length;
|
<!-- this.postCommentList[messageIndex].comments.total = replaceValue.length;-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
this.postCommentList[messageIndex].comments.list = replaceValue;
|
<!-- this.postCommentList[messageIndex].comments.list = replaceValue;-->
|
||||||
this.postCommentList[messageIndex].comments.total = replaceValue.length;
|
<!-- this.postCommentList[messageIndex].comments.total = replaceValue.length;-->
|
||||||
}
|
<!-- }-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('更新回复失败!');
|
<!-- this.$message.error('更新回复失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
computedCommentName(elem) {
|
<!-- computedCommentName(elem) {-->
|
||||||
if (elem.replyUserNickName) {
|
<!-- if (elem.replyUserNickName) {-->
|
||||||
return `${elem.userNickname} 回复@ ${elem.replyUserNickName}:`;
|
<!-- return `${elem.userNickname} 回复@ ${elem.replyUserNickName}:`;-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
return elem.userNickname + ':';
|
<!-- return elem.userNickname + ':';-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
deleteMessage(messageId) {
|
<!-- deleteMessage(messageId) {-->
|
||||||
if (this.superAdmin) {
|
<!-- if (this.superAdmin) {-->
|
||||||
deleteMessageByAdmin(messageId).then(resp => {
|
<!-- deleteMessageByAdmin(messageId).then(resp => {-->
|
||||||
// this.$message.success('删除留言成功!');
|
<!-- // this.$message.success('删除留言成功!');-->
|
||||||
this.handleCurrentChange();
|
<!-- this.handleCurrentChange();-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('删除留言失败!');
|
<!-- this.$message.error('删除留言失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
deleteMessageBySelf(messageId).then(resp => {
|
<!-- deleteMessageBySelf(messageId).then(resp => {-->
|
||||||
// this.$message.success('删除留言成功!');
|
<!-- // this.$message.success('删除留言成功!');-->
|
||||||
this.handleCurrentChange();
|
<!-- this.handleCurrentChange();-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('删除留言失败!');
|
<!-- this.$message.error('删除留言失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
deleteComment(messageId, messageIndex, commentId) {
|
<!-- deleteComment(messageId, messageIndex, commentId) {-->
|
||||||
if (this.superAdmin) {
|
<!-- if (this.superAdmin) {-->
|
||||||
deleteCommentByAdmin(commentId).then(resp => {
|
<!-- deleteCommentByAdmin(commentId).then(resp => {-->
|
||||||
this.getCommentList(messageId, messageIndex);
|
<!-- this.getCommentList(messageId, messageIndex);-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('删除回复失败!');
|
<!-- this.$message.error('删除回复失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
deleteCommentBySelf(commentId).then(resp => {
|
<!-- deleteCommentBySelf(commentId).then(resp => {-->
|
||||||
this.getCommentList(messageId, messageIndex);
|
<!-- this.getCommentList(messageId, messageIndex);-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error('删除回复失败!');
|
<!-- this.$message.error('删除回复失败!');-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
viewMoreComment(data) {
|
<!-- viewMoreComment(data) {-->
|
||||||
queryMessageCommentList(data.id).then(resp => {
|
<!-- queryMessageCommentList(data.id).then(resp => {-->
|
||||||
this.allCommentList = [];
|
<!-- this.allCommentList = [];-->
|
||||||
resp.data && resp.data.forEach(item => {
|
<!-- resp.data && resp.data.forEach(item => {-->
|
||||||
item.content = this.replaceEmoji(item.content);
|
<!-- item.content = this.replaceEmoji(item.content);-->
|
||||||
this.allCommentList.push(item);
|
<!-- this.allCommentList.push(item);-->
|
||||||
});
|
<!-- });-->
|
||||||
this.moreMessageId = data.id;
|
<!-- this.moreMessageId = data.id;-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
console.error(error);
|
<!-- console.error(error);-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
handleEmojiContent(content) {
|
<!-- handleEmojiContent(content) {-->
|
||||||
const list = content.match(/<span class="ql-emojiblot" data-name="(\S*)"><span contenteditable="false"><span class="ap ap-(\S*)<\/span><\/span><\/span>/g);
|
<!-- const list = content.match(/<span class="ql-emojiblot" data-name="(\S*)"><span contenteditable="false"><span class="ap ap-(\S*)<\/span><\/span><\/span>/g);-->
|
||||||
(list || []).forEach(item => {
|
<!-- (list || []).forEach(item => {-->
|
||||||
let targetValue = item.split(' ')[2];
|
<!-- let targetValue = item.split(' ')[2];-->
|
||||||
targetValue = targetValue.substring(11, targetValue.length - 8);
|
<!-- targetValue = targetValue.substring(11, targetValue.length - 8);-->
|
||||||
content = content.replace(item, '<<<' + targetValue + '>>>');
|
<!-- content = content.replace(item, '<<<' + targetValue + '>>>');-->
|
||||||
});
|
<!-- });-->
|
||||||
return content;
|
<!-- return content;-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
};
|
<!--};-->
|
||||||
</script>
|
<!--</script>-->
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<!--<style lang="scss" scoped>-->
|
||||||
.dialog-footer{
|
<!-- .dialog-footer{-->
|
||||||
margin: 0 auto;
|
<!-- margin: 0 auto;-->
|
||||||
padding: 10px 0 30px;
|
<!-- padding: 10px 0 30px;-->
|
||||||
display: flex;
|
<!-- display: flex;-->
|
||||||
justify-content: center;
|
<!-- justify-content: center;-->
|
||||||
}
|
<!-- }-->
|
||||||
.empty-text{
|
<!-- .empty-text{-->
|
||||||
text-align: center;
|
<!-- text-align: center;-->
|
||||||
width: 100%;
|
<!-- width: 100%;-->
|
||||||
height: 50px;
|
<!-- height: 50px;-->
|
||||||
line-height: 50px;
|
<!-- line-height: 50px;-->
|
||||||
font-size: 18px;
|
<!-- font-size: 18px;-->
|
||||||
color: #ccc;
|
<!-- color: #ccc;-->
|
||||||
}
|
<!-- }-->
|
||||||
.head_portrait{
|
<!-- .head_portrait{-->
|
||||||
width: 50px;
|
<!-- width: 50px;-->
|
||||||
height: 50px;
|
<!-- height: 50px;-->
|
||||||
border-radius: 25px;
|
<!-- border-radius: 25px;-->
|
||||||
}
|
<!-- }-->
|
||||||
.view_more {
|
<!-- .view_more {-->
|
||||||
cursor: pointer;
|
<!-- cursor: pointer;-->
|
||||||
}
|
<!-- }-->
|
||||||
.view_more:hover {
|
<!-- .view_more:hover {-->
|
||||||
cursor: pointer;
|
<!-- cursor: pointer;-->
|
||||||
color: #409EFF;
|
<!-- color: #409EFF;-->
|
||||||
}
|
<!-- }-->
|
||||||
.img-box{
|
<!-- .img-box{-->
|
||||||
width: 100px;
|
<!-- width: 100px;-->
|
||||||
height: auto;
|
<!-- height: auto;-->
|
||||||
}
|
<!-- }-->
|
||||||
.message-board-box{
|
<!-- .message-board-box{-->
|
||||||
width: 100%;
|
<!-- width: 100%;-->
|
||||||
background-image:url('../../../assets/bg_board.jpg');
|
<!-- background-image:url('../../../assets/bg_board.jpg');-->
|
||||||
background-size: 100% 100%;
|
<!-- background-size: 100% 100%;-->
|
||||||
min-height: 100%;
|
<!-- min-height: 100%;-->
|
||||||
position: absolute;
|
<!-- position: absolute;-->
|
||||||
left: 0;
|
<!-- left: 0;-->
|
||||||
top: 0;
|
<!-- top: 0;-->
|
||||||
z-index: 18;
|
<!-- z-index: 18;-->
|
||||||
}
|
<!-- }-->
|
||||||
/deep/.ql-container{
|
<!-- /deep/.ql-container{-->
|
||||||
height: 80%;
|
<!-- height: 80%;-->
|
||||||
}
|
<!-- }-->
|
||||||
.message-board-title{
|
<!-- .message-board-title{-->
|
||||||
font-size: 30px;
|
<!-- font-size: 30px;-->
|
||||||
color: #F00;
|
<!-- color: #F00;-->
|
||||||
font-family: 'fangsong';
|
<!-- font-family: 'fangsong';-->
|
||||||
font-weight: bolder;
|
<!-- font-weight: bolder;-->
|
||||||
width: 100%;
|
<!-- width: 100%;-->
|
||||||
text-align: center;
|
<!-- text-align: center;-->
|
||||||
height: 80px;
|
<!-- height: 80px;-->
|
||||||
line-height: 80px;
|
<!-- line-height: 80px;-->
|
||||||
}
|
<!-- }-->
|
||||||
.message-board-content{
|
<!-- .message-board-content{-->
|
||||||
width: 80%;
|
<!-- width: 80%;-->
|
||||||
margin-left: 10%;
|
<!-- margin-left: 10%;-->
|
||||||
padding: 20px;
|
<!-- padding: 20px;-->
|
||||||
margin-bottom: 20px;
|
<!-- margin-bottom: 20px;-->
|
||||||
background-color: rgba(255,255,255,0);
|
<!-- background-color: rgba(255,255,255,0);-->
|
||||||
border: 1px solid #ebeef5;
|
<!-- border: 1px solid #ebeef5;-->
|
||||||
border-radius: 4px;
|
<!-- border-radius: 4px;-->
|
||||||
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
|
<!-- box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);-->
|
||||||
}
|
<!-- }-->
|
||||||
.eachPostComment{
|
<!-- .eachPostComment{-->
|
||||||
border: 1px solid #C0C0C0;
|
<!-- border: 1px solid #C0C0C0;-->
|
||||||
border-radius: 5px;
|
<!-- border-radius: 5px;-->
|
||||||
margin-bottom: 20px;
|
<!-- margin-bottom: 20px;-->
|
||||||
box-shadow: 2px 2px 3px #808080;
|
<!-- box-shadow: 2px 2px 3px #808080;-->
|
||||||
padding: 10px 20px;
|
<!-- padding: 10px 20px;-->
|
||||||
background-color: #fff
|
<!-- background-color: #fff-->
|
||||||
}
|
<!-- }-->
|
||||||
.eachComment{
|
<!-- .eachComment{-->
|
||||||
background: #F5F5F5;
|
<!-- background: #F5F5F5;-->
|
||||||
margin-top: 10px;
|
<!-- margin-top: 10px;-->
|
||||||
width: calc(100% - 120px);
|
<!-- width: calc(100% - 120px);-->
|
||||||
margin-left: 60px;
|
<!-- margin-left: 60px;-->
|
||||||
border-radius: 5px;
|
<!-- border-radius: 5px;-->
|
||||||
padding: 1px 10px 10px;
|
<!-- padding: 1px 10px 10px;-->
|
||||||
}
|
<!-- }-->
|
||||||
.replyLeaveMessage{color:#409EFF;cursor: pointer;margin-right: 10px;}
|
<!-- .replyLeaveMessage{color:#409EFF;cursor: pointer;margin-right: 10px;}-->
|
||||||
.MBCcreatorNickName{display: inline-block;margin-right: 20px;margin-left:10px;font-size: 18px;color: #000;}
|
<!-- .MBCcreatorNickName{display: inline-block;margin-right: 20px;margin-left:10px;font-size: 18px;color: #000;}-->
|
||||||
.replyIcon{width: 16px;height: auto;margin-right: 30px;cursor: pointer;}
|
<!-- .replyIcon{width: 16px;height: auto;margin-right: 30px;cursor: pointer;}-->
|
||||||
.deleteIcon{width: 16px;height: auto;cursor:pointer;}
|
<!-- .deleteIcon{width: 16px;height: auto;cursor:pointer;}-->
|
||||||
.goSlide{position: fixed; left: 91%;top: 80px;width: 90px;}
|
<!-- .goSlide{position: fixed; left: 91%;top: 80px;width: 90px;}-->
|
||||||
.popUpImgView{position: fixed;width: 100%;height: 100%;left: 0;top: 0;background: rgba(0,0,0,0.5);cursor: zoom-out;}
|
<!-- .popUpImgView{position: fixed;width: 100%;height: 100%;left: 0;top: 0;background: rgba(0,0,0,0.5);cursor: zoom-out;}-->
|
||||||
.popUpImg{position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);min-width: 500px;max-height: 80%;height: auto;}
|
<!-- .popUpImg{position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);min-width: 500px;max-height: 80%;height: auto;}-->
|
||||||
</style>
|
<!--</style>-->
|
||||||
<style>
|
<!--<style>-->
|
||||||
.ql-size-small {
|
<!--.ql-size-small {-->
|
||||||
font-size: 0.75em;
|
<!-- font-size: 0.75em;-->
|
||||||
}
|
<!--}-->
|
||||||
.ql-size-large{
|
<!--.ql-size-large{-->
|
||||||
font-size: 1.5em;
|
<!-- font-size: 1.5em;-->
|
||||||
}
|
<!--}-->
|
||||||
.ql-size-huge{
|
<!--.ql-size-huge{-->
|
||||||
font-size: 2.5em;
|
<!-- font-size: 2.5em;-->
|
||||||
}
|
<!--}-->
|
||||||
</style>
|
<!--</style>-->
|
||||||
|
141
src/views/newMap/display/newChat/addressBook.vue
Normal file
141
src/views/newMap/display/newChat/addressBook.vue
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
<template>
|
||||||
|
<div class="main">
|
||||||
|
<div class="left">
|
||||||
|
<div class="searchBox">
|
||||||
|
<el-input v-model="queryMember" placeholder="请输入搜索人员" clearable size="medium">
|
||||||
|
<el-button slot="append" icon="el-icon-search" />
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div class="treeBox">
|
||||||
|
<el-tree
|
||||||
|
ref="tree"
|
||||||
|
:data="memberTreeData"
|
||||||
|
node-key="id"
|
||||||
|
:props="defaultProps"
|
||||||
|
:default-expand-all="false"
|
||||||
|
:filter-node-method="filterNode"
|
||||||
|
@node-click="nodeClick"
|
||||||
|
>
|
||||||
|
<span slot-scope="{ data }" class="custom-tree-node">
|
||||||
|
<span>{{ data.labelName }}</span>
|
||||||
|
</span>
|
||||||
|
</el-tree>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<el-form ref="form" :model="activeNode" label-width="80px" size="small">
|
||||||
|
<el-form-item v-if="activeNode.labelName" :label="activeNode.type? '名称:': '部门:'">
|
||||||
|
<span>{{ activeNode.labelName }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="activeNode.type" label="部门:">
|
||||||
|
<span>{{ activeNode.typeName }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="activeNode.children" label="人数:">
|
||||||
|
<span>{{ activeNode.children.length }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="showSendBtn">
|
||||||
|
<el-button type="primary" style="width: 200px;" @click="sendPrivateMsg">发消息</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'AddressBook',
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
memberTreeData: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeTrains: [],
|
||||||
|
queryMember: '',
|
||||||
|
defaultProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'labelName'
|
||||||
|
},
|
||||||
|
activeNode: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
memberData() {
|
||||||
|
return this.$store.state.training.memberData;
|
||||||
|
},
|
||||||
|
showSendBtn() {
|
||||||
|
let s = false;
|
||||||
|
if (this.activeNode.type) {
|
||||||
|
s = true;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
queryMember(val) {
|
||||||
|
this.$refs.tree.filter(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
sendPrivateMsg() {
|
||||||
|
this.$emit('sendPrivateMsg', this.activeNode);
|
||||||
|
},
|
||||||
|
nodeClick(data, node) {
|
||||||
|
this.activeNode = { ...data };
|
||||||
|
if (node.isLeaf) {
|
||||||
|
this.activeNode.typeName = node.parent.data.labelName;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filterNode(value, data) {
|
||||||
|
let flag = false;
|
||||||
|
if (this.memberData[data.id] && this.memberData[data.id].nickName) {
|
||||||
|
flag = this.memberData[data.id].nickName.indexOf(value) !== -1;
|
||||||
|
}
|
||||||
|
let driverNoShow = true;
|
||||||
|
if (data.type && data.type === 'DRIVER' && !this.activeTrains.includes(data.deviceCode)) {
|
||||||
|
driverNoShow = false;
|
||||||
|
}
|
||||||
|
return (data.labelName.indexOf(value) !== -1 || flag) && driverNoShow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
.main {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
.left{
|
||||||
|
width: 300px;
|
||||||
|
.searchBox {
|
||||||
|
padding: 2px 5px;
|
||||||
|
}
|
||||||
|
.treeBox {
|
||||||
|
height: calc(100% - 40px);
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
height: 100%;
|
||||||
|
width: calc(100% - 300px);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
border-left: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -27,8 +27,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="chat-box-footer">
|
<div class="chat-box-footer">
|
||||||
<el-input v-model="textContent" size="small" placeholder="请输入会话文字,点击T发送" style="flex: 1; margin-left: 5px;" :rows="1" />
|
<el-input v-model="textContent" size="small" placeholder="请输入会话文字,点击T发送" style="flex: 1; margin-left: 5px;" :rows="1" />
|
||||||
<el-button :id="sendTextId" size="mini" class="chat-box-footer-create" :disabled="contentSend || !id" @click="sendText">T</el-button>
|
<el-button :id="sendTextId" size="mini" class="chat-box-footer-create" :disabled="contentSend || (!id && !privateChatId)" @click="sendText">T</el-button>
|
||||||
<el-button :id="recordVoice" class="chat-box-footer-create chat-box-footer-send" :class="{'active': recordSending}" :disabled="audioPlay || (trainingDesign && !trainingSwitch) || !id" size="mini" type="primary" @click="startRecording()">
|
<el-button :id="recordVoice" class="chat-box-footer-create chat-box-footer-send" :class="{'active': recordSending}" :disabled="audioPlay || (trainingDesign && !trainingSwitch) || (!id && !privateChatId)" size="mini" type="primary" @click="startRecording()">
|
||||||
<el-progress id="voice_progress_bar" type="circle" :show-text="false" :percentage="100/maxSeconds*seconds" :width="40" :stroke-width="2" status="success" />
|
<el-progress id="voice_progress_bar" type="circle" :show-text="false" :percentage="100/maxSeconds*seconds" :width="40" :stroke-width="2" status="success" />
|
||||||
<i v-if="recordSending" class="el-icon-close close_icon" @click.stop="cancelRecording()" />
|
<i v-if="recordSending" class="el-icon-close close_icon" @click.stop="cancelRecording()" />
|
||||||
<span class="iconfont icon-yuyin"></span>
|
<span class="iconfont icon-yuyin"></span>
|
||||||
@ -58,6 +58,10 @@ export default {
|
|||||||
groupName: {
|
groupName: {
|
||||||
type: String,
|
type: String,
|
||||||
required:true
|
required:true
|
||||||
|
},
|
||||||
|
privateChatId: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -130,6 +134,7 @@ export default {
|
|||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.contentDom.onscroll = null;
|
this.contentDom.onscroll = null;
|
||||||
|
this.contentDom = '';
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setIsBottomFn() {
|
setIsBottomFn() {
|
||||||
@ -189,7 +194,7 @@ export default {
|
|||||||
return name;
|
return name;
|
||||||
},
|
},
|
||||||
sendText() {
|
sendText() {
|
||||||
if (!this.id || !this.textContent) { return; }
|
if ((!this.id && !this.privateChatId) || !this.textContent) { return; }
|
||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
cmdType: CMD.Conversation.CMD_Conversation_Group_Text_Chat,
|
cmdType: CMD.Conversation.CMD_Conversation_Group_Text_Chat,
|
||||||
@ -201,6 +206,11 @@ export default {
|
|||||||
content: this.textContent
|
content: this.textContent
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
if (this.privateChatId) {
|
||||||
|
operate.cmdType = CMD.Conversation.CMD_Conversation_Group_Private_Text_Chat;
|
||||||
|
delete operate.param.id;
|
||||||
|
operate.param.memberId = this.privateChatId;
|
||||||
|
}
|
||||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.textContent = '';
|
this.textContent = '';
|
||||||
@ -237,6 +247,11 @@ export default {
|
|||||||
fileBase64Str: BaseURL
|
fileBase64Str: BaseURL
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
if (that.privateChatId) {
|
||||||
|
operate.cmdType = CMD.Conversation.CMD_Conversation_Group_Private_Audio_Base64;
|
||||||
|
delete operate.param.id;
|
||||||
|
operate.param.memberId = that.privateChatId;
|
||||||
|
}
|
||||||
that.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
that.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
that.textContent = '';
|
that.textContent = '';
|
||||||
@ -322,6 +337,10 @@ export default {
|
|||||||
id: this.id
|
id: this.id
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
if (this.privateChatId) {
|
||||||
|
delete operate.param.id;
|
||||||
|
operate.param.memberId = this.privateChatId;
|
||||||
|
}
|
||||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.audioPlay = true;
|
this.audioPlay = true;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dialogBody">
|
<div class="dialogBody">
|
||||||
<div v-show="false" class="leftBox">
|
<div class="leftBox">
|
||||||
<div class="leftLogo">
|
<div class="leftLogo">
|
||||||
<img :src="logoImgUrl" :alt="logoImgUrl">
|
<img :src="logoImgUrl" :alt="logoImgUrl">
|
||||||
</div>
|
</div>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
<div class="tabLabel">{{ item.label }}</div>
|
<div class="tabLabel">{{ item.label }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="tabActive==0" class="contentBox">
|
<div v-show="tabActive==0" class="contentBox">
|
||||||
<div class="middle">
|
<div class="middle">
|
||||||
<div class="middleTop">
|
<div class="middleTop">
|
||||||
<div v-for="(item, index) in filterTab" :key="index" class="filterType pointer" :class="{active: index === filterActive}" @click="filterClick(index)">
|
<div v-for="(item, index) in filterTab" :key="index" class="filterType pointer" :class="{active: index === filterActive}" @click="filterClick(index)">
|
||||||
@ -39,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="middleMain">
|
<div class="middleMain">
|
||||||
<div v-for="(item, index) in groupList" :key="index" class="row pointer" :class="{active: item.id === id}" @click="groupClick(item)">
|
<div v-for="(item, index) in groupList" :ref="'dom'+index" :key="index" class="row pointer" :class="{active: item.id === id || (privateChatId && privateChatId == getPrivateChatId(item))}" @click="groupClick(item)" @contextmenu.prevent.stop="showMenu($event,item)">
|
||||||
<div v-show="false" class="groupIcon">
|
<div v-show="false" class="groupIcon">
|
||||||
<img :src="getImgUrl(item.imageUrl)" alt="">
|
<img :src="getImgUrl(item.imageUrl)" alt="">
|
||||||
</div>
|
</div>
|
||||||
@ -56,28 +56,37 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<chat-content :id="id" :group-name="groupName" :message-list="activeMessageList" />
|
<chat-content v-if="id || privateChatId" :id="id" :group-name="activeGroupName" :private-chat-id="privateChatId" :message-list="activeMessageList" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="tabActive==1">文档</div>
|
<div v-show="tabActive==1" class="contentBox">
|
||||||
<div v-else-if="tabActive==2">工作台</div>
|
<address-book ref="addressBook" :member-tree-data="memberTreeData" @sendPrivateMsg="sendPrivateMsg" />
|
||||||
<div v-else-if="tabActive==3">通讯录</div>
|
|
||||||
</div>
|
</div>
|
||||||
<edit-group ref="editGroup" />
|
</div>
|
||||||
|
<edit-group ref="editGroup" :member-tree-data="memberTreeData" />
|
||||||
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
|
<dialog-member ref="dialogMember" :member-tree-data="memberTreeData" @updateLeaderId="updateLeaderId" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapGetters} from 'vuex';
|
import {mapGetters} from 'vuex';
|
||||||
import { getGroupList, setGroupReadMessage } from '@/api/newChat';
|
import { getGroupList, setGroupReadMessage, updateGroupName, updateGroupLeader } from '@/api/newChat';
|
||||||
import { timestampFormat } from '@/utils/date';
|
import { timestampFormat } from '@/utils/date';
|
||||||
import ChatContent from './chatContent';
|
import ChatContent from './chatContent';
|
||||||
import EditGroup from './editGroup';
|
import EditGroup from './editGroup';
|
||||||
|
import AddressBook from './addressBook';
|
||||||
|
import PopMenu from '@/components/PopMenu';
|
||||||
|
import DialogMember from './dialogMember';
|
||||||
|
import { objectIsEqual } from '@/utils/date';
|
||||||
export default {
|
export default {
|
||||||
name: '',
|
name: 'ChatDialog',
|
||||||
components: {
|
components: {
|
||||||
ChatContent,
|
ChatContent,
|
||||||
EditGroup
|
EditGroup,
|
||||||
|
AddressBook,
|
||||||
|
PopMenu,
|
||||||
|
DialogMember
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
||||||
@ -88,8 +97,6 @@ export default {
|
|||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
tabs: [
|
tabs: [
|
||||||
{label:'消息', icon:'el-icon-chat-dot-square'},
|
{label:'消息', icon:'el-icon-chat-dot-square'},
|
||||||
{label:'文档', icon:'el-icon-document'},
|
|
||||||
{label:'工作台', icon:'el-icon-menu'},
|
|
||||||
{label:'通讯录', icon:'el-icon-notebook-1'}
|
{label:'通讯录', icon:'el-icon-notebook-1'}
|
||||||
],
|
],
|
||||||
tabActive: 0,
|
tabActive: 0,
|
||||||
@ -101,11 +108,10 @@ export default {
|
|||||||
// {label: '群聊', value: ''}
|
// {label: '群聊', value: ''}
|
||||||
],
|
],
|
||||||
filterActive: 0,
|
filterActive: 0,
|
||||||
groupList: [
|
groupList: [],
|
||||||
// {name: '分公司领导', imageUrl: '', memberList:[], messageList: [{content: '控制中心消息:【I 类】', time: '2023-04-20 15:08:55'}]},
|
id: 0, // 当前的群组id
|
||||||
// {name: '集团公司', imageUrl: '', memberList:[],messageList: [{content: '【演练结束】2号线二期:14:58 Y04列车演练结束', time: '2023-04-20 15:08:55'}], isMute: true}
|
privateChatId: '', // 私聊角色id
|
||||||
],
|
menu: [] // 右键菜单
|
||||||
id: 0 // 当前的群组id
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -116,35 +122,54 @@ export default {
|
|||||||
myMemberId() {
|
myMemberId() {
|
||||||
return this.$store.state.training.myMemberId;
|
return this.$store.state.training.myMemberId;
|
||||||
},
|
},
|
||||||
|
memberList() {
|
||||||
|
return this.$store.state.training.memberList;
|
||||||
|
},
|
||||||
memberData() {
|
memberData() {
|
||||||
return this.$store.state.training.memberData;
|
return this.$store.state.training.memberData;
|
||||||
},
|
},
|
||||||
|
totalUnread() {
|
||||||
|
let n = 0;
|
||||||
|
this.groupList.forEach(item => {
|
||||||
|
n += this.getBadge(item.messageList);
|
||||||
|
});
|
||||||
|
return n;
|
||||||
|
},
|
||||||
activeMessageList() {
|
activeMessageList() {
|
||||||
let list = [];
|
let list = [];
|
||||||
const find = this.groupList.find(item => {
|
const find = this.groupList.find(item => {
|
||||||
return item.id == this.id;
|
return item.id == this.id || (this.privateChatId && this.privateChatId == this.getPrivateChatId(item));
|
||||||
});
|
});
|
||||||
if (find) {
|
if (find) {
|
||||||
list = find.messageList;
|
list = find.messageList;
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
groupName() {
|
activeGroupName() {
|
||||||
let name = '';
|
let name = '';
|
||||||
|
if (this.privateChatId) {
|
||||||
|
const m = this.memberData[this.privateChatId];
|
||||||
|
if (m) {
|
||||||
|
name = m.labelName;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
const find = this.groupList.find(item => {
|
const find = this.groupList.find(item => {
|
||||||
return item.id == this.id;
|
return item.id == this.id;
|
||||||
});
|
});
|
||||||
if (find) {
|
if (find) {
|
||||||
name = this.getGroupName(find);
|
name = this.getGroupName(find);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return name;
|
return name;
|
||||||
|
},
|
||||||
|
memberTreeData() {
|
||||||
|
return this.$store.state.training.memberTreeData;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.socket.simulationReset': function (val) { // 仿真重置
|
'$store.state.socket.simulationReset': function (val) { // 仿真重置
|
||||||
if (val) {
|
if (val) {
|
||||||
this.id = 0;
|
this.initGroupList();
|
||||||
this.$store.dispatch('socket/resetConversationGroup');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.conversationGroup.MESSAGE': function(val) {
|
'$store.state.socket.conversationGroup.MESSAGE': function(val) {
|
||||||
@ -153,6 +178,9 @@ export default {
|
|||||||
});
|
});
|
||||||
if (find) {
|
if (find) {
|
||||||
find.messageList.push(val.message);
|
find.messageList.push(val.message);
|
||||||
|
if (!this.id && this.privateChatId && this.privateChatId == this.getPrivateChatId(find)) {
|
||||||
|
this.id = val.id;
|
||||||
|
}
|
||||||
if (this.id == val.id) {
|
if (this.id == val.id) {
|
||||||
this.setReadGroup();
|
this.setReadGroup();
|
||||||
}
|
}
|
||||||
@ -165,22 +193,210 @@ export default {
|
|||||||
if (val.messageTips) {
|
if (val.messageTips) {
|
||||||
this.$message.success(`${val.messageTips}`);
|
this.$message.success(`${val.messageTips}`);
|
||||||
}
|
}
|
||||||
this.getGroupList();
|
if (val.id) {
|
||||||
|
const findIndex = this.groupList.findIndex(ii => {
|
||||||
|
return val.id == ii.id || (val.type == 'PRIVATE_CHAT' && ii.type == 'PRIVATE_CHAT' && this.isEqualMember(ii.memberList, val.memberList));
|
||||||
|
});
|
||||||
|
const obj = {...val, messageList: [], imageUrl: ''};
|
||||||
|
if (findIndex > -1) {
|
||||||
|
this.groupList.splice(findIndex, 1, obj);
|
||||||
|
} else {
|
||||||
|
this.groupList.push(obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
myMemberId() {
|
'$store.state.socket.conversationGroup.UPDATE_NAME': function(val) {
|
||||||
|
if (val.id) {
|
||||||
|
const index = this.groupList.findIndex(item => {
|
||||||
|
return item.id == val.id;
|
||||||
|
});
|
||||||
|
if (index > -1) {
|
||||||
|
this.groupList.splice(index, 1, {...this.groupList[index], name: val.name});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'$store.state.socket.conversationGroup.UPDATE_MEMBER': function(val) {
|
||||||
|
if (val.id) {
|
||||||
|
const index = this.groupList.findIndex(item => {
|
||||||
|
return item.id == val.id;
|
||||||
|
});
|
||||||
|
if (index > -1) {
|
||||||
|
const obj = {
|
||||||
|
...this.groupList[index],
|
||||||
|
memberList: val.memberList
|
||||||
|
};
|
||||||
|
if (val.leaderId) {
|
||||||
|
obj.leaderId = val.leaderId;
|
||||||
|
}
|
||||||
|
this.groupList.splice(index, 1, obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'$store.state.socket.conversationGroup.EXIT': function(val) {
|
||||||
|
if (val.id) {
|
||||||
|
const index = this.groupList.findIndex(item => {
|
||||||
|
return item.id == val.id;
|
||||||
|
});
|
||||||
|
this.groupList.splice(index, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
totalUnread() {
|
||||||
|
this.$emit('setTotalUnread', this.totalUnread);
|
||||||
|
},
|
||||||
|
myMemberId: {
|
||||||
|
handler(val) {
|
||||||
|
this.initGroupList();
|
||||||
|
if (val) {
|
||||||
this.getGroupList();
|
this.getGroupList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getBaseInfo();
|
this.getBaseInfo();
|
||||||
this.getGroupList();
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
this.initGroupList();
|
||||||
this.handleClose();
|
this.handleClose();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showMenu(event, item) {
|
||||||
|
this.groupClick(item);
|
||||||
|
this.initMenu(item);
|
||||||
|
const point = { x: event.x, y: event.y };
|
||||||
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
closeMenu() {
|
||||||
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
|
this.$refs.popMenu.close();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
groupSet(item) {
|
||||||
|
this.$refs.editGroup.doShow(item.groupInfo, item.label);
|
||||||
|
},
|
||||||
|
editGroupName(item) {
|
||||||
|
this.$prompt('请修改群名称', '提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
inputValue: item.groupInfo.name
|
||||||
|
}).then(suc => {
|
||||||
|
if (!item.groupInfo || !item.groupInfo.id) { return; }
|
||||||
|
const data = {
|
||||||
|
id: item.groupInfo.id,
|
||||||
|
name: suc.value
|
||||||
|
};
|
||||||
|
updateGroupName(this.groupId, data).then(res => {
|
||||||
|
this.$message.success('修改群名称成功!');
|
||||||
|
}).catch(err => {
|
||||||
|
this.$message.error(`修改群名称失败!,${err.message}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
editGroupLeader(item) {
|
||||||
|
this.$refs.dialogMember.doShow(item.groupInfo, item.label);
|
||||||
|
},
|
||||||
|
updateLeaderId(param) {
|
||||||
|
updateGroupLeader(this.groupId, param).then(res => {
|
||||||
|
this.$message.success('修改群主成功!');
|
||||||
|
}).catch(err => {
|
||||||
|
this.$message.error(`修改群主失败!,${err.message}`);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
initMenu(item) {
|
||||||
|
const menuNormal = (item) => [
|
||||||
|
{
|
||||||
|
label: '查看群设置',
|
||||||
|
handler: this.groupSet,
|
||||||
|
groupInfo: item,
|
||||||
|
isDisabled: (item) => {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
isShow: (item) => item.type === 'GROUP_CHAT'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '修改群名称',
|
||||||
|
handler: this.editGroupName,
|
||||||
|
groupInfo: item,
|
||||||
|
isDisabled: (item) => {
|
||||||
|
return item.leaderId != this.myMemberId;
|
||||||
|
},
|
||||||
|
isShow: (item) => item.type === 'GROUP_CHAT'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '修改群主',
|
||||||
|
handler: this.editGroupLeader,
|
||||||
|
groupInfo: item,
|
||||||
|
isDisabled: (item) => {
|
||||||
|
return item.leaderId != this.myMemberId;
|
||||||
|
},
|
||||||
|
isShow: (item) => item.type === 'GROUP_CHAT'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '邀请成员',
|
||||||
|
handler: this.groupSet,
|
||||||
|
groupInfo: item,
|
||||||
|
isDisabled: (item) => {
|
||||||
|
return item.leaderId != this.myMemberId;
|
||||||
|
},
|
||||||
|
isShow: (item) => item.type === 'GROUP_CHAT'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
this.menu = [];
|
||||||
|
const list = menuNormal(item);
|
||||||
|
list.forEach(menuItem => {
|
||||||
|
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(item) : false;
|
||||||
|
menuItem.show = menuItem.isShow ? menuItem.isShow(item) : true;
|
||||||
|
});
|
||||||
|
this.menu = list;
|
||||||
|
},
|
||||||
|
scrollTop(index) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const dom = document.querySelector('.middleMain');
|
||||||
|
const refDom = this.$refs['dom' + index];
|
||||||
|
const oTop = refDom[0].offsetTop;
|
||||||
|
const d = oTop - dom.clientHeight / 2;
|
||||||
|
dom.scrollTop = d;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
sendPrivateMsg(item) {
|
||||||
|
this.privateChatId = item.id;
|
||||||
|
const mList = [
|
||||||
|
{memberId: this.myMemberId, connect: false, role: 'Leader'},
|
||||||
|
{memberId: item.id, connect: false, role: 'Leader'}
|
||||||
|
];
|
||||||
|
const findIndex = this.groupList.findIndex(ii => {
|
||||||
|
return ii.type == 'PRIVATE_CHAT' && this.isEqualMember(ii.memberList, mList);
|
||||||
|
});
|
||||||
|
let index = findIndex;
|
||||||
|
if (findIndex < 0) {
|
||||||
|
const obj = {
|
||||||
|
creatorId: this.myMemberId,
|
||||||
|
leaderId: this.myMemberId,
|
||||||
|
memberList: mList,
|
||||||
|
messageList: [],
|
||||||
|
name: item.labelName,
|
||||||
|
type: 'PRIVATE_CHAT'
|
||||||
|
};
|
||||||
|
this.groupList.push(obj);
|
||||||
|
index = this.groupList.length - 1;
|
||||||
|
}
|
||||||
|
this.scrollTop(index);
|
||||||
|
this.id = 0;
|
||||||
|
this.tabActive = 0;
|
||||||
|
},
|
||||||
|
initGroupList() {
|
||||||
|
this.id = 0;
|
||||||
|
this.privateChatId = '';
|
||||||
|
this.$store.dispatch('socket/resetConversationGroup');
|
||||||
|
this.groupList = [];
|
||||||
|
},
|
||||||
getMessageStatus(val) {
|
getMessageStatus(val) {
|
||||||
const find = this.groupList.find(item => {
|
const find = this.groupList.find(item => {
|
||||||
return item.id == val.id;
|
return item.id == val.id;
|
||||||
@ -206,6 +422,18 @@ export default {
|
|||||||
},
|
},
|
||||||
getGroupName(item) {
|
getGroupName(item) {
|
||||||
let name = '';
|
let name = '';
|
||||||
|
if (item.type == 'PRIVATE_CHAT') {
|
||||||
|
let mId = '';
|
||||||
|
if (item.memberList[0].memberId == this.myMemberId && item.memberList[1]) {
|
||||||
|
mId = item.memberList[1].memberId;
|
||||||
|
} else {
|
||||||
|
mId = item.memberList[0].memberId;
|
||||||
|
}
|
||||||
|
const node = this.memberData[mId];
|
||||||
|
if (node) {
|
||||||
|
name = node.labelName;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (item.name) {
|
if (item.name) {
|
||||||
name = item.name;
|
name = item.name;
|
||||||
} else {
|
} else {
|
||||||
@ -216,6 +444,7 @@ export default {
|
|||||||
});
|
});
|
||||||
name = nArr.join('、');
|
name = nArr.join('、');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return name;
|
return name;
|
||||||
},
|
},
|
||||||
createGroup() {
|
createGroup() {
|
||||||
@ -262,11 +491,19 @@ export default {
|
|||||||
},
|
},
|
||||||
getGroupList() {
|
getGroupList() {
|
||||||
getGroupList(this.groupId).then(res => {
|
getGroupList(this.groupId).then(res => {
|
||||||
this.groupList = res.data;
|
res.data.forEach(item => {
|
||||||
if (this.groupList && this.groupList[0] && !this.id) {
|
const findIndex = this.groupList.findIndex(ii => {
|
||||||
|
return item.id == ii.id || (item.type == 'PRIVATE_CHAT' && ii.type == 'PRIVATE_CHAT' && this.isEqualMember(ii.memberList, item.memberList));
|
||||||
|
});
|
||||||
|
if (findIndex > -1) {
|
||||||
|
this.groupList.splice(findIndex, 1, item);
|
||||||
|
} else {
|
||||||
|
this.groupList.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (this.groupList && this.groupList[0] && !this.id && !this.privateChatId) {
|
||||||
this.id = this.groupList[0].id;
|
this.id = this.groupList[0].id;
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getImgUrl(url) {
|
getImgUrl(url) {
|
||||||
@ -281,11 +518,45 @@ export default {
|
|||||||
filterClick(index) {
|
filterClick(index) {
|
||||||
this.filterActive = index;
|
this.filterActive = index;
|
||||||
},
|
},
|
||||||
|
isEqualMember(arr1, arr2) {
|
||||||
|
const list1 = JSON.parse(JSON.stringify(arr1));
|
||||||
|
const list2 = JSON.parse(JSON.stringify(arr2));
|
||||||
|
if (!list1[1] && list1[0]) {
|
||||||
|
list1[1] = list1[0];
|
||||||
|
}
|
||||||
|
if (!list2[1] && list2[0]) {
|
||||||
|
list2[1] = list2[0];
|
||||||
|
}
|
||||||
|
const m1 = list1.map(item => {
|
||||||
|
return item.memberId;
|
||||||
|
});
|
||||||
|
const m2 = list2.map(item => {
|
||||||
|
return item.memberId;
|
||||||
|
});
|
||||||
|
return objectIsEqual(m1.sort(), m2.sort());
|
||||||
|
},
|
||||||
groupClick(item) {
|
groupClick(item) {
|
||||||
this.id = item.id;
|
this.id = item.id || 0;
|
||||||
|
if (item.type == 'GROUP_CHAT') {
|
||||||
|
this.privateChatId = '';
|
||||||
|
} else {
|
||||||
|
this.privateChatId = this.getPrivateChatId(item);
|
||||||
|
}
|
||||||
this.setReadGroup();
|
this.setReadGroup();
|
||||||
},
|
},
|
||||||
|
getPrivateChatId(item) {
|
||||||
|
let pId = '';
|
||||||
|
if (item.type == 'PRIVATE_CHAT') {
|
||||||
|
if (item.memberList[0].memberId == this.myMemberId && item.memberList[1]) {
|
||||||
|
pId = item.memberList[1].memberId;
|
||||||
|
} else {
|
||||||
|
pId = item.memberList[0].memberId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return pId;
|
||||||
|
},
|
||||||
setReadGroup() {
|
setReadGroup() {
|
||||||
|
if (!this.id) { return; }
|
||||||
const id = this.id;
|
const id = this.id;
|
||||||
setGroupReadMessage(this.groupId, {id}).then(res => {
|
setGroupReadMessage(this.groupId, {id}).then(res => {
|
||||||
res.data.forEach(item => {
|
res.data.forEach(item => {
|
||||||
@ -297,7 +568,6 @@ export default {
|
|||||||
};
|
};
|
||||||
this.getMessageStatus(obj);
|
this.getMessageStatus(obj);
|
||||||
});
|
});
|
||||||
}).catch(err => {
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
@ -324,6 +594,12 @@ export default {
|
|||||||
border-top-right-radius: 5px;
|
border-top-right-radius: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.pop-menu{
|
||||||
|
padding: 0;
|
||||||
|
background: #eee;
|
||||||
|
border: none;
|
||||||
|
box-shadow: 0 0 10px 3px #eee;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -462,7 +738,7 @@ export default {
|
|||||||
.text {
|
.text {
|
||||||
height: 22px;
|
height: 22px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
padding: 3px 5px;
|
padding: 0px 5px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -475,7 +751,7 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.time, i {
|
.time, i {
|
||||||
padding: 3px 0px;
|
padding: 0px 0px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.time {
|
.time {
|
||||||
|
87
src/views/newMap/display/newChat/dialogMember.vue
Normal file
87
src/views/newMap/display/newChat/dialogMember.vue
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="dialogMember"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
width="30%"
|
||||||
|
:modal="false"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:before-close="handleClose"
|
||||||
|
>
|
||||||
|
<div class="dialogBody">
|
||||||
|
<el-select v-model="value" placeholder="请选择">
|
||||||
|
<el-option-group
|
||||||
|
v-for="group in memberTreeData"
|
||||||
|
:key="group.id"
|
||||||
|
:label="group.labelName"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in group.children"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.labelName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-option-group>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="save">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'DialogMember',
|
||||||
|
components: {},
|
||||||
|
props: {
|
||||||
|
memberTreeData: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
title: '修改群主',
|
||||||
|
gId: '',
|
||||||
|
value: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
save() {
|
||||||
|
if (this.title == '修改群主') {
|
||||||
|
this.$emit('updateLeaderId', {id: this.gId, memberId: this.value});
|
||||||
|
}
|
||||||
|
this.handleClose();
|
||||||
|
},
|
||||||
|
doShow(info, title) {
|
||||||
|
this.title = title || '修改群主';
|
||||||
|
this.gId = info.id;
|
||||||
|
this.value = info.leaderId;
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
handleClose() {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
</style>
|
@ -2,7 +2,7 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
v-dialogDrag
|
v-dialogDrag
|
||||||
class="editGroup"
|
class="editGroup"
|
||||||
title="创建会话群"
|
:title="title"
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
width="40%"
|
width="40%"
|
||||||
:modal="false"
|
:modal="false"
|
||||||
@ -20,7 +20,7 @@
|
|||||||
<div class="treeBox">
|
<div class="treeBox">
|
||||||
<el-tree
|
<el-tree
|
||||||
ref="tree"
|
ref="tree"
|
||||||
:data="treeData"
|
:data="memberTreeData"
|
||||||
node-key="id"
|
node-key="id"
|
||||||
:props="defaultProps"
|
:props="defaultProps"
|
||||||
default-expand-all
|
default-expand-all
|
||||||
@ -41,14 +41,14 @@
|
|||||||
<b>{{ selectTreeNode.length }}</b>
|
<b>{{ selectTreeNode.length }}</b>
|
||||||
<b>)</b>
|
<b>)</b>
|
||||||
<div class="tagBox">
|
<div class="tagBox">
|
||||||
<el-tag v-for="(tag, index) in selectTreeNode" :key="index" class="tag" :class="{disableClose: tag.disabled}" :type="tag.disabled ? 'warning' : ''" closable @close="tagClose(tag)">
|
<el-tag v-for="(tag, index) in selectTreeNode" :key="index" class="tag" :class="{disableClose: tag.disabled || addDisabledNode(tag)}" :type="tag.disabled ? 'warning' : ''" :closable="!treeDisabled" @close="tagClose(tag)">
|
||||||
{{ tag.labelName }}
|
{{ tag.labelName }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<el-divider />
|
<el-divider />
|
||||||
<el-form ref="form" :model="form" label-width="80px">
|
<el-form ref="form" :model="form" label-width="80px">
|
||||||
<el-form-item label="群名称:" prop="name">
|
<el-form-item v-if="showFormName" label="群名称:" prop="name">
|
||||||
<el-input v-model="form.name" />
|
<el-input v-model="form.name" :disabled="nameDisabled" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="群头像:" prop="imageUrl">
|
<!-- <el-form-item label="群头像:" prop="imageUrl">
|
||||||
<div class="uploadImgDiv">
|
<div class="uploadImgDiv">
|
||||||
@ -57,7 +57,7 @@
|
|||||||
<input id="upload_file_group" ref="files" type="file" class="input_file_box" accept="image/jpeg,image/png" @change="uploadLogo()">
|
<input id="upload_file_group" ref="files" type="file" class="input_file_box" accept="image/jpeg,image/png" @change="uploadLogo()">
|
||||||
</div>
|
</div>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item v-if="showSubmitBtn">
|
||||||
<el-button @click="handleClose">取消</el-button>
|
<el-button @click="handleClose">取消</el-button>
|
||||||
<el-button type="primary" @click="onSubmit">确定</el-button>
|
<el-button type="primary" @click="onSubmit">确定</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -69,7 +69,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { createGroup } from '@/api/newChat';
|
import { createGroup, inviteMemberToGroup } from '@/api/newChat';
|
||||||
import { getUploadUrl } from '@/api/projectConfig';
|
import { getUploadUrl } from '@/api/projectConfig';
|
||||||
export default {
|
export default {
|
||||||
name: 'EditGroup',
|
name: 'EditGroup',
|
||||||
@ -77,102 +77,58 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
memberTreeData: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
title: '创建会话群',
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
queryMember: '',
|
queryMember: '',
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'labelName'
|
label: 'labelName',
|
||||||
|
disabled: (node) => {
|
||||||
|
if (node.disabled || this.treeDisabled || this.addDisabledNode(node)) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
activeTrains: [],
|
activeTrains: [],
|
||||||
|
defaultCheckedKeys: [],
|
||||||
selectTreeNode: [],
|
selectTreeNode: [],
|
||||||
treeData: [{
|
|
||||||
labelName: '行调',
|
|
||||||
children: []
|
|
||||||
}, {
|
|
||||||
labelName: 'NCC调度',
|
|
||||||
children: []
|
|
||||||
}, {
|
|
||||||
labelName: '车站值班员',
|
|
||||||
children: []
|
|
||||||
}, {
|
|
||||||
labelName: '司机',
|
|
||||||
children: []
|
|
||||||
}, {
|
|
||||||
labelName: '通号',
|
|
||||||
children: []
|
|
||||||
}, {
|
|
||||||
labelName: '车辆段',
|
|
||||||
children: []
|
|
||||||
}, {
|
|
||||||
labelName: 'CTC操作员',
|
|
||||||
children: []
|
|
||||||
}, {
|
|
||||||
labelName: '车站助理',
|
|
||||||
children: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '车站站长',
|
|
||||||
children: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '车站信号员',
|
|
||||||
children: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '车站客运员',
|
|
||||||
children: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '车站扳道员',
|
|
||||||
children: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '车站引导员',
|
|
||||||
children: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '车站工务工',
|
|
||||||
children: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '设备管理员',
|
|
||||||
children: []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
form: {
|
form: {
|
||||||
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
imageUrl: ''
|
imageUrl: ''
|
||||||
}
|
},
|
||||||
|
treeDisabled: false,
|
||||||
|
nameDisabled: false,
|
||||||
|
showFormName: true,
|
||||||
|
showSubmitBtn: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
groupId() {
|
groupId() {
|
||||||
return this.$route.query.group;
|
return this.$route.query.group;
|
||||||
},
|
},
|
||||||
memberList() {
|
|
||||||
return this.$store.state.training.memberList;
|
|
||||||
},
|
|
||||||
memberData() {
|
memberData() {
|
||||||
return this.$store.state.training.memberData;
|
return this.$store.state.training.memberData;
|
||||||
},
|
},
|
||||||
myMemberId() {
|
myMemberId() {
|
||||||
return this.$store.state.training.myMemberId;
|
return this.$store.state.training.myMemberId;
|
||||||
},
|
|
||||||
defaultCheckedKeys() {
|
|
||||||
return [this.myMemberId];
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
queryMember(val) {
|
queryMember(val) {
|
||||||
this.$refs.tree.filter(val);
|
this.$refs.tree.filter(val);
|
||||||
},
|
},
|
||||||
memberList () {
|
|
||||||
this.getTreeData();
|
|
||||||
},
|
|
||||||
myMemberId(val) {
|
myMemberId(val) {
|
||||||
this.initData();
|
this.initData();
|
||||||
if (!val) {
|
if (!val) {
|
||||||
@ -181,28 +137,52 @@ export default {
|
|||||||
},
|
},
|
||||||
'$store.state.map.activeTrainListChange': function () {
|
'$store.state.map.activeTrainListChange': function () {
|
||||||
this.getActiveTrains();
|
this.getActiveTrains();
|
||||||
|
},
|
||||||
|
title() {
|
||||||
|
if (this.title == '邀请成员') {
|
||||||
|
this.showFormName = false;
|
||||||
|
this.showSubmitBtn = true;
|
||||||
|
this.treeDisabled = false;
|
||||||
|
this.nameDisabled = true;
|
||||||
|
} else if (this.title == '创建会话群') {
|
||||||
|
this.showFormName = true;
|
||||||
|
this.showSubmitBtn = true;
|
||||||
|
this.treeDisabled = false;
|
||||||
|
this.nameDisabled = false;
|
||||||
|
} else {
|
||||||
|
this.showFormName = true;
|
||||||
|
this.showSubmitBtn = false;
|
||||||
|
this.treeDisabled = true;
|
||||||
|
this.nameDisabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initData();
|
this.initData();
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getTreeData();
|
|
||||||
this.getActiveTrains();
|
this.getActiveTrains();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
addDisabledNode(node) {
|
||||||
|
let s = false;
|
||||||
|
if (this.title == '邀请成员' && this.defaultCheckedKeys.includes(node.id)) {
|
||||||
|
s = true;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
},
|
||||||
getImgUrl(url) {
|
getImgUrl(url) {
|
||||||
return url ? this.$store.state.user.ossUrl + '/conversationGroup/' + url : '';
|
return url ? this.$store.state.user.ossUrl + '/conversationGroup/' + url : '';
|
||||||
},
|
},
|
||||||
tagClose(item) {
|
tagClose(item) {
|
||||||
if (item.disabled) { return; }
|
if (item.disabled) { return; }
|
||||||
const filter = this.selectTreeNode.filter(ii => {
|
const filter = this.selectTreeNode.filter(ii => {
|
||||||
return item != ii;
|
return item.id != ii.id;
|
||||||
});
|
});
|
||||||
this.$refs.tree.setCheckedNodes(filter);
|
this.$refs.tree.setChecked(item, false);
|
||||||
this.selectTreeNode = filter;
|
this.selectTreeNode = filter;
|
||||||
},
|
},
|
||||||
getActiveTrains() {
|
getActiveTrains() {
|
||||||
@ -215,200 +195,6 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$refs.tree && this.$refs.tree.filter(this.queryMember);
|
this.$refs.tree && this.$refs.tree.filter(this.queryMember);
|
||||||
},
|
},
|
||||||
getTreeData() {
|
|
||||||
const val = this.memberList;
|
|
||||||
if (val && val.length) {
|
|
||||||
// this.memberData = this.$store.state.training.memberData;
|
|
||||||
const dispatcherList = [];
|
|
||||||
const nccDispatcherList = [];
|
|
||||||
const electricDispatcherList = [];
|
|
||||||
const depotDispatcherList = [];
|
|
||||||
const stationSupervisorList = [];
|
|
||||||
const driverList = [];
|
|
||||||
const maintainerList = [];
|
|
||||||
const ctcOperatorList = [];
|
|
||||||
const stationAssistantList = [];
|
|
||||||
const stationMasterList = [];
|
|
||||||
const stationSignalerList = [];
|
|
||||||
const stationPassengerList = [];
|
|
||||||
const stationSwitchManList = [];
|
|
||||||
const stationFacilitatorList = [];
|
|
||||||
const stationWorkerList = [];
|
|
||||||
const deviceManagerList = [];
|
|
||||||
const trainMasterList = [];
|
|
||||||
const stationElectricWorkerList = [];
|
|
||||||
val.forEach(item => {
|
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
|
||||||
switch (item.type) {
|
|
||||||
case 'DISPATCHER':
|
|
||||||
this.memberData[item.id].labelName = '行调' + (item.name || '');
|
|
||||||
dispatcherList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'NCC_DISPATCHER':
|
|
||||||
this.memberData[item.id].labelName = 'NCC调度' + (item.name || '');
|
|
||||||
nccDispatcherList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'ELECTRIC_DISPATCHER':
|
|
||||||
this.memberData[item.id].labelName = '电力调度' + (item.name || '');
|
|
||||||
electricDispatcherList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'DEPOT_DISPATCHER':
|
|
||||||
this.memberData[item.id].labelName = '信号楼-' + device.name + (item.name || '');
|
|
||||||
depotDispatcherList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'STATION_SUPERVISOR':
|
|
||||||
this.memberData[item.id].labelName = '值班员-' + device.name + (item.name ? `-${item.name }` : '');
|
|
||||||
stationSupervisorList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'DRIVER':
|
|
||||||
this.memberData[item.id].labelName = '司机-列车' + item.deviceCode;
|
|
||||||
driverList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'MAINTAINER':
|
|
||||||
this.memberData[item.id].labelName = '通号' + (item.name || '');
|
|
||||||
maintainerList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'RAIL_CTC':
|
|
||||||
this.memberData[item.id].labelName = 'CTC操作员' + device.name;
|
|
||||||
ctcOperatorList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'STATION_ASSISTANT':
|
|
||||||
this.memberData[item.id].labelName = '车站助理-' + device.name + (item.name ? `-${item.name }` : '');
|
|
||||||
stationAssistantList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'STATION_MASTER':
|
|
||||||
this.memberData[item.id].labelName = '车站站长-' + device.name + (item.name ? `-${item.name }` : '');
|
|
||||||
stationMasterList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'STATION_SIGNALER':
|
|
||||||
this.memberData[item.id].labelName = '车站信号员-' + device.name + (item.name ? `-${item.name }` : '');
|
|
||||||
stationSignalerList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'STATION_PASSENGER':
|
|
||||||
this.memberData[item.id].labelName = '车站客运员-' + device.name + (item.name ? `-${item.name }` : '');
|
|
||||||
stationPassengerList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'STATION_SWITCH_MAN':
|
|
||||||
this.memberData[item.id].labelName = '车站扳道员-' + device.name + (item.name ? `-${item.name }` : '');
|
|
||||||
stationSwitchManList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'STATION_FACILITATOR':
|
|
||||||
this.memberData[item.id].labelName = '车站引导员-' + device.name + (item.name ? `-${item.name }` : '');
|
|
||||||
stationFacilitatorList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'STATION_WORKER':
|
|
||||||
this.memberData[item.id].labelName = '车站工务工-' + device.name + (item.name ? `-${item.name }` : '');
|
|
||||||
stationWorkerList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'DEVICE_MANAGER':
|
|
||||||
this.memberData[item.id].labelName = '设备管理员-' + device.name + (item.name ? `-${item.name }` : '');
|
|
||||||
deviceManagerList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'TRAIN_MASTER':
|
|
||||||
// device.name;
|
|
||||||
this.memberData[item.id].labelName = '车务段段长-' + (item.name ? `-${item.name }` : '');
|
|
||||||
trainMasterList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
case 'PARENT_DEPARTMENT':
|
|
||||||
this.memberData[item.id].labelName = '上级部门' + (item.name ? `-${item.name }` : '');
|
|
||||||
break;
|
|
||||||
case 'STATION_ELECTRIC_WORKER':
|
|
||||||
this.memberData[item.id].labelName = '电力工务' + (item.name || '');
|
|
||||||
stationElectricWorkerList.push(this.memberData[item.id]);
|
|
||||||
break;
|
|
||||||
// DEVICE_MANAGER:'设备管理员' deviceManager
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.treeData = [{
|
|
||||||
labelName: '行调',
|
|
||||||
id: 'dispatcher',
|
|
||||||
children: dispatcherList
|
|
||||||
}, {
|
|
||||||
labelName: 'NCC调度',
|
|
||||||
id: 'nccDispatcher',
|
|
||||||
children: nccDispatcherList
|
|
||||||
}, {
|
|
||||||
labelName: '车站值班员',
|
|
||||||
id: 'stationSupervisor',
|
|
||||||
children: stationSupervisorList
|
|
||||||
}, {
|
|
||||||
labelName: '司机',
|
|
||||||
id: 'driver',
|
|
||||||
children: driverList
|
|
||||||
}, {
|
|
||||||
labelName: '通号',
|
|
||||||
id: 'maintainer',
|
|
||||||
children: maintainerList
|
|
||||||
}, {
|
|
||||||
labelName: '车辆段信号楼',
|
|
||||||
id: 'depotDispatcher',
|
|
||||||
children: depotDispatcherList
|
|
||||||
}, {
|
|
||||||
labelName: '电力调度',
|
|
||||||
id: 'electricDispatcher',
|
|
||||||
children: electricDispatcherList
|
|
||||||
}, {
|
|
||||||
labelName: 'CTC操作员',
|
|
||||||
id: 'ctcOperator',
|
|
||||||
children: ctcOperatorList
|
|
||||||
}, {
|
|
||||||
labelName: '车站助理',
|
|
||||||
id: 'stationAssistant',
|
|
||||||
children: stationAssistantList
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '车站站长',
|
|
||||||
id: 'stationMaster',
|
|
||||||
children: stationMasterList
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '车站信号员',
|
|
||||||
id: 'stationSignaler',
|
|
||||||
children: stationSignalerList
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '车站客运员',
|
|
||||||
id: 'stationPassenger',
|
|
||||||
children: stationPassengerList
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '车站扳道员',
|
|
||||||
id: 'stationSwitchMan',
|
|
||||||
children: stationSwitchManList
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '车站引导员',
|
|
||||||
id: 'stationFacilitator',
|
|
||||||
children: stationFacilitatorList
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '车站工务工',
|
|
||||||
id: 'stationWorker',
|
|
||||||
children: stationWorkerList
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '设备管理员',
|
|
||||||
id: 'deviceManager',
|
|
||||||
children: deviceManagerList
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '车务段段长 ',
|
|
||||||
id: 'trainMaster',
|
|
||||||
children: trainMasterList
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '电力工务 ',
|
|
||||||
id: 'stationElectricWorker',
|
|
||||||
children: stationElectricWorkerList
|
|
||||||
}
|
|
||||||
];
|
|
||||||
this.$nextTick(() => {
|
|
||||||
if (this.$refs.tree) {
|
|
||||||
this.$refs.tree.filter(this.queryMember);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
checkChange(data, node, val) {
|
checkChange(data, node, val) {
|
||||||
const filter = node.checkedNodes.filter(ii => {
|
const filter = node.checkedNodes.filter(ii => {
|
||||||
return !ii.children;
|
return !ii.children;
|
||||||
@ -427,6 +213,26 @@ export default {
|
|||||||
return (data.labelName.indexOf(value) !== -1 || flag) && driverNoShow;
|
return (data.labelName.indexOf(value) !== -1 || flag) && driverNoShow;
|
||||||
},
|
},
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
if (this.title == '邀请成员') {
|
||||||
|
const list = [];
|
||||||
|
this.selectTreeNode.forEach(item => {
|
||||||
|
if (!this.defaultCheckedKeys.includes(item.id)) {
|
||||||
|
list.push(item.id);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const params = {
|
||||||
|
id: this.form.id,
|
||||||
|
memberIds: list
|
||||||
|
};
|
||||||
|
inviteMemberToGroup(this.groupId, params).then(res => {
|
||||||
|
this.initData();
|
||||||
|
this.handleClose();
|
||||||
|
this.$message.success('邀请成员成功!');
|
||||||
|
}).catch(err => {
|
||||||
|
this.$message.error(`邀请成员失败!${err.message}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
} else if (this.title == '创建会话群') {
|
||||||
const list = [];
|
const list = [];
|
||||||
this.selectTreeNode.forEach(item => {
|
this.selectTreeNode.forEach(item => {
|
||||||
list.push(item.id);
|
list.push(item.id);
|
||||||
@ -443,9 +249,11 @@ export default {
|
|||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$message.error(`创建会话群失败!${err.message}`);
|
this.$message.error(`创建会话群失败!${err.message}`);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
initData() {
|
initData() {
|
||||||
this.$refs.form && this.$refs.form.resetFields();
|
this.$refs.form && this.$refs.form.resetFields();
|
||||||
|
this.defaultCheckedKeys = [this.myMemberId];
|
||||||
this.selectTreeNode = [];
|
this.selectTreeNode = [];
|
||||||
const node = this.memberData[this.myMemberId];
|
const node = this.memberData[this.myMemberId];
|
||||||
node && this.selectTreeNode.push(node);
|
node && this.selectTreeNode.push(node);
|
||||||
@ -499,7 +307,9 @@ export default {
|
|||||||
// fileName:存储文件名
|
// fileName:存储文件名
|
||||||
// method:生成链接的请求方式
|
// method:生成链接的请求方式
|
||||||
},
|
},
|
||||||
doShow() {
|
doShow(info, title) {
|
||||||
|
this.title = title || '创建会话群';
|
||||||
|
this.setInfo(info);
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.$refs.tree) {
|
if (this.$refs.tree) {
|
||||||
@ -507,6 +317,22 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
setInfo(info) {
|
||||||
|
if (info) {
|
||||||
|
this.form.id = info.id || '';
|
||||||
|
this.form.name = info.name || '';
|
||||||
|
this.form.imageUrl = info.imageUrl || '';
|
||||||
|
this.defaultCheckedKeys = [];
|
||||||
|
this.selectTreeNode = [];
|
||||||
|
info.memberList.forEach(item => {
|
||||||
|
this.defaultCheckedKeys.push(item.memberId);
|
||||||
|
const node = this.memberData[item.memberId];
|
||||||
|
node && this.selectTreeNode.push(node);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.initData();
|
||||||
|
}
|
||||||
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
}
|
}
|
||||||
@ -549,6 +375,7 @@ $imgHeight: 70px;
|
|||||||
.disableClose {
|
.disableClose {
|
||||||
/deep/ .el-icon-close {
|
/deep/ .el-icon-close {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-quickMenuDrag class="voice-chat-box">
|
<div v-quickMenuDrag class="voice-chat-box">
|
||||||
<div v-if="chatBoxMin" :id="sideButtonDom.domId" @click="clickBtn">
|
<div v-if="chatBoxMin" :id="sideButtonDom.domId" @click="clickBtn">
|
||||||
|
<el-badge :value="totalUnreadNum" :hidden="!totalUnreadNum" :max="99">
|
||||||
<el-button circle style="color: #0C161A;" icon="el-icon-mic" />
|
<el-button circle style="color: #0C161A;" icon="el-icon-mic" />
|
||||||
|
</el-badge>
|
||||||
</div>
|
</div>
|
||||||
<chatDialog ref="chatDialog" />
|
<chatDialog ref="chatDialog" @setTotalUnread="setTotalUnread" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -18,6 +20,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
totalUnreadNum: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
@ -33,6 +36,9 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
setTotalUnread(val) {
|
||||||
|
this.totalUnreadNum = val;
|
||||||
|
},
|
||||||
clickBtn() {
|
clickBtn() {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: this.sideButtonDom.operation,
|
operation: this.sideButtonDom.operation,
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
width="400px"
|
width="400px"
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
>
|
>
|
||||||
<div v-if="thirdLogin">
|
<div v-if="isRichor">
|
||||||
<div><span class="el-icon-user" style="font-size:15px;margin-right:8px;" />联系人:欧阳炜椿</div>
|
<div><span class="el-icon-user" style="font-size:15px;margin-right:8px;" />联系人:欧阳炜椿</div>
|
||||||
<div class="eachInfo"><span class="el-icon-mobile-phone" style="font-size:15px;margin-right:7px;" />电 话:4000500081</div>
|
<div class="eachInfo"><span class="el-icon-mobile-phone" style="font-size:15px;margin-right:7px;" />电 话:4000500081</div>
|
||||||
<div class="eachInfo"><span class="el-icon-message" style="font-size:15px;margin-right:7px;" />邮 箱:zhrc@richortech.com</div>
|
<div class="eachInfo"><span class="el-icon-message" style="font-size:15px;margin-right:7px;" />邮 箱:zhrc@richortech.com</div>
|
||||||
@ -29,8 +29,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import wchat from '@/assets/wchat.png';
|
import wchat from '@/assets/wchat.png';
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import {mapGetters} from 'vuex';
|
||||||
import { RichorContectUsList } from '@/scripts/ProjectConfig';
|
|
||||||
export default {
|
export default {
|
||||||
name:'',
|
name:'',
|
||||||
data() {
|
data() {
|
||||||
@ -40,9 +39,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
thirdLogin() {
|
...mapGetters('projectConfig', [
|
||||||
return RichorContectUsList.includes(getSessionStorage('project'));
|
'isRichor'
|
||||||
}
|
])
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
handleClose() {
|
handleClose() {
|
||||||
|
@ -94,6 +94,9 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
'$store.state.socket.simulationTimeSync': function (time) { // 仿真时间更新
|
'$store.state.socket.simulationTimeSync': function (time) { // 仿真时间更新
|
||||||
this.initDate(time);
|
this.initDate(time);
|
||||||
|
},
|
||||||
|
'$store.state.socket.simulationSpeed': function(speed) {
|
||||||
|
this.speed = speed;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -91,9 +91,6 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.socket.simulationOver':function(val) {
|
'$store.state.socket.simulationOver':function(val) {
|
||||||
if (this.$store.state.training.simulationCreator) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$alert('您所在仿真已被销毁', '提示', {
|
this.$alert('您所在仿真已被销毁', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
showClose: false,
|
showClose: false,
|
||||||
|
@ -82,7 +82,7 @@ export default {
|
|||||||
sendCommandNew(this.group, 'KEY_LINK_CONTROL_INFO_QUERY', params).then((res) => {
|
sendCommandNew(this.group, 'KEY_LINK_CONTROL_INFO_QUERY', params).then((res) => {
|
||||||
this.searchList = res.data;
|
this.searchList = res.data;
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log('查询失败!', error);
|
console.error('查询失败!', error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,6 @@ export default {
|
|||||||
this.onRunningRouteChange();
|
this.onRunningRouteChange();
|
||||||
this.dataLoading = false;
|
this.dataLoading = false;
|
||||||
}).catch(_ => {
|
}).catch(_ => {
|
||||||
console.log(_);
|
|
||||||
this.dataLoading = false;
|
this.dataLoading = false;
|
||||||
this.$messageBox(`获取交路列表失败`);
|
this.$messageBox(`获取交路列表失败`);
|
||||||
});
|
});
|
||||||
|
@ -147,7 +147,6 @@ export default {
|
|||||||
center: true
|
center: true
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
clearPlaningData(this.loadRunPlanId).then(resp => {
|
clearPlaningData(this.loadRunPlanId).then(resp => {
|
||||||
console.log('清除数据成功!');
|
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message.error('清除数据失败!');
|
this.$message.error('清除数据失败!');
|
||||||
|
@ -772,7 +772,6 @@ export default {
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
console.log('无线受令代签');
|
|
||||||
const rcId = this.getRcId(this.trainRow.code);
|
const rcId = this.getRcId(this.trainRow.code);
|
||||||
const params = {cmdId: this.command.cmdId, rcId: rcId, proxySign: true};
|
const params = {cmdId: this.command.cmdId, rcId: rcId, proxySign: true};
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -1368,7 +1367,6 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
cacheCmd(showMsg) {
|
cacheCmd(showMsg) {
|
||||||
console.log('缓存', this.command);
|
|
||||||
return new Promise(async(resolve, reject) => {
|
return new Promise(async(resolve, reject) => {
|
||||||
const data = JSON.parse(JSON.stringify(this.command));
|
const data = JSON.parse(JSON.stringify(this.command));
|
||||||
const idList = await this.getCompanyIdList(data.rcvCompanies.length + 1);
|
const idList = await this.getCompanyIdList(data.rcvCompanies.length + 1);
|
||||||
@ -1410,7 +1408,6 @@ export default {
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
console.log('代签');
|
|
||||||
const rcId = this.getRcId(this.allographRow.code);
|
const rcId = this.getRcId(this.allographRow.code);
|
||||||
const params = {cmdId: this.command.cmdId, rcId: rcId, proxySign: true};
|
const params = {cmdId: this.command.cmdId, rcId: rcId, proxySign: true};
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
<div class="scheduling_body">
|
<div class="scheduling_body">
|
||||||
<div class="scheduling_body-table">
|
<div class="scheduling_body-table">
|
||||||
<edit-table ref="table" v-loading="loading" border stripe :table-data="tableData" :table-form="tableForm" :row-style="handleRowStyle" />
|
<edit-table ref="table" v-loading="loading" border stripe :height="maxHeight" :max-height="maxHeight" :table-data="tableData" :table-form="tableForm" :row-style="handleRowStyle" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { querySechedulingNew, generateSchedulingNew, saveSchedulingNew } from '@/api/scheduling';
|
import { querySechedulingNew, generateSchedulingNew, saveSchedulingNew } from '@/api/scheduling';
|
||||||
|
import { getTrainListByMapId } from '@/api/jmap/map';
|
||||||
import { hexColor } from '@/jmapNew/theme/parser/util';
|
import { hexColor } from '@/jmapNew/theme/parser/util';
|
||||||
import EditTable from '@/views/components/editTable/index';
|
import EditTable from '@/views/components/editTable/index';
|
||||||
export default {
|
export default {
|
||||||
@ -185,16 +186,18 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
group() {
|
group() {
|
||||||
return this.$route.query.group;
|
return this.$route.query.group;
|
||||||
|
},
|
||||||
|
maxHeight() {
|
||||||
|
return this.$store.state.app.height - 200;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
mounted() {
|
||||||
'$store.state.map.mapDataLoadedCount': function () {
|
getTrainListByMapId(this.$route.query.mapId).then(resp => {
|
||||||
const trainList = this.$store.state.map.map.trainList || [];
|
|
||||||
this.groupNumberList = [];
|
this.groupNumberList = [];
|
||||||
trainList.forEach(item => {
|
resp.data.forEach(item => {
|
||||||
this.groupNumberList.push({value: item.code, label: item.groupNumber});
|
this.groupNumberList.push({value: item.code, label: item.groupNumber});
|
||||||
});
|
});
|
||||||
}
|
}).catch(e => console.error(e));
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleQuery(day) {
|
handleQuery(day) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<template v-for="terminal in terminalList">
|
<template v-for="terminal in terminalList">
|
||||||
<div :key="terminal.id" class="terminal-button">
|
<div :key="terminal.id" class="terminal-button">
|
||||||
<div class="terminal-button-name" :class="{ active: terminal.id === nowTerminal.id }" @click="changePictureShow(terminal)">{{ terminal.name }}</div>
|
<div class="terminal-button-name" :class="{ active: terminal.id === nowTerminal.id }" @click="changePictureShow(terminal)">{{ terminal.name }}</div>
|
||||||
<div class="terminal-button-text" @click="openNewWindow(terminal)">新窗口打开</div>
|
<div v-if="!trainingDesign" class="terminal-button-text" @click="openNewWindow(terminal)">新窗口打开</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@ -50,6 +50,9 @@ export default {
|
|||||||
},
|
},
|
||||||
roles() {
|
roles() {
|
||||||
return this.$store.state.training.roles;
|
return this.$store.state.training.roles;
|
||||||
|
},
|
||||||
|
trainingDesign() {
|
||||||
|
return this.$store.state.training.domConfig && this.$store.state.training.domConfig.trainingDesign;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -62,7 +65,7 @@ export default {
|
|||||||
if (client) {
|
if (client) {
|
||||||
this.changePictureShow(client);
|
this.changePictureShow(client);
|
||||||
}
|
}
|
||||||
} else if (this.$route.query.client && !this.nowTerminal) {
|
} else if (this.$route.query.client && !this.nowTerminal.id) {
|
||||||
this.changeQueryClient();
|
this.changeQueryClient();
|
||||||
} else {
|
} else {
|
||||||
this.initPictureShow();
|
this.initPictureShow();
|
||||||
@ -155,6 +158,7 @@ export default {
|
|||||||
findTerminalFromMapById(id) {
|
findTerminalFromMapById(id) {
|
||||||
const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {};
|
const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {};
|
||||||
const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : [];
|
const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : [];
|
||||||
|
console.log(mapClientList, id, this.$route.query.simType, mapClientMap);
|
||||||
return mapClientList.find(item => item.id === id);
|
return mapClientList.find(item => item.id === id);
|
||||||
},
|
},
|
||||||
findTerminalFromMap(type) {
|
findTerminalFromMap(type) {
|
||||||
|
@ -249,6 +249,11 @@
|
|||||||
<el-input-number v-model="batchForm.NCC_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
|
<el-input-number v-model="batchForm.NCC_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="信息调度:" prop="OCC_DISPATCHER">
|
||||||
|
<el-input-number v-model="batchForm.OCC_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -471,6 +476,7 @@ export default {
|
|||||||
batchForm: {
|
batchForm: {
|
||||||
DISPATCHER: 0,
|
DISPATCHER: 0,
|
||||||
NCC_DISPATCHER: 0,
|
NCC_DISPATCHER: 0,
|
||||||
|
OCC_DISPATCHER: 0,
|
||||||
STATION_SUPERVISOR: 0,
|
STATION_SUPERVISOR: 0,
|
||||||
DRIVER: 0,
|
DRIVER: 0,
|
||||||
MAINTAINER: 0,
|
MAINTAINER: 0,
|
||||||
@ -592,7 +598,8 @@ export default {
|
|||||||
name += findType.label;
|
name += findType.label;
|
||||||
}
|
}
|
||||||
name += '-';
|
name += '-';
|
||||||
if (obj.type == 'NCC_DISPATCHER') {
|
const typeList = ['NCC_DISPATCHER', 'OCC_DISPATCHER'];
|
||||||
|
if (typeList.includes(obj.type)) {
|
||||||
if (obj.name) {
|
if (obj.name) {
|
||||||
name += obj.name;
|
name += obj.name;
|
||||||
}
|
}
|
||||||
@ -718,6 +725,17 @@ export default {
|
|||||||
memberMap[this.batchForm.systemType].push(member);
|
memberMap[this.batchForm.systemType].push(member);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.batchForm.OCC_DISPATCHER) {
|
||||||
|
for (let i = 0; i < this.batchForm.OCC_DISPATCHER; i++) {
|
||||||
|
const member = {
|
||||||
|
id: this.getMemberId(this.batchForm.systemType),
|
||||||
|
name: '',
|
||||||
|
type: 'OCC_DISPATCHER',
|
||||||
|
deviceCode: ''
|
||||||
|
};
|
||||||
|
memberMap[this.batchForm.systemType].push(member);
|
||||||
|
}
|
||||||
|
}
|
||||||
this.stationList.forEach(station => {
|
this.stationList.forEach(station => {
|
||||||
if (!station.depot) {
|
if (!station.depot) {
|
||||||
if (this.batchForm.STATION_SUPERVISOR) {
|
if (this.batchForm.STATION_SUPERVISOR) {
|
||||||
@ -917,6 +935,7 @@ export default {
|
|||||||
this.batchForm = {
|
this.batchForm = {
|
||||||
DISPATCHER: 0,
|
DISPATCHER: 0,
|
||||||
NCC_DISPATCHER: 0,
|
NCC_DISPATCHER: 0,
|
||||||
|
OCC_DISPATCHER: 0,
|
||||||
STATION_SUPERVISOR: 0,
|
STATION_SUPERVISOR: 0,
|
||||||
DRIVER: 0,
|
DRIVER: 0,
|
||||||
MAINTAINER: 0,
|
MAINTAINER: 0,
|
||||||
@ -979,6 +998,13 @@ export default {
|
|||||||
deviceCode: ''
|
deviceCode: ''
|
||||||
};
|
};
|
||||||
memberMap[this.generationForm.systemType].push(memberNccDispatcher);
|
memberMap[this.generationForm.systemType].push(memberNccDispatcher);
|
||||||
|
const memberOccDispatcher = {
|
||||||
|
id: this.getMemberId(this.generationForm.systemType),
|
||||||
|
name: '',
|
||||||
|
type: 'OCC_DISPATCHER',
|
||||||
|
deviceCode: ''
|
||||||
|
};
|
||||||
|
memberMap[this.generationForm.systemType].push(memberOccDispatcher);
|
||||||
this.stationList.forEach(station => {
|
this.stationList.forEach(station => {
|
||||||
if (!station.depot) {
|
if (!station.depot) {
|
||||||
const member = {
|
const member = {
|
||||||
|
@ -245,6 +245,12 @@ export default {
|
|||||||
code: 'driverAtsWork',
|
code: 'driverAtsWork',
|
||||||
isShow: () => type === 'METRO'
|
isShow: () => type === 'METRO'
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '司机站场图',
|
||||||
|
code: 'driverAtsWork',
|
||||||
|
isShow: () => type === 'RAILWAY'
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '运行图预览',
|
name: '运行图预览',
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<el-form-item label="项目:" prop="projectCode">
|
<el-form-item label="项目:" prop="projectCode">
|
||||||
<el-select v-model="formModel.projectCode" placeholder="请选择项目">
|
<el-select v-model="formModel.projectCode" placeholder="请选择项目">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in projectList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
@ -23,8 +23,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ProjectList } from '@/scripts/ProjectConfig';
|
|
||||||
import { createProjectPackage } from '@/api/management/distribute';
|
import { createProjectPackage } from '@/api/management/distribute';
|
||||||
|
import { getBackProjectConfigList } from '@/api/projectConfig';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -33,18 +33,22 @@ export default {
|
|||||||
num: 1,
|
num: 1,
|
||||||
projectCode: ''
|
projectCode: ''
|
||||||
},
|
},
|
||||||
options: []
|
projectList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
ProjectList.forEach(item => {
|
getBackProjectConfigList().then(resp => {
|
||||||
this.options.push({label: item.label, value: item.value.toUpperCase()});
|
if (resp.data && resp.data.length > 0) {
|
||||||
|
this.projectList = resp.data;
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error(error);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow() {
|
doShow() {
|
||||||
this.centerDialogVisible = true;
|
this.centerDialogVisible = true;
|
||||||
this.formModel.projectCode = this.options[0].value;
|
this.formModel.projectCode = this.projectList[0].value;
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.centerDialogVisible = false;
|
this.centerDialogVisible = false;
|
||||||
|
@ -138,7 +138,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
parseTime(time) {
|
parseTime(time) {
|
||||||
if (!time) { return ''; }
|
if (!time) { return '0'; }
|
||||||
const hours = Math.floor(time / 3600);
|
const hours = Math.floor(time / 3600);
|
||||||
const minutes = Math.floor((time % 3600) / 60);
|
const minutes = Math.floor((time % 3600) / 60);
|
||||||
return hours + '小时' + minutes + '分';
|
return hours + '小时' + minutes + '分';
|
||||||
|
@ -1,97 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="mychart1" style="width:100%;height:100%"/>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import * as echarts from 'echarts';
|
|
||||||
import { getLessonList } from '@/api/management/userexam';
|
|
||||||
export default {
|
|
||||||
name: 'ExamStatistics',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
myChart2:null,
|
|
||||||
title:{
|
|
||||||
show:true,
|
|
||||||
subtext:'',
|
|
||||||
subtextStyle:{color:'#358ff8',fontSize:14},
|
|
||||||
text:'学习时长统计',
|
|
||||||
textAlign:'center',
|
|
||||||
left:'50%',
|
|
||||||
top:'5px',
|
|
||||||
textStyle:{
|
|
||||||
color:'#f00'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mounted() {
|
|
||||||
this.initChart()
|
|
||||||
this.loadData();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initChart(){
|
|
||||||
var chartDom1 = document.getElementById('mychart1');
|
|
||||||
this.myChart1 = echarts.init(chartDom1);
|
|
||||||
let option1={
|
|
||||||
title: this.title,
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'item',
|
|
||||||
formatter: function (params, ticket, callback) {
|
|
||||||
let value=params.data.value;
|
|
||||||
let hour=0;
|
|
||||||
let minu=0;
|
|
||||||
let seconds=0;
|
|
||||||
hour=Math.floor(value/3600);
|
|
||||||
minu=Math.floor((value%3600)/60);
|
|
||||||
seconds=Math.floor((value%3600)%60);
|
|
||||||
// hour=hour>9?hour:'0'+hour;
|
|
||||||
// minu=minu>9?minu:'0'+minu;
|
|
||||||
// seconds=seconds>9?seconds:'0'+seconds;
|
|
||||||
let temp=hour+'时'+minu+"分"+seconds+'秒';
|
|
||||||
let start=params.data.name?params.data.name+': ':params.data.name;
|
|
||||||
return '<p>'+start+temp+'</p>'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
color:['#358ff8','#91cb74','#f7c757','#ec6566','#73c0de','#4ca273','#ee8250','#9a60b4','#ea7ccc','#59eca9'],
|
|
||||||
legend: {orient: 'vertical',left: 'left',top:'65px'},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
data:[{value:0,name:''}],
|
|
||||||
label:{show:false},
|
|
||||||
radius: '60%',
|
|
||||||
top:'60px',
|
|
||||||
showEmptyCircle:true,
|
|
||||||
type: 'pie'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
option1 && this.myChart1 && this.myChart1.setOption(option1);
|
|
||||||
},
|
|
||||||
loadData(){
|
|
||||||
getLessonList().then(response => {
|
|
||||||
let timeList=response.data;
|
|
||||||
if(timeList){
|
|
||||||
let realList=[];
|
|
||||||
let allcount=0;
|
|
||||||
timeList.forEach(eachItem=>{
|
|
||||||
allcount+=parseInt(eachItem.duration);
|
|
||||||
realList.push({value:eachItem.duration,name:eachItem.statsProjectName});
|
|
||||||
})
|
|
||||||
let option=this.myChart1.getOption();
|
|
||||||
let hour=0;
|
|
||||||
let minu=0;
|
|
||||||
let seconds=0;
|
|
||||||
hour=Math.floor(allcount/3600);
|
|
||||||
minu=Math.floor((allcount%3600)/60);
|
|
||||||
seconds=Math.floor((allcount%3600)%60);
|
|
||||||
if(timeList.length==0){realList=[{value:0,name:''}]}
|
|
||||||
option.title[0].subtext="总时长: "+hour+'时'+minu+"分"+seconds+'秒';
|
|
||||||
option.series[0].data=realList;
|
|
||||||
option && this.myChart1 && this.myChart1.setOption(option);
|
|
||||||
}
|
|
||||||
}).catch(error=>{
|
|
||||||
this.$message.error(error.message)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -1,38 +1,60 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="statistics-box">
|
||||||
<div class="student_title_content">{{ '统计信息' }}</div>
|
<div class="student_title_content">{{ '统计信息' }}</div>
|
||||||
<el-button type="text" style="position: fixed;right: 20px;top: 70px;" @click="back">返回</el-button>
|
<el-button type="text" style="position: fixed;right: 20px;top: 70px;color: #fbfbfb;" @click="back">返回</el-button>
|
||||||
<div class="statisticChart">
|
<!-- <div class="statisticChart">-->
|
||||||
<div class="statisticChartLeft" >
|
<!-- <div id="mychart3" class="statisticChartRight" />-->
|
||||||
<!-- id="mychart1" -->
|
|
||||||
<exam-statistics/>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="statisticChartCenter"> -->
|
|
||||||
<!-- :creatorId="creatorId" :orgId="orgId" -->
|
|
||||||
<!-- <grade-statistics :userId="userId"/> -->
|
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<div id="mychart3" class="statisticChartRight" />
|
<div style="width: 90%;margin: 0 auto;">
|
||||||
|
<el-form :inline="true" :model="queryForm" class="demo-form-inline">
|
||||||
|
<el-form-item label="统计单位">
|
||||||
|
<el-select v-model="queryForm.timeUnit" placeholder="统计单位">
|
||||||
|
<el-option
|
||||||
|
v-for="item in timeUnitList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="统计时段">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryForm.times"
|
||||||
|
type="datetimerange"
|
||||||
|
:clearable="false"
|
||||||
|
format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="loadData">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div id="mychart4" style="width: 100%;height: 500px;margin-top: 50px;" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
// import GradeStatistics from './gradeStatistic.vue';
|
import { queryUserSimulationRecord } from '@/api/record';
|
||||||
import ExamStatistics from './examStatistic.vue';
|
import { timestampFormat } from '@/utils/date';
|
||||||
import { getSimulationTimeChart } from '@/api/management/userexam';
|
|
||||||
import { getSubSystemByProjectCode } from '@/api/trainingPlatform';
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StudentStatistics',
|
name: 'StudentStatistics',
|
||||||
// GradeStatistics
|
|
||||||
components: {
|
|
||||||
ExamStatistics
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
myChart3:null,
|
queryForm: {
|
||||||
// creatorId:'',
|
timeUnit: 'DAY',
|
||||||
// orgId:'',
|
times: []
|
||||||
// userId:'',
|
},
|
||||||
|
timeUnitList:[
|
||||||
|
{ label: '天', value: 'DAY' },
|
||||||
|
{ label: '月', value: 'MONTH' },
|
||||||
|
{ label: '年', value: 'YEAR' }
|
||||||
|
],
|
||||||
|
myChart:null,
|
||||||
title:{
|
title:{
|
||||||
show:true,
|
show:true,
|
||||||
subtext:'',
|
subtext:'',
|
||||||
@ -44,112 +66,115 @@ export default {
|
|||||||
textStyle:{
|
textStyle:{
|
||||||
color:'#f00'
|
color:'#f00'
|
||||||
}
|
}
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.initChart()
|
this.queryForm.times = [timestampFormat('YYYY-MM-DD HH:mm:ss', new Date() - 1000 * 60 * 60 * 24 * 7), timestampFormat('YYYY-MM-DD HH:mm:ss', new Date())];
|
||||||
|
this.initChart();
|
||||||
this.loadData();
|
this.loadData();
|
||||||
// this.userId=this.$store.state.user.id;
|
|
||||||
// this.orgId=this.$store.state.user.companyId;
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initChart() {
|
initChart() {
|
||||||
var chartDom3 = document.getElementById('mychart3');
|
const charDom = document.getElementById('mychart4');
|
||||||
this.myChart3 = echarts.init(chartDom3);
|
this.myChart = echarts.init(charDom);
|
||||||
let option3={
|
const option = {
|
||||||
title: this.title,
|
title:{
|
||||||
tooltip: {
|
show:true,
|
||||||
trigger: 'item',
|
text:'仿真时长统计',
|
||||||
formatter: function (params, ticket, callback) {
|
textAlign:'center',
|
||||||
let value=params.data.value;
|
left:'50%',
|
||||||
let hour=0;
|
top:'0',
|
||||||
let minu=0;
|
textStyle:{
|
||||||
let seconds=0;
|
color:'#fff',
|
||||||
hour=Math.floor(value/3600);
|
fontSize: 26
|
||||||
minu=Math.floor((value%3600)/60);
|
}
|
||||||
seconds=Math.floor((value%3600)%60);
|
},
|
||||||
// hour=hour>9?hour:'0'+hour;
|
xAxis: {
|
||||||
// minu=minu>9?minu:'0'+minu;
|
type: 'category',
|
||||||
// seconds=seconds>9?seconds:'0'+seconds;
|
name: '时长',
|
||||||
let temp=hour+'时'+minu+"分"+seconds+'秒';
|
axisLine: {
|
||||||
let start=params.data.name?params.data.name+': ':params.data.name;
|
lineStyle: {
|
||||||
return '<p>'+start+temp+'</p>'
|
color: '#fff',
|
||||||
|
width: 3
|
||||||
|
}
|
||||||
|
},
|
||||||
|
nameTextStyle: {
|
||||||
|
fontSize: 18
|
||||||
|
},
|
||||||
|
data: []
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
name: '时长',
|
||||||
|
nameTextStyle: {
|
||||||
|
fontSize: 18
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
formatter: '{value} 分钟'
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: '#fff',
|
||||||
|
width: 3
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
color:['#358ff8','#91cb74','#f7c757','#ec6566','#73c0de','#4ca273','#ee8250','#9a60b4','#ea7ccc','#59eca9'],
|
|
||||||
legend: {left: 'left',top:'65px',orient:'horizontal'},
|
|
||||||
// http://2i38984j47.qicp.vip/doc/UserExamController.html
|
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
data:[{value:0,name:''}],
|
data: [],
|
||||||
label:{show:false},
|
type: 'bar',
|
||||||
showEmptyCircle:true,
|
itemStyle: {
|
||||||
radius: '60%',
|
color: '#3c9bee'
|
||||||
top:'60px',
|
},
|
||||||
type: 'pie'
|
barMaxWidth: 20,
|
||||||
|
label: {
|
||||||
|
show: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
option3 && this.myChart3 && this.myChart3.setOption(option3);
|
this.myChart.setOption(option);
|
||||||
},
|
},
|
||||||
loadData() {
|
loadData() {
|
||||||
// getPublishLessonListByMapId({mapId:this.mapId}).then(response => {
|
const data = { timeUnit: this.queryForm.timeUnit, startTime: this.queryForm.times[0], endTime: this.queryForm.times[1] };
|
||||||
getSubSystemByProjectCode().then(response => {
|
queryUserSimulationRecord(data, this.$store.state.user.id).then(resp => {
|
||||||
let mapIdList = response.data;
|
const option = this.myChart.getOption();
|
||||||
if(mapIdList.length>0){
|
const dates = [];
|
||||||
getSimulationTimeChart(mapIdList[0].id).then(res=>{
|
const datas = [];
|
||||||
let list=mapIdList[0].children.find(child=>{return child.id=='Simulation'})
|
(resp.data || []).forEach(item => {
|
||||||
let dataMap={};
|
datas.push(Math.ceil(item.duration / 60));
|
||||||
if(list){
|
dates.push(item.timeSegment);
|
||||||
list.children.forEach(item=>{
|
|
||||||
dataMap[item.id]=item.name
|
|
||||||
})
|
|
||||||
}
|
|
||||||
let timeList=res.data;
|
|
||||||
if(timeList){
|
|
||||||
let realList=[];
|
|
||||||
let allcount=0;
|
|
||||||
timeList.forEach(eachItem=>{
|
|
||||||
let realtName=dataMap[eachItem.statsProjectId];
|
|
||||||
if(realtName){
|
|
||||||
allcount+=parseInt(eachItem.duration);
|
|
||||||
realList.push({value:eachItem.duration,name:realtName});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if(timeList.length==0){realList=[{value:0,name:''}]}
|
|
||||||
let option=this.myChart3.getOption();
|
|
||||||
option.series[0].data=realList;
|
|
||||||
let hour=0;
|
|
||||||
let minu=0;
|
|
||||||
let seconds=0;
|
|
||||||
hour=Math.floor(allcount/3600);
|
|
||||||
minu=Math.floor((allcount%3600)/60);
|
|
||||||
seconds=Math.floor((allcount%3600)%60);
|
|
||||||
option.title[0].subtext="总时长: "+hour+'时'+minu+"分"+seconds+'秒';
|
|
||||||
option && this.myChart3 && this.myChart3.setOption(option);
|
|
||||||
}
|
|
||||||
}).catch(error=>{
|
|
||||||
this.$message.error(error.message)
|
|
||||||
});
|
});
|
||||||
}
|
option.series[0].data = datas;
|
||||||
}).catch(error=>{
|
option.xAxis[0].data = dates;
|
||||||
this.$message.error(error.message)
|
option && this.myChart && this.myChart.setOption(option);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
this.$router.go(-1);
|
this.$router.go(-1);
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.statistics-box{
|
||||||
|
background: linear-gradient(to bottom, #01468B, #00172E);
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
.student_title_content {
|
.student_title_content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 20px 0 30px;
|
padding: 30px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
padding-left: 30px;
|
color: #fbfbfb;
|
||||||
|
}
|
||||||
|
/deep/.el-form-item__label{
|
||||||
|
color: #fbfbfb;
|
||||||
}
|
}
|
||||||
.statisticChart{
|
.statisticChart{
|
||||||
width:90%;
|
width:90%;
|
||||||
@ -163,11 +188,6 @@ export default {
|
|||||||
height: 500px;
|
height: 500px;
|
||||||
/* border:1px #ccc solid */
|
/* border:1px #ccc solid */
|
||||||
}
|
}
|
||||||
/* .statisticChartCenter{
|
|
||||||
width: 40%;
|
|
||||||
display: inline-block;
|
|
||||||
height: 500px;
|
|
||||||
} */
|
|
||||||
.statisticChartRight{
|
.statisticChartRight{
|
||||||
/* width: 30%; */
|
/* width: 30%; */
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
@ -10,8 +10,7 @@ import { getPermissionPage } from '@/api/permissionManage';
|
|||||||
import Create from './create';
|
import Create from './create';
|
||||||
import { getAllAbility } from '@/api/functionManage';
|
import { getAllAbility } from '@/api/functionManage';
|
||||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||||
import { ProjectList } from '@/scripts/ProjectConfig';
|
import { getBackProjectConfigList } from '@/api/projectConfig';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PermissionManage',
|
name: 'PermissionManage',
|
||||||
components: {
|
components: {
|
||||||
@ -41,6 +40,7 @@ export default {
|
|||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
|
projectList: [],
|
||||||
queryForm: {
|
queryForm: {
|
||||||
columnNum: 6,
|
columnNum: 6,
|
||||||
labelWidth: '100px',
|
labelWidth: '100px',
|
||||||
@ -164,11 +164,6 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
projectList() {
|
|
||||||
return ProjectList;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
created() {
|
||||||
this.getAllAbility();
|
this.getAllAbility();
|
||||||
if (this.tableHeight) {
|
if (this.tableHeight) {
|
||||||
@ -179,7 +174,17 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.queryForm.queryObject.permissionType.config.data = this.$ConstSelect.permissionTypeList;
|
this.queryForm.queryObject.permissionType.config.data = this.$ConstSelect.permissionTypeList;
|
||||||
this.queryForm.queryObject.projectCode.config.data = ProjectList;
|
getBackProjectConfigList().then(resp => {
|
||||||
|
if (resp.data && resp.data.length > 0) {
|
||||||
|
resp.data.forEach(item => {
|
||||||
|
const obj = { value: item.value.toLowerCase(), label: item.label };
|
||||||
|
this.projectList.push(obj);
|
||||||
|
});
|
||||||
|
this.queryForm.queryObject.projectCode.config.data = this.projectList;
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
// 获取地图
|
// 获取地图
|
||||||
getPublishMapListOnline().then(res => {
|
getPublishMapListOnline().then(res => {
|
||||||
res.data.forEach(elem => {
|
res.data.forEach(elem => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="PlanTitleBar">
|
<div id="PlanTitleBar">
|
||||||
<img class="logo" :src="logoImg">
|
<img class="logo" :src="loginProLogo">
|
||||||
<span> {{ mapName }}  </span>
|
<span> {{ mapName }}  </span>
|
||||||
<span v-if="runPlanName">({{ runPlanName }})</span>
|
<span v-if="runPlanName">({{ runPlanName }})</span>
|
||||||
<!-- <span class="system-close el-icon-close" @click="back" />-->
|
<!-- <span class="system-close el-icon-close" @click="back" />-->
|
||||||
@ -9,25 +9,24 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||||
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
import {mapGetters} from 'vuex';
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PlanTitleBar',
|
name: 'PlanTitleBar',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mapName: '',
|
mapName: '',
|
||||||
logoImg: ''
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapGetters('projectConfig', [
|
||||||
|
'loginProLogo'
|
||||||
|
]),
|
||||||
runPlanName() {
|
runPlanName() {
|
||||||
return this.$route.query.planName || '';
|
return this.$route.query.planName || '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const project = getSessionStorage('project');
|
|
||||||
this.logoImg = ProjectIcon[project];
|
|
||||||
if (this.$route.query.mapId) {
|
if (this.$route.query.mapId) {
|
||||||
getPublishMapInfo(this.$route.query.mapId).then(resp => {
|
getPublishMapInfo(this.$route.query.mapId).then(resp => {
|
||||||
this.mapName = resp.data.name;
|
this.mapName = resp.data.name;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<update-operate ref="updateMapInfo" @create="handleUpdate" />
|
<update-operate ref="updateMapInfo" @create="handleUpdate" />
|
||||||
<set-project ref="setProject" @refresh="reloadTable" />
|
<set-project ref="setProject" :project-list="projectList" @refresh="reloadTable" />
|
||||||
<copy-map ref="copyMap" @refresh="reloadTable" />
|
<copy-map ref="copyMap" @refresh="reloadTable" />
|
||||||
<local-map ref="localMap" />
|
<local-map ref="localMap" />
|
||||||
<export-map ref="exportMap" />
|
<export-map ref="exportMap" />
|
||||||
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPublishMapList, delPublishMap, putMapOnLine, putMapOffLine, simulationCheck, localImportMap, updatePublishMapInfo,
|
import { getPublishMapList, delPublishMap, putMapOnLine, putMapOffLine, simulationCheck, localImportMap, updatePublishMapInfo,
|
||||||
getPublishMapExport, getPublishMapImportNew, generateAncillaryData, allSimulationCheck } from '@/api/jmap/map';
|
getPublishMapExport, getPublishMapImportNew, generateAncillaryData, allSimulationCheck, generateTrainingData } from '@/api/jmap/map';
|
||||||
import { getLineCodeList } from '@/api/management/mapline';
|
import { getLineCodeList } from '@/api/management/mapline';
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
import UpdateOperate from './draft.vue';
|
import UpdateOperate from './draft.vue';
|
||||||
@ -37,8 +37,8 @@ import LocalMap from './localMap';
|
|||||||
import ExportMap from './exportMap';
|
import ExportMap from './exportMap';
|
||||||
import MapSort from './mapSort';
|
import MapSort from './mapSort';
|
||||||
import { superAdmin } from '@/router/index';
|
import { superAdmin } from '@/router/index';
|
||||||
import { ProjectList } from '@/scripts/ProjectConfig';
|
|
||||||
import { getPermissionQuickly } from '@/api/management/author';
|
import { getPermissionQuickly } from '@/api/management/author';
|
||||||
|
import { getBackProjectConfigList } from '@/api/projectConfig';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PublishMap',
|
name: 'PublishMap',
|
||||||
@ -57,6 +57,7 @@ export default {
|
|||||||
cityList: [],
|
cityList: [],
|
||||||
mapName: '',
|
mapName: '',
|
||||||
mapId: '',
|
mapId: '',
|
||||||
|
projectList: [],
|
||||||
permissionNum: 10,
|
permissionNum: 10,
|
||||||
lineCodeList: [],
|
lineCodeList: [],
|
||||||
pagerConfig: {
|
pagerConfig: {
|
||||||
@ -116,7 +117,7 @@ export default {
|
|||||||
title: '归属项目',
|
title: '归属项目',
|
||||||
prop: 'projectCode',
|
prop: 'projectCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return row.project ? this.$convertField((row.projectCode || '').toLowerCase(), ProjectList, ['value', 'label']) : '无'; },
|
columnValue: (row) => { return row.project ? this.$convertField((row.projectCode || ''), this.projectList, ['value', 'label']) : '无'; },
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -215,6 +216,10 @@ export default {
|
|||||||
{
|
{
|
||||||
name: '每日运行图管理',
|
name: '每日运行图管理',
|
||||||
handleClick: this.runPlanEveryDayManage
|
handleClick: this.runPlanEveryDayManage
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '生成实训',
|
||||||
|
handleClick: this.produceTraining
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -258,6 +263,13 @@ export default {
|
|||||||
});
|
});
|
||||||
this.queryForm.queryObject.lineCode.config.data = this.lineCodeList;
|
this.queryForm.queryObject.lineCode.config.data = this.lineCodeList;
|
||||||
});
|
});
|
||||||
|
getBackProjectConfigList().then(resp => {
|
||||||
|
if (resp.data && resp.data.length > 0) {
|
||||||
|
this.projectList = resp.data;
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleSetProject(index, row) {
|
handleSetProject(index, row) {
|
||||||
this.$refs.setProject.doShow(row);
|
this.$refs.setProject.doShow(row);
|
||||||
@ -491,6 +503,24 @@ export default {
|
|||||||
});
|
});
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
|
produceTraining(index, row) {
|
||||||
|
this.$confirm('是否生成实训?', this.$t('global.tips'), {
|
||||||
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
generateTrainingData([row.id]).then(res => {
|
||||||
|
if (res.data.length) {
|
||||||
|
const s = res.data.join(';');
|
||||||
|
this.$message.error(`生成实训失败!${s}`);
|
||||||
|
} else {
|
||||||
|
this.$message.success('生成实训成功!');
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
this.$message.error(`生成实训失败!${err.message}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
},
|
},
|
||||||
|
@ -2,12 +2,14 @@
|
|||||||
<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" />
|
||||||
<edit-subsystem ref="editSubsystem" @tableReload="reloadTable" />
|
<edit-subsystem ref="editSubsystem" @tableReload="reloadTable" />
|
||||||
|
<overlay-generation ref="overlayGeneration" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { queryTemplateMapFunPaged, deleteTemplateMapFunction } from '@/api/trainingPlatform';
|
import { queryTemplateMapFunPaged, deleteTemplateMapFunction } from '@/api/trainingPlatform';
|
||||||
import EditSubsystem from './edit';
|
import EditSubsystem from './edit';
|
||||||
|
import OverlayGeneration from './overlayGeneration';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
const simTypeMap = {
|
const simTypeMap = {
|
||||||
METRO: '地铁CBTC',
|
METRO: '地铁CBTC',
|
||||||
@ -17,7 +19,8 @@ const simTypeMap = {
|
|||||||
export default {
|
export default {
|
||||||
name: 'PublishMap',
|
name: 'PublishMap',
|
||||||
components: {
|
components: {
|
||||||
EditSubsystem
|
EditSubsystem,
|
||||||
|
OverlayGeneration
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -106,6 +109,7 @@ export default {
|
|||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{ text: '新建', handler: this.handleAddSubsystem },
|
{ text: '新建', handler: this.handleAddSubsystem },
|
||||||
|
{ text: '覆盖生成', handler: this.overlayGeneration },
|
||||||
{ text: '返回', handler: this.goBack }
|
{ text: '返回', handler: this.goBack }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -135,6 +139,9 @@ export default {
|
|||||||
handleAddSubsystem() {
|
handleAddSubsystem() {
|
||||||
this.$refs.editSubsystem.doShow();
|
this.$refs.editSubsystem.doShow();
|
||||||
},
|
},
|
||||||
|
overlayGeneration() {
|
||||||
|
this.$refs.overlayGeneration.doShow();
|
||||||
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload();
|
this.queryList.reload();
|
||||||
},
|
},
|
||||||
|
@ -0,0 +1,146 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="580px" :before-close="handleClose" center :close-on-click-modal="false">
|
||||||
|
<el-form ref="ruleForm" :model="formModel" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="地图:" prop="ids">
|
||||||
|
<el-select v-model="formModel.ids" multiple placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in mapIdList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button v-loading="loading" type="primary" @click="submit">{{ $t('global.confirm') }}</el-button>
|
||||||
|
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { generateMapFun } from '@/api/trainingPlatform';
|
||||||
|
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||||
|
export default {
|
||||||
|
name: 'OverlayGeneration',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
mapIdList: [],
|
||||||
|
dialogVisible: false,
|
||||||
|
formModel: {
|
||||||
|
ids: []
|
||||||
|
},
|
||||||
|
loading: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
rules() {
|
||||||
|
const crules = {
|
||||||
|
ids: [
|
||||||
|
{ required: true, message: '请选择需要重新生成的地图', trigger: 'change' }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
return crules;
|
||||||
|
},
|
||||||
|
title() {
|
||||||
|
return '覆盖生成线路功能';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
getPublishMapListOnline().then(response => {
|
||||||
|
this.mapIdList = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow() {
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ruleForm.resetFields();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
this.$refs.ruleForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.loading = true;
|
||||||
|
generateMapFun(this.formModel.ids).then(resp => {
|
||||||
|
if (resp.data && resp.data.length) {
|
||||||
|
let message = '';
|
||||||
|
resp.data.forEach(item => {
|
||||||
|
message = message + item + ';';
|
||||||
|
});
|
||||||
|
this.$messageBox(message);
|
||||||
|
} else {
|
||||||
|
this.$message.success('覆盖生成客户端成功!');
|
||||||
|
}
|
||||||
|
this.handleClose();
|
||||||
|
}).catch(error => {
|
||||||
|
this.$message.error(error.message);
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleClose() {
|
||||||
|
this.formModel = {
|
||||||
|
ids: []
|
||||||
|
};
|
||||||
|
this.$refs.ruleForm.resetFields();
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.chat-box-footer-create{
|
||||||
|
font-size: 16px;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
position: relative;
|
||||||
|
left: 5px;
|
||||||
|
top: 6px;
|
||||||
|
line-height: 30px;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: green;
|
||||||
|
border: none;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.chat-box-footer-send{
|
||||||
|
background: #F2F2F2;
|
||||||
|
right: 55px;
|
||||||
|
cursor: pointer;
|
||||||
|
.icon-yuyin{
|
||||||
|
color: #333;
|
||||||
|
font-size: 24px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
&.active{
|
||||||
|
.icon-yuyin{
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.close_icon{
|
||||||
|
position: absolute;
|
||||||
|
top: 8px;
|
||||||
|
left: 45px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#record_progress_bar{
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
</style>
|
@ -19,7 +19,7 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<el-select v-model="formModel.projectCode" :placeholder="this.$t('publish.pleaseSelectTheBelongsProject')">
|
<el-select v-model="formModel.projectCode" :placeholder="this.$t('publish.pleaseSelectTheBelongsProject')">
|
||||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in projectList" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -32,9 +32,16 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { setMapProject } from '@/api/jmap/map';
|
import { setMapProject } from '@/api/jmap/map';
|
||||||
import { getBackProjectConfigList } from '@/api/projectConfig';
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SetMapProject',
|
name: 'SetMapProject',
|
||||||
|
props: {
|
||||||
|
projectList: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
@ -50,18 +57,8 @@ export default {
|
|||||||
booleanValue: {
|
booleanValue: {
|
||||||
t: true,
|
t: true,
|
||||||
f: false
|
f: false
|
||||||
},
|
|
||||||
options: []
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
getBackProjectConfigList().then(resp => {
|
|
||||||
if (resp.data && resp.data.length > 0) {
|
|
||||||
this.options = resp.data;
|
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
};
|
||||||
console.error(error);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(row) {
|
doShow(row) {
|
||||||
|
@ -16,9 +16,18 @@
|
|||||||
<el-form-item label="联系方式:" prop="loginContectInformation" class="inlineBlock">
|
<el-form-item label="联系方式:" prop="loginContectInformation" class="inlineBlock">
|
||||||
<el-switch v-model="formModel.loginContectInformation" />
|
<el-switch v-model="formModel.loginContectInformation" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="展示版权:" prop="copyrightShow" class="inlineBlock">
|
||||||
|
<el-switch v-model="formModel.copyrightShow" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="关于系统:" prop="aboutSystem">
|
<el-form-item label="关于系统:" prop="aboutSystem">
|
||||||
<el-input v-model="formModel.aboutSystem" style="width: 400px;" size="small" />
|
<el-input v-model="formModel.aboutSystem" style="width: 400px;" size="small" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="底部栏公司信息:" prop="bottomCompanyInfo">
|
||||||
|
<el-input v-model="formModel.bottomCompanyInfo" style="width: 400px;" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="底部栏备案号:" prop="bottomRecordNumber">
|
||||||
|
<el-input v-model="formModel.bottomRecordNumber" style="width: 400px;" size="small" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="项目Logo:" prop="loginProLogo">
|
<el-form-item label="项目Logo:" prop="loginProLogo">
|
||||||
<div class="eachButton uploadLogo">
|
<div class="eachButton uploadLogo">
|
||||||
<img v-if="formModel.loginProLogo" :src="computedLoginLogo" :alt="computedLoginLogo" class="loginLogo">
|
<img v-if="formModel.loginProLogo" :src="computedLoginLogo" :alt="computedLoginLogo" class="loginLogo">
|
||||||
@ -49,6 +58,9 @@
|
|||||||
<el-form-item label="本地项目:" prop="localProject" class="inlineBlock">
|
<el-form-item label="本地项目:" prop="localProject" class="inlineBlock">
|
||||||
<el-switch v-model="formModel.localProject" />
|
<el-switch v-model="formModel.localProject" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="中航项目:" prop="isRichor" class="inlineBlock">
|
||||||
|
<el-switch v-model="formModel.isRichor" />
|
||||||
|
</el-form-item>
|
||||||
<br>
|
<br>
|
||||||
<el-form-item label="登陆后跳转路径:" prop="judgeRoute" class="inlineBlock">
|
<el-form-item label="登陆后跳转路径:" prop="judgeRoute" class="inlineBlock">
|
||||||
<el-input v-model="formModel.judgeRoute" style="width: 210px;" size="small" />
|
<el-input v-model="formModel.judgeRoute" style="width: 210px;" size="small" />
|
||||||
@ -89,6 +101,8 @@ export default {
|
|||||||
loginProLogo:'', // 登录页 logo
|
loginProLogo:'', // 登录页 logo
|
||||||
loginProLogoWidth:0, // 登录页 logo 宽度
|
loginProLogoWidth:0, // 登录页 logo 宽度
|
||||||
homeProLogoWidth:0, // 主页 logo 宽度
|
homeProLogoWidth:0, // 主页 logo 宽度
|
||||||
|
bottomCompanyInfo: '',
|
||||||
|
bottomRecordNumber: '',
|
||||||
|
|
||||||
browserTitle:'', // 浏览器页签名称
|
browserTitle:'', // 浏览器页签名称
|
||||||
homeTitle:'', // 导航栏名称
|
homeTitle:'', // 导航栏名称
|
||||||
@ -97,6 +111,8 @@ export default {
|
|||||||
caseShow:true, // 导航栏案例展示是否展示
|
caseShow:true, // 导航栏案例展示是否展示
|
||||||
helpShow:true, // 导航栏帮助展示是否展示
|
helpShow:true, // 导航栏帮助展示是否展示
|
||||||
localProject:false, // 是否本地项目
|
localProject:false, // 是否本地项目
|
||||||
|
isRichor: false, // 中航项目 控制联系我们展示中航联系方式
|
||||||
|
copyrightShow: false, // 展示版权
|
||||||
|
|
||||||
judgeRoute:'', // 跳转路径
|
judgeRoute:'', // 跳转路径
|
||||||
baseApiUrl:'', // api链接
|
baseApiUrl:'', // api链接
|
||||||
@ -146,6 +162,8 @@ export default {
|
|||||||
this.loginProLogoImg = this.formModel.loginProLogo;
|
this.loginProLogoImg = this.formModel.loginProLogo;
|
||||||
this.formModel.loginProLogoWidth = viewSetting.loginProLogoWidth || 0;
|
this.formModel.loginProLogoWidth = viewSetting.loginProLogoWidth || 0;
|
||||||
this.formModel.homeProLogoWidth = viewSetting.homeProLogoWidth || 0;
|
this.formModel.homeProLogoWidth = viewSetting.homeProLogoWidth || 0;
|
||||||
|
this.formModel.bottomCompanyInfo = viewSetting.bottomCompanyInfo || '';
|
||||||
|
this.formModel.bottomRecordNumber = viewSetting.bottomRecordNumber || '';
|
||||||
|
|
||||||
this.formModel.browserTitle = viewSetting.browserTitle || '';
|
this.formModel.browserTitle = viewSetting.browserTitle || '';
|
||||||
this.formModel.homeTitle = viewSetting.homeTitle || '';
|
this.formModel.homeTitle = viewSetting.homeTitle || '';
|
||||||
@ -154,6 +172,8 @@ export default {
|
|||||||
this.formModel.caseShow = viewSetting.caseShow || false;
|
this.formModel.caseShow = viewSetting.caseShow || false;
|
||||||
this.formModel.helpShow = viewSetting.helpShow || false;
|
this.formModel.helpShow = viewSetting.helpShow || false;
|
||||||
this.formModel.localProject = viewSetting.localProject || false;
|
this.formModel.localProject = viewSetting.localProject || false;
|
||||||
|
this.formModel.isRichor = viewSetting.isRichor || false;
|
||||||
|
this.formModel.copyrightShow = viewSetting.copyrightShow || false;
|
||||||
|
|
||||||
this.formModel.judgeRoute = viewSetting.judgeRoute || '';
|
this.formModel.judgeRoute = viewSetting.judgeRoute || '';
|
||||||
this.formModel.baseApiUrl = viewSetting.baseApiUrl || '';
|
this.formModel.baseApiUrl = viewSetting.baseApiUrl || '';
|
||||||
@ -173,6 +193,8 @@ export default {
|
|||||||
loginProLogo:'', // 登录页 logo
|
loginProLogo:'', // 登录页 logo
|
||||||
loginProLogoWidth:'', // 登录页 logo 宽度
|
loginProLogoWidth:'', // 登录页 logo 宽度
|
||||||
homeProLogoWidth:'', // 主页 logo 宽度
|
homeProLogoWidth:'', // 主页 logo 宽度
|
||||||
|
bottomCompanyInfo: '',
|
||||||
|
bottomRecordNumber: '',
|
||||||
|
|
||||||
browserTitle:'', // 浏览器页签名称
|
browserTitle:'', // 浏览器页签名称
|
||||||
homeTitle:'', // 导航栏名称
|
homeTitle:'', // 导航栏名称
|
||||||
@ -181,6 +203,8 @@ export default {
|
|||||||
caseShow:true, // 导航栏案例展示是否展示
|
caseShow:true, // 导航栏案例展示是否展示
|
||||||
helpShow:true, // 导航栏帮助展示是否展示
|
helpShow:true, // 导航栏帮助展示是否展示
|
||||||
localProject:false, // 是否本地项目
|
localProject:false, // 是否本地项目
|
||||||
|
isRichor: false, // 中航项目 控制联系我们展示中航联系方式
|
||||||
|
copyrightShow: false, // 展示版权
|
||||||
|
|
||||||
judgeRoute:'', // 跳转路径
|
judgeRoute:'', // 跳转路径
|
||||||
baseApiUrl:'', // api链接
|
baseApiUrl:'', // api链接
|
||||||
|
@ -1,118 +1,118 @@
|
|||||||
<template>
|
<!--<template>-->
|
||||||
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
<!-- <el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">-->
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<!-- <data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />-->
|
||||||
<span slot="footer" class="dialog-footer">
|
<!-- <span slot="footer" class="dialog-footer">-->
|
||||||
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<!-- <el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>-->
|
||||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
<!-- <el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>-->
|
||||||
</span>
|
<!-- </span>-->
|
||||||
</el-dialog>
|
<!-- </el-dialog>-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
|
|
||||||
<script>
|
<!--<script>-->
|
||||||
import { createProjectServer, updateProjectServer } from '@/api/projectServer';
|
<!--import { createProjectServer, updateProjectServer } from '@/api/projectServer';-->
|
||||||
export default {
|
<!--export default {-->
|
||||||
name: 'DeviceAdd',
|
<!-- name: 'DeviceAdd',-->
|
||||||
props: {
|
<!-- props: {-->
|
||||||
projectList: {
|
<!-- projectList: {-->
|
||||||
type: Array,
|
<!-- type: Array,-->
|
||||||
required: true
|
<!-- required: true-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
data() {
|
<!-- data() {-->
|
||||||
return {
|
<!-- return {-->
|
||||||
dialogVisible: false,
|
<!-- dialogVisible: false,-->
|
||||||
formModel: {
|
<!-- formModel: {-->
|
||||||
id: '',
|
<!-- id: '',-->
|
||||||
domainName: '',
|
<!-- domainName: '',-->
|
||||||
project: '',
|
<!-- project: '',-->
|
||||||
resourcesDomainName: ''
|
<!-- resourcesDomainName: ''-->
|
||||||
},
|
<!-- },-->
|
||||||
loading: false
|
<!-- loading: false-->
|
||||||
};
|
<!-- };-->
|
||||||
},
|
<!-- },-->
|
||||||
computed: {
|
<!-- computed: {-->
|
||||||
form() {
|
<!-- form() {-->
|
||||||
const form = {
|
<!-- const form = {-->
|
||||||
labelWidth: '120px',
|
<!-- labelWidth: '120px',-->
|
||||||
items: [
|
<!-- items: [-->
|
||||||
{ prop: 'domainName', label: '接口域名', type: 'text', required: true, placeholder: '请输入域名' },
|
<!-- { prop: 'domainName', label: '接口域名', type: 'text', required: true, placeholder: '请输入域名' },-->
|
||||||
{ prop: 'resourcesDomainName', label: '资源域名', type: 'text', required: true, placeholder: '请输入域名' },
|
<!-- { prop: 'resourcesDomainName', label: '资源域名', type: 'text', required: true, placeholder: '请输入域名' },-->
|
||||||
{ prop: 'project', label: '项目', type: 'select', required: true, options: this.projectList, placeholder: '请选择项目' }
|
<!-- { prop: 'project', label: '项目', type: 'select', required: true, options: this.projectList, placeholder: '请选择项目' }-->
|
||||||
]
|
<!-- ]-->
|
||||||
};
|
<!-- };-->
|
||||||
return form;
|
<!-- return form;-->
|
||||||
},
|
<!-- },-->
|
||||||
rules() {
|
<!-- rules() {-->
|
||||||
const crules = {
|
<!-- const crules = {-->
|
||||||
domainName: [
|
<!-- domainName: [-->
|
||||||
{ required: true, message: '请输入接口域名', trigger: 'blur' }
|
<!-- { required: true, message: '请输入接口域名', trigger: 'blur' }-->
|
||||||
],
|
<!-- ],-->
|
||||||
resourcesDomainName: [
|
<!-- resourcesDomainName: [-->
|
||||||
{ required: true, message: '请输入资源域名', trigger: 'blur' }
|
<!-- { required: true, message: '请输入资源域名', trigger: 'blur' }-->
|
||||||
],
|
<!-- ],-->
|
||||||
project: [
|
<!-- project: [-->
|
||||||
{ required: true, message: '请选择项目', trigger: 'change' }
|
<!-- { required: true, message: '请选择项目', trigger: 'change' }-->
|
||||||
]
|
<!-- ]-->
|
||||||
};
|
<!-- };-->
|
||||||
return crules;
|
<!-- return crules;-->
|
||||||
},
|
<!-- },-->
|
||||||
title() {
|
<!-- title() {-->
|
||||||
return this.formModel.id ? '修改项目域名' : '创建项目域名';
|
<!-- return this.formModel.id ? '修改项目域名' : '创建项目域名';-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
mounted() {
|
<!-- mounted() {-->
|
||||||
},
|
<!-- },-->
|
||||||
methods: {
|
<!-- methods: {-->
|
||||||
show(data) {
|
<!-- show(data) {-->
|
||||||
if (data) {
|
<!-- if (data) {-->
|
||||||
this.formModel.id = data.id;
|
<!-- this.formModel.id = data.id;-->
|
||||||
this.formModel.domainName = data.domainName;
|
<!-- this.formModel.domainName = data.domainName;-->
|
||||||
this.formModel.project = data.project;
|
<!-- this.formModel.project = data.project;-->
|
||||||
this.formModel.resourcesDomainName = data.resourcesDomainName;
|
<!-- this.formModel.resourcesDomainName = data.resourcesDomainName;-->
|
||||||
}
|
<!-- }-->
|
||||||
this.dialogVisible = true;
|
<!-- this.dialogVisible = true;-->
|
||||||
},
|
<!-- },-->
|
||||||
doSave() {
|
<!-- doSave() {-->
|
||||||
this.$refs.dataform.validateForm(() => {
|
<!-- this.$refs.dataform.validateForm(() => {-->
|
||||||
this.loading = true;
|
<!-- this.loading = true;-->
|
||||||
const data = {
|
<!-- const data = {-->
|
||||||
id: this.formModel.id,
|
<!-- id: this.formModel.id,-->
|
||||||
domainName: this.formModel.domainName,
|
<!-- domainName: this.formModel.domainName,-->
|
||||||
project: this.formModel.project.toUpperCase(),
|
<!-- project: this.formModel.project.toUpperCase(),-->
|
||||||
resourcesDomainName: this.formModel.resourcesDomainName
|
<!-- resourcesDomainName: this.formModel.resourcesDomainName-->
|
||||||
};
|
<!-- };-->
|
||||||
if (data.id) {
|
<!-- if (data.id) {-->
|
||||||
updateProjectServer(data.id, data).then(resp => {
|
<!-- updateProjectServer(data.id, data).then(resp => {-->
|
||||||
this.$message.success('修改项目域名数据成功!');
|
<!-- this.$message.success('修改项目域名数据成功!');-->
|
||||||
this.handleClose();
|
<!-- this.handleClose();-->
|
||||||
this.$emit('reloadTable');
|
<!-- this.$emit('reloadTable');-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error(error.message);
|
<!-- this.$message.error(error.message);-->
|
||||||
this.loading = false;
|
<!-- this.loading = false;-->
|
||||||
});
|
<!-- });-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
createProjectServer(data).then(resp => {
|
<!-- createProjectServer(data).then(resp => {-->
|
||||||
this.$message.success('创建项目域名数据成功!');
|
<!-- this.$message.success('创建项目域名数据成功!');-->
|
||||||
this.handleClose();
|
<!-- this.handleClose();-->
|
||||||
this.$emit('reloadTable');
|
<!-- this.$emit('reloadTable');-->
|
||||||
}).catch(error => {
|
<!-- }).catch(error => {-->
|
||||||
this.$message.error(error.message);
|
<!-- this.$message.error(error.message);-->
|
||||||
this.loading = false;
|
<!-- this.loading = false;-->
|
||||||
});
|
<!-- });-->
|
||||||
}
|
<!-- }-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
handleClose() {
|
<!-- handleClose() {-->
|
||||||
this.formModel = {
|
<!-- this.formModel = {-->
|
||||||
id: '',
|
<!-- id: '',-->
|
||||||
domainName: '',
|
<!-- domainName: '',-->
|
||||||
project: '',
|
<!-- project: '',-->
|
||||||
resourcesDomainName: ''
|
<!-- resourcesDomainName: ''-->
|
||||||
};
|
<!-- };-->
|
||||||
this.$refs.dataform.resetForm();
|
<!-- this.$refs.dataform.resetForm();-->
|
||||||
this.dialogVisible = false;
|
<!-- this.dialogVisible = false;-->
|
||||||
this.loading = false;
|
<!-- this.loading = false;-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
};
|
<!--};-->
|
||||||
</script>
|
<!--</script>-->
|
||||||
|
@ -1,166 +1,166 @@
|
|||||||
<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" />-->
|
||||||
<add-server ref="addServer" :project-list="projectList" @reloadTable="reloadTable" />
|
<!-- <add-server ref="addServer" :project-list="projectList" @reloadTable="reloadTable" />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
|
|
||||||
<script>
|
<!--<script>-->
|
||||||
import { projectServerPaging, deleteProjectServer } from '@/api/projectServer';
|
<!--import { projectServerPaging, deleteProjectServer } from '@/api/projectServer';-->
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
<!--import { getSessionStorage } from '@/utils/auth';-->
|
||||||
import { ProjectList } from '@/scripts/ProjectConfig';
|
<!--import { ProjectList } from '@/scripts/ProjectConfig';-->
|
||||||
import AddServer from './add';
|
<!--import AddServer from './add';-->
|
||||||
export default {
|
<!--export default {-->
|
||||||
name: 'DeviceManage',
|
<!-- name: 'DeviceManage',-->
|
||||||
components: {
|
<!-- components: {-->
|
||||||
AddServer
|
<!-- AddServer-->
|
||||||
},
|
<!-- },-->
|
||||||
data() {
|
<!-- data() {-->
|
||||||
return {
|
<!-- return {-->
|
||||||
examResultList: [],
|
<!-- examResultList: [],-->
|
||||||
url: '',
|
<!-- url: '',-->
|
||||||
pagerConfig: {
|
<!-- pagerConfig: {-->
|
||||||
pageSize: 'pageSize',
|
<!-- pageSize: 'pageSize',-->
|
||||||
pageIndex: 'pageNum'
|
<!-- pageIndex: 'pageNum'-->
|
||||||
},
|
<!-- },-->
|
||||||
queryForm: {
|
<!-- queryForm: {-->
|
||||||
labelWidth: '120px',
|
<!-- labelWidth: '120px',-->
|
||||||
beforeQuery: this.beforeQuery,
|
<!-- beforeQuery: this.beforeQuery,-->
|
||||||
reset: true,
|
<!-- reset: true,-->
|
||||||
queryObject: {
|
<!-- queryObject: {-->
|
||||||
project: {
|
<!-- project: {-->
|
||||||
type: 'select',
|
<!-- type: 'select',-->
|
||||||
label: '项目:',
|
<!-- label: '项目:',-->
|
||||||
config: {
|
<!-- config: {-->
|
||||||
data: []
|
<!-- data: []-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
|
|
||||||
},
|
<!-- },-->
|
||||||
queryList: {
|
<!-- queryList: {-->
|
||||||
query: projectServerPaging,
|
<!-- query: projectServerPaging,-->
|
||||||
selectCheckShow: false,
|
<!-- selectCheckShow: false,-->
|
||||||
indexShow: true,
|
<!-- indexShow: true,-->
|
||||||
columns: [
|
<!-- columns: [-->
|
||||||
{
|
<!-- {-->
|
||||||
title: '接口域名',
|
<!-- title: '接口域名',-->
|
||||||
prop: 'domainName'
|
<!-- prop: 'domainName'-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
title: '资源域名',
|
<!-- title: '资源域名',-->
|
||||||
prop: 'resourcesDomainName'
|
<!-- prop: 'resourcesDomainName'-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
title: '项目名称',
|
<!-- title: '项目名称',-->
|
||||||
prop: 'projectCode',
|
<!-- prop: 'projectCode',-->
|
||||||
type: 'tag',
|
<!-- type: 'tag',-->
|
||||||
columnValue: (row) => { return this.handleProjectName(row.project, this.projectList); },
|
<!-- columnValue: (row) => { return this.handleProjectName(row.project, this.projectList); },-->
|
||||||
tagType: (row) => { return 'success'; }
|
<!-- tagType: (row) => { return 'success'; }-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
title: '创建时间',
|
<!-- title: '创建时间',-->
|
||||||
prop: 'createTime',
|
<!-- prop: 'createTime',-->
|
||||||
type: 'tag',
|
<!-- type: 'tag',-->
|
||||||
columnValue: (row) => { return this.handleTime(row.createTime); },
|
<!-- columnValue: (row) => { return this.handleTime(row.createTime); },-->
|
||||||
tagType: (row) => { return 'success'; }
|
<!-- tagType: (row) => { return 'success'; }-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
type: 'button',
|
<!-- type: 'button',-->
|
||||||
title: this.$t('global.operate'),
|
<!-- title: this.$t('global.operate'),-->
|
||||||
width: '300',
|
<!-- width: '300',-->
|
||||||
buttons: [
|
<!-- buttons: [-->
|
||||||
{
|
<!-- {-->
|
||||||
name: '编辑',
|
<!-- name: '编辑',-->
|
||||||
handleClick: this.editConfig
|
<!-- handleClick: this.editConfig-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
name: this.$t('global.delete'),
|
<!-- name: this.$t('global.delete'),-->
|
||||||
handleClick: this.handleDelete,
|
<!-- handleClick: this.handleDelete,-->
|
||||||
type: 'danger'
|
<!-- type: 'danger'-->
|
||||||
}
|
<!-- }-->
|
||||||
]
|
<!-- ]-->
|
||||||
}
|
<!-- }-->
|
||||||
],
|
<!-- ],-->
|
||||||
actions: [
|
<!-- actions: [-->
|
||||||
{ text: this.$t('global.add'), handler: this.createProjectServer}
|
<!-- { text: this.$t('global.add'), handler: this.createProjectServer}-->
|
||||||
]
|
<!-- ]-->
|
||||||
},
|
<!-- },-->
|
||||||
currentModel: {}
|
<!-- currentModel: {}-->
|
||||||
};
|
<!-- };-->
|
||||||
},
|
<!-- },-->
|
||||||
computed: {
|
<!-- computed: {-->
|
||||||
projectCode() {
|
<!-- projectCode() {-->
|
||||||
return this.projectMap[getSessionStorage('project')];
|
<!-- return this.projectMap[getSessionStorage('project')];-->
|
||||||
},
|
<!-- },-->
|
||||||
projectList() {
|
<!-- projectList() {-->
|
||||||
return [{value: 'default', label: '默认'}, { value: 'test', label: '测试' }, ...ProjectList];
|
<!-- return [{value: 'default', label: '默认'}, { value: 'test', label: '测试' }, ...ProjectList];-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
mounted() {
|
<!-- mounted() {-->
|
||||||
this.queryForm.queryObject.project.config.data = this.projectList;
|
<!-- this.queryForm.queryObject.project.config.data = this.projectList;-->
|
||||||
},
|
<!-- },-->
|
||||||
methods: {
|
<!-- methods: {-->
|
||||||
createProjectDevice() {
|
<!-- createProjectDevice() {-->
|
||||||
this.$refs.add.show();
|
<!-- this.$refs.add.show();-->
|
||||||
},
|
<!-- },-->
|
||||||
beforeQuery(params) {
|
<!-- beforeQuery(params) {-->
|
||||||
params.project = params.project.toUpperCase();
|
<!-- params.project = params.project.toUpperCase();-->
|
||||||
return params;
|
<!-- return params;-->
|
||||||
},
|
<!-- },-->
|
||||||
computation(fieldValue, type) {
|
<!-- computation(fieldValue, type) {-->
|
||||||
let list = [];
|
<!-- let list = [];-->
|
||||||
if (type === 'projectType') {
|
<!-- if (type === 'projectType') {-->
|
||||||
list = this.projectList;
|
<!-- list = this.projectList;-->
|
||||||
} else if ( type === 'deviceType' ) {
|
<!-- } else if ( type === 'deviceType' ) {-->
|
||||||
list = this.deviceTypeList;
|
<!-- list = this.deviceTypeList;-->
|
||||||
}
|
<!-- }-->
|
||||||
let value = '';
|
<!-- let value = '';-->
|
||||||
list.forEach((elem) => {
|
<!-- list.forEach((elem) => {-->
|
||||||
elem.label = fieldValue;
|
<!-- elem.label = fieldValue;-->
|
||||||
value = elem.value;
|
<!-- value = elem.value;-->
|
||||||
});
|
<!-- });-->
|
||||||
return value;
|
<!-- return value;-->
|
||||||
},
|
<!-- },-->
|
||||||
handleTime(time) {
|
<!-- handleTime(time) {-->
|
||||||
const timeList = time.split('T');
|
<!-- const timeList = time.split('T');-->
|
||||||
let newTime = '';
|
<!-- let newTime = '';-->
|
||||||
if (timeList.length > 1) {
|
<!-- if (timeList.length > 1) {-->
|
||||||
newTime = timeList[0] + ' ' + timeList[1];
|
<!-- newTime = timeList[0] + ' ' + timeList[1];-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
newTime = time;
|
<!-- newTime = time;-->
|
||||||
}
|
<!-- }-->
|
||||||
return newTime;
|
<!-- return newTime;-->
|
||||||
},
|
<!-- },-->
|
||||||
// 删除
|
<!-- // 删除-->
|
||||||
handleDelete(index, row) {
|
<!-- handleDelete(index, row) {-->
|
||||||
this.$confirm('此操作将删除该域名数据!', this.$t('global.tips'), {
|
<!-- this.$confirm('此操作将删除该域名数据!', this.$t('global.tips'), {-->
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
<!-- confirmButtonText: this.$t('global.confirm'),-->
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
<!-- cancelButtonText: this.$t('global.cancel'),-->
|
||||||
type: 'warning'
|
<!-- type: 'warning'-->
|
||||||
}).then(() => {
|
<!-- }).then(() => {-->
|
||||||
deleteProjectServer(row.id).then(response => {
|
<!-- deleteProjectServer(row.id).then(response => {-->
|
||||||
this.$message.success(this.$t('system.deleteSuccess'));
|
<!-- this.$message.success(this.$t('system.deleteSuccess'));-->
|
||||||
this.reloadTable();
|
<!-- this.reloadTable();-->
|
||||||
}).catch(() => {
|
<!-- }).catch(() => {-->
|
||||||
this.reloadTable();
|
<!-- this.reloadTable();-->
|
||||||
this.$messageBox(this.$t('error.deleteFailed'));
|
<!-- this.$messageBox(this.$t('error.deleteFailed'));-->
|
||||||
});
|
<!-- });-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
handleProjectName(projectCode, projectList) {
|
<!-- handleProjectName(projectCode, projectList) {-->
|
||||||
const project = projectList.find(elem => elem.value.toUpperCase() === projectCode);
|
<!-- const project = projectList.find(elem => elem.value.toUpperCase() === projectCode);-->
|
||||||
return project ? project.label : '无效项目';
|
<!-- return project ? project.label : '无效项目';-->
|
||||||
},
|
<!-- },-->
|
||||||
createProjectServer() {
|
<!-- createProjectServer() {-->
|
||||||
this.$refs.addServer.show();
|
<!-- this.$refs.addServer.show();-->
|
||||||
},
|
<!-- },-->
|
||||||
editConfig(index, row) {
|
<!-- editConfig(index, row) {-->
|
||||||
this.$refs.addServer.show(row);
|
<!-- this.$refs.addServer.show(row);-->
|
||||||
},
|
<!-- },-->
|
||||||
reloadTable() {
|
<!-- reloadTable() {-->
|
||||||
this.queryList.reload();
|
<!-- this.queryList.reload();-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
};
|
<!--};-->
|
||||||
</script>
|
<!--</script>-->
|
||||||
|
@ -1,201 +1,201 @@
|
|||||||
<template>
|
<!--<template>-->
|
||||||
<div>
|
<!-- <div>-->
|
||||||
<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" />-->
|
||||||
<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>-->
|
||||||
</span>
|
<!-- </span>-->
|
||||||
</el-dialog>
|
<!-- </el-dialog>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
<script>
|
<!--<script>-->
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
<!--import ConstConfig from '@/scripts/ConstConfig';-->
|
||||||
import {createMapSubSystem, updateSubSystem, generateMapSystem, generateAppointMapSystem} from '@/api/trainingPlatform';
|
<!--import {createMapSubSystem, updateSubSystem, generateMapSystem, generateAppointMapSystem} from '@/api/trainingPlatform';-->
|
||||||
import { ProjectList} from '@/scripts/ProjectConfig';
|
<!--import { ProjectList} from '@/scripts/ProjectConfig';-->
|
||||||
import Cookies from 'js-cookie';
|
<!--import Cookies from 'js-cookie';-->
|
||||||
export default {
|
<!--export default {-->
|
||||||
name: 'CreateSubSystem',
|
<!-- name: 'CreateSubSystem',-->
|
||||||
props: {
|
<!-- props: {-->
|
||||||
mapList:{
|
<!-- mapList:{-->
|
||||||
required:true,
|
<!-- required:true,-->
|
||||||
type:Array
|
<!-- type:Array-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
data() {
|
<!-- data() {-->
|
||||||
return {
|
<!-- return {-->
|
||||||
dialogVisible: false,
|
<!-- dialogVisible: false,-->
|
||||||
disabled:null,
|
<!-- disabled:null,-->
|
||||||
productList:[],
|
<!-- productList:[],-->
|
||||||
typeList:[],
|
<!-- typeList:[],-->
|
||||||
title:'',
|
<!-- title:'',-->
|
||||||
isAdd:true,
|
<!-- isAdd:true,-->
|
||||||
isGernerate:false,
|
<!-- isGernerate:false,-->
|
||||||
formModel:{
|
<!-- formModel:{-->
|
||||||
customized:'',
|
<!-- customized:'',-->
|
||||||
mapId:'',
|
<!-- mapId:'',-->
|
||||||
name: '',
|
<!-- name: '',-->
|
||||||
prdType: '',
|
<!-- prdType: '',-->
|
||||||
type: '',
|
<!-- type: '',-->
|
||||||
newApi: false,
|
<!-- newApi: false,-->
|
||||||
appoint: false,
|
<!-- appoint: false,-->
|
||||||
id:null
|
<!-- id:null-->
|
||||||
}
|
<!-- }-->
|
||||||
};
|
<!-- };-->
|
||||||
},
|
<!-- },-->
|
||||||
computed: {
|
<!-- computed: {-->
|
||||||
prdTypeList() {
|
<!-- prdTypeList() {-->
|
||||||
const productTypeList = ConstConfig.ConstSelect.prdType;
|
<!-- const productTypeList = ConstConfig.ConstSelect.prdType;-->
|
||||||
return Cookies.get('user_lang') == 'en'
|
<!-- return Cookies.get('user_lang') == 'en'-->
|
||||||
? productTypeList.map(elem => { return { value: elem.value, label: elem.enlabel }; })
|
<!-- ? productTypeList.map(elem => { return { value: elem.value, label: elem.enlabel }; })-->
|
||||||
: productTypeList.map(elem => { return { value: elem.value, label: elem.label }; });
|
<!-- : productTypeList.map(elem => { return { value: elem.value, label: elem.label }; });-->
|
||||||
},
|
<!-- },-->
|
||||||
form() {
|
<!-- form() {-->
|
||||||
let form = {};
|
<!-- let form = {};-->
|
||||||
if (this.isAdd) {
|
<!-- if (this.isAdd) {-->
|
||||||
// 新增
|
<!-- // 新增-->
|
||||||
form = {
|
<!-- form = {-->
|
||||||
labelWidth: '150px',
|
<!-- labelWidth: '150px',-->
|
||||||
items: [
|
<!-- items: [-->
|
||||||
{ prop: 'customized', label: this.$t('systemGenerate.customized'), type: 'select', required: true, options: ProjectList},
|
<!-- { prop: 'customized', label: this.$t('systemGenerate.customized'), type: 'select', required: true, options: ProjectList},-->
|
||||||
{ prop: 'mapId', label: this.$t('systemGenerate.mapName'), type: 'select', required: true, options: this.mapList},
|
<!-- { prop: 'mapId', label: this.$t('systemGenerate.mapName'), type: 'select', required: true, options: this.mapList},-->
|
||||||
{ prop: 'prdType', label: this.$t('system.prdType'), type: 'select', required: true, options:this.prdTypeList},
|
<!-- { prop: 'prdType', label: this.$t('system.prdType'), type: 'select', required: true, options:this.prdTypeList},-->
|
||||||
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true},
|
<!-- { prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true},-->
|
||||||
{ prop: 'type', label: this.$t('systemGenerate.type'), type: 'select', required: true, options: this.typeList}
|
<!-- { prop: 'type', label: this.$t('systemGenerate.type'), type: 'select', required: true, options: this.typeList}-->
|
||||||
]
|
<!-- ]-->
|
||||||
};
|
<!-- };-->
|
||||||
} else if (this.isGernerate) {
|
<!-- } else if (this.isGernerate) {-->
|
||||||
// 一键生成
|
<!-- // 一键生成-->
|
||||||
form = {
|
<!-- form = {-->
|
||||||
labelWidth: '150px',
|
<!-- labelWidth: '150px',-->
|
||||||
items: [
|
<!-- items: [-->
|
||||||
{ prop: 'mapId', label: this.$t('systemGenerate.mapName'), type: 'select', required: true, options: this.mapList},
|
<!-- { prop: 'mapId', label: this.$t('systemGenerate.mapName'), type: 'select', required: true, options: this.mapList},-->
|
||||||
{ prop: 'appoint', label: '是否指定生成', type: 'switch'},
|
<!-- { prop: 'appoint', label: '是否指定生成', type: 'switch'},-->
|
||||||
{ prop: 'prdType', label: '产品类型', type: 'select', required: true, options: this.prdTypeList, show: this.formModel.appoint }
|
<!-- { prop: 'prdType', label: '产品类型', type: 'select', required: true, options: this.prdTypeList, show: this.formModel.appoint }-->
|
||||||
]
|
<!-- ]-->
|
||||||
};
|
<!-- };-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
// 修改
|
<!-- // 修改-->
|
||||||
form = {
|
<!-- form = {-->
|
||||||
labelWidth: '150px',
|
<!-- labelWidth: '150px',-->
|
||||||
items: [
|
<!-- items: [-->
|
||||||
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true},
|
<!-- { prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true},-->
|
||||||
{ prop: 'newApi', label: '是否使用新API', type: 'switch' }
|
<!-- { prop: 'newApi', label: '是否使用新API', type: 'switch' }-->
|
||||||
]
|
<!-- ]-->
|
||||||
};
|
<!-- };-->
|
||||||
}
|
<!-- }-->
|
||||||
return form;
|
<!-- return form;-->
|
||||||
},
|
<!-- },-->
|
||||||
rules() {
|
<!-- rules() {-->
|
||||||
let crules = {};
|
<!-- let crules = {};-->
|
||||||
crules = {customized:[
|
<!-- crules = {customized:[-->
|
||||||
{ required: true, message: this.$t('systemGenerate.selectProject'), trigger: 'change'}
|
<!-- { required: true, message: this.$t('systemGenerate.selectProject'), trigger: 'change'}-->
|
||||||
],
|
<!-- ],-->
|
||||||
mapId:[
|
<!-- mapId:[-->
|
||||||
{ required: true, message: this.$t('systemGenerate.selectMap'), trigger: 'change'}
|
<!-- { required: true, message: this.$t('systemGenerate.selectMap'), trigger: 'change'}-->
|
||||||
],
|
<!-- ],-->
|
||||||
name: [
|
<!-- name: [-->
|
||||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'blur' },
|
<!-- { required: true, message: this.$t('systemGenerate.inputName'), trigger: 'blur' },-->
|
||||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'change' }
|
<!-- { required: true, message: this.$t('systemGenerate.inputName'), trigger: 'change' }-->
|
||||||
],
|
<!-- ],-->
|
||||||
type:[
|
<!-- type:[-->
|
||||||
{ required: true, message: this.$t('systemGenerate.selectType'), trigger: 'change'}
|
<!-- { required: true, message: this.$t('systemGenerate.selectType'), trigger: 'change'}-->
|
||||||
],
|
<!-- ],-->
|
||||||
prdType:[
|
<!-- prdType:[-->
|
||||||
{ required: true, message: this.$t('rules.productTypeInput'), trigger: 'change'}
|
<!-- { required: true, message: this.$t('rules.productTypeInput'), trigger: 'change'}-->
|
||||||
]
|
<!-- ]-->
|
||||||
};
|
<!-- };-->
|
||||||
return crules;
|
<!-- return crules;-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
mounted() {
|
<!-- mounted() {-->
|
||||||
this.loadInitData();
|
<!-- this.loadInitData();-->
|
||||||
},
|
<!-- },-->
|
||||||
methods:{
|
<!-- methods:{-->
|
||||||
loadInitData() {
|
<!-- loadInitData() {-->
|
||||||
const customeredProductType = ConstConfig.ConstSelect.customeredProductType;
|
<!-- const customeredProductType = ConstConfig.ConstSelect.customeredProductType;-->
|
||||||
this.typeList = Cookies.get('user_lang') == 'en'
|
<!-- this.typeList = Cookies.get('user_lang') == 'en'-->
|
||||||
? customeredProductType.map(elem => { return { value: elem.value, label: elem.enlabel }; })
|
<!-- ? customeredProductType.map(elem => { return { value: elem.value, label: elem.enlabel }; })-->
|
||||||
: customeredProductType.map(elem => { return { value: elem.value, label: elem.label }; });
|
<!-- : customeredProductType.map(elem => { return { value: elem.value, label: elem.label }; });-->
|
||||||
},
|
<!-- },-->
|
||||||
doShow({type, row}) {
|
<!-- doShow({type, row}) {-->
|
||||||
if (row) {
|
<!-- if (row) {-->
|
||||||
this.title = this.$t('systemGenerate.modifySubSystem');
|
<!-- this.title = this.$t('systemGenerate.modifySubSystem');-->
|
||||||
this.isAdd = false;
|
<!-- this.isAdd = false;-->
|
||||||
this.isGernerate = false;
|
<!-- this.isGernerate = false;-->
|
||||||
this.formModel.name = row.name;
|
<!-- this.formModel.name = row.name;-->
|
||||||
this.formModel.id = row.id;
|
<!-- this.formModel.id = row.id;-->
|
||||||
this.formModel.newApi = row.newApi || false;
|
<!-- this.formModel.newApi = row.newApi || false;-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
if (type == 'add') {
|
<!-- if (type == 'add') {-->
|
||||||
this.title = this.$t('systemGenerate.createSubSystem');
|
<!-- this.title = this.$t('systemGenerate.createSubSystem');-->
|
||||||
this.isAdd = true;
|
<!-- this.isAdd = true;-->
|
||||||
this.isGernerate = false;
|
<!-- this.isGernerate = false;-->
|
||||||
this.formModel.mapId = '';
|
<!-- this.formModel.mapId = '';-->
|
||||||
this.formModel.name = '';
|
<!-- this.formModel.name = '';-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
this.title = '生成子系统';
|
<!-- this.title = '生成子系统';-->
|
||||||
this.isAdd = false;
|
<!-- this.isAdd = false;-->
|
||||||
this.isGernerate = true;
|
<!-- this.isGernerate = true;-->
|
||||||
this.formModel.mapId = '';
|
<!-- this.formModel.mapId = '';-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
this.dialogVisible = true;
|
<!-- this.dialogVisible = true;-->
|
||||||
this.$nextTick(()=>{
|
<!-- this.$nextTick(()=>{-->
|
||||||
this.$refs.dataform.clearValidate();
|
<!-- this.$refs.dataform.clearValidate();-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
doCreate() {
|
<!-- doCreate() {-->
|
||||||
const self = this;
|
<!-- const self = this;-->
|
||||||
this.$refs.dataform.validateForm(() => {
|
<!-- this.$refs.dataform.validateForm(() => {-->
|
||||||
if (this.isAdd) {
|
<!-- if (this.isAdd) {-->
|
||||||
delete this.formModel.id;
|
<!-- delete this.formModel.id;-->
|
||||||
createMapSubSystem(this.formModel).then(response => {
|
<!-- createMapSubSystem(this.formModel).then(response => {-->
|
||||||
this.$message.success(this.$t('systemGenerate.createMapSystemSuccess'));
|
<!-- this.$message.success(this.$t('systemGenerate.createMapSystemSuccess'));-->
|
||||||
self.$emit('reloadTable');
|
<!-- self.$emit('reloadTable');-->
|
||||||
}).catch(() => {
|
<!-- }).catch(() => {-->
|
||||||
this.$messageBox(this.$t('systemGenerate.createMapSystemFail'));
|
<!-- this.$messageBox(this.$t('systemGenerate.createMapSystemFail'));-->
|
||||||
});
|
<!-- });-->
|
||||||
} else if (this.isGernerate) {
|
<!-- } else if (this.isGernerate) {-->
|
||||||
if (this.formModel.appoint) {
|
<!-- if (this.formModel.appoint) {-->
|
||||||
generateAppointMapSystem(this.formModel.mapId, this.formModel.prdType).then(resp => {
|
<!-- generateAppointMapSystem(this.formModel.mapId, this.formModel.prdType).then(resp => {-->
|
||||||
this.$message.success('生成指定子系统成功!');
|
<!-- this.$message.success('生成指定子系统成功!');-->
|
||||||
self.$emit('reloadTable');
|
<!-- self.$emit('reloadTable');-->
|
||||||
}).catch(() => {
|
<!-- }).catch(() => {-->
|
||||||
this.$messageBox('生成指定子系统异常!');
|
<!-- this.$messageBox('生成指定子系统异常!');-->
|
||||||
});
|
<!-- });-->
|
||||||
} else {
|
<!-- } else {-->
|
||||||
generateMapSystem(this.formModel.mapId).then(response => {
|
<!-- generateMapSystem(this.formModel.mapId).then(response => {-->
|
||||||
this.$message.success(this.$t('systemGenerate.generateSuccess'));
|
<!-- this.$message.success(this.$t('systemGenerate.generateSuccess'));-->
|
||||||
self.$emit('reloadTable');
|
<!-- self.$emit('reloadTable');-->
|
||||||
}).catch(() => {
|
<!-- }).catch(() => {-->
|
||||||
this.$messageBox(this.$t('systemGenerate.generateFail'));
|
<!-- this.$messageBox(this.$t('systemGenerate.generateFail'));-->
|
||||||
});
|
<!-- });-->
|
||||||
}
|
<!-- }-->
|
||||||
|
|
||||||
} else {
|
<!-- } else {-->
|
||||||
const datainfo = {name: this.formModel.name, newApi: this.formModel.newApi};
|
<!-- const datainfo = {name: this.formModel.name, newApi: this.formModel.newApi};-->
|
||||||
updateSubSystem(this.formModel.id, datainfo).then(response => {
|
<!-- updateSubSystem(this.formModel.id, datainfo).then(response => {-->
|
||||||
this.$message.success(this.$t('systemGenerate.updateMapSystemSuccess'));
|
<!-- this.$message.success(this.$t('systemGenerate.updateMapSystemSuccess'));-->
|
||||||
self.$emit('reloadTable');
|
<!-- self.$emit('reloadTable');-->
|
||||||
}).catch(() => {
|
<!-- }).catch(() => {-->
|
||||||
this.$messageBox(this.$t('systemGenerate.updateMapSystemFail'));
|
<!-- this.$messageBox(this.$t('systemGenerate.updateMapSystemFail'));-->
|
||||||
});
|
<!-- });-->
|
||||||
}
|
<!-- }-->
|
||||||
self.doClose();
|
<!-- self.doClose();-->
|
||||||
});
|
<!-- });-->
|
||||||
},
|
<!-- },-->
|
||||||
doClose() {
|
<!-- doClose() {-->
|
||||||
this.dialogVisible = false;
|
<!-- this.dialogVisible = false;-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
};
|
<!--};-->
|
||||||
</script>
|
<!--</script>-->
|
||||||
<style lang="scss" scoped>
|
<!--<style lang="scss" scoped>-->
|
||||||
/deep/ .el-dialog--center .el-dialog__body{
|
<!--/deep/ .el-dialog--center .el-dialog__body{-->
|
||||||
padding: 25px 55px 20px 20px;
|
<!-- padding: 25px 55px 20px 20px;-->
|
||||||
}
|
<!--}-->
|
||||||
/deep/ .el-dialog--center .el-dialog__body .el-input{
|
<!--/deep/ .el-dialog--center .el-dialog__body .el-input{-->
|
||||||
width:200px !important;
|
<!-- width:200px !important;-->
|
||||||
}
|
<!--}-->
|
||||||
</style>
|
<!--</style>-->
|
||||||
|
@ -1,176 +1,176 @@
|
|||||||
<template>
|
<!--<template>-->
|
||||||
<el-card>
|
<!-- <el-card>-->
|
||||||
<QueryListPage ref="subSystemListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<!-- <QueryListPage ref="subSystemListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />-->
|
||||||
<mapSystemOperate ref="mapSystemOperate" :map-list="mapList" @reloadTable="reloadTable" />
|
<!-- <mapSystemOperate ref="mapSystemOperate" :map-list="mapList" @reloadTable="reloadTable" />-->
|
||||||
</el-card>
|
<!-- </el-card>-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
|
|
||||||
<script>
|
<!--<script>-->
|
||||||
import Cookies from 'js-cookie';
|
<!--import Cookies from 'js-cookie';-->
|
||||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
<!--import { getPublishMapListOnline } from '@/api/jmap/map';-->
|
||||||
import { getMapSystemPageList, deleteSubSystem} from '@/api/trainingPlatform';
|
<!--import { getMapSystemPageList, deleteSubSystem} from '@/api/trainingPlatform';-->
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
<!--import ConstConfig from '@/scripts/ConstConfig';-->
|
||||||
import mapSystemOperate from './create';
|
<!--import mapSystemOperate from './create';-->
|
||||||
|
|
||||||
export default {
|
<!--export default {-->
|
||||||
name: 'SystemGenerate',
|
<!-- name: 'SystemGenerate',-->
|
||||||
components: {
|
<!-- components: {-->
|
||||||
mapSystemOperate
|
<!-- mapSystemOperate-->
|
||||||
},
|
<!-- },-->
|
||||||
data() {
|
<!-- data() {-->
|
||||||
return {
|
<!-- return {-->
|
||||||
systemList: [],
|
<!-- systemList: [],-->
|
||||||
mapList:[],
|
<!-- mapList:[],-->
|
||||||
mapId: '',
|
<!-- mapId: '',-->
|
||||||
pagerConfig: {
|
<!-- pagerConfig: {-->
|
||||||
pageSize: 'pageSize',
|
<!-- pageSize: 'pageSize',-->
|
||||||
pageIndex: 'pageNum'
|
<!-- pageIndex: 'pageNum'-->
|
||||||
},
|
<!-- },-->
|
||||||
queryForm: {
|
<!-- queryForm: {-->
|
||||||
labelWidth: '100px',
|
<!-- labelWidth: '100px',-->
|
||||||
reset: true,
|
<!-- reset: true,-->
|
||||||
queryObject: {
|
<!-- queryObject: {-->
|
||||||
mapId: {
|
<!-- mapId: {-->
|
||||||
type: 'select',
|
<!-- type: 'select',-->
|
||||||
label: this.$t('systemGenerate.map'),
|
<!-- label: this.$t('systemGenerate.map'),-->
|
||||||
config: {
|
<!-- config: {-->
|
||||||
data: []
|
<!-- data: []-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
'name': {
|
<!-- 'name': {-->
|
||||||
type: 'text',
|
<!-- type: 'text',-->
|
||||||
label: this.$t('systemGenerate.name')
|
<!-- label: this.$t('systemGenerate.name')-->
|
||||||
},
|
<!-- },-->
|
||||||
'type': {
|
<!-- 'type': {-->
|
||||||
type: 'select',
|
<!-- type: 'select',-->
|
||||||
label: this.$t('systemGenerate.type'),
|
<!-- label: this.$t('systemGenerate.type'),-->
|
||||||
config: {
|
<!-- config: {-->
|
||||||
data: []
|
<!-- data: []-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
queryList: {
|
<!-- queryList: {-->
|
||||||
query: this.queryFunction,
|
<!-- query: this.queryFunction,-->
|
||||||
selectCheckShow: false,
|
<!-- selectCheckShow: false,-->
|
||||||
indexShow: true,
|
<!-- indexShow: true,-->
|
||||||
columns: [
|
<!-- columns: [-->
|
||||||
{
|
<!-- {-->
|
||||||
title: this.$t('systemGenerate.name'),
|
<!-- title: this.$t('systemGenerate.name'),-->
|
||||||
prop: 'name'
|
<!-- prop: 'name'-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
title: this.$t('systemGenerate.type'),
|
<!-- title: this.$t('systemGenerate.type'),-->
|
||||||
type: 'tag',
|
<!-- type: 'tag',-->
|
||||||
prop: 'type',
|
<!-- prop: 'type',-->
|
||||||
columnValue: (row) => { return this.$convertField(row.type, this.systemList, ['value', 'label']); },
|
<!-- columnValue: (row) => { return this.$convertField(row.type, this.systemList, ['value', 'label']); },-->
|
||||||
tagType: (row) => { return ''; }
|
<!-- tagType: (row) => { return ''; }-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
title: this.$t('systemGenerate.mapName'),
|
<!-- title: this.$t('systemGenerate.mapName'),-->
|
||||||
type: 'tag',
|
<!-- type: 'tag',-->
|
||||||
prop: 'mapName',
|
<!-- prop: 'mapName',-->
|
||||||
columnValue: (row) => { return row.mapName; },
|
<!-- columnValue: (row) => { return row.mapName; },-->
|
||||||
tagType: (row) => { return ''; }
|
<!-- tagType: (row) => { return ''; }-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
title: this.$t('system.prdType'),
|
<!-- title: this.$t('system.prdType'),-->
|
||||||
type: 'tag',
|
<!-- type: 'tag',-->
|
||||||
prop: 'prdType',
|
<!-- prop: 'prdType',-->
|
||||||
columnValue: (row) => { return this.$convertField(row.prdType, this.systemPrdTypeList, ['value', 'label']); },
|
<!-- columnValue: (row) => { return this.$convertField(row.prdType, this.systemPrdTypeList, ['value', 'label']); },-->
|
||||||
tagType: (row) => { return ''; }
|
<!-- tagType: (row) => { return ''; }-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
type: 'button',
|
<!-- type: 'button',-->
|
||||||
title: this.$t('global.operate'),
|
<!-- title: this.$t('global.operate'),-->
|
||||||
width: '400',
|
<!-- width: '400',-->
|
||||||
buttons: [
|
<!-- buttons: [-->
|
||||||
{
|
<!-- {-->
|
||||||
name: this.$t('systemGenerate.updateData'),
|
<!-- name: this.$t('systemGenerate.updateData'),-->
|
||||||
handleClick: this.updateData,
|
<!-- handleClick: this.updateData,-->
|
||||||
type: ''
|
<!-- type: ''-->
|
||||||
},
|
<!-- },-->
|
||||||
{
|
<!-- {-->
|
||||||
name: this.$t('systemGenerate.deleteData'),
|
<!-- name: this.$t('systemGenerate.deleteData'),-->
|
||||||
handleClick: this.deleteData,
|
<!-- handleClick: this.deleteData,-->
|
||||||
type: 'danger'
|
<!-- type: 'danger'-->
|
||||||
}
|
<!-- }-->
|
||||||
]
|
<!-- ]-->
|
||||||
}
|
<!-- }-->
|
||||||
],
|
<!-- ],-->
|
||||||
actions: [
|
<!-- actions: [-->
|
||||||
{ text: this.$t('systemGenerate.commission'), handler: this.handleAdd },
|
<!-- { text: this.$t('systemGenerate.commission'), handler: this.handleAdd },-->
|
||||||
{ text: this.$t('systemGenerate.generate'), handler: this.generate }
|
<!-- { text: this.$t('systemGenerate.generate'), handler: this.generate }-->
|
||||||
]
|
<!-- ]-->
|
||||||
}
|
<!-- }-->
|
||||||
|
|
||||||
};
|
<!-- };-->
|
||||||
},
|
<!-- },-->
|
||||||
computed: {
|
<!-- computed: {-->
|
||||||
height() {
|
<!-- height() {-->
|
||||||
return this.$store.state.app.height - 50;
|
<!-- return this.$store.state.app.height - 50;-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
created() {
|
<!-- created() {-->
|
||||||
this.loadInitData();
|
<!-- this.loadInitData();-->
|
||||||
},
|
<!-- },-->
|
||||||
methods: {
|
<!-- methods: {-->
|
||||||
updateData(index, row) {
|
<!-- updateData(index, row) {-->
|
||||||
this.$refs.mapSystemOperate.doShow({type:'update', row:row});
|
<!-- this.$refs.mapSystemOperate.doShow({type:'update', row:row});-->
|
||||||
},
|
<!-- },-->
|
||||||
deleteData(index, row) {
|
<!-- deleteData(index, row) {-->
|
||||||
this.$confirm(this.$t('systemGenerate.deleteMapSystemTip'), this.$t('global.tips'), {
|
<!-- this.$confirm(this.$t('systemGenerate.deleteMapSystemTip'), this.$t('global.tips'), {-->
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
<!-- confirmButtonText: this.$t('global.confirm'),-->
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
<!-- cancelButtonText: this.$t('global.cancel'),-->
|
||||||
type: 'warning'
|
<!-- type: 'warning'-->
|
||||||
}).then(() => {
|
<!-- }).then(() => {-->
|
||||||
deleteSubSystem(row.id).then(response => {
|
<!-- deleteSubSystem(row.id).then(response => {-->
|
||||||
this.$message.success(this.$t('systemGenerate.deleteMapSystemSuccess'));
|
<!-- this.$message.success(this.$t('systemGenerate.deleteMapSystemSuccess'));-->
|
||||||
this.reloadTable();
|
<!-- this.reloadTable();-->
|
||||||
}).catch(() => {
|
<!-- }).catch(() => {-->
|
||||||
this.$messageBox(this.$t('systemGenerate.deleteMapSystemFail'));
|
<!-- this.$messageBox(this.$t('systemGenerate.deleteMapSystemFail'));-->
|
||||||
});
|
<!-- });-->
|
||||||
}).catch(() => { });
|
<!-- }).catch(() => { });-->
|
||||||
},
|
<!-- },-->
|
||||||
handleAdd() {
|
<!-- handleAdd() {-->
|
||||||
this.$refs.mapSystemOperate.doShow({type:'add'});
|
<!-- this.$refs.mapSystemOperate.doShow({type:'add'});-->
|
||||||
},
|
<!-- },-->
|
||||||
reloadTable() {
|
<!-- reloadTable() {-->
|
||||||
if (this.queryList && this.queryList.reload) {
|
<!-- if (this.queryList && this.queryList.reload) {-->
|
||||||
this.queryList.reload();
|
<!-- this.queryList.reload();-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
async loadInitData() {
|
<!-- async loadInitData() {-->
|
||||||
try {
|
<!-- try {-->
|
||||||
// 获取地图
|
<!-- // 获取地图-->
|
||||||
this.mapList = [];
|
<!-- this.mapList = [];-->
|
||||||
const res = await getPublishMapListOnline();
|
<!-- const res = await getPublishMapListOnline();-->
|
||||||
res.data.forEach(elem => {
|
<!-- res.data.forEach(elem => {-->
|
||||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
<!-- this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });-->
|
||||||
this.mapList.push({ value: elem.id, label: elem.name });
|
<!-- this.mapList.push({ value: elem.id, label: elem.name });-->
|
||||||
});
|
<!-- });-->
|
||||||
// 系统类型
|
<!-- // 系统类型-->
|
||||||
const systemListEnum = ConstConfig.ConstSelect.productType;
|
<!-- const systemListEnum = ConstConfig.ConstSelect.productType;-->
|
||||||
this.systemList = Cookies.get('user_lang') == 'en'
|
<!-- this.systemList = Cookies.get('user_lang') == 'en'-->
|
||||||
? systemListEnum.map(elem => { return { value: elem.value, label: elem.enlabel }; })
|
<!-- ? systemListEnum.map(elem => { return { value: elem.value, label: elem.enlabel }; })-->
|
||||||
: systemListEnum.map(elem => { return { value: elem.value, label: elem.label }; });
|
<!-- : systemListEnum.map(elem => { return { value: elem.value, label: elem.label }; });-->
|
||||||
// 系统内部的产品类型
|
<!-- // 系统内部的产品类型-->
|
||||||
const systemProductTypeList = ConstConfig.ConstSelect.prdType;
|
<!-- const systemProductTypeList = ConstConfig.ConstSelect.prdType;-->
|
||||||
this.systemPrdTypeList = Cookies.get('user_lang') == 'en'
|
<!-- this.systemPrdTypeList = Cookies.get('user_lang') == 'en'-->
|
||||||
? systemProductTypeList.map(elem => { return { value: elem.value, label: elem.enlabel }; })
|
<!-- ? systemProductTypeList.map(elem => { return { value: elem.value, label: elem.enlabel }; })-->
|
||||||
: systemProductTypeList.map(elem => { return { value: elem.value, label: elem.label }; });
|
<!-- : systemProductTypeList.map(elem => { return { value: elem.value, label: elem.label }; });-->
|
||||||
this.queryForm.queryObject.type.config.data = this.systemList;
|
<!-- this.queryForm.queryObject.type.config.data = this.systemList;-->
|
||||||
|
|
||||||
} catch (error) {
|
<!-- } catch (error) {-->
|
||||||
console.error(error, '获取发布地图');
|
<!-- console.error(error, '获取发布地图');-->
|
||||||
}
|
<!-- }-->
|
||||||
},
|
<!-- },-->
|
||||||
generate() {
|
<!-- generate() {-->
|
||||||
this.$refs.mapSystemOperate.doShow({type:'generate'});
|
<!-- this.$refs.mapSystemOperate.doShow({type:'generate'});-->
|
||||||
},
|
<!-- },-->
|
||||||
queryFunction(params) {
|
<!-- queryFunction(params) {-->
|
||||||
return getMapSystemPageList(params);
|
<!-- return getMapSystemPageList(params);-->
|
||||||
}
|
<!-- }-->
|
||||||
}
|
<!-- }-->
|
||||||
};
|
<!--};-->
|
||||||
</script>
|
<!--</script>-->
|
||||||
|
@ -14,7 +14,6 @@ import md5 from 'js-md5';
|
|||||||
import { setToken, getToken } from '@/utils/auth';
|
import { setToken, getToken } from '@/utils/auth';
|
||||||
import OrgSelect from '../login/orgSelect';
|
import OrgSelect from '../login/orgSelect';
|
||||||
// , ProjectLoginStyleList, VersionBaseNoShow, MainBodyNoShow, NoQrcodeList, localPackageProject, RegisterCodeList
|
// , ProjectLoginStyleList, VersionBaseNoShow, MainBodyNoShow, NoQrcodeList, localPackageProject, RegisterCodeList
|
||||||
// import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name:'ThirdLogin',
|
name:'ThirdLogin',
|
||||||
|
Loading…
Reference in New Issue
Block a user