Commit 457fbe18 authored by 白舜's avatar 白舜 🎱

Merge branch 'dev' of ssh://cloud.wodcloud.com:10022/apaas/apaas-system-ui into dev0423

parents 16e62941 98dfe263
......@@ -17,6 +17,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
image: registry.cn-qingdao.aliyuncs.com/wod/devops-git:1.0
network_mode: host
- name: s3-cache
image: registry.cn-qingdao.aliyuncs.com/wod/devops-s3-cache:1.0
network_mode: host
......
......@@ -12,7 +12,7 @@ module.exports = {
htmlWhitespaceSensitivity: "css",
insertPragma: false,
jsxSingleQuote: false,
printWidth: 120, // 如果属性过多需要换行,减少该值
printWidth: 100, // 如果属性过多需要换行,减少该值
proseWrap: "preserve",
quoteProps: "as-needed",
requirePragma: false,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -4,17 +4,33 @@
<bg-menu :path="nowParent.path" v-if="menuShow" @openMsg="openMsg"></bg-menu>
<div class="container" :class="menuShow ? '' : 'full_screen'" v-if="pageShow">
<!-- <bg-nav :highlightParentRule="highlightParentRule" :title="nowParent.menuName" width="208px" :list="nowParent.children" v-show="navShow" class="con-nav" /> -->
<bg-nav :highlightParentRule="highlightParentRule" width="208px" :list="nowParent.children" v-show="navShow" class="con-nav" />
<bg-nav
v-if="nowParent.children"
:highlightParentRule="highlightParentRule"
width="208px"
:list="nowParent.children"
v-show="navShow"
class="con-nav" />
<div class="bg-main view">
<router-view />
</div>
</div>
<div class="container" v-else-if="$route.path=='/login'">
<div class="container" v-else-if="$route.path == '/login'">
<div class="bg-main view">
<login></login>
</div>
</div>
<div class="container" v-else-if="$route.path=='/404'">
<div class="container" v-else-if="$route.path == '/register'">
<div class="bg-main view">
<register></register>
</div>
</div>
<div class="container" v-else-if="$route.path == '/password'">
<div class="bg-main view">
<password></password>
</div>
</div>
<div class="container" v-else-if="$route.path == '/404'">
<div class="bg-main view">
<page404></page404>
</div>
......@@ -25,128 +41,126 @@
</template>
<script>
import bgMenu from '@/components/bg-menu.vue'
import login from '@/page/login/index.vue'
import page404 from '@/page/404.vue'
import bgMenu from "@/components/bg-menu.vue";
import login from "@/page/login/index.vue";
import page404 from "@/page/404.vue";
import register from "@/page/register/index.vue";
import password from "@/page/password/index.vue";
export default {
components:{
bgMenu,
components: {
bgMenu,
login,
page404,
register,
password,
},
computed:{
msgBoxFlag(){
return this.$store.state.msgBoxFlag
computed: {
msgBoxFlag() {
return this.$store.state.msgBoxFlag;
},
userInfo() {
return this.$store.state.userInfo || {};
},
navMenu(){
return this.$store.state.menu
navMenu() {
return this.$store.state.menu;
},
menuObj(){
return this.$store.state.menuObj
menuObj() {
return this.$store.state.menuObj;
},
navShow(){
return false||!['/','/404','/login'].includes(this.$route.path)
navShow() {
return false || !["/", "/404", "/login", "/register", "/password"].includes(this.$route.path);
},
pageShow(){
return false||!['/404','/login'].includes(this.$route.path)
pageShow() {
return false || !["/404", "/login", "/register", "/password"].includes(this.$route.path);
},
rowPath(){
if(this.pageShow&&this.$store.state.userInfo){
return this.menuObj[this.$route.path]&&this.menuObj[this.$route.path].rowPath
}else{
return ''
rowPath() {
if (this.pageShow && this.$store.state.userInfo) {
return this.menuObj[this.$route.path] && this.menuObj[this.$route.path].rowPath;
} else {
return "";
}
},
nowParent(){
if(this.pageShow&&this.$store.state.userInfo){
return this.rowPath?this.navMenu[this.rowPath.slice(1,2)]:''
}else{
return ''
nowParent() {
if (this.pageShow && this.$store.state.userInfo) {
return this.rowPath ? this.navMenu[this.rowPath.slice(1, 2)] : "";
} else {
return "";
}
},
menuShow() {
return false||!["/ui-example"].includes(this.$route.path)
}
return false || !["/ui-example"].includes(this.$route.path);
},
},
watch:{
msgBoxFlag(n,o){
this.readFlag = !this.readFlag
watch: {
msgBoxFlag(n, o) {
this.readFlag = !this.readFlag;
},
userInfo: {
handler() {
this.initMsg()
handler() {
this.initMsg();
},
deep: true,
}
},
},
data(){
return{
readFlag:false,
menuIndex:'',
}
data() {
return {
readFlag: false,
menuIndex: "",
};
},
created(){
created() {
// this.initMsg()
},
mounted() {
},
methods:{
mounted() {},
methods: {
openMsg(data) {
this.readFlag = !this.readFlag;
},
initMsg() {
if(this.userInfo && this.userInfo.system_id) {
this.$trace.setOptionValue('userId',this.userInfo.system_id)
if (this.userInfo && this.userInfo.system_id) {
this.$trace.setOptionValue("userId", this.userInfo.system_id);
// this.$trace.setOptionValue('userType',this.userInfo.userType)
// this.$trace.setOptionValue('roleId',this.userInfo.roleIds.join(','))
this.$trace.setOptionValue('organization',this.userInfo.organization_id)
this.$trace.setOptionValue("organization", this.userInfo.organization_id);
}
},
pathToData(data,path){
let arr = path.split('.')
let temp = null
let tempName = ''
let tempPath = ''
arr.forEach((e,idx) => {
if(idx==1){
temp = data[e]
tempName = data[e].menuName
tempPath = data[e].path
data = data[e]
pathToData(data, path) {
let arr = path.split(".");
let temp = null;
let tempName = "";
let tempPath = "";
arr.forEach((e, idx) => {
if (idx == 1) {
temp = data[e];
tempName = data[e].menuName;
tempPath = data[e].path;
data = data[e];
}
if(idx==2){
if(data.children&&data.children.length){
temp = data.children[e]
data = data.children[e]
if (idx == 2) {
if (data.children && data.children.length) {
temp = data.children[e];
data = data.children[e];
}
}
});
return {
menuName:tempName,
path:tempPath,
children:[temp]
}
menuName: tempName,
path: tempPath,
children: [temp],
};
},
highlightParentRule(pathArr){
return pathArr.includes(this.$route.path)
highlightParentRule(pathArr) {
return pathArr.includes(this.$route.path);
},
ada(){
}
}
}
ada() {},
},
};
</script>
<style>
#app{
#app {
height: 100%;
}
.container{
.container {
width: 100%;
height: calc(100% - 56px);
overflow: hidden;
......@@ -157,10 +171,10 @@ export default {
.full_screen .bg-main {
overflow-x: hidden;
}
.con-nav{
.con-nav {
float: left;
}
.view{
.view {
height: 100%;
overflow-y: auto;
background-color: #ebedf2;
......
......@@ -9,7 +9,7 @@
}
/* 返回按钮颜色 */
.from_return>.el-button--primary {
.from_return > .el-button--primary {
background-color: #edf0ff !important;
border-color: #edf0ff !important;
color: #264dd9 !important;
......@@ -71,12 +71,15 @@
cursor: pointer;
}
.space_bet {}
.space_bet {
}
/* reset */
html {}
html {
}
html,body {
html,
body {
margin: 0;
font-family: Microsoft YaHei, sans-serif;
/* font-size: 17px; */
......@@ -101,16 +104,16 @@ h5 {
font-weight: normal;
}
h1{
h1 {
font-size: 32px;
}
h2{
h2 {
font-size: 24px;
}
h3{
h3 {
font-size: 18.7px;
}
h4{
h4 {
font-size: 16px;
}
......@@ -154,7 +157,7 @@ div {
align-items: flex-start;
}
.ss_card>.sc_left_container {
.ss_card > .sc_left_container {
width: 6rem;
height: 6rem;
flex-shrink: 0;
......@@ -163,19 +166,19 @@ div {
font-size: 0;
}
.ss_card>.sc_right_container {
.ss_card > .sc_right_container {
width: calc(100% - 7rem);
flex-grow: 1;
margin-left: 1.2rem;
}
.ss_card>.sc_right_container>.sc_title {
.ss_card > .sc_right_container > .sc_title {
font-size: 1.6rem;
font-weight: bold;
line-height: 2.6rem;
}
.ss_card>.sc_right_container>.sc_info {
.ss_card > .sc_right_container > .sc_info {
display: flex;
justify-content: space-between;
}
......@@ -202,13 +205,13 @@ div {
position: relative;
}
.from_return>.el-button--primary {
.from_return > .el-button--primary {
position: absolute;
top: 15px;
left: 20px;
}
.from_return>span {
.from_return > span {
color: #1a2236;
font-size: 16px;
}
......@@ -279,6 +282,7 @@ div {
color: #404a62;
text-align: center;
padding: 0 16px;
line-height: 1;
}
.dialog_box .el-dialog__body {
padding: 24px;
......@@ -337,8 +341,8 @@ div {
height: 36px;
}
.el-tree-node__content:hover {
background-image: linear-gradient(90deg,
rgba(255, 255, 255, 0.05) 83%,
background-image: linear-gradient(90deg,
rgba(255, 255, 255, 0.05) 83%,
rgba(0, 0, 0, 0.05) 86%);
} */
/* .usrrole .el-tree-node:focus>.el-tree-node__content{
......@@ -566,7 +570,7 @@ border-radius:8px;
z-index: 20000 !important;
}
/*
/*
下拉选样式
此处勿删,apaasV3下拉选择样式统一用这个
*/
......@@ -621,7 +625,7 @@ border-radius:8px;
background-color: #fff;
}
.el-radio__input.is-checked+.el-radio__label {
.el-radio__input.is-checked + .el-radio__label {
color: #1a2236;
font-weight: 700;
}
......@@ -674,18 +678,18 @@ border-radius:8px;
}
/* common */
.apass_breadcrumb>.el-breadcrumb {
.apass_breadcrumb > .el-breadcrumb {
padding: 10px 0;
}
.apass_breadcrumb>.el-breadcrumb .el-breadcrumb__inner {
.apass_breadcrumb > .el-breadcrumb .el-breadcrumb__inner {
font-size: 14px;
font-weight: 400;
color: #898d9e;
line-height: 23px;
}
.apass_breadcrumb>.el-breadcrumb .el-breadcrumb__item:last-child .el-breadcrumb__inner {
.apass_breadcrumb > .el-breadcrumb .el-breadcrumb__item:last-child .el-breadcrumb__inner {
color: #242c43;
font-weight: normal;
}
......@@ -771,8 +775,7 @@ border-radius:8px;
border-color: #ebeef5;
}
.apass_table .el-table th>.cell {
.apass_table .el-table th > .cell {
color: #1a2236;
}
......@@ -851,7 +854,7 @@ border-radius:8px;
border-color: #515fe7;
}
.apass_checkbox .el-checkbox__input.is-checked+.el-checkbox__label {
.apass_checkbox .el-checkbox__input.is-checked + .el-checkbox__label {
color: #58617a;
}
......@@ -934,7 +937,7 @@ border-radius:8px;
margin-top: 50px;
}
.apaas_detail_container .detail_action .el-button+.el-button {
.apaas_detail_container .detail_action .el-button + .el-button {
margin-left: 30px;
}
......@@ -1005,7 +1008,7 @@ border-radius:8px;
width: 124px;
}
.apaas_steps .apaas_step .apaas_step_action .el-button+.el-button {
.apaas_steps .apaas_step .apaas_step_action .el-button + .el-button {
margin-left: 20px;
}
......@@ -1017,7 +1020,7 @@ border-radius:8px;
flex-grow: 1;
font-size: 0;
}
.filter_list>.filter_item {
.filter_list > .filter_item {
display: flex;
align-items: center;
margin: 0 34px 16px 0;
......@@ -1028,7 +1031,7 @@ border-radius:8px;
vertical-align: middle;
} */
.filter_list>.filter_item>.filter_title {
.filter_list > .filter_item > .filter_title {
text-align: right;
font-size: 14px;
color: #242c43;
......@@ -1058,14 +1061,14 @@ border-radius:8px;
text-align: right;
}
.filter_action>.el-button {
.filter_action > .el-button {
/* min-width: 90px; */
height: 36px;
margin-top: 16px;
padding: 12px 17px;
}
.filter_action>.el-button+.el-button {
.filter_action > .el-button + .el-button {
margin-left: 10px;
}
......@@ -1104,7 +1107,7 @@ border-radius:8px;
margin-top: 5px;
}
.meassage_detail_dialog .detail_item .full_content>.apaas_scroll {
.meassage_detail_dialog .detail_item .full_content > .apaas_scroll {
height: 176px;
overflow: auto;
}
......@@ -1122,7 +1125,7 @@ border-radius:8px;
/* 详情页公共样式 by xuyiming ~~~end */
/*
/*
form_content
*/
.from_content1 {
......@@ -1279,11 +1282,11 @@ border-radius:8px;
.el-date-table td.in-range div:hover,
.el-date-table.is-week-mode .el-date-table__row.current div,
.el-date-table.is-week-mode .el-date-table__row:hover div {
background-color: #eff2fa!important;
background-color: #eff2fa !important;
}
.el-date-table td.end-date .el-date-table-cell__text,
.el-date-table td.end-date .el-date-table-cell__text,
.el-date-table td.start-date .el-date-table-cell__text {
background-color: #3759be!important;
background-color: #3759be !important;
}
.el-date-table td.end-date span,
.el-date-table td.start-date span {
......@@ -1463,8 +1466,6 @@ border-radius:8px;
padding-right: 10px;
}
.page_container {
width: 100%;
padding: 0 24px;
......@@ -1476,11 +1477,10 @@ border-radius:8px;
align-items: stretch;
}
.page_content {
background-color: #fff;
height: calc(100% - 46px - 20px);
box-shadow: 0px 1px 4px 0px
rgba(0, 7, 101, 0.15);
border-radius: 6px;
background-color: #fff;
height: calc(100% - 46px - 20px);
box-shadow: 0px 1px 4px 0px rgba(0, 7, 101, 0.15);
border-radius: 6px;
}
.flex_row {
......@@ -1496,19 +1496,16 @@ border-radius:8px;
overflow: hidden;
}
.flex_right {
height: calc(100% - 16px);
flex: 1;
overflow: hidden;
}
.bgc_white {
box-shadow: 0px 1px 4px 0px
rgba(0, 7, 101, 0.15);
border-radius: 6px;
box-shadow: 0px 1px 4px 0px rgba(0, 7, 101, 0.15);
border-radius: 6px;
background-color: #fff;
}
.tree::-webkit-scrollbar {
......@@ -1532,7 +1529,7 @@ border-radius:8px;
}
.header_info {
font-size: 14px;
color: #404a62;
color: #404a62;
padding-left: 20px;
}
.fr {
......@@ -1546,8 +1543,8 @@ border-radius:8px;
color: #404a62;
}
.icon_eye {
font-size: 12px;
color: #a9b1c7;
font-size: 12px;
color: #a9b1c7;
margin-right: 8px;
vertical-align: baseline;
cursor: pointer;
......@@ -1567,7 +1564,7 @@ border-radius:8px;
.warning_info {
background-color: #f7f7f9;
font-size: 14px;
color: #404a62;
color: #404a62;
padding: 5px;
text-align: left;
margin: 20px 0;
......@@ -1576,3 +1573,36 @@ border-radius:8px;
color: #d75138;
}
.register_btn {
display: flex;
align-items: center;
background-color: #eff2fa;
border-radius: 4px;
border: solid 1px #b0bee8;
color: #3759be;
}
.register_btn .icon-arrow-right {
margin-left: 39px;
}
.forget_psd {
font-size: 14px;
color: #3759be;
cursor: pointer;
}
.select-empty {
color: #616f94;
text-align: center;
padding: 20px;
}
.tip-image {
position: absolute;
right: -24px;
bottom: 9px;
width: 16px;
height: 16px;
margin-left: 8px;
background-image: url("../imgs/ic_tips.png");
background-size: contain;
}
<template>
<div class="gap-title">
<span>{{ title }}</span>
</div>
</template>
<script setup>
const props = defineProps({
title: {
type: [Number, String],
default: "",
},
});
</script>
<style scoped>
.gap-title {
font-size: 18px;
font-weight: 600;
color: #1a1a1a;
display: flex;
align-items: center;
margin-bottom: 20px;
}
.gap-title span {
margin-right: 8px;
}
.gap-title::before {
content: "";
display: inline-block;
margin-right: 8px;
width: 4px;
height: 14px;
background-color: #3759be;
border-radius: 2px;
}
/* .gap-title::after {
content: "";
display: inline-block;
flex: 1;
border-top: 1px dashed #dadee7;
} */
</style>
......@@ -50,9 +50,17 @@
</template>
<script setup>
import { watch, ref } from "vue";
import { watch, ref, nextTick } from "vue";
import { selectTableMixin } from "./hook/mixin-select-table";
let { nowSelectData, allSelectData, selectData, initSelectTableData, runPage, dealSelectData } = selectTableMixin();
const {
nowSelectData,
allSelectData,
initAllSelectData,
selectData,
initSelectTableData,
runPage,
dealSelectData,
} = selectTableMixin();
const props = defineProps({
height: {
......@@ -71,9 +79,6 @@ const props = defineProps({
type: Boolean,
default: false,
},
// selectable: {
// type: Function,
// },
isIndex: {
type: Boolean,
default: false,
......@@ -95,18 +100,34 @@ const props = defineProps({
default: false,
}, // 多选框是否禁用
canEditFlag: {
typr: Boolean,
type: String,
default: "",
}, // 决定多选框是否禁用的字段
indexWidth: {
type: Number,
default: 54,
},
//初始表格选中数据
originSelectedData: {
type: Array,
default: () => [],
},
});
const table = ref(null);
const emit = defineEmits(["selectAc", "select"]);
watch(
() => props.originSelectedData,
(val) => {
if (val.length) {
initAllSelectData(props.originSelectedData);
}
},
{
immediate: true,
}
);
watch(
() => props.rows,
(n, o) => {
......@@ -120,6 +141,9 @@ watch(
}
});
}
},
{
immediate: true,
}
);
......@@ -127,14 +151,19 @@ const toggleRowSelection = (row, flag = true) => {
table.value.toggleRowSelection(row, flag);
};
const selectAction = (selection) => {
emit("selectAc", { allLength: Object.keys(allSelectData).length + nowSelectData.length, selection });
nextTick(() => {
emit("selectAc", {
allLength: Object.keys(allSelectData.value).length + nowSelectData.value.length,
selection,
});
});
};
const clearSelection = () => {
table.value.clearSelection();
emit("select", { allLength: Object.keys(allSelectData).length + nowSelectData.length, selection: [] });
};
const setSelectedRow = (row) => {
toggleRowSelection(row);
emit("select", {
allLength: Object.keys(allSelectData.value).length + nowSelectData.value.length,
selection: [],
});
};
const toggleRowArrSelection = (arr, flag = true) => {
arr.forEach((e) => {
......@@ -143,16 +172,22 @@ const toggleRowArrSelection = (arr, flag = true) => {
};
const selectActionRow = (selection, row) => {
selectData(selection);
emit("select", { allLength: Object.keys(allSelectData).length + nowSelectData.length, selection });
emit("select", {
allLength: Object.keys(allSelectData.value).length + nowSelectData.value.length,
selection,
});
};
const selectActionAll = (selection) => {
selectData(selection);
emit("select", { allLength: Object.keys(allSelectData).length + nowSelectData.length, selection });
emit("select", {
allLength: Object.keys(allSelectData.value).length + nowSelectData.value.length,
selection,
});
};
const clearTable = () => {
//清除选中数据,在页面状态更新时使用
allSelectData = {};
nowSelectData = [];
allSelectData.value = {};
nowSelectData.value = [];
clearSelection();
};
const tableRowClassName = ({ row, rowIndex }) => {
......@@ -176,5 +211,6 @@ const selectable = (row, index) => {
defineExpose({
clearTable,
toggleRowSelection,
dealSelectData,
});
</script>
......@@ -11,9 +11,7 @@
@click="changeActiveName(item, index)">
{{ item.label }}
</li>
<li>
<!-- empty -->
</li>
</ul>
</div>
<div class="bg-tabs-content">
......
import { reactive, toRefs,useAttrs } from 'vue'
export function selectTableMixin(){
import { reactive, toRefs, useAttrs } from "vue";
export function selectTableMixin() {
const state = reactive({
nowSelectData:[],
allSelectData:{}
})
const attrs = useAttrs()
// const nowSelectData = reactive([])
// const allSelectData = reactive({})
nowSelectData: [],
allSelectData: {},
});
const selectData = (val)=>{
console.log(val);
state.nowSelectData = val
console.log('allSelectData');
console.log(state.allSelectData);
console.log(Object.keys(state.allSelectData).length);
}
const attrs = useAttrs();
// const nowSelectData = reactive([])
// const allSelectData = reactive({})
const initSelectTableData = (data)=>{
return new Promise((reslove,reject)=>{
data.forEach(e => {
if(state.allSelectData[e[attrs.rowKey||'id']]){
delete state.allSelectData[e[attrs.rowKey||'id']]
state.nowSelectData.push(e)
}
const selectData = (val) => {
state.nowSelectData = val;
};
//当某些表格有原始的选中数据时,初始化allSelectData
const initAllSelectData = (list) => {
list.forEach((e) => {
state.allSelectData[e[attrs.rowKey || "id"]] = e;
});
console.log(state.nowSelectData);
reslove(state.nowSelectData)
})
}
const runPage=()=>{//翻页数据推进
state.nowSelectData.forEach(e => {
state.allSelectData[e[attrs.rowKey||'id']] = e
});
state.nowSelectData = []
}
};
const initSelectTableData = (data) => {
return new Promise((reslove, reject) => {
data.forEach((e) => {
if (state.allSelectData[e[attrs.rowKey || "id"]]) {
delete state.allSelectData[e[attrs.rowKey || "id"]];
state.nowSelectData.push(e);
}
});
reslove(state.nowSelectData);
});
};
const clearTable=()=>{//清除选中数据,在页面状态更新时使用
state.allSelectData={}
state.nowSelectData=[]
clearSelection();
}
const runPage = () => {
//翻页数据推进
state.nowSelectData.forEach((e) => {
state.allSelectData[e[attrs.rowKey || "id"]] = e;
});
state.nowSelectData = [];
};
const dealSelectData=()=>{//最后提交处理数据
state.nowSelectData.forEach(e => {
state.allSelectData[e[attrs.rowKey||'id']] = e
});
return state.allSelectData
}
// const clearTable = () => {
// //清除选中数据,在页面状态更新时使用
// state.allSelectData = {};
// state.nowSelectData = [];
// clearSelection();
// };
const { nowSelectData, allSelectData } = toRefs(state)
const dealSelectData = () => {
//最后提交处理数据
const submitData = { ...state.allSelectData };
state.nowSelectData.forEach((e) => {
submitData[e[attrs.rowKey || "id"]] = e;
});
return submitData;
};
return{
nowSelectData,
allSelectData,
selectData,
initSelectTableData,
runPage,
clearTable,
dealSelectData
}
const { nowSelectData, allSelectData } = toRefs(state);
return {
nowSelectData,
allSelectData,
initAllSelectData,
selectData,
initSelectTableData,
runPage,
// clearTable,
dealSelectData,
};
}
// export const selectTableMixin = {
......@@ -88,7 +91,7 @@ return{
// this.nowSelectData.push(e)
// }
// });
// console.log(this.nowSelectData);
// if(this.nowSelectData.length){
// setTimeout(()=>{
......@@ -115,4 +118,4 @@ return{
// return this.allSelectData
// }
// },
// }
\ No newline at end of file
// }
/**
* 全局组件
*/
import BgIcon from './bg-icon.vue'
import BgNav from './bg-nav.vue'
import BgList from './bg-list.vue'
import BgDetail from './bg-detail.vue'
import BgFiltrate from './bg-filtrate.vue'
import BgTable from './bg-table.vue'
import BgTablePro from './bg-table-pro.vue'
import BgTableBtn from './bg-table-btn.vue'
import BgTabs from './bg-tabs.vue'
import BgTab from './bg-tab.vue'
import BgLayoutCard from './bg-layout-card.vue'
import BgCard from './bg-card.vue'
import BgInfo from './bg-info.vue'
import BgBtns from './bg-btns.vue'
import BgUpload from './bg-upload.vue'
import BgUploadImage from './bg-upload-image.vue'
import BgTags from './bg-tags.vue'
import BgSwitch from './bg-switch.vue'
import BgRichText from './bg-rich-text.vue'
import BgCodeEditor from './bg-code-editor.vue'
import BgFilter from './bg-filter.vue'
import BgSort from './bg-sort.vue'
import BgFilterDate from './bg-filter-date.vue'
import bgUserUploadImage from './bg-user-upload-image.vue'
import bgDetailTable from './bg-detail-table.vue'
import bgDetailTable2 from './bg-detail-table2.vue'
import debounce from './debounce'
import BgPagination from './bg-pagination.vue'
import BgInnerTabs from './bg-inner-tabs.vue'
import BgFilterGroup from './bg-filter-group.vue'
import BgSwitchEle from './bg-switch-ele.vue'
import BgTableBtns from './bg-table-btns.vue'
import BgTableBtns2 from './bg-table-btns2.vue'
import BgPermission from './bg-permission.vue'
import BgIcon from "./bg-icon.vue";
import BgNav from "./bg-nav.vue";
import BgList from "./bg-list.vue";
import BgDetail from "./bg-detail.vue";
import BgFiltrate from "./bg-filtrate.vue";
import BgTable from "./bg-table.vue";
import BgTablePro from "./bg-table-pro.vue";
import BgTableBtn from "./bg-table-btn.vue";
import BgTabs from "./bg-tabs.vue";
import BgTab from "./bg-tab.vue";
import BgLayoutCard from "./bg-layout-card.vue";
import BgCard from "./bg-card.vue";
import BgInfo from "./bg-info.vue";
import BgBtns from "./bg-btns.vue";
import BgUpload from "./bg-upload.vue";
import BgUploadImage from "./bg-upload-image.vue";
import BgTags from "./bg-tags.vue";
import BgSwitch from "./bg-switch.vue";
import BgRichText from "./bg-rich-text.vue";
import BgCodeEditor from "./bg-code-editor.vue";
import BgFilter from "./bg-filter.vue";
import BgSort from "./bg-sort.vue";
import BgFilterDate from "./bg-filter-date.vue";
import bgUserUploadImage from "./bg-user-upload-image.vue";
import bgDetailTable from "./bg-detail-table.vue";
import bgDetailTable2 from "./bg-detail-table2.vue";
import debounce from "./debounce";
import BgPagination from "./bg-pagination.vue";
import BgInnerTabs from "./bg-inner-tabs.vue";
import BgFilterGroup from "./bg-filter-group.vue";
import BgSwitchEle from "./bg-switch-ele.vue";
import BgTableBtns from "./bg-table-btns.vue";
import BgTableBtns2 from "./bg-table-btns2.vue";
import BgPermission from "./bg-permission.vue";
import BgFormGap from "./bg-form-gap.vue";
const components = {
BgIcon,//字体图标
BgIcon, //字体图标
BgNav, // 左侧导航
BgList, // 列表页布局
BgDetail, // 详情页布局
......@@ -56,21 +57,22 @@ const components = {
BgTags, // 标签
BgSwitch, // 开关
BgRichText, // 富文本
BgCodeEditor,//代码输入
BgCodeEditor, //代码输入
BgFilter, // 首页筛选
BgSort, // 首页排序
BgFilterDate,
bgUserUploadImage,
bgDetailTable,//详情展示组件1
bgDetailTable2,//详情展示组件2
debounce,//防抖组件
BgPagination,// 分页组件
BgInnerTabs,//内部tab
BgFilterGroup,//高级搜索
BgSwitchEle,// 基于element-plus封装的switch
BgTableBtns,// 表格按钮组
BgPermission,// 菜单选择
bgDetailTable, //详情展示组件1
bgDetailTable2, //详情展示组件2
debounce, //防抖组件
BgPagination, // 分页组件
BgInnerTabs, //内部tab
BgFilterGroup, //高级搜索
BgSwitchEle, // 基于element-plus封装的switch
BgTableBtns, // 表格按钮组
BgPermission, // 菜单选择
BgTableBtns2, // 表格按钮组-新
BgFormGap,
};
const install = (Vue) => {
......
......@@ -840,7 +840,7 @@ a {
.bg-tabs {
background-color: #ffffff;
box-shadow: 0px 6px 12px 0px rgba(0, 20, 53, 0.3);
box-shadow: 0px 4px 16px 0px rgba(18, 30, 0.03, 0.08);
border-radius: 12px;
overflow: hidden;
......@@ -865,9 +865,10 @@ a {
align-items: center;
padding: 8px;
border-bottom: 1px solid #e6e9ef;
font-size: 16px;
font-size: 20px;
line-height: 25px;
color: #404a62;
color: #616f94;
background: #f7f7f9;
cursor: pointer;
&.current {
......@@ -877,18 +878,19 @@ a {
border-right: 1px solid #e6e9ef;
border-bottom: 1px solid #fff;
border-left: 1px solid #e6e9ef;
color: #e56600;
color: #3759be;
background-color: #fff;
overflow: hidden;
&::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 4px;
background-color: #e56600;
}
// &::before {
// content: "";
// position: absolute;
// top: 0;
// left: 0;
// width: 100%;
// height: 4px;
// background-color: #e56600;
// }
}
&:first-child {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import {createI18n} from 'vue-i18n'
import {createI18n} from 'vue-i18n/index'
import lang from './index'
const i18n = createI18n({
......
import { createApp } from 'vue'
import { createApp } from "vue";
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import locale from 'element-plus/lib/locale/lang/zh-cn'
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import locale from "element-plus/lib/locale/lang/zh-cn";
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import bgui from "@/bg-ui";
import "@/bg-ui/index.scss";
import msgSdk from './msg-sdk/index.js';
import msgSdk from "./msg-sdk/index.js";
import App from './App.vue'
import App from "./App.vue";
import router from './router'
import {generateRoutes} from './router/index.js'
import router from "./router";
import { generateRoutes } from "./router/index.js";
import "../src/assets/css/font.css";
import "../src/assets/css/index.css";
import "../src/assets/item.css";
import '../src/assets/css/font.css'
import '../src/assets/css/index.css'
import '../src/assets/item.css'
import store from "@/store";
import store from '@/store';
import i18n from "./i18n/i18n.js";
import i18n from './i18n/i18n.js'
import axios from "./request/http.js";
import axios from './request/http.js'
const createVue = createApp(App)
createVue.use(ElementPlus, { locale });
const createVue = createApp(App);
// createVue.use(ElementPlus, { locale });
function getMsgAppid() {
axios.get(`/apaas/system/v5/message/account`).then(res => {
axios.get(`/apaas/system/v5/message/account`).then((res) => {
if (res.data.code == 200) {
createVue.use(msgSdk, {
requestUrl: 'https://msg.wodcloud.com', // 请求地址
requestUrl: "https://msg.wodcloud.com", // 请求地址
appID: decodeURIComponent(escape(window.atob(res.data.data.app_id))), // 应用id
secretKey: decodeURIComponent(escape(window.atob(res.data.data.secret_key))), // 应用密钥
userId: '',
userType: '',
roleId: '',
organization: '',
})
userId: "",
userType: "",
roleId: "",
organization: "",
});
}
})
});
}
// getMsgAppid()
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
createVue.component(key, component)
createVue.component(key, component);
}
createVue.config.globalProperties.$axios = axios
createVue.config.globalProperties.$axios = axios;
import menu from './router/function.js'
import menu from "./router/function.js";
//获取用户信息
function getUser() {
return axios.get(`/apaas/system/v5/user/getUserInfo`)
return axios.get(`/apaas/system/v5/user/getUserInfo`);
}
//获取用户菜单信息
function getMenu(search) {
return axios.get(`/apaas/system/v5/menu/user/tree?search=${search}`)
return axios.get(`/apaas/system/v5/menu/user/tree?search=${search}`);
}
//处理菜单成为对象
function getMenuObj(menu,parentRowPath,menuObj){
menu.forEach((e,idx) => {
e.rowPath = parentRowPath + '.' + idx
menuObj[e.path] = e
if(e.children&&e.children.length){
getMenuObj(e.children,e.rowPath,menuObj)
function getMenuObj(menu, parentRowPath, menuObj) {
menu.forEach((e, idx) => {
e.rowPath = parentRowPath + "." + idx;
menuObj[e.path] = e;
if (e.children && e.children.length) {
getMenuObj(e.children, e.rowPath, menuObj);
}
});
}
Promise.all([getUser(),getMenu('dadb2d3f-e263-48d1-9389-42acb9ea49f8')]).then(res => {
if (res[0].data.code == 200&&res[1].data.code == 200) {
store.commit("setWhiteList", ["/", "/login", "/register", "/password"]);
Promise.all([getUser(), getMenu("dadb2d3f-e263-48d1-9389-42acb9ea49f8")])
.then((res) => {
if (res[0].data.code == 200 && res[1].data.code == 200) {
//已登录则记录菜单和用户信息
let data = res[1].data.data&&res[1].data.data[0].children||[]
store.commit('setUserInfo', res[0].data.data)
let data = (res[1].data.data && res[1].data.data[0].children) || [];
store.commit("setUserInfo", res[0].data.data);
// if (res[0].data.data.userType == 1) {//超管
store.commit('setMenu', data)
menu.menuToRouter(data)
store.commit('setRoute',data)
//存储菜单对象信息
let menuObj = {}
getMenuObj(data,'',menuObj)
store.commit('setMenuObj',menuObj)
store.commit("setMenu", data);
menu.menuToRouter(data);
store.commit("setRoute", data);
//存储菜单对象信息
let menuObj = {};
getMenuObj(data, "", menuObj);
store.commit("setMenuObj", menuObj);
// }
}
generateRoutes()
createVue.use(ElementPlus).use(store).use(router).use(i18n).use(bgui)
createVue.mount('#app')
}).catch(() => {
createVue.use(ElementPlus).use(store).use(router).use(i18n).use(bgui)
createVue.mount('#app')
generateRoutes();
})
.catch((e) => {
console.error(e);
})
.finally(() => {
createVue.use(ElementPlus, { locale }).use(store).use(router).use(i18n).use(bgui);
createVue.mount("#app");
});
//后期加入权限处理,参考msg/ui
<template>
<div class="login-container">
<div class="bg-main">
<div class="bg-logo">
<div
class="login-container"
:style="{
'background-image': `url(${
configOptions.backgroundUrl
? JSON.parse(configOptions.backgroundUrl)[0].url
: getImageUrl('bg.png')
})`,
}">
<el-alert
class="bg-warning"
title="系统有效期剩余345 天,请管理员及时更换license!"
type="warning" />
<div class="bg-main">
<!-- <div class="bg-logo">
<img class="logo" src="../../assets/imgs/login_img_logo.png" />
<!-- <span>BD-aPaaS</span> -->
</div>
<div class="bg-content">
<bg-tabs
class="login-tab"
v-model="loginTab"
style="min-height: 450px;"
v-if="pageType === 'login'"
>
<bg-tab label="账号密码登录" name="account">
<LoginByAccount @register="switchPageType('register')" />
</bg-tab>
</bg-tabs>
</div>
</div> -->
<div class="bg-content">
<bg-tabs
class="login-tab"
v-model="loginTab"
style="width: 480px"
v-if="pageType === 'login'">
<bg-tab label="账号密码登录" name="account">
<LoginByAccount @register="switchPageType('account')" @password="password" />
</bg-tab>
<bg-tab label="验证码登录" name="register">
<LoginByCode @register="switchPageType('register')" @password="password" />
</bg-tab>
</bg-tabs>
</div>
<p class="bg-msg" v-if="pageType !== 'register'">
登录即代表您已同意 <span>《BD-aPaaS平台用户协议与隐私政策》</span>
</div>
<!-- v-if="pageType !== 'register'" -->
<div class="bg-msg">
<p v-if="configOptions && configOptions.patent">{{ configOptions.patent }}</p>
<p v-if="configOptions">
<span class="can_click_text" @click="open(configOptions.icpUrl)">
{{ configOptions.icpFiling }} |
</span>
<span class="can_click_text" @click="open(configOptions.publicSecurityUrl)">
{{ configOptions.publicSecurityFiling }}
</span>
</p>
<p>
<span class="can_click_text" @click="open(configOptions.legalStatementUrl)">法律声明</span>
|
<span class="can_click_text" @click="open(configOptions.privacyPolicyUrl)">隐私政策</span>
</p>
</div>
</template>
<script>
import LoginByAccount from "@/components/login-by-account.vue";
// import LoginByCode from "@/components/login-by-code.vue";
// import RegisterPersonalUser from "@/components/register-personal-user.vue";
// import RegisterFrimUser from "@/components/register-firm-user.vue";
// import RegisterOrgUser from "@/components/register-org-user.vue";
// import RegisterSuccess from "@/components/register-success.vue";
export default {
name: "Index",
components: {
LoginByAccount,
// LoginByCode,
// RegisterPersonalUser,
// RegisterFrimUser,
// RegisterOrgUser,
// RegisterSuccess,
},
data() {
return {
pageType: "login", // login(登录) / register(注册) / success(认证)
loginTab: "account", // account(账号密码登录) / or register(短信验证码登录)
registerTab: "personal", // personal(个人用户) / firm(企业用户) / org(政府机构用户)
};
},
methods: {
switchPageType(type) {
this.pageType = type;
},
},
};
</script>
<style lang="scss" scoped>
.login-container {
width: 100vw;
height: calc(100vh - 56px);
background-image: url("@/assets/imgs/login_ysgz.jpg");
background-size: cover;
background-position: center center;
position: relative;
.bg-main {
position: absolute;
top: 50%;
right: 0;
margin-right: 16vw;
margin-bottom: 80px;
transform: translateY(calc(-50%));
width: 500px;
max-height: calc(100vh - 100px);
overflow: hidden auto;
&::-webkit-scrollbar {
width: 16px;
height: 1px;
}
/* &::-webkit-scrollbar-track {
<el-dialog class="dialog_box" title="提示" v-model="dialogPasswordChange" width="400px">
<div>密码已过期,请修改密码后再次登录</div>
<template v-slot:footer>
<div class="apaas_button">
<el-button type="primary" @click="password">立即修改</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup>
import LoginByAccount from "@/components/login-by-account.vue";
import LoginByCode from "@/components/login-by-code.vue";
import axios from "axios";
import { ElMessage } from "element-plus";
import { ref, onBeforeMount, onMounted } from "vue";
import { useRouter } from "vue-router";
import store from "../../store";
import { getImageUrl } from "@/services/helper.js";
const router = useRouter();
const pageType = ref("login");
const loginTab = ref("account");
const configOptions = ref({});
const dialogPasswordChange = ref(false);
const switchPageType = (type) => {
// pageType.value = type
router.push("/register");
};
const password = () => {
router.push("/password");
};
const getLoginPageConfig = () => {
axios.get(`/apaas/system/v5/login/loginDetail`).then((res) => {
if (res.data.code == 200) {
configOptions.value = res.data.data || null;
store.commit("setSystemLogo", configOptions.value.logoUrl);
} else {
ElMessage.error(res.data.data);
}
});
};
const open = (url) => {
if (url !== "") {
window.open(url);
} else {
return;
}
};
onBeforeMount(() => {
getLoginPageConfig();
});
</script>
<style lang="scss" scoped>
.login-container {
width: 100vw;
height: calc(100vh - 56px);
background-image: url("@/assets/imgs/bg.png");
background-size: 100% 100%;
background-position: center center;
background-size: cover;
position: relative;
.bg-main {
position: absolute;
top: calc(50vh - 250px);
right: calc(28vw - 240px);
width: 500px;
max-height: calc(100vh - 100px);
overflow: hidden auto;
&::-webkit-scrollbar {
width: 16px;
height: 1px;
}
/* &::-webkit-scrollbar-track {
border-radius: 8px;
box-shadow: 8px 0 0 #f4f4f4 inset;
border: 4px solid rgba(0, 0, 0, 0);
} */
&::-webkit-scrollbar-thumb {
border-radius: 8px;
box-shadow: 8px 0 0 #a5adb7 inset;
border: 4px solid rgba(0, 0, 0, 0);
&::-webkit-scrollbar-thumb {
border-radius: 8px;
box-shadow: 8px 0 0 #a5adb7 inset;
border: 4px solid rgba(0, 0, 0, 0);
}
> .bg-logo {
display: flex;
justify-content: center;
align-items: center;
.logo {
width: 450px;
}
> .bg-logo {
display: flex;
justify-content: center;
align-items: center;
.logo{
width: 450px;
}
> span {
font-size: 36px;
color: #ffffff;
margin-left: 25px;
}
> span {
font-size: 36px;
color: #ffffff;
margin-left: 25px;
}
> .bg-content {
}
.bg-content {
:deep(.bg-tabs-content) {
padding: 32px 0;
}
}
> .bg-msg {
position: absolute;
bottom: 70px;
left: 0;
width: 100%;
font-size: 14px;
line-height: 20px;
color: #bcc1d0;
text-align: center;
> span {
color: #fff;
cursor: pointer;
:deep(.el-form) {
.el-form-item {
.el-input,
.el-button {
height: 40px;
}
}
}
}
</style>
\ No newline at end of file
> .bg-warning {
text-align: center;
background-color: #fdf4e2;
color: #e56600;
font-size: 14px;
height: 32px;
line-height: 32px;
display: flex;
justify-content: center;
}
> .bg-msg {
position: absolute;
bottom: 10px;
left: 0;
width: 100%;
font-size: 14px;
line-height: 20px;
color: #616f94;
text-align: center;
> p {
padding: 8px 0;
}
}
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -28,11 +28,11 @@
<bg-filter-group @search="changeSearch" v-model="filter.search" placeholder="请输入关键字">
<template v-slot:left_action v-if="nodeClassifyId != '263758a4-0349-4d49-a816-e8ff8d33a8bb'">
<div class="apaas_button">
<el-button class="register_btn" type="primary" @click="backDict" v-if="dictLevel != 1">
<el-button type="primary" @click="backDict" v-if="dictLevel != 1">
<!-- <bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon> -->
返回上级
</el-button>
<el-button class="register_btn" type="primary" @click="register">
<el-button type="primary" @click="register">
<bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon>
新增
</el-button>
......
<!-- 角色管理 -->
<template>
<div class="page_container">
<bg-breadcrumb></bg-breadcrumb>
<div class="main_container">
<div class="form_content apaas_scroll_nor">
<el-form ref="refForm" :model="formData" :rules="rules" label-width="96px" class="registerForm">
<el-form-item label="LOGO" prop="logoUrl">
<bg-upload-image
v-model="formData.logoUrl"
:showTips="true"
customTips="请选择图片上传:支持jpg、png等格式,图片需小于500KB"
:fileSize="500"
:fileSizeUnit="'KB'"
:limit="1"
listType="picture-card"
@change="changeLogo"
:accept="['.jpg', '.jpeg', '.png']"></bg-upload-image>
</el-form-item>
<el-form-item label="登录背景图" prop="backgroundUrl">
<bg-upload-image
v-model="formData.backgroundUrl"
:fileSize="2"
:showTips="true"
customTips="请选择图片上传:大小1920 * 1026像素支持jpg、png等格式,图片需小于2MB"
:limit="1"
listType="picture-card"
@change="changeBanner"
:accept="['.jpg', '.jpeg', '.png']"></bg-upload-image>
</el-form-item>
<bg-form-gap title="底部所有权内容"></bg-form-gap>
<el-form-item label="内容" prop="patent">
<el-input
v-model.trim="formData.patent"
placeholder="例如:Copyright © 某某大数据, All Rights Reserved."></el-input>
</el-form-item>
<bg-form-gap title="底部ICP备案"></bg-form-gap>
<el-form-item label="内容" prop="icpFiling">
<el-input placeholder="请输入" v-model.trim="formData.icpFiling"></el-input>
</el-form-item>
<el-form-item label="跳转连接" prop="icpUrl">
<el-input placeholder="例如:https://...或http://..." v-model.trim="formData.icpUrl"></el-input>
</el-form-item>
<bg-form-gap title="底部公安网备案"></bg-form-gap>
<el-form-item label="内容" prop="publicSecurityFiling">
<el-input placeholder="请输入" v-model.trim="formData.publicSecurityFiling"></el-input>
</el-form-item>
<el-form-item label="跳转连接" prop="publicSecurityUrl">
<el-input placeholder="例如:https://...或http://..." v-model.trim="formData.publicSecurityUrl"></el-input>
</el-form-item>
<bg-form-gap title="法律声明"></bg-form-gap>
<el-form-item label="跳转连接" prop="legalStatementUrl">
<el-input placeholder="例如:https://...或http://..." v-model.trim="formData.legalStatementUrl"></el-input>
</el-form-item>
<bg-form-gap title="隐私政策"></bg-form-gap>
<el-form-item label="跳转连接" prop="privacyPolicyUrl">
<el-input placeholder="例如:https://...或http://..." v-model.trim="formData.privacyPolicyUrl"></el-input>
</el-form-item>
</el-form>
</div>
<div class="operate_btns">
<el-button type="primary" @click="save"> 保存 </el-button>
</div>
</div>
</div>
</template>
<script setup>
import { reactive, toRefs, ref, onBeforeMount, nextTick } from "vue";
import axios from "../../../../request/http.js";
import { ElMessage } from "element-plus";
import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
import { validateLink } from "@/services/rules.js";
import store from "../../../../store";
const refForm = ref(null);
const state = reactive({
formData: {
logoUrl: [],
backgroundUrl: [],
patent: "",
icpFiling: "",
icpUrl: "",
publicSecurityFiling: "",
publicSecurityUrl: "",
legalStatementUrl: "",
privacyPolicyUrl: "",
}, //表单数据
rules: {
logoUrl: [{ required: true, message: "请上传Logo", trigger: "change" }],
backgroundUrl: [{ required: true, message: "请上传背景图", trigger: "change" }],
icpUrl: [{ validator: validateLink, trigger: "blur" }],
publicSecurityUrl: [{ validator: validateLink, trigger: "blur" }],
legalStatementUrl: [{ validator: validateLink, trigger: "blur" }],
privacyPolicyUrl: [{ validator: validateLink, trigger: "blur" }],
}, //表单校验规则
});
const changeLogo = (value) => {
if (value && value.length > 0) {
refForm.value.clearValidate("logoUrl");
}
};
const changeBanner = (value) => {
if (value && value.length > 0) {
refForm.value.clearValidate("backgroundUrl");
}
};
const save = () => {
refForm.value.validate((valid) => {
if (valid) {
let params = {
...state.formData,
};
params.logoUrl = JSON.stringify(params.logoUrl);
params.backgroundUrl = JSON.stringify(params.backgroundUrl);
axios.put(`/apaas/system/v5/login/updateLogin`, params).then((res) => {
if (res.data.code == 200) {
ElMessage.success(res.data.msg);
getLoginPageConfig();
} else {
ElMessage.error(res.data.data);
}
});
} else {
ElMessage.error("请先将表单填写完整");
}
});
};
const getLoginPageConfig = () => {
axios.get(`/apaas/system/v5/login/loginDetail`).then((res) => {
if (res.data.code == 200) {
let data = res.data.data;
store.commit("setSystemLogo", data.logoUrl);
data.logoUrl = data.logoUrl ? JSON.parse(data.logoUrl) : [];
data.backgroundUrl = data.backgroundUrl ? JSON.parse(data.backgroundUrl) : [];
Object.assign(state.formData, data);
} else {
ElMessage.error(res.data.data);
}
});
};
onBeforeMount(() => {
getLoginPageConfig();
});
const { formData, rules } = toRefs(state);
</script>
<style lang="scss" scoped>
.page_container {
.main_container {
position: relative;
margin: 0 0 16px;
width: 100%;
height: calc(100% - 62px);
padding: 32px 0 70px;
overflow: auto;
background-color: #fff;
box-shadow: 0px 1px 4px 0px rgba(0, 7, 101, 0.15);
border-radius: 6px;
.form_content {
overflow: auto;
height: 100%;
padding-left: 24px;
.el-form {
width: 60%;
:deep() .el-form-item {
&:nth-of-type(1) {
.el-upload--picture-card {
width: 120px;
height: 120px;
}
}
&:nth-of-type(2) {
.el-upload--picture-card {
width: 367px;
height: 196px;
}
}
}
}
:deep() .gap-title {
font-size: 16px;
color: #202531;
}
}
.operate_btns {
position: absolute;
bottom: 0;
width: 100%;
height: 70px;
text-align: right;
line-height: 68px;
border-top: solid 1px #e6e9ef;
.el-button {
width: 92px;
margin-right: 16px;
}
}
}
}
</style>
This diff is collapsed.
......@@ -51,22 +51,6 @@ const checkPhone = (rule, value, callback) => {
});
};
// const checkPhoneRepet = (rule, value, callback) => {
// let params = null;
// if (props.id){
// params = {id: parseInt(props.id),contact_phone: value,}
// }else {
// params = {id: 0,contact_phone: value}
// }
// $axios.post(`/apaas/system/v5/org/check`,params)
// .then((res) => {
// if (res.data.code == 200) {
// callback()
// }else {
// callback(new Error(res.data.data))
// }
// })
// }
const checkName = (rule, value, callback) => {
var reg = /^[a-zA-Z0-9\u4e00-\u9fa5]+$/;
......@@ -86,7 +70,6 @@ const contactFormRules = reactive({
contact_phone: [
{ required: true, message: "请输入联系人手机号", trigger: "blur" },
{ validator: checkPhone, trigger: "blur" },
// { validator: checkPhoneRepet, trigger: 'blur' }
],
contact_email: [
{ type: "email", message: "请输入正确的邮箱", trigger: "blur" },
......
......@@ -114,6 +114,7 @@ const formData = reactive({
logo: "",
system_role_id: "",
system_account: "",
system_phone: "",
password: "",
confirm_password: "",
access_address: "",
......@@ -213,6 +214,7 @@ const getDetail = () => {
business_name: form.business_name,
business_desc: form.business_desc,
system_account: form.system_account,
system_phone: form.system_phone,
access_address: form.access_address,
develop_id: form.develop_id,
state: form.state,
......
......@@ -22,13 +22,28 @@
<el-input v-model="systemForm.business_name" />
</el-form-item>
<el-form-item label="AppId" prop="appid" v-if="formType">
<el-input v-model="systemForm.appid" :disabled="formType" style="width: 80%" />
<span class="pl-1"><el-button type="primary" @click="copyText(systemForm.appid)">复制</el-button></span>
<el-input v-model="systemForm.appid" :disabled="formType">
<template #suffix>
<bg-icon
icon="#bg-ic-copy"
style="cursor: pointer"
@click="copyText(systemForm.appid)"></bg-icon>
</template>
</el-input>
<!-- <span class="pl-1"><el-button type="primary" @click="copyText(systemForm.appid)">复制</el-button></span> -->
</el-form-item>
<el-form-item label="AppSecret" prop="appsecret" v-if="formType">
<el-input v-model="systemForm.appsecret" :disabled="formType" style="width: 80%" />
<span class="pl-1"><el-button type="primary" @click="copyText(systemForm.appsecret)">复制</el-button></span>
<span class="pl-1"><el-button type="primary" @click="resetSecret">重置</el-button></span>
<div style="display: flex; width: 100%">
<el-input v-model="systemForm.appsecret" :disabled="formType">
<template #suffix>
<bg-icon
icon="#bg-ic-copy"
style="cursor: pointer"
@click="copyText(systemForm.appsecret)"></bg-icon>
</template>
</el-input>
<span class="pl-1"><el-button type="primary" @click="resetSecret">重置</el-button></span>
</div>
</el-form-item>
<el-form-item label="系统LOGO" prop="logo">
<bg-upload-image
......@@ -42,20 +57,39 @@
customTips="请选择图片上传:大小120 * 120像素支持jpg、png等格式,图片需小于500KB"></bg-upload-image>
</el-form-item>
<el-form-item label="业务系统概述" prop="business_desc">
<el-input type="textarea" :rows="3" v-model="systemForm.business_desc" show-word-limit maxlength="300" />
<el-input
type="textarea"
:rows="3"
v-model="systemForm.business_desc"
show-word-limit
maxlength="300" />
</el-form-item>
<el-form-item label="角色" prop="system_role_id" v-if="!formType">
<el-select v-model="systemForm.system_role_id" placeholder="请选择角色" :disabled="true" style="width: 100%">
<el-option v-for="item in roleList" :key="item.role_id" :label="item.role_name" :value="item.role_id" />
<el-select
v-model="systemForm.system_role_id"
placeholder="请选择角色"
:disabled="true"
style="width: 100%">
<el-option
v-for="item in roleList"
:key="item.role_id"
:label="item.role_name"
:value="item.role_id" />
</el-select>
</el-form-item>
<el-form-item label="账号" prop="system_account">
<el-input v-model="systemForm.system_account" />
</el-form-item>
<el-form-item label="手机号" prop="system_phone">
<el-input v-model="systemForm.system_phone" />
</el-form-item>
<el-form-item label="密码" prop="password" v-if="!formType">
<el-input :type="password_eye ? 'text' : 'password'" v-model="systemForm.password">
<template #suffix>
<bg-icon @click="password_eye = !password_eye" class="icon_eye" icon="#bg-ic-eye"></bg-icon>
<bg-icon
@click="password_eye = !password_eye"
class="icon_eye"
icon="#bg-ic-eye"></bg-icon>
</template>
</el-input>
</el-form-item>
......@@ -71,7 +105,11 @@
</el-form-item>
<el-form-item label="开发厂商名称" prop="develop_id">
<el-select v-model="systemForm.develop_id" placeholder="请选择开发厂商" style="width: 100%">
<el-option v-for="item in firmList" :key="item.dict_id" :label="item.dict_name" :value="item.dict_id" />
<el-option
v-for="item in firmList"
:key="item.dict_id"
:label="item.dict_name"
:value="item.dict_id" />
</el-select>
</el-form-item>
<el-form-item label="是否启用" prop="state">
......@@ -84,6 +122,7 @@
import { reactive, ref, onBeforeMount, onMounted, computed } from "vue";
import axios from "@/request/http.js";
import { ElMessage } from "element-plus";
import { validatePhone } from "@/services/rules.js";
const props = defineProps({
formType: {
type: Boolean,
......@@ -102,6 +141,7 @@ const systemForm = reactive({
logo: [],
system_role_id: "",
system_account: "",
system_phone: "",
password: "",
confirm_password: "",
access_address: "",
......@@ -127,7 +167,11 @@ const validateBusinessName = (rule, value, callback) => {
} else {
let params = null;
if (props.id) {
params = { id: parseInt(props.id), business_name: value, organization_id: systemForm.organization_id };
params = {
id: parseInt(props.id),
business_name: value,
organization_id: systemForm.organization_id,
};
} else {
params = { business_name: value, organization_id: systemForm.organization_id };
}
......@@ -164,6 +208,22 @@ const validateSystemAccount = (rule, value, callback) => {
}
};
const checkPhoneRepet = (rule, value, callback) => {
let params = null;
if (props.id) {
params = { id: parseInt(props.id), contact_phone: value };
} else {
params = { id: 0, contact_phone: value };
}
axios.post(`/apaas/system/v5/org/check`, params).then((res) => {
if (res.data.code == 200) {
callback();
} else {
callback(new Error(res.data.data));
}
});
};
const formRules = reactive({
organization_id: [{ required: true, message: "请选择组织机构", trigger: "change" }],
business_name: [
......@@ -178,6 +238,11 @@ const formRules = reactive({
{ max: 20, message: "帐号最大长度为20个字符", trigger: "blur" },
{ validator: validateSystemAccount, trigger: "blur" },
],
system_phone: [
{ required: true, message: "请输入账号", trigger: "blur" },
{ validator: validatePhone, trigger: "blur" },
{ validator: checkPhoneRepet, trigger: "blur" },
],
password: [
{ required: true, message: "请输入密码", trigger: "blur" },
{ min: 8, message: "密码长度不得低于8位", trigger: "blur" },
......
......@@ -32,12 +32,12 @@
<bg-filter-group @search="changeSearch" v-model="filter.search" placeholder="请输入关键字">
<template v-slot:left_action>
<div class="apaas_button">
<el-button class="register_btn" type="primary" @click="addAccount">
<el-button type="primary" @click="addAccount">
<bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon>
新增
</el-button>
<el-button class="register_btn" @click="deleteBatch"> 批量删除 </el-button>
<el-button class="register_btn" @click="resetPsd"> 重置密码 </el-button>
<el-button @click="deleteBatch"> 批量删除 </el-button>
<el-button @click="resetPsd"> 重置密码 </el-button>
<span class="header_info"
>已选择<span style="color: #202531; font-weight: bold">{{ selected.length }}</span
></span
......
This diff is collapsed.
<template>
<div class="page_container">
<bg-breadcrumb></bg-breadcrumb>
<div class="page_content">
<bg-form-gap title="注册信息"></bg-form-gap>
<bg-detail-table2 class="register_info" :list="instanceData.approveBasicInfo"> </bg-detail-table2>
<bg-form-gap title="审批信息"></bg-form-gap>
<bg-detail-table2 class="approve_info" :list="instanceData.approveInfo"> </bg-detail-table2>
</div>
</div>
</template>
<script setup>
import { reactive, onBeforeMount } from "vue";
import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
import { useRoute } from "vue-router";
import axios from "@/request/http.js";
import { ElMessage } from "element-plus";
const route = useRoute();
const instanceData = reactive({
approveBasicInfo: [
{
key: "organization_name",
label: "所属机构",
value: "",
// slot: "approvalStatus",
},
{
key: "business_name",
label: "业务系统名称",
value: "",
},
{
key: "system_account",
label: "账号",
value: "",
},
{
key: "phone",
label: "手机号",
value: "",
},
{
key: "develop_name",
label: "开发厂商名称",
value: "",
},
{
key: "created_time",
label: "提交时间",
value: "",
},
{
key: "contact_name",
label: "联系人",
value: "",
},
{
key: "contact_phone",
label: "联系人手机号",
value: "",
},
{
key: "business_desc",
label: "业务系统描述",
value: "",
},
],
approveInfo: [
{
key: "status",
label: "审核状态",
value: "",
},
{
key: "approval_by",
label: "审核人",
value: "",
},
{
key: "approval_time",
label: "审批时间",
value: "",
},
{
key: "comments",
label: "审批意见",
value: "",
},
],
});
onBeforeMount(() => {
getApproveInfo();
});
const getApproveInfo = () => {
axios
.get(`/apaas/system/v5/user/approval/detail/${route.query.id}`)
.then((res) => {
if (res.data.code == 200) {
const result = res.data.data || {};
instanceData.approveBasicInfo.forEach((item) => {
// if (item.key === "created_time") {
// item.value = dateStringTransform(result[item.key]);
// return;
// }
item.value = result[item.key];
});
instanceData.approveInfo.forEach((item) => {
if (item.key === "status") {
item.value = result[item.key] === 1 ? "通过" : "驳回";
}
item.value = result[item.key];
});
} else {
ElMessage.error(res.data.data);
}
})
.catch((err) => {
ElMessage.error(err);
});
};
</script>
<style lang="scss" scoped>
.page_content {
position: relative;
padding: 24px 0 68px 24px;
.register_info,
.approve_info {
margin-bottom: 24px;
width: 960px;
}
}
</style>
This diff is collapsed.
......@@ -6,7 +6,7 @@
<bg-filter-group :showSearch="false">
<template v-slot:left_action>
<div class="apaas_button">
<el-button class="register_btn" type="primary" @click="addBanner">
<el-button type="primary" @click="addBanner">
<bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon>
新增
</el-button>
......
......@@ -642,12 +642,12 @@ const {
</style>
<style>
.select_dialog {
margin-top: 80px;
margin-top: 8vh;
}
.el-dialog .el-dialog__body {
.select_dialog .el-dialog__body {
padding: 0;
}
.el-dialog .el-dialog__footer {
.select_dialog .el-dialog__footer {
padding: 16px;
}
</style>
<!-- banner管理 -->
<!-- 推荐管理 -->
<template>
<div class="detail_container">
<bg-breadcrumb></bg-breadcrumb>
......@@ -6,7 +6,7 @@
<bg-filter-group :showSearch="false">
<template v-slot:left_action>
<div class="apaas_button">
<el-button class="register_btn" type="primary" @click="addBanner">
<el-button type="primary" @click="addBanner">
<bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon>
新增
</el-button>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -34,12 +34,12 @@
<bg-filter-group @search="changeSearch" v-model="filter.key_word" placeholder="请输入关键字">
<template v-slot:left_action>
<div class="apaas_button">
<el-button class="register_btn" type="primary" @click="addAccount">
<el-button type="primary" @click="addAccount">
<bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon>
{{ selectTreeDataType === 1 ? "新增组织管理员" : "新增平台用户" }}
</el-button>
<el-button class="register_btn" @click="deleteBatch"> 批量删除 </el-button>
<el-button class="register_btn" @click="resetPsd"> 重置密码 </el-button>
<el-button @click="deleteBatch"> 批量删除 </el-button>
<el-button @click="resetPsd"> 重置密码 </el-button>
<span class="header_info"
>已选择<span style="color: #202531; font-weight: bold">{{ selected.length }}</span
></span
......
......@@ -6,11 +6,11 @@
<bg-filter-group @search="changeSearch" v-model="filter.search" placeholder="请输入角色名称">
<template v-slot:left_action>
<div class="apaas_button">
<el-button class="register_btn" type="primary" @click="register">
<el-button type="primary" @click="register">
<bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon>
新增
</el-button>
<el-button class="register_btn" type="primary" @click="deleteRows"> 批量删除 </el-button>
<el-button type="primary" @click="deleteRows"> 批量删除 </el-button>
<div class="select_text">
<span>已选择</span>
<span class="num">{{ selection.length }}</span>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment