5.21修改所有已出现的bug和优化。
This commit is contained in:
parent
1eb2f79229
commit
b135c3dd79
|
@ -324,7 +324,7 @@ export default {
|
|||
pageModel: {
|
||||
total: 0,
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
},
|
||||
// 清除状态
|
||||
clearState: 0,
|
||||
|
|
|
@ -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]) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -5,13 +5,17 @@
|
|||
-->
|
||||
<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 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 {
|
||||
export default {
|
||||
props: {
|
||||
pageModel: {
|
||||
default: null
|
||||
|
@ -20,7 +24,8 @@
|
|||
data() {
|
||||
return {}
|
||||
},
|
||||
created() {},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
})
|
||||
|
@ -28,35 +33,38 @@
|
|||
computed: {},
|
||||
methods: {
|
||||
sizeChange(val) {
|
||||
let pageModel = this.pageModel;
|
||||
pageModel.pageSize = 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;
|
||||
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;
|
||||
}
|
||||
|
||||
::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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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" />
|
||||
@closeOpenWin="closeOpenWin" :fatherPath="fatherPath" :lastPath="lastPath" style="width: 200px"
|
||||
/>
|
||||
<!-- <children-app-sider
|
||||
v-if="isConciseMode"
|
||||
v-for="(route, index) in childrenList"
|
||||
|
@ -52,102 +58,103 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
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 {
|
||||
} 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";
|
||||
} from '@/api/apis/menuManage'
|
||||
import router from '@/router'
|
||||
import loginVue from '../../../views/login.vue'
|
||||
|
||||
export default {
|
||||
export default {
|
||||
components: {
|
||||
Logo,
|
||||
newsSider,
|
||||
childrenSider,
|
||||
newsSiderApp,
|
||||
childrenAppSider,
|
||||
childrenAppSider
|
||||
},
|
||||
computed: {
|
||||
...mapState(["settings", "sidebar"]),
|
||||
...mapGetters(["sidebarRouters", "sidebar"]),
|
||||
...mapState(['settings', 'sidebar']),
|
||||
...mapGetters(['sidebarRouters', 'sidebar']),
|
||||
activeMenu() {
|
||||
const route = this.$route;
|
||||
const route = this.$route
|
||||
const {
|
||||
meta,
|
||||
path
|
||||
} = route;
|
||||
} = route
|
||||
// if set path, the sidebar will highlight the path you set
|
||||
if (meta.activeMenu) {
|
||||
return meta.activeMenu;
|
||||
return meta.activeMenu
|
||||
}
|
||||
let pathUrl = path + "?id=" + meta.id;
|
||||
return path;
|
||||
let pathUrl = path + '?id=' + meta.id
|
||||
return path
|
||||
},
|
||||
showLogo() {
|
||||
return this.$store.state.settings.sidebarLogo;
|
||||
return this.$store.state.settings.sidebarLogo
|
||||
},
|
||||
conciseMenu() {
|
||||
return true;
|
||||
return true
|
||||
},
|
||||
variables() {
|
||||
return variables;
|
||||
return variables
|
||||
},
|
||||
isCollapse() {
|
||||
return !this.sidebar.opened;
|
||||
return !this.sidebar.opened
|
||||
},
|
||||
defaultTheme() {
|
||||
return this.$store.state.settings.theme;
|
||||
},
|
||||
return this.$store.state.settings.theme
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
defaultTheme: {
|
||||
handler: function (val, oldVal) {
|
||||
this.theme = val;
|
||||
this.changeBgColor(val);
|
||||
handler: function(val, oldVal) {
|
||||
this.theme = val
|
||||
this.changeBgColor(val)
|
||||
},
|
||||
immediate: true,
|
||||
immediate: true
|
||||
},
|
||||
conciseMenu: {
|
||||
handler: function (val, oldVal) {
|
||||
this.isConciseMode = val;
|
||||
handler: function(val, oldVal) {
|
||||
this.isConciseMode = val
|
||||
// this.changeBgColor(val);
|
||||
},
|
||||
immediate: true,
|
||||
immediate: true
|
||||
},
|
||||
sidebar: {
|
||||
handler: function (val, oldVal) {
|
||||
handler: function(val, oldVal) {
|
||||
if (val.opened) {
|
||||
this.state = "";
|
||||
this.state = ''
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
deep: true
|
||||
},
|
||||
siderBoxHeight: {
|
||||
immediate: true,
|
||||
handler() {
|
||||
this.handleResize();
|
||||
this.handleResize()
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
data() {
|
||||
return {
|
||||
childrenPadding: 0,
|
||||
childrenWidth: 0,
|
||||
childrenList: [],
|
||||
state: "",
|
||||
fatherPath: "",
|
||||
routePath: "",
|
||||
lastPath: "",
|
||||
state: '',
|
||||
fatherPath: '',
|
||||
routePath: '',
|
||||
lastPath: '',
|
||||
hoverType: false,
|
||||
firstNum: true,
|
||||
windowHeight: 0,
|
||||
|
@ -157,105 +164,105 @@
|
|||
valForm: {},
|
||||
isConciseMode: false,
|
||||
siderSHowType: false,
|
||||
menuList: [],
|
||||
menuList: []
|
||||
// clientHeight: document.body.clientHeight
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.GetMyCollectionData();
|
||||
this.siderBoxHeight = this.$refs.siderBox.offsetHeight;
|
||||
this.siderBoxHeight = this.$refs.siderBox.offsetHeight
|
||||
},
|
||||
methods: {
|
||||
handleResize() {
|
||||
// const siderBoxHeight = this.$refs.siderBox.offsetHeight;
|
||||
this.windowHeight = this.siderBoxHeight - 110;
|
||||
this.windowHeight = this.siderBoxHeight - 110
|
||||
},
|
||||
clearActive() {
|
||||
this.$refs.newsSiderRef.activeIndex = null;
|
||||
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];
|
||||
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;
|
||||
if (el.path.split('/')[1] == path.split('/')[1] && el.children) {
|
||||
this.childrenList = el.children
|
||||
this.$emit(
|
||||
"openChildren",
|
||||
'openChildren',
|
||||
this.childrenList.length > 0 ? true : false
|
||||
);
|
||||
)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
refreshSider() {
|
||||
this.GetMyCollectionData(true);
|
||||
this.GetMyCollectionData(true)
|
||||
},
|
||||
changeBgColor(val) {
|
||||
document
|
||||
.getElementsByTagName("body")[0]
|
||||
.style.setProperty("--bg-color", val);
|
||||
.getElementsByTagName('body')[0]
|
||||
.style.setProperty('--bg-color', val)
|
||||
},
|
||||
hoverChilden() {
|
||||
this.hoverType = true;
|
||||
this.firstNum = false;
|
||||
this.hoverType = true
|
||||
this.firstNum = false
|
||||
},
|
||||
openChildren(val) {
|
||||
this.valForm = val;
|
||||
this.getRoute();
|
||||
this.isSearch = false;
|
||||
this.state = "";
|
||||
if (val.id != "129") {
|
||||
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 = [];
|
||||
this.childrenWidth = 0
|
||||
this.childrenPadding = 0
|
||||
this.childrenList = []
|
||||
} else {
|
||||
const setCollect = (arr) => {
|
||||
arr.forEach((el) => {
|
||||
el.collect = false;
|
||||
this.matchMyCollection(el);
|
||||
el.collect = false
|
||||
this.matchMyCollection(el)
|
||||
if (el.children != null && el.children && el.children.length) {
|
||||
setCollect(el.children);
|
||||
setCollect(el.children)
|
||||
}
|
||||
});
|
||||
};
|
||||
setCollect(val.children);
|
||||
this.childrenList = val.children;
|
||||
})
|
||||
}
|
||||
setCollect(val.children)
|
||||
this.childrenList = val.children
|
||||
|
||||
this.fatherPath = val.path;
|
||||
this.fatherPath = val.path
|
||||
}
|
||||
} else {
|
||||
this.childrenList = val.children;
|
||||
this.childrenList = val.children
|
||||
}
|
||||
let menuList = [];
|
||||
let menuList = []
|
||||
|
||||
function changeMenuData(data, path) {
|
||||
data.forEach((el) => {
|
||||
let menuPath = path + "/" + el.path;
|
||||
let level = el.children ? 2 : 3;
|
||||
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,
|
||||
};
|
||||
hidden: el.hidden == 'true' ? true : false || false,
|
||||
level: level
|
||||
}
|
||||
// if(!arr.hidden){
|
||||
// }
|
||||
menuList.push(arr);
|
||||
menuList.push(arr)
|
||||
if (el.children && el.children.length > 0) {
|
||||
changeMenuData(el.children, menuPath);
|
||||
changeMenuData(el.children, menuPath)
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
changeMenuData(this.childrenList, this.fatherPath);
|
||||
this.menuList = menuList;
|
||||
this.changeWidth();
|
||||
changeMenuData(this.childrenList, this.fatherPath)
|
||||
this.menuList = menuList
|
||||
this.changeWidth()
|
||||
// let chilrenSum = 0
|
||||
// let notChildrenSum = 0
|
||||
|
||||
|
@ -282,58 +289,58 @@
|
|||
// this.childrenWidth = 0
|
||||
// this.childrenPadding = 0
|
||||
// }
|
||||
this.$store.dispatch("app/changeChildrenHide", true);
|
||||
this.$emit("openChildren", this.childrenList.length > 0 ? true : false);
|
||||
this.$store.dispatch('app/changeChildrenHide', true)
|
||||
this.$emit('openChildren', this.childrenList.length > 0 ? true : false)
|
||||
},
|
||||
changeWidth() {
|
||||
let secondNumber = 0;
|
||||
let thirdNumber = 0;
|
||||
let secondNumber = 0
|
||||
let thirdNumber = 0
|
||||
this.menuList.forEach((el) => {
|
||||
if (el.level == 2 && !el.hidden) {
|
||||
secondNumber = secondNumber + 1;
|
||||
secondNumber = secondNumber + 1
|
||||
} else if (el.level == 3 && !el.hidden) {
|
||||
thirdNumber = thirdNumber + 1;
|
||||
thirdNumber = thirdNumber + 1
|
||||
}
|
||||
});
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
let childrenHight = thirdNumber * 50 + secondNumber * 35;
|
||||
let windowHight = this.$refs.siderBox.offsetHeight - 51;
|
||||
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.childrenPadding = '20px '
|
||||
windowHight = windowHight - 40
|
||||
this.childrenWidth =
|
||||
(Math.floor(childrenHight / windowHight) + 1) * 320;
|
||||
(Math.floor(childrenHight / windowHight) + 1) * 320
|
||||
} else {
|
||||
this.childrenWidth = 0;
|
||||
this.childrenPadding = 0;
|
||||
this.childrenWidth = 0
|
||||
this.childrenPadding = 0
|
||||
}
|
||||
this.$emit("changeWidth", this.childrenWidth);
|
||||
});
|
||||
this.$emit('changeWidth', this.childrenWidth)
|
||||
})
|
||||
},
|
||||
// 获取收藏列表
|
||||
async GetMyCollectionData(collectType) {
|
||||
let res = await GetMyCollectionData({});
|
||||
let res = await GetMyCollectionData({})
|
||||
if (res.code == 1) {
|
||||
const putCollectData = (res) => {
|
||||
res.forEach((el) => {
|
||||
el.collect = true;
|
||||
el.collect = true
|
||||
if (el.children != null && el.children && el.children.length) {
|
||||
putCollectData(el.children);
|
||||
putCollectData(el.children)
|
||||
}
|
||||
});
|
||||
};
|
||||
putCollectData(res.data);
|
||||
})
|
||||
}
|
||||
putCollectData(res.data)
|
||||
|
||||
this.collectionsData = res.data;
|
||||
this.childrenList = [];
|
||||
this.collectionsData = res.data
|
||||
this.childrenList = []
|
||||
if (collectType) {
|
||||
setTimeout(() => {
|
||||
if (this.valForm.id != "129") {
|
||||
this.openChildren(this.valForm);
|
||||
if (this.valForm.id != '129') {
|
||||
this.openChildren(this.valForm)
|
||||
} else {
|
||||
this.openChildren(this.collectionsData[0]);
|
||||
this.openChildren(this.collectionsData[0])
|
||||
}
|
||||
}, 1);
|
||||
}, 1)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -342,122 +349,125 @@
|
|||
const isCollectData = (res) => {
|
||||
res.forEach((el) => {
|
||||
if (el.id === item.id) {
|
||||
item.collect = true;
|
||||
item.collect = true
|
||||
}
|
||||
if (el.children != null && el.children && el.children.length) {
|
||||
isCollectData(el.children);
|
||||
isCollectData(el.children)
|
||||
}
|
||||
});
|
||||
};
|
||||
isCollectData(this.collectionsData);
|
||||
})
|
||||
}
|
||||
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);
|
||||
this.$refs.newsSiderRef.activeIndex = null
|
||||
this.childrenWidth = 0
|
||||
this.childrenPadding = 0
|
||||
this.$store.dispatch('app/changeChildrenHide', false)
|
||||
}
|
||||
},
|
||||
routerClick() {
|
||||
this.isSearch = false;
|
||||
this.closeOpenWin();
|
||||
this.isSearch = false
|
||||
this.closeOpenWin()
|
||||
},
|
||||
createList(row) {
|
||||
let children = [];
|
||||
let children = []
|
||||
const parseList = (arr, centerPath) => {
|
||||
arr.forEach((el) => {
|
||||
let path;
|
||||
let path
|
||||
if (!centerPath) {
|
||||
path = this.fatherPath + "/" + el.path;
|
||||
path = this.fatherPath + '/' + el.path
|
||||
} else {
|
||||
path = this.fatherPath + "/" + centerPath + "/" + el.path;
|
||||
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);
|
||||
path: path
|
||||
}
|
||||
});
|
||||
};
|
||||
parseList(row);
|
||||
return children;
|
||||
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 = [];
|
||||
let children = []
|
||||
const restaurants = (arr, fatherPath) => {
|
||||
console.log(arr, 'arr')
|
||||
arr.forEach((el) => {
|
||||
let path = "";
|
||||
el.fullpath = fatherPath ? fatherPath + "/" + el.path : el.path;
|
||||
|
||||
let path = ''
|
||||
el.fullpath = fatherPath ? fatherPath + '/' + el.path : el.path
|
||||
console.log(el, 'el')
|
||||
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);
|
||||
value: el.meta ? el.meta.title : '',
|
||||
path: el.fullpath
|
||||
}
|
||||
});
|
||||
};
|
||||
restaurants(row);
|
||||
return children;
|
||||
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);
|
||||
this.isSearch = true
|
||||
var restaurants = this.getRestaurants(this.sidebarRouters)
|
||||
var results = queryString ?
|
||||
restaurants.filter(this.createFilter(queryString)) :
|
||||
restaurants;
|
||||
cb(results);
|
||||
restaurants
|
||||
console.log(results, 'results')
|
||||
cb(results)
|
||||
},
|
||||
|
||||
createFilter(queryString) {
|
||||
return (restaurant) => {
|
||||
return restaurant.value.toLowerCase().indexOf(queryString) !== -1;
|
||||
};
|
||||
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);
|
||||
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) {},
|
||||
},
|
||||
};
|
||||
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 {
|
||||
.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 {
|
||||
.el-tree-node:focus > .el-tree-node__content {
|
||||
color: white;
|
||||
background-color: $activeColor !important;
|
||||
}
|
||||
}
|
||||
|
||||
.el-tree-node.is-current>.el-tree-node__content {
|
||||
.el-tree-node.is-current > .el-tree-node__content {
|
||||
color: white;
|
||||
background-color: $activeColor !important;
|
||||
}
|
||||
}
|
||||
|
||||
.navbarSearch {
|
||||
.navbarSearch {
|
||||
// width: 200px !important;
|
||||
|
||||
::v-deep .el-input--medium .el-input__inner {
|
||||
|
@ -470,13 +480,13 @@
|
|||
color: #1890ff;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .sidebar-container {
|
||||
::v-deep .sidebar-container {
|
||||
z-index: 9000 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar_box {
|
||||
.sidebar_box {
|
||||
background-color: white;
|
||||
height: 98%;
|
||||
// padding: 26px 0;
|
||||
|
@ -486,6 +496,6 @@
|
|||
// padding: 0 30px 20px 30px;
|
||||
// width: calc(100% - 300px);
|
||||
transition: width 0.3s;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -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查看'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -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", []);
|
||||
|
|
|
@ -1,44 +1,44 @@
|
|||
import axios from "axios";
|
||||
import axios from 'axios'
|
||||
import {
|
||||
Notification,
|
||||
MessageBox,
|
||||
Message,
|
||||
Loading
|
||||
} from "element-ui";
|
||||
import store from "@/store";
|
||||
} from 'element-ui'
|
||||
import store from '@/store'
|
||||
import {
|
||||
getToken,
|
||||
setToken,
|
||||
removeCompanyId,
|
||||
removeToken,
|
||||
removeInfo,
|
||||
} from "@/utils/auth";
|
||||
import errorCode from "@/utils/errorCode";
|
||||
removeInfo
|
||||
} from '@/utils/auth'
|
||||
import errorCode from '@/utils/errorCode'
|
||||
import {
|
||||
tansParams,
|
||||
blobValidate
|
||||
} from "@/utils/ruoyi";
|
||||
} 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";
|
||||
} 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公共部分
|
||||
|
@ -46,8 +46,8 @@ const service = axios.create({
|
|||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
// baseURL: "http://192.168.2.240:8066/",
|
||||
// 超时
|
||||
timeout: 2 * 60 * 1000,
|
||||
});
|
||||
timeout: 2 * 60 * 1000
|
||||
})
|
||||
|
||||
// request拦截器
|
||||
service.interceptors.request.use(
|
||||
|
@ -56,13 +56,13 @@ service.interceptors.request.use(
|
|||
// config.headers['secretkey'] = 'aQ+b2wGj1LuhR8N2O0aOmKlkjgnOyHSlZ0QUtZMP3dHkVkAGhJe37KOdmpexsE6W' //本机密钥
|
||||
|
||||
// config.headers['secretkey'] = 'm/Ah8KQ6IfWEv85KEoaHKf4SfwtemYtGkiuBabkQCnOuJ/+nyvqBLOVheirHN1TO' //本机密钥
|
||||
config.headers["secretkey"] = configKey.secretkey;
|
||||
config.headers['secretkey'] = configKey.secretkey
|
||||
|
||||
// if (store.getters.token) {
|
||||
// if (window.localStorage.userToken) {
|
||||
let token = getToken();
|
||||
let token = getToken()
|
||||
if (token) {
|
||||
config.headers["token"] = token;
|
||||
config.headers['token'] = token
|
||||
}
|
||||
|
||||
if (config.url.indexOf('updateDto') != -1 || config.url.indexOf('saveDto') != -1) {
|
||||
|
@ -76,120 +76,136 @@ service.interceptors.request.use(
|
|||
}
|
||||
|
||||
// 生成请求的唯一标识符
|
||||
const requestIdentifier = `${config.url}-${config.method}`;
|
||||
const requestIdentifier = `${config.url}-${config.method}`
|
||||
// 判断是否已存在相同的请求
|
||||
const isDuplicateRequest = requests.includes(requestIdentifier);
|
||||
const isDuplicateRequest = requests.includes(requestIdentifier)
|
||||
// 如果存在相同请求,取消当前请求
|
||||
if (isDuplicateRequest) {
|
||||
// return Promise.reject(new Error("Duplicate request"));
|
||||
}
|
||||
// 将请求的唯一标识符添加到请求队列中
|
||||
requests.push(requestIdentifier);
|
||||
requests.push(requestIdentifier)
|
||||
// 设置计时器,在秒后移除请求的唯一标识符
|
||||
clearTimeout(timer);
|
||||
clearTimeout(timer)
|
||||
timer = setTimeout(() => {
|
||||
const index = requests.indexOf(requestIdentifier);
|
||||
const index = requests.indexOf(requestIdentifier)
|
||||
if (index !== -1) {
|
||||
requests.splice(index, 1); // 移除请求的唯一标识符
|
||||
requests.splice(index, 1) // 移除请求的唯一标识符
|
||||
}
|
||||
}, 2000);
|
||||
return config;
|
||||
}, 2000)
|
||||
return config
|
||||
},
|
||||
|
||||
(error) => {
|
||||
// do something with request error
|
||||
// 请求发生错误时清除唯一标识符
|
||||
const requestIdentifier = `${error.config.url}-${error.config.method}`;
|
||||
const index = requests.indexOf(requestIdentifier);
|
||||
const requestIdentifier = `${error.config.url}-${error.config.method}`
|
||||
const index = requests.indexOf(requestIdentifier)
|
||||
if (index !== -1) {
|
||||
requests.splice(index, 1); // 清除唯一标识符
|
||||
requests.splice(index, 1) // 清除唯一标识符
|
||||
}
|
||||
return Promise.reject(error);
|
||||
return Promise.reject(error)
|
||||
}
|
||||
);
|
||||
)
|
||||
|
||||
// 响应拦截器
|
||||
service.interceptors.response.use(
|
||||
(res) => {
|
||||
console.log(res, '相应拦截器拦截内容')
|
||||
// 请求完成时清除唯一标识符
|
||||
const requestIdentifier = `${res.config.url}-${res.config.method}`;
|
||||
const index = requests.indexOf(requestIdentifier);
|
||||
const requestIdentifier = `${res.config.url}-${res.config.method}`
|
||||
const index = requests.indexOf(requestIdentifier)
|
||||
if (index !== -1) {
|
||||
requests.splice(index, 1); // 清除唯一标识符
|
||||
requests.splice(index, 1) // 清除唯一标识符
|
||||
}
|
||||
// downloadLoadingAxios.close()
|
||||
// 未设置状态码则默认成功状态
|
||||
const code = res.data.status || '200';
|
||||
const code = res.data.status || '200'
|
||||
// 获取错误信息
|
||||
const msg = res.data.msg;
|
||||
closeLoading();
|
||||
const msg = res.data.msg
|
||||
closeLoading()
|
||||
// 二进制数据则直接返回
|
||||
if (
|
||||
res.request.responseType === "blob" ||
|
||||
res.request.responseType === "arraybuffer"
|
||||
res.request.responseType === 'blob' ||
|
||||
res.request.responseType === 'arraybuffer'
|
||||
) {
|
||||
return res.data;
|
||||
return res.data
|
||||
}
|
||||
|
||||
if (code === '500') {
|
||||
MessageBox.confirm(msg, "系统提示", {
|
||||
confirmButtonText: "确定",
|
||||
MessageBox.confirm(msg, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
showClose: false,
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
type: "error",
|
||||
type: 'error'
|
||||
})
|
||||
.then(() => {
|
||||
console.log(res, '相应拦截器拦截内容')
|
||||
if (msg === 'token无效') {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
route.replace({
|
||||
path: "/login"
|
||||
});;
|
||||
path: '/login'
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
if (res.config.headers.dj==='queryTreeById') {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
route.replace({
|
||||
path: '/login'
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
.catch(() => { });
|
||||
return Promise.reject(new Error(msg));
|
||||
.catch(() => {
|
||||
})
|
||||
return Promise.reject(new Error(msg))
|
||||
} else if (code == '1002') {
|
||||
|
||||
MessageBox.confirm(msg, "系统提示", {
|
||||
confirmButtonText: "确定",
|
||||
MessageBox.confirm(msg, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
showClose: false,
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
type: "error",
|
||||
type: 'error'
|
||||
})
|
||||
.then(() => {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
route.replace({
|
||||
path: "/login"
|
||||
});;
|
||||
path: '/login'
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {
|
||||
})
|
||||
} else if (code !== '200') {
|
||||
|
||||
MessageBox.confirm(msg, "系统提示", {
|
||||
confirmButtonText: "确定",
|
||||
MessageBox.confirm(msg, '系统提示', {
|
||||
confirmButtonText: '确定',
|
||||
showCancelButton: false,
|
||||
showClose: false,
|
||||
closeOnClickModal: false,
|
||||
closeOnPressEscape: false,
|
||||
type: "error",
|
||||
type: 'error'
|
||||
})
|
||||
.then(() => { })
|
||||
.catch(() => { });
|
||||
return Promise.reject("error");
|
||||
.then(() => {
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
return Promise.reject('error')
|
||||
} else {
|
||||
return res.data;
|
||||
return res.data
|
||||
}
|
||||
},
|
||||
(error) => {
|
||||
let response = error.response;
|
||||
closeLoading();
|
||||
let response = error.response
|
||||
closeLoading()
|
||||
// downloadLoadingAxios.close()
|
||||
// if (response.status == 401) {
|
||||
// if (response.data.code == 1002) {
|
||||
|
@ -251,48 +267,48 @@ service.interceptors.response.use(
|
|||
// .catch(() => {});
|
||||
// }
|
||||
|
||||
return Promise.reject(error);
|
||||
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)",
|
||||
});
|
||||
text: '正在下载数据,请稍候',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
return service
|
||||
.post(url, params, {
|
||||
transformRequest: [
|
||||
(params) => {
|
||||
return tansParams(params);
|
||||
},
|
||||
return tansParams(params)
|
||||
}
|
||||
],
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
responseType: "blob",
|
||||
...config,
|
||||
responseType: 'blob',
|
||||
...config
|
||||
})
|
||||
.then(async (data) => {
|
||||
const isLogin = await blobValidate(data);
|
||||
.then(async(data) => {
|
||||
const isLogin = await blobValidate(data)
|
||||
if (isLogin) {
|
||||
const blob = new Blob([data]);
|
||||
saveAs(blob, filename);
|
||||
const blob = new Blob([data])
|
||||
saveAs(blob, filename)
|
||||
} else {
|
||||
const resText = await data.text();
|
||||
const rspObj = JSON.parse(resText);
|
||||
const resText = await data.text()
|
||||
const rspObj = JSON.parse(resText)
|
||||
const errMsg =
|
||||
errorCode[rspObj.code] || rspObj.msg || errorCode["default"];
|
||||
Message.error(errMsg);
|
||||
errorCode[rspObj.code] || rspObj.msg || errorCode['default']
|
||||
Message.error(errMsg)
|
||||
}
|
||||
downloadLoadingInstance.close();
|
||||
downloadLoadingInstance.close()
|
||||
})
|
||||
.catch((r) => {
|
||||
Message.error("下载文件出现错误,请联系管理员!");
|
||||
downloadLoadingInstance.close();
|
||||
});
|
||||
Message.error('下载文件出现错误,请联系管理员!')
|
||||
downloadLoadingInstance.close()
|
||||
})
|
||||
}
|
||||
|
||||
export default service;
|
||||
export default service
|
||||
|
|
|
@ -99,7 +99,7 @@ export default {
|
|||
tableData: [], //表格数据
|
||||
pageModel: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
},
|
||||
queryModel: {
|
||||
code: "",
|
||||
|
|
|
@ -107,7 +107,7 @@ export default {
|
|||
tableData: [], //表格数据
|
||||
pageModel: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
},
|
||||
queryModel: {
|
||||
code: "",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -103,7 +103,7 @@ export default {
|
|||
tableData: [], //表格数据
|
||||
pageModel: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
},
|
||||
queryModel: {
|
||||
sourceCode: "", //数据源编码
|
||||
|
|
|
@ -102,7 +102,7 @@ export default {
|
|||
tableData: [], //表格数据
|
||||
pageModel: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
},
|
||||
queryModel: {
|
||||
theme: "", //消息主题
|
||||
|
|
|
@ -130,7 +130,7 @@ export default {
|
|||
tableData: [], //表格数据
|
||||
pageModel: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
},
|
||||
queryModel: {
|
||||
theme: "",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -242,7 +242,7 @@ export default {
|
|||
journalingType: this.journalingType,
|
||||
names: val,
|
||||
pageNum: this.pageModel.pageIndex,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
...obj,
|
||||
...this.tempObj,
|
||||
});
|
||||
|
|
|
@ -242,7 +242,7 @@ export default {
|
|||
journalingType: this.journalingType,
|
||||
names: val,
|
||||
pageNum: this.pageModel.pageIndex,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
...obj,
|
||||
...this.tempObj,
|
||||
});
|
||||
|
|
|
@ -285,6 +285,7 @@ export default {
|
|||
// }
|
||||
// })
|
||||
//主表处理
|
||||
console.log(res,'res')
|
||||
res.attribute.listList.forEach(item => {
|
||||
this.mainTableName = item.dbName
|
||||
item.ruleList.forEach(ele => {
|
||||
|
|
|
@ -252,7 +252,7 @@ export default {
|
|||
journalingType: this.journalingType,
|
||||
apiName: val,
|
||||
pageNum: this.pageModel.pageIndex,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
...obj,
|
||||
...this.tempObj,
|
||||
...this.apiBody,
|
||||
|
|
|
@ -245,7 +245,7 @@ export default {
|
|||
},
|
||||
{
|
||||
pageNum: index,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
...obj,
|
||||
}
|
||||
);
|
||||
|
|
|
@ -253,7 +253,7 @@ export default {
|
|||
journalingType: this.journalingType,
|
||||
names: val,
|
||||
pageNum: this.pageModel.pageIndex,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
...obj,
|
||||
...this.tempObj,
|
||||
...this.apiBody,
|
||||
|
|
|
@ -68,7 +68,7 @@ export default {
|
|||
label: '任务名称'
|
||||
},
|
||||
{
|
||||
prop: 'taskId',
|
||||
prop: 'taskCode',
|
||||
label: '任务编码'
|
||||
},
|
||||
{
|
||||
|
|
|
@ -280,7 +280,7 @@ export default {
|
|||
elCol: [
|
||||
{
|
||||
label: "运行次数",
|
||||
prop: "`runNum",
|
||||
prop: "runNum",
|
||||
tag: "elInput",
|
||||
disabled:true,
|
||||
},
|
||||
|
|
|
@ -67,7 +67,7 @@ export default {
|
|||
label: '任务名称'
|
||||
},
|
||||
{
|
||||
prop: 'taskId',
|
||||
prop: 'taskCode',
|
||||
label: '任务编码'
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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
|
||||
})
|
||||
|
|
|
@ -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')
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -253,7 +253,7 @@ export default {
|
|||
journalingType: this.journalingType,
|
||||
names: val,
|
||||
pageNum: this.pageModel.pageIndex,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
...obj,
|
||||
...this.tempObj,
|
||||
...this.apiBody,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -279,7 +279,7 @@ export default {
|
|||
journalingType: this.journalingType,
|
||||
names: val,
|
||||
pageNum: this.pageModel.pageIndex,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
}
|
||||
);
|
||||
this.selLoading = false;
|
||||
|
|
|
@ -216,7 +216,7 @@ export default {
|
|||
journalingType: this.journalingType,
|
||||
names: val,
|
||||
pageNum: this.pageModel.pageIndex,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
}
|
||||
);
|
||||
this.selLoading = false;
|
||||
|
|
|
@ -103,7 +103,7 @@ export default {
|
|||
menuData: [],
|
||||
formdata: {},
|
||||
pageModel: {
|
||||
pageSize: 20,
|
||||
pageSize: 100,
|
||||
menuId: '',
|
||||
pageNum: 1
|
||||
},
|
||||
|
|
|
@ -37,7 +37,7 @@ export default {
|
|||
pageModel: {
|
||||
total: 10,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
|
|
@ -97,7 +97,7 @@ export default {
|
|||
],
|
||||
pageModel: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 100,
|
||||
departmentID: "",
|
||||
Sequence: "",
|
||||
SequenceName: "",
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
@ -75,7 +75,7 @@ export default {
|
|||
tableColumnData: configData.tableColumnData,
|
||||
pageModel: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 100,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
// 搜索配置
|
||||
const searchModelJson = [
|
||||
|
||||
]
|
||||
const searchModelJson = []
|
||||
// 页面操作按钮配置
|
||||
const fucDataJson = [{
|
||||
name: '导出',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-position'
|
||||
},
|
||||
}
|
||||
|
||||
]
|
||||
// 表头配置
|
||||
|
@ -15,22 +13,22 @@ 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: '离职时间',
|
||||
|
@ -65,7 +63,7 @@ const tableColumnJson = [
|
|||
{
|
||||
label: '固定电话 ',
|
||||
prop: 'telPhone',
|
||||
tooltip: true,
|
||||
tooltip: true
|
||||
},
|
||||
// {
|
||||
// label: '籍贯 ',
|
||||
|
@ -80,12 +78,17 @@ const tableColumnJson = [
|
|||
{
|
||||
label: '电子邮箱',
|
||||
prop: 'email',
|
||||
tooltip: true,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
label: '出生年月',
|
||||
prop: 'birthDay',
|
||||
tooltip: true,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
label: '启用状态',
|
||||
prop: 'state',
|
||||
tooltip: true
|
||||
},
|
||||
|
||||
]
|
||||
|
@ -94,15 +97,15 @@ const formRow = [{
|
|||
elCol: [{
|
||||
label: '工号',
|
||||
prop: 'personCode',
|
||||
tag: 'elInput',
|
||||
tag: 'elInput'
|
||||
},
|
||||
{
|
||||
label: '姓名',
|
||||
prop: 'personName',
|
||||
tag: 'elInput',
|
||||
},
|
||||
tag: 'elInput'
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '部门',
|
||||
|
@ -113,9 +116,9 @@ const formRow = [{
|
|||
label: '手机号',
|
||||
prop: 'mobilePhone',
|
||||
tag: 'elInput',
|
||||
rules:true,
|
||||
rulesName:'phone'
|
||||
},
|
||||
rules: true,
|
||||
rulesName: 'phone'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -125,36 +128,34 @@ const formRow = [{
|
|||
tag: 'elRadio',
|
||||
options: [{
|
||||
label: '男',
|
||||
value: 1
|
||||
},{
|
||||
value: '1'
|
||||
}, {
|
||||
label: '女',
|
||||
value: 0
|
||||
value: '0'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '学历',
|
||||
prop: '`degreeId`',
|
||||
prop: 'degreeId',
|
||||
tag: 'elSelect',
|
||||
options: []
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
elCol: [{
|
||||
label: '职务',
|
||||
prop: '`postId`',
|
||||
prop: 'postId',
|
||||
tag: 'elSelect',
|
||||
options: [
|
||||
|
||||
]
|
||||
options: []
|
||||
},
|
||||
{
|
||||
label: '级别',
|
||||
prop: '`levelId`',
|
||||
prop: 'levelId',
|
||||
tag: 'elSelect',
|
||||
options: [],
|
||||
},
|
||||
options: []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -162,13 +163,13 @@ const formRow = [{
|
|||
label: '生日',
|
||||
prop: 'birthDay',
|
||||
tag: 'elDatePicker',
|
||||
placeholder:'请点击选择',
|
||||
placeholder: '请点击选择'
|
||||
// type:'date'
|
||||
},{
|
||||
}, {
|
||||
label: '入职时间',
|
||||
prop: '`entryTime`',
|
||||
prop: 'entryTime',
|
||||
tag: 'elDatePicker',
|
||||
placeholder:'请点击选择',
|
||||
placeholder: '请点击选择'
|
||||
// type:'date'
|
||||
}
|
||||
]
|
||||
|
@ -177,9 +178,9 @@ const formRow = [{
|
|||
elCol: [
|
||||
{
|
||||
label: '固定电话',
|
||||
prop: '`telPhone`',
|
||||
prop: 'telPhone',
|
||||
tag: 'elInput'
|
||||
},
|
||||
}
|
||||
// {
|
||||
// label: '身份证',
|
||||
// prop: 'IdCard',
|
||||
|
@ -191,10 +192,10 @@ const formRow = [{
|
|||
elCol: [{
|
||||
label: '电子邮箱',
|
||||
prop: 'email',
|
||||
tag: 'elInput',
|
||||
tag: 'elInput'
|
||||
// rules:true,
|
||||
// rulesName:'eMail'
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -203,16 +204,15 @@ const formRow = [{
|
|||
prop: 'remark',
|
||||
tag: 'elInput',
|
||||
type: 'textarea',
|
||||
span:24
|
||||
}, ]
|
||||
},
|
||||
|
||||
span: 24
|
||||
}]
|
||||
}
|
||||
|
||||
]
|
||||
const roleOptions = [{
|
||||
label: '超级管理员',
|
||||
value: 1
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '业务员',
|
||||
value: 2
|
||||
|
@ -271,9 +271,9 @@ const userRules = {
|
|||
required: true,
|
||||
message: '请选择性别',
|
||||
trigger: 'change'
|
||||
}],
|
||||
email: [{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }],
|
||||
};
|
||||
}]
|
||||
// email: [{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }],
|
||||
}
|
||||
|
||||
export default {
|
||||
searchModelJson,
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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: ''
|
||||
},
|
||||
|
|
|
@ -92,6 +92,7 @@ const personColumn = [
|
|||
label: '是否用户分配',
|
||||
prop: 'state',
|
||||
tooltip: true,
|
||||
width:150,
|
||||
},
|
||||
]
|
||||
// 表头配置
|
||||
|
|
|
@ -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:''
|
||||
|
|
Loading…
Reference in New Issue