fix: BUG修改
BIN
src/assets/images/headerImg/icon1.png
Normal file
|
After Width: | Height: | Size: 892 B |
BIN
src/assets/images/headerImg/icon2.png
Normal file
|
After Width: | Height: | Size: 689 B |
BIN
src/assets/images/headerImg/icon3.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/assets/images/headerImg/icon4.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/assets/images/headerImg/icon5-active.png
Normal file
|
After Width: | Height: | Size: 445 B |
BIN
src/assets/images/headerImg/icon5.png
Normal file
|
After Width: | Height: | Size: 456 B |
BIN
src/assets/images/headerImg/icon6-active.png
Normal file
|
After Width: | Height: | Size: 799 B |
BIN
src/assets/images/headerImg/icon6.png
Normal file
|
After Width: | Height: | Size: 821 B |
@ -5,6 +5,7 @@
|
|||||||
trigger="click"
|
trigger="click"
|
||||||
width="450"
|
width="450"
|
||||||
class="popover"
|
class="popover"
|
||||||
|
:visible-arrow="false"
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
>
|
>
|
||||||
<div class="changeBox">
|
<div class="changeBox">
|
||||||
@ -20,7 +21,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 点击内容 -->
|
<!-- 点击内容 -->
|
||||||
<div slot="reference" class="click-content">
|
<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>
|
<span>工作台</span>
|
||||||
<i class="el-icon-arrow-down"></i>
|
<i class="el-icon-arrow-down"></i>
|
||||||
</div>
|
</div>
|
||||||
@ -85,6 +87,10 @@ export default {
|
|||||||
.click-content{
|
.click-content{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
.flexStyle();
|
.flexStyle();
|
||||||
|
img{
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
>span{
|
>span{
|
||||||
margin: 0px 10px;
|
margin: 0px 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -618,7 +618,7 @@ p {
|
|||||||
/deep/.header-btn {
|
/deep/.header-btn {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 0px 0px 0 30px;
|
// margin: 0px 0px 0 30px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
|
|||||||
@ -3,14 +3,34 @@
|
|||||||
<el-popover
|
<el-popover
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
width="450"
|
popper-class="user-group-popover"
|
||||||
class="popover"
|
:visible-arrow="false"
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
>
|
>
|
||||||
<div class="changeBox">
|
<div class="changeBox">
|
||||||
<div class="title-content">
|
<div class="title-content">
|
||||||
<span>{{ isUserList ? "切换用户" : "用户组织" }}</span>
|
<span>{{ isUserList ? "切换用户" : "所选组织架构" }}</span>
|
||||||
<i
|
<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"
|
class="el-icon-arrow-left"
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
@click="isUserList = true"
|
@click="isUserList = true"
|
||||||
@ -19,7 +39,7 @@
|
|||||||
class="el-icon-arrow-right"
|
class="el-icon-arrow-right"
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
@click="isUserList = false"
|
@click="isUserList = false"
|
||||||
></i>
|
></i> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="content-list" v-if="isUserList">
|
<div class="content-list" v-if="isUserList">
|
||||||
<div
|
<div
|
||||||
@ -28,10 +48,18 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
@click="selectGroup(item)"
|
@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>
|
<span>{{ item.companyName }}</span>
|
||||||
<i class="el-icon-arrow-right"></i>
|
<i class="el-icon-arrow-right"></i>
|
||||||
</div>
|
</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>
|
||||||
<div class="tree-group" v-else>
|
<div class="tree-group" v-else>
|
||||||
<div class="select-list">
|
<div class="select-list">
|
||||||
@ -60,8 +88,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 点击内容 -->
|
<!-- 点击内容 -->
|
||||||
<div slot="reference" class="click-content">
|
<div slot="reference" class="click-content">
|
||||||
<i class="el-icon-trophy-1"></i>
|
<!-- <i class="el-icon-trophy-1"></i> -->
|
||||||
<span :title="$store.state.currentProDetail.name">{{$store.state.currentProDetail.name}}</span>
|
<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>
|
<i class="el-icon-arrow-down"></i>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
@ -80,7 +118,7 @@ export default {
|
|||||||
},
|
},
|
||||||
groupListData: [],
|
groupListData: [],
|
||||||
selectedGroupData: [],
|
selectedGroupData: [],
|
||||||
selectedProjectSn: ""
|
selectedProjectSn: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -90,13 +128,15 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 选中组织中的项目级
|
// 选中组织中的项目级
|
||||||
selectProject(obj) {
|
selectProject(obj) {
|
||||||
if(!obj.list) return;
|
console.log(obj, "111222333");
|
||||||
|
if (!obj || !obj.list) return;
|
||||||
if (obj.list && obj.list.length > 0) {
|
if (obj.list && obj.list.length > 0) {
|
||||||
obj.list.map((item) => {
|
obj.list.map((item) => {
|
||||||
this.selectProject(item);
|
this.selectProject(item);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if(!this.selectedProjectSn){ // 加判断是为了在循环中只选中第一个
|
if (!this.selectedProjectSn) {
|
||||||
|
// 加判断是为了在循环中只选中第一个
|
||||||
this.selectedProjectSn = obj.sn;
|
this.selectedProjectSn = obj.sn;
|
||||||
// 修改全局projectSn
|
// 修改全局projectSn
|
||||||
this.$store.commit("setProjectSn", obj.sn);
|
this.$store.commit("setProjectSn", obj.sn);
|
||||||
@ -106,7 +146,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 选中组织
|
// 选中组织
|
||||||
selectGroup(item) {
|
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.isUserList = false;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.selectProject(item);
|
this.selectProject(item);
|
||||||
@ -115,24 +161,26 @@ export default {
|
|||||||
// 获取组织树数据
|
// 获取组织树数据
|
||||||
getGroupTreeData() {
|
getGroupTreeData() {
|
||||||
this.groupListData = this.$store.state.groupTreeList;
|
this.groupListData = this.$store.state.groupTreeList;
|
||||||
if(!this.groupListData) return;
|
if (!this.groupListData) return;
|
||||||
this.isUserList = false;
|
this.isUserList = false;
|
||||||
let findItem = this.groupListData.find(
|
let findItem = this.groupListData.find((item) => {
|
||||||
(item) => item.sn == this.$store.state.selectedGroupSn
|
return item.sn == this.$store.state.selectedGroupSn;
|
||||||
);
|
|
||||||
this.selectedGroupData = [findItem];
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.selectProject(findItem);
|
|
||||||
});
|
});
|
||||||
|
if (findItem) {
|
||||||
|
this.selectedGroupData = [findItem];
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.selectProject(findItem);
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 树形控件点击
|
// 树形控件点击
|
||||||
treeClick(data) {
|
treeClick(data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if(data.projectSn){
|
if (data.projectSn) {
|
||||||
this.selectedProjectSn = data.projectSn;
|
this.selectedProjectSn = data.projectSn;
|
||||||
// 修改全局projectSn
|
// 修改全局projectSn
|
||||||
this.$store.commit("setProjectSn", data.projectSn);
|
this.$store.commit("setProjectSn", data.projectSn);
|
||||||
this.$store.commit("setProDetail", data);
|
this.$store.commit("setProDetail", data);
|
||||||
// 收起popover
|
// 收起popover
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
}
|
}
|
||||||
@ -165,6 +213,12 @@ export default {
|
|||||||
color: #000000;
|
color: #000000;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
img {
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.content-list {
|
.content-list {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
@ -174,15 +228,27 @@ export default {
|
|||||||
border: 1px solid #dadbdb;
|
border: 1px solid #dadbdb;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
cursor: pointer;
|
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) {
|
> span:nth-child(2) {
|
||||||
margin: 2px 10px 0px 10px;
|
margin: 2px 10px 0px 10px;
|
||||||
}
|
}
|
||||||
> span:nth-child(3) {
|
> div {
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
color: #79acfa;
|
color: #79acfa;
|
||||||
background-color: #e4f5ff;
|
background-color: #e4f5ff;
|
||||||
border: 1px solid #99c3fb;
|
border: 1px solid #99c3fb;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
margin-top: 2px;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
/deep/.el-icon-arrow-right {
|
/deep/.el-icon-arrow-right {
|
||||||
@ -208,9 +274,13 @@ export default {
|
|||||||
.click-content {
|
.click-content {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
.flexStyle();
|
.flexStyle();
|
||||||
|
img {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
> span {
|
> span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 77px;
|
max-width: 77px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -219,7 +289,8 @@ export default {
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.el-popover {
|
.user-group-popover {
|
||||||
|
min-width: 300px;
|
||||||
box-sizing: content-box !important;
|
box-sizing: content-box !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -3094,6 +3094,9 @@ export default {
|
|||||||
relativeGroupFn(item) {
|
relativeGroupFn(item) {
|
||||||
this.selectRowObj = item;
|
this.selectRowObj = item;
|
||||||
this.relativeGroupDialog = true;
|
this.relativeGroupDialog = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.relativeTree.setCheckedKeys([]);
|
||||||
|
})
|
||||||
},
|
},
|
||||||
transformGroup(){
|
transformGroup(){
|
||||||
let item = this.selectRowObj;
|
let item = this.selectRowObj;
|
||||||
|
|||||||
@ -487,7 +487,7 @@ export default {
|
|||||||
pw: [
|
pw: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入正确的密码格式",
|
message: "密码至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
pattern: /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^0-9a-zA-Z]).{8,30}/,
|
pattern: /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^0-9a-zA-Z]).{8,30}/,
|
||||||
},
|
},
|
||||||
@ -930,7 +930,11 @@ export default {
|
|||||||
headquartersSn: this.headquartersSnData,
|
headquartersSn: this.headquartersSnData,
|
||||||
accountType: this.registerType,
|
accountType: this.registerType,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.$message.success("注册成功");
|
if(this.registerType == 1){
|
||||||
|
this.$message.success("注册成功,等待审核");
|
||||||
|
} else {
|
||||||
|
this.$message.success("注册成功");
|
||||||
|
}
|
||||||
this.goLogin();
|
this.goLogin();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -72,7 +72,7 @@ export default {
|
|||||||
newPassword: [
|
newPassword: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入正确的密码格式",
|
message: "必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
pattern: /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^0-9a-zA-Z]).{8,30}/,
|
pattern: /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^0-9a-zA-Z]).{8,30}/,
|
||||||
},
|
},
|
||||||
@ -80,7 +80,7 @@ export default {
|
|||||||
confirmParssword: [
|
confirmParssword: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入正确的密码格式",
|
message: "必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
pattern: /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^0-9a-zA-Z]).{8,30}/,
|
pattern: /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^0-9a-zA-Z]).{8,30}/,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="cooperator flex">
|
<div class="cooperator flex">
|
||||||
<div class="left whiteBlock">
|
<div class="left whiteBlock">
|
||||||
<div class="title">{{ $t('message.cooperationUnit.flatType') }}</div>
|
|
||||||
<vue-scroll style="height: 95%">
|
<vue-scroll style="height: 95%">
|
||||||
<ul>
|
<ul>
|
||||||
<li
|
<li
|
||||||
@ -62,16 +61,6 @@ export default {
|
|||||||
width: 16%;
|
width: 16%;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
font-size: 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 {
|
.el-menu-item2 {
|
||||||
border-bottom: 2px #ebf0fc solid;
|
border-bottom: 2px #ebf0fc solid;
|
||||||
height: 43px;
|
height: 43px;
|
||||||
|
|||||||
@ -1,164 +1,215 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 项目首页 -->
|
<!-- 项目首页 -->
|
||||||
<div class="fullHeight">
|
<div class="fullHeight">
|
||||||
<vhead :titleName="projectName" :showR="true" v-if="!selectGroupDialog"></vhead>
|
<vhead
|
||||||
<div class="content-part" v-if="!selectGroupDialog">
|
:titleName="projectName"
|
||||||
<iframe
|
:showR="true"
|
||||||
id="myIframe"
|
v-if="!selectGroupDialog"
|
||||||
:src="`${$store.state.WORKFLOWURL}?token=${$store.state.userInfo.token}`"
|
></vhead>
|
||||||
style="width: 100%; height: 100%; border: medium none"
|
<div class="content-part" v-if="!selectGroupDialog">
|
||||||
frameborder="1"
|
<iframe
|
||||||
></iframe>
|
id="myIframe"
|
||||||
</div>
|
:src="
|
||||||
<!-- 选择组织 -->
|
`${$store.state.WORKFLOWURL}?token=${$store.state.userInfo.token}`
|
||||||
<el-dialog
|
"
|
||||||
title="选择组织"
|
style="width: 100%; height: 100%; border: medium none"
|
||||||
:modal-append-to-body="false"
|
frameborder="1"
|
||||||
:close-on-click-modal="false"
|
></iframe>
|
||||||
: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>
|
</div>
|
||||||
</template>
|
<!-- 选择组织 -->
|
||||||
<script>
|
<el-dialog
|
||||||
import vhead from "@/components/header";
|
title="选择组织"
|
||||||
import { getProjectDetail } from "@/assets/js/api/baseInfo.js";
|
:modal-append-to-body="false"
|
||||||
import { getGroupListApi } from "@/assets/js/api/loginSign.js";
|
:close-on-click-modal="false"
|
||||||
export default {
|
:close-on-press-escape="false"
|
||||||
name: "workSpace",
|
:show-close="false"
|
||||||
components: { vhead },
|
:visible.sync="selectGroupDialog"
|
||||||
data() {
|
>
|
||||||
return {
|
<div class="content-list">
|
||||||
projectSn: "",
|
<div
|
||||||
projectName: "",
|
class="content-list-item"
|
||||||
selectGroupDialog: true,
|
v-for="(item, index) in groupListData"
|
||||||
groupListData: [],
|
:key="index"
|
||||||
selectedDataSn: ""
|
@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){
|
selectedDefaultProject(obj) {
|
||||||
this.selectGroupDialog = false;
|
if (obj.list && obj.list.length > 0) {
|
||||||
}
|
obj.list.map((item) => {
|
||||||
this.getGroupTreeData();
|
this.selectedDefaultProject(item);
|
||||||
},
|
});
|
||||||
methods: {
|
} else {
|
||||||
// 默认选中已选中组织的第一个项目
|
this.projectSn = this.$store.state.projectSn || "";
|
||||||
selectedDefaultProject(obj){
|
if (!this.projectSn) {
|
||||||
if (obj.list && obj.list.length > 0) {
|
// 加判断是为了在循环中只选中第一个
|
||||||
obj.list.map((item) => {
|
this.projectSn = obj.sn;
|
||||||
this.selectedDefaultProject(item);
|
// 修改全局projectSn
|
||||||
});
|
this.$store.commit("setProjectSn", obj.sn);
|
||||||
} else {
|
this.getDataDateils();
|
||||||
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.selectedDataSn = item.sn;
|
||||||
this.$store.commit("setSelectedGroupSn", item.sn); // 存储选中的组织Sn
|
this.$store.commit("setSelectedGroupSn", item.sn); // 存储选中的组织Sn
|
||||||
this.selectGroupDialog = false;
|
|
||||||
this.selectedDefaultProject(item);
|
this.selectedDefaultProject(item);
|
||||||
this.$nextTick(() => {
|
} else {
|
||||||
setTimeout(() => {
|
let storeVal = this.$store.state.userInfo;
|
||||||
let iframe = document.getElementById("myIframe");
|
this.selectedDataSn = storeVal.headquartersSn;
|
||||||
iframe.contentWindow.postMessage(
|
this.$store.commit("setSelectedGroupSn", storeVal.headquartersSn); // 存储选中的组织Sn
|
||||||
{
|
// this.selectedDefaultProject(storeVal.userInfo);
|
||||||
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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
this.selectGroupDialog = false;
|
||||||
};
|
this.getModuleList();
|
||||||
</script>
|
},
|
||||||
<style lang="less" scoped>
|
getGroupTreeData() {
|
||||||
.flexStyle(){
|
let data = {
|
||||||
display: flex;
|
userId: this.$store.state.userInfo.userId,
|
||||||
align-items: center;
|
};
|
||||||
|
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{
|
.content-part {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 60px);
|
height: calc(100% - 60px);
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
.content-list{
|
.content-list {
|
||||||
&-item{
|
&-item {
|
||||||
.flexStyle();
|
.flexStyle();
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
border: 1px solid #DADBDB;
|
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;
|
border-radius: 5px;
|
||||||
cursor: pointer;
|
margin-top: 2px;
|
||||||
>span:nth-child(2){
|
font-size: 10px;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
&-item:not(:last-child){
|
/deep/.el-icon-arrow-right {
|
||||||
margin-bottom: 10px;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/deep/.el-dialog{
|
&-item:not(:last-child) {
|
||||||
width: 25%;
|
margin-bottom: 10px;
|
||||||
.el-dialog__body{
|
|
||||||
padding-top: 10px;
|
|
||||||
padding-bottom: 15px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
}
|
||||||
|
/deep/.el-dialog {
|
||||||
|
width: 25%;
|
||||||
|
.el-dialog__body {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||