5.21修改所有已出现的bug和优化。

This commit is contained in:
hyt 2024-05-21 11:02:29 +08:00
parent 1eb2f79229
commit b135c3dd79
41 changed files with 1195 additions and 1100 deletions

View File

@ -324,7 +324,7 @@ export default {
pageModel: {
total: 0,
pageIndex: 1,
pageSize: 10,
pageSize: 100,
},
//
clearState: 0,

View File

@ -410,7 +410,7 @@ export default {
pageModel: {
total: 0,
page: 1,
limit: 20,
pageSize: 100,
},
//
clearState: 0,
@ -600,7 +600,7 @@ export default {
}
let page = {
page: this.pageModel.page,
limit: this.pageModel.limit,
limit: this.pageModel.pageSize,
};
for (let i in this.model) {
if (!this.model[i]) {

View File

@ -36,7 +36,7 @@
<script>
import baseDialog from "@/components/base/BaseNewDialog/index.vue"
import baseTree from "@/components/base/BaseMenuTree/index.vue"
import baseLayout from "@/components/base/baseLayout"
import baseLayout from "@/components/base/baseNewLayout"
export default {
components: {
baseLayout,

View File

@ -1,62 +1,70 @@
<!--
<!--
* @name: 自定义分页组件
* @author: Zhangpengcheng
* @date: 2022-09-05
-->
<template>
<div class="pageTion" flex="main:right">
<el-pagination ref="pagination" :page-sizes="[10,20, 30, 40,100]" :total="pageModel.total" :current-page="pageModel.pageIndex" :page-size="10"
@current-change="currentChange" @size-change="sizeChange" background layout="prev, pager, next,jumper,total,sizes">
</el-pagination>
</div>
<div class="pageTion" flex="main:right">
<el-pagination ref="pagination" :page-sizes="[10,20, 30, 40,100]" :total="pageModel.total"
:current-page="pageModel.pageIndex"
:page-size="pageModel.pageSize"
@current-change="currentChange" @size-change="sizeChange" background
layout="prev, pager, next,jumper,total,sizes"
>
</el-pagination>
</div>
</template>
<script>
export default {
props: {
pageModel: {
default: null
}
},
data() {
return {}
},
created() {},
mounted() {
this.$nextTick(() => {
})
},
computed: {},
methods: {
sizeChange(val) {
let pageModel = this.pageModel;
pageModel.pageSize = val;
this.$emit('update:pageModel', pageModel)
this.$emit('onPageChange')
},
currentChange(val) {
let pageModel = this.pageModel;
pageModel.pageIndex = val;
this.$emit('update:pageModel', pageModel)
this.$emit('onPageChange')
},
},
}
export default {
props: {
pageModel: {
default: null
}
},
data() {
return {}
},
created() {
},
mounted() {
this.$nextTick(() => {
})
},
computed: {},
methods: {
sizeChange(val) {
let pageModel = this.pageModel
pageModel.pageSize = val
this.$emit('update:pageModel', pageModel)
this.$emit('onPageChange')
},
currentChange(val) {
let pageModel = this.pageModel
pageModel.pageIndex = val
this.$emit('update:pageModel', pageModel)
this.$emit('onPageChange')
}
}
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.pageTion {
width: 100%;
margin: 10px 0;
}
::v-deep .el-pager li {
background-color: #f9f9f9 !important ;
background-color: #f9f9f9 !important;
width: 36px !important;
height: 36px !important;
line-height: 36px !important;
border-radius: 50% !important;
}
::v-deep .el-pager .active {
background-color: #409EFF !important;
background-color: #409EFF !important;
}
::v-deep .el-pagination button {
background-color: #f9f9f9 !important;
color: #333333 !important;
@ -65,13 +73,16 @@
width: 98px !important;
height: 36px !important;
}
::v-deep .el-pagination__total {
line-height: 36px !important;
}
::v-deep .el-pagination__jump {
height: 36px !important;
line-height: 36px !important;
}
::v-deep .el-input__inner {
height: 36px !important;
line-height: 36px !important;

View File

@ -5,7 +5,7 @@
-->
<template>
<base-dialog :closeEscape="true" :showClose="true" :closeModal="false" @handleConfirmClick="personConfirmClick"
:dialogVisible.sync="personDialog" class="userDialog" title="选择人员" width="1000px" top="10vh" :footerShow="true">
:dialogVisible.sync="personDialog" class="userDialog" title="选择人员" width="1200px" top="10vh" :footerShow="true">
<div class="organizationBody">
<base-layout title="组织机构" style="width: 20%;border-radius: 5px;height: 350px;overflow: auto; "
:operateButtonSwitch="false" :bottonShow="false" :isPage="false" :mainColor="mainColor"
@ -21,6 +21,9 @@
<base-table ref="personCustomtable" :border="true" :showIndex="false" :slotrow="true"
@radioChange="radioChange" :tabLoading.sync="personLoading" :tableHeight="personTableHeight"
:tableData="personTableData" :tableColumn="tableColumn">
<template #state="{row}">
<div>{{ row.row.state == 1 ? '停用' : '启用'}}</div>
</template>
</base-table>
</div>
</base-layout>
@ -32,7 +35,7 @@
import { authApi } from "@/api/apis/auth";
import baseDialog from "@/components/base/BaseNewDialog/index.vue"
import baseTree from "@/components/base/BaseMenuTree/index.vue"
import baseLayout from "@/components/base/baseLayout"
import baseLayout from "@/components/base/baseNewLayout"
import baseTable from "@/components/base/baseTable"
import {
PersonList

View File

@ -5,7 +5,8 @@
settings.sideTheme === 'theme-dark'
? variables.menuBackground
: variables.menuLightBackground,
}">
}"
>
<!-- <news-sider
v-if="!isConciseMode"
:collectionsData="collectionsData"
@ -16,25 +17,30 @@
ref="newsSiderRef"
/> -->
<news-sider-app :collectionsData="collectionsData" :sidebarRouters="sidebarRouters" @openChildren="openChildren"
@closeWin="closeOpenWin" :routePath="routePath" ref="newsSiderRef" />
@closeWin="closeOpenWin" :routePath="routePath" ref="newsSiderRef"
/>
<!-- @mouseleave="closeOpenWin" -->
</div>
<!-- v-if="childrenList.length > 0 && sidebar.childrenHide" -->
<div @mouseleave="closeOpenWin" class="sidebar_box"
:style="'width:' + childrenWidth + 'px;' + 'padding:' + childrenPadding">
:style="'width:' + childrenWidth + 'px;' + 'padding:' + childrenPadding"
>
<div flex="cross:center main:justify;" style="margin: 15px 0; justify-content: space-between; over-flow: auto">
<div flex="cross:center">
<p>{{ childrenList }}</p>
<el-autocomplete v-model="state" placeholder="请输入内容" :fetch-suggestions="querySearch"
:trigger-on-focus="false" @select="handleSelect" class="navbarSearch" suffix-icon="el-icon-search">
:trigger-on-focus="false" @select="handleSelect" class="navbarSearch"
suffix-icon="el-icon-search"
>
</el-autocomplete>
<i class="el-icon-close" style="font-size: 24px; cursor: pointer; margin-left: 15px" @click="closeOpenWin" />
<i class="el-icon-close" style="font-size: 24px; cursor: pointer; margin-left: 15px" @click="closeOpenWin"/>
</div>
</div>
<div flex="dir:top" flex-wrap style="height: calc(100% - 70px)">
<children-sider ref="childrenSider" v-for="(route, index) in menuList" :key="route.path + index" :item="route"
@refreshSider="refreshSider" @openChildren="openChildren" @clearActive="clearActive"
@closeOpenWin="closeOpenWin" :fatherPath="fatherPath" :lastPath="lastPath" style="width: 200px" />
@refreshSider="refreshSider" @openChildren="openChildren" @clearActive="clearActive"
@closeOpenWin="closeOpenWin" :fatherPath="fatherPath" :lastPath="lastPath" style="width: 200px"
/>
<!-- <children-app-sider
v-if="isConciseMode"
v-for="(route, index) in childrenList"
@ -52,440 +58,444 @@
</template>
<script>
import {
mapGetters,
mapState
} from "vuex";
import Logo from "./Logo";
import newsSider from "./newsSider";
import childrenSider from "./childrenSider";
import newsSiderApp from "./newsSiderApp";
import childrenAppSider from "./childrenAppSider";
import variables from "@/assets/styles/variables.scss";
import {
GetMyCollectionData
} from "@/api/apis/menuManage";
import router from "@/router";
import loginVue from "../../../views/login.vue";
import {
mapGetters,
mapState
} from 'vuex'
import Logo from './Logo'
import newsSider from './newsSider'
import childrenSider from './childrenSider'
import newsSiderApp from './newsSiderApp'
import childrenAppSider from './childrenAppSider'
import variables from '@/assets/styles/variables.scss'
import {
GetMyCollectionData
} from '@/api/apis/menuManage'
import router from '@/router'
import loginVue from '../../../views/login.vue'
export default {
components: {
Logo,
newsSider,
childrenSider,
newsSiderApp,
childrenAppSider,
export default {
components: {
Logo,
newsSider,
childrenSider,
newsSiderApp,
childrenAppSider
},
computed: {
...mapState(['settings', 'sidebar']),
...mapGetters(['sidebarRouters', 'sidebar']),
activeMenu() {
const route = this.$route
const {
meta,
path
} = route
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu
}
let pathUrl = path + '?id=' + meta.id
return path
},
computed: {
...mapState(["settings", "sidebar"]),
...mapGetters(["sidebarRouters", "sidebar"]),
activeMenu() {
const route = this.$route;
const {
meta,
path
} = route;
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu;
showLogo() {
return this.$store.state.settings.sidebarLogo
},
conciseMenu() {
return true
},
variables() {
return variables
},
isCollapse() {
return !this.sidebar.opened
},
defaultTheme() {
return this.$store.state.settings.theme
}
},
watch: {
defaultTheme: {
handler: function(val, oldVal) {
this.theme = val
this.changeBgColor(val)
},
immediate: true
},
conciseMenu: {
handler: function(val, oldVal) {
this.isConciseMode = val
// this.changeBgColor(val);
},
immediate: true
},
sidebar: {
handler: function(val, oldVal) {
if (val.opened) {
this.state = ''
}
let pathUrl = path + "?id=" + meta.id;
return path;
},
showLogo() {
return this.$store.state.settings.sidebarLogo;
},
conciseMenu() {
return true;
},
variables() {
return variables;
},
isCollapse() {
return !this.sidebar.opened;
},
defaultTheme() {
return this.$store.state.settings.theme;
},
deep: true
},
watch: {
defaultTheme: {
handler: function (val, oldVal) {
this.theme = val;
this.changeBgColor(val);
},
immediate: true,
},
conciseMenu: {
handler: function (val, oldVal) {
this.isConciseMode = val;
// this.changeBgColor(val);
},
immediate: true,
},
sidebar: {
handler: function (val, oldVal) {
if (val.opened) {
this.state = "";
}
},
deep: true,
},
siderBoxHeight: {
immediate: true,
handler() {
this.handleResize();
},
},
siderBoxHeight: {
immediate: true,
handler() {
this.handleResize()
}
}
},
created() {
},
data() {
return {
childrenPadding: 0,
childrenWidth: 0,
childrenList: [],
state: '',
fatherPath: '',
routePath: '',
lastPath: '',
hoverType: false,
firstNum: true,
windowHeight: 0,
siderBoxHeight: null,
isSearch: false,
collectionsData: [], //
valForm: {},
isConciseMode: false,
siderSHowType: false,
menuList: []
// clientHeight: document.body.clientHeight
}
},
mounted() {
// this.GetMyCollectionData();
this.siderBoxHeight = this.$refs.siderBox.offsetHeight
},
methods: {
handleResize() {
// const siderBoxHeight = this.$refs.siderBox.offsetHeight;
this.windowHeight = this.siderBoxHeight - 110
},
created() {},
data() {
return {
childrenPadding: 0,
childrenWidth: 0,
childrenList: [],
state: "",
fatherPath: "",
routePath: "",
lastPath: "",
hoverType: false,
firstNum: true,
windowHeight: 0,
siderBoxHeight: null,
isSearch: false,
collectionsData: [], //
valForm: {},
isConciseMode: false,
siderSHowType: false,
menuList: [],
// clientHeight: document.body.clientHeight
};
clearActive() {
this.$refs.newsSiderRef.activeIndex = null
},
mounted() {
// this.GetMyCollectionData();
this.siderBoxHeight = this.$refs.siderBox.offsetHeight;
},
methods: {
handleResize() {
// const siderBoxHeight = this.$refs.siderBox.offsetHeight;
this.windowHeight = this.siderBoxHeight - 110;
},
clearActive() {
this.$refs.newsSiderRef.activeIndex = null;
},
getRoute() {
this.$store.dispatch("app/changeChildrenHide");
let path = this.$route.path;
this.routePath = "/" + path.split("/")[1];
this.fatherPath = this.routePath;
this.lastPath = path.split("/")[path.split("/").length - 1];
getRoute() {
this.$store.dispatch('app/changeChildrenHide')
let path = this.$route.path
this.routePath = '/' + path.split('/')[1]
this.fatherPath = this.routePath
this.lastPath = path.split('/')[path.split('/').length - 1]
this.sidebarRouters.forEach((el) => {
if (el.path.split("/")[1] == path.split("/")[1] && el.children) {
this.childrenList = el.children;
this.$emit(
"openChildren",
this.childrenList.length > 0 ? true : false
);
}
});
},
refreshSider() {
this.GetMyCollectionData(true);
},
changeBgColor(val) {
document
.getElementsByTagName("body")[0]
.style.setProperty("--bg-color", val);
},
hoverChilden() {
this.hoverType = true;
this.firstNum = false;
},
openChildren(val) {
this.valForm = val;
this.getRoute();
this.isSearch = false;
this.state = "";
if (val.id != "129") {
if (!val.children) {
this.childrenWidth = 0;
this.childrenPadding = 0;
this.childrenList = [];
} else {
const setCollect = (arr) => {
arr.forEach((el) => {
el.collect = false;
this.matchMyCollection(el);
if (el.children != null && el.children && el.children.length) {
setCollect(el.children);
}
});
};
setCollect(val.children);
this.childrenList = val.children;
this.fatherPath = val.path;
}
this.sidebarRouters.forEach((el) => {
if (el.path.split('/')[1] == path.split('/')[1] && el.children) {
this.childrenList = el.children
this.$emit(
'openChildren',
this.childrenList.length > 0 ? true : false
)
}
})
},
refreshSider() {
this.GetMyCollectionData(true)
},
changeBgColor(val) {
document
.getElementsByTagName('body')[0]
.style.setProperty('--bg-color', val)
},
hoverChilden() {
this.hoverType = true
this.firstNum = false
},
openChildren(val) {
this.valForm = val
this.getRoute()
this.isSearch = false
this.state = ''
if (val.id != '129') {
if (!val.children) {
this.childrenWidth = 0
this.childrenPadding = 0
this.childrenList = []
} else {
this.childrenList = val.children;
}
let menuList = [];
function changeMenuData(data, path) {
data.forEach((el) => {
let menuPath = path + "/" + el.path;
let level = el.children ? 2 : 3;
let arr = {
collect: el.collect,
meta: el.meta,
name: el.name,
path: menuPath,
hidden: el.hidden == "true" ? true : false || false,
level: level,
};
// if(!arr.hidden){
// }
menuList.push(arr);
if (el.children && el.children.length > 0) {
changeMenuData(el.children, menuPath);
}
});
}
changeMenuData(this.childrenList, this.fatherPath);
this.menuList = menuList;
this.changeWidth();
// let chilrenSum = 0
// let notChildrenSum = 0
// function getWidth(data) {
// data.forEach(el => {
// if (!el.children) {
// notChildrenSum = notChildrenSum + 1
// }
// if (el.children && el.children.length > 0) {
// // chilrenSum = chilrenSum + 1
// getWidth(el.children)
// }
// })
// }
// getWidth(this.childrenList)
// let childrenHight = notChildrenSum * 50 + chilrenSum * 34
// // let windowHight = this.$refs.siderBox.offsetHeight - 110
// // console.log(windowHight, "windowHight");
// if (this.childrenList.length > 0) {
// this.childrenWidth = (Math.floor(childrenHight / this.windowHeight) + 1) * 250
// // console.log(this.childrenWidth, "this.childrenWidth");
// this.childrenPadding = '0 20px 20px '
// } else {
// this.childrenWidth = 0
// this.childrenPadding = 0
// }
this.$store.dispatch("app/changeChildrenHide", true);
this.$emit("openChildren", this.childrenList.length > 0 ? true : false);
},
changeWidth() {
let secondNumber = 0;
let thirdNumber = 0;
this.menuList.forEach((el) => {
if (el.level == 2 && !el.hidden) {
secondNumber = secondNumber + 1;
} else if (el.level == 3 && !el.hidden) {
thirdNumber = thirdNumber + 1;
}
});
this.$nextTick(() => {
let childrenHight = thirdNumber * 50 + secondNumber * 35;
let windowHight = this.$refs.siderBox.offsetHeight - 51;
if (this.childrenList.length > 0) {
this.childrenPadding = "20px ";
windowHight = windowHight - 40;
this.childrenWidth =
(Math.floor(childrenHight / windowHight) + 1) * 320;
} else {
this.childrenWidth = 0;
this.childrenPadding = 0;
}
this.$emit("changeWidth", this.childrenWidth);
});
},
//
async GetMyCollectionData(collectType) {
let res = await GetMyCollectionData({});
if (res.code == 1) {
const putCollectData = (res) => {
res.forEach((el) => {
el.collect = true;
const setCollect = (arr) => {
arr.forEach((el) => {
el.collect = false
this.matchMyCollection(el)
if (el.children != null && el.children && el.children.length) {
putCollectData(el.children);
setCollect(el.children)
}
});
};
putCollectData(res.data);
this.collectionsData = res.data;
this.childrenList = [];
if (collectType) {
setTimeout(() => {
if (this.valForm.id != "129") {
this.openChildren(this.valForm);
} else {
this.openChildren(this.collectionsData[0]);
}
}, 1);
})
}
setCollect(val.children)
this.childrenList = val.children
this.fatherPath = val.path
}
},
//
matchMyCollection(item) {
const isCollectData = (res) => {
res.forEach((el) => {
if (el.id === item.id) {
item.collect = true;
}
if (el.children != null && el.children && el.children.length) {
isCollectData(el.children);
}
});
};
isCollectData(this.collectionsData);
},
//
closeOpenWin() {
if (this.isSearch != true) {
this.$refs.newsSiderRef.activeIndex = null;
this.childrenWidth = 0;
this.childrenPadding = 0;
this.$store.dispatch("app/changeChildrenHide", false);
}
},
routerClick() {
this.isSearch = false;
this.closeOpenWin();
},
createList(row) {
let children = [];
const parseList = (arr, centerPath) => {
arr.forEach((el) => {
let path;
if (!centerPath) {
path = this.fatherPath + "/" + el.path;
} else {
path = this.fatherPath + "/" + centerPath + "/" + el.path;
}
let arr = {
value: el.meta.title,
path: path,
};
children.push(arr);
if (el.children != null && el.children && el.children.length) {
parseList(el.children, el.path);
}
});
};
parseList(row);
return children;
},
getRestaurants(row) {
let children = [];
const restaurants = (arr, fatherPath) => {
arr.forEach((el) => {
let path = "";
el.fullpath = fatherPath ? fatherPath + "/" + el.path : el.path;
} else {
this.childrenList = val.children
}
let menuList = []
let arr = {
value: el.meta.title,
path: el.fullpath,
};
children.push(arr);
if (el.children != null && el.children && el.children.length) {
restaurants(el.children, el.fullpath);
}
});
};
restaurants(row);
return children;
},
querySearch(queryString, cb) {
this.isSearch = true;
var restaurants = this.getRestaurants(this.sidebarRouters);
var results = queryString ?
restaurants.filter(this.createFilter(queryString)) :
restaurants;
cb(results);
},
function changeMenuData(data, path) {
data.forEach((el) => {
let menuPath = path + '/' + el.path
let level = el.children ? 2 : 3
let arr = {
collect: el.collect,
meta: el.meta,
name: el.name,
path: menuPath,
hidden: el.hidden == 'true' ? true : false || false,
level: level
}
// if(!arr.hidden){
// }
menuList.push(arr)
if (el.children && el.children.length > 0) {
changeMenuData(el.children, menuPath)
}
})
}
createFilter(queryString) {
return (restaurant) => {
return restaurant.value.toLowerCase().indexOf(queryString) !== -1;
};
},
handleSelect(item) {
changeMenuData(this.childrenList, this.fatherPath)
this.menuList = menuList
this.changeWidth()
// let chilrenSum = 0
// let notChildrenSum = 0
let routeData = this.$router.resolve({
path: item.path,
});
window.open(routeData.href, "_self");
this.routerClick();
this.$refs.newsSiderRef.activeIndex = null;
this.childrenPadding = 0;
this.$store.dispatch("app/changeChildrenHide", false);
},
collectClick(item) {},
// function getWidth(data) {
// data.forEach(el => {
// if (!el.children) {
// notChildrenSum = notChildrenSum + 1
// }
// if (el.children && el.children.length > 0) {
// // chilrenSum = chilrenSum + 1
// getWidth(el.children)
// }
// })
// }
// getWidth(this.childrenList)
// let childrenHight = notChildrenSum * 50 + chilrenSum * 34
// // let windowHight = this.$refs.siderBox.offsetHeight - 110
// // console.log(windowHight, "windowHight");
// if (this.childrenList.length > 0) {
// this.childrenWidth = (Math.floor(childrenHight / this.windowHeight) + 1) * 250
// // console.log(this.childrenWidth, "this.childrenWidth");
// this.childrenPadding = '0 20px 20px '
// } else {
// this.childrenWidth = 0
// this.childrenPadding = 0
// }
this.$store.dispatch('app/changeChildrenHide', true)
this.$emit('openChildren', this.childrenList.length > 0 ? true : false)
},
};
changeWidth() {
let secondNumber = 0
let thirdNumber = 0
this.menuList.forEach((el) => {
if (el.level == 2 && !el.hidden) {
secondNumber = secondNumber + 1
} else if (el.level == 3 && !el.hidden) {
thirdNumber = thirdNumber + 1
}
})
this.$nextTick(() => {
let childrenHight = thirdNumber * 50 + secondNumber * 35
let windowHight = this.$refs.siderBox.offsetHeight - 51
if (this.childrenList.length > 0) {
this.childrenPadding = '20px '
windowHight = windowHight - 40
this.childrenWidth =
(Math.floor(childrenHight / windowHight) + 1) * 320
} else {
this.childrenWidth = 0
this.childrenPadding = 0
}
this.$emit('changeWidth', this.childrenWidth)
})
},
//
async GetMyCollectionData(collectType) {
let res = await GetMyCollectionData({})
if (res.code == 1) {
const putCollectData = (res) => {
res.forEach((el) => {
el.collect = true
if (el.children != null && el.children && el.children.length) {
putCollectData(el.children)
}
})
}
putCollectData(res.data)
this.collectionsData = res.data
this.childrenList = []
if (collectType) {
setTimeout(() => {
if (this.valForm.id != '129') {
this.openChildren(this.valForm)
} else {
this.openChildren(this.collectionsData[0])
}
}, 1)
}
}
},
//
matchMyCollection(item) {
const isCollectData = (res) => {
res.forEach((el) => {
if (el.id === item.id) {
item.collect = true
}
if (el.children != null && el.children && el.children.length) {
isCollectData(el.children)
}
})
}
isCollectData(this.collectionsData)
},
//
closeOpenWin() {
if (this.isSearch != true) {
this.$refs.newsSiderRef.activeIndex = null
this.childrenWidth = 0
this.childrenPadding = 0
this.$store.dispatch('app/changeChildrenHide', false)
}
},
routerClick() {
this.isSearch = false
this.closeOpenWin()
},
createList(row) {
let children = []
const parseList = (arr, centerPath) => {
arr.forEach((el) => {
let path
if (!centerPath) {
path = this.fatherPath + '/' + el.path
} else {
path = this.fatherPath + '/' + centerPath + '/' + el.path
}
let arr = {
value: el.meta.title,
path: path
}
children.push(arr)
if (el.children != null && el.children && el.children.length) {
parseList(el.children, el.path)
}
})
}
parseList(row)
return children
},
getRestaurants(row) {
let children = []
const restaurants = (arr, fatherPath) => {
console.log(arr, 'arr')
arr.forEach((el) => {
let path = ''
el.fullpath = fatherPath ? fatherPath + '/' + el.path : el.path
console.log(el, 'el')
let arr = {
value: el.meta ? el.meta.title : '',
path: el.fullpath
}
children.push(arr)
if (el.children != null && el.children && el.children.length) {
restaurants(el.children, el.fullpath)
}
})
}
restaurants(row)
return children
},
querySearch(queryString, cb) {
this.isSearch = true
var restaurants = this.getRestaurants(this.sidebarRouters)
var results = queryString ?
restaurants.filter(this.createFilter(queryString)) :
restaurants
console.log(results, 'results')
cb(results)
},
createFilter(queryString) {
return (restaurant) => {
return restaurant.value.toLowerCase().indexOf(queryString) !== -1
}
},
handleSelect(item) {
let routeData = this.$router.resolve({
path: item.path
})
window.open(routeData.href, '_self')
this.routerClick()
this.$refs.newsSiderRef.activeIndex = null
this.childrenPadding = 0
this.$store.dispatch('app/changeChildrenHide', false)
},
collectClick(item) {
}
}
}
</script>
<style lang="scss">
$activeColor: var(--bg-color, "#00aaff");
$activeColor: var(--bg-color, "#00aaff");
.el-tree-node__content:hover,
.el-upload-list__item:hover {
// color: white;
// background-color: $activeColor !important;
background-color: #ecf5ff !important;
.el-tree-node__content:hover,
.el-upload-list__item:hover {
// color: white;
// background-color: $activeColor !important;
background-color: #ecf5ff !important;
}
.el-tree-node:focus > .el-tree-node__content {
color: white;
background-color: $activeColor !important;
}
.el-tree-node.is-current > .el-tree-node__content {
color: white;
background-color: $activeColor !important;
}
.navbarSearch {
// width: 200px !important;
::v-deep .el-input--medium .el-input__inner {
border: 1px solid #bbbbbb;
border-radius: 15px;
background-color: transparent;
}
.el-tree-node:focus>.el-tree-node__content {
color: white;
background-color: $activeColor !important;
::v-deep .el-input__suffix {
color: #1890ff;
font-size: 24px;
}
}
.el-tree-node.is-current>.el-tree-node__content {
color: white;
background-color: $activeColor !important;
}
::v-deep .sidebar-container {
z-index: 9000 !important;
}
.navbarSearch {
// width: 200px !important;
::v-deep .el-input--medium .el-input__inner {
border: 1px solid #bbbbbb;
border-radius: 15px;
background-color: transparent;
}
::v-deep .el-input__suffix {
color: #1890ff;
font-size: 24px;
}
}
::v-deep .sidebar-container {
z-index: 9000 !important;
}
.sidebar_box {
background-color: white;
height: 98%;
// padding: 26px 0;
// border-left: 4px solid #eef0f3;
// max-width: 500px;
// min-width: 800px;
// padding: 0 30px 20px 30px;
// width: calc(100% - 300px);
transition: width 0.3s;
}
.sidebar_box {
background-color: white;
height: 98%;
// padding: 26px 0;
// border-left: 4px solid #eef0f3;
// max-width: 500px;
// min-width: 800px;
// padding: 0 30px 20px 30px;
// width: calc(100% - 300px);
transition: width 0.3s;
}
</style>

View File

@ -29,7 +29,6 @@ const permission = {
name: 'applicationEdit',
hidden: true,
meta: {
title: '应用编辑',
hidden: true
}
},
@ -39,7 +38,6 @@ const permission = {
name: 'exploit',
hidden: true,
meta: {
title: '开发管理',
hidden: true
}
},
@ -49,7 +47,6 @@ const permission = {
name: 'authority',
hidden: true,
meta: {
title: '权限管理',
hidden: true
}
@ -59,7 +56,6 @@ const permission = {
name: 'appApiAdmin',
component: () => import('@/views/applicationList/apiList/apiAdmin'),
meta: {
title: 'API管理',
hidden: true
}
},
@ -68,7 +64,6 @@ const permission = {
name: 'inserterAdmin',
component: () => import('@/views/applicationList/inserterAdmin'),
meta: {
title: '插件管理',
hidden: true
}
},
@ -79,7 +74,6 @@ const permission = {
hidden: 'true',
component: () => import('@/views/applicationList/apiList/apiAdd'),
meta: {
title: 'API新增'
}
},
@ -89,7 +83,6 @@ const permission = {
hidden: 'true',
component: () => import('@/views/applicationList/apiList/apiView'),
meta: {
title: 'API查看'
}
}
]

View File

@ -64,7 +64,11 @@ const user = {
resolve();
})
.catch((error) => {
console.log(123)
//
commit("LogOut")
reject(error);
});
});
},
@ -98,6 +102,7 @@ const user = {
// 退出系统
LogOut({ commit, state }) {
console.log("触发推出")
return new Promise((resolve, reject) => {
commit("SET_TOKEN", "");
commit("SET_ROLES", []);

View File

@ -1,298 +1,314 @@
import axios from "axios";
import axios from 'axios'
import {
Notification,
MessageBox,
Message,
Loading
} from "element-ui";
import store from "@/store";
Notification,
MessageBox,
Message,
Loading
} from 'element-ui'
import store from '@/store'
import {
getToken,
setToken,
removeCompanyId,
removeToken,
removeInfo,
} from "@/utils/auth";
import errorCode from "@/utils/errorCode";
getToken,
setToken,
removeCompanyId,
removeToken,
removeInfo
} from '@/utils/auth'
import errorCode from '@/utils/errorCode'
import {
tansParams,
blobValidate
} from "@/utils/ruoyi";
tansParams,
blobValidate
} from '@/utils/ruoyi'
import { closeLoading, openLoading } from '@/utils/loading'
import cache from "@/plugins/cache";
import cache from '@/plugins/cache'
import {
saveAs
} from "file-saver";
import route from "../router/index";
saveAs
} from 'file-saver'
import route from '../router/index'
// import configKey from '@/assets/js/configKey.js'
let downloadLoadingInstance;
let downloadLoadingAxios;
let downloadLoadingInstance
let downloadLoadingAxios
// 是否显示重新登录
export let isRelogin = {
show: false,
};
let timer = null;
show: false
}
let timer = null
// 是否正在刷新的标记
let isRefreshing = false;
let isRefreshing = false
//重试队列
let requests = [];
let requests = []
axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
// baseURL:configKey.urlType?configKey.baseURL:process.env.VUE_APP_BASE_API,
baseURL: process.env.VUE_APP_BASE_API,
// baseURL: "http://192.168.2.240:8066/",
// 超时
timeout: 2 * 60 * 1000,
});
// axios中请求配置有baseURL选项表示请求URL公共部分
// baseURL:configKey.urlType?configKey.baseURL:process.env.VUE_APP_BASE_API,
baseURL: process.env.VUE_APP_BASE_API,
// baseURL: "http://192.168.2.240:8066/",
// 超时
timeout: 2 * 60 * 1000
})
// request拦截器
service.interceptors.request.use(
(config) => {
// do something bedocument.getElementById("")fore request is sent
// config.headers['secretkey'] = 'aQ+b2wGj1LuhR8N2O0aOmKlkjgnOyHSlZ0QUtZMP3dHkVkAGhJe37KOdmpexsE6W' //本机密钥
(config) => {
// do something bedocument.getElementById("")fore request is sent
// config.headers['secretkey'] = 'aQ+b2wGj1LuhR8N2O0aOmKlkjgnOyHSlZ0QUtZMP3dHkVkAGhJe37KOdmpexsE6W' //本机密钥
// config.headers['secretkey'] = 'm/Ah8KQ6IfWEv85KEoaHKf4SfwtemYtGkiuBabkQCnOuJ/+nyvqBLOVheirHN1TO' //本机密钥
config.headers["secretkey"] = configKey.secretkey;
// config.headers['secretkey'] = 'm/Ah8KQ6IfWEv85KEoaHKf4SfwtemYtGkiuBabkQCnOuJ/+nyvqBLOVheirHN1TO' //本机密钥
config.headers['secretkey'] = configKey.secretkey
// if (store.getters.token) {
// if (window.localStorage.userToken) {
let token = getToken();
if (token) {
config.headers["token"] = token;
}
// if (store.getters.token) {
// if (window.localStorage.userToken) {
let token = getToken()
if (token) {
config.headers['token'] = token
}
if (config.url.indexOf('updateDto') != -1 || config.url.indexOf('saveDto') != -1) {
openLoading('submit')
} else if (config.url.indexOf('getById') != -1) {
openLoading('detail')
} else if (config.url.indexOf('deleteById') != -1) {
openLoading('del')
} else if (config.url.indexOf('changerState') != -1) {
openLoading('submit')
}
if (config.url.indexOf('updateDto') != -1 || config.url.indexOf('saveDto') != -1) {
openLoading('submit')
} else if (config.url.indexOf('getById') != -1) {
openLoading('detail')
} else if (config.url.indexOf('deleteById') != -1) {
openLoading('del')
} else if (config.url.indexOf('changerState') != -1) {
openLoading('submit')
}
// 生成请求的唯一标识符
const requestIdentifier = `${config.url}-${config.method}`;
// 判断是否已存在相同的请求
const isDuplicateRequest = requests.includes(requestIdentifier);
// 如果存在相同请求,取消当前请求
if (isDuplicateRequest) {
// return Promise.reject(new Error("Duplicate request"));
}
// 将请求的唯一标识符添加到请求队列中
requests.push(requestIdentifier);
// 设置计时器,在秒后移除请求的唯一标识符
clearTimeout(timer);
timer = setTimeout(() => {
const index = requests.indexOf(requestIdentifier);
if (index !== -1) {
requests.splice(index, 1); // 移除请求的唯一标识符
}
}, 2000);
return config;
},
// 生成请求的唯一标识符
const requestIdentifier = `${config.url}-${config.method}`
// 判断是否已存在相同的请求
const isDuplicateRequest = requests.includes(requestIdentifier)
// 如果存在相同请求,取消当前请求
if (isDuplicateRequest) {
// return Promise.reject(new Error("Duplicate request"));
}
// 将请求的唯一标识符添加到请求队列中
requests.push(requestIdentifier)
// 设置计时器,在秒后移除请求的唯一标识符
clearTimeout(timer)
timer = setTimeout(() => {
const index = requests.indexOf(requestIdentifier)
if (index !== -1) {
requests.splice(index, 1) // 移除请求的唯一标识符
}
}, 2000)
return config
},
(error) => {
// do something with request error
// 请求发生错误时清除唯一标识符
const requestIdentifier = `${error.config.url}-${error.config.method}`;
const index = requests.indexOf(requestIdentifier);
if (index !== -1) {
requests.splice(index, 1); // 清除唯一标识符
}
return Promise.reject(error);
}
);
(error) => {
// do something with request error
// 请求发生错误时清除唯一标识符
const requestIdentifier = `${error.config.url}-${error.config.method}`
const index = requests.indexOf(requestIdentifier)
if (index !== -1) {
requests.splice(index, 1) // 清除唯一标识符
}
return Promise.reject(error)
}
)
// 响应拦截器
service.interceptors.response.use(
(res) => {
// 请求完成时清除唯一标识符
const requestIdentifier = `${res.config.url}-${res.config.method}`;
const index = requests.indexOf(requestIdentifier);
if (index !== -1) {
requests.splice(index, 1); // 清除唯一标识符
}
// downloadLoadingAxios.close()
// 未设置状态码则默认成功状态
const code = res.data.status || '200';
// 获取错误信息
const msg = res.data.msg;
closeLoading();
// 二进制数据则直接返回
if (
res.request.responseType === "blob" ||
res.request.responseType === "arraybuffer"
) {
return res.data;
}
(res) => {
console.log(res, '相应拦截器拦截内容')
// 请求完成时清除唯一标识符
const requestIdentifier = `${res.config.url}-${res.config.method}`
const index = requests.indexOf(requestIdentifier)
if (index !== -1) {
requests.splice(index, 1) // 清除唯一标识符
}
// downloadLoadingAxios.close()
// 未设置状态码则默认成功状态
const code = res.data.status || '200'
// 获取错误信息
const msg = res.data.msg
closeLoading()
// 二进制数据则直接返回
if (
res.request.responseType === 'blob' ||
res.request.responseType === 'arraybuffer'
) {
return res.data
}
if (code === '500') {
MessageBox.confirm(msg, "系统提示", {
confirmButtonText: "确定",
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: "error",
})
.then(() => {
if (msg === 'token无效') {
store.dispatch('LogOut').then(() => {
route.replace({
path: "/login"
});;
})
}
if (code === '500') {
MessageBox.confirm(msg, '系统提示', {
confirmButtonText: '确定',
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: 'error'
})
.then(() => {
console.log(res, '相应拦截器拦截内容')
if (msg === 'token无效') {
store.dispatch('LogOut').then(() => {
route.replace({
path: '/login'
})
})
.catch(() => { });
return Promise.reject(new Error(msg));
} else if (code == '1002') {
})
}
if (res.config.headers.dj==='queryTreeById') {
store.dispatch('LogOut').then(() => {
route.replace({
path: '/login'
})
MessageBox.confirm(msg, "系统提示", {
confirmButtonText: "确定",
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: "error",
})
.then(() => {
store.dispatch('LogOut').then(() => {
route.replace({
path: "/login"
});;
})
})
.catch(() => { });
} else if (code !== '200') {
})
}
MessageBox.confirm(msg, "系统提示", {
confirmButtonText: "确定",
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: "error",
})
.then(() => { })
.catch(() => { });
return Promise.reject("error");
} else {
return res.data;
}
},
(error) => {
let response = error.response;
closeLoading();
// downloadLoadingAxios.close()
// if (response.status == 401) {
// if (response.data.code == 1002) {
// if (!isRefreshing) {
// isRefreshing = true;
// setToken(response.data.data[0]);
// response.headers.token = response.data.data[0];
// // token 刷新后将数组的方法重新执行
// requests.forEach((cb) => cb(token));
// requests = []; // 重新请求完清空
// return service(response.config);
// isRefreshing = false;
// } else {
// // 返回未执行 resolve 的 Promise
// return new Promise((resolve) => {
// // 用函数形式将 resolve 存入,等待刷新后再执行
// requests.push((token) => {
// response.headers.token = `${token}`;
// resolve(service(response.config));
// });
// });
// }
// return response && response.data;
// } else {
// Message({
// message: response.data.message,
// type: "error",
// showClose: true,
// duration: 0,
// });
// if (response.data.code == -1) {} else {
// store.dispatch("LogOut").then(() => {
// route.replace({
// path: "/login",
// });
// });
// }
// }
// } else {
// let {
// message
// } = error;
// if (message == "Network Error") {
// message = "后端接口连接异常";
// } else if (message.includes("timeout")) {
// message = "系统接口请求超时";
// } else if (message.includes("Request failed with status code")) {
// message = "系统接口" + message.substr(message.length - 3) + "异常";
// }
// MessageBox.confirm(message, "系统提示", {
// confirmButtonText: "确定",
// showCancelButton: false,
// showClose: false,
// closeOnClickModal: false,
// closeOnPressEscape: false,
// type: "error",
// })
// .then(() => {})
// .catch(() => {});
// }
})
.catch(() => {
})
return Promise.reject(new Error(msg))
} else if (code == '1002') {
return Promise.reject(error);
}
);
MessageBox.confirm(msg, '系统提示', {
confirmButtonText: '确定',
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: 'error'
})
.then(() => {
store.dispatch('LogOut').then(() => {
route.replace({
path: '/login'
})
})
})
.catch(() => {
})
} else if (code !== '200') {
MessageBox.confirm(msg, '系统提示', {
confirmButtonText: '确定',
showCancelButton: false,
showClose: false,
closeOnClickModal: false,
closeOnPressEscape: false,
type: 'error'
})
.then(() => {
})
.catch(() => {
})
return Promise.reject('error')
} else {
return res.data
}
},
(error) => {
let response = error.response
closeLoading()
// downloadLoadingAxios.close()
// if (response.status == 401) {
// if (response.data.code == 1002) {
// if (!isRefreshing) {
// isRefreshing = true;
// setToken(response.data.data[0]);
// response.headers.token = response.data.data[0];
// // token 刷新后将数组的方法重新执行
// requests.forEach((cb) => cb(token));
// requests = []; // 重新请求完清空
// return service(response.config);
// isRefreshing = false;
// } else {
// // 返回未执行 resolve 的 Promise
// return new Promise((resolve) => {
// // 用函数形式将 resolve 存入,等待刷新后再执行
// requests.push((token) => {
// response.headers.token = `${token}`;
// resolve(service(response.config));
// });
// });
// }
// return response && response.data;
// } else {
// Message({
// message: response.data.message,
// type: "error",
// showClose: true,
// duration: 0,
// });
// if (response.data.code == -1) {} else {
// store.dispatch("LogOut").then(() => {
// route.replace({
// path: "/login",
// });
// });
// }
// }
// } else {
// let {
// message
// } = error;
// if (message == "Network Error") {
// message = "后端接口连接异常";
// } else if (message.includes("timeout")) {
// message = "系统接口请求超时";
// } else if (message.includes("Request failed with status code")) {
// message = "系统接口" + message.substr(message.length - 3) + "异常";
// }
// MessageBox.confirm(message, "系统提示", {
// confirmButtonText: "确定",
// showCancelButton: false,
// showClose: false,
// closeOnClickModal: false,
// closeOnPressEscape: false,
// type: "error",
// })
// .then(() => {})
// .catch(() => {});
// }
return Promise.reject(error)
}
)
// 通用下载方法
export function download(url, params, filename, config) {
downloadLoadingInstance = Loading.service({
text: "正在下载数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
return service
.post(url, params, {
transformRequest: [
(params) => {
return tansParams(params);
},
],
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
responseType: "blob",
...config,
})
.then(async (data) => {
const isLogin = await blobValidate(data);
if (isLogin) {
const blob = new Blob([data]);
saveAs(blob, filename);
} else {
const resText = await data.text();
const rspObj = JSON.parse(resText);
const errMsg =
errorCode[rspObj.code] || rspObj.msg || errorCode["default"];
Message.error(errMsg);
}
downloadLoadingInstance.close();
})
.catch((r) => {
Message.error("下载文件出现错误,请联系管理员!");
downloadLoadingInstance.close();
});
downloadLoadingInstance = Loading.service({
text: '正在下载数据,请稍候',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
return service
.post(url, params, {
transformRequest: [
(params) => {
return tansParams(params)
}
],
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
responseType: 'blob',
...config
})
.then(async(data) => {
const isLogin = await blobValidate(data)
if (isLogin) {
const blob = new Blob([data])
saveAs(blob, filename)
} else {
const resText = await data.text()
const rspObj = JSON.parse(resText)
const errMsg =
errorCode[rspObj.code] || rspObj.msg || errorCode['default']
Message.error(errMsg)
}
downloadLoadingInstance.close()
})
.catch((r) => {
Message.error('下载文件出现错误,请联系管理员!')
downloadLoadingInstance.close()
})
}
export default service;
export default service

View File

@ -99,7 +99,7 @@ export default {
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10,
pageSize: 100,
},
queryModel: {
code: "",
@ -225,4 +225,4 @@ export default {
color: #409eff;
cursor: pointer;
}
</style>
</style>

View File

@ -107,7 +107,7 @@ export default {
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10,
pageSize: 100,
},
queryModel: {
code: "",
@ -244,4 +244,4 @@ export default {
color: #409eff;
cursor: pointer;
}
</style>
</style>

View File

@ -5,19 +5,25 @@
<div class="chunk">
<el-button icon="el-icon-back" @click="
$router.replace({ path: '/applicationList/applicationListAdmin' })
">返回</el-button>
"
>返回
</el-button>
</div>
<div class="chunk">
<el-button icon="el-icon-first-aid-kit" type="primary" @click="saveHandle">保存</el-button>
</div>
</div>
<div class="main" >
<div class="main">
<div class="upload">
<div class="title">应用信息</div>
<div class="uploadMain">
<div class="left">
<div class="title">应用logo</div>
<el-upload class="avatar-uploader" ref="upload" action="https://jsonplaceholder.typicode.com/posts/" :on-preview="handlePreview" :on-progress="handleProgress" :before-upload="beforeUpload" list-type="picture" :limit="1" :disabled="lookFlag" :on-success="handleAvatarSuccess" :show-file-list="false">
<el-upload class="avatar-uploader" ref="upload" action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-progress="handleProgress" :before-upload="beforeUpload"
list-type="picture" :limit="1" :disabled="lookFlag" :on-success="handleAvatarSuccess"
:show-file-list="false"
>
<div class="line">
<div class="left">
<img v-if="imgUrl" :src="imgUrl" class="avatar" @error="handleImageError">
@ -40,40 +46,44 @@
</el-upload>
</div>
<div class="right">
<el-switch active-value="1" inactive-value="2" v-model="appStatus" active-text="启用" active-color="#60c958" :disabled="lookFlag">
<el-switch active-value="1" inactive-value="2" v-model="appStatus" active-text="启用" active-color="#60c958"
:disabled="lookFlag"
>
</el-switch>
</div>
</div>
</div>
<div class="form">
<baseNewForm ref="mainForm" :spanNumber="24" :isFunBtn="false" :lookFlag="lookFlag" :formRule="!lookFlag" :formRow="formRow" :ruleForm="ruleForm" @onSubmit="onSubmit"></baseNewForm>
<baseNewForm ref="mainForm" :spanNumber="24" :isFunBtn="false" :lookFlag="lookFlag" :formRule="!lookFlag"
:formRow="formRow" :ruleForm="ruleForm" @onSubmit="onSubmit"
></baseNewForm>
</div>
</div>
</div>
</template>
<script>
import { getApiModuleApi } from "@/api/apiChunks/index.js";
import { uploadLogo } from "@/api/apis/logo.js";
import configData from "./configData";
import baseNewForm from "@/views/intergrationTask/compoments/baseNewForm";
import request from "@/utils/request";
import { getApiModuleApi } from '@/api/apiChunks/index.js'
import { uploadLogo } from '@/api/apis/logo.js'
import configData from './configData'
import baseNewForm from '@/views/intergrationTask/compoments/baseNewForm'
import request from '@/utils/request'
export default {
data() {
return {
fileList: [],
iconBase64: "",
imgUrl: "",
iconBase64: '',
imgUrl: '',
loading: false,
appLogo: "",
appLogo: '',
appStatus: 1,
ruleForm: {
accessMode: [],
accessMode: []
},
lookFlag: false,
formRow: configData.addForm,
};
formRow: configData.addForm
}
},
methods: {
handleImageError(row) {
@ -89,13 +99,23 @@ export default {
handlePreview(file) {
},
async handleAvatarSuccess(res, file) {
this.$refs.upload.clearFiles();//
console.log(res, file, '123')
file.raw.type
if (
file.raw.type.split('/')[1] != 'jpeg' &&
file.raw.type.split('/')[1] != 'png'
) {
return false
} else if (file.size >= 2000000) {
return false
}
this.$refs.upload.clearFiles()//
this.imgUrl = URL.createObjectURL(file.raw);
let formData = new FormData();
formData.append("file", file.raw);
formData.append("fileFlag", true);
formData.append("businessType", "application");
this.imgUrl = URL.createObjectURL(file.raw)
let formData = new FormData()
formData.append('file', file.raw)
formData.append('fileFlag', true)
formData.append('businessType', 'application')
// console.log(formData);
// const el = await uploadLogo(formData)
// if (el.status === '200') {
@ -103,36 +123,37 @@ export default {
// this.appLogo = el.id
// }
return request({
url: "/kangarooDataCenterV3/entranceController/fileUpload",
method: "post",
data: formData,
url: '/kangarooDataCenterV3/entranceController/fileUpload',
method: 'post',
data: formData
}).then((res) => {
if (res.status === '200') {
this.$vmNews("上传成功", "success")
this.$vmNews('上传成功', 'success')
this.appLogo = res.attribute.id
}
return true
// this.loading = false
})
},
}
,
async beforeUpload(file) {
if (
file.type.split("/")[1] != "jpeg" &&
file.type.split("/")[1] != "png"
file.type.split('/')[1] != 'jpeg' &&
file.type.split('/')[1] != 'png'
) {
this.$message({
type: "warning",
message: "只能上传jpg/png文件",
});
return
type: 'warning',
message: '只能上传jpg/png文件'
})
return false
} else {
if (file.size >= 2000000) {
this.$message({
type: "warning",
message: "文件大小不超过2MB",
});
return
type: 'warning',
message: '文件大小不超过2MB'
})
return false
}
// let reader = new FileReader();
// let that = this;
@ -144,58 +165,61 @@ export default {
// reader.readAsDataURL(file);
// return false;
}
},
}
,
//
saveHandle() {
this.$refs.mainForm.submitForm();
this.$refs.mainForm.submitForm()
},
}
,
//
async onSubmit() {
if (this.$route.query.flag === "add") {
if (this.$route.query.flag === 'add') {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "saveApp"
tl: 'sysApplicationService',
as: 'application',
dj: 'saveApp'
}, { ...this.ruleForm, appStatus: this.appStatus, appLogo: this.appLogo })
if (res.status === '200') {
this.$vmNews("保存成功", "success")
this.$vmNews('保存成功', 'success')
this.$router.replace({ path: '/applicationList/applicationListAdmin' })
}
} else if (this.$route.query.flag === "copy") {
} else if (this.$route.query.flag === 'copy') {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "copyApp"
tl: 'sysApplicationService',
as: 'application',
dj: 'copyApp'
}, { ...this.ruleForm, appStatus: this.appStatus, appLogo: this.appLogo })
if (res.status === '200') {
this.$vmNews("复制成功", "success")
this.$vmNews('复制成功', 'success')
this.$router.replace({ path: '/applicationList/applicationListAdmin' })
}
} else if (this.$route.query.flag === "setting") {
} else if (this.$route.query.flag === 'setting') {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "updateApp"
tl: 'sysApplicationService',
as: 'application',
dj: 'updateApp'
}, { updateType: 1, ...this.ruleForm, appStatus: this.appStatus, appLogo: this.appLogo })
if (res.status === '200') {
this.$vmNews("保存成功", "success")
this.$vmNews('保存成功', 'success')
this.initEditFormData()
this.getLogoUrl()
this.$emit("saveSuccess")
this.$emit('saveSuccess')
}
}
},
}
,
//
async initSelectOptions() {
let params = {
tab_name: "sys_product",
column_name: "classify",
};
tab_name: 'sys_product',
column_name: 'classify'
}
const res = await getApiModuleApi({
tl: "generalServiceImpl",
as: "dictionaryshop",
dj: "selectDictionaryshop"
tl: 'generalServiceImpl',
as: 'dictionaryshop',
dj: 'selectDictionaryshop'
}, params)
this.formRow[3].elCol[0].options = []
res.attribute.forEach((item) => {
@ -204,107 +228,121 @@ export default {
id: item.column_value
})
})
},
}
,
// -
async initCopyFormData() {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "getCopyApp"
tl: 'sysApplicationService',
as: 'application',
dj: 'getCopyApp'
}, { id: this.$route.query.id })
this.ruleForm = res.attribute
this.ruleForm.accessMode = JSON.parse(res.attribute.accessMode)
this.appStatus = res.attribute.appStatus
},
}
,
async initEditFormData() {
const res = await getApiModuleApi({
tl: "sysApplicationService",
as: "application",
dj: "getApp"
tl: 'sysApplicationService',
as: 'application',
dj: 'getApp'
}, { id: this.$route.query.id })
this.ruleForm = res.attribute
this.ruleForm.accessMode = JSON.parse(res.attribute.accessMode)
this.appStatus = res.attribute.appStatus
},
}
,
//logo
getLogoUrl() {
let id = this.appLogo ? this.appLogo : this.$route.query.appLogo
return request({
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + id,
method: "get",
url: '/kangarooDataCenterV3/entranceController/fileDownloadNew?id=' + id,
method: 'get',
responseType: 'arraybuffer'
}).then((res) => {
this.imgUrl =
"data:image/png/jpg;base64," + btoa(new Uint8Array(res).reduce((data, byte) => data + String.fromCharCode(byte), ""));
'data:image/png/jpg;base64,' + btoa(new Uint8Array(res).reduce((data, byte) => data + String.fromCharCode(byte), ''))
})
}
},
components: {
baseNewForm,
baseNewForm
},
created() {
// options
this.initSelectOptions()
//
if (this.$route.query.flag === "setting") {
this.formRow[0].elCol[0].disabled = false;
if (this.$route.query.flag === 'setting') {
this.formRow[0].elCol[0].disabled = false
} else {
this.formRow[0].elCol[0].disabled = false;
this.formRow[0].elCol[0].disabled = false
}
if (this.$route.query.flag === "copy") {
if (this.$route.query.flag === 'copy') {
this.initCopyFormData()
this.getLogoUrl()
} else if (this.$route.query.flag === "setting") {
} else if (this.$route.query.flag === 'setting') {
this.initEditFormData()
this.getLogoUrl()
}
},
};
}
}
</script>
<style scoped lang="scss">
::v-deep .el-button {
border-radius: 16px;
}
::v-deep .el-form-item {
display: block !important;
}
.wrap {
background-color: #fbfbfb;
width: 100%;
overflow: auto;
> .btn {
display: flex;
justify-content: flex-end;
> .chunk {
margin-left: 10px;
}
}
> .main {
margin-top: 10px;
> .upload {
background-color: #fff;
border-radius: 16px;
padding: 24px 30px;
> .title {
font-size: 18px;
font-weight: 600;
}
> .uploadMain {
margin-top: 20px;
display: flex;
align-items: center;
justify-content: space-between;
> .left {
> .title {
font-size: 18px;
color: #999999;
margin-bottom: 10px;
}
.line {
display: flex;
align-items: center;
.left {
border: 1px dashed #999999;
width: 64px;
@ -312,11 +350,13 @@ export default {
display: flex;
justify-content: center;
align-items: center;
> img {
width: 100%;
// height: 100%;
}
}
.right {
margin-left: 15px;
}
@ -324,6 +364,7 @@ export default {
}
}
}
> .form {
overflow: auto;
margin-top: 10px;

View File

@ -103,7 +103,7 @@ export default {
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10,
pageSize: 100,
},
queryModel: {
sourceCode: "", //
@ -207,4 +207,4 @@ export default {
color: #409eff;
cursor: pointer;
}
</style>
</style>

View File

@ -102,7 +102,7 @@ export default {
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10,
pageSize: 100,
},
queryModel: {
theme: "", //
@ -246,4 +246,4 @@ export default {
color: #409eff;
cursor: pointer;
}
</style>
</style>

View File

@ -130,13 +130,13 @@ export default {
tableData: [], //
pageModel: {
pageNum: 1,
pageSize: 10,
pageSize: 100,
},
queryModel: {
theme: "",
sendApp: "",
sendApi: "",
receiveApp: "",
theme: "",
sendApp: "",
sendApi: "",
receiveApp: "",
receiveApi: "",
status: "",
},
@ -285,4 +285,4 @@ export default {
color: #409eff;
cursor: pointer;
}
</style>
</style>

View File

@ -281,10 +281,11 @@ export default {
margin-right: 20px;
width: 5vw;
height: 100%;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
img {
width: 5vw;
height: 7vh;
}
}
@ -321,6 +322,7 @@ export default {
overflow: hidden;
display: flex;
align-items: center;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
img {
width: 100%;
}
@ -395,6 +397,7 @@ export default {
align-items: center;
justify-content: center;
img {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
width: 3vw;
}
}
@ -425,7 +428,7 @@ export default {
font-weight: 700;
flex-direction: column;
align-items: center;
font-size: 34px;
font-size: 30px;
color: #fff;
.text{
margin-top: 5vh;

View File

@ -242,7 +242,7 @@ export default {
journalingType: this.journalingType,
names: val,
pageNum: this.pageModel.pageIndex,
pageSize: 10,
pageSize: 100,
...obj,
...this.tempObj,
});

View File

@ -242,7 +242,7 @@ export default {
journalingType: this.journalingType,
names: val,
pageNum: this.pageModel.pageIndex,
pageSize: 10,
pageSize: 100,
...obj,
...this.tempObj,
});

View File

@ -285,6 +285,7 @@ export default {
// }
// })
//
console.log(res,'res')
res.attribute.listList.forEach(item => {
this.mainTableName = item.dbName
item.ruleList.forEach(ele => {

View File

@ -252,7 +252,7 @@ export default {
journalingType: this.journalingType,
apiName: val,
pageNum: this.pageModel.pageIndex,
pageSize: 10,
pageSize: 100,
...obj,
...this.tempObj,
...this.apiBody,

View File

@ -245,7 +245,7 @@ export default {
},
{
pageNum: index,
pageSize: 10,
pageSize: 100,
...obj,
}
);

View File

@ -253,7 +253,7 @@ export default {
journalingType: this.journalingType,
names: val,
pageNum: this.pageModel.pageIndex,
pageSize: 10,
pageSize: 100,
...obj,
...this.tempObj,
...this.apiBody,

View File

@ -68,7 +68,7 @@ export default {
label: '任务名称'
},
{
prop: 'taskId',
prop: 'taskCode',
label: '任务编码'
},
{

View File

@ -280,7 +280,7 @@ export default {
elCol: [
{
label: "运行次数",
prop: "`runNum",
prop: "runNum",
tag: "elInput",
disabled:true,
},

View File

@ -67,7 +67,7 @@ export default {
label: '任务名称'
},
{
prop: 'taskId',
prop: 'taskCode',
label: '任务编码'
},
{

View File

@ -673,7 +673,7 @@ export default {
if (res.status == 200) {
this.ruleForm = res.attribute
console.log(res)
this.formRow[0].elCol[1].disabled = true
this.formRow[0].elCol[1].disabled = false
const res2 = await authApi('sysApplicationPluginService', '', 'queryEntity', '', {
appId: res.attribute.taskApp
})

View File

@ -255,6 +255,7 @@ export default {
this.$store
.dispatch("Login", this.loginForm)
.then(() => {
this.loading = false;
this.$router
.push({
path: this.redirect || "/",
@ -263,6 +264,7 @@ export default {
})
.catch(() => {
this.loading = false;
console.log(123,'123')
});
}
});

View File

@ -253,7 +253,7 @@ export default {
journalingType: this.journalingType,
names: val,
pageNum: this.pageModel.pageIndex,
pageSize: 10,
pageSize: 100,
...obj,
...this.tempObj,
...this.apiBody,

View File

@ -168,6 +168,7 @@ export default {
res.attribute.forEach(item=>{
this.$set(this.select_dist,item.pluginId,item)
})
console.log(res.attribute,'res.attribute插件返回')
this.formRow[0].elCol[0].options = res.attribute
}
},
@ -274,7 +275,7 @@ export default {
return true
}
if(!item.argCode){
this.$vmNews("参数编码")
this.$vmNews("请输入参数编码")
return true
}
})
@ -338,6 +339,7 @@ export default {
params
);
if (res.status == "200") {
console.log(res.attribute,'res.attribute123')
this.formRow[1].elCol[0].options = res.attribute;
}
},

View File

@ -279,7 +279,7 @@ export default {
journalingType: this.journalingType,
names: val,
pageNum: this.pageModel.pageIndex,
pageSize: 10,
pageSize: 100,
}
);
this.selLoading = false;

View File

@ -216,7 +216,7 @@ export default {
journalingType: this.journalingType,
names: val,
pageNum: this.pageModel.pageIndex,
pageSize: 10,
pageSize: 100,
}
);
this.selLoading = false;

View File

@ -103,7 +103,7 @@ export default {
menuData: [],
formdata: {},
pageModel: {
pageSize: 20,
pageSize: 100,
menuId: '',
pageNum: 1
},

View File

@ -37,7 +37,7 @@ export default {
pageModel: {
total: 10,
pageNum: 1,
pageSize: 10,
pageSize: 100,
},
}
},

View File

@ -97,7 +97,7 @@ export default {
],
pageModel: {
pageNum: 1,
pageSize: 20,
pageSize: 100,
departmentID: "",
Sequence: "",
SequenceName: "",

View File

@ -18,6 +18,10 @@
@radioChange="userRadioChange" :slotrow="true" :tableHeight="tableHeight" :tableData="tableData"
:tableColumn="tableColumn"
>
<template #state="{row}">
<div>{{ row.row.state == 1 ? '停用' : '启用' }}</div>
</template>
</base-table>
</div>
</base-layout>
@ -49,7 +53,7 @@
<script>
import router from '@/router'
import baseLayout from "@/components/base/baseNewLayout"
import baseLayout from '@/components/base/baseNewLayout'
import baseTable from '@/components/base/baseTable'
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
import baseForm from '@/components/base/baseNewForm/index.vue'
@ -108,7 +112,7 @@ export default {
],
pageModel: {
pageNum: 1,
pageSize: 20,
pageSize: 100,
organId: ''
},
defaultProps: {
@ -333,10 +337,10 @@ export default {
id: this.userRadioId,
kindId: 1
}
const res = await authApi('sysUserService', '', 'jurisdiction', '',params)
const res = await authApi('sysUserService', '', 'jurisdiction', '', params)
if (res.status == 200) {
const data = res.attribute
this.$refs.rightDialog.exhibitList(res.attribute.menvVoList,res.attribute,this.userRadioId)
this.$refs.rightDialog.exhibitList(res.attribute.menvVoList, res.attribute, this.userRadioId)
}
})
},

View File

@ -75,7 +75,7 @@ export default {
tableColumnData: configData.tableColumnData,
pageModel: {
pageNum: 1,
pageSize: 10,
pageSize: 100,
},
};
},

View File

@ -1,13 +1,11 @@
// 搜索配置
const searchModelJson = [
]
const searchModelJson = []
// 页面操作按钮配置
const fucDataJson = [{
name: '导出',
type: 'danger',
icon: 'el-icon-position'
},
name: '导出',
type: 'danger',
icon: 'el-icon-position'
}
]
// 表头配置
@ -15,270 +13,272 @@ const tableColumnJson = [
{
label: '所属部门',
prop: 'organName',
tooltip: true,
tooltip: true
},
{
label: '工号',
prop: 'personCode',
tooltip: true,
tooltip: true
},
{
label: '姓名',
prop: 'personName',
tooltip: true,
tooltip: true
},
{
label: '入职时间',
prop: 'entryTime',
tooltip: true,
tooltip: true
},
// {
// label: '离职时间',
// prop: 'number',
// tooltip: true
// },
// {
// label: '性别',
// prop: 'sex',
// tooltip: true
// },
// {
// label: '学历',
// prop: 'Degree',
// tooltip: true,
// },
// {
// label: '职务',
// prop: 'Post',
// tooltip: true,
// },
// {
// label: '级别 ',
// prop: 'illegalType',
// tooltip: true,
// },
// {
// label: '生日',
// prop: 'BirthDay',
// tooltip: true,
// },
{
label: '固定电话 ',
prop: 'telPhone',
tooltip: true
},
// {
// label: '籍贯 ',
// prop: 'areaCovered',
// tooltip: true,
// },
// {
// label: '身份证',
// prop: 'areaBuilding',
// tooltip: true,
// },
{
label: '电子邮箱',
prop: 'email',
tooltip: true
},
{
label: '出生年月',
prop: 'birthDay',
tooltip: true
},
{
label: '启用状态',
prop: 'state',
tooltip: true
},
// {
// label: '离职时间',
// prop: 'number',
// tooltip: true
// },
// {
// label: '性别',
// prop: 'sex',
// tooltip: true
// },
// {
// label: '学历',
// prop: 'Degree',
// tooltip: true,
// },
// {
// label: '职务',
// prop: 'Post',
// tooltip: true,
// },
// {
// label: '级别 ',
// prop: 'illegalType',
// tooltip: true,
// },
// {
// label: '生日',
// prop: 'BirthDay',
// tooltip: true,
// },
{
label: '固定电话 ',
prop: 'telPhone',
tooltip: true,
},
// {
// label: '籍贯 ',
// prop: 'areaCovered',
// tooltip: true,
// },
// {
// label: '身份证',
// prop: 'areaBuilding',
// tooltip: true,
// },
{
label: '电子邮箱',
prop: 'email',
tooltip: true,
},
{
label: '出生年月',
prop: 'birthDay',
tooltip: true,
},
]
// 详情页面结构JSON
const formRow = [{
elCol: [{
label: '工号',
prop: 'personCode',
tag: 'elInput',
},
{
label: '姓名',
prop: 'personName',
tag: 'elInput',
},
]
},
{
elCol: [{
label: '部门',
prop: 'organName',
tag: 'elDialog'
},
{
label: '手机号',
prop: 'mobilePhone',
tag: 'elInput',
rules:true,
rulesName:'phone'
},
]
},
{
elCol: [{
label: '性别',
prop: 'sex',
tag: 'elRadio',
options: [{
label: '男',
value: 1
},{
label: '女',
value: 0
}
]
},
{
label: '学历',
prop: '`degreeId`',
tag: 'elSelect',
options: []
},
]
},
{
elCol: [{
label: '职务',
prop: '`postId`',
tag: 'elSelect',
options: [
]
},
{
label: '级别',
prop: '`levelId`',
tag: 'elSelect',
options: [],
},
]
},
{
elCol: [{
label: '生日',
prop: 'birthDay',
tag: 'elDatePicker',
placeholder:'请点击选择',
// type:'date'
},{
label: '入职时间',
prop: '`entryTime`',
tag: 'elDatePicker',
placeholder:'请点击选择',
// type:'date'
}
]
},
{
elCol: [
{
label: '固定电话',
prop: '`telPhone`',
tag: 'elInput'
},
// {
// label: '身份证',
// prop: 'IdCard',
// tag: 'elInput'
// },
]
},
{
elCol: [{
label: '电子邮箱',
prop: 'email',
tag: 'elInput',
// rules:true,
// rulesName:'eMail'
},
]
},
{
elCol: [{
label: '备注',
prop: 'remark',
tag: 'elInput',
type: 'textarea',
span:24
}, ]
},
elCol: [{
label: '工号',
prop: 'personCode',
tag: 'elInput'
},
{
label: '姓名',
prop: 'personName',
tag: 'elInput'
}
]
},
{
elCol: [{
label: '部门',
prop: 'organName',
tag: 'elDialog'
},
{
label: '手机号',
prop: 'mobilePhone',
tag: 'elInput',
rules: true,
rulesName: 'phone'
}
]
},
{
elCol: [{
label: '性别',
prop: 'sex',
tag: 'elRadio',
options: [{
label: '男',
value: '1'
}, {
label: '女',
value: '0'
}
]
},
{
label: '学历',
prop: 'degreeId',
tag: 'elSelect',
options: []
}
]
},
{
elCol: [{
label: '职务',
prop: 'postId',
tag: 'elSelect',
options: []
},
{
label: '级别',
prop: 'levelId',
tag: 'elSelect',
options: []
}
]
},
{
elCol: [{
label: '生日',
prop: 'birthDay',
tag: 'elDatePicker',
placeholder: '请点击选择'
// type:'date'
}, {
label: '入职时间',
prop: 'entryTime',
tag: 'elDatePicker',
placeholder: '请点击选择'
// type:'date'
}
]
},
{
elCol: [
{
label: '固定电话',
prop: 'telPhone',
tag: 'elInput'
}
// {
// label: '身份证',
// prop: 'IdCard',
// tag: 'elInput'
// },
]
},
{
elCol: [{
label: '电子邮箱',
prop: 'email',
tag: 'elInput'
// rules:true,
// rulesName:'eMail'
}
]
},
{
elCol: [{
label: '备注',
prop: 'remark',
tag: 'elInput',
type: 'textarea',
span: 24
}]
}
]
const roleOptions = [{
label: '超级管理员',
value: 1
},
{
label: '业务员',
value: 2
},
{
label: '管理员',
value: 3
},
{
label: '开发成员',
value: 4
},
{
label: '项目经理',
value: 5
},
{
label: '实施人员',
value: 6
},
{
label: '财务',
value: 7
},
{
label: '总经理',
value: 8
},
{
label: '副总',
value: 9
}
label: '超级管理员',
value: 1
},
{
label: '业务员',
value: 2
},
{
label: '管理员',
value: 3
},
{
label: '开发成员',
value: 4
},
{
label: '项目经理',
value: 5
},
{
label: '实施人员',
value: 6
},
{
label: '财务',
value: 7
},
{
label: '总经理',
value: 8
},
{
label: '副总',
value: 9
}
]
const userRules = {
personCode: [{
required: true,
message: '请输入工号',
trigger: 'change'
}],
required: true,
message: '请输入工号',
trigger: 'change'
}],
personName: [{
required: true,
message: '请输入姓名',
trigger: 'change'
}],
required: true,
message: '请输入姓名',
trigger: 'change'
}],
organName: [{
required: true,
message: '请选择组织',
trigger: 'change'
}],
required: true,
message: '请选择组织',
trigger: 'change'
}],
mobilePhone: [{
required: true,
message: '请输入手机号码',
trigger: 'change'
}],
required: true,
message: '请输入手机号码',
trigger: 'change'
}],
sex: [{
required: true,
message: '请选择性别',
trigger: 'change'
}],
email: [{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }],
};
required: true,
message: '请选择性别',
trigger: 'change'
}]
// email: [{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }],
}
export default {
searchModelJson,
fucDataJson,
tableColumnJson,
formRow,
userRules
searchModelJson,
fucDataJson,
tableColumnJson,
formRow,
userRules
}

View File

@ -40,6 +40,9 @@
<template v-slot:p_BirthDay="{ row }">
<span>{{ row.row.p_BirthDay | timeDate }}</span>
</template>
<template #state="{row}">
<div>{{ row.row.state == 1 ? '停用' : '启用'}}</div>
</template>
</base-table>
</div>
</base-layout>

View File

@ -35,9 +35,9 @@
<el-radio label="1">停用</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="r_Description">
<el-form-item prop="description">
<span class="label" slot="label">描述</span>
<el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="ruleForm.r_Description">
<el-input type="textarea" :rows="4" placeholder="请输入内容" v-model="ruleForm.description">
</el-input>
</el-form-item>
</el-form>
@ -84,7 +84,7 @@ export default {
total: "",
pageModel: {
pageNum: 1,
pageSize: 20,
pageSize: 100,
roleCode: '',
roleName: ''
},

View File

@ -92,6 +92,7 @@ const personColumn = [
label: '是否用户分配',
prop: 'state',
tooltip: true,
width:150,
},
]
// 表头配置

View File

@ -19,7 +19,7 @@
:tableColumn="tableColumn"
>
<template #state="{row}">
<div>{{ row.row.state == 0 ? '启' : '停用' }}</div>
<div>{{ row.row.state == 0 ? '启' : '停用' }}</div>
</template>
</base-table>
</div>
@ -146,7 +146,7 @@ export default {
],
pageModel: {
pageNum: 1,
pageSize: 20,
pageSize: 100,
organId: ''
// SequenceName:'',
// Sequence:''