This commit is contained in:
joylink_cuiweidong 2020-08-26 13:22:02 +08:00
commit b652897678
3 changed files with 56 additions and 52 deletions

View File

@ -93,6 +93,7 @@
<stand-detain ref="standDetain" /> <stand-detain ref="standDetain" />
<interval-stop-number ref="intervalStopNumber" /> <interval-stop-number ref="intervalStopNumber" />
<allocate-time ref="allocateTime" /> <allocate-time ref="allocateTime" />
<station-control ref="stationControl" />
</div> </div>
</template> </template>
<script> <script>
@ -108,6 +109,7 @@ import StandControl from './menuDialog/standControl';
import StandDetain from './menuDialog/standDetain'; import StandDetain from './menuDialog/standDetain';
import IntervalStopNumber from './menuDialog/intervalStopNumber'; import IntervalStopNumber from './menuDialog/intervalStopNumber';
import AllocateTime from './menuDialog/allocateTime'; import AllocateTime from './menuDialog/allocateTime';
import StationControl from './menuDialog/stationControl';
export default { export default {
name: 'MenuBar', name: 'MenuBar',
@ -118,7 +120,8 @@ export default {
StandControl, StandControl,
StandDetain, StandDetain,
IntervalStopNumber, IntervalStopNumber,
AllocateTime AllocateTime,
StationControl
}, },
props: { props: {
selected: { selected: {
@ -275,7 +278,7 @@ export default {
}, },
{ {
title: '授权转移', title: '授权转移',
click: this.undeveloped click: this.authorizeTransfer
}, },
{ {
title: '显示', title: '显示',
@ -689,7 +692,7 @@ export default {
}, },
{ {
title: '授权转移', title: '授权转移',
click: this.undeveloped click: this.authorizeTransfer
}, },
{ {
title: '显示', title: '显示',
@ -1140,6 +1143,10 @@ export default {
setAllocateTime() { setAllocateTime() {
this.closeMenu(true); this.closeMenu(true);
this.$refs.allocateTime.doShow(); this.$refs.allocateTime.doShow();
},
authorizeTransfer() {
this.closeMenu(true);
this.$refs.stationControl.doShow();
} }
} }
}; };

View File

@ -2,42 +2,44 @@
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="ningbo-01__systerm station-control" class="ningbo-01__systerm station-control"
title="控制模式转换" title="授权转移"
:visible.sync="show" :visible.sync="show"
width="400px" width="600px"
:before-close="doClose" :before-close="doClose"
:show-close="true" :show-close="true"
:z-index="2000" :z-index="2000"
:modal="false" :modal="false"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row> 集中站 </el-row>
<el-row style="margin-bottom: 20px"> <el-row style="margin-bottom: 20px">
<el-select <el-col :span="18">
:id="domIdChooseStation" <el-table :data="stationList" style="width: 100%;" height="350px">
ref="chooseStation" <el-table-column prop="name" label="控制区域" />
v-model="station" <el-table-column prop="userId" label="用户ID" />
value-key="code" </el-table>
filterable </el-col>
placeholder="请选择" <el-col :span="6">
style="width: 100%;" <div style="position: relative;top: 110px;left: 20px;color: #000;width: 60px;text-align: center;background: #F0F0F0;">接收转移</div>
@change="handleChooseChangeStation" <div style="position: relative; top: 100px;border: 1px solid #BBBBBB; text-align: center;width: 100px;left: 18px;padding: 10px;">
> <el-radio v-model="accept" :label="true" style="display: block;margin-bottom: 10px;"></el-radio>
<el-option v-for="item in concertrateStationList" :key="item.code" :label="item.name" :value="item" /> <el-radio v-model="accept" :label="false" style="display: block;"></el-radio>
</el-select> </div>
</el-col>
</el-row> </el-row>
<el-radio-group :id="domIdChooseControl" v-model="stationType">
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px">
<el-radio :label="item" @change="handleChooseChangeControl">
{{ controlProps[item] }}</el-radio>
</el-row>
</el-radio-group>
<div class="message" style="color:#ff0000;font-size:14px;margin-left:10px">{{ message }}</div> <div class="message" style="color:#ff0000;font-size:14px;margin-left:10px">{{ message }}</div>
<el-row type="flex" justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button> <el-col :span="4" :offset="1">
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出 <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
</el-button> </el-col>
<el-col :span="4" :offset="2">
<el-button>应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row> </el-row>
</el-dialog> </el-dialog>
@ -54,6 +56,8 @@ export default {
}, },
data() { data() {
return { return {
tableData: [],
accept: false,
operate: null, operate: null,
dialogShow: false, dialogShow: false,
disabledClose: false, disabledClose: false,
@ -118,37 +122,24 @@ export default {
} }
}, },
'$store.state.map.controlTransfer':function (controlTransferList) { '$store.state.map.controlTransfer':function (controlTransferList) {
controlTransferList.forEach(controlTransfer=>{
this.updateTableValue(controlTransfer);
});
} }
}, },
mounted() { mounted() {
this.stationList.forEach(item => {
if (item.centralized) {
this.tableData.push(item);
}
});
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}); });
}, },
methods: { methods: {
doShow(operate) { doShow() {
this.message = ''; this.message = '';
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true; this.dialogShow = true;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
updateTableValue(controlTransfer) {
this.concertrateStationList.forEach((row, index) => {
if (row.code == controlTransfer.code) {
if (controlTransfer.applicantId) {
this.disabledCommit = true;
} else {
this.disabledCommit = false;
}
}
});
},
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
@ -231,15 +222,21 @@ export default {
this.doClose(); this.doClose();
// this.$refs.twoConfirmation.doShow(data.operate, ':\n' + this.stationName); // this.$refs.twoConfirmation.doShow(data.operate, ':\n' + this.stationName);
}); });
} },
commit() {}
} }
}; };
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss" scoped> <style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
/deep/ .el-radio { /deep/ {
.el-radio {
color: #000; color: #000;
font-weight: bold; font-weight: bold;
} }
.el-cascader-node>.el-radio, .el-radio:last-child{
margin-right: 20px;
}
}
</style> </style>

View File

@ -288,7 +288,7 @@ export default {
if (this.$route.query.subSystem) { if (this.$route.query.subSystem) {
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`, query: {lessonId: this.examDetails.lessonId}}); this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`, query: {lessonId: this.examDetails.lessonId}});
} else { } else {
this.$router.push({ path: '/device/examDetail', query: {lessonId: this.examDetails.lessonId, noPreLogout: this.$route.query.noPreLogout}}); this.$router.push({ path: '/device/course', query: {lessonId: this.examDetails.lessonId, noPreLogout: this.$route.query.noPreLogout}});
} }
}, 100); }, 100);
} }