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

添加外部用户情况

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