浏览代码

协议 python 拆分 登录 保存

785834757 1 年之前
父节点
当前提交
604033627a
共有 2 个文件被更改,包括 62 次插入 和 0 次删除
  1. 11 0
      src/http/moudules/insCompany.js
  2. 51 0
      src/views/AgreementManage/CarInsurance/AgreementEntry.vue

+ 11 - 0
src/http/moudules/insCompany.js

@@ -232,6 +232,17 @@ export const addagreement = (data) => {
     data
   })
 }
+
+//检测python 登录
+export const checkLogin = 
+(data) => {
+  return axios({
+    url: '/plt/agreement/checkLogin',
+    method: "post",
+    data
+  })
+}
+
 //分页查询协议
 export const agreementPage = (data) => {
   return axios({

+ 51 - 0
src/views/AgreementManage/CarInsurance/AgreementEntry.vue

@@ -515,6 +515,9 @@
                       <el-input v-model="attributionform.password" placeholder="请输入密码"></el-input>
                     </el-form-item>
                   </el-col>
+                  <el-col :span="11" >
+                    <el-button style="height: 34px;line-height: 10px; margin-left: 100px;" @click="checkLogin">检测登录</el-button>
+                  </el-col>
                 </div>
                 <template v-if="attributionform.fields.length > 0">
                   <el-col :span="24">
@@ -4378,6 +4381,54 @@ export default {
           }
         }
       }
+      
+    },
+    //检测python登录
+    checkLogin(){
+      if (this.operType == "ADD") {
+        let params = {
+          agreementId: this.agreementId,
+          agreement: this.agreement,
+          attribution: this.attributionform,
+          dept: this.dept,
+        };
+        this.$api.insCompany.checkLogin(params).then((res) => {
+          if (res.code == "200") {
+            this.$message({
+              message: res.msg,
+              type: "success",
+            });
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error",
+            });
+          }
+        });
+      } else {
+        let upparams = {
+          agreementId: this.agreementId,
+          agreement: this.agreement,
+          attribution: this.attributionform,
+          dept: this.dept,
+        };
+        this.$api.insCompany
+          .checkLogin(upparams)
+          .then((res) => {
+            if (res.code == "200") {
+              this.$message({
+                message: res.msg,
+                type: "success",
+              });
+            } else {
+              this.$message({
+                message: res.msg,
+                type: "error",
+              });
+            }
+          });
+      }
+    
     },
     //分页条数
     handleSizeChange(val) {