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

View File

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

View File

@ -288,7 +288,7 @@ export default {
if (this.$route.query.subSystem) {
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`, query: {lessonId: this.examDetails.lessonId}});
} 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);
}