浏览代码

Merge branch 'master' of http://47.100.37.243:10080/ZHOU/yunsu

5 年之前
父节点
当前提交
27bcb54962

+ 4 - 1
ys_vue/src/port.js

@@ -22,6 +22,8 @@ export default {
         addProject: '/project/add', //添加或修改项目
         projectDetail: '/project/detail', //项目详情
         projects: '/project/projectList', //筛选模具列表时作为筛选条件所加载的项目列表
+        projectByUser: '/project/getProjectListByUserAndCompany',//获取创建人员分配项目时根据当前人和公司获取项目列表
+
         uploadFile: '/projectfile/uploadFile', //项目文档的上传
         dowloadFile: '/projectfile/dowloadFile', //项目文档的下载
         fileList: '/projectfile/list', //项目文档列表
@@ -77,7 +79,8 @@ export default {
         comps: '/company/getCompanys', //创建模具获取的(资产方)公司列表
         addCompanyListToProject: '/company/addCompanyListToProject', //项目分配生产方公司列表
         relationList: '/company/relationList', //建立关联公司时的公司列表
-        ownerComps: 'company/ownerRelateCompany', //返回当前公司的关联公司列表
+        ownerComps: '/company/ownerRelateCompany', //返回当前公司的关联公司列表
+        getCompanyByPro: '/company/getProduceCompany', //根据项目id获取项目的生产方公司
 
 
         addFactory: '/factory/add',  //(工厂)

+ 2 - 2
ys_vue/src/views/Home.vue

@@ -435,8 +435,8 @@ export default {
         res => {
           if (res.code == "ok") {
             this.popoverData = [];
-            this.popoverData.push(res.data[0].emergencyList.list);
-            this.popoverData.push(res.data[1].emergencyList.list);
+            this.popoverData.push(res.data[0].approvelList.list);
+            this.popoverData.push(res.data[1].matainList.list);
             this.popoverData.push(res.data[2].emergencyList.list);
             this.unreadCount = [];
             this.unreadCount.push(res.data[0].isNotReadCount);

+ 102 - 48
ys_vue/src/views/message.vue

@@ -13,56 +13,85 @@
     <el-col :span="24">
       <el-tabs v-model="activePage" @tab-click="handleClick" type="card">
         <el-tab-pane name="0" label="审批">
-          <div class="message-div" v-for="item in messages[0]">
-            <p>
-              <span
-                class="message-title"
-                @click="locationHerf(item.refId, item.noticeType)"
-              >{{item.projectName}}</span>
-              <span class="message-time">{{item.indate}}</span>
-            </p>
-            <p class="message-article">{{item.content}}</p>
+          <div :style="heightString">
+            <div class="message-div" v-for="item in messages[0]">
+              <p>
+                <span
+                  class="message-title"
+                  @click="locationHerf(item.refId, item.noticeType)"
+                >{{item.projectName}}</span>
+                <span class="message-time">{{item.indate}}</span>
+              </p>
+              <p class="message-article">{{item.content}}</p>
+            </div>
           </div>
+          <!--分页1-->
+          <el-col :span="24" class="toolbar">
+            <el-pagination
+              @size-change="handleSizeChange0"
+              @current-change="handleCurrentChange0"
+              :page-sizes="[20 , 50 , 80 , 100 , 200]"
+              :page-size="20"
+              layout="total, sizes, prev, pager, next"
+              :total="total[0]"
+              style="float:right;"
+            ></el-pagination>
+          </el-col>
         </el-tab-pane>
         <el-tab-pane name="1" label="警告">
-          <div class="message-div" v-for="item in messages[1]">
-            <p>
-              <span
-                class="message-title"
-                @click="locationHerf(item.refId, item.noticeType)"
-              >{{item.projectName}}</span>
-              <span class="message-time">{{item.indate}}</span>
-            </p>
-            <p class="message-article">{{item.content}}</p>
+          <div :style="heightString">
+            <div class="message-div" v-for="item in messages[1]">
+              <p>
+                <span
+                  class="message-title"
+                  @click="locationHerf(item.refId, item.noticeType)"
+                >{{item.projectName}}</span>
+                <span class="message-time">{{item.indate}}</span>
+              </p>
+              <p class="message-article">{{item.content}}</p>
+            </div>
           </div>
+          <!--分页2-->
+          <el-col :span="24" class="toolbar">
+            <el-pagination
+              @size-change="handleSizeChange1"
+              @current-change="handleCurrentChange1"
+              :page-sizes="[20 , 50 , 80 , 100 , 200]"
+              :page-size="20"
+              layout="total, sizes, prev, pager, next"
+              :total="total[1]"
+              style="float:right;"
+            ></el-pagination>
+          </el-col>
         </el-tab-pane>
         <el-tab-pane name="2" label="保养">
-          <div class="message-div" v-for="item in messages[2]">
-            <p>
-              <span
-                class="message-title"
-                @click="locationHerf(item.refId, item.noticeType)"
-              >{{item.projectName}}</span>
-              <span class="message-time">{{item.indate}}</span>
-            </p>
-            <p class="message-article">{{item.content}}</p>
+          <div :style="heightString">
+            <div class="message-div" v-for="item in messages[2]">
+              <p>
+                <span
+                  class="message-title"
+                  @click="locationHerf(item.refId, item.noticeType)"
+                >{{item.projectName}}</span>
+                <span class="message-time">{{item.indate}}</span>
+              </p>
+              <p class="message-article">{{item.content}}</p>
+            </div>
           </div>
+          <!--分页3-->
+          <el-col :span="24" class="toolbar">
+            <el-pagination
+              @size-change="handleSizeChange2"
+              @current-change="handleCurrentChange2"
+              :page-sizes="[20 , 50 , 80 , 100 , 200]"
+              :page-size="20"
+              layout="total, sizes, prev, pager, next"
+              :total="total[2]"
+              style="float:right;"
+            ></el-pagination>
+          </el-col>
         </el-tab-pane>
       </el-tabs>
     </el-col>
-
-    <!--工具条-->
-    <el-col :span="24" class="toolbar">
-      <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :page-sizes="[20 , 50 , 80 , 100 , 200]"
-        :page-size="20"
-        layout="total, sizes, prev, pager, next"
-        :total="total"
-        style="float:right;"
-      ></el-pagination>
-    </el-col>
   </section>
 </template>
 
@@ -72,20 +101,41 @@ export default {
   data() {
     return {
       messages: [],
-      page: 1,
+      page0: 1,
+      page1: 1,
+      page2: 1,
       size: 20,
-      total: 0,
+      total: [0, 0, 0],
       tableHeight: 0,
-      activePage: 0
+      activePage: 0,
+      heightString: ""
     };
   },
   methods: {
-    //分页
-    handleCurrentChange(val) {
+    //分页1
+    handleCurrentChange0(val) {
+      this.page0 = val;
+      this.loadNotice();
+    },
+    handleSizeChange0(val) {
+      this.size1 = val;
+      this.loadNotice();
+    },
+    //分页2
+    handleCurrentChange1(val) {
+      this.page2 = val;
+      this.loadNotice();
+    },
+    handleSizeChange1(val) {
+      this.size = val;
+      this.loadNotice();
+    },
+    //分页3
+    handleCurrentChange2(val) {
       this.page = val;
       this.loadNotice();
     },
-    handleSizeChange(val) {
+    handleSizeChange2(val) {
       this.size = val;
       this.loadNotice();
     },
@@ -104,9 +154,12 @@ export default {
         res => {
           if (res.code == "ok") {
             this.messages = [];
-            this.messages.push(res.data[0].emergencyList.list);
-            this.messages.push(res.data[1].emergencyList.list);
+            this.messages.push(res.data[0].approvelList.list);
+            this.messages.push(res.data[1].matainList.list);
             this.messages.push(res.data[2].emergencyList.list);
+            this.total[0] = res.data[0].approvelList.total;
+            this.total[1] = res.data[1].matainList.total;
+            this.total[2] = res.data[2].emergencyList.total;
           } else {
             this.$message({
               message: res.msg,
@@ -160,6 +213,7 @@ export default {
   created() {
     let height = window.innerHeight;
     this.tableHeight = height - 260;
+    this.heightString = "height: " + this.tableHeight + "px";
   },
   mounted() {
     this.loadNotice();

+ 1 - 1
ys_vue/src/views/mold/moldDetail.vue

@@ -121,7 +121,7 @@
 
             <!-- 上传 试模2 保养3 时 -->
             <el-upload ref="upload"
-                v-show="(activeTab == 2 || activeTab == 3 || activeTab == 4) && update == 1"
+                v-show="(activeTab == 2 || activeTab == 3) && update == 1"
                 action="customize"
                 :http-request="uploadFile"
                 :show-file-list="false"

+ 61 - 32
ys_vue/src/views/project/projectDetail.vue

@@ -146,7 +146,7 @@
                 </el-col>
                 <el-col :span="24">
                     <el-form-item label="项目模具" prop="modelIds">
-                        <el-select v-model="editForm.modelIds" clearable filterable multiple placeholder="请选择项目模具" value-key='id' style="width:510px">
+                        <el-select v-model="editForm.modelIds" @change="companyChange" clearable filterable multiple placeholder="请选择项目模具" value-key='id' style="width:510px">
                             <el-option v-for="item in molds" :key="item.id" :label="item.modelName" :value="item">
                                 <span style="float: left">{{ item.modelName }}</span>
                                 <span style="float: right; color: #8492a6; font-size: 6px;margin-right:17px;">{{ item.produceCompany }}</span>
@@ -325,9 +325,9 @@
 					],
                 },
                 
-                editFormVisible: false,//新增界面是否显示
+                editFormVisible: false,//编辑界面是否显示
 				editLoading: false,
-				//新增界面数据
+				//编辑界面数据
 				editForm: {
 					projectName: '',
                     customerCompany: [],
@@ -355,7 +355,6 @@
             //返回
             backToList() {
                 this.$router.go(-1);
-                // this.$router.push("/project");
             },
 
             toMold(id) {
@@ -466,7 +465,7 @@
                     if (res.code == "ok") {
                         var list = res.data , array = [];
                         for(var i in list){
-                            if(list[i].id != this.user.companyId){
+                            if(list[i].id != this.proDetail.ownerCompany){
                                 array.push(list[i])
                             }
                         }
@@ -504,9 +503,8 @@
                     });
                 })
 
-                this.http.post(this.port.base.companys, {
-                    parentId: this.user.parentId,
-                    id: this.user.id
+                this.http.post(this.port.base.getCompanyByPro, {
+                    projectId: this.detailId
                 }, res => {
                     if (res.code == "ok") {
                         this.staffComp = res.data;
@@ -527,7 +525,7 @@
             // 获取人员
             getStaff() {
                 // 获取人员
-                var compIds = this.user.companyId;
+                var compIds = this.proDetail.ownerCompany;
                 for(var i in this.proDetail.customCompanies){
                     compIds += "," + this.proDetail.customCompanies[i].companyId;
                 }
@@ -538,7 +536,7 @@
                     if (res.code == "ok") {
                         var list = res.data , assets = [] , produce = [];
                         for(var i in list) {
-                            if(list[i].companyId == this.user.companyId){
+                            if(list[i].companyId == this.proDetail.ownerCompany){
                                 if(list[i].id != this.user.id){
                                     if(list[i].id != this.proDetail.managerId){
                                         assets.push(list[i])
@@ -554,7 +552,7 @@
                         this.assets = assets;
                         this.produce = produce;
                         this.general = res.data;
-
+                        this.setMember();
                     } else {
                         this.$message({
                             message: res.msg,
@@ -578,7 +576,7 @@
                             array.push(list[i])
                         }
                     }
-                    console.log(array)
+                    
                     this.general = array;
                 } else if(i == 1) {
                     var list = this.allUser , str = this.editForm.users.toString() , array = [] , assets = [] , produce = [];
@@ -589,10 +587,12 @@
                     }
 
                     for(var i in list) {
-                        if(list[i].subordinateType == 0){
-                            assets.push(list[i])
-                        } else {
-                            produce.push(list[i])
+                        if(str.indexOf(list[i].id) == -1) {
+                            if(list[i].subordinateType == 0){
+                                assets.push(list[i])
+                            } else {
+                                produce.push(list[i])
+                            }
                         }
                     }
 
@@ -605,9 +605,9 @@
             //选择公司切换人员
             companyChange() {
                 var param = {} ,
-                    str = this.user.companyId;
-                for(var i in this.editForm.customerCompany){
-                    str += "," + this.editForm.customerCompany[i].id;
+                    str = this.proDetail.ownerCompany;
+                for(var i in this.editForm.modelIds){
+                    str += "," + this.editForm.modelIds[i].produceCompanyId;
                 }
                 param.companyIds = str;
                 param.id = this.user.id
@@ -615,7 +615,7 @@
                     if (res.code == "ok") {
                         var list = res.data , assets = [] , produce = [];
                         for(var i in list) {
-                            if(list[i].companyId == this.user.companyId){
+                            if(list[i].companyId == this.proDetail.ownerCompany){
                                 assets.push(list[i])
                             } else {
                                 produce.push(list[i])
@@ -640,14 +640,14 @@
 
             //打开编辑页面
             edit() {
-                this.editFormVisible = true;
                 var compArr = [] ,
                     manager = {} ,
                     ownerApproverId = '' ,
                     customerApproverId = '' ,
                     moldArr = [] ,
                     assets = [] ,
-                    produce = [];
+                    produce = [] ,
+                    users = [];
                 for(var i in this.proDetail.customCompanies){
                     for(var j in this.company){
                         if(this.company[j].id == this.proDetail.customCompanies[i].companyId){
@@ -678,12 +678,8 @@
                     }
                 }
 
-                for(var i in this.proDetail.ownerUsers){
-                    assets.push(this.proDetail.ownerUsers[i].id)
-                }
-
-                for(var i in this.proDetail.customUsers){
-                    produce.push(this.proDetail.customUsers[i].id)
+                for(var i in this.proDetail.participateUsers){
+                    users.push(this.proDetail.participateUsers[i].id)
                 }
 
                 this.editForm = {
@@ -694,9 +690,42 @@
                     ownerApproverId: ownerApproverId,
                     customerApproverId: customerApproverId,
                     modelIds: moldArr,
-                    assets: assets,
-                    produce: produce
+                    users: users
+                }
+                this.setMember();
+
+                this.editFormVisible = true;
+            },
+
+            setMember() {
+                var list = this.allUser , array = [];
+                for(var i in list){ 
+                    if(list[i].id != this.editForm.customerApproverId && list[i].id != this.editForm.managerId.id && list[i].id != this.editForm.ownerApproverId){
+                        array.push(list[i])
+                    }
+                }
+                this.general = array;
+
+                var list = this.allUser , str = this.editForm.users.toString() , newArray = [] , assets = [] , produce = [];
+                for(var i in list) {
+                    if(str.indexOf(list[i].id) == -1) {
+                        newArray.push(list[i]);
+                    }
+                }
+
+                for(var i in list) {
+                    if(str.indexOf(list[i].id) == -1) {
+                        if(list[i].subordinateType == 0){
+                            assets.push(list[i])
+                        } else {
+                            produce.push(list[i])
+                        }
+                    }
                 }
+
+                this.charger = newArray;
+                this.assets = assets;
+                this.produce = produce;
             },
 
             //提交
@@ -796,7 +825,7 @@
                     account: '',
 					companyId: '',
                     roleName: '',
-                    projectId: this.detailId,
+                    projectIds: this.detailId,
                     flag: 0
 				};
             },
@@ -812,7 +841,7 @@
                             else { this.$refs.addForm.resetFields();this.addForm.roleName = "" }
                             if (res.code == "ok") {
                                 if(i == 0){ this.addFormVisible = false; }
-                                this.getDetail();
+                                this.getStaff();
                                 this.$message({
                                     message: '创建成功',
                                     type: 'success'

+ 82 - 61
ys_vue/src/views/project/staff.vue

@@ -34,10 +34,10 @@
 		<!--列表-->
 		<el-table :data="list" highlight-current-row :height="tableHeight" v-loading="listLoading" style="width: 100%;">
 			<el-table-column type="index" width="60"></el-table-column>
-			<el-table-column prop="username" label="姓名" width="150" sortable></el-table-column>
-			<el-table-column prop="account" label="用户名" width="150" sortable></el-table-column>
-			<el-table-column prop="mobile" label="联系方式" width="150" sortable></el-table-column>
-			<el-table-column prop="teamName" label="类型" width="150" sortable></el-table-column>
+			<el-table-column prop="username" label="姓名" width="100" sortable></el-table-column>
+			<el-table-column prop="account" label="手机号(登录账号)" width="180" sortable></el-table-column>
+			<!-- <el-table-column prop="mobile" label="联系方式" width="150" sortable></el-table-column> -->
+			<el-table-column prop="teamName" label="类型" width="100" sortable></el-table-column>
             <el-table-column prop="projects" label="参与项目" sortable>
                 <template slot-scope="scope">
                     <span class="info" v-for="(item, index) in scope.row.projects">
@@ -46,7 +46,7 @@
                     </span>
                 </template>
 			</el-table-column>
-			<el-table-column prop="companyName" label="公司" sortable></el-table-column>
+			<el-table-column prop="companyName" label="所属公司" sortable></el-table-column>
             <el-table-column prop="roleName" label="角色" sortable></el-table-column>
 			<el-table-column label="操作" width="150">
 				<template slot-scope="scope" v-if="user.id == scope.row.parentId">
@@ -75,18 +75,15 @@
 				<el-form-item label="姓名" prop="username">
 					<el-input v-model="addForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
 				</el-form-item>
-				<el-form-item label="用户名" prop="account">
-					<el-input v-model="addForm.account" autocomplete="off" placeholder="请输入用户名(登录账号)"></el-input>
+				<el-form-item label="手机号" prop="account">
+					<el-input v-model="addForm.account" autocomplete="off" placeholder="请输入手机号(登录账号)"></el-input>
 				</el-form-item>
-				<el-form-item label="联系方式" prop="mobile">
-					<el-input v-model="addForm.mobile" autocomplete="off" placeholder="请输入联系方式"></el-input>
-				</el-form-item>
-                <!-- <el-form-item label="类型" prop="teamName" v-if="user.parentId != 0">
-					<el-select v-model="addForm.teamName" clearable filterable placeholder="请选择人员类型" @change="choseComp(0)" style="width:202px">
-                        <el-option v-for="item in team" :key="item.value" :label="item.label" :value="item.value">
+                <el-form-item label="参与项目" prop="projectIds">
+					<el-select v-model="addForm.projectIds" @change="choseProject" clearable filterable placeholder="请选择参与项目" style="width:202px">
+                        <el-option v-for="item in projects" :key="item.id" :label="item.projectName" :value="item.id">
                         </el-option>
                     </el-select>
-				</el-form-item> -->
+				</el-form-item>
                 <el-form-item label="公司" prop="companyId">
 					<el-select v-model="addForm.companyId" clearable filterable placeholder="请选择所属公司" style="width:202px">
                         <el-option v-for="item in company" :key="item.id" :label="item.companyName" :value="item.id">
@@ -110,23 +107,11 @@
 				<el-form-item label="姓名" prop="username">
 					<el-input v-model="editForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
 				</el-form-item>
-				<el-form-item label="用户名" prop="account">
-					<el-input v-model="editForm.account" autocomplete="off" placeholder="请输入用户名(登录账号)"></el-input>
-				</el-form-item>
-				<el-form-item label="联系方式" prop="mobile">
-					<el-input v-model="editForm.mobile" autocomplete="off" placeholder="请输入联系方式"></el-input>
+				<el-form-item label="手机号" prop="account">
+					<el-input v-model="editForm.account" disabled autocomplete="off" placeholder="请输入手机号(登录账号)"></el-input>
 				</el-form-item>
-                <!-- <el-form-item label="类型" prop="teamName" v-if="user.parentId != 0">
-					<el-select v-model="editForm.teamName" clearable filterable placeholder="请选择人员类型" @change="choseComp(1)" style="width:202px">
-                        <el-option v-for="item in team" :key="item.value" :label="item.label" :value="item.value">
-                        </el-option>
-                    </el-select>
-				</el-form-item> -->
                 <el-form-item label="公司" prop="companyId">
-					<el-select v-model="editForm.companyId" clearable filterable placeholder="请选择所属公司" style="width:202px">
-                        <el-option v-for="item in company" :key="item.id" :label="item.companyName" :value="item.id">
-                        </el-option>
-                    </el-select>
+                    <el-input v-model="editForm.companyId" disabled autocomplete="off" placeholder="请选择所属公司"></el-input>
 				</el-form-item>
                 <el-form-item label="角色">
                     <el-input v-model="editForm.roleName" autocomplete="off" placeholder="请输入角色名称"></el-input>
@@ -167,8 +152,8 @@
                 },
                 
                 user: JSON.parse(sessionStorage.getItem('user')),
-                team: [{label:'资产方',value:0},{label:'生产方',value:1}],
                 company: [],
+                projects: [],
 
 				list: [],
 				total: 0,
@@ -182,20 +167,17 @@
 						{ required: true, message: '请输入姓名', trigger: 'blur' }
                     ],
                     account: [
-						{ required: true, message: '请输入用户名', trigger: 'blur' }
-                    ],
-                    mobile: [
                         { required: true, validator: checkPhone, trigger: 'blur'}
                     ],
                     teamName: [
 						{ required: true, message: '请选择人员类型', trigger: ["blur",'change'] }
+                    ],
+                    projectIds: [
+						{ required: true, message: '请选择参与项目', trigger: ["blur",'change'] }
 					],
                     companyId: [
 						{ required: true, message: '请选择所属公司', trigger: ["blur",'change'] }
-					],
-                    // roleName: [
-					// 	{ required: true, message: '请输入角色名称', trigger: ["blur",'change'] }
-					// ]
+					]
                 },
 
                 //新增界面是否显示
@@ -205,9 +187,8 @@
 				addForm: {
 					username: '',
                     account: '',
-                    mobile: '',
-                    //teamName: '',
-					companyId: '',
+                    projectIds: '',
+                    companyId: '',
                     roleName: '',
                     flag: 0
 				},
@@ -220,9 +201,7 @@
 					id: 0,
 					username: '',
                     account: '',
-                    mobile: '',
-                    // teamName: '',
-					companyId: '',
+                    companyId: '',
                     roleName: '',
                     flag: 1
 				}
@@ -231,12 +210,29 @@
 		methods: {
             // 获取基础数据
             getMsg(){
-                this.http.post(this.port.base.companys, {
-                    parentId: this.user.parentId,
-                    id: this.user.id
-                }, res => {
+                // this.http.post(this.port.base.companys, {
+                //     parentId: this.user.parentId,
+                //     id: this.user.id
+                // }, res => {
+                //     if (res.code == "ok") {
+                //         this.company = res.data;
+                //     } else {
+                //         this.$message({
+                //             message: res.msg,
+                //             type: 'error'
+                //         });
+                //     }
+                // }, error => {
+                //     this.$message({
+                //         message: error,
+                //         type: 'error'
+                //     });
+                // })
+
+                this.http.post(this.port.project.projectByUser, {}, 
+                res => {
                     if (res.code == "ok") {
-                        this.company = res.data;
+                        this.projects = res.data;
                     } else {
                         this.$message({
                             message: res.msg,
@@ -292,22 +288,22 @@
             },
             
             //显示新增界面
-			handleAdd: function () {
+			handleAdd() {
                 this.addFormVisible = true;
 				this.addForm = {
                     parentId: this.user.id,
 					username: '',
                     account: '',
                     mobile: '',
-                    // teamName: '',
-					companyId: this.company[0].id,
+                    projectIds: '',
+					companyId: '',
                     roleName: '',
                     flag: 0
 				};
             },
 
             //新增
-			addSubmit: function () {
+			addSubmit() {
 				this.$refs.addForm.validate((valid) => {
 					if (valid) {
 						this.addLoading = true;
@@ -339,7 +335,7 @@
 			},
 
 			//删除
-			handleDel: function (index, row) {
+			handleDel(index, row) {
                 this.$confirm('确认删除该人员吗?', '提示', {
 					type: 'warning'
 				}).then(() => {
@@ -368,27 +364,31 @@
             },
             
 			//显示编辑界面
-			handleEdit: function (index, row) {
+			handleEdit(index, row) {
                 this.editFormVisible = true;
 				this.editForm = {
                     id: row.id,
                     parentId: this.user.id,
 					username: row.username,
                     account: row.account,
-                    mobile: row.mobile,
-                    // teamName: row.teamName,
-					companyId: row.companyId,
+					companyId: row.companyName,
                     roleName: row.roleName,
                     flag: 1
-				};
+                };
             },
             
 			//编辑
-			editSubmit: function () {
+			editSubmit() {
 				this.$refs.editForm.validate((valid) => {
 					if (valid) {
                         this.editLoading = true;
-                        this.http.post(this.port.project.addUser, this.editForm , res => {
+                        this.http.post(this.port.project.addUser, {
+                            id: this.editForm.id,
+                            parentId: this.editForm.parentId,
+                            username: this.editForm.username,
+                            roleName: this.editForm.roleName,
+                            flag: 1
+                        } , res => {
                             this.editLoading = false;
                             if (res.code == "ok") {
                                 this.editFormVisible = false;
@@ -413,7 +413,28 @@
                         })
 					}
 				});
-			}
+            },
+            
+            //修改
+            choseProject() {
+                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({
+                        message: error,
+                        type: 'error'
+                    });
+                })
+            }
         },
         created() {
             let height = window.innerHeight;