|
@@ -6,7 +6,7 @@
|
|
<el-col :span="3">
|
|
<el-col :span="3">
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-select v-model="filters.companyId" clearable filterable placeholder="请选择公司">
|
|
<el-select v-model="filters.companyId" clearable filterable placeholder="请选择公司">
|
|
- <el-option v-for="item in company" :key="item.id" :label="item.companyName" :value="item.id">
|
|
|
|
|
|
+ <el-option v-for="item in allCompanies" :key="item.id" :label="item.companyName" :value="item.id">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -162,6 +162,8 @@
|
|
user: JSON.parse(sessionStorage.getItem('user')),
|
|
user: JSON.parse(sessionStorage.getItem('user')),
|
|
company: [],
|
|
company: [],
|
|
projects: [],
|
|
projects: [],
|
|
|
|
+ //搜索用 涉及到的所有公司
|
|
|
|
+ allCompanies: [],
|
|
|
|
|
|
list: [],
|
|
list: [],
|
|
total: 0,
|
|
total: 0,
|
|
@@ -220,12 +222,38 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- // 获取基础数据
|
|
|
|
|
|
+ //获取基础数据
|
|
getMsg(){
|
|
getMsg(){
|
|
this.http.post(this.port.project.projectByUser, {},
|
|
this.http.post(this.port.project.projectByUser, {},
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.projects = res.data;
|
|
this.projects = res.data;
|
|
|
|
+ //再获取一下公司列表
|
|
|
|
+ this.getAllCompanies();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }, error => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: 'error'
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ //获取所有公司
|
|
|
|
+ getAllCompanies(){
|
|
|
|
+ this.allCompanies = [];
|
|
|
|
+ this.http.post(this.port.base.companys, {
|
|
|
|
+ id: this.user.id,
|
|
|
|
+ parentId: this.user.parentId
|
|
|
|
+ }, res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.allCompanies = res.data;
|
|
|
|
+ console.log(this.allCompanies);
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -240,7 +268,7 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
- // 分页
|
|
|
|
|
|
+ //分页
|
|
handleCurrentChange(val) {
|
|
handleCurrentChange(val) {
|
|
this.page = val;
|
|
this.page = val;
|
|
this.getUsers();
|
|
this.getUsers();
|
|
@@ -410,23 +438,28 @@
|
|
|
|
|
|
//修改
|
|
//修改
|
|
choseProject() {
|
|
choseProject() {
|
|
- this.http.post(this.port.base.getCompanyByPro, {
|
|
|
|
- projectId: this.addForm.projectIds
|
|
|
|
- }, res => {
|
|
|
|
- if (res.code == "ok") {
|
|
|
|
- this.company = res.data;
|
|
|
|
- } else {
|
|
|
|
|
|
+ if(this.addForm.projectIds == ""){
|
|
|
|
+ this.company = [];
|
|
|
|
+ this.addForm.companyId = null;
|
|
|
|
+ }else{
|
|
|
|
+ this.http.post(this.port.base.getCompanyByPro, {
|
|
|
|
+ projectId: this.addForm.projectIds
|
|
|
|
+ }, res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.company = res.data;
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }, error => {
|
|
this.$message({
|
|
this.$message({
|
|
- message: res.msg,
|
|
|
|
|
|
+ message: error,
|
|
type: 'error'
|
|
type: 'error'
|
|
});
|
|
});
|
|
- }
|
|
|
|
- }, error => {
|
|
|
|
- this.$message({
|
|
|
|
- message: error,
|
|
|
|
- type: 'error'
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
//邀请
|
|
//邀请
|