|
@@ -4,12 +4,12 @@
|
|
<meta charset="UTF-8">
|
|
<meta charset="UTF-8">
|
|
<title>导航</title>
|
|
<title>导航</title>
|
|
<!--解决资源跨域-->
|
|
<!--解决资源跨域-->
|
|
- <meta name="referrer" content="no-referrer" />
|
|
|
|
|
|
+ <meta name="referrer" content="no-referrer"/>
|
|
|
|
|
|
<!--解决缓存问题-->
|
|
<!--解决缓存问题-->
|
|
- <meta http-equiv="pragma" content="no-cache" />
|
|
|
|
- <meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
|
|
|
|
- <meta http-equiv="expires" content="0" />
|
|
|
|
|
|
+ <meta http-equiv="pragma" content="no-cache"/>
|
|
|
|
+ <meta http-equiv="Cache-Control" content="no-cache, must-revalidate"/>
|
|
|
|
+ <meta http-equiv="expires" content="0"/>
|
|
|
|
|
|
<script src="https://map.tianyunperfect.cn/common-page.js"></script>
|
|
<script src="https://map.tianyunperfect.cn/common-page.js"></script>
|
|
|
|
|
|
@@ -18,6 +18,24 @@
|
|
<script src="elementUI/index.js"></script>
|
|
<script src="elementUI/index.js"></script>
|
|
<link rel="stylesheet" href="elementUI/index.css"/>
|
|
<link rel="stylesheet" href="elementUI/index.css"/>
|
|
<style>
|
|
<style>
|
|
|
|
+ .tab-item {
|
|
|
|
+ min-width: 100px;
|
|
|
|
+ max-width: 200px;
|
|
|
|
+ /* 文字居中*/
|
|
|
|
+ text-align: center;
|
|
|
|
+ /*文字垂直居中*/
|
|
|
|
+ line-height: 2em;
|
|
|
|
+ background: #c5e7cd;
|
|
|
|
+ margin: 0 20px;
|
|
|
|
+ /* 鼠标变成手*/
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .tab-item:hover {
|
|
|
|
+ background-color: #a3badc;
|
|
|
|
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
|
|
|
+ }
|
|
|
|
+
|
|
.tab-container {
|
|
.tab-container {
|
|
max-width: 1600px;
|
|
max-width: 1600px;
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
@@ -190,7 +208,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="item-content">
|
|
<div class="item-content">
|
|
<div style="width: 100%">
|
|
<div style="width: 100%">
|
|
- <div class="item-description">{{ item.description || item.title }}</div>
|
|
|
|
|
|
+ <div class="item-description">{{ item.description || item.title }}</div>
|
|
<el-tooltip>
|
|
<el-tooltip>
|
|
<div class="link-section">
|
|
<div class="link-section">
|
|
<el-link
|
|
<el-link
|
|
@@ -264,7 +282,14 @@
|
|
</div>
|
|
</div>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
-
|
|
|
|
|
|
+ <br>
|
|
|
|
+ <div v-if="showTabManage">
|
|
|
|
+ <draggable v-model="tabOrder" @change="onTabOrderChange" handle=".drag-handle" style="display: flex;">
|
|
|
|
+ <div v-for="tabName in tabOrder" :key="tabName" class="tab-item drag-handle">
|
|
|
|
+ <span>{{ tabName }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </draggable>
|
|
|
|
+ </div>
|
|
<!-- 编辑对话框 -->
|
|
<!-- 编辑对话框 -->
|
|
<el-dialog
|
|
<el-dialog
|
|
:title="isEditing ? '编辑项目' : '添加新项'"
|
|
:title="isEditing ? '编辑项目' : '添加新项'"
|
|
@@ -327,6 +352,7 @@
|
|
let _this = new Vue({
|
|
let _this = new Vue({
|
|
el: '#app',
|
|
el: '#app',
|
|
data: {
|
|
data: {
|
|
|
|
+ tabOrder: [],
|
|
all_data: {},
|
|
all_data: {},
|
|
activeTab: '常用工具',
|
|
activeTab: '常用工具',
|
|
myObj: {
|
|
myObj: {
|
|
@@ -372,9 +398,18 @@
|
|
if (pageManager.isReadOnly()) this.readOnly = true;
|
|
if (pageManager.isReadOnly()) this.readOnly = true;
|
|
|
|
|
|
this.mouseOver();
|
|
this.mouseOver();
|
|
|
|
+ this.tabOrder = Object.keys(this.myObj);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ onTabOrderChange() {
|
|
|
|
+ const newMyObj = {};
|
|
|
|
+ this.tabOrder.forEach(tabName => {
|
|
|
|
+ newMyObj[tabName] = this.myObj[tabName];
|
|
|
|
+ });
|
|
|
|
+ this.myObj = newMyObj;
|
|
|
|
+ this.updateData();
|
|
|
|
+ },
|
|
// 鼠标滑过,切换tabs
|
|
// 鼠标滑过,切换tabs
|
|
mouseOver() {
|
|
mouseOver() {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -465,6 +500,7 @@
|
|
this.$set(this.myObj, this.newTabName, []);
|
|
this.$set(this.myObj, this.newTabName, []);
|
|
this.activeTab = this.newTabName;
|
|
this.activeTab = this.newTabName;
|
|
this.newTabName = '';
|
|
this.newTabName = '';
|
|
|
|
+ _this.tabOrder = Object.keys(this.myObj);
|
|
this.updateData();
|
|
this.updateData();
|
|
},
|
|
},
|
|
|
|
|