Browse Source

打印组件样式调整,参数完善
Signed-off-by: Caner <40012261+Canees@users.noreply.github.com>

Caner 3 years ago
parent
commit
1573bafb69

+ 2 - 1
.eslintrc.js

@@ -45,6 +45,7 @@ module.exports = {
     'vue/no-v-html': 0,
     'vue/order-in-components': 0,
     'no-unused-vars': 1,
-    'vue/no-reserved-component-names': 0
+    'vue/no-reserved-component-names': 0,
+    'no-new': 0
   }
 }

+ 1 - 1
.gitignore

@@ -27,4 +27,4 @@ build/Release
 # Dependency directory
 # https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
 node_modules
-
+dist

+ 0 - 1
dist/assets/Result-23b463ec.css

@@ -1 +0,0 @@
-.result[data-v-3d2739aa]{width:500px;height:500px}

File diff suppressed because it is too large
+ 0 - 0
dist/assets/index-f4171c99.css


BIN
dist/assets/ionicons-13d29fa1.ttf


File diff suppressed because it is too large
+ 0 - 24
dist/assets/ionicons-3cccccf5.svg


BIN
dist/assets/ionicons-503dc6b7.woff2


BIN
dist/assets/ionicons-fe9ddf45.woff


File diff suppressed because it is too large
+ 0 - 0
dist/assets/iview-ee1eeafc.css


File diff suppressed because it is too large
+ 0 - 0
dist/assets/print-a182cf59.css


+ 0 - 20
dist/index.html

@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
-  <meta charset="UTF-8" />
-  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-  <title>CZRock</title>
-  <script type="module" crossorigin src="./js/index-e84c2abc.js"></script>
-  <link rel="modulepreload" href="./js/iview-e6e434cb.js">
-  <link rel="stylesheet" href="./assets/iview-ee1eeafc.css">
-  <link rel="stylesheet" href="./assets/index-f4171c99.css">
-</head>
-
-<body>
-  <div id="app"></div>
-  
-  <script src="./loader.js"></script>
-</body>
-
-</html>

+ 0 - 1
dist/js/Grain-71c7c6dc.js

@@ -1 +0,0 @@
-import{n as s}from"./iview-e6e434cb.js";var o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"upfile"},[t._v(" test3 ")])},_=[];const a={},n={};var l=s(a,o,_,!1,c,null,null,null);function c(t){for(let e in n)this[e]=n[e]}var u=function(){return l.exports}();export{u as default};

+ 0 - 1
dist/js/Lithology-1c072229.js

@@ -1 +0,0 @@
-import{n as o}from"./iview-e6e434cb.js";var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Button",{attrs:{type:"primary"},on:{click:t.test}},[t._v(" \u6253\u5370 ")])],1)},c=[];const l={data(){return{}},methods:{test(){const t=window.$electron||null;t&&t.ipcRenderer.send("openPrint",!0)}}},r={};var i=o(l,s,c,!1,a,null,null,null);function a(t){for(let e in r)this[e]=r[e]}var u=function(){return i.exports}();export{u as default};

File diff suppressed because it is too large
+ 0 - 0
dist/js/Result-52e04334.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/index-e84c2abc.js


File diff suppressed because it is too large
+ 0 - 4
dist/js/iview-e6e434cb.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/print-dbcc8280.js


+ 0 - 2
dist/loader.js

@@ -1,2 +0,0 @@
-const electron = require('electron');//引入electron
-window['$electron'] = electron

+ 0 - 20
dist/print.html

@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
-  <meta charset="UTF-8" />
-  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-  <title>CZRock</title>
-  <script type="module" crossorigin src="./js/print-dbcc8280.js"></script>
-  <link rel="modulepreload" href="./js/iview-e6e434cb.js">
-  <link rel="stylesheet" href="./assets/iview-ee1eeafc.css">
-  <link rel="stylesheet" href="./assets/print-a182cf59.css">
-</head>
-
-<body>
-  <div id="app"></div>
-  
-  <script src="./loader.js"></script>
-</body>
-
-</html>

+ 127 - 108
main.js

@@ -1,121 +1,140 @@
 const {
   app, BrowserWindow, Menu, ipcMain
 } = require('electron')// 引入electron
-// ----------------窗口init-------------
-let win = null
-let loadingWin = null
-let print = null
-Menu.setApplicationMenu(null) // 去掉菜单栏
-app.commandLine.appendSwitch('wm-window-animations-disabled') // 拖动闪屏
-// 创建loading 窗口
-const showLoading = () => {
-  loadingWin = new BrowserWindow({
-    frame: false, // 无边框(窗口、工具栏等),只包含网页内容
-    width: 200,
-    height: 200,
-    resizable: false,
-    center: true,
-    alwaysOnTop: true,
-    transparent: true // 窗口是否支持透明,如果想做高级效果最好为true
-  })
-  loadingWin.loadFile('loading/index.html')
-  loadingWin.on('close', () => {
-    loadingWin = null
-  })
-}
-// 创建主程序 窗口
-const createWindow = () => {
-  win = new BrowserWindow({
-    maxWidth: 1920,
-    maxHeight: 1080,
-    minWidth: 1620,
-    minHeight: 900,
-    webPreferences: {
-      contextIsolation: false,
-      nodeIntegration: true,
-      webSecurity: false // 去掉跨越
-    },
-    show: false
-  })// 创建一个窗口
-  // 在窗口内要展示的内容index.html 就是打包生成的index.html
-  win.loadFile('dist/index.html')
-  // 开启调试工具
-  win.webContents.openDevTools()
-  // 事件监听
-  win.on('close', () => {
-    // 回收BrowserWindow对象
-    win = null
-    print = null
-  })
-}
-// 创建打印窗口=>宽高根据主窗口宽高80%定
-const createPrint = () => {
-  // 获取主窗口宽高
-  // const winWH = win.getBounds()
-  // const winWidth = 0
-  // const winHeight = 0
 
-  // console.log(6666, winWH)
-  print = new BrowserWindow({
-    width: 1310,
-    height: 860,
-    frame: false,
-    resizable: false,
-    center: true,
-    transparent: true,
-    show: false,
-    webPreferences: {
-      contextIsolation: false,
-      nodeIntegration: true,
-      webSecurity: false
-    }
-  })// 创建一个窗口
-  print.loadFile('dist/print.html')
-  // print.webContents.openDevTools()
-  print.on('close', () => {
-    // 回收BrowserWindow对象
-    print = null
-  })
-}
+class InitWin {
+  constructor() {
+    Menu.setApplicationMenu(null) // 去掉菜单栏
+    app.commandLine.appendSwitch('wm-window-animations-disabled') // 拖动闪屏
+    this.loadingWin = null
+    this.mainWin = null
+    this.printWin = null
+    this.on()
+  }
 
-//  --------------事件监听fn-------------
-// 事件监听
-app.on('ready', async () => {
-  showLoading()
-  createWindow()
-  createPrint()
-  // 监听渲染进行
-  ipcMain.once('close-loading', () => {
-    loadingWin.close()
-    win.show()
-  })
+  /**
+   * 加载窗口
+   * @returns
+   */
+  loading() {
+    const obj = new BrowserWindow({
+      frame: false, // 无边框(窗口、工具栏等),只包含网页内容
+      width: 200,
+      height: 200,
+      resizable: false,
+      center: true,
+      alwaysOnTop: true,
+      transparent: true // 窗口是否支持透明,如果想做高级效果最好为true
+    })
+    obj.loadFile('loading/index.html')
+    obj.on('close', () => {
+      this.loadingWin = null
+    })
+    return obj
+  }
 
-  // 监听打开print
-  ipcMain.on('openPrint', (event, data) => {
-    // TODO: 页面数据生成PDF
+  /**
+   * 主窗口
+   * @returns
+   */
+  main() {
+    const obj = new BrowserWindow({
+      maxWidth: 1920,
+      maxHeight: 1080,
+      minWidth: 1620,
+      minHeight: 900,
+      useContentSize: true,
+      center: true,
+      webPreferences: {
+        contextIsolation: false,
+        nodeIntegration: true,
+        webSecurity: false // 去掉跨越
+      },
+      show: false
+    })// 创建一个窗口
+    // 在窗口内要展示的内容index.html 就是打包生成的index.html
+    obj.loadFile('dist/index.html')
+    // 开启调试工具
+    obj.webContents.openDevTools()
+    // 事件监听
+    obj.on('close', () => {
+      // 回收BrowserWindow对象
+      this.mainWin = null
+    })
+    return obj
+  }
 
-    // TODO: 数据回传打印组件
+  /**
+   * 打印窗口
+   * @returns
+   */
+  print() {
+    const obj = new BrowserWindow({
+      width: 970,
+      height: 760,
+      frame: false,
+      resizable: false,
+      center: true,
+      transparent: true,
+      show: false,
+      webPreferences: {
+        contextIsolation: false,
+        nodeIntegration: true,
+        webSecurity: false
+      }
+    })// 创建一个窗口
+    obj.loadFile('dist/print.html')
+    // print.webContents.openDevTools()
+    obj.on('close', () => {
+      // 回收BrowserWindow对象
+      this.printWin = null
+    })
+    return obj
+  }
+
+  /**
+   * 事件监听
+   */
+  on() {
+    app.on('ready', async () => {
+      this.loadingWin = this.loading()
+      this.mainWin = this.main()
+      this.printWin = this.print()
+      // 监听渲染进行
+      ipcMain.once('close-loading', () => {
+        this.loadingWin.close()
+        this.mainWin.show()
+      })
+
+      // 监听打开print
+      ipcMain.on('openPrint', (event, data) => {
+        // TODO: 页面数据生成PDF
 
-    // 显示打印组件
-    print.show()
+        // TODO: 数据回传打印组件
 
-    console.log('open', data)
-  })
+        // 显示打印组件
+        this.printWin.show()
+        console.log('open', data)
+      })
 
-  // 监听关闭print
-  ipcMain.on('closePrint', (event, data) => {
-    console.log('close', data)
-    // 显示打印组件
-    print.hide()
-  })
-})
+      // 监听关闭print
+      ipcMain.on('closePrint', (event, data) => {
+        console.log('close', data)
+        // 显示打印组件
+        this.printWin.hide()
+      })
+    })
 
-app.on('window-all-closed', () => {
-  app.quit()
-})
+    app.on('window-all-closed', () => {
+      app.quit()
+    })
 
-app.on('activate', () => {
-  if (win == null) {
-    createWindow()
+    app.on('activate', () => {
+      if (this.mainWin == null) {
+        this.mainWin = this.main()
+      }
+    })
   }
-})
+}
+
+new InitWin()

+ 11 - 7
src/components/Modal.vue

@@ -1,21 +1,25 @@
 <template>
-  <div class="modal" v-if="show" @click="callBack">
+  <div
+    v-if="show"
+    class="modal"
+    @click="callBack"
+  >
     <div class="content">
       <template>
-        <slot name="content"></slot>
+        <slot name="content" />
       </template>
     </div>
   </div>
 </template>
 <script>
 export default {
-  props: ["show"],
+  props: [ 'show' ],
   methods: {
     callBack() {
-      this.$emit("callBack", false);
-    },
-  },
-};
+      this.$emit('callBack', false)
+    }
+  }
+}
 </script>
 <style lang="less" scoped>
 .modal{

+ 3 - 1
src/pages/index/views/Lithology.vue

@@ -20,7 +20,9 @@ export default {
       // 通知主进程开启打印窗口
       const electron = window.$electron || null
       if (electron) {
-        electron.ipcRenderer.send('openPrint', true)
+        const w = window.innerWidth
+        const h = window.innerHeight
+        electron.ipcRenderer.send('openPrint', { w, h })
       }
     }
   }

+ 175 - 43
src/pages/print/App.vue

@@ -13,11 +13,11 @@
           <span>目标打印机</span>
           <div>
             <Select
-              v-model="model"
+              v-model="selectData.deviceName"
               prefix="md-print"
             >
               <Option
-                v-for="item in List"
+                v-for="item in deviceName"
                 :key="item.value"
                 :value="item.value"
               >
@@ -26,14 +26,14 @@
             </Select>
           </div>
         </div>
-        <div>
+        <!-- <div>
           <span>页面</span>
           <div>
             <Select
-              v-model="model"
+              v-model="selectData.pagesPerSheet"
             >
               <Option
-                v-for="item in List"
+                v-for="item in pagesPerSheet"
                 :key="item.value"
                 :value="item.value"
               >
@@ -41,13 +41,13 @@
               </Option>
             </Select>
           </div>
-        </div>
+        </div> -->
         <div>
           <span>份数</span>
           <div>
             <InputNumber
-              v-model="model1"
-              :max="10"
+              v-model="selectData.copies"
+              :max="9999"
               :min="1"
             />
           </div>
@@ -56,10 +56,10 @@
           <span>布局</span>
           <div>
             <Select
-              v-model="model"
+              v-model="selectData.Landscape"
             >
               <Option
-                v-for="item in List"
+                v-for="item in Landscape"
                 :key="item.value"
                 :value="item.value"
               >
@@ -79,10 +79,10 @@
                   <span>纸质尺寸</span>
                   <div>
                     <Select
-                      v-model="model"
+                      v-model="selectData.pageSize"
                     >
                       <Option
-                        v-for="item in List"
+                        v-for="item in pageSize"
                         :key="item.value"
                         :value="item.value"
                       >
@@ -95,10 +95,10 @@
                   <span>每个工作表的页数</span>
                   <div>
                     <Select
-                      v-model="model"
+                      v-model="selectData.pagesPerSheet"
                     >
                       <Option
-                        v-for="item in List"
+                        v-for="item in pagesPerSheet"
                         :key="item.value"
                         :value="item.value"
                       >
@@ -111,10 +111,10 @@
                   <span>边距</span>
                   <div>
                     <Select
-                      v-model="model"
+                      v-model="selectData.margins"
                     >
                       <Option
-                        v-for="item in List"
+                        v-for="item in margins"
                         :key="item.value"
                         :value="item.value"
                       >
@@ -127,10 +127,10 @@
                   <span>打印质量</span>
                   <div>
                     <Select
-                      v-model="model"
+                      v-model="selectData.dpi"
                     >
                       <Option
-                        v-for="item in List"
+                        v-for="item in dpi"
                         :key="item.value"
                         :value="item.value"
                       >
@@ -143,10 +143,10 @@
                   <span>缩放</span>
                   <div>
                     <Select
-                      v-model="model"
+                      v-model="selectData.scaleFactor"
                     >
                       <Option
-                        v-for="item in List"
+                        v-for="item in scaleFactor"
                         :key="item.value"
                         :value="item.value"
                       >
@@ -156,15 +156,24 @@
                   </div>
                 </div>
                 <div class="resetStyle">
-                  <span>选项</span>
+                  <span>双面</span>
                   <div>
-                    <CheckboxGroup
-                      v-model="checkAllGroup"
-                    >
-                      <Checkbox label="双面打印" />
-                      <Checkbox label="页面页脚" />
-                      <Checkbox label="背景图形" />
-                    </CheckboxGroup>
+                    <Checkbox v-model="duplex">
+                      双面打印
+                    </Checkbox>
+                    <div v-if="duplex">
+                      <Select
+                        v-model="selectData.duplexMode"
+                      >
+                        <Option
+                          v-for="item in duplexMode"
+                          :key="item.value"
+                          :value="item.value"
+                        >
+                          {{ item.label }}
+                        </Option>
+                      </Select>
+                    </div>
                   </div>
                 </div>
                 <div>
@@ -191,21 +200,146 @@
 export default {
   data() {
     return {
-      model: 'test',
-      model1: 1,
-      checkAllGroup: [],
-      List: [
+      // 打印机列表
+      deviceName: [
         {
           value: 'test',
           label: 'test'
         }
-      ]
+      ],
+      // 工作表的页数
+      pagesPerSheet: [
+        {
+          value: 1,
+          label: '1'
+        },
+        {
+          value: 2,
+          label: '2'
+        },
+        {
+          value: 4,
+          label: '4'
+        },
+        {
+          value: 6,
+          label: '6'
+        },
+        {
+          value: 9,
+          label: '9'
+        },
+        {
+          value: 16,
+          label: '16'
+        }
+      ],
+      // 布局
+      Landscape: [
+        {
+          value: 0,
+          label: '纵向'
+        },
+        {
+          value: 1,
+          label: '横向'
+        }
+      ],
+      // 页面 尺寸
+      pageSize: [
+        {
+          value: 'A4',
+          label: 'A4'
+        },
+        {
+          value: 'A5',
+          label: 'A5'
+        }
+      ],
+      // 边距
+      margins: [
+        {
+          value: 'default',
+          label: '默认'
+        },
+        {
+          value: 'printableArea',
+          label: '可打印区域'
+        },
+        {
+          value: 'none',
+          label: '无'
+        }
+      ],
+      // 分辨率
+      dpi: [
+        {
+          value: 600,
+          label: '600 dpi'
+        },
+        {
+          value: 1200,
+          label: '1200 dpi'
+        }
+      ],
+      // 缩放
+      scaleFactor: [
+        {
+          value: 0,
+          label: '200%'
+        },
+        {
+          value: 1,
+          label: '150%'
+        },
+        {
+          value: 2,
+          label: '130%'
+        },
+        {
+          value: 3,
+          label: '100%'
+        },
+        {
+          value: 4,
+          label: '50%'
+        },
+        {
+          value: 5,
+          label: '30%'
+        }
+      ],
+      // 双面打印
+      duplexMode: [
+        {
+          value: 'shortEdge',
+          label: '短边翻转'
+        },
+        {
+          value: 'longEdge',
+          label: '长边翻转'
+        }
+      ],
+      // 选定数据
+      selectData: {
+        deviceName: 'test', // 目标打印机
+        pagesPerSheet: 1, // 工作表的页数
+        copies: 1, // 份数
+        Landscape: 0, // 布局
+        dpi: 600, // 打印质量
+        margins: 'default', // 边距
+        scaleFactor: 3, // 缩放
+        pageSize: 'A4', // 纸张尺寸
+        duplexMode: 'shortEdge'// 双面打印
+      },
+      duplex: false
     }
   },
   methods: {
+
+    // 关闭打印
     close() {
       const electron = window.$electron || null
-      console.log(electron)
       if (electron) {
         electron.ipcRenderer.send('closePrint', false)
       }
@@ -217,8 +351,6 @@ export default {
 #app {
   font-family: Avenir, Helvetica, Arial, sans-serif;
   text-align: center;
-  width: 1310px;
-  height: 860px;
   margin: 0;
   padding: 0;
   overflow: hidden;
@@ -226,15 +358,16 @@ export default {
   font-size: 15px;
   color: black;
   .left{
-    width: 900px;
-    height: 860px;
+    width: 560px;
+    height: 760px;
     background: rgb(218, 220, 224);
     overflow-y: scroll;
+    overflow-x: hidden;
   }
   .right{
-    width: calc(1310px - 900px);
-    height: 800px;
-    padding-top: 20px;
+    width: 410px;
+    height: 710px;
+    padding-top: 10px;
     overflow-y: overlay;
     // 修改图标
     /deep/ .ivu-icon-ios-arrow-up:before{
@@ -344,8 +477,7 @@ html,
 body {
   padding: 0;
   margin: 0;
-  width: 100%;
-  height: 100%;
   user-select: none;
+  overflow: hidden;
 }
 </style>

+ 414 - 0
src/pages/print/app-rem.vue

@@ -0,0 +1,414 @@
+<template>
+  <div id="app">
+    <div class="left">
+      test
+    </div>
+    <div>
+      <div class="right">
+        <div>
+          <span>打印</span>
+          <div>2张纸</div>
+        </div>
+        <div>
+          <span>目标打印机</span>
+          <div>
+            <Select
+              v-model="model"
+              prefix="md-print"
+            >
+              <Option
+                v-for="item in List"
+                :key="item.value"
+                :value="item.value"
+              >
+                {{ item.label }}
+              </Option>
+            </Select>
+          </div>
+        </div>
+        <div>
+          <span>页面</span>
+          <div>
+            <Select
+              v-model="model"
+            >
+              <Option
+                v-for="item in List"
+                :key="item.value"
+                :value="item.value"
+              >
+                {{ item.label }}
+              </Option>
+            </Select>
+          </div>
+        </div>
+        <div>
+          <span>份数</span>
+          <div>
+            <InputNumber
+              v-model="model1"
+              :max="10"
+              :min="1"
+            />
+          </div>
+        </div>
+        <div>
+          <span>布局</span>
+          <div>
+            <Select
+              v-model="model"
+            >
+              <Option
+                v-for="item in List"
+                :key="item.value"
+                :value="item.value"
+              >
+                {{ item.label }}
+              </Option>
+            </Select>
+          </div>
+        </div>
+        <div>
+          <!--  -->
+          <Collapse simple>
+            <Panel hide-arrow>
+              更多设置
+              <Icon type="ios-arrow-forward" />
+              <template #content>
+                <div>
+                  <span>纸质尺寸</span>
+                  <div>
+                    <Select
+                      v-model="model"
+                    >
+                      <Option
+                        v-for="item in List"
+                        :key="item.value"
+                        :value="item.value"
+                      >
+                        {{ item.label }}
+                      </Option>
+                    </Select>
+                  </div>
+                </div>
+                <div>
+                  <span>每个工作表的页数</span>
+                  <div>
+                    <Select
+                      v-model="model"
+                    >
+                      <Option
+                        v-for="item in List"
+                        :key="item.value"
+                        :value="item.value"
+                      >
+                        {{ item.label }}
+                      </Option>
+                    </Select>
+                  </div>
+                </div>
+                <div>
+                  <span>边距</span>
+                  <div>
+                    <Select
+                      v-model="model"
+                    >
+                      <Option
+                        v-for="item in List"
+                        :key="item.value"
+                        :value="item.value"
+                      >
+                        {{ item.label }}
+                      </Option>
+                    </Select>
+                  </div>
+                </div>
+                <div>
+                  <span>打印质量</span>
+                  <div>
+                    <Select
+                      v-model="model"
+                    >
+                      <Option
+                        v-for="item in List"
+                        :key="item.value"
+                        :value="item.value"
+                      >
+                        {{ item.label }}
+                      </Option>
+                    </Select>
+                  </div>
+                </div>
+                <div>
+                  <span>缩放</span>
+                  <div>
+                    <Select
+                      v-model="model"
+                    >
+                      <Option
+                        v-for="item in List"
+                        :key="item.value"
+                        :value="item.value"
+                      >
+                        {{ item.label }}
+                      </Option>
+                    </Select>
+                  </div>
+                </div>
+                <div class="resetStyle">
+                  <span>选项</span>
+                  <div>
+                    <CheckboxGroup
+                      v-model="checkAllGroup"
+                    >
+                      <Checkbox label="双面打印" />
+                      <Checkbox label="页面页脚" />
+                      <Checkbox label="背景图形" />
+                    </CheckboxGroup>
+                  </div>
+                </div>
+                <div>
+                  使用系统对话框进行打印...(Ctrl+Shift+P)
+                  <Icon type="md-share-alt" />
+                </div>
+              </template>
+            </Panel>
+          </Collapse>
+        </div>
+      </div>
+      <div class="right-bottom">
+        <Button type="primary">
+          打印
+        </Button>
+        <Button @click="close">
+          取消
+        </Button>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      model: 'test',
+      model1: 1,
+      checkAllGroup: [],
+      List: [
+        {
+          value: 'test',
+          label: 'test'
+        }
+      ]
+    }
+  },
+  methods: {
+    close() {
+      const electron = window.$electron || null
+      console.log(electron)
+      if (electron) {
+        electron.ipcRenderer.send('closePrint', false)
+      }
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+#app {
+  font-family: Avenir, Helvetica, Arial, sans-serif;
+  text-align: center;
+  margin: 0;
+  padding: 0;
+  overflow: hidden;
+  display: flex;
+  font-size: 0.15rem;
+  color: black;
+  .left{
+    width: 5.6rem;
+    background: rgb(218, 220, 224);
+    overflow: auto;
+  }
+  .right{
+    width: 4.1rem;
+    height: 7rem;
+    padding-top: 0.2rem;
+    overflow-y:overlay;
+    // 修改图标
+    /deep/ .ivu-icon-ios-arrow-up:before{
+      content:"\f343";
+      font-size: 0.17rem;
+    }
+    /deep/ .ivu-icon-ios-arrow-down:before {
+      content: "\f33d";
+      font-size:  0.17rem;
+    }
+    /deep/ .ivu-input-number-input,
+    /deep/ .ivu-input-number,
+    /deep/ .ivu-select-selection{
+      background: rgb(241, 243, 244);
+      border: none;
+    }
+    /deep/ .ivu-input-number-handler-wrap{
+      width: 0.22rem;
+      border:none;
+      background: none;
+      &>a{
+        border: none;
+      }
+      .ivu-input-number-handler{
+        height: 0.16rem;
+      }
+      .ivu-input-number-handler-down-inner,
+      .ivu-input-number-handler-up-inner{
+        width: 0.12rem;
+        height: 0.12rem;
+        line-height: 0.12rem;
+        font-size: 0.14rem;
+        right: 0.05rem;
+      }
+    }
+    /deep/ .ivu-icon-md-print:before {
+      font-size: 0.2rem;
+    }
+
+    /deep/ .ivu-select-single .ivu-select-selection .ivu-select-placeholder,
+    /deep/ .ivu-select-single .ivu-select-selection .ivu-select-selected-value{
+      height: 0.3rem;
+      line-height: 0.3rem;
+      font-size: 0.14rem;
+    }
+    /deep/ .ivu-select-single .ivu-select-selection{
+      height: 0.32rem;
+    }
+    /deep/ .ivu-select-item{
+      padding: 0.07rem 0.16rem;
+      clear: both;
+      color: #515a6e;
+      font-size: 0.14rem!important;
+    }
+    /deep/ .ivu-checkbox-wrapper{
+      font-size: 0.14rem;
+      margin-right: 0.08rem;
+    }
+    /deep/ .ivu-checkbox-inner{
+      width: 0.16rem;
+      height: 0.16rem;
+      border-radius: 0.02rem;
+      border: 0.01rem solid #dcdee2;
+    }
+    /deep/ .ivu-checkbox-checked .ivu-checkbox-inner:after{
+      width: 0.04rem;
+      height: 0.08rem;
+      top: 0.02rem;
+      left: 0.05rem;
+    }
+    /deep/ .ivu-input-number-input-wrap{
+      height: 0.32rem;
+    }
+    /deep/ .ivu-input-number-input{
+      height: 0.32rem;
+      line-height: 0.32rem;
+      padding: 0 0.07rem;
+      border-radius: 0.04rem;
+    }
+    /deep/ .ivu-input-number{
+      font-size: 0.14rem;
+      width: 0.8rem;
+      height: 0.32rem;
+      line-height: 0.32rem;
+      border-radius: 0.04rem;
+    }
+    /deep/ .ivu-collapse{
+      border-bottom: none;
+      .ivu-collapse-header{
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        padding: 0.2rem 0.15rem 0.2rem 0.2rem;
+        height: auto;
+        line-height: normal;
+      }
+      .ivu-collapse-header:hover{
+        background: rgba(232, 233, 233, 1);
+      }
+      .ivu-collapse-content{
+        padding: 0;
+      }
+      .ivu-collapse-content-box>div{
+        display: flex;
+        align-items: center;
+        margin-top: 0.2rem;
+        text-align: left;
+        padding: 0 0.2rem;
+        &>span:first-child{
+          display: inline-block;
+          width: 1.5rem;
+        }
+        &>div:last-child{
+          flex: 1;
+        }
+        &:last-child{
+          font-size: 0.13rem;
+          justify-content: space-between;
+          margin-top: 0.4rem;
+          cursor: pointer;
+        }
+        .ivu-checkbox-group-item{
+          display: block;
+          margin-bottom: 0.2rem;
+        }
+      }
+      .ivu-collapse-content-box .resetStyle{
+        align-items: flex-start;
+      }
+    }
+    &>div:first-child span:first-child{
+      font-size: 0.16rem;
+    }
+    &>div:first-child > div:last-child{
+      text-align: right;
+      font-size: 0.14rem;
+    }
+    &>div:not(:last-child){
+      display: flex;
+      align-items: center;
+      margin-bottom: 0.2rem;
+      text-align: left;
+      padding: 0 0.2rem;
+      &>span:first-child{
+        display: inline-block;
+        width: 1.5rem;
+      }
+      &>div:last-child{
+        flex: 1;
+      }
+    }
+  }
+  .right-bottom{
+    height: 0.6rem;
+    display: flex;
+    align-items: center;
+    padding: 0 0.2rem;
+    justify-content: flex-end;
+    &>button:last-child{
+      margin-left: 0.1rem;
+    }
+    /deep/ .ivu-btn{
+      height: 0.32rem;
+      padding: 0 0.15rem;
+      font-size: 0.14rem;
+      border-radius: 0.04rem;
+    }
+  }
+}
+</style>
+<style>
+html,
+body {
+  padding: 0;
+  margin: 0;
+  user-select: none;
+  overflow: hidden;
+}
+/*  */
+</style>

+ 0 - 21
src/utils/axios.js

@@ -1,21 +0,0 @@
-import axios from 'axios'
-// http request 拦截
-axios.interceptors.request.use(
-  config => {
-    config.baseURL = process.env.SERVERURL
-    return config
-  },
-  err => {
-    return Promise.reject(err)
-  }
-)
-// http response 拦截
-axios.interceptors.response.use(
-  response => {
-    return response.data
-  },
-  error => {
-    return Promise.reject(error)
-  }
-)
-export default axios

+ 0 - 41
src/utils/resizeChart.js

@@ -1,41 +0,0 @@
-class ResizeChart {
-  /**
-     * 监听resize
-     */
-  on (chart) {
-    if (chart) {
-      window.addEventListener('resize', function () {
-        if (Array.isArray(chart) && chart.length) {
-          for (let k = 0; k < chart.length; k++) {
-            const el = chart[k]
-            el.resize()
-          }
-        } else {
-          if (chart instanceof Object) {
-            chart.resize()
-          } else {
-            return false
-          }
-        }
-      })
-    }
-  }
-  /**
-   * 关闭
-   */
-  off (chart) {
-    if (chart) {
-      window.removeEventListener('resize', function () {
-        if (Array.isArray(chart) && chart.length) {
-          for (let k = 0; k < chart.length; k++) {
-            const el = chart[k]
-            el.dispose()
-          }
-        } else {
-          chart.dispose()
-        }
-      })
-    }
-  }
-}
-export default new ResizeChart()

Some files were not shown because too many files changed in this diff