commit
This commit is contained in:
@@ -280,8 +280,8 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
listQuickEntry() {
|
||||
this.$axios.post("/platform/home/listQuickEntry").then((res) => {
|
||||
listRecommendApp() {
|
||||
this.$axios.post("/platform/home/listRecommendApp").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.quickEntries = res.data
|
||||
}
|
||||
@@ -299,7 +299,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.listQuickEntry()
|
||||
this.listRecommendApp()
|
||||
this.listActivity()
|
||||
this.listProcessInstance()
|
||||
}
|
||||
|
||||
@@ -44,8 +44,11 @@ layout("/layouts/platform.html"){
|
||||
<table-tool>
|
||||
<el-button @click="$refs.basicFormRef.onOpen(null,pageForm.platform)" size="small" type="primary" icon="el-icon-plus">新建菜单</el-button>
|
||||
<el-button @click="$refs.sortRef.onOpen(pageForm.platform)" size="small" type="primary" icon="el-icon-sort">排序</el-button>
|
||||
<el-button @click="$refs.quickEntryRef.onOpen(pageForm.platform)" size="small" type="primary" icon="el-icon-monitor">
|
||||
首页快速入口
|
||||
<el-button @click="$refs.recommendSettingRef.onOpen(pageForm.platform, 'app')" size="small" type="primary" icon="el-icon-monitor">
|
||||
首页推荐应用
|
||||
</el-button>
|
||||
<el-button @click="$refs.recommendSettingRef.onOpen(pageForm.platform, 'service')" size="small" type="primary" icon="el-icon-monitor">
|
||||
首页推荐服务
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table
|
||||
@@ -120,7 +123,7 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<!-- 右键菜单 -->
|
||||
<ul v-show="menuVisible" class="context-menu" :style="{left: menuLeft + 'px', top: menuTop + 'px'}">
|
||||
<li @click="handleAddMenu(currentRow)">新建菜单</li>
|
||||
@@ -128,20 +131,20 @@ layout("/layouts/platform.html"){
|
||||
<li @click="handleEdit(currentRow)">编辑</li>
|
||||
<li @click="handleDelete(currentRow)">删除</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
|
||||
<basic-form ref="basicFormRef" @refresh="loadChildByExpandedKeys"></basic-form>
|
||||
<permission-form ref="permissionFormRef" @load-child="loadChildByExpandedKeys"></permission-form>
|
||||
<sort ref="sortRef" @refresh="doSearch"></sort>
|
||||
<quick-entry ref="quickEntryRef" @refresh="doSearch"></quick-entry>
|
||||
<recommend-setting ref="recommendSettingRef" @refresh="doSearch"></recommend-setting>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include("permissionForm.js"){}#-->
|
||||
<!--#include("basicForm.js"){}#-->
|
||||
<!--#include("sort.js"){}#-->
|
||||
<!--#include("quickEntry.js"){}#-->
|
||||
<!--#include("recommendSetting.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
dicts: ["SYS_MENU_PLATFORM"],
|
||||
@@ -149,7 +152,7 @@ layout("/layouts/platform.html"){
|
||||
"basic-form": SYS_MENU_BASIC_FORM_COMPONENT,
|
||||
"permission-form": SYS_MENU_PERMISSION_FORM_COMPONENT,
|
||||
sort: SYS_MENU_SORT_COMPONENT,
|
||||
"quick-entry": SYS_MENU_QUICK_ENTRY_COMPONENT
|
||||
"recommend-setting": SYS_MENU_RECOMMEND_SETTING_COMPONENT
|
||||
},
|
||||
|
||||
data: function () {
|
||||
@@ -161,7 +164,7 @@ layout("/layouts/platform.html"){
|
||||
// 保存展开状态的数组
|
||||
expandedRowKeysRenew: [],
|
||||
tableTreeRefreshTool: [],
|
||||
|
||||
|
||||
// 右键打开菜单相关
|
||||
currentRow: null,
|
||||
menuVisible: false,
|
||||
@@ -177,7 +180,7 @@ layout("/layouts/platform.html"){
|
||||
// 阻止浏览器默认菜单
|
||||
event.preventDefault();
|
||||
this.currentRow = row;
|
||||
|
||||
|
||||
this.menuVisible = true;
|
||||
this.$nextTick(() => {
|
||||
const menu = this.$el.querySelector('.context-menu');
|
||||
|
||||
+15
-8
@@ -1,6 +1,6 @@
|
||||
const SYS_MENU_QUICK_ENTRY_COMPONENT = {
|
||||
const SYS_MENU_RECOMMEND_SETTING_COMPONENT = {
|
||||
template: `
|
||||
<el-dialog title="快速入口" :visible.sync="dialogVisible" width="50%">
|
||||
<el-dialog title="推荐配置" :visible.sync="dialogVisible" width="50%">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-tree ref="menuTree"
|
||||
@@ -46,12 +46,15 @@ const SYS_MENU_QUICK_ENTRY_COMPONENT = {
|
||||
},
|
||||
|
||||
checkedNodes: [],
|
||||
checkedKeys: []
|
||||
checkedKeys: [],
|
||||
|
||||
type: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(platform) {
|
||||
onOpen(platform, type) {
|
||||
this.platform = platform
|
||||
this.type = type
|
||||
this.dialogVisible = true
|
||||
this.listTree()
|
||||
},
|
||||
@@ -74,12 +77,15 @@ const SYS_MENU_QUICK_ENTRY_COMPONENT = {
|
||||
|
||||
setTreeDisabled(data) {
|
||||
data.forEach((item) => {
|
||||
if (item.isQuickEntry) {
|
||||
if ((this.type === 'service' && item.isRecommendService) || (this.type === 'app' && item.isRecommendApp)) {
|
||||
this.checkedKeys.push(item.id)
|
||||
}
|
||||
if (!item.href && item.type === "menu") {
|
||||
if (!item.href && item.type === "menu" && this.type === 'service') {
|
||||
item.disabled = true
|
||||
}
|
||||
if (this.type === 'app') {
|
||||
delete item.children
|
||||
}
|
||||
if (item.children && item.children.length) {
|
||||
this.setTreeDisabled(item.children)
|
||||
}
|
||||
@@ -95,9 +101,10 @@ const SYS_MENU_QUICK_ENTRY_COMPONENT = {
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios
|
||||
.post("/platform/sys/menu/updateQuickEntry", {
|
||||
.post("/platform/sys/menu/updateRecommendSetting", {
|
||||
menuIds: JSON.stringify(this.checkedNodes.map((item) => item.id)),
|
||||
platform: this.platform
|
||||
platform: this.platform,
|
||||
type: this.type
|
||||
})
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
@@ -67,8 +67,8 @@ const home = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
listQuickEntry() {
|
||||
this.$axios.post("/platform/home/listQuickEntry", { platform: "H5" }).then((res) => {
|
||||
listRecommendApp() {
|
||||
this.$axios.post("/platform/home/listRecommendApp", { platform: "H5" }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.quickEntries = res.data
|
||||
}
|
||||
@@ -91,7 +91,7 @@ const home = {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.listQuickEntry()
|
||||
this.listRecommendApp()
|
||||
this.listActivity()
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
Reference in New Issue
Block a user