fix: BUG修改

This commit is contained in:
kun 2024-04-10 16:18:11 +08:00
parent 86e5d0ae7c
commit 2a62ba8b87
16 changed files with 315 additions and 191 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 689 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 B

View File

@ -5,6 +5,7 @@
trigger="click"
width="450"
class="popover"
:visible-arrow="false"
v-model="visible"
>
<div class="changeBox">
@ -20,7 +21,8 @@
</div>
<!-- 点击内容 -->
<div slot="reference" class="click-content">
<i class="el-icon-trophy-1"></i>
<!-- <i class="el-icon-trophy-1"></i> -->
<img src="@/assets/images/headerImg/icon2.png" />
<span>工作台</span>
<i class="el-icon-arrow-down"></i>
</div>
@ -85,6 +87,10 @@ export default {
.click-content{
cursor: pointer;
.flexStyle();
img{
width: 20px;
height: 20px;
}
>span{
margin: 0px 10px;
}

View File

@ -618,7 +618,7 @@ p {
/deep/.header-btn {
display: inline-flex;
align-items: center;
margin: 0px 0px 0 30px;
// margin: 0px 0px 0 30px;
font-size: 14px;
cursor: pointer;
min-width: 100px;

View File

@ -3,14 +3,34 @@
<el-popover
placement="bottom"
trigger="click"
width="450"
class="popover"
popper-class="user-group-popover"
:visible-arrow="false"
v-model="visible"
>
<div class="changeBox">
<div class="title-content">
<span>{{ isUserList ? "切换用户" : "用户组织" }}</span>
<i
<span>{{ isUserList ? "切换用户" : "所选组织架构" }}</span>
<img
src="@/assets/images/headerImg/icon5-active.png"
v-if="!isUserList"
@click="isUserList = false"
/>
<img
src="@/assets/images/headerImg/icon6.png"
v-if="!isUserList"
@click="isUserList = true"
/>
<img
src="@/assets/images/headerImg/icon5.png"
v-if="isUserList"
@click="isUserList = false"
/>
<img
src="@/assets/images/headerImg/icon6-active.png"
v-if="isUserList"
@click="isUserList = true"
/>
<!-- <i
class="el-icon-arrow-left"
style="cursor: pointer;"
@click="isUserList = true"
@ -19,7 +39,7 @@
class="el-icon-arrow-right"
style="cursor: pointer;"
@click="isUserList = false"
></i>
></i> -->
</div>
<div class="content-list" v-if="isUserList">
<div
@ -28,10 +48,18 @@
:key="index"
@click="selectGroup(item)"
>
<i class="el-icon-trophy-1"></i>
<!-- <i class="el-icon-trophy-1"></i> -->
<img src="@/assets/images/headerImg/icon3.png" />
<span>{{ item.companyName }}</span>
<i class="el-icon-arrow-right"></i>
</div>
<div class="content-list-item" @click="selectGroup()">
<!-- <i class="el-icon-trophy-1"></i> -->
<img src="@/assets/images/headerImg/icon4.png" />
<span>{{ $store.state.userInfo.account }}</span>
<div>个人租户</div>
<i class="el-icon-arrow-right"></i>
</div>
</div>
<div class="tree-group" v-else>
<div class="select-list">
@ -60,8 +88,18 @@
</div>
<!-- 点击内容 -->
<div slot="reference" class="click-content">
<i class="el-icon-trophy-1"></i>
<span :title="$store.state.currentProDetail.name">{{$store.state.currentProDetail.name}}</span>
<!-- <i class="el-icon-trophy-1"></i> -->
<img src="@/assets/images/headerImg/icon1.png" />
<span
v-if="
$store.state.currentProDetail && $store.state.currentProDetail.name
"
:title="$store.state.currentProDetail.name"
>{{ $store.state.currentProDetail.name }}</span
>
<span v-else :title="$store.state.userInfo.account">{{
$store.state.userInfo.account
}}</span>
<i class="el-icon-arrow-down"></i>
</div>
</el-popover>
@ -80,7 +118,7 @@ export default {
},
groupListData: [],
selectedGroupData: [],
selectedProjectSn: ""
selectedProjectSn: "",
};
},
created() {
@ -90,13 +128,15 @@ export default {
methods: {
//
selectProject(obj) {
if(!obj.list) return;
console.log(obj, "111222333");
if (!obj || !obj.list) return;
if (obj.list && obj.list.length > 0) {
obj.list.map((item) => {
this.selectProject(item);
});
} else {
if(!this.selectedProjectSn){ //
if (!this.selectedProjectSn) {
//
this.selectedProjectSn = obj.sn;
// projectSn
this.$store.commit("setProjectSn", obj.sn);
@ -106,7 +146,13 @@ export default {
},
//
selectGroup(item) {
this.selectedGroupData = [item];
if (item) {
this.selectedGroupData = [item];
} else {
this.selectedGroupData = [];
this.$store.commit("setProjectSn", "");
this.$store.commit("setProDetail", null);
}
this.isUserList = false;
this.$nextTick(() => {
this.selectProject(item);
@ -115,24 +161,26 @@ export default {
//
getGroupTreeData() {
this.groupListData = this.$store.state.groupTreeList;
if(!this.groupListData) return;
if (!this.groupListData) return;
this.isUserList = false;
let findItem = this.groupListData.find(
(item) => item.sn == this.$store.state.selectedGroupSn
);
this.selectedGroupData = [findItem];
this.$nextTick(() => {
this.selectProject(findItem);
let findItem = this.groupListData.find((item) => {
return item.sn == this.$store.state.selectedGroupSn;
});
if (findItem) {
this.selectedGroupData = [findItem];
this.$nextTick(() => {
this.selectProject(findItem);
});
}
},
//
treeClick(data) {
console.log(data);
if(data.projectSn){
if (data.projectSn) {
this.selectedProjectSn = data.projectSn;
// projectSn
this.$store.commit("setProjectSn", data.projectSn);
this.$store.commit("setProDetail", data);
this.$store.commit("setProDetail", data);
// popover
this.visible = false;
}
@ -165,6 +213,12 @@ export default {
color: #000000;
margin-right: auto;
}
img {
width: 15px;
height: 15px;
cursor: pointer;
margin-left: 5px;
}
}
.content-list {
margin-top: 15px;
@ -174,15 +228,27 @@ export default {
border: 1px solid #dadbdb;
border-radius: 5px;
cursor: pointer;
img {
width: 30px;
height: 30px;
}
// >div{
// border: 1px solid #7299F8;
// border-radius: 5px;
// background-color: #E3F6FF;
// padding: 5px 15px;
// color: #5A88F7;
// }
> span:nth-child(2) {
margin: 2px 10px 0px 10px;
}
> span:nth-child(3) {
> div {
padding: 3px 10px;
color: #79acfa;
background-color: #e4f5ff;
border: 1px solid #99c3fb;
border-radius: 5px;
margin-top: 2px;
font-size: 10px;
}
/deep/.el-icon-arrow-right {
@ -208,9 +274,13 @@ export default {
.click-content {
cursor: pointer;
.flexStyle();
img {
width: 20px;
height: 20px;
}
> span {
display: inline-block;
width: 77px;
max-width: 77px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@ -219,7 +289,8 @@ export default {
}
</style>
<style>
.el-popover {
.user-group-popover {
min-width: 300px;
box-sizing: content-box !important;
}
</style>

View File

@ -3094,6 +3094,9 @@ export default {
relativeGroupFn(item) {
this.selectRowObj = item;
this.relativeGroupDialog = true;
this.$nextTick(() => {
this.$refs.relativeTree.setCheckedKeys([]);
})
},
transformGroup(){
let item = this.selectRowObj;

View File

@ -487,7 +487,7 @@ export default {
pw: [
{
required: true,
message: "请输入正确的密码格式",
message: "密码至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
trigger: "blur",
pattern: /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^0-9a-zA-Z]).{8,30}/,
},
@ -930,7 +930,11 @@ export default {
headquartersSn: this.headquartersSnData,
accountType: this.registerType,
}).then((res) => {
this.$message.success("注册成功");
if(this.registerType == 1){
this.$message.success("注册成功,等待审核");
} else {
this.$message.success("注册成功");
}
this.goLogin();
});
} else {

View File

@ -72,7 +72,7 @@ export default {
newPassword: [
{
required: true,
message: "请输入正确的密码格式",
message: "必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
trigger: "blur",
pattern: /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^0-9a-zA-Z]).{8,30}/,
},
@ -80,7 +80,7 @@ export default {
confirmParssword: [
{
required: true,
message: "请输入正确的密码格式",
message: "必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
trigger: "blur",
pattern: /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^0-9a-zA-Z]).{8,30}/,
},

View File

@ -1,7 +1,6 @@
<template>
<div class="cooperator flex">
<div class="left whiteBlock">
<div class="title">{{ $t('message.cooperationUnit.flatType') }}</div>
<vue-scroll style="height: 95%">
<ul>
<li
@ -62,16 +61,6 @@ export default {
width: 16%;
margin-right: 15px;
font-size: 15px;
// background-color: #fbfbfb;
.title {
height: 41px;
line-height: 41px;
box-sizing: border-box;
padding: 0 22px;
// color: #282e49;
border-bottom: 2px #ebf0fc solid;
font-weight: 600;
}
.el-menu-item2 {
border-bottom: 2px #ebf0fc solid;
height: 43px;

View File

@ -1,164 +1,215 @@
<template>
<!-- 项目首页 -->
<div class="fullHeight">
<vhead :titleName="projectName" :showR="true" v-if="!selectGroupDialog"></vhead>
<div class="content-part" v-if="!selectGroupDialog">
<iframe
id="myIframe"
:src="`${$store.state.WORKFLOWURL}?token=${$store.state.userInfo.token}`"
style="width: 100%; height: 100%; border: medium none"
frameborder="1"
></iframe>
</div>
<!-- 选择组织 -->
<el-dialog
title="选择组织"
:modal-append-to-body="false"
:close-on-click-modal="false"
:close-on-press-escape="false"
:show-close="false"
:visible.sync="selectGroupDialog"
>
<div class="content-list">
<div class="content-list-item" v-for="(item,index) in groupListData" :key="index" @click="selectedGroupData(item)">
<i class="el-icon-trophy-1"></i>
<span>{{item.companyName}}</span>
<i class="el-icon-arrow-right"></i>
</div>
</div>
</el-dialog>
<!-- 项目首页 -->
<div class="fullHeight">
<vhead
:titleName="projectName"
:showR="true"
v-if="!selectGroupDialog"
></vhead>
<div class="content-part" v-if="!selectGroupDialog">
<iframe
id="myIframe"
:src="
`${$store.state.WORKFLOWURL}?token=${$store.state.userInfo.token}`
"
style="width: 100%; height: 100%; border: medium none"
frameborder="1"
></iframe>
</div>
</template>
<script>
import vhead from "@/components/header";
import { getProjectDetail } from "@/assets/js/api/baseInfo.js";
import { getGroupListApi } from "@/assets/js/api/loginSign.js";
export default {
name: "workSpace",
components: { vhead },
data() {
return {
projectSn: "",
projectName: "",
selectGroupDialog: true,
groupListData: [],
selectedDataSn: ""
};
<!-- 选择组织 -->
<el-dialog
title="选择组织"
:modal-append-to-body="false"
:close-on-click-modal="false"
:close-on-press-escape="false"
:show-close="false"
:visible.sync="selectGroupDialog"
>
<div class="content-list">
<div
class="content-list-item"
v-for="(item, index) in groupListData"
:key="index"
@click="selectedGroupData(item)"
>
<!-- <i class="el-icon-trophy-1"></i> -->
<img src="@/assets/images/headerImg/icon3.png" />
<span>{{ item.companyName }}</span>
<i class="el-icon-arrow-right"></i>
</div>
<div class="content-list-item" @click="selectedGroupData()">
<!-- <i class="el-icon-trophy-1"></i> -->
<img src="@/assets/images/headerImg/icon4.png" />
<span>{{ $store.state.userInfo.account }}</span>
<div>个人租户</div>
<i class="el-icon-arrow-right"></i>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import vhead from "@/components/header";
import { getProjectDetail } from "@/assets/js/api/baseInfo.js";
import { getGroupListApi } from "@/assets/js/api/loginSign.js";
import {
getAllModuleApi
} from "@/assets/js/api/jxjadmin.js";
export default {
name: "workSpace",
components: { vhead },
data() {
return {
projectSn: "",
projectName: "",
selectGroupDialog: true,
groupListData: [],
selectedDataSn: "",
};
},
created() {
if (this.$store.state.selectedGroupSn) {
this.selectGroupDialog = false;
}
this.getGroupTreeData();
},
methods: {
// ()
async getModuleList() {
const res = await getAllModuleApi({
moduleType: 2,
styleType: this.$store.state.userInfo.styleType,
});
console.log(res);
this.$nextTick(() => {
setTimeout(() => {
let iframe = document.getElementById("myIframe");
iframe.contentWindow.postMessage(
{
type: "emitData",
data: JSON.stringify(this.$store.state.userInfo),
// authMenuList: JSON.stringify(authStore.showMenuListGet),
},
"*"
);
}, 1000);
});
},
created() {
if(this.$store.state.selectedGroupSn){
this.selectGroupDialog = false;
}
this.getGroupTreeData();
},
methods: {
//
selectedDefaultProject(obj){
if (obj.list && obj.list.length > 0) {
obj.list.map((item) => {
this.selectedDefaultProject(item);
});
} else {
this.projectSn = this.$store.state.projectSn || '';
if(!this.projectSn){ //
this.projectSn = obj.sn;
// projectSn
this.$store.commit("setProjectSn", obj.sn);
this.getDataDateils();
}
//
selectedDefaultProject(obj) {
if (obj.list && obj.list.length > 0) {
obj.list.map((item) => {
this.selectedDefaultProject(item);
});
} else {
this.projectSn = this.$store.state.projectSn || "";
if (!this.projectSn) {
//
this.projectSn = obj.sn;
// projectSn
this.$store.commit("setProjectSn", obj.sn);
this.getDataDateils();
}
},
//
selectedGroupData(item) {
}
},
//
selectedGroupData(item) {
if (item) {
this.selectedDataSn = item.sn;
this.$store.commit("setSelectedGroupSn", item.sn); // Sn
this.selectGroupDialog = false;
this.selectedDefaultProject(item);
this.$nextTick(() => {
setTimeout(() => {
let iframe = document.getElementById("myIframe");
iframe.contentWindow.postMessage(
{
type: "emitData",
data: JSON.stringify(this.$store.state.userInfo)
},
"*"
);
}, 1000);
})
},
getGroupTreeData(){
let data = {
userId: this.$store.state.userInfo.userId,
};
getGroupListApi(data).then((res) => {
// console.log(res);
if (res.code == 200 && res.result) {
this.groupListData = res.result;
this.$store.commit("setGroupTreeList", res.result); //
}
});
},
//
getDataDateils() {
let data = {
projectSn: this.projectSn,
};
getProjectDetail(data).then((res) => {
// console.log(res);
if (res.code == 200) {
this.projectName = res.result.projectName;
document.title = this.projectName;
this.$store.commit("setProDetail", res.result);
}
});
} else {
let storeVal = this.$store.state.userInfo;
this.selectedDataSn = storeVal.headquartersSn;
this.$store.commit("setSelectedGroupSn", storeVal.headquartersSn); // Sn
// this.selectedDefaultProject(storeVal.userInfo);
}
}
};
</script>
<style lang="less" scoped>
.flexStyle(){
display: flex;
align-items: center;
this.selectGroupDialog = false;
this.getModuleList();
},
getGroupTreeData() {
let data = {
userId: this.$store.state.userInfo.userId,
};
getGroupListApi(data).then((res) => {
// console.log(res);
if (res.code == 200 && res.result) {
this.groupListData = res.result;
this.$store.commit("setGroupTreeList", res.result); //
}
});
},
//
getDataDateils() {
let data = {
projectSn: this.projectSn,
};
getProjectDetail(data).then((res) => {
// console.log(res);
if (res.code == 200) {
this.projectName = res.result.projectName;
document.title = this.projectName;
this.$store.commit("setProDetail", res.result);
}
});
},
},
};
</script>
<style lang="less" scoped>
.flexStyle() {
display: flex;
align-items: center;
}
.content-part{
width: 100%;
height: calc(100% - 60px);
border: 1px solid #ccc;
margin: 0 auto;
}
.content-list{
&-item{
.flexStyle();
padding: 10px 15px;
border: 1px solid #DADBDB;
.content-part {
width: 100%;
height: calc(100% - 60px);
border: 1px solid #ccc;
margin: 0 auto;
}
.content-list {
&-item {
.flexStyle();
padding: 10px 15px;
border: 1px solid #dadbdb;
border-radius: 5px;
cursor: pointer;
img {
width: 30px;
height: 30px;
}
// >div{
// border: 1px solid #7299F8;
// border-radius: 5px;
// background-color: #E3F6FF;
// padding: 5px 15px;
// color: #5A88F7;
// }
> span:nth-child(2) {
margin: 0px 15px 0px 10px;
}
> div {
padding: 3px 10px;
color: #79acfa;
background-color: #e4f5ff;
border: 1px solid #99c3fb;
border-radius: 5px;
cursor: pointer;
>span:nth-child(2){
margin: 2px 10px 0px 10px;
}
>span:nth-child(3){
padding:3px 10px;
color: #79ACFA;
background-color: #E4F5FF;
border: 1px solid #99C3FB;
border-radius: 5px;
font-size: 10px;
}
/deep/.el-icon-arrow-right{
margin-left: auto;
}
margin-top: 2px;
font-size: 10px;
}
&-item:not(:last-child){
margin-bottom: 10px;
/deep/.el-icon-arrow-right {
margin-left: auto;
}
}
/deep/.el-dialog{
width: 25%;
.el-dialog__body{
padding-top: 10px;
padding-bottom: 15px;
}
&-item:not(:last-child) {
margin-bottom: 10px;
}
</style>
}
/deep/.el-dialog {
width: 25%;
.el-dialog__body {
padding-top: 10px;
padding-bottom: 15px;
}
}
</style>