Bläddra i källkod

修改服务配置信息

root 8 månader sedan
förälder
incheckning
3e1a01f446

+ 2 - 0
.env

@@ -1,2 +1,4 @@
 NODE_ENV=development
 VUE_APP_TARGET='http://120.55.54.207:8088'
+VUE_APP_FILESERVER = http://10.113.248.3:8086
+# VUE_APP_FILESERVER = https://jinhong-credit.com:8443

+ 1 - 0
.env.production

@@ -2,3 +2,4 @@ NODE_ENV=production
 ##BASE_URL= ./
 BASE_URL= /h5
 VUE_APP_TARGET='http://120.55.54.207:8088'
+VUE_APP_FILESERVER = https://jinhong-credit.com:8443

+ 1 - 0
.gitignore

@@ -2,6 +2,7 @@
 node_modules
 /h5
 /child
+/manage
 public/config/global.js
 h5.zip
 

+ 21 - 0
src/App.vue

@@ -74,5 +74,26 @@ html,body,#app {
 .fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
   opacity: 0;
 }
+
+/* 自定义整个滚动条 */
+::-webkit-scrollbar {
+  width: 5px;  /* 对于垂直滚动条,设置宽度 */
+  height: 5px; /* 对于水平滚动条,设置高度 */
+}
+ 
+/* 自定义滚动条轨道 */
+::-webkit-scrollbar-track {
+  background: #f1f1f1; /* 轨道颜色 */
+}
+ 
+/* 自定义滚动条的滑块(thumb) */
+::-webkit-scrollbar-thumb {
+  background: #888; /* 滑块颜色 */
+}
+ 
+/* 当滑块悬停或活动时,可以设置不同的颜色 */
+::-webkit-scrollbar-thumb:hover {
+  background: #555;
+}
 </style>
 

BIN
src/assets/img/commons/jhTop.png


BIN
src/assets/img/login/login_bg.png


BIN
src/assets/img/login/login_title.png


+ 1 - 2
src/router/index.js

@@ -6,8 +6,7 @@ Vue.use(Router)
 const RouterConfig = {
     mode: 'history',
     // base: process.env.BASE_URL,
-    // base: 'child_pc',
-    base: '',
+    base: 'manage',
     routes: routers
 }
 

+ 10 - 4
src/router/router.js

@@ -167,6 +167,12 @@ export const routerList = [
         name: "gameRecordDetail",
         component: () => import("../views/manage/gameRecordDetail"),
       },
+      // 文件上传
+      {
+        path: "createReport/index",
+        name: "CreateReport",
+        component: () => import("../views/manage/createReport/index"),
+      },
     ],
   },
 ];
@@ -213,8 +219,8 @@ export const routers = [
     component: () => import("../views/404.vue"),
     name: "错误页面",
   },
-  {
-    path: "*",
-    redirect: { path: "/404" },
-  },
+  // {
+  //   path: "*",
+  //   redirect: { path: "/404" },
+  // },
 ];

+ 35 - 15
src/utils/http.js

@@ -1,6 +1,6 @@
 import axios from "axios";
 // import { Toast } from 'vant';
-import { Message } from "element-ui";
+import { Message, Loading } from "element-ui";
 import { Decrypt, Encrypt } from "./utils";
 import { oSessionStorage } from "./utils";
 import { router } from "@/router";
@@ -19,8 +19,8 @@ import { router } from "@/router";
 
 
 //https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx658b72887c56f6b4&redirect_uri=http%3A%2F%2F192.168.18.51%3A8085&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect
-export const basePath='http://10.113.248.3:8086'
-// export const basePath='http://43.143.198.30:8086'
+// export const basePath = 'http://10.113.248.3:8086'
+export const basePath = process.env.VUE_APP_FILESERVER
 axios.defaults.baseURL = basePath;
 // axios.defaults.baseURL = "http://43.143.198.30:8086";
 
@@ -31,8 +31,8 @@ axios.defaults.baseURL = basePath;
 var urlCode = "";
 
 //接口白名单 
-var whiteList=[
-  '/user/blogin','/user/getCode'
+var whiteList = [
+  '/user/blogin', '/user/getCode'
 ]
 
 // axios.defaults.baseURL = 'http://cognitive.wistcm.com:8060/';
@@ -40,7 +40,7 @@ var whiteList=[
 
 sessionStorage.setItem("codeImage", urlCode);
 
-axios.defaults.timeout = 30000; // 超时时间
+axios.defaults.timeout = 1000000; // 超时时间
 axios.defaults.headers.common["Content-Type"] =
   "application/JSON;charset=UTF-8";
 axios.defaults.withCredentials = true;
@@ -48,18 +48,18 @@ axios.defaults.withCredentials = true;
 
 axios.interceptors.request.use(
   function (config) {
-    for(let i=0;i<whiteList.length;i++){
-      if(whiteList[i]!==config.url){
+    for (let i = 0; i < whiteList.length; i++) {
+      if (whiteList[i] !== config.url) {
         ////不在白名单内,需要判断用户是否在,不在的话存储到登录页
-        
-        if(oSessionStorage.getItem("userInfo")==''){
+
+        if (oSessionStorage.getItem("userInfo") == '') {
           router.replace({
             path: "/",
             // query: {redirect: router.currentRoute.fullPath}
           });
         }
         //在此判断需要  判断用户缓存是否存在
-          // break
+        // break
       }
     }
     //发送请求前判断token是存在
@@ -83,7 +83,7 @@ axios.interceptors.request.use(
     config.headers.Authorization = oSessionStorage.getItem("token")
       ? `Bearer ${oSessionStorage.getItem("token")}`
       : "";
-  //  console.log(config.headers.Authorization)
+    //  console.log(config.headers.Authorization)
     return config;
   },
   function (error) {
@@ -129,6 +129,26 @@ const http = {
       }
     });
   },
+  formData: (url, data, sCallBack, eCallBack) => {
+    // 获取远端图片
+    axios({
+      method: 'post',
+      url: url,
+      data: data,
+      headers: {
+        'Content-Type': 'multipart/form-data',
+        'Access-Control-Allow-Origin': '*'
+      },
+      responseType: 'application/octet-stream;charset=utf-8'
+    })
+      .then(function (response) {
+        console.log(response)
+        sCallBack(response);
+      }).catch(function(err){
+        eCallBack(err)
+      });
+  },
+
   getImg: (url, data, sCallBack) => {
     if (data) {
       data = Encrypt(JSON.stringify(data));
@@ -140,9 +160,9 @@ const http = {
       params: data,
       headers: {
         Accept: "application/octet-stream",
-      //  "Content-Disposition":"attachment"
+        //  "Content-Disposition":"attachment"
       },
-    },{responseType:"arraybuffer"}).then((res) => {
+    }, { responseType: "arraybuffer" }).then((res) => {
       sCallBack(res);
     });
   },
@@ -157,7 +177,7 @@ const http = {
       params: data,
       headers: {
         // Accept: "application/octet-stream",
-        "Content-Disposition": "attachment" 
+        "Content-Disposition": "attachment"
       },
     }).then((res) => {
       sCallBack(res);

+ 164 - 0
src/views/manage/createReport/index.vue

@@ -0,0 +1,164 @@
+<template>
+    <el-form ref="form" :model="form" label-width="160px">
+        <el-form-item label="省份">
+            <el-select v-model="provinceCode" filterable placeholder="请选择">
+                <el-option v-for="item in provinceList" :key="item.provinceCode" :label="item.provinceName"
+                    :value="item.provinceCode">
+                </el-option>
+            </el-select>
+        </el-form-item>
+        <el-form-item label="任务">
+            <el-select v-model="taskId" filterable placeholder="请选择任务">
+                <el-option v-for="item in taskList" :key="item.id" :label="item.taskName" :value="item.id">
+                </el-option>
+            </el-select>
+        </el-form-item>
+        <el-form-item label="基础信息">
+            <el-upload class="upload-demo" name="file" :http-request="uploadHandle" :file-list="baseFile"
+                :on-remove="removeHandle">
+                <el-button size="small" type="primary">点击上传</el-button>
+                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
+            </el-upload>
+        </el-form-item>
+        <el-form-item label="近三年进项发票">
+            <el-upload class="upload-demo" name="buyInvoiceFile" :http-request="uploadHandle"
+                :file-list="buyInvoiceFile">
+                <el-button size="small" type="primary">点击上传</el-button>
+                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
+            </el-upload>
+        </el-form-item>
+        <el-form-item label="近三年销项发票">
+            <el-upload class="upload-demo" name="sellInvoiceFile" :http-request="uploadHandle"
+                :file-list="selllnvoiceFile">
+                <el-button size="small" type="primary">点击上传</el-button>
+                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
+            </el-upload>
+        </el-form-item>
+        <el-form-item label="财务季报">
+            <el-upload class="upload-demo" name="annualReportQuarterFile" :http-request="uploadHandle"
+                :file-list="annualReportQuarterFile">
+                <el-button size="small" type="primary">点击上传</el-button>
+                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
+            </el-upload>
+        </el-form-item>
+        <el-form-item label="近三年财务年报">
+            <el-upload class="upload-demo" name="annualReportFile" :http-request="uploadHandle"
+                :file-list="annualReportFile">
+                <el-button size="small" type="primary">点击上传</el-button>
+                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
+            </el-upload>
+        </el-form-item>
+        <el-form-item label="企业所得税季报">
+            <el-upload class="upload-demo" name="incomeQuarterFile" :http-request="uploadHandle"
+                :file-list="incomeQuarterFile">
+                <el-button size="small" type="primary">点击上传</el-button>
+                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
+            </el-upload>
+        </el-form-item>
+        <el-form-item label="近三年企业所得税年报">
+            <el-upload class="upload-demo" name="incomeYearFile" :http-request="uploadHandle"
+                :file-list="incomeYearFile">
+                <el-button size="small" type="primary">点击上传</el-button>
+                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
+            </el-upload>
+        </el-form-item>
+        <el-form-item label="近三年税务信息">
+            <el-upload class="upload-demo" name="taxFile" :http-request="uploadHandle" :file-list="taxFile">
+                <el-button size="small" type="primary">点击上传</el-button>
+                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
+            </el-upload>
+        </el-form-item>
+        <el-form-item label="近三年增值税申报表">
+            <el-upload class="upload-demo" name="vatFile" :http-request="uploadHandle" :file-list="vatFile">
+                <el-button size="small" type="primary">点击上传</el-button>
+                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
+            </el-upload>
+        </el-form-item>
+        <el-form-item>
+            <el-button type="primary" @click="createReport">生成报告</el-button>
+            <el-button>取消</el-button>
+        </el-form-item>
+    </el-form>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            form: {
+                name: '',
+                region: '',
+                date1: '',
+                date2: '',
+                delivery: false,
+                type: [],
+                resource: '',
+                desc: '',
+            },
+            provinceCode: '',
+            taskId: '',
+            fileList: {},
+            provinceList: [],
+            taskList: []
+        }
+    },
+    created() {
+        this.getProvince();
+        this.getTaskList();
+    },
+    methods: {
+        onSubmit() {
+            console.log('submit!');
+        },
+        getProvince() {
+            this.$http.get('province/findAll', {}, res => {
+                this.provinceList = res.data;
+            })
+        },
+        getTaskList() {
+            this.$http.get(`task/find/0`, {}, res => {
+                this.taskList = res.data;
+            })
+        },
+        uploadHandle(file) {
+            this.fileList[`${file.filename}`] = file.file;
+        },
+        createReport() {
+            if (!this.provinceCode) {
+                this.$message.warning('请选择省份');
+                return
+            }
+
+            if (!this.taskId) {
+                this.$message.warning('请选择任务');
+                return
+            }
+
+            if (Object.keys(this.fileList).length < 9) {
+                this.$message.warning('请将文件上传完整');
+                return;
+            }
+
+            // 使用form表单的数据格式
+            const paramsData = new FormData()
+            // 将上传文件数组依次添加到参数paramsData中
+            Object.keys(this.fileList).forEach(key => {
+                paramsData.append(`${key}`, this.fileList[key])
+            });
+            // 将输入表单数据添加到params表单中
+            paramsData.append('provinceCode', this.provinceCode);
+            paramsData.append('taskId', this.taskId);
+            const loadingInstance = this.$loading({
+                text: '报告生成中',
+                spinner: 'el-icon-loading',
+                background: 'rgba(0, 0, 0, 0.7)'
+            });
+            this.$http.formData('/pdf/generate/report', paramsData, res => {
+                loadingInstance.close();
+                window.location.href = `${process.env.VUE_APP_FILESERVER}/file/download/report?filePath=${res.data.data}`
+            }, err => {
+                loadingInstance.close();
+            })
+        },
+    }
+}
+</script>

+ 20 - 4
src/views/manage/manageMain.vue

@@ -64,13 +64,13 @@
               </el-submenu>
             </el-menu>
 
-            <vue-qr
+            <!-- <vue-qr
               v-show="false"
               :ref="userInfo.name + '-' + userInfo.userNumber"
               :text="urlJump + userInfo.invitationCode"
               :size="500"
               :width="1"
-            ></vue-qr>
+            ></vue-qr> -->
           </el-col>
         </el-row>
       </el-header>
@@ -468,6 +468,23 @@ export default {
         //     },
         //   ],
         // },
+        {
+          id: "7",
+          name: "文件上传",
+          icon: "el-icon-user-solid",
+          path: "7",
+          showItem: true,
+          child: [
+            {
+              id: "71",
+              name: "生成报告",
+              icon: "el-icon-user-solid",
+              parentName: "文件上传",
+              path: "/manage/createReport/index",
+              showItem: true,
+            }
+          ],
+        },
       ],
       //面包屑页签
       crumbParent: "首页",
@@ -840,12 +857,11 @@ export default {
 }
 .el-main-inner {
   display: flex;
-
   width: 100%;
-
   background-color: #fff;
   padding: 20px;
   border-radius: 40px;
+  overflow: scroll;
 }
 .el-main {
   box-sizing: border-box !important;

+ 5 - 5
vue.config.js

@@ -1,8 +1,8 @@
 module.exports = {
     // publicPath: '/child_pc/',
-    publicPath: '/',
+    publicPath: '/manage/',
     assetsDir:"static",
-    outputDir: 'child',
+    outputDir: 'manage',
     indexPath:"index.html",
     filenameHashing:"true",
     productionSourceMap: false,
@@ -14,12 +14,12 @@ module.exports = {
         // https: false, // https:{type:Boolean}
         open: true, //配置自动启动浏览器
         proxy: {
-            '/chat': {
-                target: process.env.VUE_APP_TARGET,
+            '/pdf': {
+                target: 'http://10.113.248.3:8086',
                 // ws: true,
                 changeOrigin: true,
                 pathRewrite: {
-                    '^/chat': '/chat'    //代理的路径
+                    '^/pdf': '/pdf'    //代理的路径
                 }
             },
         }