Commit fca1bd44 authored by 张耀's avatar 张耀

Merge branch 'dev' into zy

parents 302fb2f2 6fc4729c
...@@ -115,11 +115,11 @@ export default { ...@@ -115,11 +115,11 @@ export default {
mounted() { mounted() {
// this.getSysOptions(); // this.getSysOptions();
// 用户登录状态有效检测 // 用户登录状态有效检测
if (this.userInfo) { // if (this.userInfo) {
setInterval(() => { // setInterval(() => {
$axios.get("/apaas/system/v5/user/login/check"); // $axios.get("/apaas/system/v5/user/login/check");
}, 15 * 1000); // }, 15 * 1000);
} // }
}, },
methods: { methods: {
openMsg(data) { openMsg(data) {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</template> </template>
<script setup> <script setup>
import { reactive, ref, onBeforeMount, toRefs } from "vue"; import { reactive, ref, onBeforeMount, toRefs, watch } from "vue";
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
type: [String, Number], type: [String, Number],
...@@ -35,6 +35,13 @@ const emit = defineEmits(["update:modelValue", "change"]); ...@@ -35,6 +35,13 @@ const emit = defineEmits(["update:modelValue", "change"]);
const nowIndex = ref(""); const nowIndex = ref("");
watch(
() => props.modelValue,
() => {
nowIndex.value = props.modelValue;
}
);
const changeInner = (val) => { const changeInner = (val) => {
nowIndex.value = val; nowIndex.value = val;
emit("update:modelValue", val); emit("update:modelValue", val);
...@@ -42,7 +49,7 @@ const changeInner = (val) => { ...@@ -42,7 +49,7 @@ const changeInner = (val) => {
}; };
onBeforeMount(() => { onBeforeMount(() => {
nowIndex.value = props.default; nowIndex.value = props.modelValue;
}); });
</script> </script>
......
<template> <template>
<div class="bg-breadcrumb"> <div class="bg-breadcrumb">
<el-breadcrumb separator="/"> <el-breadcrumb separator="/">
<el-breadcrumb-item v-if="state.breadcrumbData.length>=2" v-for="(item,index) in state.dataArr" :to="{ path: item.path }"> {{item.name}} </el-breadcrumb-item> <el-breadcrumb-item
<el-breadcrumb-item> {{state.breadcrumbData[state.breadcrumbData.length-1].name}} </el-breadcrumb-item> v-if="state.breadcrumbData.length >= 2"
v-for="(item, index) in state.dataArr"
:to="{ path: item.path }">
{{ item.name }}
</el-breadcrumb-item>
<el-breadcrumb-item> {{ state.breadcrumbData[state.breadcrumbData.length - 1].name }} </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
</template> </template>
<script setup> <script setup>
import { reactive, ref,onBeforeMount,toRefs } from 'vue' import { reactive, ref, onBeforeMount, toRefs } from "vue";
import { useRouter,useRoute } from 'vue-router' import { useRouter, useRoute } from "vue-router";
import store from "@/store"; import store from "@/store";
import { ElMessage } from 'element-plus' import { ElMessage } from "element-plus";
const router = useRouter() const router = useRouter();
const route = useRoute() const route = useRoute();
const state = reactive({ const state = reactive({
dataArr:[], dataArr: [],
breadcrumbData:[] breadcrumbData: [],
}) });
const props = defineProps({ const props = defineProps({
isMenu:{ isMenu: {
type:Boolean, type: Boolean,
default:false default: false,
} },
}) });
const getBreadcrumbData = (menuObj,menu,path)=>{ const getBreadcrumbData = (menuObj, menu, path) => {
//获取整体需要路径 //获取整体需要路径
let parentPath = menuObj[path].rowPath.slice(1,menuObj[path].rowPath.length).split('.') let parentPath = menuObj[path].rowPath.slice(1, menuObj[path].rowPath.length).split(".");
getFirstPath(parentPath,menu) getFirstPath(parentPath, menu);
//有2层以上的面包屑显示,则继续向下处理 //有2层以上的面包屑显示,则继续向下处理
if(parentPath.length>=2){ if (parentPath.length >= 2) {
getOtherPath(parentPath,menu) getOtherPath(parentPath, menu);
} }
} };
const getFirstPath = (parentPath,menu)=>{ const getFirstPath = (parentPath, menu) => {
let tempMenu = menu[parentPath[0]] let tempMenu = menu[parentPath[0]];
if (!props.isMenu) { if (!props.isMenu) {
tempMenu = tempMenu.children[parentPath[1]] tempMenu = tempMenu.children[parentPath[1]];
} }
//目录则跳转第一个子类,菜单子菜单则跳转自身 //目录则跳转第一个子类,菜单子菜单则跳转自身
if(tempMenu.menuType==0){ if (tempMenu.menuType == 0) {
if(tempMenu.children&&tempMenu.children.length){ if (tempMenu.children && tempMenu.children.length) {
for (let index = 0; index < tempMenu.children.length; index++) { for (let index = 0; index < tempMenu.children.length; index++) {
const e = tempMenu.children[index]; const e = tempMenu.children[index];
if(e.menuType!==0){ if (e.menuType !== 0) {
state.breadcrumbData.push( state.breadcrumbData.push({
{ path: e.path,
path:e.path, name: tempMenu.menuName,
name:tempMenu.menuName });
} break;
)
break
} }
} }
} }
}else{ } else {
state.breadcrumbData.push( state.breadcrumbData.push({
{ path: tempMenu.path,
path:tempMenu.path, name: tempMenu.menuName,
name:tempMenu.menuName });
} }
) };
}
}
const getOtherPath = (parentPath,menu)=>{ const getOtherPath = (parentPath, menu) => {
let tempMenu = menu[parentPath[0]] let tempMenu = menu[parentPath[0]];
let index let index;
if (!props.isMenu) { if (!props.isMenu) {
index = 2 index = 2;
tempMenu = tempMenu.children[parentPath[1]].children||[] tempMenu = tempMenu.children[parentPath[1]].children || [];
}else { } else {
tempMenu = tempMenu.children || [] tempMenu = tempMenu.children || [];
index = 1 index = 1;
} }
if(tempMenu.length&&parentPath[index]){ if (tempMenu.length && parentPath[index]) {
getPath(tempMenu,parentPath,index) getPath(tempMenu, parentPath, index);
} }
} };
const getPath = (tempMenu,parentPath,index)=>{ const getPath = (tempMenu, parentPath, index) => {
if(!tempMenu[parentPath[index]]){ if (!tempMenu[parentPath[index]]) {
return return;
} }
tempMenu = tempMenu[parentPath[index]] tempMenu = tempMenu[parentPath[index]];
index = index+1 index = index + 1;
state.breadcrumbData.push( state.breadcrumbData.push({
{ path: tempMenu.path,
path:tempMenu.path, name: tempMenu.menuName,
name:tempMenu.menuName });
if (tempMenu.children && tempMenu.children.length && parentPath[index]) {
getPath(tempMenu.children, parentPath, index);
} }
) };
if(tempMenu.children&&tempMenu.children.length&&parentPath[index]){
getPath(tempMenu.children,parentPath,index)
}
}
onBeforeMount(()=>{ onBeforeMount(() => {
getBreadcrumbData(store.state.menuObj,store.state.menu,route.path) getBreadcrumbData(store.state.menuObj, store.state.menu, route.path);
state.breadcrumbData.forEach((e,idx) => { state.breadcrumbData.forEach((e, idx) => {
if(idx!==state.breadcrumbData.length-1){ if (idx !== state.breadcrumbData.length - 1) {
state.dataArr.push(e) state.dataArr.push(e);
} }
});
}); });
})
</script> </script>
<style scoped> <style scoped></style>
</style>
...@@ -233,7 +233,7 @@ export default { ...@@ -233,7 +233,7 @@ export default {
}, },
menuAction(n, parent) { menuAction(n, parent) {
if (n == "logout") { if (n == "logout") {
this.$axios.post("/apaas/system/v5/user/logout").then((res) => { this.$axios.post("/v1/api/user/logout").then((res) => {
if (res.data.code == "200") { if (res.data.code == "200") {
window.location.href = "/so/manage/ui//#/login"; window.location.href = "/so/manage/ui//#/login";
this.$store.commit("setUserInfo", null); this.$store.commit("setUserInfo", null);
......
...@@ -60,6 +60,7 @@ import axios from "@/request/http.js"; ...@@ -60,6 +60,7 @@ import axios from "@/request/http.js";
import { Encrypt } from "@/services/secret.js"; import { Encrypt } from "@/services/secret.js";
import { useStore } from "vuex"; import { useStore } from "vuex";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { menuData } from "./menu";
const router = useRouter(); const router = useRouter();
...@@ -95,7 +96,7 @@ const loginAction = () => { ...@@ -95,7 +96,7 @@ const loginAction = () => {
loginFormRef.value.validate((valid) => { loginFormRef.value.validate((valid) => {
if (valid) { if (valid) {
axios.get(`/apaas/system/v5/user/verifyCaptcha?id=${state.imgId}&value=${state.loginForm.yzm}`).then((res) => { axios.get(`/v1/api/user/verifyCaptcha?id=${state.imgId}&value=${state.loginForm.yzm}`).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
login(); login();
} else { } else {
...@@ -107,7 +108,7 @@ const loginAction = () => { ...@@ -107,7 +108,7 @@ const loginAction = () => {
}; };
const login = () => { const login = () => {
axios axios
.post(`/apaas/system/v5/user/login`, { .post(`/v1/api/user/login`, {
system_account: state.loginForm.userid, system_account: state.loginForm.userid,
password: Encrypt(state.loginForm.password), password: Encrypt(state.loginForm.password),
}) })
...@@ -124,13 +125,17 @@ const login = () => { ...@@ -124,13 +125,17 @@ const login = () => {
}); });
}; };
const getUserInfo = () => { const getUserInfo = () => {
return axios.get(`/apaas/system/v5/user/getUserInfo`); return axios.get(`/v1/api/user/getUserInfo`);
}; };
const getMenu = (search) => { const getMenu = (search) => {
return axios.get(`/apaas/system/v5/menu/user/tree?search=${search}`); // return axios.get(`/apaas/system/v5/menu/user/tree?search=${search}`);
return new Promise((resolve, reject) => {
resolve(menuData);
});
}; };
const getUser = () => { const getUser = () => {
Promise.all([getUserInfo(), getMenu("79a8f214-db78-4db7-9c28-db66276b4be2")]).then((res) => { Promise.all([getUserInfo(), getMenu("79a8f214-db78-4db7-9c28-db66276b4be2")]).then((res) => {
console.log("res", res);
if (res[0].data.code == 200 && res[1].data.code == 200) { if (res[0].data.code == 200 && res[1].data.code == 200) {
let data = (res[1].data.data && res[1].data.data[0].children) || []; let data = (res[1].data.data && res[1].data.data[0].children) || [];
store.commit("setUserInfo", res[0].data.data); store.commit("setUserInfo", res[0].data.data);
...@@ -162,7 +167,7 @@ const getMenuObj = (menu, parentRowPath, menuObj) => { ...@@ -162,7 +167,7 @@ const getMenuObj = (menu, parentRowPath, menuObj) => {
}); });
}; };
const getImg = (clearInput = false) => { const getImg = (clearInput = false) => {
axios.get(`/apaas/system/v5/user/getCaptcha??width=138&height=36`).then((res) => { axios.get(`/v1/api/user/getCaptcha?width=138&height=36`).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
state.imgId = res.data.data.id; state.imgId = res.data.data.id;
state.imgSrc = res.data.data.captcha; state.imgSrc = res.data.data.captcha;
......
...@@ -142,7 +142,7 @@ const loginAction = () => { ...@@ -142,7 +142,7 @@ const loginAction = () => {
}; // 短信验证码登录 }; // 短信验证码登录
const getUserInfo = () => { const getUserInfo = () => {
return axios.get(`/apaas/system/v5/user/getUserInfo`); return axios.get(`/v1/api/user/getUserInfo`);
}; };
const getMenu = (search) => { const getMenu = (search) => {
return axios.get(`/apaas/system/v5/menu/user/tree?search=${search}`); return axios.get(`/apaas/system/v5/menu/user/tree?search=${search}`);
......
export const menuData = {
data: {
code: 200,
msg: "查询成功",
data: [
{
id: 564,
level: 1,
sort: 13,
menuName: "智能运维平台",
dict_group_id: "",
menuType: 0,
path: "/",
parentPath: "",
icon: "",
menu_id: "49000595-1687-4b66-86a5-1839049e21cb",
p_menu_id: "",
source: "",
children: [
{
id: 568,
level: 2,
sort: 3,
menuName: "预警管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 0,
path: "/forewarning",
parentPath: "/",
icon: "bg-ic-alarm",
menu_id: "8daba449-7a15-426c-a391-bfa6b8053ee7",
p_menu_id: "49000595-1687-4b66-86a5-1839049e21cb",
source: "",
children: [
{
id: 575,
level: 3,
sort: 1,
menuName: "预警列表",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/forewarning/list",
parentPath: "/so/manage/ui/#/forewarning",
icon: "",
menu_id: "e5a6a71e-2a5d-4171-ac35-49f869956b08",
p_menu_id: "8daba449-7a15-426c-a391-bfa6b8053ee7",
source: "",
children: [
{
id: 714,
level: 4,
sort: 1,
menuName: "详情",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/forewarning/list/detail",
parentPath: "/forewarning/list",
icon: "",
menu_id: "73403274-6a8a-4a36-9856-67f98d82382e",
p_menu_id: "e5a6a71e-2a5d-4171-ac35-49f869956b08",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "forewarning-list-detail",
rowPath: ".0.0.0",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "forewarning-list",
rowPath: ".0.0",
},
{
id: 724,
level: 3,
sort: 2,
menuName: "预警规则设置",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/forewarning/rule-set",
parentPath: "/so/manage/ui/#/forewarning",
icon: "",
menu_id: "7e129970-0313-4375-b6f5-72cca454378a",
p_menu_id: "8daba449-7a15-426c-a391-bfa6b8053ee7",
source: "",
children: [
{
id: 725,
level: 4,
sort: 1,
menuName: "详情",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/forewarning/rule-set/detail",
parentPath: "/forewarning/rule-set",
icon: "",
menu_id: "503f1b5a-4f89-4bdf-a331-b8cfa0f14322",
p_menu_id: "7e129970-0313-4375-b6f5-72cca454378a",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "forewarning-rule-set-detail",
rowPath: ".0.1.0",
},
{
id: 726,
level: 4,
sort: 2,
menuName: "新增",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/forewarning/rule-set/add",
parentPath: "/forewarning/rule-set",
icon: "",
menu_id: "5afcd084-f92f-497e-b5d9-7ddc279ab855",
p_menu_id: "7e129970-0313-4375-b6f5-72cca454378a",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "forewarning-rule-set-add",
rowPath: ".0.1.1",
},
{
id: 727,
level: 4,
sort: 3,
menuName: "编辑",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/forewarning/rule-set/edit",
parentPath: "/forewarning/rule-set",
icon: "",
menu_id: "81fff038-5f5a-467b-a2d4-6517fc128016",
p_menu_id: "7e129970-0313-4375-b6f5-72cca454378a",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "forewarning-rule-set-edit",
rowPath: ".0.1.2",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "forewarning-rule-set",
rowPath: ".0.1",
},
{
id: 728,
level: 3,
sort: 3,
menuName: "指标配置",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/forewarning/indicator-config",
parentPath: "/so/manage/ui/#/forewarning",
icon: "",
menu_id: "ffbae43e-2bb8-42a6-8374-0f6201d7a937",
p_menu_id: "8daba449-7a15-426c-a391-bfa6b8053ee7",
source: "",
children: [
{
id: 729,
level: 4,
sort: 1,
menuName: "详情",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/forewarning/indicator-config/detail",
parentPath: "/forewarning/indicator-config",
icon: "",
menu_id: "f6e54273-540b-4139-b919-3ca58279c843",
p_menu_id: "ffbae43e-2bb8-42a6-8374-0f6201d7a937",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "forewarning-indicator-config-detail",
rowPath: ".0.2.0",
},
{
id: 731,
level: 4,
sort: 2,
menuName: "新增",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/forewarning/indicator-config/add",
parentPath: "/forewarning/indicator-config",
icon: "",
menu_id: "46d8410a-b56e-4baa-8c36-a3923d3119af",
p_menu_id: "ffbae43e-2bb8-42a6-8374-0f6201d7a937",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "forewarning-indicator-config-add",
rowPath: ".0.2.1",
},
{
id: 732,
level: 4,
sort: 3,
menuName: "编辑",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/forewarning/indicator-config/edit",
parentPath: "/forewarning/indicator-config",
icon: "",
menu_id: "755ca3b8-3d45-44df-a3b7-c416c782bf74",
p_menu_id: "ffbae43e-2bb8-42a6-8374-0f6201d7a937",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "forewarning-indicator-config-edit",
rowPath: ".0.2.2",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "forewarning-indicator-config",
rowPath: ".0.2",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "so-manage-ui-#-forewarning",
rowPath: ".0",
},
{
id: 569,
level: 2,
sort: 4,
menuName: "工单管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 0,
path: "/ticket",
parentPath: "/",
icon: "",
menu_id: "d2e5e9a4-52f3-47dc-963a-450ee4e57185",
p_menu_id: "49000595-1687-4b66-86a5-1839049e21cb",
source: "",
children: [
{
id: 616,
level: 3,
sort: 1,
menuName: "我的预警工单",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/ticket/my-warn-ticket",
parentPath: "/so/manage/ui/#/ticket",
icon: "",
menu_id: "5ad00fbd-5cdb-4929-a64f-fed5ee935913",
p_menu_id: "d2e5e9a4-52f3-47dc-963a-450ee4e57185",
source: "",
children: [
{
id: 653,
level: 4,
sort: 1,
menuName: "详情",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/ticket/my-warn-ticket/detail",
parentPath: "/ticket/my-warn-ticket",
icon: "",
menu_id: "741faf9b-9d78-4f94-a874-2a4fbc0784c4",
p_menu_id: "5ad00fbd-5cdb-4929-a64f-fed5ee935913",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "ticket-my-warn-ticket-detail",
rowPath: ".1.0.0",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "ticket-my-warn-ticket",
rowPath: ".1.0",
},
{
id: 617,
level: 3,
sort: 2,
menuName: "我的业务工单",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/ticket/my-business-ticket",
parentPath: "/so/manage/ui/#/ticket",
icon: "",
menu_id: "f8c11e64-7c63-4d4f-9a78-f01f3ae460fe",
p_menu_id: "d2e5e9a4-52f3-47dc-963a-450ee4e57185",
source: "",
children: [
{
id: 654,
level: 4,
sort: 1,
menuName: "详情",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/ticket/my-business-ticket/detail",
parentPath: "/ticket/my-business-ticket",
icon: "",
menu_id: "afe1c859-bf35-45b3-8bd9-94a85aa3232f",
p_menu_id: "f8c11e64-7c63-4d4f-9a78-f01f3ae460fe",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "ticket-my-business-ticket-detail",
rowPath: ".1.1.0",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "ticket-my-business-ticket",
rowPath: ".1.1",
},
{
id: 618,
level: 3,
sort: 3,
menuName: "业务工单列表",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/ticket/business-ticket-list",
parentPath: "/so/manage/ui/#/ticket",
icon: "",
menu_id: "4360dade-483a-48b5-b6ac-cc3935d225a8",
p_menu_id: "d2e5e9a4-52f3-47dc-963a-450ee4e57185",
source: "",
children: [
{
id: 655,
level: 4,
sort: 1,
menuName: "详情",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/ticket/business-ticket-list/detail",
parentPath: "/ticket/business-ticket-list",
icon: "",
menu_id: "c7598812-be18-4764-816d-2969a32f0a00",
p_menu_id: "4360dade-483a-48b5-b6ac-cc3935d225a8",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "ticket-business-ticket-list-detail",
rowPath: ".1.2.0",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "ticket-business-ticket-list",
rowPath: ".1.2",
},
{
id: 619,
level: 3,
sort: 4,
menuName: "业务工单管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/ticket/business-ticket-manage",
parentPath: "/so/manage/ui/#/ticket",
icon: "",
menu_id: "b3671f7e-f879-4864-b4a9-1f2c23a59e1a",
p_menu_id: "d2e5e9a4-52f3-47dc-963a-450ee4e57185",
source: "",
children: [
{
id: 656,
level: 4,
sort: 1,
menuName: "详情",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/ticket/business-ticket-manage/detail",
parentPath: "/ticket/business-ticket-manage",
icon: "",
menu_id: "d416bcd4-86e1-4f42-af51-262effd38f50",
p_menu_id: "b3671f7e-f879-4864-b4a9-1f2c23a59e1a",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "ticket-business-ticket-manage-detail",
rowPath: ".1.3.0",
},
{
id: 677,
level: 4,
sort: 2,
menuName: "新增",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/ticket/business-ticket-manage/add",
parentPath: "/ticket/business-ticket-manage",
icon: "",
menu_id: "9c48aeac-6634-4598-b846-7356a7726412",
p_menu_id: "b3671f7e-f879-4864-b4a9-1f2c23a59e1a",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "ticket-business-ticket-manage-add",
rowPath: ".1.3.1",
},
{
id: 678,
level: 4,
sort: 3,
menuName: "编辑",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/ticket/business-ticket-manage/edit",
parentPath: "/ticket/business-ticket-manage",
icon: "",
menu_id: "51edc697-3d4e-40fe-9621-c9cd4edef0e9",
p_menu_id: "b3671f7e-f879-4864-b4a9-1f2c23a59e1a",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "ticket-business-ticket-manage-edit",
rowPath: ".1.3.2",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "ticket-business-ticket-manage",
rowPath: ".1.3",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "so-manage-ui-#-ticket",
rowPath: ".1",
},
{
id: 570,
level: 2,
sort: 5,
menuName: "自动化运维",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 0,
path: "/auto-maintenance",
parentPath: "/",
icon: "",
menu_id: "a7873f39-f8a2-4c8e-80bc-f71bb061a697",
p_menu_id: "49000595-1687-4b66-86a5-1839049e21cb",
source: "",
children: [
{
id: 620,
level: 3,
sort: 1,
menuName: "任务管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/auto-maintenance/task-manage",
parentPath: "/so/manage/ui/#/auto-maintenance",
icon: "",
menu_id: "4198ef5e-c345-4a85-9d9e-27cc29bd91a9",
p_menu_id: "a7873f39-f8a2-4c8e-80bc-f71bb061a697",
source: "",
children: [
{
id: 675,
level: 4,
sort: 1,
menuName: "新增",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/auto-maintenance/task-manage/add",
parentPath: "/auto-maintenance/task-manage",
icon: "",
menu_id: "8a40050c-1afe-43ed-ba00-100c9710e3f5",
p_menu_id: "4198ef5e-c345-4a85-9d9e-27cc29bd91a9",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "auto-maintenance-task-manage-add",
rowPath: ".2.0.0",
},
{
id: 676,
level: 4,
sort: 2,
menuName: "编辑",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/auto-maintenance/task-manage/edit",
parentPath: "/auto-maintenance/task-manage",
icon: "",
menu_id: "4aa67819-5ab1-4c0f-b868-479c9b8c1e6d",
p_menu_id: "4198ef5e-c345-4a85-9d9e-27cc29bd91a9",
source: "/auto-maintenance/task-manage/add",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "auto-maintenance-task-manage-edit",
rowPath: ".2.0.1",
},
{
id: 734,
level: 4,
sort: 3,
menuName: "复制",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/auto-maintenance/task-manage/copy",
parentPath: "/auto-maintenance/task-manage",
icon: "",
menu_id: "f419289e-3404-49ef-8131-941a520ec9d2",
p_menu_id: "4198ef5e-c345-4a85-9d9e-27cc29bd91a9",
source: "/auto-maintenance/task-manage/add",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "auto-maintenance-task-manage-copy",
rowPath: ".2.0.2",
},
{
id: 735,
level: 4,
sort: 4,
menuName: "详情",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/auto-maintenance/task-manage/detail",
parentPath: "/auto-maintenance/task-manage",
icon: "",
menu_id: "6ed3aef8-0ae4-4f91-ba10-6a9fa7de882f",
p_menu_id: "4198ef5e-c345-4a85-9d9e-27cc29bd91a9",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "auto-maintenance-task-manage-detail",
rowPath: ".2.0.3",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "auto-maintenance-task-manage",
rowPath: ".2.0",
},
{
id: 621,
level: 3,
sort: 2,
menuName: "任务历史",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/auto-maintenance/task-history",
parentPath: "/so/manage/ui/#/auto-maintenance",
icon: "",
menu_id: "0044c83c-082d-4606-9a14-e24cf36b8f00",
p_menu_id: "a7873f39-f8a2-4c8e-80bc-f71bb061a697",
source: "",
children: [
{
id: 657,
level: 4,
sort: 1,
menuName: "执行列表",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/auto-maintenance/task-history/list",
parentPath: "/auto-maintenance/task-history",
icon: "",
menu_id: "106b5271-bd3a-44c2-ab56-cb710cc676bc",
p_menu_id: "0044c83c-082d-4606-9a14-e24cf36b8f00",
source: "",
children: [
{
id: 733,
level: 5,
sort: 1,
menuName: "执行日志",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/auto-maintenance/task-history/list/record",
parentPath: "/auto-maintenance/task-history/list",
icon: "",
menu_id: "1bc43228-c0b1-4ec5-8c22-184ce6a64679",
p_menu_id: "106b5271-bd3a-44c2-ab56-cb710cc676bc",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "auto-maintenance-task-history-list-record",
rowPath: ".2.1.0.0",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "auto-maintenance-task-history-list",
rowPath: ".2.1.0",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "auto-maintenance-task-history",
rowPath: ".2.1",
},
{
id: 622,
level: 3,
sort: 3,
menuName: "主机管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/auto-maintenance/host-manage",
parentPath: "/so/manage/ui/#/auto-maintenance",
icon: "",
menu_id: "c1d7402b-fbcf-402d-b0a9-13b7fcfe8aa0",
p_menu_id: "a7873f39-f8a2-4c8e-80bc-f71bb061a697",
source: "",
children: [
{
id: 713,
level: 4,
sort: 1,
menuName: "新增",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/auto-maintenance/host-manage/add",
parentPath: "/auto-maintenance/host-manage",
icon: "",
menu_id: "7226600b-2b2f-4e1f-8f7e-f78e779d0b12",
p_menu_id: "c1d7402b-fbcf-402d-b0a9-13b7fcfe8aa0",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "auto-maintenance-host-manage-add",
rowPath: ".2.2.0",
},
{
id: 718,
level: 4,
sort: 2,
menuName: "编辑",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/auto-maintenance/host-manage/edit",
parentPath: "/auto-maintenance/host-manage",
icon: "",
menu_id: "20c8e83b-5cae-4287-bb85-f7955b6e0d3c",
p_menu_id: "c1d7402b-fbcf-402d-b0a9-13b7fcfe8aa0",
source: "/auto-maintenance/host-manage/add",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "auto-maintenance-host-manage-edit",
rowPath: ".2.2.1",
},
{
id: 730,
level: 4,
sort: 3,
menuName: "详情",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/auto-maintenance/host-manage/detail",
parentPath: "/auto-maintenance/host-manage",
icon: "",
menu_id: "72a56d39-3f90-433f-82d5-0fd4b26af887",
p_menu_id: "c1d7402b-fbcf-402d-b0a9-13b7fcfe8aa0",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "auto-maintenance-host-manage-detail",
rowPath: ".2.2.2",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "auto-maintenance-host-manage",
rowPath: ".2.2",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "so-manage-ui-#-auto-maintenance",
rowPath: ".2",
},
{
id: 571,
level: 2,
sort: 6,
menuName: "系统管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 0,
path: "/system-admin",
parentPath: "/",
icon: "",
menu_id: "f0ecc2db-e77a-4889-aa45-695735f97278",
p_menu_id: "49000595-1687-4b66-86a5-1839049e21cb",
source: "",
children: [
{
id: 608,
level: 3,
sort: 1,
menuName: "首选项管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/system-admin/preference",
parentPath: "/so/manage/ui/#/system-admin",
icon: "",
menu_id: "fbe595dc-f8af-48e5-afac-6426359865b8",
p_menu_id: "f0ecc2db-e77a-4889-aa45-695735f97278",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "system-admin-preference",
rowPath: ".3.0",
},
{
id: 609,
level: 3,
sort: 2,
menuName: "字典管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/system-admin/dict",
parentPath: "/so/manage/ui/#/system-admin",
icon: "",
menu_id: "3b94fdd8-fd30-4d4d-bf60-a51ced49a18c",
p_menu_id: "f0ecc2db-e77a-4889-aa45-695735f97278",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "system-admin-dict",
rowPath: ".3.1",
},
{
id: 610,
level: 3,
sort: 3,
menuName: "访问控制管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/system-admin/visit-control",
parentPath: "/so/manage/ui/#/system-admin",
icon: "",
menu_id: "02c7bc10-92ed-4119-a7d3-468804fb9f20",
p_menu_id: "f0ecc2db-e77a-4889-aa45-695735f97278",
source: "",
children: [
{
id: 658,
level: 4,
sort: 1,
menuName: "新增",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/system-admin/visit-control/add",
parentPath: "/system-admin/visit-control",
icon: "",
menu_id: "84663380-e2ae-46e7-a54d-265c0c4ce7d1",
p_menu_id: "02c7bc10-92ed-4119-a7d3-468804fb9f20",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "system-admin-visit-control-add",
rowPath: ".3.2.0",
},
{
id: 659,
level: 4,
sort: 2,
menuName: "编辑",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/system-admin/visit-control/edit",
parentPath: "/system-admin/visit-control",
icon: "",
menu_id: "9f7fcabf-1509-4d30-b1d4-b8dca4d28bd6",
p_menu_id: "02c7bc10-92ed-4119-a7d3-468804fb9f20",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "system-admin-visit-control-edit",
rowPath: ".3.2.1",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "system-admin-visit-control",
rowPath: ".3.2",
},
{
id: 611,
level: 3,
sort: 4,
menuName: "菜单管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/system-admin/menu",
parentPath: "/so/manage/ui/#/system-admin",
icon: "",
menu_id: "339960d7-ec6b-42bd-97db-f64827edfc0d",
p_menu_id: "f0ecc2db-e77a-4889-aa45-695735f97278",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "system-admin-menu",
rowPath: ".3.3",
},
{
id: 660,
level: 3,
sort: 5,
menuName: "日志管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 0,
path: "/system-admin/log",
parentPath: "/so/manage/ui/#/system-admin",
icon: "",
menu_id: "224f73fd-f095-40ff-b1dd-6d094cf59280",
p_menu_id: "f0ecc2db-e77a-4889-aa45-695735f97278",
source: "",
children: [
{
id: 661,
level: 4,
sort: 1,
menuName: "系统日志",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/system-admin/log/system-log",
parentPath: "/system-admin/log",
icon: "",
menu_id: "9ade8895-db88-416d-b505-83a7176d8414",
p_menu_id: "224f73fd-f095-40ff-b1dd-6d094cf59280",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "system-admin-log-system-log",
rowPath: ".3.4.0",
},
{
id: 662,
level: 4,
sort: 2,
menuName: "用户行为审计",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/system-admin/log/userAccount",
parentPath: "/system-admin/log",
icon: "",
menu_id: "185558e4-afc4-44b0-ba9e-12e11cad25ef",
p_menu_id: "224f73fd-f095-40ff-b1dd-6d094cf59280",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "system-admin-log-userAccount",
rowPath: ".3.4.1",
},
{
id: 663,
level: 4,
sort: 3,
menuName: "用户账户审计",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/system-admin/log/userBehavior",
parentPath: "/system-admin/log",
icon: "",
menu_id: "84f732d7-574b-4f66-9ef0-2aad4cdc353c",
p_menu_id: "224f73fd-f095-40ff-b1dd-6d094cf59280",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "system-admin-log-userBehavior",
rowPath: ".3.4.2",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "system-admin-log",
rowPath: ".3.4",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "so-manage-ui-#-system-admin",
rowPath: ".3",
},
{
id: 572,
level: 2,
sort: 7,
menuName: "权限管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 0,
path: "/authority",
parentPath: "/",
icon: "",
menu_id: "758a089a-4331-4a09-93a1-13714c71e83e",
p_menu_id: "49000595-1687-4b66-86a5-1839049e21cb",
source: "",
children: [
{
id: 613,
level: 3,
sort: 1,
menuName: "用户管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/authority/user",
parentPath: "/so/manage/ui/#/authority",
icon: "",
menu_id: "8406147f-6343-41e2-ba25-155bd70f63b4",
p_menu_id: "758a089a-4331-4a09-93a1-13714c71e83e",
source: "",
children: [
{
id: 664,
level: 4,
sort: 1,
menuName: "新增",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/authority/user/add",
parentPath: "/authority/user",
icon: "",
menu_id: "a1a698b6-8e5e-495e-b790-e957fbb782b9",
p_menu_id: "8406147f-6343-41e2-ba25-155bd70f63b4",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-user-add",
rowPath: ".4.0.0",
},
{
id: 665,
level: 4,
sort: 2,
menuName: "编辑",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/authority/user/edit",
parentPath: "/authority/user",
icon: "",
menu_id: "d68af222-4752-4b28-a88b-34d52ef6161e",
p_menu_id: "8406147f-6343-41e2-ba25-155bd70f63b4",
source: "/authority/user/add",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-user-edit",
rowPath: ".4.0.1",
},
{
id: 666,
level: 4,
sort: 3,
menuName: "账号详情",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/authority/user/detail",
parentPath: "/authority/user",
icon: "",
menu_id: "1dcc44ad-9d0b-4487-a078-366d22bef4a9",
p_menu_id: "8406147f-6343-41e2-ba25-155bd70f63b4",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-user-detail",
rowPath: ".4.0.2",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-user",
rowPath: ".4.0",
},
{
id: 614,
level: 3,
sort: 2,
menuName: "角色管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/authority/role",
parentPath: "/so/manage/ui/#/authority",
icon: "",
menu_id: "8f2927fb-45b0-4553-b376-a33066385c17",
p_menu_id: "758a089a-4331-4a09-93a1-13714c71e83e",
source: "",
children: [
{
id: 667,
level: 4,
sort: 1,
menuName: "新增",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/authority/role/add",
parentPath: "/authority/role",
icon: "",
menu_id: "f0794330-7380-4a88-9141-068cf97b829a",
p_menu_id: "8f2927fb-45b0-4553-b376-a33066385c17",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-role-add",
rowPath: ".4.1.0",
},
{
id: 668,
level: 4,
sort: 2,
menuName: "编辑",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/authority/role/edit",
parentPath: "/authority/role",
icon: "",
menu_id: "882f9d8e-305b-4d4e-9925-f2b916da514d",
p_menu_id: "8f2927fb-45b0-4553-b376-a33066385c17",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-role-edit",
rowPath: ".4.1.1",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-role",
rowPath: ".4.1",
},
{
id: 615,
level: 3,
sort: 3,
menuName: "组织管理",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 1,
path: "/authority/organization",
parentPath: "/so/manage/ui/#/authority",
icon: "",
menu_id: "3693011e-20cc-4eed-b830-c3d3736a32bb",
p_menu_id: "758a089a-4331-4a09-93a1-13714c71e83e",
source: "",
children: [
{
id: 669,
level: 4,
sort: 1,
menuName: "新增平台用户",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/authority/organization/platform-user",
parentPath: "/authority/organization",
icon: "",
menu_id: "e60e4e01-dc98-4db6-81e0-f955710959af",
p_menu_id: "3693011e-20cc-4eed-b830-c3d3736a32bb",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-organization-platform-user",
rowPath: ".4.2.0",
},
{
id: 670,
level: 4,
sort: 2,
menuName: "编辑平台用户",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/authority/organization/platform-user/edit",
parentPath: "/authority/organization",
icon: "",
menu_id: "29358d5e-e4a6-44cd-b169-3382765f6f34",
p_menu_id: "3693011e-20cc-4eed-b830-c3d3736a32bb",
source: "/authority/organization/platform-user",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-organization-platform-user-edit",
rowPath: ".4.2.1",
},
{
id: 671,
level: 4,
sort: 3,
menuName: "新增组织用户",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/authority/organization/org-user",
parentPath: "/authority/organization",
icon: "",
menu_id: "fdf99f47-fc60-4fc8-9848-fda0b197f172",
p_menu_id: "3693011e-20cc-4eed-b830-c3d3736a32bb",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-organization-org-user",
rowPath: ".4.2.2",
},
{
id: 672,
level: 4,
sort: 4,
menuName: "编辑组织用户",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/authority/organization/org-user/edit",
parentPath: "/authority/organization",
icon: "",
menu_id: "6a640d98-dac2-40d1-97ff-6afb71d898b3",
p_menu_id: "3693011e-20cc-4eed-b830-c3d3736a32bb",
source: "/authority/organization/org-user",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-organization-org-user-edit",
rowPath: ".4.2.3",
},
{
id: 673,
level: 4,
sort: 5,
menuName: "用户详情",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/authority/organization/user-detail",
parentPath: "/authority/organization",
icon: "",
menu_id: "dc66f812-af9d-4346-a657-aaaf29db9c5d",
p_menu_id: "3693011e-20cc-4eed-b830-c3d3736a32bb",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-organization-user-detail",
rowPath: ".4.2.4",
},
{
id: 674,
level: 4,
sort: 6,
menuName: "组织详情",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
path: "/authority/organization/org-detail",
parentPath: "/authority/organization",
icon: "",
menu_id: "4e83dd09-7516-45c2-95d7-35a31a5e1052",
p_menu_id: "3693011e-20cc-4eed-b830-c3d3736a32bb",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-organization-org-detail",
rowPath: ".4.2.5",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "authority-organization",
rowPath: ".4.2",
},
],
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "so-manage-ui-#-authority",
rowPath: ".4",
},
{
id: 573,
level: 2,
sort: 8,
menuName: "可视化中心",
dict_group_id: "26d3903a-863e-4efc-b53e-0fb8772ddaa4",
menuType: 1,
path: "/visual-center",
parentPath: "/",
icon: "",
menu_id: "cff0e52d-c378-4004-86ba-d13fc3aec8d2",
p_menu_id: "49000595-1687-4b66-86a5-1839049e21cb",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "so-manage-ui-#-visual-center",
rowPath: ".5",
},
{
id: 574,
level: 2,
sort: 9,
menuName: "修改密码",
dict_group_id: "26d3903a-863e-4efc-b53e-0fb8772ddaa4",
menuType: 1,
path: "/password",
parentPath: "/",
icon: "",
menu_id: "78068ef3-8039-40d1-8ef6-5bf5ac1a11bf",
p_menu_id: "49000595-1687-4b66-86a5-1839049e21cb",
source: "",
children: null,
system_type: "",
new_window: 0,
remark: "",
built_in: 0,
name: "so-manage-ui-#-password",
rowPath: ".6",
},
],
system_type: "79a8f214-db78-4db7-9c28-db66276b4be2",
new_window: 0,
remark: "",
built_in: 0,
},
],
},
};
...@@ -65,7 +65,7 @@ import menu from "./router/function.js"; ...@@ -65,7 +65,7 @@ import menu from "./router/function.js";
//获取用户信息 //获取用户信息
function getUser() { function getUser() {
return axios.get(`/apaas/system/v5/user/getUserInfo`); return axios.get(`/v1/api/user/getUserInfo`);
} }
//获取用户菜单信息 //获取用户菜单信息
......
...@@ -4,10 +4,18 @@ ...@@ -4,10 +4,18 @@
<p class="login-title">登录</p> <p class="login-title">登录</p>
<el-form :model="form" ref="form" class="login_forms"> <el-form :model="form" ref="form" class="login_forms">
<el-form-item> <el-form-item>
<el-input v-model.trim="form.userid" autofocus="autofocus" placeholder="请输入账号" @keyup.enter="login_remember_info()"></el-input> <el-input
v-model.trim="form.userid"
autofocus="autofocus"
placeholder="请输入账号"
@keyup.enter="login_remember_info()"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input type="password" v-model.trim="form.password" placeholder="请输入密码" @keyup.enter="login_remember_info()"> <el-input
type="password"
v-model.trim="form.password"
placeholder="请输入密码"
@keyup.enter="login_remember_info()">
<!-- <span <!-- <span
slot="suffix" slot="suffix"
:title="visible ? '显示密码' : '隐藏密码'" :title="visible ? '显示密码' : '隐藏密码'"
...@@ -19,7 +27,12 @@ ...@@ -19,7 +27,12 @@
</el-form-item> </el-form-item>
<el-form-item prop="yzm" class="yzm"> <el-form-item prop="yzm" class="yzm">
<div class="yzm_ctx"> <div class="yzm_ctx">
<el-input class="yzm_ipt" v-model.trim="form.yzm" placeholder="请输入验证码" :validate-event="false" @keyup.enter="login_remember_info()"></el-input> <el-input
class="yzm_ipt"
v-model.trim="form.yzm"
placeholder="请输入验证码"
:validate-event="false"
@keyup.enter="login_remember_info()"></el-input>
<img class="yzm_img" title="看不清?换一张" :src="imgSrc" @click="getImg()" /> <img class="yzm_img" title="看不清?换一张" :src="imgSrc" @click="getImg()" />
</div> </div>
</el-form-item> </el-form-item>
...@@ -33,17 +46,17 @@ ...@@ -33,17 +46,17 @@
<script> <script>
import { setCookie, clearCookie } from "../../services/cookie.js"; import { setCookie, clearCookie } from "../../services/cookie.js";
import menu from '../../router/function' import menu from "../../router/function";
import {generateRoutes} from '../../router/index' import { generateRoutes } from "../../router/index";
import inputTable from '../../components/input-table.vue'; import inputTable from "../../components/input-table.vue";
import inputObjectTable from '../../components/input-object-table.vue'; import inputObjectTable from "../../components/input-object-table.vue";
import CryptoJS from "crypto-js"; import CryptoJS from "crypto-js";
export default { export default {
props: {}, props: {},
components: { components: {
inputTable, inputTable,
inputObjectTable inputObjectTable,
}, },
data() { data() {
return { return {
...@@ -63,36 +76,36 @@ export default { ...@@ -63,36 +76,36 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
getMenuObj(menu,parentRowPath,menuObj){ getMenuObj(menu, parentRowPath, menuObj) {
menu.forEach((e,idx) => { menu.forEach((e, idx) => {
e.rowPath = parentRowPath + '.' + idx e.rowPath = parentRowPath + "." + idx;
menuObj[e.path] = e menuObj[e.path] = e;
if(e.children&&e.children.length){ if (e.children && e.children.length) {
this.getMenuObj(e.children,e.rowPath,menuObj) this.getMenuObj(e.children, e.rowPath, menuObj);
} }
}); });
}, },
getUser() { getUser() {
this.$axios.get(`/apaas/system/v5/user/getUserInfo`).then((res) => { this.$axios.get(`/v1/api/user/getUserInfo`).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.$store.commit("setUserInfo", res.data.data); this.$store.commit("setUserInfo", res.data.data);
// if (res.data.data.userType == 1) { // if (res.data.data.userType == 1) {
//超管 //超管
this.$store.commit("setMenu", menu.adminMenu); this.$store.commit("setMenu", menu.adminMenu);
menu.menuToRouter(menu.adminMenu) menu.menuToRouter(menu.adminMenu);
this.$store.commit('setRoute',menu.adminMenu) this.$store.commit("setRoute", menu.adminMenu);
//存储菜单对象信息 //存储菜单对象信息
let menuObj = {} let menuObj = {};
this.getMenuObj(menu.adminMenu,'',menuObj) this.getMenuObj(menu.adminMenu, "", menuObj);
this.$store.commit('setMenuObj',menuObj) this.$store.commit("setMenuObj", menuObj);
// } // }
generateRoutes() generateRoutes();
// this.$router.push("/"); // this.$router.push("/");
//跳转到工作台页面 //跳转到工作台页面
window.location.href = '/so/manage/ui/#/' window.location.href = "/so/manage/ui/#/";
} }
}); });
}, },
...@@ -106,9 +119,7 @@ export default { ...@@ -106,9 +119,7 @@ export default {
if (!this.form.yzm) { if (!this.form.yzm) {
return this.$message.error("请输入验证码"); return this.$message.error("请输入验证码");
} }
this.$axios this.$axios.get(`/apaas/system/v5/user/verifyCaptcha?id=${this.imgId}&value=${this.form.yzm}`).then((res) => {
.get(`/apaas/system/v5/user/verifyCaptcha?id=${this.imgId}&value=${this.form.yzm}`)
.then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.login(); this.login();
} else { } else {
...@@ -117,11 +128,10 @@ export default { ...@@ -117,11 +128,10 @@ export default {
}); });
}, },
login() { login() {
this.$axios this.$axios
.post(`/apaas/system/v5/user/login`, { .post(`/apaas/system/v5/user/login`, {
system_account: this.form.userid, system_account: this.form.userid,
password: CryptoJS.AES.encrypt(this.form.password,"swuE9cmCZQwrkYRV").toString(), password: CryptoJS.AES.encrypt(this.form.password, "swuE9cmCZQwrkYRV").toString(),
}) })
.then((res) => { .then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
...@@ -183,7 +193,6 @@ export default { ...@@ -183,7 +193,6 @@ export default {
height: 32px; height: 32px;
margin-left: 10px; margin-left: 10px;
display: inline-block; display: inline-block;
} }
.btn_sub { .btn_sub {
width: 400px; width: 400px;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
placeholder="请输入关键字"> placeholder="请输入关键字">
<template v-slot:left_action> <template v-slot:left_action>
<div class="apaas_button"> <div class="apaas_button">
<el-button type="default" @click="deleteAllTips"> 返回 </el-button> <el-button type="default" @click="router.go(-1)"> 返回 </el-button>
</div> </div>
<span class="filter-group-item">执行ping命令</span> <span class="filter-group-item">执行ping命令</span>
</template> </template>
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
<div class="table bg-scroll"> <div class="table bg-scroll">
<bg-table ref="dataTable" :headers="headers" :rows="tableRows" :stripe="true"> <bg-table ref="dataTable" :headers="headers" :rows="tableRows" :stripe="true">
<template v-slot:desc="{ row }"> <template v-slot:desc="{ row }">
<span class="can_click_text" @click="getChildren(row)"> <span class="can_click_text" @click="gotoPage(`/auto-maintenance/task-history/list/record?id=${row.id}`)">
{{ row.name }} {{ row.desc }}
</span> </span>
</template> </template>
<template v-slot:state="{ row }"> <template v-slot:state="{ row }">
...@@ -41,11 +41,15 @@ ...@@ -41,11 +41,15 @@
<script setup> <script setup>
import { reactive, ref, onBeforeMount, toRefs, computed, watch, nextTick, watchEffect } from "vue"; import { reactive, ref, onBeforeMount, toRefs, computed, watch, nextTick, watchEffect } from "vue";
import { useRouter, useRoute } from "vue-router";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import axios from "@/request/http.js"; import axios from "@/request/http.js";
import { Search } from "@element-plus/icons-vue"; import { Search } from "@element-plus/icons-vue";
import bgBreadcrumb from "@/components/bg-breadcrumb.vue"; import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
const bgForm = ref(null);
const router = useRouter();
const route = useRoute();
const dataTable = ref(null); const dataTable = ref(null);
const headers = [ const headers = [
{ {
...@@ -71,100 +75,30 @@ const headers = [ ...@@ -71,100 +75,30 @@ const headers = [
]; ];
const state = reactive({ const state = reactive({
bgForm, tableRows: [
typeList: [], // 分类数据 {
typeKeyword: "", // 分类删选关键词 state: "执行中",
nodeClassifyId: null, // 当前选中分类的uuid 用于新增字典 desc: "asda",
nodeId: null, // 当前选中分类的id 用于请求列表 },
timer: null, // 定时器 ], // 表格数据
tableRows: [], // 表格数据
selected: [], //选择数据
tableTotal: 0, // 表格数据条数 tableTotal: 0, // 表格数据条数
filter: { filter: {
time: "",
search: "", search: "",
page: 1, page: 1,
limit: 10, limit: 10,
}, // 表格筛选项 }, // 表格筛选项
actionRow: null, // 当前操作的数据 actionRow: null, // 当前操作的数据
dialogDelete: false, // 删除弹窗
addType: 0, //
addDialog: false,
formData: {
name: "",
describe: "",
state: 1,
p_dict_id: "",
},
rules: {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
describe: [
{ required: true, message: "请输入描述", trigger: "blur" },
{ max: 200, message: "描述最大为200字", trigger: "blur" },
],
state: [{ required: true, message: "请选择是否启用", trigger: "change" }],
},
fatherRow: null,
}); });
const selectRows = (data) => { const gotoPage = (url) => {
state.selected = data.selection; router.push(url);
};
const clearSelected = () => {
dataTable.value.clearTable();
};
const deleteAllTips = () => {};
const getChildren = (row) => {
state.tableRows = row.children || [];
state.tableTotal = row.total_children;
state.fatherRow = row;
}; };
const getTypeList = () => {
let params = {
name: state.typeKeyword,
};
axios
.get(`/apaas/system/v5/dictionary/classify/list`, { params })
.then((res) => {
if (res.data.code == 200) {
state.typeList = res.data.data || [];
state.nodeClassifyId = state.typeList[0].classify_id || null;
state.nodeId = state.typeList[0].id || null;
if (state.nodeId) {
getTableRows();
}
} else {
ElMessage.error(res.data.data);
}
})
.catch((err) => {
console.log(err);
});
}; // 获取字典分类
const changeSearch = (val) => { const changeSearch = (val) => {
state.filter.search = val; state.filter.search = val;
changePage(1); changePage(1);
}; // 表格关键字筛选 }; // 表格关键字筛选
const filterAction = () => {
changePage(1);
}; // 查询按钮
const filterClear = () => {
state.filter = {
time: "",
search: "",
limit: 10,
page: 1,
};
changePage(1);
}; // 重置筛选项
const getTableRows = () => { const getTableRows = () => {
let params = { ...state.filter }; let params = { ...state.filter };
params.id = state.nodeId; params.id = state.nodeId;
...@@ -193,29 +127,7 @@ const changeSize = (size) => { ...@@ -193,29 +127,7 @@ const changeSize = (size) => {
changePage(1); changePage(1);
}; // 改变每页条数 }; // 改变每页条数
const register = () => { onBeforeMount(() => {});
state.formData = {
name: "",
describe: "",
state: 1,
p_dict_id: state.fatherRow ? state.fatherRow.dict_id : "",
};
if (state.bgForm) {
nextTick().then(() => {
state.bgForm.validate((valid) => {
if (!valid) {
state.bgForm.clearValidate();
}
});
});
}
state.addType = 1;
state.addDialog = true;
}; // 新增字典按钮
onBeforeMount(() => {
getTypeList();
});
const { tableRows, tableTotal, filter } = toRefs(state); const { tableRows, tableTotal, filter } = toRefs(state);
</script> </script>
......
<template>
<div class="detail_container">
<bg-breadcrumb></bg-breadcrumb>
<div class="main_container">
<div class="top-container">
<el-button class="back" type="default" @click="router.go(-1)"> 返回 </el-button>
执行ping命令 / 执行说明1
</div>
<div class="middle-container">
<finish-use :state="true" height="calc(100vh - 330px)" time="00:00:11"></finish-use>
</div>
<div class="bottom-container">
<el-button class="use-script" type="primary" @click="router.go(-1)"> 重新执行 </el-button>
</div>
</div>
</div>
</template>
<script setup>
import { reactive, ref, onBeforeMount, toRefs } from "vue";
import { useRouter, useRoute } from "vue-router";
import { ElMessage } from "element-plus";
import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
import finishUse from "@/page/main/auto-maintenance/task-manage/add/finish-use.vue";
const router = useRouter();
const route = useRoute();
const state = reactive({ data: 1 });
const { data } = toRefs(state);
</script>
<style lang="scss" scoped>
.top-container {
width: 100%;
height: 70px;
line-height: 70px;
text-align: center;
font-size: 14px;
color: #202531;
position: relative;
.back {
position: absolute;
top: 16px;
left: 16px;
}
}
.middle-container {
flex: 1;
padding: 30px 30px 10px 30px;
border-top: 1px solid #e6e9ef;
border-bottom: 1px solid #e6e9ef;
}
.bottom-container {
width: 100%;
height: 50px;
.use-script {
margin: 16px;
float: right;
}
}
</style>
...@@ -33,10 +33,12 @@ const props = defineProps({ ...@@ -33,10 +33,12 @@ const props = defineProps({
}, },
}); });
const ruleFormRef = ref(null);
const state = reactive({ const state = reactive({
ruleForm: { ruleForm: {
name: props.data?.name, name: props.data?.name || "",
desc: props.data?.desc, desc: props.data?.desc || "",
}, },
rules: { rules: {
name: [ name: [
...@@ -47,10 +49,28 @@ const state = reactive({ ...@@ -47,10 +49,28 @@ const state = reactive({
}, },
}); });
const save = () => {}; const save = () => {
return new Promise((resolve, reject) => {
ruleFormRef.value.validate((valid, fields) => {
if (valid) {
props.data.name = state.ruleForm.name;
props.data.desc = state.ruleForm.desc;
resolve();
} else {
reject();
console.log("error submit!", fields);
}
});
});
};
const clear = () => {
ruleFormRef.value.resetFields();
};
defineExpose({ defineExpose({
save, save,
clear,
}); });
</script> </script>
......
<template>
<div>
<div class="state-box">
<span
><bg-icon style="font-size: 12px; color: #909bb6" icon="#bg-ic-time"></bg-icon> 已经过:{{ props.time }}</span
>
<div class="state-show success" v-if="props.state">
<bg-icon style="color: #429e8a" icon="#bg-ic-s-circle-check"></bg-icon> 执行成功
</div>
<div class="state-show fail" v-else>
<bg-icon style="color: #d75138" icon="#bg-ic-s-circle-close"></bg-icon> 执行失败
</div>
</div>
<div class="log-bg bg-scroll" :style="{ height: props.height }">
<div class="log-box">
<div v-for="(item, i) in stateData.codes" :key="i" class="codes-box">
<span class="codes-num">{{ item.pos + 1 }}</span>
<span class="codes-out" v-html="item.out"></span>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { reactive, ref, onBeforeMount, toRefs } from "vue";
import { useRouter, useRoute } from "vue-router";
import { ElMessage } from "element-plus";
const router = useRouter();
const route = useRoute();
const props = defineProps({
codes: {
type: Array,
default: () => [],
},
state: {
type: Boolean,
default: true,
},
time: {
type: String,
default: "",
},
height: {
type: String,
default: "",
},
});
const stateData = reactive({
codes: [
{
pos: 0,
out: "SSH password:",
},
{
pos: 1,
out: "[WARNING]: Platform darwin on host 192.168.1.199 is using the discovered Pythoninterpreter at /usr/bin/python3, but future installation of another Pythoninterpreter could change ",
},
{
pos: 2,
out: "the meaning of that path. See",
},
{
pos: 3,
out: "https://docs.ansible.com/ansible-",
},
{
pos: 0,
out: "SSH password:",
},
{
pos: 1,
out: "[WARNING]: Platform darwin on host 192.168.1.199 is using the discovered Pythoninterpreter at /usr/bin/python3, but future installation of another Pythoninterpreter could change ",
},
{
pos: 2,
out: "the meaning of that path. See",
},
{
pos: 3,
out: "https://docs.ansible.com/ansible-",
},
{
pos: 0,
out: "SSH password:",
},
{
pos: 1,
out: "[WARNING]: Platform darwin on host 192.168.1.199 is using the discovered Pythoninterpreter at /usr/bin/python3, but future installation of another Pythoninterpreter could change ",
},
{
pos: 2,
out: "the meaning of that path. See",
},
{
pos: 3,
out: "https://docs.ansible.com/ansible-",
},
{
pos: 3,
out: "https://docs.ansible.com/ansible-",
},
{
pos: 0,
out: "SSH password:",
},
{
pos: 1,
out: "[WARNING]: Platform darwin on host 192.168.1.199 is using the discovered Pythoninterpreter at /usr/bin/python3, but future installation of another Pythoninterpreter could change ",
},
{
pos: 2,
out: "the meaning of that path. See",
},
{
pos: 3,
out: "https://docs.ansible.com/ansible-",
},
{
pos: 3,
out: "https://docs.ansible.com/ansible-",
},
{
pos: 0,
out: "SSH password:",
},
{
pos: 1,
out: "[WARNING]: Platform darwin on host 192.168.1.199 is using the discovered Pythoninterpreter at /usr/bin/python3, but future installation of another Pythoninterpreter could change ",
},
{
pos: 2,
out: "the meaning of that path. See",
},
{
pos: 3,
out: "https://docs.ansible.com/ansible-",
},
{
pos: 3,
out: "https://docs.ansible.com/ansible-",
},
{
pos: 0,
out: "SSH password:",
},
{
pos: 1,
out: "[WARNING]: Platform darwin on host 192.168.1.199 is using the discovered Pythoninterpreter at /usr/bin/python3, but future installation of another Pythoninterpreter could change ",
},
{
pos: 2,
out: "the meaning of that path. See",
},
{
pos: 3,
out: "https://docs.ansible.com/ansible-",
},
],
});
</script>
<style lang="scss" scoped>
.state-box {
width: 100%;
height: 36px;
margin-top: -18px;
margin-bottom: 12px;
position: relative;
font-size: 14px;
color: #404a62;
span {
position: absolute;
left: 0;
top: 10px;
}
.state-show {
width: 200px;
height: 36px;
line-height: 36px;
text-align: center;
border-radius: 4px;
margin: 0 auto;
}
.success {
background-color: #ecf5f4;
}
.fail {
background-color: #fbeeeb;
}
}
.log-bg {
background-color: #f7f7f9;
border-radius: 6px;
padding: 20px;
height: calc(100vh - 370px);
overflow-x: hidden;
.log-box {
width: 100%;
.codes-box {
padding: 6px 0;
display: flex;
display: -webkit-flex;
align-items: center;
font-size: 14px;
}
.codes-num {
width: 60px;
color: #8890a7;
display: inline-block;
height: inherit;
}
.codes-out {
width: calc(100% - 70px);
color: #242c43;
display: inline-block;
white-space: pre-wrap;
word-wrap: break-word;
height: inherit;
}
}
}
</style>
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
<div class="step-container"> <div class="step-container">
<div class="step-base"> <div class="step-base">
<img src="@/assets/imgs/img_data-complete.png" /> <img src="@/assets/imgs/img_data-complete.png" />
<p class="tips">新增成功</p> <p class="tips" v-if="props.state">新增成功</p>
<div class="apaas_button btns"> <p class="tips" v-else>新增失败</p>
<el-button type="default" @click="goStepOne"> 返回列表 </el-button> <div class="apaas_button btns" v-if="props.state">
<el-button type="primary" @click="putawayAction"> 继续新增 </el-button> <el-button type="default" @click="goToList"> 返回列表 </el-button>
<el-button type="primary" @click="goStepOne"> 继续新增 </el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -17,8 +18,23 @@ import { useRouter, useRoute } from "vue-router"; ...@@ -17,8 +18,23 @@ import { useRouter, useRoute } from "vue-router";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const state = reactive({ data: 1 });
const { data } = toRefs(state); const props = defineProps({
state: {
type: Boolean,
default: true,
},
});
const emit = defineEmits(["clear"]);
const goToList = () => {
router.push("/auto-maintenance/task-manage");
};
const goStepOne = () => {
emit("clear");
};
</script> </script>
<style scoped> <style scoped>
......
...@@ -39,19 +39,44 @@ ...@@ -39,19 +39,44 @@
</el-steps> </el-steps>
</div> </div>
</div> </div>
<div class="content_main log_content_nor" :style="step == 3 ? { height: 'calc(100vh - 234px)' } : {}"> <div
<base-info v-show="step == 1"></base-info> class="content_main log_content_nor"
<use-content v-show="step == 2"></use-content> :style="step == 3 && state.isSave ? { height: 'calc(100vh - 234px)' } : {}">
<finish v-show="step == 3"></finish> <base-info v-show="step == 1" :data="state.data" ref="baseInfoRef"></base-info>
<use-content v-show="step == 2" :data="state.data" ref="useContentRef"></use-content>
<finish v-show="step == 3 && state.isSave" :state="true" @clear="clearData"></finish>
<finish-use v-show="step == 3 && !state.isSave" :state="true" time="00:00:11"></finish-use>
</div> </div>
<div class="content_foot apaas_button" v-if="step == 1 || step == 2"> <div class="content_foot apaas_button" v-if="step == 1 || step == 2 || (step == 3 && !state.isSave)">
<el-button type="default" @click="cancel"> 取消 </el-button> <el-button type="default" v-if="step == 1 || step == 2" @click="cancel"> 取消 </el-button>
<el-button type="default" v-if="step == 2" @click="confirm(-1)"> 上一步 </el-button> <el-button type="default" v-if="step == 2" @click="confirm(-1)"> 上一步 </el-button>
<el-button type="primary" v-if="step == 1" @click="confirm(1)"> 下一步 </el-button> <el-button type="primary" v-if="step == 1" @click="confirm(1)"> 下一步 </el-button>
<el-button type="primary" v-if="step == 2" @click="confirm(1)"> 保存 </el-button> <el-button type="primary" v-if="step == 2" @click="saveTask()"> 保存 </el-button>
<el-button type="success" v-if="step == 2" @click="useScript"> 立即执行 </el-button> <el-button type="success" v-if="step == 2" @click="useScript"> 立即执行 </el-button>
<el-button type="default" v-if="step == 3" @click="cancel"> 返回列表 </el-button>
<el-button type="primary" v-if="step == 3" @click="postScript"> 重新执行 </el-button>
</div> </div>
</div> </div>
<el-dialog class="dialog_box" title="立即执行" v-model="state.useScriptShow" width="1024px">
<div>
<div class="dialog-tips">
<bg-icon icon="#bg-ic-s-circle-warning" style="color: #a9b1c7"></bg-icon> 向执行脚本传递额外的命令行变量。这是
ansible-playbook 的 -e 或 --extra-vars 命令行参数。使用 YAML 或 JSON 提供键/值对,此项为非必填项。
</div>
<bg-inner-tabs v-model="state.useType" :data="state.useData" style="float: left"></bg-inner-tabs>
<div style="clear: both"></div>
<div style="height: 370px">
<bg-code-editor v-model="state.useText"></bg-code-editor>
</div>
</div>
<template v-slot:footer>
<div class="apaas_button">
<el-button type="default" @click="cancelUse">取消</el-button>
<el-button type="primary" @click="confirmUse">保存</el-button>
</div>
</template>
</el-dialog>
</div> </div>
</template> </template>
...@@ -64,22 +89,87 @@ import bgBreadcrumb from "@/components/bg-breadcrumb.vue"; ...@@ -64,22 +89,87 @@ import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
import baseInfo from "./base-info.vue"; import baseInfo from "./base-info.vue";
import useContent from "./use-content.vue"; import useContent from "./use-content.vue";
import finish from "./finish.vue"; import finish from "./finish.vue";
import finishUse from "./finish-use.vue";
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const step = ref(1); const step = ref(1);
const baseInfoRef = ref(null);
const useContentRef = ref(null);
const state = reactive({ data: 1 }); const state = reactive({
data: {},
useScriptShow: false,
useType: 0,
useData: ["yaml", "json"],
useText: "",
isSave: true,
});
const cancel = () => { const cancel = () => {
router.back(); router.back();
}; };
const confirm = (val) => { const confirm = async (val) => {
let flag = true;
if (val == 1) {
await baseInfoRef.value
.save()
.then()
.catch(() => {
flag = false;
});
}
if (flag) {
step.value = step.value + val; step.value = step.value + val;
}
};
//保存
const saveTask = async () => {
await useContentRef.value
.save()
.then(() => {
step.value = 3;
//todo:掉接口保存,并获取状态
})
.catch(() => {});
};
const useScript = async () => {
//填写完成才可以进行执行
await useContentRef.value
.save()
.then(() => {
state.useScriptShow = true;
})
.catch(() => {
ElMessage.error("请先完善表单再执行");
});
};
const cancelUse = () => {
state.useScriptShow = false;
};
const confirmUse = () => {
state.useScriptShow = false;
state.isSave = false;
step.value = 3;
// TODO:调用接口立即执行
postScript();
}; };
const useScript = () => {}; const postScript = () => {};
const clearData = () => {
baseInfoRef.value.clear();
useContentRef.value.clear();
state.data = {};
step.value = 1;
};
onBeforeMount(() => {});
</script> </script>
<style scoped> <style scoped>
...@@ -161,4 +251,14 @@ const useScript = () => {}; ...@@ -161,4 +251,14 @@ const useScript = () => {};
.process_complete :deep(.el-step__head.is-finish .el-step__line) { .process_complete :deep(.el-step__head.is-finish .el-step__line) {
background: linear-gradient(to right, #2b4695 100%, #e6e9ef 0%); background: linear-gradient(to right, #2b4695 100%, #e6e9ef 0%);
} }
.dialog-tips {
height: 38px;
line-height: 38px;
background-color: #f7f7f9;
border-radius: 4px;
font-size: 14px;
color: #404a62;
margin-bottom: 16px;
}
</style> </style>
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
</bg-upload> </bg-upload>
</div> </div>
<bg-form-gap title="执行主机"></bg-form-gap> <bg-form-gap title="执行主机"></bg-form-gap>
<el-form ref="ruleFormRef" :model="state.ruleForm" :rules="state.rules" label-position="top" label-width="120px"> <el-form ref="pcFormRef" :model="state.ruleForm" :rules="state.rules" label-position="top" label-width="120px">
<el-form-item label="主机分组名称" prop="name" style="width: 1100px"> <el-form-item label="主机分组名称" prop="pcName" style="width: 1100px">
<el-select v-model="state.ruleForm.name" style="width: 1020px" clearable placeholder="请选择"> <el-select v-model="state.ruleForm.pcName" style="width: 1020px" clearable placeholder="请选择">
<el-option v-for="item in state.options" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in state.options" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<span class="add-pc can_click_text">去创建</span> <span class="add-pc can_click_text">去创建</span>
...@@ -26,21 +26,31 @@ ...@@ -26,21 +26,31 @@
</template> </template>
<script setup> <script setup>
import { reactive, ref, onBeforeMount, toRefs } from "vue"; import { reactive, ref, onBeforeMount, toRefs, onMounted } from "vue";
import { useRouter, useRoute } from "vue-router"; import { useRouter, useRoute } from "vue-router";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const props = defineProps({
data: {
type: Object,
default: () => {},
},
});
const pcFormRef = ref(null);
const state = reactive({ const state = reactive({
useType: 0, useType: 0,
useData: ["文本执行", "文件执行"], useData: ["文本执行", "文件执行"],
useText: "", useText: props.data?.useText || "",
doc_file: [], doc_file: props.data?.doc_file || [],
ruleForm: { ruleForm: {
name: "", pcName: props.data?.pcName || "",
}, },
rules: { rules: {
name: [{ required: true, message: "请选择主机分组", trigger: "change" }], pcName: [{ required: true, message: "请选择主机分组", trigger: "change" }],
}, },
options: [ options: [
{ {
...@@ -49,6 +59,50 @@ const state = reactive({ ...@@ -49,6 +59,50 @@ const state = reactive({
}, },
], ],
}); });
const save = () => {
return new Promise((resolve, reject) => {
pcFormRef.value.validate((valid, fields) => {
if (valid) {
props.data.pcName = state.ruleForm.pcName;
if (state.useType == 0) {
props.data.useText = state.useText;
} else {
props.data.doc_file = state.doc_file;
}
resolve();
} else {
reject();
console.log("error submit!", fields);
}
});
});
};
const clear = () => {
pcFormRef.value.resetFields();
state.useText = "";
state.doc_file = [];
state.useType = 0;
};
onMounted(() => {
if (
(props.data && props.data.useText == "" && props.data.doc_file.length == 0) ||
(!props.data.useText && !props.data.doc_file)
) {
state.useType = 0;
} else if (props.data && props.data.useText !== "") {
state.useType = 1;
} else if (props.data && props.data.doc_file.length == 0) {
state.useType = 0;
}
});
defineExpose({
save,
clear,
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template>
<div class="detail_container">
<bg-breadcrumb></bg-breadcrumb>
<div class="main_container">
<bg-form-gap title="基本信息"></bg-form-gap>
<bg-form-gap title="执行脚本"></bg-form-gap>
<bg-form-gap title="执行主机"></bg-form-gap>
<bg-form-gap title="任务历史"></bg-form-gap>
</div>
</div>
</template>
<script setup>
import { reactive, ref, onBeforeMount, toRefs } from "vue";
import { useRouter, useRoute } from "vue-router";
import { ElMessage } from "element-plus";
import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
const router = useRouter();
const route = useRoute();
const state = reactive({ data: 1 });
const { data } = toRefs(state);
</script>
<style lang="scss" scoped>
.main_container {
padding: 24px 32px;
}
</style>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<bg-filter-group @search="changeSearch" v-model="filter.search" placeholder="请输入关键字"> <bg-filter-group @search="changeSearch" v-model="filter.search" placeholder="请输入关键字">
<template v-slot:left_action> <template v-slot:left_action>
<div class="apaas_button"> <div class="apaas_button">
<el-button type="primary" @click="register"> <el-button type="primary" @click="gotoPage(`/auto-maintenance/task-manage/add`)">
<bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon> <bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon>
新增 新增
</el-button> </el-button>
...@@ -46,10 +46,7 @@ ...@@ -46,10 +46,7 @@
:select="true" :select="true"
:stripe="true"> :stripe="true">
<template v-slot:name="{ row }"> <template v-slot:name="{ row }">
<span class="can_click_text" @click="getChildren(row)" v-if="row.children"> <span class="can_click_text" @click="gotoPage(`/auto-maintenance/task-manage/detail?id=${row.id}`)">
{{ row.name }}
</span>
<span v-else>
{{ row.name }} {{ row.name }}
</span> </span>
</template> </template>
...@@ -59,9 +56,9 @@ ...@@ -59,9 +56,9 @@
<template v-slot:action="{ row }"> <template v-slot:action="{ row }">
<bg-table-btns2 :limit="3" :tableData="tableRows"> <bg-table-btns2 :limit="3" :tableData="tableRows">
<bg-table-btn @click="useRow(row)">执行任务</bg-table-btn> <bg-table-btn @click="useRow(row)">执行任务</bg-table-btn>
<bg-table-btn @click="editRow(row)">编辑</bg-table-btn> <bg-table-btn @click="gotoPage(`/auto-maintenance/task-manage/edit?id=${row.id}`)">编辑</bg-table-btn>
<bg-table-btn @click="copyRow(row, 1)">复制</bg-table-btn> <bg-table-btn @click="gotoPage(`/auto-maintenance/task-manage/copy?id=${row.id}`)">复制</bg-table-btn>
<bg-table-btn @click="deleteRow(row, 2)">删除</bg-table-btn> <bg-table-btn @click="deleteRow(row)">删除</bg-table-btn>
</bg-table-btns2> </bg-table-btns2>
</template> </template>
</bg-table> </bg-table>
...@@ -75,75 +72,45 @@ ...@@ -75,75 +72,45 @@
</bg-pagination> </bg-pagination>
</div> </div>
</div> </div>
<!-- 新增/编辑弹窗 -->
<!-- <el-dialog
class="dialog_box"
:title="addType == 1 ? '新增' : '编辑'"
v-model="addDialog"
width="758px">
<el-form ref="bgForm" :model="formData" :rules="rules" label-width="80px" class="bg_form">
<el-form-item label="名称" prop="name">
<el-input
v-model.trim="formData.name"
show-word-limit
:maxlength="
nodeClassifyId == 'eb9c7d70-c123-42b7-8e61-dde1b022b669'
? 6
: nodeClassifyId == 'efd9ec3b-7f18-49e2-9d88-bcca022243bb'
? 4
: nodeClassifyId == '949a1138-4995-464e-97a9-424d097eb271'
? 2
: 20
"
placeholder="请输入名称"></el-input>
</el-form-item>
<el-form-item label="描述" prop="describe">
<el-input
v-model="formData.describe"
type="textarea"
:autosize="{ minRows: 5 }"
show-word-limit
maxlength="200"
resize="vertical"
placeholder="请输入描述"></el-input>
</el-form-item>
<el-form-item label="是否启用" prop="state" style="margin-bottom: 0px">
<el-switch
class="bg-switch-ele"
v-model="formData.state"
:active-value="1"
:inactive-value="0"
inline-prompt
active-text="是"
inactive-text="否" />
</el-form-item>
</el-form>
<template v-slot:footer>
<div class="apaas_button">
<el-button type="default" @click="addDialog = false">取 消</el-button>
<el-button type="primary" @click="addConfirm">保 存</el-button>
</div>
</template>
</el-dialog> -->
<!-- 删除弹窗 --> <!-- 删除弹窗 -->
<!-- <el-dialog <el-dialog
class="dialog_box" class="dialog_box"
title="提示" title="提示"
v-model="dialogDelete" v-model="state.dialogDelete"
width="400px" width="400px"
:before-close=" :before-close="
() => { () => {
dialogDelete = false; dialogDelete = false;
} }
"> ">
<div>确定要删除此字典值吗?</div> <div>确定要删除任务吗?</div>
<template v-slot:footer> <template v-slot:footer>
<div class="apaas_button"> <div class="apaas_button">
<el-button type="default" @click="dialogDelete = false">取 消</el-button> <el-button type="default" @click="state.dialogDelete = false">取 消</el-button>
<el-button type="primary" @click="deleteData">确 定</el-button> <el-button type="primary" @click="deleteData">确 定</el-button>
</div> </div>
</template> </template>
</el-dialog> --> </el-dialog>
<el-dialog class="dialog_box" title="立即执行" v-model="state.useScriptShow" width="1024px">
<div>
<div class="dialog-tips">
<bg-icon icon="#bg-ic-s-circle-warning" style="color: #a9b1c7"></bg-icon> 向执行脚本传递额外的命令行变量。这是
ansible-playbook 的 -e 或 --extra-vars 命令行参数。使用 YAML 或 JSON 提供键/值对,此项为非必填项。
</div>
<bg-inner-tabs v-model="state.useType" :data="state.useData" style="float: left"></bg-inner-tabs>
<div style="clear: both"></div>
<div style="height: 370px">
<bg-code-editor v-model="state.useText"></bg-code-editor>
</div>
</div>
<template v-slot:footer>
<div class="apaas_button">
<el-button type="default" @click="cancelUse">取消</el-button>
<el-button type="primary" @click="confirmUse">保存</el-button>
</div>
</template>
</el-dialog>
</div> </div>
</template> </template>
...@@ -157,7 +124,6 @@ import { useRouter, useRoute } from "vue-router"; ...@@ -157,7 +124,6 @@ import { useRouter, useRoute } from "vue-router";
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const bgForm = ref(null);
const dataTable = ref(null); const dataTable = ref(null);
const headers = [ const headers = [
{ {
...@@ -191,13 +157,15 @@ const headers = [ ...@@ -191,13 +157,15 @@ const headers = [
]; ];
const state = reactive({ const state = reactive({
bgForm, tableRows: [
typeList: [], // 分类数据 {
typeKeyword: "", // 分类删选关键词 name: 23123,
nodeClassifyId: null, // 当前选中分类的uuid 用于新增字典 times: 1,
nodeId: null, // 当前选中分类的id 用于请求列表 describe: 12313,
timer: null, // 定时器 person: 21323,
tableRows: [], // 表格数据 updated_time: "2021-01-01+TZ",
},
], // 表格数据
selected: [], //选择数据 selected: [], //选择数据
tableTotal: 0, // 表格数据条数 tableTotal: 0, // 表格数据条数
filter: { filter: {
...@@ -206,82 +174,54 @@ const state = reactive({ ...@@ -206,82 +174,54 @@ const state = reactive({
page: 1, page: 1,
limit: 10, limit: 10,
}, // 表格筛选项 }, // 表格筛选项
stateOptions: [
{
name: "全部",
value: "",
},
{
name: "启用",
value: "1",
},
{
name: "禁用",
value: "0",
},
], // 启用禁用
actionRow: null, // 当前操作的数据 actionRow: null, // 当前操作的数据
dialogDelete: false, // 删除弹窗 dialogDelete: false, // 删除弹窗
addType: 0, // useScriptShow: false,
addDialog: false, useType: 0,
formData: { useData: ["yaml", "json"],
name: "",
describe: "",
state: 1,
p_dict_id: "",
},
rules: {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
describe: [
{ required: true, message: "请输入描述", trigger: "blur" },
{ max: 200, message: "描述最大为200字", trigger: "blur" },
],
state: [{ required: true, message: "请选择是否启用", trigger: "change" }],
},
fatherRow: null,
}); });
const selectRows = (data) => { const useRow = (row) => {
state.selected = data.selection; state.actionRow = row;
state.useScriptShow = true;
}; };
const clearSelected = () => { const cancelUse = () => {
dataTable.value.clearTable(); state.useScriptShow = false;
}; };
const deleteAllTips = () => {}; const confirmUse = () => {
state.useScriptShow = false;
};
const dictLevel = ref(1); const deleteRow = (row) => {
state.actionRow = row;
state.dialogDelete = true;
};
const getChildren = (row) => { const deleteData = () => {
dictLevel.value = 2; state.dialogDelete = false;
state.tableRows = row.children || [];
state.tableTotal = row.total_children;
state.fatherRow = row;
}; };
const getTypeList = () => { const selectRows = (data) => {
let params = { state.selected = data.selection;
name: state.typeKeyword, };
};
axios const clearSelected = () => {
.get(`/apaas/system/v5/dictionary/classify/list`, { params }) dataTable.value.clearTable();
.then((res) => { };
if (res.data.code == 200) {
state.typeList = res.data.data || []; const deleteAllTips = () => {
state.nodeClassifyId = state.typeList[0].classify_id || null; if (state.selected.length > 0) {
state.nodeId = state.typeList[0].id || null; state.dialogDelete = true;
if (state.nodeId) {
getTableRows();
}
} else { } else {
ElMessage.error(res.data.data); ElMessage.error("请先选择要删除任务");
} }
}) };
.catch((err) => {
console.log(err); const gotoPage = (url) => {
}); router.push(url);
}; // 获取字典分类 };
const changeSearch = (val) => { const changeSearch = (val) => {
state.filter.search = val; state.filter.search = val;
...@@ -304,7 +244,6 @@ const filterClear = () => { ...@@ -304,7 +244,6 @@ const filterClear = () => {
const getTableRows = () => { const getTableRows = () => {
let params = { ...state.filter }; let params = { ...state.filter };
params.id = state.nodeId;
axios axios
.get(`/apaas/system/v5/dictionary/list`, { .get(`/apaas/system/v5/dictionary/list`, {
params, params,
...@@ -312,24 +251,6 @@ const getTableRows = () => { ...@@ -312,24 +251,6 @@ const getTableRows = () => {
.then((res) => { .then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
let data = res.data.data || []; let data = res.data.data || [];
if (dictLevel.value == 1) {
state.tableRows = data;
state.tableTotal = res.data.total;
} else {
let row = data.filter((e) => {
return e.dict_id == state.fatherRow.dict_id;
});
state.tableRows = row[0].children;
state.tableTotal = row[0].total_children;
}
if (state.tableRows.length > 0) {
state.tableRows.forEach((e) => {
e.canMoveUp = true;
e.canMoveDown = true;
});
state.tableRows[0].canMoveUp = false;
state.tableRows[state.tableRows.length - 1].canMoveDown = false;
}
} else { } else {
ElMessage.error(res.data.data); ElMessage.error(res.data.data);
} }
...@@ -346,13 +267,7 @@ const changeSize = (size) => { ...@@ -346,13 +267,7 @@ const changeSize = (size) => {
changePage(1); changePage(1);
}; // 改变每页条数 }; // 改变每页条数
const register = () => { onBeforeMount(() => {});
router.push(`/auto-maintenance/task-manage/add`);
};
onBeforeMount(() => {
getTypeList();
});
const { tableRows, tableTotal, filter } = toRefs(state); const { tableRows, tableTotal, filter } = toRefs(state);
</script> </script>
...@@ -430,4 +345,14 @@ const { tableRows, tableTotal, filter } = toRefs(state); ...@@ -430,4 +345,14 @@ const { tableRows, tableTotal, filter } = toRefs(state);
} }
} }
} }
.dialog-tips {
height: 38px;
line-height: 38px;
background-color: #f7f7f9;
border-radius: 4px;
font-size: 14px;
color: #404a62;
margin-bottom: 16px;
}
</style> </style>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</template> </template>
<script setup> <script setup>
import { reactive, toRefs } from "vue"; import { reactive, toRefs, ref } from "vue";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import axios from "@/request/http.js"; import axios from "@/request/http.js";
...@@ -52,6 +52,7 @@ const state = reactive({ ...@@ -52,6 +52,7 @@ const state = reactive({
license_inform_day: [{ type: "number", min: 0, max: 90, message: "请输入0~90的整数", trigger: "blur" }], license_inform_day: [{ type: "number", min: 0, max: 90, message: "请输入0~90的整数", trigger: "blur" }],
}, },
}); });
const authorizeFormRef = ref(null);
//根据license获取授权信息 //根据license获取授权信息
const getLicenseInfo = () => { const getLicenseInfo = () => {
if (!state.authorizeFormData.license) return; if (!state.authorizeFormData.license) return;
...@@ -69,5 +70,25 @@ const getLicenseInfo = () => { ...@@ -69,5 +70,25 @@ const getLicenseInfo = () => {
} }
}); });
}; };
//保存
const save = () => {
authorizeFormRef.value.validate((valid) => {
if (valid) {
params = {
...props.authorizeFormData,
};
axios.post("/apaas/system/v5/sysOptions/licenseOpts", params).then((res) => {
if (res.data.code == 200) {
ElMessage.success(res.data.msg);
} else {
ElMessage.error(res.data.data);
}
});
}
});
};
const { authorizeRules } = toRefs(state); const { authorizeRules } = toRefs(state);
defineExpose({
save,
});
</script> </script>
...@@ -20,13 +20,19 @@ ...@@ -20,13 +20,19 @@
</div> </div>
<div class="right_container bgc_white"> <div class="right_container bgc_white">
<!-- license授权表单 --> <!-- license授权表单 -->
<authorityForm v-if="activeIndex == 1" :authorizeFormData="authorizeFormData"></authorityForm> <authorityForm
ref="authorityFormRef"
v-if="activeIndex == 1"
:authorizeFormData="authorizeFormData"></authorityForm>
<loginPageForm v-if="activeIndex == 2" :loginPageFormData="loginPageFormData"></loginPageForm> <loginPageForm
ref="loginPageFormRef"
v-if="activeIndex == 2"
:loginPageFormData="loginPageFormData"></loginPageForm>
<!-- 安全相关表单 --> <!-- 安全相关表单 -->
<secureForm v-if="activeIndex == 3" :secureFormData="secureFormData"></secureForm> <secureForm ref="secureFormRef" v-if="activeIndex == 3" :secureFormData="secureFormData"></secureForm>
<!-- 登录注册配置表单 --> <!-- 登录注册配置表单 -->
<registerForm v-if="activeIndex == 4" :registerFormData="registerFormData"></registerForm> <registerForm ref="registerFormRef" v-if="activeIndex == 4" :registerFormData="registerFormData"></registerForm>
<div class="operate_btns"> <div class="operate_btns">
<el-button type="primary" @click="save"> 保存 </el-button> <el-button type="primary" @click="save"> 保存 </el-button>
</div> </div>
...@@ -54,7 +60,8 @@ import secureForm from "./secureForm.vue"; ...@@ -54,7 +60,8 @@ import secureForm from "./secureForm.vue";
import registerForm from "./registerForm.vue"; import registerForm from "./registerForm.vue";
import axios from "@/request/http.js"; import axios from "@/request/http.js";
const authorizeFormRef = ref(null); const authorityFormRef = ref(null);
const loginPageFormRef = ref(null);
const secureFormRef = ref(null); const secureFormRef = ref(null);
const registerFormRef = ref(null); const registerFormRef = ref(null);
const state = reactive({ const state = reactive({
...@@ -133,39 +140,21 @@ const getPreferenceConfig = () => { ...@@ -133,39 +140,21 @@ const getPreferenceConfig = () => {
//保存表单项 //保存表单项
const save = () => { const save = () => {
let params = {}; switch (state.activeIndex) {
if (state.activeIndex == 1) { case 1:
authorizeFormRef.value.validate((valid) => { authorityFormRef.value.save();
if (valid) { break;
params = { case 2:
...state.authorizeFormData, loginPageFormRef.value.save();
}; break;
postData("/apaas/system/v5/sysOptions/licenseOpts", params); case 3:
} secureFormRef.value.save();
}); break;
} else if (state.activeIndex == 2) { case 4:
secureFormRef.value.validate((valid) => { registerFormRef.value.save();
if (valid) { break;
params = { default:
...state.secureFormData, break;
};
postData("/apaas/system/v5/sysOptions/safeOpts", params);
}
});
} else {
registerFormRef.value.validate((valid) => {
if (valid) {
params = {
...state.registerFormData,
};
if (params.login_config_state == 0) {
params.login_limit_time = 0;
params.login_pwd_error = 0;
params.login_lock_time = 0;
}
postData("/apaas/system/v5/sysOptions/loginOpts", params);
}
});
} }
}; };
// 请求接口发送消息 // 请求接口发送消息
......
...@@ -72,7 +72,9 @@ ...@@ -72,7 +72,9 @@
<script setup> <script setup>
import { reactive, ref, toRefs } from "vue"; import { reactive, ref, toRefs } from "vue";
import { ElMessage } from "element-plus";
import { validateLink } from "@/services/rules.js"; import { validateLink } from "@/services/rules.js";
import axios from "@/request/http.js";
const props = defineProps({ const props = defineProps({
loginPageFormData: { loginPageFormData: {
...@@ -101,7 +103,27 @@ const changeBanner = (value) => { ...@@ -101,7 +103,27 @@ const changeBanner = (value) => {
refForm.value.clearValidate("backgroundUrl"); refForm.value.clearValidate("backgroundUrl");
} }
}; };
//保存
const save = () => {
loginPageRef.value.validate((valid) => {
if (valid) {
params = {
...props.loginPageFormData,
};
axios.post("/apaas/system/v5/sysOptions/licenseOpts", params).then((res) => {
if (res.data.code == 200) {
ElMessage.success(res.data.msg);
} else {
ElMessage.error(res.data.data);
}
});
}
});
};
const { loginPageRules } = toRefs(state); const { loginPageRules } = toRefs(state);
defineExpose({
save,
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -53,8 +53,11 @@ ...@@ -53,8 +53,11 @@
</template> </template>
<script setup> <script setup>
import { reactive, toRefs } from "vue"; import { reactive, toRefs, ref } from "vue";
import { ElMessage } from "element-plus";
import axios from "@/request/http.js";
const registerFormRef = ref(null);
const props = defineProps({ const props = defineProps({
registerFormData: { registerFormData: {
type: Object, type: Object,
...@@ -90,6 +93,30 @@ const state = reactive({ ...@@ -90,6 +93,30 @@ const state = reactive({
], ],
}, },
}); });
//保存
const save = () => {
registerFormRef.value.validate((valid) => {
if (valid) {
params = {
...props.registerFormData,
};
if (params.login_config_state == 0) {
params.login_limit_time = 0;
params.login_pwd_error = 0;
params.login_lock_time = 0;
}
axios.post("/apaas/system/v5/sysOptions/loginOpts", params).then((res) => {
if (res.data.code == 200) {
ElMessage.success(res.data.msg);
} else {
ElMessage.error(res.data.data);
}
});
}
});
};
const { registerRules } = toRefs(state); const { registerRules } = toRefs(state);
defineExpose({
save,
});
</script> </script>
...@@ -74,8 +74,11 @@ ...@@ -74,8 +74,11 @@
</template> </template>
<script setup> <script setup>
import { reactive, toRefs } from "vue"; import { reactive, toRefs, ref } from "vue";
import { ElMessage } from "element-plus";
import axios from "@/request/http.js";
const secureFormRef = ref(null);
const props = defineProps({ const props = defineProps({
secureFormData: { secureFormData: {
type: Object, type: Object,
...@@ -105,6 +108,26 @@ const state = reactive({ ...@@ -105,6 +108,26 @@ const state = reactive({
], ],
}, },
}); });
//保存
const save = () => {
secureFormRef.value.validate((valid) => {
if (valid) {
params = {
...props.secureFormData,
};
axios.post("/apaas/system/v5/sysOptions/safeOpts", params).then((res) => {
if (res.data.code == 200) {
ElMessage.success(res.data.msg);
} else {
ElMessage.error(res.data.data);
}
});
}
});
};
const { secureRules } = toRefs(state); const { secureRules } = toRefs(state);
defineExpose({
save,
});
</script> </script>
...@@ -65,6 +65,12 @@ export default { ...@@ -65,6 +65,12 @@ export default {
changeOrigin: true, // true/false, Default: false - changes the origin of the host header to the target URL changeOrigin: true, // true/false, Default: false - changes the origin of the host header to the target URL
secure: false, //解决证书缺失问题 secure: false, //解决证书缺失问题
}, },
"/v1/api": {
target: "https://so.wodcloud.com/v1/api", // 所要代理的目标地址
rewrite: (path) => path.replace(/^\/v1\/api/, ""), // 重写传过来的path路径,比如 `/api/index/1?id=10&name=zs`(注意:path路径最前面有斜杠(/),因此,正则匹配的时候不要忘了是斜杠(/)开头的;选项的 key 也是斜杠(/)开头的)
changeOrigin: true, // true/false, Default: false - changes the origin of the host header to the target URL
secure: false, //解决证书缺失问题
},
}, },
}, },
build: { build: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment