Просмотр исходного кода

增加通用方法,优化部分页面

cfort 3 лет назад
Родитель
Сommit
ce397170de

+ 12 - 3
src/api/platform/form/seal.js

@@ -5,7 +5,7 @@ import { FORM_URL } from '@/api/baseUrl'
  * ca电子签章接口
  * @param {*} params
  */
-export function goSeal(params) {
+export const goSeal = params => {
     return request({
         url: FORM_URL() + '/sys/esspdf/fileSign',
         method: 'post',
@@ -17,7 +17,7 @@ export function goSeal(params) {
  * word 转 pdf
  * @param {*} params
  */
-export function wordToPdf(params) {
+export const wordToPdf = params => {
     return request({
         url: FORM_URL() + '/sys/esspdf/wordToPdf',
         method: 'post',
@@ -50,4 +50,13 @@ export const docxToPdfAndSign = params => {
         isLoading: true,
         params
     })
-}
+}
+
+export const onlyOfficeToPdf = params => {
+    return request({
+        url: FORM_URL() + '/sys/esspdf/onlyOfficeToPdf',
+        method: 'post',
+        isLoading: true,
+        params
+    })
+}

+ 1 - 1
src/business/platform/bpmn/setting/bpmn-setting/types/global.vue

@@ -43,7 +43,7 @@
       </el-collapse-item> -->
      <el-collapse-item title="记录保存" name="varSetting">
     <div style="margin-left:5%;">
-       报表路径以半角","分割: <el-input placeholder="报表路径" type="textarea" rows="5" v-model="bao_biao_lu_jing_"> </el-input>
+       报表路径以半角","分割: <el-input placeholder="报表路径" type="textarea" rows="5" v-model="bao_biao_lu_jing_"> </el-input>
        附件字段名以半角","分割 (多个数据表以'.'分割):<el-input placeholder="附件字段"  v-model="fu_jian_nei_rong_"></el-input>
        附件所在数据库 (多个数据表以'.'分割):<el-input placeholder="附件数据库"  v-model="shi_fou_zi_biao_"></el-input>
        [ 当前表默认id主键 ] 附件子表的外键字段[选填] (多个数据表以'.'分割):<el-input placeholder="关联字段"  v-model="guan_lian_zi_duan"></el-input>

+ 3 - 4
src/business/platform/data/templaterender/templates/list.vue

@@ -154,7 +154,7 @@ import Scan from '@/views/system/jbdScan/scan.vue'
 import IbpsExport from '@/plugins/export'
 import IbpsImport from '@/plugins/import'
 import Vue from 'vue'
-import preview from '@/business/platform/form/utils/custom/preview'
+import { preview } from '@/business/platform/form/utils/custom/preview'
 Vue.component('ibps-data-template-render-dialog', () => import('@/business/platform/data/templaterender/preview/dialog.vue'))
 import xlsxFile from '@/business/platform/data/templaterender/templates/compenent/xlsxFile.vue'
 
@@ -285,7 +285,6 @@ export default {
 
             importTableDialogVisible: false,
             position: null,
-            selection: null,
             importList: [],
             importVlaue: null
         }
@@ -797,7 +796,7 @@ export default {
                             this.$message.warning('请先配置对应报表路径!')
                             return
                         }
-                        src = `${this.$reportPash.replace('show', 'pdf')}${this.previewPath}&id_=${selection}`
+                        src = `${this.$reportPath.replace('show', 'pdf')}${this.previewPath}&id_=${selection}`
                         preview(this, src)
                         break
                     case 'download': // 下载记录
@@ -805,7 +804,7 @@ export default {
                             this.$message.warning('请先配置对应报表路径!')
                             return
                         }
-                        src = `${this.$reportPash}${this.downloadPath}&id_=${selection}`
+                        src = `${this.$reportPath}${this.downloadPath}&id_=${selection}`
                         preview(this, src)
                         break
                     case 'print': // 打印

+ 0 - 13
src/business/platform/form/utils/custom/getDateRule.js

@@ -1,13 +0,0 @@
-
-const getDate = () => {
-  var date = new Date(new Date());
-  var year = date.getFullYear();
-  var month = trans(date.getMonth() + 1);
-  var day = trans(date.getDate());
-  return year + '-' + month + '-' + day;
-}
-function trans(val) {
-  return val < 10 ? '0' + val : val;
-}
-
-export default getDate

+ 32 - 44
src/business/platform/form/utils/custom/preview.js

@@ -5,7 +5,7 @@ import { snapshoot } from '@/api/platform/file/attachment' // 印章,快照
 import { download } from '@/api/platform/file/attachment'
 import ActionUtils from '@/utils/action'
 
-const previewPdf = (tableForm, srcUrl) => {
+export const preview = (tableForm, url) => {
     var flag = true
     if (/Mobi|Android|iPhone|iPad/i.test(navigator.userAgent)) {
         flag = false
@@ -20,10 +20,7 @@ const previewPdf = (tableForm, srcUrl) => {
                     }
                 },
 
-                template: '<div style="height:100%">' +
-                    '<iframe src="' + srcUrl + '"' +
-                    'id="myiframe"  frameborder="0" scrolling="no" height="100%" width="100%"></iframe>' +
-                    '</div>'
+                template: `<div style="height:100%"><iframe src="${url}" id="myiframe" frameborder="0" scrolling="no" height="100%" width="100%"></iframe></div>`
             },
             {
                 dialog: {
@@ -50,73 +47,65 @@ const previewPdf = (tableForm, srcUrl) => {
                         data: '',
                         pdfh5: null,
                         name: '',
-                        url: ``
+                        url: ''
                     }
                 },
                 mounted () {
-                    this.getYab()
+                    this.getFile()
                 },
                 methods: {
-                    getYab () {
-                        const srcUrl1 = srcUrl.split('rpx=')[1]
-                        const srcUrlList = srcUrl1.split('.rpx&id_=')
-                        const name = srcUrlList[0].split('/')
-
-                        const url = tableForm.$getReportFile(srcUrlList[0], `id_=${srcUrlList[1]}`)
-                        this.name = name[name.length - 1] + '.pdf'
+                    getFile () {
+                        const urlList = url.split('rpx=')[1].split('.rpx&id_=')
+                        const name = urlList[0].split('/')
+                        this.name = name[name.length - 1]
                         const params = {
-                            url: url,
-                            name: name[name.length - 1] || '暂无',
+                            url: tableForm.$getReportFile(urlList[0], `id_=${urlList[1]}`),
+                            name: name[name.length - 1] || '未命名',
                             type: 'pdf'
                         }
                         snapshoot(params).then(res => {
-                            if (res.state === 200) {
-                                const data = res.data
-                                this.getDownload(data.id)
+                            const { data = null } = res
+                            if (!data) {
+                                tableForm.$message.error('获取文件信息失败!')
+                                return
                             }
+                            this.getDownload(data.id)
                         })
                     },
                     getDownload (id) {
-                        download({
-                            attachmentId: id
-                        }).then(res => {
-                            this.getMet(res.data)
+                        download({ attachmentId: id }).then(res => {
+                            this.render(res.data)
                             this.url = res.data
                         })
                     },
-                    getMet (url) {
-                        const that = this
-                        // //实例化1
-                        that.$nextTick(() => {
-                            that.pdfh5 = new Pdfh5('#demo', {
+                    render (url) {
+                        this.$nextTick(() => {
+                            this.pdfh5 = new Pdfh5('#demo', {
                                 // pdfurl: window.location.origin + '/' + url,
                                 data: url
                                 // lazy: true
                             })
-                            that.pdfh5.on('complete', function (status, msg, time) {
+                            this.pdfh5.on('complete', (status, msg, time) => {
                                 // console.log(status, msg, time)
                             })
                         })
                     },
-                    finish () {
-                        this.visible = false
+                    close () {
                         tableForm.dialogTemplate = null
+                        this.visible = false
                     },
-                    xiazan () {
-                        ActionUtils.exportFile(
-                            this.url,
-                            this.name
-                        )
+                    download () {
+                        ActionUtils.exportFile(this.url, `${this.name}.pdf`)
                     }
                 },
                 template:
-                    `<div style="height:100%">
-                        <div id="demo"></div>
-                        <div style="position:absolute;right: 17px;top: 15px;" >
-                            <i class="el-icon-download" style="font-size: 24px;margin-right:15px" @click="xiazan"></i>
-                            <i class="el-icon-close" style="font-size: 24px;" @click="finish"></i>
-                        </div>
-                    </div>`
+                `<div style="height:100%">
+                    <div id="demo"></div>
+                    <div style="position:absolute;right: 17px;top: 15px;" >
+                        <i class="el-icon-download" style="font-size: 24px;margin-right:15px" @click="download"></i>
+                        <i class="el-icon-close" style="font-size: 24px;" @click="close"></i>
+                    </div>
+                </div>`
             },
             {
                 dialog: {
@@ -136,4 +125,3 @@ const previewPdf = (tableForm, srcUrl) => {
         })
     }
 }
-export default previewPdf

+ 2 - 2
src/components/ibps-link/index.vue

@@ -169,8 +169,8 @@ export default {
         router: this.$router,
         message: this.$message,
         link: this,
-        reportPash:this.$reportPash,
-        reportPashs:this.$reportPashs,
+        reportPath:this.$reportPath,
+        reportPaths:this.$reportPaths,
       }
       if (this.$utils.isEmpty(scrip)) return
       const promise = new window.Promise((resolve, reject) => {

+ 28 - 29
src/main.js

@@ -9,45 +9,44 @@ import store from './store/index'
 
 // 菜单和路由设置
 import router from './router'
-//数据大屏插件
+// 数据大屏插件
 import dataV from '@jiaminghi/data-view'
-//表格自适应高度
-import Plugin from 'v-fit-columns';
-
-//less的css编码语法
+// less的css编码语法
 import less from 'less'
 
-import Blob from './excel/Blob'
-import Export2Excel from './excel/Export2Excel.js'
+// 表格自适应高度
+// import Plugin from 'v-fit-columns'
+// import Blob from './excel/Blob'
+// import Export2Excel from './excel/Export2Excel.js'
 
-//less的css编码
+// less的css编码
 Vue.use(less)
 
-//数据大屏插件
+// 数据大屏插件
 Vue.use(dataV)
 
 // 核心插件
 Vue.use(ibps)
 
 new Vue({
-  router,
-  store,
-  i18n,
-  async created() {
-    // 加载接口配置
-    await this.$store.dispatch('ibps/api/load')
-  },
-  async mounted() {
-    // 展示系统信息
-    await this.$store.commit('ibps/releases/versionShow')
-    // 用户登录后从数据库加载一系列的设置
-    await this.$store.dispatch('ibps/account/load')
-    // 获取并记录用户 UA
-    await this.$store.commit('ibps/ua/get')
-    // 初始化全屏监听
-    await this.$store.dispatch('ibps/fullscreen/listen')
-    // 初始化加载是否修改用户信息
-    await this.$store.dispatch('ibps/user/listen')
-  },
-  render: h => h(App)
+    router,
+    store,
+    i18n,
+    async created () {
+        // 加载接口配置
+        await this.$store.dispatch('ibps/api/load')
+    },
+    async mounted () {
+        // 展示系统信息
+        await this.$store.commit('ibps/releases/versionShow')
+        // 用户登录后从数据库加载一系列的设置
+        await this.$store.dispatch('ibps/account/load')
+        // 获取并记录用户 UA
+        await this.$store.commit('ibps/ua/get')
+        // 初始化全屏监听
+        await this.$store.dispatch('ibps/fullscreen/listen')
+        // 初始化加载是否修改用户信息
+        await this.$store.dispatch('ibps/user/listen')
+    },
+    render: h => h(App)
 }).$mount('#app')

+ 9 - 6
src/plugins/ibps/index.js

@@ -15,6 +15,8 @@ import i18n from '@/i18n'
 import store from '@/store'
 // 工具类
 import Utils from '@/utils/util'
+// 全局方法
+import common from '@/utils'
 // global filters 全局过滤
 import * as filters from '@/filters'
 // 拼音指令
@@ -59,13 +61,13 @@ export default {
             return `https://www.szjyxt.com/demo/reportServlet?action=${type}&file=${encodeURIComponent(src)}.rpx&columns=0&srcType=file&paramString=${encodeURIComponent(where)}`
         }
         const reportPath = '金通医学实验室管理系统'
-        let timer = setInterval(() => { //定时循环添加参数
+        const timer = setInterval(() => { // 定时循环添加参数
             if (getToken()) {
-                //报表路径
-                Vue.prototype.$reportPash = `https://www.szjyxt.com/demo/reportJsp/showReport.jsp?access_token=${getToken()}&rpx=${reportPath}/`
-                Vue.prototype.$getReportFile = downloadReport //通过方法函数,拼接url,并将字符串格式化
-                Vue.prototype.$getFileDow = 'https://www.szjyxt.com/ibps/platform/v3/file/download?attachmentId=' //文件下载地址
-                clearInterval(timer) //添加成功后即删除定时任务
+                // 报表路径
+                Vue.prototype.$reportPath = `https://www.szjyxt.com/demo/reportJsp/showReport.jsp?access_token=${getToken()}&rpx=${reportPath}/`
+                Vue.prototype.$getReportFile = downloadReport // 通过方法函数,拼接url,并将字符串格式化
+                Vue.prototype.$getFileDow = 'https://www.szjyxt.com/ibps/platform/v3/file/download?attachmentId=' // 文件下载地址
+                clearInterval(timer) // 添加成功后即删除定时任务
             }
         }, 500)
 
@@ -97,6 +99,7 @@ export default {
         Vue.use(pluginOpen)
         // 使用帮助类
         Vue.prototype.$utils = Utils
+        Vue.prototype.$common = common
         // 快速打印 log
         Vue.prototype.$log = Utils.log
     }

+ 11 - 3
src/utils/common.js

@@ -1,12 +1,13 @@
 // 通用工具类,定义通用函数及常用接口
 import { encryptByAes } from '@/utils/encrypt'
-import previewPdf from '@/business/platform/form/utils/custom/preview'
+import { preview } from '@/business/platform/form/utils/custom/preview'
 import request from '@/business/platform/form/utils/custom/joinCURD'
 import pinyin4js from 'pinyin4js'
 import { snapshoot } from '@/api/platform/file/attachment'
 import { getNextIdByAlias } from '@/api/platform/system/identity'
 import { save as sendMsg } from '@/api/platform/message/innerMessage'
 import { bpmTaskSave } from '@/api/platform/bpmn/bpmTask'
+import { onlyOfficeToPdf } from '@/api/platform/form/seal'
 
 // base64解码
 const decode = str => decodeURIComponent(window.atob(str).split('').map(c => `%${`00${c.charCodeAt(0).toString(16)}`.slice(-2)}`).join(''))
@@ -35,8 +36,13 @@ export const download = (o, name) => {
     }
 }
 
+// 获取当前时间
+export const getNow = length => {
+    return new Date(new Date().getTime() + 28800000).toJSON().slice(0, length).replace('T', ' ')
+}
+
 export default {
-    previewPdf,
+    preview,
     request,
     pinyin4js,
     snapshoot,
@@ -45,5 +51,7 @@ export default {
     encryptByAes,
     download,
     sendMsg,
-    bpmTaskSave
+    bpmTaskSave,
+    getNow,
+    onlyOfficeToPdf
 }

+ 5 - 0
src/utils/index.js

@@ -0,0 +1,5 @@
+import common from './common'
+
+export default {
+    ...common
+}

+ 254 - 254
src/utils/util.js

@@ -18,265 +18,265 @@ import XSS from 'xss'
 const rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g
 
 const util = {
-  cookies,
-  log,
-  /**
-   * 判断是否为空
-   * @param {*} obj
-   */
-  isEmpty: function(obj, allowBlank = false) {
-    if (util.isNull(obj)) return true
-    if (util.isArray(obj)) return obj.length === 0
-    if (util.isString(obj)) return (!(allowBlank || obj.length > 0))
-    if (util.isObject(obj)) return util.isEmptyObject(obj)
-    for (var key in obj) if (obj.hasOwnProperty(key)) return false
-    return obj === undefined || (!allowBlank ? obj === '' : false)
-  },
-  /**
-   * 判断是否不为空
-   * @param {*} obj
-   */
-  isNotEmpty: function(obj, allowBlank = false) {
-    return !util.isEmpty(obj, allowBlank)
-  },
-  /**
-   * 判断是否为空对象
-   * @param {*} obj
-   */
-  isEmptyObject: function(obj) {
-    if (!obj) return true
-    for (const name in obj) {
-      return false
-    }
-    return true
-  },
-  /**
-   * 判断是否为不空对象
-   * @param {*} obj
-   */
-  isNotEmptyObject: function(obj) {
-    return util.isNotEmptyObject(obj)
-  },
-  /**
-   * 是否是对象
-   * @param {*} input
-   */
-  isObject: function(input) {
-    return Object.prototype.toString.call(input) === '[object Object]'
-  },
-  /**
-   * 是否是数组
-   * @param {*} input
-   */
-  isArray: function(input) {
-    return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'
-  },
-  isDate: function(input) {
-    return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'
-  },
-  isNumber: function(input) {
-    return input instanceof Number || Object.prototype.toString.call(input) === '[object Number]'
-  },
-  isString: function(input) {
-    return input instanceof String || Object.prototype.toString.call(input) === '[object String]'
-  },
-  isBoolean: function(input) {
-    return typeof input === 'boolean'
-  },
-  isFunction: function(input) {
-    return typeof input === 'function'
-  },
-  isNull: function(input) {
-    return input === undefined || input === null
-  },
-  isNum: function(input) {
-    if (util.isEmpty(input)) {
-      return false
-    } else {
-      if (util.isString(input)) {
-        input = Number(input)
-      }
-      if (isNaN(input)) {
+    cookies,
+    log,
+    /**
+     * 判断是否为空
+     * @param {*} obj
+     */
+    isEmpty (obj, allowBlank = false) {
+        if (util.isNull(obj)) return true
+        if (util.isArray(obj)) return obj.length === 0
+        if (util.isString(obj)) return (!(allowBlank || obj.length > 0))
+        if (util.isObject(obj)) return util.isEmptyObject(obj)
+        for (var key in obj) if (obj.hasOwnProperty(key)) return false
+        return obj === undefined || (!allowBlank ? obj === '' : false)
+    },
+    /**
+     * 判断是否不为空
+     * @param {*} obj
+     */
+    isNotEmpty (obj, allowBlank = false) {
+        return !util.isEmpty(obj, allowBlank)
+    },
+    /**
+     * 判断是否为空对象
+     * @param {*} obj
+     */
+    isEmptyObject (obj) {
+        if (!obj) return true
+        for (const name in obj) {
+            return false
+        }
+        return true
+    },
+    /**
+     * 判断是否为不空对象
+     * @param {*} obj
+     */
+    isNotEmptyObject (obj) {
+        return util.isNotEmptyObject(obj)
+    },
+    /**
+     * 是否是对象
+     * @param {*} input
+     */
+    isObject (input) {
+        return Object.prototype.toString.call(input) === '[object Object]'
+    },
+    /**
+     * 是否是数组
+     * @param {*} input
+     */
+    isArray (input) {
+        return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'
+    },
+    isDate (input) {
+        return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'
+    },
+    isNumber (input) {
+        return input instanceof Number || Object.prototype.toString.call(input) === '[object Number]'
+    },
+    isString (input) {
+        return input instanceof String || Object.prototype.toString.call(input) === '[object String]'
+    },
+    isBoolean (input) {
+        return typeof input === 'boolean'
+    },
+    isFunction (input) {
+        return typeof input === 'function'
+    },
+    isNull (input) {
+        return input === undefined || input === null
+    },
+    isNum (input) {
+        if (util.isEmpty(input)) {
+            return false
+        } else {
+            if (util.isString(input)) {
+                input = Number(input)
+            }
+            if (isNaN(input)) {
+                return false
+            }
+            return util.isNumber(input)
+        }
+    },
+    isValidNumber (t) {
+        return typeof t === 'number' && !isNaN(t) && isFinite(t)
+    },
+    isPlainObject (obj) {
+        if (obj && Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object && !hasOwnProperty.call(obj, 'constructor')) {
+            var key
+            for (var k in obj) {
+                key = k
+            }
+            return key === undefined || hasOwnProperty.call(obj, key)
+        }
         return false
-      }
-      return util.isNumber(input)
-    }
-  },
-  isValidNumber: function(t) {
-    return typeof t === 'number' && !isNaN(t) && isFinite(t)
-  },
-  isPlainObject: function(obj) {
-    if (obj && Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object && !hasOwnProperty.call(obj, 'constructor')) {
-      var key
-      for (var k in obj) {
-        key = k
-      }
-      return key === undefined || hasOwnProperty.call(obj, key)
-    }
-    return false
-  },
-  isJSON: function(str) {
-    if (util.isString(str)) {
-      try {
-        const obj = JSON.parse(str)
-        return util.isPlainObject(obj) || util.isArray(obj)
-      } catch (e) {
+    },
+    isJSON (str) {
+        if (util.isString(str)) {
+            try {
+                const obj = JSON.parse(str)
+                return util.isPlainObject(obj) || util.isArray(obj)
+            } catch (e) {
+                return false
+            }
+        }
         return false
-      }
-    }
-    return false
-  },
-  trim: function(text) {
-    return text == null ? '' : (text + '').replace(rtrim, '')
-  },
-  /**
-   * 判断参数是否是其中之一
-   */
-  oneOf: function(value, validList) {
-    for (let i = 0; i < validList.length; i++) {
-      if (value === validList[i]) {
-        return true
-      }
-    }
-    return false
-  },
-  /**
-   * 判断参数是否是数组对象其中之一
-   */
-  oneOfObj: function(value, validList, key) {
-    for (let i = 0; i < validList.length; i++) {
-      if (value === validList[i][key]) {
-        return true
-      }
-    }
-    return false
-  },
-  /**
-   * 全局唯一标识符
-   */
-  guid: function() {
-    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
-      const r = Math.random() * 16 | 0
-      const v = c === 'x' ? r : (r & 0x3 | 0x8)
-      return v.toString(16)
-    })
-  },
-  /**
-   * 转boolean 值
-   * @param {*} obj
-   * @param {*} defaultValue
-   */
-  toBoolean: function(obj, defaultValue = false) {
-    if (util.isEmpty(obj)) {
-      return defaultValue
-    }
-    return util.oneOf(obj, [true, 'True', 'Yes', 'true', '1', 1, 'yes', 'Y', 'y', 'T', 't'])
-  },
-  /**
- * 创建新数据,避免对象引用
- * @param {*} data
- * @param {*} defaultValue
- */
-  newData: function(data, defaultValue) {
-    return util.isNotEmpty(data) ? JSON.parse(JSON.stringify(data)) : (defaultValue || data)
-  },
-  /**
- * 转换json字符串的转换
- * @param {*} data
- * @param {*} defaultValue
- */
-  parseData: function(data, defaultValue) {
-    if (util.isNotEmpty(data)) {
-      // eslint-disable-next-line no-eval
-      return util.isPlainObject(data) || util.isArray(data) ? data : window.eval('(' + data + ')')
-    } else {
-      return (defaultValue || data)
-    }
-  },
-  /**
- * 转换json字符串的转换
- * @param {*} data
- * @param {*} defaultValue
- */
-  parseJSON: function(data, defaultValue) {
-    if (util.isNotEmpty(data)) {
-      return util.isJSON(data) ? JSON.parse(data) : data
-    } else {
-      return (defaultValue || data)
-    }
-  },
-  /**
-  * eval 数据
-  */
-  evalData: function(data) {
-    // eslint-disable-next-line no-eval
-    return window.eval(data)
-  },
-  /**
-   * 格式化文件大小, 输出成带单位的字符串
-   * @method formatSize
-   * @grammar util.formatSize( size ) => String
-   * @grammar util.formatSize( size, pointLength ) => String
-   * @grammar util.formatSize( size, pointLength, units ) => String
-   * @param {Number} size 文件大小
-   * @param {Number} [pointLength=2] 精确到的小数点数。
-   * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节,到千字节,一直往上指定。如果单位数组里面只指定了到了K(千字节),同时文件大小大于M, 此方法的输出将还是显示成多少K.
-   * @example
-   * console.log( util.formatSize( 100 ) );    // => 100B
-   * console.log( util.formatSize( 1024 ) );    // => 1.00K
-   * console.log( util.formatSize( 1024, 0 ) );    // => 1K
-   * console.log( util.formatSize( 1024 * 1024 ) );    // => 1.00M
-   * console.log( util.formatSize( 1024 * 1024 * 1024 ) );    // => 1.00G
-   * console.log( util.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) );    // => 1024MB
-   */
-  formatSize: function(size, pointLength, units) {
-    units = units || ['B', 'K', 'M', 'G', 'TB']
-    let unit
-    while ((unit = units.shift()) && size > 1024) {
-      size = size / 1024
-    }
-    return (unit === 'B' ? size : size.toFixed(pointLength || 2)) + unit
-  },
-  /**
-   * 格式化文本
-   * @param {*} text
-   */
-  formatText: function(text) {
-    return text !== null ? ('' + XSS(text)).replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + '<br />' + '$2') : ''
-  },
-  /**
-   * @description 打开新页面
-   * @param {String} url 地址
-   */
-  open: function(url) {
-    var a = document.createElement('a')
-    a.setAttribute('href', url)
-    a.setAttribute('target', '_blank')
-    a.setAttribute('id', 'ibps-open-link')
-    document.body.appendChild(a)
-    a.click()
-    document.body.removeChild(document.getElementById('ibps-open-link'))
-  },
-  /**
- * 将array递归为一维数组。
- * @param {*} ary
- * @param {*} predicate
- * @param {*} result
- */
-  flatten: function(ary, predicate, result) {
-    result = result || []
-    if (ary) {
-      for (let i = 0; i < ary.length; i++) {
-        const value = ary[i]
-        if (Array.isArray(value)) {
-          util.flatten(value, predicate, result)
+    },
+    trim (text) {
+        return text == null ? '' : (text + '').replace(rtrim, '')
+    },
+    /**
+     * 判断参数是否是其中之一
+     */
+    oneOf (value, validList) {
+        for (let i = 0; i < validList.length; i++) {
+            if (value === validList[i]) {
+                return true
+            }
+        }
+        return false
+    },
+    /**
+     * 判断参数是否是数组对象其中之一
+     */
+    oneOfObj (value, validList, key) {
+        for (let i = 0; i < validList.length; i++) {
+            if (value === validList[i][key]) {
+                return true
+            }
+        }
+        return false
+    },
+    /**
+     * 全局唯一标识符
+     */
+    guid () {
+        return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+            const r = Math.random() * 16 | 0
+            const v = c === 'x' ? r : (r & 0x3 | 0x8)
+            return v.toString(16)
+        })
+    },
+    /**
+     * 转boolean 值
+     * @param {*} obj
+     * @param {*} defaultValue
+     */
+    toBoolean (obj, defaultValue = false) {
+        if (util.isEmpty(obj)) {
+            return defaultValue
+        }
+        return util.oneOf(obj, [true, 'True', 'Yes', 'true', '1', 1, 'yes', 'Y', 'y', 'T', 't'])
+    },
+    /**
+     * 创建新数据,避免对象引用
+     * @param {*} data
+     * @param {*} defaultValue
+     */
+    newData (data, defaultValue) {
+        return util.isNotEmpty(data) ? JSON.parse(JSON.stringify(data)) : (defaultValue || data)
+    },
+    /**
+     * 转换json字符串的转换
+     * @param {*} data
+     * @param {*} defaultValue
+     */
+    parseData (data, defaultValue) {
+        if (util.isNotEmpty(data)) {
+            // eslint-disable-next-line no-eval
+            return util.isPlainObject(data) || util.isArray(data) ? data : window.eval('(' + data + ')')
+        } else {
+            return (defaultValue || data)
+        }
+    },
+    /**
+     * 转换json字符串的转换
+     * @param {*} data
+     * @param {*} defaultValue
+     */
+    parseJSON (data, defaultValue) {
+        if (util.isNotEmpty(data)) {
+            return util.isJSON(data) ? JSON.parse(data) : data
         } else {
-          (predicate && !predicate(value)) || result.push(value)
+            return (defaultValue || data)
+        }
+    },
+    /**
+     * eval 数据
+     */
+    evalData (data) {
+    // eslint-disable-next-line no-eval
+        return window.eval(data)
+    },
+    /**
+     * 格式化文件大小, 输出成带单位的字符串
+     * @method formatSize
+     * @grammar util.formatSize( size ) => String
+     * @grammar util.formatSize( size, pointLength ) => String
+     * @grammar util.formatSize( size, pointLength, units ) => String
+     * @param {Number} size 文件大小
+     * @param {Number} [pointLength=2] 精确到的小数点数。
+     * @param {Array} [units=[ 'B', 'K', 'M', 'G', 'TB' ]] 单位数组。从字节,到千字节,一直往上指定。如果单位数组里面只指定了到了K(千字节),同时文件大小大于M, 此方法的输出将还是显示成多少K.
+     * @example
+     * console.log( util.formatSize( 100 ) );    // => 100B
+     * console.log( util.formatSize( 1024 ) );    // => 1.00K
+     * console.log( util.formatSize( 1024, 0 ) );    // => 1K
+     * console.log( util.formatSize( 1024 * 1024 ) );    // => 1.00M
+     * console.log( util.formatSize( 1024 * 1024 * 1024 ) );    // => 1.00G
+     * console.log( util.formatSize( 1024 * 1024 * 1024, 0, ['B', 'KB', 'MB'] ) );    // => 1024MB
+     */
+    formatSize (size, pointLength, units) {
+        units = units || ['B', 'K', 'M', 'G', 'TB']
+        let unit
+        while ((unit = units.shift()) && size > 1024) {
+            size = size / 1024
+        }
+        return (unit === 'B' ? size : size.toFixed(pointLength || 2)) + unit
+    },
+    /**
+     * 格式化文本
+     * @param {*} text
+     */
+    formatText (text) {
+        return text !== null ? ('' + XSS(text)).replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + '<br />' + '$2') : ''
+    },
+    /**
+     * @description 打开新页面
+     * @param {String} url 地址
+     */
+    open (url) {
+        var a = document.createElement('a')
+        a.setAttribute('href', url)
+        a.setAttribute('target', '_blank')
+        a.setAttribute('id', 'ibps-open-link')
+        document.body.appendChild(a)
+        a.click()
+        document.body.removeChild(document.getElementById('ibps-open-link'))
+    },
+    /**
+     * 将array递归为一维数组。
+     * @param {*} ary
+     * @param {*} predicate
+     * @param {*} result
+     */
+    flatten (ary, predicate, result) {
+        result = result || []
+        if (ary) {
+            for (let i = 0; i < ary.length; i++) {
+                const value = ary[i]
+                if (Array.isArray(value)) {
+                    util.flatten(value, predicate, result)
+                } else {
+                    (predicate && !predicate(value)) || result.push(value)
+                }
+            }
         }
-      }
+        return result
     }
-    return result
-  }
 }
 
 export default util

+ 5 - 5
src/views/platform/bpmn/bpmInstHis/corresponding/getReport.js

@@ -18,7 +18,7 @@ export default {
             return data
         },
         alertReport (value, id_) {
-            this.srcUrl = `${this.$reportPash.replace('show', 'pdf')}${value}&id_=${id_}`
+            this.srcUrl = `${this.$reportPath.replace('show', 'pdf')}${value}&id_=${id_}`
             this.visible = true
         },
         /* 2、打开内容与附件,获取相关报告与附件内容*/
@@ -43,20 +43,20 @@ export default {
         },
         /* 3打开报告 */
         clickCont (cont, i) {
-            this.srcUrl = this.$reportPash.replace('show', "pdf") + cont.report[i] + '&id_=' + cont.formId
+            this.srcUrl = this.$reportPath.replace('show', "pdf") + cont.report[i] + '&id_=' + cont.formId
             this.visible = true
         },
         clickConts_GuanLiPingShen (i) {
-            this.srcUrl = this.$reportPash.replace('show', 'pdf') + '37管理评审程序/GDYR-CX30-R04C 管理评审改进跟踪验证表.rpx&id_=' + i
+            this.srcUrl = this.$reportPath.replace('show', 'pdf') + '37管理评审程序/GDYR-CX30-R04C 管理评审改进跟踪验证表.rpx&id_=' + i
             this.visible = true
         },
         clickConts_BuFuHeXiang (i) {
-            this.srcUrl = this.$reportPash.replace('show', 'pdf') + '36内部审核程序/GDYR-CX22-R01B 不符合项报告与纠正措施记录表.rpx&id_=' + i
+            this.srcUrl = this.$reportPath.replace('show', 'pdf') + '36内部审核程序/GDYR-CX22-R01B 不符合项报告与纠正措施记录表.rpx&id_=' + i
             this.visible = true
         },
         // 检测管理打开润乾报表
         clickConts_jianCe (name, i) {
-            this.srcUrl = this.$reportPash.replace('show', 'pdf') + name + '&id_=' + i
+            this.srcUrl = this.$reportPath.replace('show', 'pdf') + name + '&id_=' + i
             this.visible = true
         },
         /*3 获取文件内容,以表名和id去获取对应参数

+ 1 - 1
src/views/platform/bpmn/bpmInstHis/list.vue

@@ -435,7 +435,7 @@ export default {
         },
         // 打开报表
         openReport (path, id) {
-            this.srcUrl = `${this.$reportPash.replace('show', 'pdf')}${path}&id_=${id}`
+            this.srcUrl = `${this.$reportPath.replace('show', 'pdf')}${path}&id_=${id}`
             this.visible = true
         },
         getParenthesesStr (text) {

+ 1 - 1
src/views/platform/bpmn/bpmInstHis/record/component/testingRecord.vue

@@ -401,7 +401,7 @@
                 this.loadData(sql)
             },
             alertReport (path, id) {
-                this.srcUrl = `${this.$reportPash.replace('show', 'pdf')}${path}&id_=${id}`
+                this.srcUrl = `${this.$reportPath.replace('show', 'pdf')}${path}&id_=${id}`
                 this.visible = true
             },
             // 文件预览

+ 12 - 3
src/views/platform/bpmn/bpmTask/list.vue

@@ -129,6 +129,10 @@
                                 prop: 'Q^subject_^SL',
                                 label: '请求标题'
                             },
+                            {
+                                prop: 'Q^proc_def_key_^SL',
+                                label: '业务主键'
+                            },
                             {
                                 prop: 'Q^NAME_^SL',
                                 label: '当前节点'
@@ -147,21 +151,26 @@
                             label: '请求标题',
                             link: 'dialog'
                         },
+                        {
+                            prop: 'procDefKey',
+                            label: '业务主键',
+                            width: 120
+                        },
                         {
                             prop: 'name',
                             label: '当前节点',
-                            width: 200
+                            width: 120
                         },
                         {
                             prop: 'ownerName',
                             label: '候选人',
-                            width: 200,
+                            width: 150,
                             headerName: 'headerIcon'
                         },
                         {
                             prop: 'partyTypeName',
                             label: '候选人范围',
-                            width: 200
+                            width: 150
                         },
                         {
                             prop: 'createTime',

+ 3 - 1
src/views/platform/data/dataTemplate/list.vue

@@ -203,7 +203,9 @@ export default {
                 }
             },
             pagination: {},
-            sorts: {}
+            sorts: {
+                'CREATE_TIME_': 'DESC'
+            }
         }
     },
     computed: {

+ 1 - 2
src/views/platform/message/inner/detail/dialog.vue

@@ -33,7 +33,6 @@
 <script>
 import InnerMessage from './index'
 import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
-import getDate from '@/business/platform/form/utils/custom/getDateRule.js'
 import {
     generateUUID
 } from '@/api/platform/file/attachment'
@@ -151,7 +150,7 @@ export default {
                             id: ryjbqkDatas[0].qian_zi_tu_wen_,
                             fileName: '确认签名'
                         }]),
-                        que_ren_ri_qi_: getDate(),
+                        que_ren_ri_qi_: this.$common.getNow(10),
                         qian_ming_id_: ryjbqkDatas[0].qian_zi_tu_wen_
                     }
                     const returnParams = {

+ 1 - 1
src/views/system/dashboard/components/new-home.vue

@@ -754,7 +754,7 @@
                     return
                 }
                 const params = {
-                    taleName: 't_gqswb',
+                    tableName: 't_gqswb',
                     paramWhere: {
                         id_: deleteList.join(',')
                     }