From 3e1b79819880c948455ca9f4edf4c5caca7ca374 Mon Sep 17 00:00:00 2001 From: "[li_she]" <[li.she@xujiesoft.com]> Date: Tue, 3 Aug 2021 18:59:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=95=B0=E7=B2=BE=E7=A1=AE=E8=AE=A1?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/main.js | 3 ++ src/views/modules/sys/language/common.vue | 41 ++++++++++++----------- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index e368a41..18d6608 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "vue-cookie": "1.1.4", "vue-json-excel": "^0.3.0", "vue-router": "3.0.1", + "decimal": "10.3.1", "vuex": "3.0.1", "xlsx": "^0.17.0" }, diff --git a/src/main.js b/src/main.js index 7ecc2eb..535b969 100644 --- a/src/main.js +++ b/src/main.js @@ -13,6 +13,7 @@ import cloneDeep from 'lodash/cloneDeep' import JsonExcel from 'vue-json-excel' import i18n from '@/i18n/i18n' import './directives' +import decimalUtil from '@/utils/decimalUtil' Vue.component('downloadExcel', JsonExcel) @@ -28,6 +29,8 @@ if (process.env.NODE_ENV !== 'production') { // 挂载全局 Vue.prototype.$http = httpRequest // ajax请求方法 Vue.prototype.isAuth = isAuth // 权限方法 +Vue.prototype.decimalUtil = decimalUtil // 权限方法 + // 保存整站vuex本地储存初始状态 window.SITE_CONFIG['storeState'] = cloneDeep(store.state) diff --git a/src/views/modules/sys/language/common.vue b/src/views/modules/sys/language/common.vue index 133b711..71d03d7 100644 --- a/src/views/modules/sys/language/common.vue +++ b/src/views/modules/sys/language/common.vue @@ -476,26 +476,27 @@ import column from "../../common/column"; methods: { // 打印方式 printReport(){ - - const LODOP = getLodop() - if (LODOP) { - var strBodyStyle = '' //设置打印样式 - var strFormHtml = strBodyStyle + '' + document.getElementById('commmon').innerHTML + '' //获取打印内容 - - LODOP.PRINT_INIT('') //初始化 - LODOP.PRINT_DESIGN(); - //LODOP.PREVIEW(); - //LODOP.PRINT(); - - LODOP.SET_PRINT_PAGESIZE(2, 0, 0, 'A4') //设置横向 - LODOP.ADD_PRINT_HTM('1%', '1%', '98%', '98%', strFormHtml) //设置打印内容 - LODOP.SET_PREVIEW_WINDOW(2, 0, 0, 800, 600, '') //设置预览窗口模式和大小 - LODOP.PREVIEW() - } + alert(this.decimalUtil.mul(0.999999999,0.1123)) + // + // const LODOP = getLodop() + // if (LODOP) { + // var strBodyStyle = '' //设置打印样式 + // var strFormHtml = strBodyStyle + '' + document.getElementById('commmon').innerHTML + '' //获取打印内容 + // + // LODOP.PRINT_INIT('') //初始化 + // LODOP.PRINT_DESIGN(); + // //LODOP.PREVIEW(); + // //LODOP.PRINT(); + // + // LODOP.SET_PRINT_PAGESIZE(2, 0, 0, 'A4') //设置横向 + // LODOP.ADD_PRINT_HTM('1%', '1%', '98%', '98%', strFormHtml) //设置打印内容 + // LODOP.SET_PREVIEW_WINDOW(2, 0, 0, 800, 600, '') //设置预览窗口模式和大小 + // LODOP.PREVIEW() + // } }, // 校验用户是否收藏 favoriteIsOk(){