fix: BUG修改
This commit is contained in:
parent
3a520a0d1f
commit
3d9f143467
@ -39,6 +39,8 @@ export const deleteModuleApi = (data) => post('xmgl/baseModule/delete', data)
|
||||
export const editModuleApi = (data) => post('xmgl/baseModule/edit', data)
|
||||
export const getAllModuleApi = (data) => post('xmgl/baseModule/list', data)
|
||||
export const getAllModulePageApi = (data) => post('/xmgl/baseModule/page', data)
|
||||
// 新用户账号模块查询
|
||||
export const getNewUserAllModulePageApi = (data) => post('/xmgl/baseModule/getModuleAndMenuList', data)
|
||||
|
||||
/**
|
||||
* 菜单管理
|
||||
|
||||
@ -245,6 +245,7 @@ function logout() {
|
||||
store.commit('setMapBackArr', [])
|
||||
store.commit('setMoudle', null)
|
||||
store.commit('setProDetail', null)
|
||||
store.commit('setSelectedGroupSn', null)
|
||||
sessionStorage.clear()
|
||||
sessionStorage.setItem('errorResponse', '1')
|
||||
|
||||
|
||||
@ -44,7 +44,8 @@
|
||||
v-if="
|
||||
$route.path.indexOf('/firm/projectManage') == -1 &&
|
||||
$store.state.userInfo.accountType != 5 &&
|
||||
$store.state.userInfo.accountType != 6
|
||||
$store.state.userInfo.accountType != 6 &&
|
||||
$store.state.userInfo.accountType != 10
|
||||
"
|
||||
:title="enterpriseFront"
|
||||
>
|
||||
@ -58,7 +59,8 @@
|
||||
v-if="
|
||||
$route.path.indexOf('/companyAdmin/companyDiagram') == -1 &&
|
||||
$store.state.userInfo.accountType != 5 &&
|
||||
$store.state.userInfo.accountType != 6
|
||||
$store.state.userInfo.accountType != 6 &&
|
||||
$store.state.userInfo.accountType != 10
|
||||
"
|
||||
:title="enterpriseBackground"
|
||||
>
|
||||
@ -306,6 +308,7 @@ export default {
|
||||
this.$store.commit("setMapBackArr", []);
|
||||
this.$store.commit("setMoudle", null);
|
||||
this.$store.commit("setProDetail", null);
|
||||
this.$store.commit('setSelectedGroupSn', null);
|
||||
window.localStorage.removeItem("isIframe");
|
||||
window.localStorage.removeItem("soundList");
|
||||
let json = {
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
v-if="$route.path.indexOf('/firm/') == -1 && company != 'nanchang'"
|
||||
@click="changeArea(-1)"
|
||||
>{{
|
||||
titleName ? systemInfo.platformName + " - " + titleName : headerName
|
||||
$store.state.currentProDetail.name ? systemInfo.platformName + " - " + $store.state.currentProDetail.name : headerName
|
||||
}}</span
|
||||
>
|
||||
<span
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
<!-- 点击内容 -->
|
||||
<div slot="reference" class="click-content">
|
||||
<i class="el-icon-trophy-1"></i>
|
||||
<span>18772114025</span>
|
||||
<span :title="$store.state.currentProDetail.name">{{$store.state.currentProDetail.name}}</span>
|
||||
<i class="el-icon-arrow-down"></i>
|
||||
</div>
|
||||
</el-popover>
|
||||
@ -100,6 +100,7 @@ export default {
|
||||
this.selectedProjectSn = obj.sn;
|
||||
// 修改全局projectSn
|
||||
this.$store.commit("setProjectSn", obj.sn);
|
||||
this.$store.commit("setProDetail", obj);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -131,6 +132,7 @@ export default {
|
||||
this.selectedProjectSn = data.projectSn;
|
||||
// 修改全局projectSn
|
||||
this.$store.commit("setProjectSn", data.projectSn);
|
||||
this.$store.commit("setProDetail", data);
|
||||
// 收起popover
|
||||
this.visible = false;
|
||||
}
|
||||
@ -207,6 +209,11 @@ export default {
|
||||
cursor: pointer;
|
||||
.flexStyle();
|
||||
> span {
|
||||
display: inline-block;
|
||||
width: 77px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin: 0px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ export default new Vuex.Store({
|
||||
// FILEURL:' http://101.43.164.214:11111/image/',// 百色
|
||||
UPLOADURL:'http://192.168.34.221:9111/upload/image/',// 郭圣雄
|
||||
FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄
|
||||
WORKFLOWURL: 'http://192.168.34.155:88/#/workspace/forms',//测试
|
||||
WORKFLOWURL: 'http://192.168.34.138:88/#/workspace/forms',//测试工作流地址(本地)
|
||||
// UPLOADURL:'http://10.0.1.43:6023/upload/image',//测试
|
||||
// FILEURL:'http://10.0.1.43:6023/image/',//测试
|
||||
// BASEURL: baseUrl
|
||||
|
||||
@ -263,7 +263,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="用户管理" name="four">
|
||||
<el-tab-pane label="用户管理" name="four" v-if="treeSelectData.projectSn">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="medium"
|
||||
@ -3104,6 +3104,10 @@ export default {
|
||||
const concatArr = checkedArr.concat(halfCheckedArr);
|
||||
const companySnArr = new Set([]);
|
||||
const projectSnArr = new Set([]);
|
||||
if(concatArr.length == 0){
|
||||
this.$message.error("请先选择组织");
|
||||
return;
|
||||
}
|
||||
concatArr.map(item => {
|
||||
if(item.companySn){
|
||||
companySnArr.add(item.companySn)
|
||||
|
||||
@ -418,6 +418,7 @@ export default {
|
||||
this.$store.commit('setMapBackArr', [])
|
||||
this.$store.commit('setMoudle', null)
|
||||
this.$store.commit('setProDetail', null)
|
||||
this.$store.commit('setSelectedGroupSn', null);
|
||||
window.localStorage.removeItem('isIframe')
|
||||
window.localStorage.removeItem('soundList')
|
||||
let json = {
|
||||
|
||||
@ -604,6 +604,7 @@ export default {
|
||||
this.$store.commit('setMapBackArr', [])
|
||||
this.$store.commit('setMoudle', null)
|
||||
this.$store.commit('setProDetail', null)
|
||||
this.$store.commit('setSelectedGroupSn', null);
|
||||
window.localStorage.removeItem('isIframe')
|
||||
window.localStorage.removeItem('soundList')
|
||||
|
||||
|
||||
@ -82,8 +82,13 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="info_content">
|
||||
<el-form :model="form" :rules="rules" ref="form" label-width="0px"
|
||||
key="form">
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="form"
|
||||
label-width="0px"
|
||||
key="form"
|
||||
>
|
||||
<el-form-item label="" prop="account">
|
||||
<el-input
|
||||
v-model="form.account"
|
||||
@ -395,7 +400,7 @@ import {
|
||||
getUserByUidApi,
|
||||
companyLoginApi,
|
||||
projectLoginApi,
|
||||
newRegisterApi
|
||||
newRegisterApi,
|
||||
} from "@/assets/js/api/loginSign";
|
||||
import { selectSystemLogoConfigApi } from "@/assets/js/api/jxjadmin";
|
||||
import getcode from "@/components/getMsgCode";
|
||||
@ -484,7 +489,7 @@ export default {
|
||||
required: true,
|
||||
message: "请输入正确的密码格式",
|
||||
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}/,
|
||||
},
|
||||
],
|
||||
companyName: [
|
||||
@ -501,7 +506,7 @@ export default {
|
||||
message: "请输入正确的邮箱格式",
|
||||
trigger: "blur",
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
systemInfo: {
|
||||
loginBackgroundImage: "",
|
||||
@ -585,6 +590,15 @@ export default {
|
||||
getUserByUidApi(data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
//赋值
|
||||
// 前端判断登录账号与选中的登录方式(用户登录、供应商登录)不一致
|
||||
if (this.loginType == 1 && res.result.accountType == 11) {
|
||||
this.$message.error("当前登录账号与所选登录方式不符,无法登录");
|
||||
return;
|
||||
}
|
||||
if (this.loginType == 2 && res.result.accountType != 11) {
|
||||
this.$message.error("当前登录账号与所选登录方式不符,无法登录");
|
||||
return;
|
||||
}
|
||||
this.parseLoginData(res.result);
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
@ -604,8 +618,8 @@ export default {
|
||||
this.isLogin = true;
|
||||
},
|
||||
// 去重置密码
|
||||
goReset(){
|
||||
console.log(666)
|
||||
goReset() {
|
||||
console.log(666);
|
||||
this.$router.push({ path: "/resetPassword" });
|
||||
},
|
||||
// 去注册
|
||||
@ -616,7 +630,7 @@ export default {
|
||||
pw: "",
|
||||
email: "",
|
||||
companyName: "",
|
||||
}
|
||||
};
|
||||
},
|
||||
//修改密码提交
|
||||
savePasswordBtn() {
|
||||
@ -704,6 +718,7 @@ export default {
|
||||
this.$store.commit("setMapBackArr", []);
|
||||
this.$store.commit("setMoudle", null);
|
||||
this.$store.commit("setProDetail", null);
|
||||
this.$store.commit('setSelectedGroupSn', null);
|
||||
window.localStorage.removeItem("isIframe");
|
||||
window.localStorage.removeItem("soundList");
|
||||
|
||||
@ -729,12 +744,39 @@ export default {
|
||||
loginApi(this.form).then((res) => {
|
||||
console.log("--------------------么么儿们10");
|
||||
console.log(res.result);
|
||||
|
||||
// 前端判断登录账号与选中的登录方式(用户登录、供应商登录)不一致
|
||||
if (this.loginType == 1 && res.result.accountType == 11) {
|
||||
this.$message.error(
|
||||
"当前登录账号与所选登录方式不符,无法登录"
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (this.loginType == 2 && res.result.accountType != 11) {
|
||||
this.$message.error(
|
||||
"当前登录账号与所选登录方式不符,无法登录"
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.parseLoginData(res.result);
|
||||
this.getDetail(this.headquartersSnData);
|
||||
});
|
||||
} else if (LOGINTYPE == 2) {
|
||||
console.log(2222222222222);
|
||||
companyLoginApi(this.form).then((res) => {
|
||||
// 前端判断登录账号与选中的登录方式(用户登录、供应商登录)不一致
|
||||
if (this.loginType == 1 && res.result.accountType == 11) {
|
||||
this.$message.error(
|
||||
"当前登录账号与所选登录方式不符,无法登录"
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (this.loginType == 2 && res.result.accountType != 11) {
|
||||
this.$message.error(
|
||||
"当前登录账号与所选登录方式不符,无法登录"
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.parseLoginData(res.result);
|
||||
this.getDetail(this.headquartersSnData);
|
||||
});
|
||||
@ -744,6 +786,19 @@ export default {
|
||||
console.log(333333333);
|
||||
|
||||
projectLoginApi(this.form).then((res) => {
|
||||
// 前端判断登录账号与选中的登录方式(用户登录、供应商登录)不一致
|
||||
if (this.loginType == 1 && res.result.accountType == 11) {
|
||||
this.$message.error(
|
||||
"当前登录账号与所选登录方式不符,无法登录"
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (this.loginType == 2 && res.result.accountType != 11) {
|
||||
this.$message.error(
|
||||
"当前登录账号与所选登录方式不符,无法登录"
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.parseLoginData(res.result);
|
||||
this.getDetail(this.headquartersSnData);
|
||||
});
|
||||
@ -774,6 +829,19 @@ export default {
|
||||
this.addPasswordDialog = true;
|
||||
this.passwordForm.token = res.result.token;
|
||||
} else {
|
||||
// 前端判断登录账号与选中的登录方式(用户登录、供应商登录)不一致
|
||||
if (this.loginType == 1 && res.result.accountType == 11) {
|
||||
this.$message.error(
|
||||
"当前登录账号与所选登录方式不符,无法登录"
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (this.loginType == 2 && res.result.accountType != 11) {
|
||||
this.$message.error(
|
||||
"当前登录账号与所选登录方式不符,无法登录"
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.parseLoginData(res.result);
|
||||
this.getDetail(this.headquartersSnData);
|
||||
}
|
||||
@ -782,6 +850,19 @@ export default {
|
||||
console.log(2222222222222);
|
||||
|
||||
companyLoginApi(this.form).then((res) => {
|
||||
// 前端判断登录账号与选中的登录方式(用户登录、供应商登录)不一致
|
||||
if (this.loginType == 1 && res.result.accountType == 11) {
|
||||
this.$message.error(
|
||||
"当前登录账号与所选登录方式不符,无法登录"
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (this.loginType == 2 && res.result.accountType != 11) {
|
||||
this.$message.error(
|
||||
"当前登录账号与所选登录方式不符,无法登录"
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.parseLoginData(res.result);
|
||||
this.getDetail(this.headquartersSnData);
|
||||
});
|
||||
@ -789,6 +870,19 @@ export default {
|
||||
console.log(333333333);
|
||||
|
||||
projectLoginApi(this.form).then((res) => {
|
||||
// 前端判断登录账号与选中的登录方式(用户登录、供应商登录)不一致
|
||||
if (this.loginType == 1 && res.result.accountType == 11) {
|
||||
this.$message.error(
|
||||
"当前登录账号与所选登录方式不符,无法登录"
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (this.loginType == 2 && res.result.accountType != 11) {
|
||||
this.$message.error(
|
||||
"当前登录账号与所选登录方式不符,无法登录"
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.parseLoginData(res.result);
|
||||
this.getDetail(this.headquartersSnData);
|
||||
});
|
||||
@ -804,6 +898,15 @@ export default {
|
||||
this.$refs["form2"].validate((valid) => {
|
||||
if (valid) {
|
||||
loginPhoneApi(this.form2).then((res) => {
|
||||
// 前端判断登录账号与选中的登录方式(用户登录、供应商登录)不一致
|
||||
if (this.loginType == 1 && res.result.accountType == 11) {
|
||||
this.$message.error("当前登录账号与所选登录方式不符,无法登录");
|
||||
return;
|
||||
}
|
||||
if (this.loginType == 2 && res.result.accountType != 11) {
|
||||
this.$message.error("当前登录账号与所选登录方式不符,无法登录");
|
||||
return;
|
||||
}
|
||||
this.parseLoginData(res.result);
|
||||
});
|
||||
} else {
|
||||
@ -815,22 +918,26 @@ export default {
|
||||
},
|
||||
registerFn() {
|
||||
this.$refs["registerForm"].validate((valid) => {
|
||||
// console.log("this.$refs['LoginInfo']:", this.$refs["LoginInfo"]);
|
||||
let requestData = {...this.registerForm}
|
||||
requestData.accountType = this.registerType;
|
||||
if(this.registerType == 1){
|
||||
delete requestData.enterpriseName
|
||||
}
|
||||
if (valid) {
|
||||
newRegisterApi({...this.registerForm, headquartersSn: this.headquartersSnData, accountType:this.registerType}).then((res) => {
|
||||
this.$message.success('注册成功');
|
||||
this.goLogin();
|
||||
});
|
||||
} else {
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
// console.log("this.$refs['LoginInfo']:", this.$refs["LoginInfo"]);
|
||||
let requestData = { ...this.registerForm };
|
||||
requestData.accountType = this.registerType;
|
||||
if (this.registerType == 1) {
|
||||
delete requestData.enterpriseName;
|
||||
}
|
||||
if (valid) {
|
||||
newRegisterApi({
|
||||
...this.registerForm,
|
||||
headquartersSn: this.headquartersSnData,
|
||||
accountType: this.registerType,
|
||||
}).then((res) => {
|
||||
this.$message.success("注册成功");
|
||||
this.goLogin();
|
||||
});
|
||||
} else {
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
selectMp3FileList() {
|
||||
selectNoticeRemindSoundApi({
|
||||
@ -861,7 +968,10 @@ export default {
|
||||
: [];
|
||||
var companyModule = [];
|
||||
var projectModule = [];
|
||||
if (moduleList.length == 0 && (data.accountType != 1 && data.accountType != 10)) {
|
||||
if (
|
||||
moduleList.length == 0 &&
|
||||
data.accountType != 1 && data.accountType != 10
|
||||
) {
|
||||
this.$message.warning("当前账号还没分配权限");
|
||||
return false;
|
||||
}
|
||||
@ -960,7 +1070,7 @@ export default {
|
||||
console.log("arr2", arr2);
|
||||
// 如果数组为空表示该用户没有权限访问
|
||||
if (!arr2.length) {
|
||||
if(this.loginType == 1){
|
||||
if (this.loginType == 1) {
|
||||
// this.$router.push("/projectIndex");
|
||||
this.$router.push("/workSpace");
|
||||
} else {
|
||||
@ -975,7 +1085,7 @@ export default {
|
||||
(data.styleType != 2 && data.styleType != 3) ||
|
||||
!data.styleType
|
||||
) {
|
||||
if(this.loginType == 1){
|
||||
if (this.loginType == 1) {
|
||||
// this.$router.push("/projectIndex");
|
||||
this.$router.push("/workSpace");
|
||||
} else {
|
||||
@ -1135,7 +1245,7 @@ export default {
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
.operate-btn{
|
||||
.operate-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
@ -477,6 +477,7 @@ export default {
|
||||
this.$store.commit('setMapBackArr', [])
|
||||
this.$store.commit('setMoudle', null)
|
||||
this.$store.commit('setProDetail', null)
|
||||
this.$store.commit('setSelectedGroupSn', null);
|
||||
window.localStorage.removeItem('isIframe')
|
||||
window.localStorage.removeItem('soundList')
|
||||
let json = {
|
||||
|
||||
@ -122,6 +122,7 @@ import { getProjectDetail } from "@/assets/js/api/baseInfo.js";
|
||||
import {
|
||||
getProjectModuleList,
|
||||
getAllModuleApi,
|
||||
getNewUserAllModulePageApi
|
||||
} from "@/assets/js/api/jxjadmin.js";
|
||||
import { getSafeyHatSessionApi } from "@/assets/js/api/demo";
|
||||
import { getDockingUrlApi } from "@/assets/js/api/configManage";
|
||||
@ -337,7 +338,28 @@ export default {
|
||||
},
|
||||
//为了展示未解锁产品,所以需要查询所有模块
|
||||
getAllModule(half) {
|
||||
getAllModuleApi({
|
||||
// 新用户功能模块
|
||||
if(this.$store.state.userInfo.accountType == 10){
|
||||
getNewUserAllModulePageApi({
|
||||
projectSn: this.projectSn,
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
var all = res.result.moduleList;
|
||||
console.log("all", all);
|
||||
all.forEach((element, index) => {
|
||||
all[index].operation = false;
|
||||
res.result.menuList.forEach((element2) => {
|
||||
if (element2.moduleId == element.moduleId) {
|
||||
all[index].operation = true;
|
||||
all[index].menuList = element2.menuList;
|
||||
}
|
||||
});
|
||||
});
|
||||
this.list = all;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
getAllModuleApi({
|
||||
moduleType: 2,
|
||||
styleType: this.$store.state.userInfo.styleType,
|
||||
}).then((res) => {
|
||||
@ -356,6 +378,8 @@ export default {
|
||||
this.list = all;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
insertAfter(newElement, targetElement) {
|
||||
// newElement是要追加的元素 targetElement 是指定元素的位置
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
frameborder="1"
|
||||
></iframe>
|
||||
</div>
|
||||
<!-- 查看大图 -->
|
||||
<!-- 选择组织 -->
|
||||
<el-dialog
|
||||
title="选择组织"
|
||||
:modal-append-to-body="false"
|
||||
@ -46,6 +46,9 @@
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if(this.$store.state.selectedGroupSn){
|
||||
this.selectGroupDialog = false;
|
||||
}
|
||||
this.getGroupTreeData();
|
||||
},
|
||||
methods: {
|
||||
@ -68,7 +71,7 @@
|
||||
// 点击选中组织
|
||||
selectedGroupData(item) {
|
||||
this.selectedDataSn = item.sn;
|
||||
this.$store.commit("setSelectedGroupSn", this.selectedDataSn); // 存储选中的组织Sn
|
||||
this.$store.commit("setSelectedGroupSn", item.sn); // 存储选中的组织Sn
|
||||
this.selectGroupDialog = false;
|
||||
this.selectedDefaultProject(item);
|
||||
this.$nextTick(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user