ccjgmwz 3 years ago
parent
commit
429f8bd3e9
3 changed files with 19 additions and 2 deletions
  1. 8 0
      src/api/shoreBasedMembers.js
  2. 10 1
      src/views/organizationNew/shoreMemberAdd.vue
  3. 1 1
      vue.config.js

+ 8 - 0
src/api/shoreBasedMembers.js

@@ -89,3 +89,11 @@ export function getDeptListByCompId(data) {
     params: data
   });
 }
+// 兼职职务保存
+export function saveRole(data) {
+  return request({
+    url: "/commonUser/api/saveRole",
+    method: "post",
+    data
+  });
+}

+ 10 - 1
src/views/organizationNew/shoreMemberAdd.vue

@@ -405,6 +405,7 @@ import shoreApi from "../../api/organization/shore";
 import {
   staffInfo,
   changeInfo,
+  saveRole,
   companyVessels,
   getDeptListByCompId
 } from "../../api/shoreBasedMembers";
@@ -1230,7 +1231,6 @@ export default {
     },
     // 编辑
     editSave () {
-      debugger
       this.ruleForm.staffId = this.id;
       changeInfo(this.ruleForm)
         .then(() => {
@@ -1240,6 +1240,15 @@ export default {
             type: "success",
             showClose: true
           });
+          for(var i =0;i<this.zhiwu2.length;i++){
+            var param = {
+              staffId:this.id,
+              roleId:this.zhiwu2[i].roleId,
+              roleMajor:'0'
+            }
+            saveRole(param).then(() => {
+            })
+          }
           // this.getMemberInfo();
           this.$router.go(-1);
           this.loading = false;

+ 1 - 1
vue.config.js

@@ -40,7 +40,7 @@ module.exports = {
         logLevel: 'debug',
       },
       '/pb': {
-        target: 'http://192.168.1.103:9100/',
+        target: 'http://192.168.1.122:8090/',
         // target: 'http://192.168.1.109:9100/',
         // target: 'https://standard-dev.winsea.com/',
         changeOrigin: true, //开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题