whj 1 år sedan
förälder
incheckning
a6609ba47d

+ 16 - 0
src/api/sb/status-log.js

@@ -125,3 +125,19 @@ export function exportSbStatusLog (parameter) {
     responseType: 'blob'
   })
 }
+/**
+ * export file
+ * parameter: { }
+ * @param parameter :
+ * @returns {*}
+ */
+export function exportSbStatusLog2 (parameter) {
+  return axios({
+    url: '/sb/status-logs/export2?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    responseType: 'blob'
+  })
+}

+ 69 - 54
src/api/sb/stop-logs.js

@@ -8,13 +8,13 @@ import { stringify } from 'qs'
  * @returns {*}
  */
 export function getSbStopLogPage (parameter) {
-    return axios({
-        url: '/sb/stop-logs/page?' + stringify(parameter),
-        method: 'get',
-        headers: {
-            'Content-Type': 'application/json;charset=UTF-8'
-        }
-    })
+  return axios({
+    url: '/sb/stop-logs/page?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
 }
 
 /**
@@ -24,15 +24,15 @@ export function getSbStopLogPage (parameter) {
  * @returns {*}
  */
 export function addSbStopLog (parameter) {
-    return axios({
-        url: '/sb/stop-logs',
-        method: 'POST',
-        headers: {
-            'Accept': 'application/json',
-            'Content-Type': 'application/json;charset=UTF-8'
-        },
-        data: parameter
-    })
+  return axios({
+    url: '/sb/stop-logs',
+    method: 'POST',
+    headers: {
+      'Accept': 'application/json',
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    data: parameter
+  })
 }
 
 /**
@@ -42,11 +42,11 @@ export function addSbStopLog (parameter) {
  * @returns {*}
  */
 export function updateSbStopLog (parameter) {
-    return axios({
-        url: '/sb/stop-logs/' + parameter.id,
-        method: 'PUT',
-        data: parameter
-    })
+  return axios({
+    url: '/sb/stop-logs/' + parameter.id,
+    method: 'PUT',
+    data: parameter
+  })
 }
 
 /**
@@ -56,13 +56,13 @@ export function updateSbStopLog (parameter) {
  * @returns {*}
  */
 export function fetchSbStopLog (parameter) {
-    return axios({
-        url: '/sb/stop-logs/' + parameter.id,
-        method: 'get',
-        headers: {
-            'Content-Type': 'application/json;charset=UTF-8'
-        }
-    })
+  return axios({
+    url: '/sb/stop-logs/' + parameter.id,
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
 }
 
 /**
@@ -72,13 +72,13 @@ export function fetchSbStopLog (parameter) {
  * @returns {*}
  */
 export function querySbStopLog (parameter) {
-    return axios({
-        url: '/sb/stop-logs?' + stringify(parameter),
-        method: 'get',
-        headers: {
-            'Content-Type': 'application/json;charset=UTF-8'
-        }
-    })
+  return axios({
+    url: '/sb/stop-logs?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
 }
 
 /**
@@ -88,11 +88,11 @@ export function querySbStopLog (parameter) {
  * @returns {*}
  */
 export function deleteSbStopLogs (parameter) {
-    return axios({
-        url: '/sb/stop-logs',
-        method: 'DELETE',
-        data: parameter
-    })
+  return axios({
+    url: '/sb/stop-logs',
+    method: 'DELETE',
+    data: parameter
+  })
 }
 
 /**
@@ -102,14 +102,13 @@ export function deleteSbStopLogs (parameter) {
  * @returns {*}
  */
 export function deleteSbStopLog (parameter) {
-    return axios({
-        url: '/sb/stop-logs/' + parameter.id,
-        method: 'DELETE',
-        data: parameter
-    })
+  return axios({
+    url: '/sb/stop-logs/' + parameter.id,
+    method: 'DELETE',
+    data: parameter
+  })
 }
 
-
 /**
  * export file
  * parameter: { }
@@ -117,12 +116,28 @@ export function deleteSbStopLog (parameter) {
  * @returns {*}
  */
 export function exportSbStopLog (parameter) {
-    return axios({
-        url: '/sb/stop-logs/export?' + stringify(parameter),
-        method: 'get',
-        headers: {
-            'Content-Type': 'application/json;charset=UTF-8'
-        },
-        responseType: 'blob'
-    })
+  return axios({
+    url: '/sb/stop-logs/export?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    responseType: 'blob'
+  })
+}
+/**
+ * export file
+ * parameter: { }
+ * @param parameter :
+ * @returns {*}
+ */
+export function exportSbStopLog2 (parameter) {
+  return axios({
+    url: '/sb/stop-logs/export2?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    responseType: 'blob'
+  })
 }

+ 4 - 2
src/views/sb/status-log/modules/SbStatusLogTable.vue

@@ -23,6 +23,8 @@
         type="primary"
         icon="plus"
         @click="$refs.baseModal.base(null,tableParams)">新增</a-button>
+      <a-button type="primary" style="margin-left: 8px" @click="doExport()">导出</a-button>
+
       <a-dropdown v-action:edit>
         <a-menu slot="overlay">
           <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
@@ -71,7 +73,7 @@
 import { STable, Ellipsis } from '@/components'
 import BaseForm from './BaseForm'
 import Detail from './Detail'
-import { getSbStatusLogPage, deleteSbStatusLogs, fetchSbStatusLog, exportSbStatusLog } from '@/api/sb/status-log'
+import { getSbStatusLogPage, deleteSbStatusLogs, fetchSbStatusLog, exportSbStatusLog2 } from '@/api/sb/status-log'
 
 export default {
   name: 'SbStatusLogTable',
@@ -254,7 +256,7 @@ export default {
         ...this.queryParam,
         ...this.tableParams
       }
-      exportSbStatusLog(parameter).then(file => {
+      exportSbStatusLog2(parameter).then(file => {
         this.BaseTool.UPLOAD.downLoadExportExcel(file)
       })
     }

+ 4 - 2
src/views/sb/stop-logs/modules/SbStopLogTable.vue

@@ -23,6 +23,8 @@
         type="primary"
         icon="plus"
         @click="$refs.baseModal.base(null,tableParams)">新增</a-button>
+      <a-button type="primary" style="margin-left: 8px" @click="doExport()">导出</a-button>
+
       <a-dropdown v-action:edit>
         <a-menu slot="overlay">
           <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
@@ -67,7 +69,7 @@
 import { STable, Ellipsis } from '@/components'
 import BaseForm from './BaseForm'
 import Detail from './Detail'
-import { getSbStopLogPage, deleteSbStopLogs, fetchSbStopLog, exportSbStopLog } from '@/api/sb/stop-logs'
+import { getSbStopLogPage, deleteSbStopLogs, fetchSbStopLog, exportSbStopLog2 } from '@/api/sb/stop-logs'
 
 export default {
   name: 'SbStopLogTable',
@@ -266,7 +268,7 @@ export default {
         ...this.queryParam,
         ...this.tableParams
       }
-      exportSbStopLog(parameter).then(file => {
+      exportSbStopLog2(parameter).then(file => {
         this.BaseTool.UPLOAD.downLoadExportExcel(file)
       })
     }