业务95值计算的新增任务、交换机监控策略
、交换机监控策略表单引用功能修改 2、欢迎页开发并联调(100%) 3、业务95值计算新增任务表单功能修改(80%)
This commit is contained in:
@@ -720,7 +720,7 @@ export function getLogicalNode() {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 所有资源管理的列表
|
||||||
export function getRegistList(query) {
|
export function getRegistList(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/registration/getRegistList',
|
url: '/system/registration/getRegistList',
|
||||||
|
|||||||
@@ -24,3 +24,18 @@ export function getColumnList(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 点击菜单 计数
|
||||||
|
export function clicMenuCount(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/sysMenuClick',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取最受欢迎的前八位菜单
|
||||||
|
export function getMenuTopEight() {
|
||||||
|
return request({
|
||||||
|
url: '/system/sysMenuClick/getMenuListTopEight',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -369,6 +369,7 @@
|
|||||||
this.selectList = [];
|
this.selectList = [];
|
||||||
this.ids = [];
|
this.ids = [];
|
||||||
if (tableInstance) {
|
if (tableInstance) {
|
||||||
|
console.log('rows===',rows);
|
||||||
if (rows && rows.length > 0) {
|
if (rows && rows.length > 0) {
|
||||||
rows.forEach(row => {
|
rows.forEach(row => {
|
||||||
tableInstance.toggleRowSelection(row, true);
|
tableInstance.toggleRowSelection(row, true);
|
||||||
@@ -380,6 +381,34 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 提供给父组件调用的方法:默认选中值 otherRow:新的回显方式,防止破坏原来rows判断的逻辑与回显
|
||||||
|
defaultSelectRows(rows,otherRow){
|
||||||
|
const tableInstance = this.config && this.config.tableKey ? this.$refs[`tableRef_${this.config.tableKey}`] : this.$refs.selChangeList;
|
||||||
|
this.selectList = [];
|
||||||
|
this.ids = [];
|
||||||
|
if (tableInstance) {
|
||||||
|
if (otherRow && otherRow.length > 0) {
|
||||||
|
otherRow.forEach(rowVal => {
|
||||||
|
this.tableList.some(tabVal => {
|
||||||
|
if (rowVal.id === tabVal.id) {
|
||||||
|
tableInstance.toggleRowSelection(tabVal, true);
|
||||||
|
this.selectList.push(tabVal);
|
||||||
|
this.ids.push(tabVal.id);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else if (rows && rows.length > 0) {
|
||||||
|
rows.forEach(row => {
|
||||||
|
tableInstance.toggleRowSelection(row, true);
|
||||||
|
this.selectList.push(row);
|
||||||
|
this.ids.push(row.id);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
tableInstance.clearSelection();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
renderList() {
|
renderList() {
|
||||||
this.$emit("fnRenderList");
|
this.$emit("fnRenderList");
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
:active-text-color="settings.theme"
|
:active-text-color="settings.theme"
|
||||||
:collapse-transition="false"
|
:collapse-transition="false"
|
||||||
mode="vertical"
|
mode="vertical"
|
||||||
|
@select="handleMenuSelect"
|
||||||
>
|
>
|
||||||
<sidebar-item
|
<sidebar-item
|
||||||
v-for="(route, index) in sidebarRouters"
|
v-for="(route, index) in sidebarRouters"
|
||||||
@@ -28,6 +29,7 @@ import { mapGetters, mapState } from "vuex"
|
|||||||
import Logo from "./Logo"
|
import Logo from "./Logo"
|
||||||
import SidebarItem from "./SidebarItem"
|
import SidebarItem from "./SidebarItem"
|
||||||
import variables from "@/assets/styles/variables.scss"
|
import variables from "@/assets/styles/variables.scss"
|
||||||
|
import {clicMenuCount} from "@/api/menu";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { SidebarItem, Logo },
|
components: { SidebarItem, Logo },
|
||||||
@@ -52,6 +54,39 @@ export default {
|
|||||||
isCollapse() {
|
isCollapse() {
|
||||||
return !this.sidebar.opened
|
return !this.sidebar.opened
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
menuList: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.menuHandle(this.sidebarRouters);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 点击菜单 计数
|
||||||
|
handleMenuSelect(index, indexPath) {
|
||||||
|
let params = {pageRoute: index, pageName: this.menuList[index]};
|
||||||
|
clicMenuCount(params).then(res => {});
|
||||||
|
},
|
||||||
|
// 处理菜单
|
||||||
|
menuHandle(menu) {
|
||||||
|
menu.forEach(item => {
|
||||||
|
if (!item.hidden) {
|
||||||
|
item.children.forEach(val => {
|
||||||
|
if (!val.hidden) {
|
||||||
|
if (val.children) {
|
||||||
|
val.path = item.path + '/' + val.path;
|
||||||
|
this.menuHandle([val]);
|
||||||
|
} else {
|
||||||
|
let link = item.path && item.path === '/' ? item.path + val.path : item.path + '/' + val.path;
|
||||||
|
this.menuList[link] = val.meta.title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+7
-13
@@ -6,6 +6,7 @@ Vue.use(Router)
|
|||||||
/* Layout */
|
/* Layout */
|
||||||
import Layout from '@/layout'
|
import Layout from '@/layout'
|
||||||
import DialogView from '@/views/earnManage/server/dialogView.vue'
|
import DialogView from '@/views/earnManage/server/dialogView.vue'
|
||||||
|
import Welcome from '@/views/welcome.vue'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note: 路由配置项
|
* Note: 路由配置项
|
||||||
@@ -62,19 +63,12 @@ export const constantRoutes = [
|
|||||||
component: () => import('@/views/error/401'),
|
component: () => import('@/views/error/401'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// path: '',
|
path: '',
|
||||||
// component: Layout,
|
component: Welcome,
|
||||||
// redirect: 'index',
|
hidden: true,
|
||||||
// children: [
|
name: 'Welcome'
|
||||||
// {
|
},
|
||||||
// path: 'index',
|
|
||||||
// component: () => import('@/views/index'),
|
|
||||||
// name: 'Index',
|
|
||||||
// meta: { title: '首页', icon: 'dashboard', affix: true }
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
path: '/user',
|
path: '/user',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|||||||
@@ -2,22 +2,24 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<Form :formList="formList" :ruleFormData="ruleForm" @fnClick="callback"></Form>
|
<Form :formList="formList" :ruleFormData="ruleForm" @fnClick="callback"></Form>
|
||||||
<!-- 弹窗 -->
|
<!-- 弹窗 -->
|
||||||
<el-dialog title="选择包含资源" :visible.sync="open" width="900px" height="300px" append-to-body>
|
<el-dialog title="选择包含资源" :visible.sync="open" width="1000px" height="300px" append-to-body>
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<el-tab-pane label="按业务名称选择" name="first">用户管理</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="second"></el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<splitpanes :horizontal="this.$store.getters.device === 'mobile'" class="default-theme">
|
<splitpanes :horizontal="this.$store.getters.device === 'mobile'" class="default-theme">
|
||||||
<pane size="16">
|
<pane size="20">
|
||||||
<el-col>
|
<el-col>
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" ref="tree" node-key="id" default-expand-all highlight-current @node-click="handleNodeClick" />
|
<el-tree :data="deptOptions" :props="defaultProps" :current-node-key="currentNodeKey" :expand-on-click-node="false" ref="tree" node-key="id" default-expand-all highlight-current @node-click="handleNodeClick" />
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</pane>
|
</pane>
|
||||||
<pane size="84">
|
<pane size="80">
|
||||||
<TableList ref="tabRef" :columns="columns" :config="{colHiddenCheck: true, colTopHiddenIcon: true, currentSel: true}" :queryParams="{total: 0}" :tableList="tableList" @fnClick="callback"></TableList>
|
<div class="block" style="max-height: calc(100vh - 290px);overflow: auto;">
|
||||||
|
<TableList ref="tabRef" :columns="columns" :config="{colTopHiddenIcon: true}" :queryParams="{total: 0}" :tableList="tableList" @fnClick="callback"></TableList>
|
||||||
|
</div>
|
||||||
</pane>
|
</pane>
|
||||||
</splitpanes>
|
</splitpanes>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -32,10 +34,9 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import Form from '@/components/form/index.vue';
|
import Form from '@/components/form/index.vue';
|
||||||
import TableList from "@/components/table/index.vue"
|
import TableList from "@/components/table/index.vue"
|
||||||
import {deptTreeSelect } from "@/api/system/user"
|
|
||||||
import { Splitpanes, Pane } from "splitpanes"
|
import { Splitpanes, Pane } from "splitpanes"
|
||||||
import {listAllBusinessList, addTaskStatic, switchNameTree} from "@/api/disRevenue/earnManage"
|
import {listAllBusinessList, addTaskStatic, switchNameTree} from "@/api/disRevenue/earnManage"
|
||||||
import {listAllSwitchName, getRegistList} from "@/api/disRevenue/resource"
|
import {getLogicalNode, getRegistList} from "@/api/disRevenue/resource"
|
||||||
import "splitpanes/dist/splitpanes.css"
|
import "splitpanes/dist/splitpanes.css"
|
||||||
export default {
|
export default {
|
||||||
name: 'busValueCount_Details',
|
name: 'busValueCount_Details',
|
||||||
@@ -56,6 +57,11 @@
|
|||||||
paramsData: {},
|
paramsData: {},
|
||||||
busNameList: {},
|
busNameList: {},
|
||||||
open: false,
|
open: false,
|
||||||
|
busNameListData: [],
|
||||||
|
logicalNodeList: [],
|
||||||
|
currentNodeKey: '',
|
||||||
|
tableColChange: {},
|
||||||
|
changeName: null,
|
||||||
tableList: [],
|
tableList: [],
|
||||||
// 列显隐信息
|
// 列显隐信息
|
||||||
columns: {
|
columns: {
|
||||||
@@ -70,22 +76,59 @@
|
|||||||
this.paramsData = this.$route && this.$route.query;
|
this.paramsData = this.$route && this.$route.query;
|
||||||
this.fnFormList();
|
this.fnFormList();
|
||||||
this.switchList();
|
this.switchList();
|
||||||
this.getDeptTree();
|
this.fnLogicalNode();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
console.log(tab, event);
|
if (this.changeName) {
|
||||||
|
this.tableColChange[this.changeName] = this.tableColChange[this.changeName] ? this.tableColChange[this.changeName].concat(this.$refs.tabRef.selectList) : this.$refs.tabRef.selectList;
|
||||||
|
}
|
||||||
|
this.deptOptions = [];
|
||||||
|
this.currentNodeKey = null;
|
||||||
|
if (this.activeName === 'first') {
|
||||||
|
this.deptOptions = this.busNameListData;
|
||||||
|
} else {
|
||||||
|
this.deptOptions = this.logicalNodeList;
|
||||||
|
}
|
||||||
|
if (this.deptOptions.length > 1) {
|
||||||
|
this.changeName = null;
|
||||||
|
this.handleNodeClick(this.deptOptions[0]);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/** 查询部门下拉树结构 */
|
// 逻辑节点标识
|
||||||
getDeptTree() {
|
fnLogicalNode() {
|
||||||
deptTreeSelect().then(response => {
|
getLogicalNode().then(val => {
|
||||||
this.deptOptions = response.data;
|
this.logicalNodeList = val && val.map(item => {
|
||||||
})
|
return Object.assign({}, item,{label: item.logicalNodeId, id: item.logicalNodeId});
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 节点单击事件
|
// 节点单击事件
|
||||||
handleNodeClick(data) {
|
handleNodeClick(data) {
|
||||||
// this.queryParams.deptId = data.id;
|
this.currentNodeKey = data.id;
|
||||||
// this.handleQuery();
|
if (this.changeName) {
|
||||||
|
this.tableColChange[this.changeName] = this.tableColChange[this.changeName] ? this.tableColChange[this.changeName].concat(this.$refs.tabRef.selectList) : this.$refs.tabRef.selectList;
|
||||||
|
}
|
||||||
|
let params = {logicalNodeId: data.id};
|
||||||
|
if (this.activeName === 'first') {
|
||||||
|
params = {businessName: data.id};
|
||||||
|
}
|
||||||
|
this.changeName = data.id;
|
||||||
|
this.getList(params,data.id);
|
||||||
|
},
|
||||||
|
getList(val,changeVal) {
|
||||||
|
this.$modal.loading();
|
||||||
|
getRegistList(Object.assign({}, {resourceType: 1}, val)).then(val => {
|
||||||
|
this.tableList = val && val.data || [];
|
||||||
|
if (this.tableColChange[changeVal] && this.tableColChange[changeVal].length > 0) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.tabRef.defaultSelectRows(null, this.tableColChange[changeVal]);
|
||||||
|
},500);
|
||||||
|
}
|
||||||
|
this.$modal.closeLoading();
|
||||||
|
}).catch(() => {
|
||||||
|
this.$modal.closeLoading();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// formList集合
|
// formList集合
|
||||||
fnFormList(objVal) {
|
fnFormList(objVal) {
|
||||||
@@ -96,7 +139,7 @@
|
|||||||
taskName: {label: '任务名称', span: 18, type: 'input',required: true},
|
taskName: {label: '任务名称', span: 18, type: 'input',required: true},
|
||||||
businessName: {label: '业务名称', span: 18, type: 'select', options:[]},
|
businessName: {label: '业务名称', span: 18, type: 'select', options:[]},
|
||||||
resourceType: {label: '包含资源类型', span: 18, type: 'select', eventName: 'change', options: this.dict.type.resource_type, required: true},
|
resourceType: {label: '包含资源类型', span: 18, type: 'select', eventName: 'change', options: this.dict.type.resource_type, required: true},
|
||||||
includedResourcesTree: {label: '包含资源', span: 18, type: 'treeSelect', options: [], searchable: true, multiple: true, required: true, hidden: this.ruleForm.resourceType && this.ruleForm.resourceType === '1' ? false : true},
|
includedResourcesTree: {label: '包含资源', span: 18, type: 'input', required: true, hidden: this.ruleForm.resourceType && this.ruleForm.resourceType === '1' ? false : true},
|
||||||
changeClientId: {label: '选择ClientID', span: 3, type: 'button', eventName: 'change', hidden: this.ruleForm.resourceType && this.ruleForm.resourceType === '1' ? false : true},
|
changeClientId: {label: '选择ClientID', span: 3, type: 'button', eventName: 'change', hidden: this.ruleForm.resourceType && this.ruleForm.resourceType === '1' ? false : true},
|
||||||
includedResources: {label: '包含资源', span: 18, type: 'cascader', options: [], required: true, hidden: this.ruleForm.resourceType && this.ruleForm.resourceType === '2' ? false : true},
|
includedResources: {label: '包含资源', span: 18, type: 'cascader', options: [], required: true, hidden: this.ruleForm.resourceType && this.ruleForm.resourceType === '2' ? false : true},
|
||||||
calculationType: {label: '计算类型', span: 18, type: 'select', options: this.dict.type.caculate_type, eventName: 'change', required: true},
|
calculationType: {label: '计算类型', span: 18, type: 'select', options: this.dict.type.caculate_type, eventName: 'change', required: true},
|
||||||
@@ -108,6 +151,7 @@
|
|||||||
switchList() {
|
switchList() {
|
||||||
listAllBusinessList().then(val => {
|
listAllBusinessList().then(val => {
|
||||||
this.formList[0].controls.businessName['options'] = val && val.data.map(item => {
|
this.formList[0].controls.businessName['options'] = val && val.data.map(item => {
|
||||||
|
this.busNameListData.push(Object.assign({}, item, {id: item.businessName, label: item.businessName}));
|
||||||
this.busNameList[item.businessName] = item;
|
this.busNameList[item.businessName] = item;
|
||||||
return Object.assign({label: item.businessName, value: item.businessName});
|
return Object.assign({label: item.businessName, value: item.businessName});
|
||||||
});
|
});
|
||||||
@@ -133,8 +177,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
submitPubilc() {
|
submitPubilc() {
|
||||||
|
this.tableColChange[this.changeName] = this.tableColChange[this.changeName] ? this.tableColChange[this.changeName].concat(this.$refs.tabRef.selectList) : this.$refs.tabRef.selectList;
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getFormDataList(this.currentDataList.id, 'btnGain');
|
console.log('tableColChange===',this.tableColChange);
|
||||||
|
let valList = [];
|
||||||
|
Object.keys(this.tableColChange).forEach(key => {
|
||||||
|
if (this.tableColChange[key] && this.tableColChange[key].length > 0) {
|
||||||
|
valList = valList.concat(this.tableColChange[key].map(item => item.clientId));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log('valList==',valList);
|
||||||
},
|
},
|
||||||
// 监听事件
|
// 监听事件
|
||||||
callback(result, dataVal, formVal) {
|
callback(result, dataVal, formVal) {
|
||||||
@@ -150,7 +202,7 @@
|
|||||||
this.formList[0].controls.includedResources['hidden'] = false;
|
this.formList[0].controls.includedResources['hidden'] = false;
|
||||||
this.formList[0].controls.includedResourcesTree['hidden'] = true;
|
this.formList[0].controls.includedResourcesTree['hidden'] = true;
|
||||||
}
|
}
|
||||||
this.includeDataList(dataVal);
|
// this.includeDataList(dataVal);
|
||||||
} else {
|
} else {
|
||||||
this.formList[0].controls.includedResourcesTree['hidden'] = true;
|
this.formList[0].controls.includedResourcesTree['hidden'] = true;
|
||||||
this.formList[0].controls.changeClientId['hidden'] = true;
|
this.formList[0].controls.changeClientId['hidden'] = true;
|
||||||
@@ -175,6 +227,8 @@
|
|||||||
break;
|
break;
|
||||||
case 'changeClientId':
|
case 'changeClientId':
|
||||||
this.open = true;
|
this.open = true;
|
||||||
|
this.tableColChange = {};
|
||||||
|
this.handleClick();
|
||||||
break;
|
break;
|
||||||
case 'submit':
|
case 'submit':
|
||||||
dataVal['calculationMode'] = this.paramsData.calculationMode;
|
dataVal['calculationMode'] = this.paramsData.calculationMode;
|
||||||
|
|||||||
@@ -161,7 +161,6 @@
|
|||||||
activeName: {
|
activeName: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.busList();
|
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: true
|
||||||
@@ -225,11 +224,10 @@
|
|||||||
busNameList: []
|
busNameList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// created() {
|
created() {
|
||||||
// this.$nextTick(() => {
|
// this.getList(1);
|
||||||
// this.getList(1);
|
this.busList();
|
||||||
// });
|
},
|
||||||
// },
|
|
||||||
// activated() {
|
// activated() {
|
||||||
// this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
// this.getList();
|
// this.getList();
|
||||||
|
|||||||
+2
-1
@@ -143,7 +143,8 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$store.dispatch("Login", this.loginForm).then(() => {
|
this.$store.dispatch("Login", this.loginForm).then(() => {
|
||||||
// 默认指向知识库页面
|
// 默认指向知识库页面
|
||||||
this.$router.push('/problemRecord').catch(()=>{})
|
// this.$router.push('/problemRecord').catch(()=>{})
|
||||||
|
this.$router.push('/').catch(()=>{})
|
||||||
// this.$router.push({ path: this.redirect || "/" }).catch(()=>{})
|
// this.$router.push({ path: this.redirect || "/" }).catch(()=>{})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@@ -260,7 +260,7 @@
|
|||||||
getMonitorPolicy(id).then(val => {
|
getMonitorPolicy(id).then(val => {
|
||||||
if (val && val.data) {
|
if (val && val.data) {
|
||||||
if (val.data && val.data.policy) {
|
if (val.data && val.data.policy) {
|
||||||
val.data.policy['policyName'] = btnGain && btnGain ? val.data.policy['policyName'] + '-引用' : val.data.policy['policyName'];
|
val.data.policy['policyName'] = btnGain && btnGain ? val.data.policy['policyName'] + '-' + Date.now() : val.data.policy['policyName'];
|
||||||
val.data.policy['deployDevice'] = val.data.policy.deployDevice.split('\n');
|
val.data.policy['deployDevice'] = val.data.policy.deployDevice.split('\n');
|
||||||
// val.data.policy['status'] = Number(val.data.policy.status);
|
// val.data.policy['status'] = Number(val.data.policy.status);
|
||||||
this.ruleFormData = val.data.policy;
|
this.ruleFormData = val.data.policy;
|
||||||
@@ -358,8 +358,16 @@
|
|||||||
// 3. 操作form(如验证)
|
// 3. 操作form(如验证)
|
||||||
formValid.validate((valid) => {
|
formValid.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
formValid.model.deployDevice = formValid.model.deployDevice.join('\n');
|
let newModel = {};
|
||||||
this.ruleFormData = formValid.model;
|
let newForm = JSON.parse(JSON.stringify(formValid.model));
|
||||||
|
this.formList.forEach(formCol => {
|
||||||
|
Object.keys(formCol.controls).forEach(colVal => {
|
||||||
|
if (!formCol.controls[colVal].hidden && colVal !== 'id') {
|
||||||
|
newModel[colVal] = newForm[colVal];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.ruleFormData = newModel;
|
||||||
resolve(true);
|
resolve(true);
|
||||||
} else {
|
} else {
|
||||||
resolve(false);
|
resolve(false);
|
||||||
@@ -393,6 +401,7 @@
|
|||||||
|
|
||||||
let paramsList = idsList.concat(autoIds);
|
let paramsList = idsList.concat(autoIds);
|
||||||
let params = Object.assign(this.ruleFormData, {resourceType: 'switch'},{collectionAndIdList: paramsList});
|
let params = Object.assign(this.ruleFormData, {resourceType: 'switch'},{collectionAndIdList: paramsList});
|
||||||
|
params.deployDevice = params.deployDevice.join('\n');
|
||||||
let fnType = addResourcePolicy;
|
let fnType = addResourcePolicy;
|
||||||
if (this.paramsData && this.paramsData.id) {
|
if (this.paramsData && this.paramsData.id) {
|
||||||
fnType = updateResourcePolicy;
|
fnType = updateResourcePolicy;
|
||||||
|
|||||||
+22
-14
@@ -21,7 +21,7 @@
|
|||||||
<div class="w100 plr-20">
|
<div class="w100 plr-20">
|
||||||
<div class="menu-container">
|
<div class="menu-container">
|
||||||
<div v-for="menuItem of menuList" @click="menuRouter(menuItem)" class="menu-item">
|
<div v-for="menuItem of menuList" @click="menuRouter(menuItem)" class="menu-item">
|
||||||
<div class="menu-item-content">{{menuItem.name}}</div>
|
<div class="menu-item-content">{{menuItem.pageName}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {clicMenuCount, getMenuTopEight} from "@/api/menu";
|
||||||
export default {
|
export default {
|
||||||
name: "welcome",
|
name: "welcome",
|
||||||
data() {
|
data() {
|
||||||
@@ -56,25 +57,32 @@
|
|||||||
methods: {
|
methods: {
|
||||||
// 处理菜单
|
// 处理菜单
|
||||||
menuHandle(menu) {
|
menuHandle(menu) {
|
||||||
menu.forEach(item => {
|
// menu.forEach(item => {
|
||||||
if (!item.hidden) {
|
// if (!item.hidden) {
|
||||||
item.children.forEach(val => {
|
// item.children.forEach(val => {
|
||||||
if (!val.hidden) {
|
// if (!val.hidden) {
|
||||||
if (val.children) {
|
// if (val.children) {
|
||||||
val.path = item.path + '/' + val.path;
|
// val.path = item.path + '/' + val.path;
|
||||||
this.menuHandle([val]);
|
// this.menuHandle([val]);
|
||||||
} else {
|
// } else {
|
||||||
this.menuList.push({name: val.meta.title, link: item.path && item.path === '/' ? item.path + val.path : item.path + '/' + val.path});
|
// this.menuList.push({name: val.meta.title, link: item.path && item.path === '/' ? item.path + val.path : item.path + '/' + val.path});
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
getMenuTopEight().then(res => {
|
||||||
|
if (res && res.data) {
|
||||||
|
this.menuList = res.data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 菜单跳转
|
// 菜单跳转
|
||||||
menuRouter(menuLink) {
|
menuRouter(menuLink) {
|
||||||
|
let params = {pageRoute: menuLink.pageRoute, pageName: menuLink.pageName};
|
||||||
|
clicMenuCount(params).then(res => {});
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: menuLink.link
|
path: menuLink.pageRoute
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user