|
@@ -4,25 +4,24 @@
|
|
}
|
|
}
|
|
.left-panel {
|
|
.left-panel {
|
|
background-color: #fff; /* 左侧面板的背景色 */
|
|
background-color: #fff; /* 左侧面板的背景色 */
|
|
- height: 89vh; /* 高度占满 */
|
|
|
|
|
|
+ height: 100vh; /* 高度占满 */
|
|
}
|
|
}
|
|
- .right-panel {
|
|
|
|
|
|
+ .main-panel {
|
|
background-color: #e9ecef; /* 右侧面板的背景色 */
|
|
background-color: #e9ecef; /* 右侧面板的背景色 */
|
|
- height: 86vh; /* 高度占满 */
|
|
|
|
|
|
+ height: 97vh; /* 高度占满 */
|
|
}
|
|
}
|
|
.right-panel-header {
|
|
.right-panel-header {
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
}
|
|
}
|
|
.card-body {
|
|
.card-body {
|
|
- max-height: 60vh; /* 设置最大高度 */
|
|
|
|
|
|
+ max-height: 100vh; /* 设置最大高度 */
|
|
overflow-y: auto; /* 启用垂直滚动条 */
|
|
overflow-y: auto; /* 启用垂直滚动条 */
|
|
border-radius: 4px; /* 圆角 */
|
|
border-radius: 4px; /* 圆角 */
|
|
}
|
|
}
|
|
|
|
|
|
#editor {
|
|
#editor {
|
|
- height: 600px; /* 设置编辑器的高度 */
|
|
|
|
- width: 800px; /* 设置编辑器的宽度 */
|
|
|
|
- background-color: #fff;
|
|
|
|
|
|
+
|
|
|
|
+ background-color: #1e1e1e;
|
|
}
|
|
}
|
|
|
|
|
|
.submenu {
|
|
.submenu {
|
|
@@ -43,13 +42,15 @@
|
|
<div class="card-body"></div>
|
|
<div class="card-body"></div>
|
|
<!-- 代码树 end-->
|
|
<!-- 代码树 end-->
|
|
</div>
|
|
</div>
|
|
- <div class="col-10 right-panel"> <!-- 右侧80% -->
|
|
|
|
|
|
+ <div class="col-8 main-panel"> <!-- 右侧80% -->
|
|
<div class="right-panel-header">
|
|
<div class="right-panel-header">
|
|
<button type="button" class="btn btn-primary btn-sm" id="save-btn">保存</button>
|
|
<button type="button" class="btn btn-primary btn-sm" id="save-btn">保存</button>
|
|
</div>
|
|
</div>
|
|
<div class="right-panel-content" id="editor" style="width: 100%; height: 100%;"></div>
|
|
<div class="right-panel-content" id="editor" style="width: 100%; height: 100%;"></div>
|
|
<input type="hidden" name="template_id" id="template_id" />
|
|
<input type="hidden" name="template_id" id="template_id" />
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="col-2 right-panel">
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -61,7 +62,7 @@
|
|
// 设置语言
|
|
// 设置语言
|
|
editor.getSession().setMode("ace/mode/html");
|
|
editor.getSession().setMode("ace/mode/html");
|
|
// 设置主题
|
|
// 设置主题
|
|
- editor.setTheme("ace/theme/tomorrow");
|
|
|
|
|
|
+ editor.setTheme("ace/theme/monokai");
|
|
editor.setAutoScrollEditorIntoView(true);
|
|
editor.setAutoScrollEditorIntoView(true);
|
|
// 其他配置
|
|
// 其他配置
|
|
editor.setOptions({
|
|
editor.setOptions({
|
|
@@ -73,8 +74,9 @@
|
|
var actionclick = function() {
|
|
var actionclick = function() {
|
|
$('.file-action').click(function() {
|
|
$('.file-action').click(function() {
|
|
var id = $(this).attr('file_id');
|
|
var id = $(this).attr('file_id');
|
|
|
|
+ //编辑代码
|
|
$.ajax({
|
|
$.ajax({
|
|
- url: '/prime-control/dist-template/monaco',
|
|
|
|
|
|
+ url: '/prime-control/dist-template/ace',
|
|
type: 'POST',
|
|
type: 'POST',
|
|
data: {
|
|
data: {
|
|
act:'content',
|
|
act:'content',
|
|
@@ -85,13 +87,27 @@
|
|
editor.setValue(response);
|
|
editor.setValue(response);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ //显示右边变量列表
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: '/prime-control/dist-template/ace',
|
|
|
|
+ type: 'POST',
|
|
|
|
+ data: {
|
|
|
|
+ act:'aceRight',
|
|
|
|
+ template_id: id,
|
|
|
|
+ dist_id: $('input[name="dist_id"]').val(),
|
|
|
|
+ appearance_id: $('select[name="appearance_id"]').val()
|
|
|
|
+ },
|
|
|
|
+ success: function(response) {
|
|
|
|
+ $("#variables-list").html(response);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
});
|
|
});
|
|
}
|
|
}
|
|
var postData = function () {
|
|
var postData = function () {
|
|
var appearance_id = $('select[name="appearance_id"]').val();
|
|
var appearance_id = $('select[name="appearance_id"]').val();
|
|
var dist_id = $('input[name="dist_id"]').val();
|
|
var dist_id = $('input[name="dist_id"]').val();
|
|
$.ajax({
|
|
$.ajax({
|
|
- url: '/prime-control/dist-template/monaco',
|
|
|
|
|
|
+ url: '/prime-control/dist-template/ace',
|
|
type: 'POST',
|
|
type: 'POST',
|
|
data: {
|
|
data: {
|
|
act:'tree',
|
|
act:'tree',
|
|
@@ -118,7 +134,7 @@
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
$.ajax({
|
|
$.ajax({
|
|
- url: '/prime-control/dist-template/monaco',
|
|
|
|
|
|
+ url: '/prime-control/dist-template/ace',
|
|
type: 'POST',
|
|
type: 'POST',
|
|
data: {
|
|
data: {
|
|
act:'save',
|
|
act:'save',
|