5.21修改所有已出现的bug和优化。
This commit is contained in:
parent
1eb2f79229
commit
b135c3dd79
|
@ -324,7 +324,7 @@ export default {
|
||||||
pageModel: {
|
pageModel: {
|
||||||
total: 0,
|
total: 0,
|
||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
},
|
},
|
||||||
// 清除状态
|
// 清除状态
|
||||||
clearState: 0,
|
clearState: 0,
|
||||||
|
|
|
@ -410,7 +410,7 @@ export default {
|
||||||
pageModel: {
|
pageModel: {
|
||||||
total: 0,
|
total: 0,
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 20,
|
pageSize: 100,
|
||||||
},
|
},
|
||||||
// 清除状态
|
// 清除状态
|
||||||
clearState: 0,
|
clearState: 0,
|
||||||
|
@ -600,7 +600,7 @@ export default {
|
||||||
}
|
}
|
||||||
let page = {
|
let page = {
|
||||||
page: this.pageModel.page,
|
page: this.pageModel.page,
|
||||||
limit: this.pageModel.limit,
|
limit: this.pageModel.pageSize,
|
||||||
};
|
};
|
||||||
for (let i in this.model) {
|
for (let i in this.model) {
|
||||||
if (!this.model[i]) {
|
if (!this.model[i]) {
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<script>
|
<script>
|
||||||
import baseDialog from "@/components/base/BaseNewDialog/index.vue"
|
import baseDialog from "@/components/base/BaseNewDialog/index.vue"
|
||||||
import baseTree from "@/components/base/BaseMenuTree/index.vue"
|
import baseTree from "@/components/base/BaseMenuTree/index.vue"
|
||||||
import baseLayout from "@/components/base/baseLayout"
|
import baseLayout from "@/components/base/baseNewLayout"
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
baseLayout,
|
baseLayout,
|
||||||
|
|
|
@ -1,62 +1,70 @@
|
||||||
<!--
|
<!--
|
||||||
* @name: 自定义分页组件
|
* @name: 自定义分页组件
|
||||||
* @author: Zhangpengcheng
|
* @author: Zhangpengcheng
|
||||||
* @date: 2022-09-05
|
* @date: 2022-09-05
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="pageTion" flex="main:right">
|
<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"
|
<el-pagination ref="pagination" :page-sizes="[10,20, 30, 40,100]" :total="pageModel.total"
|
||||||
@current-change="currentChange" @size-change="sizeChange" background layout="prev, pager, next,jumper,total,sizes">
|
:current-page="pageModel.pageIndex"
|
||||||
</el-pagination>
|
:page-size="pageModel.pageSize"
|
||||||
</div>
|
@current-change="currentChange" @size-change="sizeChange" background
|
||||||
|
layout="prev, pager, next,jumper,total,sizes"
|
||||||
|
>
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
pageModel: {
|
pageModel: {
|
||||||
default: null
|
default: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
created() {},
|
created() {
|
||||||
mounted() {
|
},
|
||||||
this.$nextTick(() => {
|
mounted() {
|
||||||
})
|
this.$nextTick(() => {
|
||||||
},
|
})
|
||||||
computed: {},
|
},
|
||||||
methods: {
|
computed: {},
|
||||||
sizeChange(val) {
|
methods: {
|
||||||
let pageModel = this.pageModel;
|
sizeChange(val) {
|
||||||
pageModel.pageSize = val;
|
let pageModel = this.pageModel
|
||||||
this.$emit('update:pageModel', pageModel)
|
pageModel.pageSize = val
|
||||||
this.$emit('onPageChange')
|
this.$emit('update:pageModel', pageModel)
|
||||||
},
|
this.$emit('onPageChange')
|
||||||
currentChange(val) {
|
},
|
||||||
let pageModel = this.pageModel;
|
currentChange(val) {
|
||||||
pageModel.pageIndex = val;
|
let pageModel = this.pageModel
|
||||||
this.$emit('update:pageModel', pageModel)
|
pageModel.pageIndex = val
|
||||||
this.$emit('onPageChange')
|
this.$emit('update:pageModel', pageModel)
|
||||||
},
|
this.$emit('onPageChange')
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang='scss'>
|
<style scoped lang="scss">
|
||||||
.pageTion {
|
.pageTion {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-pager li {
|
::v-deep .el-pager li {
|
||||||
background-color: #f9f9f9 !important ;
|
background-color: #f9f9f9 !important;
|
||||||
width: 36px !important;
|
width: 36px !important;
|
||||||
height: 36px !important;
|
height: 36px !important;
|
||||||
line-height: 36px !important;
|
line-height: 36px !important;
|
||||||
border-radius: 50% !important;
|
border-radius: 50% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-pager .active {
|
::v-deep .el-pager .active {
|
||||||
background-color: #409EFF !important;
|
background-color: #409EFF !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-pagination button {
|
::v-deep .el-pagination button {
|
||||||
background-color: #f9f9f9 !important;
|
background-color: #f9f9f9 !important;
|
||||||
color: #333333 !important;
|
color: #333333 !important;
|
||||||
|
@ -65,13 +73,16 @@
|
||||||
width: 98px !important;
|
width: 98px !important;
|
||||||
height: 36px !important;
|
height: 36px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-pagination__total {
|
::v-deep .el-pagination__total {
|
||||||
line-height: 36px !important;
|
line-height: 36px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-pagination__jump {
|
::v-deep .el-pagination__jump {
|
||||||
height: 36px !important;
|
height: 36px !important;
|
||||||
line-height: 36px !important;
|
line-height: 36px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__inner {
|
::v-deep .el-input__inner {
|
||||||
height: 36px !important;
|
height: 36px !important;
|
||||||
line-height: 36px !important;
|
line-height: 36px !important;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<base-dialog :closeEscape="true" :showClose="true" :closeModal="false" @handleConfirmClick="personConfirmClick"
|
<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">
|
<div class="organizationBody">
|
||||||
<base-layout title="组织机构" style="width: 20%;border-radius: 5px;height: 350px;overflow: auto; "
|
<base-layout title="组织机构" style="width: 20%;border-radius: 5px;height: 350px;overflow: auto; "
|
||||||
:operateButtonSwitch="false" :bottonShow="false" :isPage="false" :mainColor="mainColor"
|
:operateButtonSwitch="false" :bottonShow="false" :isPage="false" :mainColor="mainColor"
|
||||||
|
@ -21,6 +21,9 @@
|
||||||
<base-table ref="personCustomtable" :border="true" :showIndex="false" :slotrow="true"
|
<base-table ref="personCustomtable" :border="true" :showIndex="false" :slotrow="true"
|
||||||
@radioChange="radioChange" :tabLoading.sync="personLoading" :tableHeight="personTableHeight"
|
@radioChange="radioChange" :tabLoading.sync="personLoading" :tableHeight="personTableHeight"
|
||||||
:tableData="personTableData" :tableColumn="tableColumn">
|
:tableData="personTableData" :tableColumn="tableColumn">
|
||||||
|
<template #state="{row}">
|
||||||
|
<div>{{ row.row.state == 1 ? '停用' : '启用'}}</div>
|
||||||
|
</template>
|
||||||
</base-table>
|
</base-table>
|
||||||
</div>
|
</div>
|
||||||
</base-layout>
|
</base-layout>
|
||||||
|
@ -32,7 +35,7 @@
|
||||||
import { authApi } from "@/api/apis/auth";
|
import { authApi } from "@/api/apis/auth";
|
||||||
import baseDialog from "@/components/base/BaseNewDialog/index.vue"
|
import baseDialog from "@/components/base/BaseNewDialog/index.vue"
|
||||||
import baseTree from "@/components/base/BaseMenuTree/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 baseTable from "@/components/base/baseTable"
|
||||||
import {
|
import {
|
||||||
PersonList
|
PersonList
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
settings.sideTheme === 'theme-dark'
|
settings.sideTheme === 'theme-dark'
|
||||||
? variables.menuBackground
|
? variables.menuBackground
|
||||||
: variables.menuLightBackground,
|
: variables.menuLightBackground,
|
||||||
}">
|
}"
|
||||||
|
>
|
||||||
<!-- <news-sider
|
<!-- <news-sider
|
||||||
v-if="!isConciseMode"
|
v-if="!isConciseMode"
|
||||||
:collectionsData="collectionsData"
|
:collectionsData="collectionsData"
|
||||||
|
@ -16,25 +17,30 @@
|
||||||
ref="newsSiderRef"
|
ref="newsSiderRef"
|
||||||
/> -->
|
/> -->
|
||||||
<news-sider-app :collectionsData="collectionsData" :sidebarRouters="sidebarRouters" @openChildren="openChildren"
|
<news-sider-app :collectionsData="collectionsData" :sidebarRouters="sidebarRouters" @openChildren="openChildren"
|
||||||
@closeWin="closeOpenWin" :routePath="routePath" ref="newsSiderRef" />
|
@closeWin="closeOpenWin" :routePath="routePath" ref="newsSiderRef"
|
||||||
|
/>
|
||||||
<!-- @mouseleave="closeOpenWin" -->
|
<!-- @mouseleave="closeOpenWin" -->
|
||||||
</div>
|
</div>
|
||||||
<!-- v-if="childrenList.length > 0 && sidebar.childrenHide" -->
|
<!-- v-if="childrenList.length > 0 && sidebar.childrenHide" -->
|
||||||
<div @mouseleave="closeOpenWin" class="sidebar_box"
|
<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 main:justify;" style="margin: 15px 0; justify-content: space-between; over-flow: auto">
|
||||||
<div flex="cross:center">
|
<div flex="cross:center">
|
||||||
<p>{{ childrenList }}</p>
|
<p>{{ childrenList }}</p>
|
||||||
<el-autocomplete v-model="state" placeholder="请输入内容" :fetch-suggestions="querySearch"
|
<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>
|
</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>
|
</div>
|
||||||
<div flex="dir:top" flex-wrap style="height: calc(100% - 70px)">
|
<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"
|
<children-sider ref="childrenSider" v-for="(route, index) in menuList" :key="route.path + index" :item="route"
|
||||||
@refreshSider="refreshSider" @openChildren="openChildren" @clearActive="clearActive"
|
@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
|
<!-- <children-app-sider
|
||||||
v-if="isConciseMode"
|
v-if="isConciseMode"
|
||||||
v-for="(route, index) in childrenList"
|
v-for="(route, index) in childrenList"
|
||||||
|
@ -52,440 +58,444 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
mapGetters,
|
mapGetters,
|
||||||
mapState
|
mapState
|
||||||
} from "vuex";
|
} from 'vuex'
|
||||||
import Logo from "./Logo";
|
import Logo from './Logo'
|
||||||
import newsSider from "./newsSider";
|
import newsSider from './newsSider'
|
||||||
import childrenSider from "./childrenSider";
|
import childrenSider from './childrenSider'
|
||||||
import newsSiderApp from "./newsSiderApp";
|
import newsSiderApp from './newsSiderApp'
|
||||||
import childrenAppSider from "./childrenAppSider";
|
import childrenAppSider from './childrenAppSider'
|
||||||
import variables from "@/assets/styles/variables.scss";
|
import variables from '@/assets/styles/variables.scss'
|
||||||
import {
|
import {
|
||||||
GetMyCollectionData
|
GetMyCollectionData
|
||||||
} from "@/api/apis/menuManage";
|
} from '@/api/apis/menuManage'
|
||||||
import router from "@/router";
|
import router from '@/router'
|
||||||
import loginVue from "../../../views/login.vue";
|
import loginVue from '../../../views/login.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Logo,
|
Logo,
|
||||||
newsSider,
|
newsSider,
|
||||||
childrenSider,
|
childrenSider,
|
||||||
newsSiderApp,
|
newsSiderApp,
|
||||||
childrenAppSider,
|
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: {
|
showLogo() {
|
||||||
...mapState(["settings", "sidebar"]),
|
return this.$store.state.settings.sidebarLogo
|
||||||
...mapGetters(["sidebarRouters", "sidebar"]),
|
},
|
||||||
activeMenu() {
|
conciseMenu() {
|
||||||
const route = this.$route;
|
return true
|
||||||
const {
|
},
|
||||||
meta,
|
variables() {
|
||||||
path
|
return variables
|
||||||
} = route;
|
},
|
||||||
// if set path, the sidebar will highlight the path you set
|
isCollapse() {
|
||||||
if (meta.activeMenu) {
|
return !this.sidebar.opened
|
||||||
return meta.activeMenu;
|
},
|
||||||
|
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: {
|
siderBoxHeight: {
|
||||||
defaultTheme: {
|
immediate: true,
|
||||||
handler: function (val, oldVal) {
|
handler() {
|
||||||
this.theme = val;
|
this.handleResize()
|
||||||
this.changeBgColor(val);
|
}
|
||||||
},
|
}
|
||||||
immediate: true,
|
},
|
||||||
},
|
created() {
|
||||||
conciseMenu: {
|
},
|
||||||
handler: function (val, oldVal) {
|
data() {
|
||||||
this.isConciseMode = val;
|
return {
|
||||||
// this.changeBgColor(val);
|
childrenPadding: 0,
|
||||||
},
|
childrenWidth: 0,
|
||||||
immediate: true,
|
childrenList: [],
|
||||||
},
|
state: '',
|
||||||
sidebar: {
|
fatherPath: '',
|
||||||
handler: function (val, oldVal) {
|
routePath: '',
|
||||||
if (val.opened) {
|
lastPath: '',
|
||||||
this.state = "";
|
hoverType: false,
|
||||||
}
|
firstNum: true,
|
||||||
},
|
windowHeight: 0,
|
||||||
deep: true,
|
siderBoxHeight: null,
|
||||||
},
|
isSearch: false,
|
||||||
siderBoxHeight: {
|
collectionsData: [], //已收藏菜单
|
||||||
immediate: true,
|
valForm: {},
|
||||||
handler() {
|
isConciseMode: false,
|
||||||
this.handleResize();
|
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() {},
|
clearActive() {
|
||||||
data() {
|
this.$refs.newsSiderRef.activeIndex = null
|
||||||
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() {
|
getRoute() {
|
||||||
// this.GetMyCollectionData();
|
this.$store.dispatch('app/changeChildrenHide')
|
||||||
this.siderBoxHeight = this.$refs.siderBox.offsetHeight;
|
let path = this.$route.path
|
||||||
},
|
this.routePath = '/' + path.split('/')[1]
|
||||||
methods: {
|
this.fatherPath = this.routePath
|
||||||
handleResize() {
|
this.lastPath = path.split('/')[path.split('/').length - 1]
|
||||||
// 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];
|
|
||||||
|
|
||||||
this.sidebarRouters.forEach((el) => {
|
this.sidebarRouters.forEach((el) => {
|
||||||
if (el.path.split("/")[1] == path.split("/")[1] && el.children) {
|
if (el.path.split('/')[1] == path.split('/')[1] && el.children) {
|
||||||
this.childrenList = el.children;
|
this.childrenList = el.children
|
||||||
this.$emit(
|
this.$emit(
|
||||||
"openChildren",
|
'openChildren',
|
||||||
this.childrenList.length > 0 ? true : false
|
this.childrenList.length > 0 ? true : false
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
refreshSider() {
|
refreshSider() {
|
||||||
this.GetMyCollectionData(true);
|
this.GetMyCollectionData(true)
|
||||||
},
|
},
|
||||||
changeBgColor(val) {
|
changeBgColor(val) {
|
||||||
document
|
document
|
||||||
.getElementsByTagName("body")[0]
|
.getElementsByTagName('body')[0]
|
||||||
.style.setProperty("--bg-color", val);
|
.style.setProperty('--bg-color', val)
|
||||||
},
|
},
|
||||||
hoverChilden() {
|
hoverChilden() {
|
||||||
this.hoverType = true;
|
this.hoverType = true
|
||||||
this.firstNum = false;
|
this.firstNum = false
|
||||||
},
|
},
|
||||||
openChildren(val) {
|
openChildren(val) {
|
||||||
this.valForm = val;
|
this.valForm = val
|
||||||
this.getRoute();
|
this.getRoute()
|
||||||
this.isSearch = false;
|
this.isSearch = false
|
||||||
this.state = "";
|
this.state = ''
|
||||||
if (val.id != "129") {
|
if (val.id != '129') {
|
||||||
if (!val.children) {
|
if (!val.children) {
|
||||||
this.childrenWidth = 0;
|
this.childrenWidth = 0
|
||||||
this.childrenPadding = 0;
|
this.childrenPadding = 0
|
||||||
this.childrenList = [];
|
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;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.childrenList = val.children;
|
const setCollect = (arr) => {
|
||||||
}
|
arr.forEach((el) => {
|
||||||
let menuList = [];
|
el.collect = false
|
||||||
|
this.matchMyCollection(el)
|
||||||
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;
|
|
||||||
if (el.children != null && el.children && el.children.length) {
|
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
|
||||||
}
|
}
|
||||||
},
|
} else {
|
||||||
// 匹配 是否已收藏
|
this.childrenList = val.children
|
||||||
matchMyCollection(item) {
|
}
|
||||||
const isCollectData = (res) => {
|
let menuList = []
|
||||||
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;
|
|
||||||
|
|
||||||
let arr = {
|
function changeMenuData(data, path) {
|
||||||
value: el.meta.title,
|
data.forEach((el) => {
|
||||||
path: el.fullpath,
|
let menuPath = path + '/' + el.path
|
||||||
};
|
let level = el.children ? 2 : 3
|
||||||
children.push(arr);
|
let arr = {
|
||||||
if (el.children != null && el.children && el.children.length) {
|
collect: el.collect,
|
||||||
restaurants(el.children, el.fullpath);
|
meta: el.meta,
|
||||||
}
|
name: el.name,
|
||||||
});
|
path: menuPath,
|
||||||
};
|
hidden: el.hidden == 'true' ? true : false || false,
|
||||||
restaurants(row);
|
level: level
|
||||||
return children;
|
}
|
||||||
},
|
// if(!arr.hidden){
|
||||||
querySearch(queryString, cb) {
|
// }
|
||||||
this.isSearch = true;
|
menuList.push(arr)
|
||||||
var restaurants = this.getRestaurants(this.sidebarRouters);
|
if (el.children && el.children.length > 0) {
|
||||||
var results = queryString ?
|
changeMenuData(el.children, menuPath)
|
||||||
restaurants.filter(this.createFilter(queryString)) :
|
}
|
||||||
restaurants;
|
})
|
||||||
cb(results);
|
}
|
||||||
},
|
|
||||||
|
|
||||||
createFilter(queryString) {
|
changeMenuData(this.childrenList, this.fatherPath)
|
||||||
return (restaurant) => {
|
this.menuList = menuList
|
||||||
return restaurant.value.toLowerCase().indexOf(queryString) !== -1;
|
this.changeWidth()
|
||||||
};
|
// let chilrenSum = 0
|
||||||
},
|
// let notChildrenSum = 0
|
||||||
handleSelect(item) {
|
|
||||||
|
|
||||||
let routeData = this.$router.resolve({
|
// function getWidth(data) {
|
||||||
path: item.path,
|
// data.forEach(el => {
|
||||||
});
|
// if (!el.children) {
|
||||||
window.open(routeData.href, "_self");
|
// notChildrenSum = notChildrenSum + 1
|
||||||
this.routerClick();
|
// }
|
||||||
this.$refs.newsSiderRef.activeIndex = null;
|
// if (el.children && el.children.length > 0) {
|
||||||
this.childrenPadding = 0;
|
// // chilrenSum = chilrenSum + 1
|
||||||
this.$store.dispatch("app/changeChildrenHide", false);
|
// getWidth(el.children)
|
||||||
},
|
// }
|
||||||
collectClick(item) {},
|
// })
|
||||||
|
// }
|
||||||
|
// 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>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
$activeColor: var(--bg-color, "#00aaff");
|
$activeColor: var(--bg-color, "#00aaff");
|
||||||
|
|
||||||
.el-tree-node__content:hover,
|
.el-tree-node__content:hover,
|
||||||
.el-upload-list__item:hover {
|
.el-upload-list__item:hover {
|
||||||
// color: white;
|
// color: white;
|
||||||
// background-color: $activeColor !important;
|
// background-color: $activeColor !important;
|
||||||
background-color: #ecf5ff !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 {
|
::v-deep .el-input__suffix {
|
||||||
color: white;
|
color: #1890ff;
|
||||||
background-color: $activeColor !important;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.el-tree-node.is-current>.el-tree-node__content {
|
::v-deep .sidebar-container {
|
||||||
color: white;
|
z-index: 9000 !important;
|
||||||
background-color: $activeColor !important;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.navbarSearch {
|
.sidebar_box {
|
||||||
// width: 200px !important;
|
background-color: white;
|
||||||
|
height: 98%;
|
||||||
::v-deep .el-input--medium .el-input__inner {
|
// padding: 26px 0;
|
||||||
border: 1px solid #bbbbbb;
|
// border-left: 4px solid #eef0f3;
|
||||||
border-radius: 15px;
|
// max-width: 500px;
|
||||||
background-color: transparent;
|
// min-width: 800px;
|
||||||
}
|
// padding: 0 30px 20px 30px;
|
||||||
|
// width: calc(100% - 300px);
|
||||||
::v-deep .el-input__suffix {
|
transition: width 0.3s;
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -29,7 +29,6 @@ const permission = {
|
||||||
name: 'applicationEdit',
|
name: 'applicationEdit',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: '应用编辑',
|
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -39,7 +38,6 @@ const permission = {
|
||||||
name: 'exploit',
|
name: 'exploit',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: '开发管理',
|
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -49,7 +47,6 @@ const permission = {
|
||||||
name: 'authority',
|
name: 'authority',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: '权限管理',
|
|
||||||
hidden: true
|
hidden: true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -59,7 +56,6 @@ const permission = {
|
||||||
name: 'appApiAdmin',
|
name: 'appApiAdmin',
|
||||||
component: () => import('@/views/applicationList/apiList/apiAdmin'),
|
component: () => import('@/views/applicationList/apiList/apiAdmin'),
|
||||||
meta: {
|
meta: {
|
||||||
title: 'API管理',
|
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -68,7 +64,6 @@ const permission = {
|
||||||
name: 'inserterAdmin',
|
name: 'inserterAdmin',
|
||||||
component: () => import('@/views/applicationList/inserterAdmin'),
|
component: () => import('@/views/applicationList/inserterAdmin'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '插件管理',
|
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -79,7 +74,6 @@ const permission = {
|
||||||
hidden: 'true',
|
hidden: 'true',
|
||||||
component: () => import('@/views/applicationList/apiList/apiAdd'),
|
component: () => import('@/views/applicationList/apiList/apiAdd'),
|
||||||
meta: {
|
meta: {
|
||||||
title: 'API新增'
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -89,7 +83,6 @@ const permission = {
|
||||||
hidden: 'true',
|
hidden: 'true',
|
||||||
component: () => import('@/views/applicationList/apiList/apiView'),
|
component: () => import('@/views/applicationList/apiList/apiView'),
|
||||||
meta: {
|
meta: {
|
||||||
title: 'API查看'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -64,7 +64,11 @@ const user = {
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
console.log(123)
|
||||||
|
//
|
||||||
|
commit("LogOut")
|
||||||
reject(error);
|
reject(error);
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -98,6 +102,7 @@ const user = {
|
||||||
|
|
||||||
// 退出系统
|
// 退出系统
|
||||||
LogOut({ commit, state }) {
|
LogOut({ commit, state }) {
|
||||||
|
console.log("触发推出")
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
commit("SET_TOKEN", "");
|
commit("SET_TOKEN", "");
|
||||||
commit("SET_ROLES", []);
|
commit("SET_ROLES", []);
|
||||||
|
|
|
@ -1,298 +1,314 @@
|
||||||
import axios from "axios";
|
import axios from 'axios'
|
||||||
import {
|
import {
|
||||||
Notification,
|
Notification,
|
||||||
MessageBox,
|
MessageBox,
|
||||||
Message,
|
Message,
|
||||||
Loading
|
Loading
|
||||||
} from "element-ui";
|
} from 'element-ui'
|
||||||
import store from "@/store";
|
import store from '@/store'
|
||||||
import {
|
import {
|
||||||
getToken,
|
getToken,
|
||||||
setToken,
|
setToken,
|
||||||
removeCompanyId,
|
removeCompanyId,
|
||||||
removeToken,
|
removeToken,
|
||||||
removeInfo,
|
removeInfo
|
||||||
} from "@/utils/auth";
|
} from '@/utils/auth'
|
||||||
import errorCode from "@/utils/errorCode";
|
import errorCode from '@/utils/errorCode'
|
||||||
import {
|
import {
|
||||||
tansParams,
|
tansParams,
|
||||||
blobValidate
|
blobValidate
|
||||||
} from "@/utils/ruoyi";
|
} from '@/utils/ruoyi'
|
||||||
import { closeLoading, openLoading } from '@/utils/loading'
|
import { closeLoading, openLoading } from '@/utils/loading'
|
||||||
import cache from "@/plugins/cache";
|
import cache from '@/plugins/cache'
|
||||||
import {
|
import {
|
||||||
saveAs
|
saveAs
|
||||||
} from "file-saver";
|
} from 'file-saver'
|
||||||
import route from "../router/index";
|
import route from '../router/index'
|
||||||
|
|
||||||
// import configKey from '@/assets/js/configKey.js'
|
// import configKey from '@/assets/js/configKey.js'
|
||||||
let downloadLoadingInstance;
|
let downloadLoadingInstance
|
||||||
let downloadLoadingAxios;
|
let downloadLoadingAxios
|
||||||
// 是否显示重新登录
|
// 是否显示重新登录
|
||||||
export let isRelogin = {
|
export let isRelogin = {
|
||||||
show: false,
|
show: false
|
||||||
};
|
}
|
||||||
let timer = null;
|
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实例
|
// 创建axios实例
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||||
// baseURL:configKey.urlType?configKey.baseURL:process.env.VUE_APP_BASE_API,
|
// baseURL:configKey.urlType?configKey.baseURL:process.env.VUE_APP_BASE_API,
|
||||||
baseURL: process.env.VUE_APP_BASE_API,
|
baseURL: process.env.VUE_APP_BASE_API,
|
||||||
// baseURL: "http://192.168.2.240:8066/",
|
// baseURL: "http://192.168.2.240:8066/",
|
||||||
// 超时
|
// 超时
|
||||||
timeout: 2 * 60 * 1000,
|
timeout: 2 * 60 * 1000
|
||||||
});
|
})
|
||||||
|
|
||||||
// request拦截器
|
// request拦截器
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
(config) => {
|
(config) => {
|
||||||
// do something bedocument.getElementById("")fore request is sent
|
// do something bedocument.getElementById("")fore request is sent
|
||||||
// config.headers['secretkey'] = 'aQ+b2wGj1LuhR8N2O0aOmKlkjgnOyHSlZ0QUtZMP3dHkVkAGhJe37KOdmpexsE6W' //本机密钥
|
// config.headers['secretkey'] = 'aQ+b2wGj1LuhR8N2O0aOmKlkjgnOyHSlZ0QUtZMP3dHkVkAGhJe37KOdmpexsE6W' //本机密钥
|
||||||
|
|
||||||
// config.headers['secretkey'] = 'm/Ah8KQ6IfWEv85KEoaHKf4SfwtemYtGkiuBabkQCnOuJ/+nyvqBLOVheirHN1TO' //本机密钥
|
// config.headers['secretkey'] = 'm/Ah8KQ6IfWEv85KEoaHKf4SfwtemYtGkiuBabkQCnOuJ/+nyvqBLOVheirHN1TO' //本机密钥
|
||||||
config.headers["secretkey"] = configKey.secretkey;
|
config.headers['secretkey'] = configKey.secretkey
|
||||||
|
|
||||||
// if (store.getters.token) {
|
// if (store.getters.token) {
|
||||||
// if (window.localStorage.userToken) {
|
// if (window.localStorage.userToken) {
|
||||||
let token = getToken();
|
let token = getToken()
|
||||||
if (token) {
|
if (token) {
|
||||||
config.headers["token"] = token;
|
config.headers['token'] = token
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.url.indexOf('updateDto') != -1 || config.url.indexOf('saveDto') != -1) {
|
if (config.url.indexOf('updateDto') != -1 || config.url.indexOf('saveDto') != -1) {
|
||||||
openLoading('submit')
|
openLoading('submit')
|
||||||
} else if (config.url.indexOf('getById') != -1) {
|
} else if (config.url.indexOf('getById') != -1) {
|
||||||
openLoading('detail')
|
openLoading('detail')
|
||||||
} else if (config.url.indexOf('deleteById') != -1) {
|
} else if (config.url.indexOf('deleteById') != -1) {
|
||||||
openLoading('del')
|
openLoading('del')
|
||||||
} else if (config.url.indexOf('changerState') != -1) {
|
} else if (config.url.indexOf('changerState') != -1) {
|
||||||
openLoading('submit')
|
openLoading('submit')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成请求的唯一标识符
|
// 生成请求的唯一标识符
|
||||||
const requestIdentifier = `${config.url}-${config.method}`;
|
const requestIdentifier = `${config.url}-${config.method}`
|
||||||
// 判断是否已存在相同的请求
|
// 判断是否已存在相同的请求
|
||||||
const isDuplicateRequest = requests.includes(requestIdentifier);
|
const isDuplicateRequest = requests.includes(requestIdentifier)
|
||||||
// 如果存在相同请求,取消当前请求
|
// 如果存在相同请求,取消当前请求
|
||||||
if (isDuplicateRequest) {
|
if (isDuplicateRequest) {
|
||||||
// return Promise.reject(new Error("Duplicate request"));
|
// return Promise.reject(new Error("Duplicate request"));
|
||||||
}
|
}
|
||||||
// 将请求的唯一标识符添加到请求队列中
|
// 将请求的唯一标识符添加到请求队列中
|
||||||
requests.push(requestIdentifier);
|
requests.push(requestIdentifier)
|
||||||
// 设置计时器,在秒后移除请求的唯一标识符
|
// 设置计时器,在秒后移除请求的唯一标识符
|
||||||
clearTimeout(timer);
|
clearTimeout(timer)
|
||||||
timer = setTimeout(() => {
|
timer = setTimeout(() => {
|
||||||
const index = requests.indexOf(requestIdentifier);
|
const index = requests.indexOf(requestIdentifier)
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
requests.splice(index, 1); // 移除请求的唯一标识符
|
requests.splice(index, 1) // 移除请求的唯一标识符
|
||||||
}
|
}
|
||||||
}, 2000);
|
}, 2000)
|
||||||
return config;
|
return config
|
||||||
},
|
},
|
||||||
|
|
||||||
(error) => {
|
(error) => {
|
||||||
// do something with request error
|
// do something with request error
|
||||||
// 请求发生错误时清除唯一标识符
|
// 请求发生错误时清除唯一标识符
|
||||||
const requestIdentifier = `${error.config.url}-${error.config.method}`;
|
const requestIdentifier = `${error.config.url}-${error.config.method}`
|
||||||
const index = requests.indexOf(requestIdentifier);
|
const index = requests.indexOf(requestIdentifier)
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
requests.splice(index, 1); // 清除唯一标识符
|
requests.splice(index, 1) // 清除唯一标识符
|
||||||
}
|
}
|
||||||
return Promise.reject(error);
|
return Promise.reject(error)
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
|
|
||||||
// 响应拦截器
|
// 响应拦截器
|
||||||
service.interceptors.response.use(
|
service.interceptors.response.use(
|
||||||
(res) => {
|
(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}`
|
||||||
if (index !== -1) {
|
const index = requests.indexOf(requestIdentifier)
|
||||||
requests.splice(index, 1); // 清除唯一标识符
|
if (index !== -1) {
|
||||||
}
|
requests.splice(index, 1) // 清除唯一标识符
|
||||||
// downloadLoadingAxios.close()
|
}
|
||||||
// 未设置状态码则默认成功状态
|
// 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" ||
|
if (
|
||||||
res.request.responseType === "arraybuffer"
|
res.request.responseType === 'blob' ||
|
||||||
) {
|
res.request.responseType === 'arraybuffer'
|
||||||
return res.data;
|
) {
|
||||||
}
|
return res.data
|
||||||
|
}
|
||||||
|
|
||||||
if (code === '500') {
|
if (code === '500') {
|
||||||
MessageBox.confirm(msg, "系统提示", {
|
MessageBox.confirm(msg, '系统提示', {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: '确定',
|
||||||
showCancelButton: false,
|
showCancelButton: false,
|
||||||
showClose: false,
|
showClose: false,
|
||||||
closeOnClickModal: false,
|
closeOnClickModal: false,
|
||||||
closeOnPressEscape: false,
|
closeOnPressEscape: false,
|
||||||
type: "error",
|
type: 'error'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (msg === 'token无效') {
|
console.log(res, '相应拦截器拦截内容')
|
||||||
store.dispatch('LogOut').then(() => {
|
if (msg === 'token无效') {
|
||||||
route.replace({
|
store.dispatch('LogOut').then(() => {
|
||||||
path: "/login"
|
route.replace({
|
||||||
});;
|
path: '/login'
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
}
|
||||||
return Promise.reject(new Error(msg));
|
if (res.config.headers.dj==='queryTreeById') {
|
||||||
} else if (code == '1002') {
|
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: "确定",
|
.catch(() => {
|
||||||
showCancelButton: false,
|
})
|
||||||
showClose: false,
|
return Promise.reject(new Error(msg))
|
||||||
closeOnClickModal: false,
|
} else if (code == '1002') {
|
||||||
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);
|
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) {
|
export function download(url, params, filename, config) {
|
||||||
downloadLoadingInstance = Loading.service({
|
downloadLoadingInstance = Loading.service({
|
||||||
text: "正在下载数据,请稍候",
|
text: '正在下载数据,请稍候',
|
||||||
spinner: "el-icon-loading",
|
spinner: 'el-icon-loading',
|
||||||
background: "rgba(0, 0, 0, 0.7)",
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
});
|
})
|
||||||
return service
|
return service
|
||||||
.post(url, params, {
|
.post(url, params, {
|
||||||
transformRequest: [
|
transformRequest: [
|
||||||
(params) => {
|
(params) => {
|
||||||
return tansParams(params);
|
return tansParams(params)
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
responseType: "blob",
|
responseType: 'blob',
|
||||||
...config,
|
...config
|
||||||
})
|
})
|
||||||
.then(async (data) => {
|
.then(async(data) => {
|
||||||
const isLogin = await blobValidate(data);
|
const isLogin = await blobValidate(data)
|
||||||
if (isLogin) {
|
if (isLogin) {
|
||||||
const blob = new Blob([data]);
|
const blob = new Blob([data])
|
||||||
saveAs(blob, filename);
|
saveAs(blob, filename)
|
||||||
} else {
|
} else {
|
||||||
const resText = await data.text();
|
const resText = await data.text()
|
||||||
const rspObj = JSON.parse(resText);
|
const rspObj = JSON.parse(resText)
|
||||||
const errMsg =
|
const errMsg =
|
||||||
errorCode[rspObj.code] || rspObj.msg || errorCode["default"];
|
errorCode[rspObj.code] || rspObj.msg || errorCode['default']
|
||||||
Message.error(errMsg);
|
Message.error(errMsg)
|
||||||
}
|
}
|
||||||
downloadLoadingInstance.close();
|
downloadLoadingInstance.close()
|
||||||
})
|
})
|
||||||
.catch((r) => {
|
.catch((r) => {
|
||||||
Message.error("下载文件出现错误,请联系管理员!");
|
Message.error('下载文件出现错误,请联系管理员!')
|
||||||
downloadLoadingInstance.close();
|
downloadLoadingInstance.close()
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default service;
|
export default service
|
||||||
|
|
|
@ -99,7 +99,7 @@ export default {
|
||||||
tableData: [], //表格数据
|
tableData: [], //表格数据
|
||||||
pageModel: {
|
pageModel: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
},
|
},
|
||||||
queryModel: {
|
queryModel: {
|
||||||
code: "",
|
code: "",
|
||||||
|
@ -225,4 +225,4 @@ export default {
|
||||||
color: #409eff;
|
color: #409eff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -107,7 +107,7 @@ export default {
|
||||||
tableData: [], //表格数据
|
tableData: [], //表格数据
|
||||||
pageModel: {
|
pageModel: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
},
|
},
|
||||||
queryModel: {
|
queryModel: {
|
||||||
code: "",
|
code: "",
|
||||||
|
@ -244,4 +244,4 @@ export default {
|
||||||
color: #409eff;
|
color: #409eff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -5,19 +5,25 @@
|
||||||
<div class="chunk">
|
<div class="chunk">
|
||||||
<el-button icon="el-icon-back" @click="
|
<el-button icon="el-icon-back" @click="
|
||||||
$router.replace({ path: '/applicationList/applicationListAdmin' })
|
$router.replace({ path: '/applicationList/applicationListAdmin' })
|
||||||
">返回</el-button>
|
"
|
||||||
|
>返回
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="chunk">
|
<div class="chunk">
|
||||||
<el-button icon="el-icon-first-aid-kit" type="primary" @click="saveHandle">保存</el-button>
|
<el-button icon="el-icon-first-aid-kit" type="primary" @click="saveHandle">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main" >
|
<div class="main">
|
||||||
<div class="upload">
|
<div class="upload">
|
||||||
<div class="title">应用信息</div>
|
<div class="title">应用信息</div>
|
||||||
<div class="uploadMain">
|
<div class="uploadMain">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="title">应用logo</div>
|
<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="line">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<img v-if="imgUrl" :src="imgUrl" class="avatar" @error="handleImageError">
|
<img v-if="imgUrl" :src="imgUrl" class="avatar" @error="handleImageError">
|
||||||
|
@ -40,40 +46,44 @@
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<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>
|
</el-switch>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getApiModuleApi } from "@/api/apiChunks/index.js";
|
import { getApiModuleApi } from '@/api/apiChunks/index.js'
|
||||||
import { uploadLogo } from "@/api/apis/logo.js";
|
import { uploadLogo } from '@/api/apis/logo.js'
|
||||||
import configData from "./configData";
|
import configData from './configData'
|
||||||
import baseNewForm from "@/views/intergrationTask/compoments/baseNewForm";
|
import baseNewForm from '@/views/intergrationTask/compoments/baseNewForm'
|
||||||
import request from "@/utils/request";
|
import request from '@/utils/request'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList: [],
|
fileList: [],
|
||||||
iconBase64: "",
|
iconBase64: '',
|
||||||
imgUrl: "",
|
imgUrl: '',
|
||||||
loading: false,
|
loading: false,
|
||||||
appLogo: "",
|
appLogo: '',
|
||||||
appStatus: 1,
|
appStatus: 1,
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
accessMode: [],
|
accessMode: []
|
||||||
},
|
},
|
||||||
lookFlag: false,
|
lookFlag: false,
|
||||||
formRow: configData.addForm,
|
formRow: configData.addForm
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleImageError(row) {
|
handleImageError(row) {
|
||||||
|
@ -89,13 +99,23 @@ export default {
|
||||||
handlePreview(file) {
|
handlePreview(file) {
|
||||||
},
|
},
|
||||||
async handleAvatarSuccess(res, 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);
|
this.imgUrl = URL.createObjectURL(file.raw)
|
||||||
let formData = new FormData();
|
let formData = new FormData()
|
||||||
formData.append("file", file.raw);
|
formData.append('file', file.raw)
|
||||||
formData.append("fileFlag", true);
|
formData.append('fileFlag', true)
|
||||||
formData.append("businessType", "application");
|
formData.append('businessType', 'application')
|
||||||
// console.log(formData);
|
// console.log(formData);
|
||||||
// const el = await uploadLogo(formData)
|
// const el = await uploadLogo(formData)
|
||||||
// if (el.status === '200') {
|
// if (el.status === '200') {
|
||||||
|
@ -103,36 +123,37 @@ export default {
|
||||||
// this.appLogo = el.id
|
// this.appLogo = el.id
|
||||||
// }
|
// }
|
||||||
return request({
|
return request({
|
||||||
url: "/kangarooDataCenterV3/entranceController/fileUpload",
|
url: '/kangarooDataCenterV3/entranceController/fileUpload',
|
||||||
method: "post",
|
method: 'post',
|
||||||
data: formData,
|
data: formData
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.status === '200') {
|
if (res.status === '200') {
|
||||||
this.$vmNews("上传成功", "success")
|
this.$vmNews('上传成功', 'success')
|
||||||
this.appLogo = res.attribute.id
|
this.appLogo = res.attribute.id
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|
||||||
// this.loading = false
|
// this.loading = false
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
|
,
|
||||||
async beforeUpload(file) {
|
async beforeUpload(file) {
|
||||||
if (
|
if (
|
||||||
file.type.split("/")[1] != "jpeg" &&
|
file.type.split('/')[1] != 'jpeg' &&
|
||||||
file.type.split("/")[1] != "png"
|
file.type.split('/')[1] != 'png'
|
||||||
) {
|
) {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
message: "只能上传jpg/png文件",
|
message: '只能上传jpg/png文件'
|
||||||
});
|
})
|
||||||
return
|
return false
|
||||||
} else {
|
} else {
|
||||||
if (file.size >= 2000000) {
|
if (file.size >= 2000000) {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
message: "文件大小不超过2MB",
|
message: '文件大小不超过2MB'
|
||||||
});
|
})
|
||||||
return
|
return false
|
||||||
}
|
}
|
||||||
// let reader = new FileReader();
|
// let reader = new FileReader();
|
||||||
// let that = this;
|
// let that = this;
|
||||||
|
@ -144,58 +165,61 @@ export default {
|
||||||
// reader.readAsDataURL(file);
|
// reader.readAsDataURL(file);
|
||||||
// return false;
|
// return false;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
// 保存按钮、列表验证
|
// 保存按钮、列表验证
|
||||||
saveHandle() {
|
saveHandle() {
|
||||||
this.$refs.mainForm.submitForm();
|
this.$refs.mainForm.submitForm()
|
||||||
|
|
||||||
},
|
}
|
||||||
|
,
|
||||||
//验证成功准备上传
|
//验证成功准备上传
|
||||||
async onSubmit() {
|
async onSubmit() {
|
||||||
if (this.$route.query.flag === "add") {
|
if (this.$route.query.flag === 'add') {
|
||||||
const res = await getApiModuleApi({
|
const res = await getApiModuleApi({
|
||||||
tl: "sysApplicationService",
|
tl: 'sysApplicationService',
|
||||||
as: "application",
|
as: 'application',
|
||||||
dj: "saveApp"
|
dj: 'saveApp'
|
||||||
}, { ...this.ruleForm, appStatus: this.appStatus, appLogo: this.appLogo })
|
}, { ...this.ruleForm, appStatus: this.appStatus, appLogo: this.appLogo })
|
||||||
if (res.status === '200') {
|
if (res.status === '200') {
|
||||||
this.$vmNews("保存成功", "success")
|
this.$vmNews('保存成功', 'success')
|
||||||
this.$router.replace({ path: '/applicationList/applicationListAdmin' })
|
this.$router.replace({ path: '/applicationList/applicationListAdmin' })
|
||||||
}
|
}
|
||||||
} else if (this.$route.query.flag === "copy") {
|
} else if (this.$route.query.flag === 'copy') {
|
||||||
const res = await getApiModuleApi({
|
const res = await getApiModuleApi({
|
||||||
tl: "sysApplicationService",
|
tl: 'sysApplicationService',
|
||||||
as: "application",
|
as: 'application',
|
||||||
dj: "copyApp"
|
dj: 'copyApp'
|
||||||
}, { ...this.ruleForm, appStatus: this.appStatus, appLogo: this.appLogo })
|
}, { ...this.ruleForm, appStatus: this.appStatus, appLogo: this.appLogo })
|
||||||
if (res.status === '200') {
|
if (res.status === '200') {
|
||||||
this.$vmNews("复制成功", "success")
|
this.$vmNews('复制成功', 'success')
|
||||||
this.$router.replace({ path: '/applicationList/applicationListAdmin' })
|
this.$router.replace({ path: '/applicationList/applicationListAdmin' })
|
||||||
}
|
}
|
||||||
} else if (this.$route.query.flag === "setting") {
|
} else if (this.$route.query.flag === 'setting') {
|
||||||
const res = await getApiModuleApi({
|
const res = await getApiModuleApi({
|
||||||
tl: "sysApplicationService",
|
tl: 'sysApplicationService',
|
||||||
as: "application",
|
as: 'application',
|
||||||
dj: "updateApp"
|
dj: 'updateApp'
|
||||||
}, { updateType: 1, ...this.ruleForm, appStatus: this.appStatus, appLogo: this.appLogo })
|
}, { updateType: 1, ...this.ruleForm, appStatus: this.appStatus, appLogo: this.appLogo })
|
||||||
if (res.status === '200') {
|
if (res.status === '200') {
|
||||||
this.$vmNews("保存成功", "success")
|
this.$vmNews('保存成功', 'success')
|
||||||
this.initEditFormData()
|
this.initEditFormData()
|
||||||
this.getLogoUrl()
|
this.getLogoUrl()
|
||||||
this.$emit("saveSuccess")
|
this.$emit('saveSuccess')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
// 获取下拉数据
|
// 获取下拉数据
|
||||||
async initSelectOptions() {
|
async initSelectOptions() {
|
||||||
let params = {
|
let params = {
|
||||||
tab_name: "sys_product",
|
tab_name: 'sys_product',
|
||||||
column_name: "classify",
|
column_name: 'classify'
|
||||||
};
|
}
|
||||||
const res = await getApiModuleApi({
|
const res = await getApiModuleApi({
|
||||||
tl: "generalServiceImpl",
|
tl: 'generalServiceImpl',
|
||||||
as: "dictionaryshop",
|
as: 'dictionaryshop',
|
||||||
dj: "selectDictionaryshop"
|
dj: 'selectDictionaryshop'
|
||||||
}, params)
|
}, params)
|
||||||
this.formRow[3].elCol[0].options = []
|
this.formRow[3].elCol[0].options = []
|
||||||
res.attribute.forEach((item) => {
|
res.attribute.forEach((item) => {
|
||||||
|
@ -204,107 +228,121 @@ export default {
|
||||||
id: item.column_value
|
id: item.column_value
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
|
,
|
||||||
// 复制-获取表单数据
|
// 复制-获取表单数据
|
||||||
async initCopyFormData() {
|
async initCopyFormData() {
|
||||||
const res = await getApiModuleApi({
|
const res = await getApiModuleApi({
|
||||||
tl: "sysApplicationService",
|
tl: 'sysApplicationService',
|
||||||
as: "application",
|
as: 'application',
|
||||||
dj: "getCopyApp"
|
dj: 'getCopyApp'
|
||||||
}, { id: this.$route.query.id })
|
}, { id: this.$route.query.id })
|
||||||
this.ruleForm = res.attribute
|
this.ruleForm = res.attribute
|
||||||
this.ruleForm.accessMode = JSON.parse(res.attribute.accessMode)
|
this.ruleForm.accessMode = JSON.parse(res.attribute.accessMode)
|
||||||
this.appStatus = res.attribute.appStatus
|
this.appStatus = res.attribute.appStatus
|
||||||
},
|
}
|
||||||
|
,
|
||||||
async initEditFormData() {
|
async initEditFormData() {
|
||||||
const res = await getApiModuleApi({
|
const res = await getApiModuleApi({
|
||||||
tl: "sysApplicationService",
|
tl: 'sysApplicationService',
|
||||||
as: "application",
|
as: 'application',
|
||||||
dj: "getApp"
|
dj: 'getApp'
|
||||||
}, { id: this.$route.query.id })
|
}, { id: this.$route.query.id })
|
||||||
this.ruleForm = res.attribute
|
this.ruleForm = res.attribute
|
||||||
this.ruleForm.accessMode = JSON.parse(res.attribute.accessMode)
|
this.ruleForm.accessMode = JSON.parse(res.attribute.accessMode)
|
||||||
this.appStatus = res.attribute.appStatus
|
this.appStatus = res.attribute.appStatus
|
||||||
},
|
}
|
||||||
|
,
|
||||||
//下载logo
|
//下载logo
|
||||||
getLogoUrl() {
|
getLogoUrl() {
|
||||||
let id = this.appLogo ? this.appLogo : this.$route.query.appLogo
|
let id = this.appLogo ? this.appLogo : this.$route.query.appLogo
|
||||||
return request({
|
return request({
|
||||||
url: "/kangarooDataCenterV3/entranceController/fileDownloadNew?id=" + id,
|
url: '/kangarooDataCenterV3/entranceController/fileDownloadNew?id=' + id,
|
||||||
method: "get",
|
method: 'get',
|
||||||
responseType: 'arraybuffer'
|
responseType: 'arraybuffer'
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.imgUrl =
|
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: {
|
components: {
|
||||||
baseNewForm,
|
baseNewForm
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 请求下拉options
|
// 请求下拉options
|
||||||
this.initSelectOptions()
|
this.initSelectOptions()
|
||||||
// 判断是什么类型进来的
|
// 判断是什么类型进来的
|
||||||
if (this.$route.query.flag === "setting") {
|
if (this.$route.query.flag === 'setting') {
|
||||||
this.formRow[0].elCol[0].disabled = false;
|
this.formRow[0].elCol[0].disabled = false
|
||||||
} else {
|
} 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.initCopyFormData()
|
||||||
this.getLogoUrl()
|
this.getLogoUrl()
|
||||||
} else if (this.$route.query.flag === "setting") {
|
} else if (this.$route.query.flag === 'setting') {
|
||||||
this.initEditFormData()
|
this.initEditFormData()
|
||||||
this.getLogoUrl()
|
this.getLogoUrl()
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
::v-deep .el-button {
|
::v-deep .el-button {
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-form-item {
|
::v-deep .el-form-item {
|
||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrap {
|
.wrap {
|
||||||
background-color: #fbfbfb;
|
background-color: #fbfbfb;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
> .btn {
|
> .btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
> .chunk {
|
> .chunk {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> .main {
|
> .main {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|
||||||
> .upload {
|
> .upload {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
padding: 24px 30px;
|
padding: 24px 30px;
|
||||||
|
|
||||||
> .title {
|
> .title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .uploadMain {
|
> .uploadMain {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
> .left {
|
> .left {
|
||||||
> .title {
|
> .title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
border: 1px dashed #999999;
|
border: 1px dashed #999999;
|
||||||
width: 64px;
|
width: 64px;
|
||||||
|
@ -312,11 +350,13 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
> img {
|
> img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// height: 100%;
|
// height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
|
@ -324,6 +364,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> .form {
|
> .form {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|
|
@ -103,7 +103,7 @@ export default {
|
||||||
tableData: [], //表格数据
|
tableData: [], //表格数据
|
||||||
pageModel: {
|
pageModel: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
},
|
},
|
||||||
queryModel: {
|
queryModel: {
|
||||||
sourceCode: "", //数据源编码
|
sourceCode: "", //数据源编码
|
||||||
|
@ -207,4 +207,4 @@ export default {
|
||||||
color: #409eff;
|
color: #409eff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -102,7 +102,7 @@ export default {
|
||||||
tableData: [], //表格数据
|
tableData: [], //表格数据
|
||||||
pageModel: {
|
pageModel: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
},
|
},
|
||||||
queryModel: {
|
queryModel: {
|
||||||
theme: "", //消息主题
|
theme: "", //消息主题
|
||||||
|
@ -246,4 +246,4 @@ export default {
|
||||||
color: #409eff;
|
color: #409eff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -130,13 +130,13 @@ export default {
|
||||||
tableData: [], //表格数据
|
tableData: [], //表格数据
|
||||||
pageModel: {
|
pageModel: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
},
|
},
|
||||||
queryModel: {
|
queryModel: {
|
||||||
theme: "",
|
theme: "",
|
||||||
sendApp: "",
|
sendApp: "",
|
||||||
sendApi: "",
|
sendApi: "",
|
||||||
receiveApp: "",
|
receiveApp: "",
|
||||||
receiveApi: "",
|
receiveApi: "",
|
||||||
status: "",
|
status: "",
|
||||||
},
|
},
|
||||||
|
@ -285,4 +285,4 @@ export default {
|
||||||
color: #409eff;
|
color: #409eff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -281,10 +281,11 @@ export default {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
width: 5vw;
|
width: 5vw;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||||
img {
|
img {
|
||||||
width: 5vw;
|
width: 5vw;
|
||||||
height: 7vh;
|
height: 7vh;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,6 +322,7 @@ export default {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
@ -395,6 +397,7 @@ export default {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
img {
|
img {
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||||
width: 3vw;
|
width: 3vw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -425,7 +428,7 @@ export default {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 34px;
|
font-size: 30px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
.text{
|
.text{
|
||||||
margin-top: 5vh;
|
margin-top: 5vh;
|
||||||
|
|
|
@ -242,7 +242,7 @@ export default {
|
||||||
journalingType: this.journalingType,
|
journalingType: this.journalingType,
|
||||||
names: val,
|
names: val,
|
||||||
pageNum: this.pageModel.pageIndex,
|
pageNum: this.pageModel.pageIndex,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
...obj,
|
...obj,
|
||||||
...this.tempObj,
|
...this.tempObj,
|
||||||
});
|
});
|
||||||
|
|
|
@ -242,7 +242,7 @@ export default {
|
||||||
journalingType: this.journalingType,
|
journalingType: this.journalingType,
|
||||||
names: val,
|
names: val,
|
||||||
pageNum: this.pageModel.pageIndex,
|
pageNum: this.pageModel.pageIndex,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
...obj,
|
...obj,
|
||||||
...this.tempObj,
|
...this.tempObj,
|
||||||
});
|
});
|
||||||
|
|
|
@ -285,6 +285,7 @@ export default {
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
//主表处理
|
//主表处理
|
||||||
|
console.log(res,'res')
|
||||||
res.attribute.listList.forEach(item => {
|
res.attribute.listList.forEach(item => {
|
||||||
this.mainTableName = item.dbName
|
this.mainTableName = item.dbName
|
||||||
item.ruleList.forEach(ele => {
|
item.ruleList.forEach(ele => {
|
||||||
|
|
|
@ -252,7 +252,7 @@ export default {
|
||||||
journalingType: this.journalingType,
|
journalingType: this.journalingType,
|
||||||
apiName: val,
|
apiName: val,
|
||||||
pageNum: this.pageModel.pageIndex,
|
pageNum: this.pageModel.pageIndex,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
...obj,
|
...obj,
|
||||||
...this.tempObj,
|
...this.tempObj,
|
||||||
...this.apiBody,
|
...this.apiBody,
|
||||||
|
|
|
@ -245,7 +245,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pageNum: index,
|
pageNum: index,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
...obj,
|
...obj,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -253,7 +253,7 @@ export default {
|
||||||
journalingType: this.journalingType,
|
journalingType: this.journalingType,
|
||||||
names: val,
|
names: val,
|
||||||
pageNum: this.pageModel.pageIndex,
|
pageNum: this.pageModel.pageIndex,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
...obj,
|
...obj,
|
||||||
...this.tempObj,
|
...this.tempObj,
|
||||||
...this.apiBody,
|
...this.apiBody,
|
||||||
|
|
|
@ -68,7 +68,7 @@ export default {
|
||||||
label: '任务名称'
|
label: '任务名称'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'taskId',
|
prop: 'taskCode',
|
||||||
label: '任务编码'
|
label: '任务编码'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -280,7 +280,7 @@ export default {
|
||||||
elCol: [
|
elCol: [
|
||||||
{
|
{
|
||||||
label: "运行次数",
|
label: "运行次数",
|
||||||
prop: "`runNum",
|
prop: "runNum",
|
||||||
tag: "elInput",
|
tag: "elInput",
|
||||||
disabled:true,
|
disabled:true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -67,7 +67,7 @@ export default {
|
||||||
label: '任务名称'
|
label: '任务名称'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'taskId',
|
prop: 'taskCode',
|
||||||
label: '任务编码'
|
label: '任务编码'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -673,7 +673,7 @@ export default {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.ruleForm = res.attribute
|
this.ruleForm = res.attribute
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.formRow[0].elCol[1].disabled = true
|
this.formRow[0].elCol[1].disabled = false
|
||||||
const res2 = await authApi('sysApplicationPluginService', '', 'queryEntity', '', {
|
const res2 = await authApi('sysApplicationPluginService', '', 'queryEntity', '', {
|
||||||
appId: res.attribute.taskApp
|
appId: res.attribute.taskApp
|
||||||
})
|
})
|
||||||
|
|
|
@ -255,6 +255,7 @@ export default {
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch("Login", this.loginForm)
|
.dispatch("Login", this.loginForm)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
this.loading = false;
|
||||||
this.$router
|
this.$router
|
||||||
.push({
|
.push({
|
||||||
path: this.redirect || "/",
|
path: this.redirect || "/",
|
||||||
|
@ -263,6 +264,7 @@ export default {
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
console.log(123,'123')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -253,7 +253,7 @@ export default {
|
||||||
journalingType: this.journalingType,
|
journalingType: this.journalingType,
|
||||||
names: val,
|
names: val,
|
||||||
pageNum: this.pageModel.pageIndex,
|
pageNum: this.pageModel.pageIndex,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
...obj,
|
...obj,
|
||||||
...this.tempObj,
|
...this.tempObj,
|
||||||
...this.apiBody,
|
...this.apiBody,
|
||||||
|
|
|
@ -168,6 +168,7 @@ export default {
|
||||||
res.attribute.forEach(item=>{
|
res.attribute.forEach(item=>{
|
||||||
this.$set(this.select_dist,item.pluginId,item)
|
this.$set(this.select_dist,item.pluginId,item)
|
||||||
})
|
})
|
||||||
|
console.log(res.attribute,'res.attribute插件返回')
|
||||||
this.formRow[0].elCol[0].options = res.attribute
|
this.formRow[0].elCol[0].options = res.attribute
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -274,7 +275,7 @@ export default {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if(!item.argCode){
|
if(!item.argCode){
|
||||||
this.$vmNews("参数编码")
|
this.$vmNews("请输入参数编码")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -338,6 +339,7 @@ export default {
|
||||||
params
|
params
|
||||||
);
|
);
|
||||||
if (res.status == "200") {
|
if (res.status == "200") {
|
||||||
|
console.log(res.attribute,'res.attribute123')
|
||||||
this.formRow[1].elCol[0].options = res.attribute;
|
this.formRow[1].elCol[0].options = res.attribute;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -279,7 +279,7 @@ export default {
|
||||||
journalingType: this.journalingType,
|
journalingType: this.journalingType,
|
||||||
names: val,
|
names: val,
|
||||||
pageNum: this.pageModel.pageIndex,
|
pageNum: this.pageModel.pageIndex,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.selLoading = false;
|
this.selLoading = false;
|
||||||
|
|
|
@ -216,7 +216,7 @@ export default {
|
||||||
journalingType: this.journalingType,
|
journalingType: this.journalingType,
|
||||||
names: val,
|
names: val,
|
||||||
pageNum: this.pageModel.pageIndex,
|
pageNum: this.pageModel.pageIndex,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.selLoading = false;
|
this.selLoading = false;
|
||||||
|
|
|
@ -103,7 +103,7 @@ export default {
|
||||||
menuData: [],
|
menuData: [],
|
||||||
formdata: {},
|
formdata: {},
|
||||||
pageModel: {
|
pageModel: {
|
||||||
pageSize: 20,
|
pageSize: 100,
|
||||||
menuId: '',
|
menuId: '',
|
||||||
pageNum: 1
|
pageNum: 1
|
||||||
},
|
},
|
||||||
|
|
|
@ -37,7 +37,7 @@ export default {
|
||||||
pageModel: {
|
pageModel: {
|
||||||
total: 10,
|
total: 10,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -97,7 +97,7 @@ export default {
|
||||||
],
|
],
|
||||||
pageModel: {
|
pageModel: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 100,
|
||||||
departmentID: "",
|
departmentID: "",
|
||||||
Sequence: "",
|
Sequence: "",
|
||||||
SequenceName: "",
|
SequenceName: "",
|
||||||
|
|
|
@ -18,6 +18,10 @@
|
||||||
@radioChange="userRadioChange" :slotrow="true" :tableHeight="tableHeight" :tableData="tableData"
|
@radioChange="userRadioChange" :slotrow="true" :tableHeight="tableHeight" :tableData="tableData"
|
||||||
:tableColumn="tableColumn"
|
:tableColumn="tableColumn"
|
||||||
>
|
>
|
||||||
|
<template #state="{row}">
|
||||||
|
<div>{{ row.row.state == 1 ? '停用' : '启用' }}</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
</base-table>
|
</base-table>
|
||||||
</div>
|
</div>
|
||||||
</base-layout>
|
</base-layout>
|
||||||
|
@ -49,7 +53,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import baseLayout from "@/components/base/baseNewLayout"
|
import baseLayout from '@/components/base/baseNewLayout'
|
||||||
import baseTable from '@/components/base/baseTable'
|
import baseTable from '@/components/base/baseTable'
|
||||||
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
||||||
import baseForm from '@/components/base/baseNewForm/index.vue'
|
import baseForm from '@/components/base/baseNewForm/index.vue'
|
||||||
|
@ -108,7 +112,7 @@ export default {
|
||||||
],
|
],
|
||||||
pageModel: {
|
pageModel: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 100,
|
||||||
organId: ''
|
organId: ''
|
||||||
},
|
},
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
|
@ -333,10 +337,10 @@ export default {
|
||||||
id: this.userRadioId,
|
id: this.userRadioId,
|
||||||
kindId: 1
|
kindId: 1
|
||||||
}
|
}
|
||||||
const res = await authApi('sysUserService', '', 'jurisdiction', '',params)
|
const res = await authApi('sysUserService', '', 'jurisdiction', '', params)
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
const data = res.attribute
|
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,
|
tableColumnData: configData.tableColumnData,
|
||||||
pageModel: {
|
pageModel: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
// 搜索配置
|
// 搜索配置
|
||||||
const searchModelJson = [
|
const searchModelJson = []
|
||||||
|
|
||||||
]
|
|
||||||
// 页面操作按钮配置
|
// 页面操作按钮配置
|
||||||
const fucDataJson = [{
|
const fucDataJson = [{
|
||||||
name: '导出',
|
name: '导出',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-position'
|
icon: 'el-icon-position'
|
||||||
},
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
// 表头配置
|
// 表头配置
|
||||||
|
@ -15,270 +13,272 @@ const tableColumnJson = [
|
||||||
{
|
{
|
||||||
label: '所属部门',
|
label: '所属部门',
|
||||||
prop: 'organName',
|
prop: 'organName',
|
||||||
tooltip: true,
|
tooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '工号',
|
label: '工号',
|
||||||
prop: 'personCode',
|
prop: 'personCode',
|
||||||
tooltip: true,
|
tooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '姓名',
|
label: '姓名',
|
||||||
prop: 'personName',
|
prop: 'personName',
|
||||||
tooltip: true,
|
tooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '入职时间',
|
label: '入职时间',
|
||||||
prop: 'entryTime',
|
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
|
// 详情页面结构JSON
|
||||||
const formRow = [{
|
const formRow = [{
|
||||||
elCol: [{
|
elCol: [{
|
||||||
label: '工号',
|
label: '工号',
|
||||||
prop: 'personCode',
|
prop: 'personCode',
|
||||||
tag: 'elInput',
|
tag: 'elInput'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '姓名',
|
label: '姓名',
|
||||||
prop: 'personName',
|
prop: 'personName',
|
||||||
tag: 'elInput',
|
tag: 'elInput'
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
elCol: [{
|
elCol: [{
|
||||||
label: '部门',
|
label: '部门',
|
||||||
prop: 'organName',
|
prop: 'organName',
|
||||||
tag: 'elDialog'
|
tag: 'elDialog'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '手机号',
|
label: '手机号',
|
||||||
prop: 'mobilePhone',
|
prop: 'mobilePhone',
|
||||||
tag: 'elInput',
|
tag: 'elInput',
|
||||||
rules:true,
|
rules: true,
|
||||||
rulesName:'phone'
|
rulesName: 'phone'
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
elCol: [{
|
elCol: [{
|
||||||
label: '性别',
|
label: '性别',
|
||||||
prop: 'sex',
|
prop: 'sex',
|
||||||
tag: 'elRadio',
|
tag: 'elRadio',
|
||||||
options: [{
|
options: [{
|
||||||
label: '男',
|
label: '男',
|
||||||
value: 1
|
value: '1'
|
||||||
},{
|
}, {
|
||||||
label: '女',
|
label: '女',
|
||||||
value: 0
|
value: '0'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '学历',
|
label: '学历',
|
||||||
prop: '`degreeId`',
|
prop: 'degreeId',
|
||||||
tag: 'elSelect',
|
tag: 'elSelect',
|
||||||
options: []
|
options: []
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
elCol: [{
|
elCol: [{
|
||||||
label: '职务',
|
label: '职务',
|
||||||
prop: '`postId`',
|
prop: 'postId',
|
||||||
tag: 'elSelect',
|
tag: 'elSelect',
|
||||||
options: [
|
options: []
|
||||||
|
},
|
||||||
]
|
{
|
||||||
},
|
label: '级别',
|
||||||
{
|
prop: 'levelId',
|
||||||
label: '级别',
|
tag: 'elSelect',
|
||||||
prop: '`levelId`',
|
options: []
|
||||||
tag: 'elSelect',
|
}
|
||||||
options: [],
|
]
|
||||||
},
|
},
|
||||||
]
|
{
|
||||||
},
|
elCol: [{
|
||||||
{
|
label: '生日',
|
||||||
elCol: [{
|
prop: 'birthDay',
|
||||||
label: '生日',
|
tag: 'elDatePicker',
|
||||||
prop: 'birthDay',
|
placeholder: '请点击选择'
|
||||||
tag: 'elDatePicker',
|
// type:'date'
|
||||||
placeholder:'请点击选择',
|
}, {
|
||||||
// type:'date'
|
label: '入职时间',
|
||||||
},{
|
prop: 'entryTime',
|
||||||
label: '入职时间',
|
tag: 'elDatePicker',
|
||||||
prop: '`entryTime`',
|
placeholder: '请点击选择'
|
||||||
tag: 'elDatePicker',
|
// type:'date'
|
||||||
placeholder:'请点击选择',
|
}
|
||||||
// type:'date'
|
]
|
||||||
}
|
},
|
||||||
]
|
{
|
||||||
},
|
elCol: [
|
||||||
{
|
{
|
||||||
elCol: [
|
label: '固定电话',
|
||||||
{
|
prop: 'telPhone',
|
||||||
label: '固定电话',
|
tag: 'elInput'
|
||||||
prop: '`telPhone`',
|
}
|
||||||
tag: 'elInput'
|
// {
|
||||||
},
|
// label: '身份证',
|
||||||
// {
|
// prop: 'IdCard',
|
||||||
// label: '身份证',
|
// tag: 'elInput'
|
||||||
// prop: 'IdCard',
|
// },
|
||||||
// tag: 'elInput'
|
]
|
||||||
// },
|
},
|
||||||
]
|
{
|
||||||
},
|
elCol: [{
|
||||||
{
|
label: '电子邮箱',
|
||||||
elCol: [{
|
prop: 'email',
|
||||||
label: '电子邮箱',
|
tag: 'elInput'
|
||||||
prop: 'email',
|
// rules:true,
|
||||||
tag: 'elInput',
|
// rulesName:'eMail'
|
||||||
// rules:true,
|
}
|
||||||
// rulesName:'eMail'
|
]
|
||||||
},
|
},
|
||||||
]
|
{
|
||||||
},
|
elCol: [{
|
||||||
{
|
label: '备注',
|
||||||
elCol: [{
|
prop: 'remark',
|
||||||
label: '备注',
|
tag: 'elInput',
|
||||||
prop: 'remark',
|
type: 'textarea',
|
||||||
tag: 'elInput',
|
span: 24
|
||||||
type: 'textarea',
|
}]
|
||||||
span:24
|
}
|
||||||
}, ]
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
const roleOptions = [{
|
const roleOptions = [{
|
||||||
label: '超级管理员',
|
label: '超级管理员',
|
||||||
value: 1
|
value: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '业务员',
|
label: '业务员',
|
||||||
value: 2
|
value: 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '管理员',
|
label: '管理员',
|
||||||
value: 3
|
value: 3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '开发成员',
|
label: '开发成员',
|
||||||
value: 4
|
value: 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '项目经理',
|
label: '项目经理',
|
||||||
value: 5
|
value: 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '实施人员',
|
label: '实施人员',
|
||||||
value: 6
|
value: 6
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '财务',
|
label: '财务',
|
||||||
value: 7
|
value: 7
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '总经理',
|
label: '总经理',
|
||||||
value: 8
|
value: 8
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '副总',
|
label: '副总',
|
||||||
value: 9
|
value: 9
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const userRules = {
|
const userRules = {
|
||||||
personCode: [{
|
personCode: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入工号',
|
message: '请输入工号',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}],
|
}],
|
||||||
personName: [{
|
personName: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入姓名',
|
message: '请输入姓名',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}],
|
}],
|
||||||
organName: [{
|
organName: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择组织',
|
message: '请选择组织',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}],
|
}],
|
||||||
mobilePhone: [{
|
mobilePhone: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入手机号码',
|
message: '请输入手机号码',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}],
|
}],
|
||||||
sex: [{
|
sex: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择性别',
|
message: '请选择性别',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}],
|
}]
|
||||||
email: [{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }],
|
// email: [{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }],
|
||||||
};
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
searchModelJson,
|
searchModelJson,
|
||||||
fucDataJson,
|
fucDataJson,
|
||||||
tableColumnJson,
|
tableColumnJson,
|
||||||
formRow,
|
formRow,
|
||||||
userRules
|
userRules
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,9 @@
|
||||||
<template v-slot:p_BirthDay="{ row }">
|
<template v-slot:p_BirthDay="{ row }">
|
||||||
<span>{{ row.row.p_BirthDay | timeDate }}</span>
|
<span>{{ row.row.p_BirthDay | timeDate }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template #state="{row}">
|
||||||
|
<div>{{ row.row.state == 1 ? '停用' : '启用'}}</div>
|
||||||
|
</template>
|
||||||
</base-table>
|
</base-table>
|
||||||
</div>
|
</div>
|
||||||
</base-layout>
|
</base-layout>
|
||||||
|
|
|
@ -35,9 +35,9 @@
|
||||||
<el-radio label="1">停用</el-radio>
|
<el-radio label="1">停用</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="r_Description">
|
<el-form-item prop="description">
|
||||||
<span class="label" slot="label">描述</span>
|
<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-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -84,7 +84,7 @@ export default {
|
||||||
total: "",
|
total: "",
|
||||||
pageModel: {
|
pageModel: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 100,
|
||||||
roleCode: '',
|
roleCode: '',
|
||||||
roleName: ''
|
roleName: ''
|
||||||
},
|
},
|
||||||
|
|
|
@ -92,6 +92,7 @@ const personColumn = [
|
||||||
label: '是否用户分配',
|
label: '是否用户分配',
|
||||||
prop: 'state',
|
prop: 'state',
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
|
width:150,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
// 表头配置
|
// 表头配置
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
:tableColumn="tableColumn"
|
:tableColumn="tableColumn"
|
||||||
>
|
>
|
||||||
<template #state="{row}">
|
<template #state="{row}">
|
||||||
<div>{{ row.row.state == 0 ? '启动' : '停用' }}</div>
|
<div>{{ row.row.state == 0 ? '启用' : '停用' }}</div>
|
||||||
</template>
|
</template>
|
||||||
</base-table>
|
</base-table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -146,7 +146,7 @@ export default {
|
||||||
],
|
],
|
||||||
pageModel: {
|
pageModel: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 100,
|
||||||
organId: ''
|
organId: ''
|
||||||
// SequenceName:'',
|
// SequenceName:'',
|
||||||
// Sequence:''
|
// Sequence:''
|
||||||
|
|
Loading…
Reference in New Issue