|
@@ -9,7 +9,7 @@
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" v-on:click="getProject">查询</el-button>
|
|
|
</el-form-item>
|
|
|
- <el-form-item style="float:right;" v-if="">
|
|
|
+ <el-form-item style="float:right;" v-if="user.parentId == 1">
|
|
|
<el-button type="primary" @click="handleAdd">新增</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -150,8 +150,8 @@
|
|
|
methods: {
|
|
|
// 获取基础数据
|
|
|
getMsg(){
|
|
|
- this.http.post(this.port.project.getUserList, {
|
|
|
- companyId: this.user.companyId
|
|
|
+ this.http.post(this.port.project.getUserById, {
|
|
|
+ companyIds: this.user.companyId
|
|
|
} , res => {
|
|
|
if (res.code == "ok") {
|
|
|
this.charger = res.data;
|
|
@@ -234,13 +234,13 @@
|
|
|
|
|
|
//选择公司切换人员
|
|
|
companyChange: function(){
|
|
|
- var param = {}
|
|
|
+ var param = {} ,
|
|
|
str = this.user.companyId;
|
|
|
for(var i in this.addForm.customerCompany){
|
|
|
str += "," + this.addForm.customerCompany[i].id;
|
|
|
}
|
|
|
- param.companyId = str;
|
|
|
- this.http.post(this.port.project.getUserList, param , res => {
|
|
|
+ param.companyIds = str;
|
|
|
+ this.http.post(this.port.project.getUserById, param , res => {
|
|
|
if (res.code == "ok") {
|
|
|
this.charger = res.data;
|
|
|
} else {
|
|
@@ -291,6 +291,7 @@
|
|
|
var cId = "",
|
|
|
cName = "";
|
|
|
for(var i in this.addForm.customerCompany){
|
|
|
+ console.log(this.addForm.customerCompany[i])
|
|
|
cId += this.addForm.customerCompany[i].id + ",";
|
|
|
cName += this.addForm.customerCompany[i].companyName + ",";
|
|
|
}
|
|
@@ -299,10 +300,10 @@
|
|
|
this.addLoading = true;
|
|
|
this.http.post(this.port.project.addProject, {
|
|
|
projectName: this.addForm.projectName,
|
|
|
- customerCompany: cId,
|
|
|
- customerCompanyName: cName,
|
|
|
- managerName: this.addForm.charger.id,
|
|
|
- managerId: this.addForm.charger.username,
|
|
|
+ customerCompanyIds: cId,
|
|
|
+ customerCompanyNames: cName,
|
|
|
+ managerName: this.addForm.managerId.username,
|
|
|
+ managerId: this.addForm.managerId.id,
|
|
|
// userIds: userIds,
|
|
|
flag: 0
|
|
|
} , res => {
|