|
@@ -70,12 +70,12 @@
|
|
|
<span>{{ title }}</span>
|
|
<span>{{ title }}</span>
|
|
|
</p>
|
|
</p>
|
|
|
<div class="file" style="height: 100%">
|
|
<div class="file" style="height: 100%">
|
|
|
- <Button class="save" type="primary" @click="crudSaveFile">保存</Button>
|
|
|
|
|
|
|
+ <Button class="save" type="primary" @click="pwdModal = true">保存</Button>
|
|
|
|
|
|
|
|
<div class="file-box">
|
|
<div class="file-box">
|
|
|
<div class="file-fix"></div>
|
|
<div class="file-fix"></div>
|
|
|
<div class="file-content">
|
|
<div class="file-content">
|
|
|
- <Tabs
|
|
|
|
|
|
|
+ <!-- <Tabs
|
|
|
type="card"
|
|
type="card"
|
|
|
v-model="indexEditor"
|
|
v-model="indexEditor"
|
|
|
style="height: 100%"
|
|
style="height: 100%"
|
|
@@ -97,11 +97,30 @@
|
|
|
style="height: 100%; min-height: calc(100vh - 110px)"
|
|
style="height: 100%; min-height: calc(100vh - 110px)"
|
|
|
></div>
|
|
></div>
|
|
|
</TabPane>
|
|
</TabPane>
|
|
|
- </Tabs>
|
|
|
|
|
|
|
+ </Tabs> -->
|
|
|
|
|
+ <el-tabs v-model="indexEditor" type="card" @tab-click="toggleEditor">
|
|
|
|
|
+ <el-tab-pane v-for="value in editorIndex" :key="value.index">
|
|
|
|
|
+ <span slot="label">
|
|
|
|
|
+ <el-tooltip class="item" effect="dark" :content="value.title" placement="top">
|
|
|
|
|
+ <span>{{ value.file_name }}</span>
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <div
|
|
|
|
|
+ ref="container"
|
|
|
|
|
+ :id="'container_' + value.index"
|
|
|
|
|
+ style="height: 100%; min-height: calc(100vh - 110px)"
|
|
|
|
|
+ ></div>
|
|
|
|
|
+ </el-tab-pane>
|
|
|
|
|
+ <!-- <el-tab-pane label="用户管理" name="first">用户管理</el-tab-pane>
|
|
|
|
|
+ <el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
|
|
|
|
|
+ <el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>
|
|
|
|
|
+ <el-tab-pane label="定时任务补偿" name="fourth">定时任务补偿</el-tab-pane> -->
|
|
|
|
|
+ </el-tabs>
|
|
|
</div>
|
|
</div>
|
|
|
<Spin size="large" fix v-if="spinShow"></Spin>
|
|
<Spin size="large" fix v-if="spinShow"></Spin>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
<!-- </Modal> -->
|
|
<!-- </Modal> -->
|
|
|
<!-- <div class="demo-drawer-footer">
|
|
<!-- <div class="demo-drawer-footer">
|
|
|
<Button style="margin-right: 8px" @click="modals = false">关闭</Button>
|
|
<Button style="margin-right: 8px" @click="modals = false">关闭</Button>
|
|
@@ -123,6 +142,15 @@
|
|
|
<div v-for="(item, index) in codeBuildList" :key="index">{{ item }}</div>
|
|
<div v-for="(item, index) in codeBuildList" :key="index">{{ item }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</Modal>
|
|
</Modal>
|
|
|
|
|
+ <Modal
|
|
|
|
|
+ v-model="pwdModal"
|
|
|
|
|
+ title="文件管理密码"
|
|
|
|
|
+ :closable="false"
|
|
|
|
|
+ @on-ok="crudSaveFile"
|
|
|
|
|
+ @on-cancel="pwdModal = false"
|
|
|
|
|
+ >
|
|
|
|
|
+ <Input v-model="pwd" type="password" placeholder="请输入文件管理密码"></Input>
|
|
|
|
|
+ </Modal>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -132,7 +160,7 @@ import { crudList, crudDet, crudDownload, crudSaveFile } from '@/api/systemCodeG
|
|
|
import * as monaco from 'monaco-editor';
|
|
import * as monaco from 'monaco-editor';
|
|
|
import { getCookies, removeCookies } from '@/libs/util';
|
|
import { getCookies, removeCookies } from '@/libs/util';
|
|
|
import Setting from '@/setting';
|
|
import Setting from '@/setting';
|
|
|
-
|
|
|
|
|
|
|
+import { Input } from 'view-design';
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -155,7 +183,9 @@ export default {
|
|
|
position: 'static',
|
|
position: 'static',
|
|
|
},
|
|
},
|
|
|
loading: false,
|
|
loading: false,
|
|
|
|
|
+ pwdModal: false,
|
|
|
buildModals: false,
|
|
buildModals: false,
|
|
|
|
|
+ pwd: '',
|
|
|
tabList: [],
|
|
tabList: [],
|
|
|
codeBuildList: [],
|
|
codeBuildList: [],
|
|
|
total: 0,
|
|
total: 0,
|
|
@@ -238,9 +268,11 @@ export default {
|
|
|
let data = {
|
|
let data = {
|
|
|
filepath: this.editorIndex[this.indexEditor].pathname,
|
|
filepath: this.editorIndex[this.indexEditor].pathname,
|
|
|
comment: this.editorList[this.indexEditor].editor.getValue(),
|
|
comment: this.editorList[this.indexEditor].editor.getValue(),
|
|
|
|
|
+ pwd: this.pwd,
|
|
|
};
|
|
};
|
|
|
crudSaveFile(this.editId, data)
|
|
crudSaveFile(this.editId, data)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
|
|
+ this.pwd = '';
|
|
|
this.$Message.success(res.msg);
|
|
this.$Message.success(res.msg);
|
|
|
})
|
|
})
|
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
@@ -356,6 +388,7 @@ export default {
|
|
|
tab: true,
|
|
tab: true,
|
|
|
index: index + '',
|
|
index: index + '',
|
|
|
title: data.name,
|
|
title: data.name,
|
|
|
|
|
+ file_name: data.file_name,
|
|
|
pathname: data.path,
|
|
pathname: data.path,
|
|
|
});
|
|
});
|
|
|
that.code = data.content;
|
|
that.code = data.content;
|
|
@@ -365,6 +398,7 @@ export default {
|
|
|
that.editorList[index].path = data.path;
|
|
that.editorList[index].path = data.path;
|
|
|
that.editorList[index].oldCode = that.content;
|
|
that.editorList[index].oldCode = that.content;
|
|
|
that.editorIndex[index].title = data.name;
|
|
that.editorIndex[index].title = data.name;
|
|
|
|
|
+ that.editorIndex[index].file_name = data.file_name;
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
that.modals = true;
|
|
that.modals = true;
|