ソースを参照

Merge branch 'dev' of http://39.101.143.165:8090/sxzgd/vue-insagent-pc into dev

liyizheng 1 年間 前
親
コミット
9fb283670c

+ 1 - 0
config/dev.env.js

@@ -20,6 +20,7 @@ module.exports = merge(prodEnv, {
   BASE_URL: '"http://192.168.0.52:8080/"',//贺礼霄
   // BASE_URL: '"http:///192.168.0.55:8080/"',// 董鑫
   CONSOLE_BASE_URL: '"http://localhost:8080/"', //控制台测试服务器
+  CONSOLE_KHGX_URL: '"http://192.168.0.103:8081/login"', //跳转客户服务平台地址
   // CONSOLE_BASE_URL: '"https://test.baoxianzhanggui.com/console-api"' //控制台正式服务器
   APP_BASE_URL: '"https://pre.baoxianzhanggui.com/web-api"',    // app打包上传地址
   SOCKET_Url: '"ws://192.168.0.52:8080/"',

+ 1 - 0
config/prod.env.js

@@ -4,6 +4,7 @@ module.exports = {
   ENV_CONFIG: '"prod"',
   BASE_URL: '"https://sxzgkj.baoxianzhanggui.com/web-api"',
   CONSOLE_BASE_URL: '"https://sxzgkj.baoxianzhanggui.com/console-api"', //控制台测试服务器
+  CONSOLE_KHGX_URL: '"https://sxzgkj.baoxianzhanggui.com/khgx/login"', //跳转客户服务平台地址
   APP_BASE_URL: '"https://pre.baoxianzhanggui.com/web-api"',    // app打包上传地址
   SOCKET_Url: '"wss://sxzgkj.baoxianzhanggui.com/web-api/"',
 

+ 1 - 0
config/test.env.js

@@ -10,5 +10,6 @@ module.exports = merge(prodEnv, {
   // BASE_URL: '"https://pre.baoxianzhanggui.com/test/"',
   APP_BASE_URL: '"https://test.baoxianzhanggui.com/web-api"',    // app打包上传地址
   CONSOLE_BASE_URL: '"https://test.baoxianzhanggui.com/console-api"', //控制台测试服务器
+  CONSOLE_KHGX_URL: '"https://test.baoxianzhanggui.com/khgx/login"', //跳转客户服务平台地址
   SOCKET_Url: '"wss://test.baoxianzhanggui.com/web-api/"',
 })

+ 8 - 0
src/http/moudules/menu.js

@@ -150,4 +150,12 @@ export const newfindMenuTree = () => {
         url: '/menu/v1/findMenuTree',
         method: 'get'
     })
+}
+
+export const getKhgxConfig = (data) => {
+    return axios({
+        url: '/sysUserLinkSys/authorizeKhgxByUserId?userId=' + data.userId,
+        method: 'get',
+
+    })
 }

+ 19 - 17
src/views/FinancialManagement/ContractManagement/ContractManagement.vue

@@ -137,7 +137,7 @@
       size="small"
       :data="tableData"
       style="width: 100%"
-      height="650"
+      height="640"
       border
       :header-cell-style="{
         background: '#F2F7FC',
@@ -638,24 +638,16 @@
 
       <div slot="footer" class="dialog-footer">
         <el-button @click="cancel">取 消</el-button>
-        <el-button type="primary" @click="submit">确 定</el-button>
+        <el-button type="primary" @click="submit" :disabled="btnDisabled"
+          >确 定</el-button
+        >
       </div>
     </el-dialog>
     <el-dialog title="附件" :visible.sync="fileDialog" width="50%">
-      <div class="block">
-        <el-carousel trigger="click" height="1200px" :autoplay="false">
-          <el-carousel-item
-            v-for="item in showFileList"
-            :key="item.url"
-            style="height: 1200px; overflow-y: auto"
-          >
-            <div
-              style="
-                display: flex;
-                justify-content: center;
-                margin-bottom: 10px;
-              "
-            >
+      <div class="block" style="height: 700px">
+        <el-carousel trigger="click" :autoplay="false">
+          <el-carousel-item v-for="item in showFileList" :key="item.url">
+            <div style="display: flex; justify-content: center">
               <kt-button
                 type="primary"
                 icon="el-icon-download"
@@ -1094,7 +1086,7 @@ export default {
       messageDialog: false,
       tableDialog: false,
       multipleSelection: [],
-
+      btnDisabled: false,
       base: process.env.BASE_URL,
       form: {
         contractCode: "",
@@ -1414,6 +1406,7 @@ export default {
         this.$api.contract
           .copyContractList({
             id: row.id,
+            isView: true,
           })
           .then((res) => {
             if (res.code === 200) {
@@ -1494,6 +1487,7 @@ export default {
     submit() {
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
+          this.btnDisabled = true;
           if (this.operation != "supplement") {
             this.$api.contract
               .constractSave({
@@ -1519,12 +1513,14 @@ export default {
                 if (res.code === 200) {
                   this.$message.success(res.msg);
                   this.dialogVisible = false;
+                  this.btnDisabled = false;
                   this.$nextTick(() => {
                     this.$refs.ruleForm.clearValidate();
                   });
                   this.getList();
                 } else {
                   this.$message.error(res.msg);
+                  this.btnDisabled = false;
                 }
               });
           } else {
@@ -1553,9 +1549,12 @@ export default {
                   this.$nextTick(() => {
                     this.$refs.ruleForm.clearValidate();
                   });
+                  this.btnDisabled = false;
+
                   this.getList();
                 } else {
                   this.$message.error(res.msg);
+                  this.btnDisabled = false;
                 }
               });
           }
@@ -1771,4 +1770,7 @@ export default {
     }
   }
 }
+/deep/ .el-carousel__container {
+  height: 700px !important;
+}
 </style>

+ 21 - 10
src/views/Login.vue

@@ -198,7 +198,6 @@ export default {
       sysId: null,
       systemType: "1", //系统类型
       addressInfo: {}, //当前登录信息
-      locationIp:'',//当前ip
     };
   },
   created() {
@@ -304,7 +303,22 @@ export default {
                   window.location.href =
                     process.env.CONSOLE_BASE_URL + "/#/index?token=" + token;
                   // alert(res.data);
-                } else {
+                }else if (this.sysId === 3) {
+                  Cookies.set("user", this.loginForm.account);
+                  let userId = this.loginForm.account;
+                  let  data ={
+                    userId: userId,
+                    token: res.data
+                  }
+                  let jsonStr = JSON.stringify(data);
+                  let token = CryptoJS.AES.encrypt(
+                    jsonStr,
+                    "token"
+                  ).toString();
+                  window.location.href =process.env.CONSOLE_KHGX_URL + "?token=" + token;
+    
+                } 
+                else {
                   this.getUser();
                   Cookies.set("token", res.data); // 放置token到Cookie
                   // this.submitLocation();
@@ -312,8 +326,7 @@ export default {
                   setTimeout(() => {
                     let userId = sessionStorage.getItem("user");
                     let data = {
-                      // ...this.addressInfo,
-                      ip:this.locationIp,
+                      ...this.addressInfo,
                       userId,
                       systemType: this.systemType,
                     };
@@ -343,8 +356,7 @@ export default {
     submitLocation() {
       let location = {
         systemType: this.systemType,
-        // ...this.addressInfo,
-        ip:this.locationIp,
+        ...this.addressInfo,
       };
       this.$api.login.uploadLocationInfo(location).then((res) => {
         if (res.code !== 200) {
@@ -492,10 +504,9 @@ export default {
     this.refreshCaptcha();
     /**获取当前登录的ip地址 */
     getUserIP((ip) => {
-      this.locationIp=ip
-      // getAddressLocation(ip, (info) => {
-        // this.addressInfo = ip;
-      // });
+      getAddressLocation(ip, (info) => {
+        this.addressInfo = info;
+      });
     });
   },
   computed: {

+ 40 - 0
src/views/NavBar/NavBar.vue

@@ -37,6 +37,15 @@
               <span>晋掌柜控制台</span>
             </div>
           </el-dropdown-item>
+          <el-dropdown-item v-if="showKhgxConfig">
+            <div class="flex" @click="toKhgxConfig">
+              <img
+                src="@/assets/image/title.png"
+                style="width: 30px; height: 30px; margin-right: 5px"
+              />
+              <span>客户服务平台</span>
+            </div>
+          </el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>
     </div>
@@ -109,11 +118,13 @@ export default {
           ? this.$route.meta.index
           : this.leftTree[0].id,
       showConfig: false,
+      showKhgxConfig: false,
     };
   },
   created() {
     this.handleRoute(this.$route);
     this.getConfig();
+    this.getKhgxConfig();
   },
   methods: {
     toConfig() {
@@ -127,6 +138,35 @@ export default {
       window.location.href =
         process.env.CONSOLE_BASE_URL + "/#/index?token=" + token;
     },
+    toKhgxConfig() {
+      let userId = JSON.parse(localStorage.getItem("user_data")).id;
+          let  data ={
+            userId: userId,
+            token: Cookies.get("token")
+          }
+          let jsonStr = JSON.stringify(data);
+          let token = CryptoJS.AES.encrypt(
+            jsonStr,
+            "token"
+          ).toString();
+          window.location.href =process.env.CONSOLE_KHGX_URL + "?token=" + token;
+    },
+                    
+    showKhgxConfig() {
+      // console.log();
+      let userId = JSON.parse(localStorage.getItem("user_data")).id;
+      // console.log(userId);
+      this.$api.menu
+        .getKhgxConfig({
+          userId: userId,
+        })
+        .then((res) => {
+          // console.log(res);
+          if (res.code === 200) {
+            this.showKhgxConfig = res.data;
+          }
+        });
+    },
     getConfig() {
       // console.log();
       let userId = JSON.parse(localStorage.getItem("user_data")).id;