zhiyuan007 1 year ago
parent
commit
4076cf1f61

+ 12 - 6
src/data/all-table-header.js

@@ -1,11 +1,13 @@
 export const  policyRegulationInformationHeader = [
     {
         prop:"CODE",
-        label:"编号"
+        label:"编号",
+        width:150,
     },
     {
         prop:"NAME",
-        label:"文件名称"
+        label:"文件名称",
+        width:800,
     },
     {
         prop:"WENHAO",
@@ -17,17 +19,20 @@ export const  policyRegulationInformationHeader = [
     },
     {
         prop:"TIME",
-        label:"发布时间"
+        label:"发布时间",
+        width:200,
     }
 ]
 export const MemorandumManageHeader = [
     {
         prop:"CODE",
-        label:"编号"
+        label:"编号",
+        width:150,
     },
     {
         prop:"NAME",
-        label:"文件名称"
+        label:"文件名称",
+        width:800,
     },
     {
         prop:"WENHAO",
@@ -35,7 +40,8 @@ export const MemorandumManageHeader = [
     },
     {
         prop:"TIME",
-        label:"发布时间"
+        label:"发布时间",
+        width:200,
     }
 ]
 

+ 2 - 2
src/service/config.js

@@ -1,6 +1,6 @@
 //  export const baseUrl = process.env.NODE_ENV ==='production'?proBaseUrl:devBaseUrl
-export const baseUrl = 'http://10.90.7.241:9443/data-business-prod/'
-//export const baseUrl = 'http://localhost:9250'
+//export const baseUrl = 'http://10.90.7.241:9443/data-business-prod/'
+export const baseUrl = 'http://localhost:9250'
 // export const baseUrl = 'http://10.81.66.9:9250'
 export const baseUrl_Address = 'http://10.81.66.9:9250'
 // export const baseUrl_Address = 'http://10.81.66.9:9252'

+ 4 - 4
src/views/main/c-views/policy-and-regulation-manage/memorandum-manage/MemorandumManage.vue

@@ -41,6 +41,7 @@ import {handleMes} from "@/units/element-ui/tip";
 import {InsertSyslog} from "@/units/use-method/user-log";
 import {closeShowLoading, showLoading} from "@/units/element-loading/element-loader";
 import axios from "axios";
+import {baseUrl} from "@/service/config";
 export default {
   name: "MemorandumManage",
   components:{MemorandumManageSettingDialog, CommonLayout},
@@ -71,12 +72,11 @@ export default {
     }
     function getDataFile(data){
       let obj = {
-        "fileName":data.FILENAME + data.FILETYPE,
-        "type":"bwl"
+        "FILEPATH":data.FILEPATH,
       }
       axios({
         method: "post",
-        url: 'http://10.90.7.241:9443/data-business-prod/XyxxApi/xyptFileDocument', // 请求地址
+        url: baseUrl +'/XyxxApi/xyptFileDocument', // 请求地址
         data: obj, // 参数
         responseType: "blob", // 表明返回服务器返回的数据类型
       }).then((res) => {
@@ -86,7 +86,7 @@ export default {
           const download_url = window.URL.createObjectURL(blob); //数据流作为下载的源
           const eleLink = document.createElement('a');  //创建一个a标签
           eleLink.href = download_url;              //下载的文件连接,实际就是下载的数据流
-          eleLink.download = obj.fileName;        //下载的文件名称
+          eleLink.download = data.FILENAME + data.FILETYPE;      //下载的文件名称
           document.body.appendChild(eleLink)
           eleLink.click()  //模拟下载文件
           window.URL.revokeObjectURL(download_url)

+ 5 - 3
src/views/main/c-views/policy-and-regulation-manage/memorandum-manage/MemorandumManageSettingDialog.vue

@@ -43,6 +43,7 @@ import {
   proUpdateXyxxBwl
 } from "@/service/policy-and-regulation-manage/memorandum-manage/memorandum-manage";
 import {InsertSyslog} from "@/units/use-method/user-log";
+import {baseUrl} from "@/service/config";
 export default {
   name: "MemorandumManageSettingDialog",
   components:{DiyElForm},
@@ -107,10 +108,10 @@ export default {
             formData.append("file",file.value.raw);
             formData.append("fileName",fileName + suffixName);
             formData.append("type","bwl")
-            axios.post('http://10.90.7.241:9443/data-business-prod' +'/XyxxApi/xypt',formData,{'Content-type':'multipart/form-data'}).then(res =>{
+            axios.post(baseUrl +'/XyxxApi/xypt',formData,{'Content-type':'multipart/form-data'}).then(res =>{
               console.log(res);
               if(res.data[0].success=='true'){
-                insertBwl(fileName,suffixName)
+                insertBwl(fileName,suffixName,res.data[0].message)
               }else{
                 elAlert("文件上传失败")
               }
@@ -121,12 +122,13 @@ export default {
         }
       })
     }
-    function insertBwl(fileName,suffixName){
+    function insertBwl(fileName,suffixName,filePath){
       proInsertXyxxBwl({
         wenhao: form.value.WENHAO,
         name: form.value.NAME,
         username: localStorage.getItem("xyxx_username"),
         suffixName: suffixName,
+        filePath:filePath,
         fileName: fileName,
       }).then(res =>{
         handleMes(res,() => {

+ 4 - 4
src/views/main/c-views/policy-and-regulation-manage/policy-regulation-information/PolicyRegulationInformation.vue

@@ -95,13 +95,13 @@ export default {
       }else if(data.TYPE =="市住建委"){
         type="zjw"
       }
+      debugger
       let obj = {
-        "fileName":data.FILENAME + data.FILETYPE,
-        "type":type
+        "FILEPATH":data.FILEPATH,
       }
       axios({
         method: "post",
-        url: 'http://10.90.7.241:9443/data-business-prod/XyxxApi/xyptFileDocument', // 请求地址
+        url: baseUrl +'/XyxxApi/xyptFileDocument', // 请求地址
         data: obj, // 参数
         responseType: "blob", // 表明返回服务器返回的数据类型
       }).then((res) => {
@@ -111,7 +111,7 @@ export default {
           const download_url = window.URL.createObjectURL(blob); //数据流作为下载的源
           const eleLink = document.createElement('a');  //创建一个a标签
           eleLink.href = download_url;              //下载的文件连接,实际就是下载的数据流
-          eleLink.download = obj.fileName;        //下载的文件名称
+          eleLink.download = data.FILENAME + data.FILETYPE;        //下载的文件名称
           document.body.appendChild(eleLink)
           eleLink.click()  //模拟下载文件
           window.URL.revokeObjectURL(download_url)

+ 5 - 3
src/views/main/c-views/policy-and-regulation-manage/policy-regulation-information/PolicyRegulationInformationSettingDialog.vue

@@ -113,10 +113,11 @@ export default {
             formData.append("file",file.value.raw);
             formData.append("fileName",fileName + suffixName);
             formData.append("type",form.value.TYPE);
-            axios.post( 'http://10.90.7.241:9443/data-business-prod' +'/XyxxApi/xypt',formData,{'Content-type':'multipart/form-data'}).then(res =>{
+            axios.post( baseUrl +'/XyxxApi/xypt',formData,{'Content-type':'multipart/form-data'}).then(res =>{
               console.log(res);
               if(res.data[0].success=='true'){
-                insertFlag(fileName,suffixName)
+                debugger
+                insertFlag(fileName,suffixName,res.data[0].message)
               }else{
                 elAlert("文件上传失败")
               }
@@ -127,7 +128,7 @@ export default {
         }
       })
     }
-    function insertFlag(fileName,suffixName){
+    function insertFlag(fileName,suffixName,filePath){
       debugger
       let type = "";
       if(form.value.TYPE =="bs"){
@@ -144,6 +145,7 @@ export default {
         username: localStorage.getItem("xyxx_username"),
         suffixName: suffixName,
         fileName: fileName,
+        filePath:filePath,
         pubTime:form.value.TIME,
       }).then(res =>{
         handleMes(res,() => {