提交 89c71834 编写于 作者: zhentian.jia's avatar zhentian.jia

添加外部用户情况

上级 d0b5bf0c
......@@ -7,4 +7,4 @@ dist/
node_modules/
.DS_Store
.vscode
envConfig.js
\ No newline at end of file
src/utils/envConfig.js
\ No newline at end of file
......@@ -154,7 +154,7 @@
</div>
<div class="second-step" v-else-if="active === 1">
<el-tabs v-model="activeName" @tab-click="handleClickTabs">
<el-tab-pane label="设定行政范围" name="first">
<el-tab-pane v-if="idTypeValue == 1" label="设定行政范围" name="first">
<el-row :gutter="20">
<el-col class="rim" :span="12">
<!--
......@@ -423,7 +423,7 @@
import BreadCrumb from "../../components/breadcrumb.vue";
import { doUpload, getFilePath } from "../../utils/qiniuUtil";
import { returnData } from "../mock";
import { setTimeout } from "timers";
import { mapGetters } from "vuex";
import { openLoading, closeLoading } from "../../utils/utils";
let vm = null;
export default {
......@@ -448,6 +448,7 @@ export default {
district: "长宁区"
};
return {
idTypeValue: "",
itemOrganization: itemOrganization,
itemPerson: itemPerson,
projectId: null,
......@@ -637,6 +638,9 @@ export default {
}
};
},
computed: {
...mapGetters(["_token", "idType"])
},
created() {
vm = this;
(this.projectId = vm.getUrlSearch(window.location.href, "projectId")),
......@@ -645,8 +649,13 @@ export default {
this.getComponentInfo();
this.$nextTick(function() {
//this.getComponentInfo();
//this.getDepartment();
this.idTypeValue = vm.idType;
//this.idTypeValue = 2;
if (this.idTypeValue == 2) {
console.log("idType:", vm.idType, " idTypeValue:", this.idTypeValue);
this.activeName = "second";
}
});
},
methods: {
......@@ -954,56 +963,59 @@ export default {
}
}
} else if (this.active == 1) {
if (this.tagsRegion.length > 0) {
//选择了范围
let req = {
projectId: this.projectId,
setKindOfAdministrative: this.getKind("administrative"),
//scopeOfAdministrative: "000:2|000_110:1",
setKindOfOrganization: this.getKind("organization"),
//scopeOfOrganization: "2|3|4|5|6|7",
setKindOfDepartment: this.getKind("department"),
//scopeOfDepartment: "54",
setKindOfPeople: this.getKind("person")
//scopeOfPeople: ""
};
if (req.setKindOfAdministrative == 3) {
req.scopeOfAdministrative = this.getScope("administrativeUpdate");
}
if (
req.setKindOfOrganization == 2 ||
req.setKindOfOrganization == 3
) {
req.scopeOfOrganization = this.getScopeOrganization(
req.setKindOfOrganization
);
}
if (req.setKindOfDepartment == 3) {
req.scopeOfDepartment = this.getScopeDepartment();
}
if (req.setKindOfPeople == 2 || req.setKindOfPeople == 3) {
req.scopeOfPeople = this.getScopePeople(req.setKindOfPeople);
}
vm.POST("scope", req).then(res => {
if (res.code == "000000") {
//移动到选择项目组件
console.log(res);
this.active++;
this.stepData = [false, false, true];
} else {
this.$notify({
title: "",
message: res.message
});
if (this.idTypeValue == 1) {
//内部管理员
if (this.tagsRegion.length > 0) {
//选择了范围
let req = {
projectId: this.projectId,
setKindOfAdministrative: this.getKind("administrative"),
//scopeOfAdministrative: "000:2|000_110:1",
setKindOfOrganization: this.getKind("organization"),
//scopeOfOrganization: "2|3|4|5|6|7",
setKindOfDepartment: this.getKind("department"),
//scopeOfDepartment: "54",
setKindOfPeople: this.getKind("person")
//scopeOfPeople: ""
};
if (req.setKindOfAdministrative == 3) {
req.scopeOfAdministrative = this.getScope("administrativeUpdate");
}
});
} else {
//没有选择范围
vm.$message({
showClose: true,
message: "选择项目范围后才能进行下一步操作",
type: "error"
});
if (
req.setKindOfOrganization == 2 ||
req.setKindOfOrganization == 3
) {
req.scopeOfOrganization = this.getScopeOrganization(
req.setKindOfOrganization
);
}
if (req.setKindOfDepartment == 3) {
req.scopeOfDepartment = this.getScopeDepartment();
}
if (req.setKindOfPeople == 2 || req.setKindOfPeople == 3) {
req.scopeOfPeople = this.getScopePeople(req.setKindOfPeople);
}
vm.POST("scope", req).then(res => {
if (res.code == "000000") {
//移动到选择项目组件
console.log(res);
this.active++;
this.stepData = [false, false, true];
} else {
this.$notify({
title: "",
message: res.message
});
}
});
} else {
//没有选择范围
vm.$message({
showClose: true,
message: "选择项目范围后才能进行下一步操作",
type: "error"
});
}
}
}
},
......@@ -1074,9 +1086,7 @@ export default {
const isMP4 = file.type === "video/mp4";
const isLt = file.size / 1024 / 1024 < 500;
if (!isLt) {
this.$message.error(
"上传视频大小不能超过500M !"
);
this.$message.error("上传视频大小不能超过500M !");
}
if (!isMP4) {
this.$message.error("请上传MP4格式文件!");
......@@ -1170,7 +1180,9 @@ export default {
//新建
} else {
//编辑
this.getAdministrative();
if(this.idTypeValue == 1) {
this.getAdministrative();
}
}
},
//切换tabs
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册