Commit ac0b9a4c authored by liujiangnan's avatar liujiangnan

feat

parent e83ebf3a
...@@ -22,6 +22,7 @@ body{ ...@@ -22,6 +22,7 @@ body{
height: calc(100vh - 30px); height: calc(100vh - 30px);
display: flex; display: flex;
gap: 15px; gap: 15px;
position: relative;
} }
.split > .el-col{ .split > .el-col{
...@@ -45,6 +46,30 @@ body{ ...@@ -45,6 +46,30 @@ body{
font-weight: 600; font-weight: 600;
margin-bottom: 16px; margin-bottom: 16px;
color: #303133; color: #303133;
display: flex;
align-items: center;
justify-content: space-between;
}
.panel-side-toggle{
position: absolute;
top: 50%;
transform: translateY(-50%);
z-index: 5;
}
.panel-side-toggle.left{
left: -6px;
}
.panel-side-toggle.right{
right: -6px;
}
.panel-side-toggle .el-button{
writing-mode: vertical-rl;
text-orientation: mixed;
padding: 6px 4px;
} }
.panel-actions{ .panel-actions{
......
...@@ -19,8 +19,21 @@ ...@@ -19,8 +19,21 @@
<body> <body>
<div id="app" v-cloak class="page"> <div id="app" v-cloak class="page">
<el-row :gutter="0" class="split"> <el-row :gutter="0" class="split">
<el-col :span="12" class="panel"> <div class="panel-side-toggle left" v-if="!leftPanelVisible">
<div class="panel-title">内容录入区</div> <el-button
size="mini"
type="primary"
plain
@click="toggleLeftPanel">展开内容录入区</el-button>
</div>
<el-col
:span="leftPanelSpan"
class="panel"
v-show="leftPanelVisible">
<div class="panel-title">
<span>内容录入区</span>
<el-button type="text" size="mini" @click="toggleLeftPanel">收起</el-button>
</div>
<el-form label-width="90px" size="small"> <el-form label-width="90px" size="small">
<el-form-item label="上传图片"> <el-form-item label="上传图片">
<el-upload <el-upload
...@@ -278,8 +291,14 @@ ...@@ -278,8 +291,14 @@
</span> </span>
</el-dialog> </el-dialog>
<el-col :span="12" class="panel"> <el-col
<div class="panel-title">AI 编排脚本区</div> :span="rightPanelSpan"
class="panel"
v-show="rightPanelVisible">
<div class="panel-title">
<span>AI 编排脚本区</span>
<el-button type="text" size="mini" @click="toggleRightPanel">收起</el-button>
</div>
<el-input <el-input
type="textarea" type="textarea"
:rows="16" :rows="16"
...@@ -298,6 +317,13 @@ ...@@ -298,6 +317,13 @@
class="json-alert" class="json-alert"
title="JSON 格式正确"></el-alert> title="JSON 格式正确"></el-alert>
</el-col> </el-col>
<div class="panel-side-toggle right" v-if="!rightPanelVisible">
<el-button
size="mini"
type="primary"
plain
@click="toggleRightPanel">展开AI编排脚本区</el-button>
</div>
</el-row> </el-row>
</div> </div>
</body> </body>
......
...@@ -37,6 +37,8 @@ new Vue({ ...@@ -37,6 +37,8 @@ new Vue({
quizList: [], quizList: [],
quizDialogVisible: false, quizDialogVisible: false,
dragIndex: -1, dragIndex: -1,
leftPanelVisible: true,
rightPanelVisible: true,
uploading: false, uploading: false,
uploadProgress: 0, uploadProgress: 0,
currentUploadId: 0, currentUploadId: 0,
...@@ -54,6 +56,26 @@ new Vue({ ...@@ -54,6 +56,26 @@ new Vue({
this.saveData(); this.saveData();
} }
}, },
computed: {
leftPanelSpan: function () {
if (this.leftPanelVisible && this.rightPanelVisible) {
return 12;
}
if (this.leftPanelVisible && !this.rightPanelVisible) {
return 24;
}
return 0;
},
rightPanelSpan: function () {
if (this.leftPanelVisible && this.rightPanelVisible) {
return 12;
}
if (!this.leftPanelVisible && this.rightPanelVisible) {
return 24;
}
return 0;
}
},
mounted: function () { mounted: function () {
var _this = this; var _this = this;
if (window.courseware && window.courseware.getData) { if (window.courseware && window.courseware.getData) {
...@@ -88,6 +110,18 @@ new Vue({ ...@@ -88,6 +110,18 @@ new Vue({
} }
}, },
methods: { methods: {
toggleLeftPanel: function () {
this.leftPanelVisible = !this.leftPanelVisible;
if (!this.leftPanelVisible && !this.rightPanelVisible) {
this.rightPanelVisible = true;
}
},
toggleRightPanel: function () {
this.rightPanelVisible = !this.rightPanelVisible;
if (!this.leftPanelVisible && !this.rightPanelVisible) {
this.leftPanelVisible = true;
}
},
// 环境基地址 // 环境基地址
getApiBase() { getApiBase() {
const host = (window.location && window.location.hostname || '').toLowerCase(); const host = (window.location && window.location.hostname || '').toLowerCase();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment