浏览代码

修复历史文件选择bug

cfort 2 年之前
父节点
当前提交
b2303a0d70

+ 346 - 329
src/business/platform/file/attachment/index.vue

@@ -1,349 +1,366 @@
 <template>
-  <div class="ibps-attachment-selector">
-    <template v-if="uploadable">
-      <!--ibps 附件上传方式-->
-      <template v-if="uploadType==='attachment'">
-        <ul
-          :class="{disabled:disabled}"
-          class="selector-list"
-          @click="handleUpload"
-        >
-          <label>
-            <div class="plus">+</div>
-            <div class="selector-empty">{{ placeholder }}</div>
-          </label>
-        </ul>
-      </template>
-      <!--直接弹出选择文件框-->
-      <template v-else>
-        <el-upload
-          ref="upload"
-          :file-list="fileList"
-          :on-success="handleSuccess"
-          :on-error="handleError"
-          :before-upload="beforeUpload"
-          :http-request="httpRequest"
-          :multiple="multiple"
-          :accept="accept"
-          :show-file-list="false"
-          action="https://www.bpmhome.cn/post"
-          name="file"
-          drag
-          class="ibps-default-upload"
-        >
-          <ul
-            :class="{disabled:disabled}"
-            class="selector-list"
-          >
-            <label>
-              <div class="plus">+</div>
-              <div class="selector-empty">{{ placeholder }}</div>
-            </label>
-          </ul>
-        </el-upload>
-
-        <!--重选附件-->
-        <el-upload
-          ref="defaultReselectUpload"
-          style="display:none;"
-          action="https://www.bpmhome.cn/post"
-          :on-success="handleReselectSuccess"
-          :before-upload="beforeUpload"
-          :http-request="httpRequest"
-          :file-list="fileList"
-          :multiple="false"
-          :accept="accept"
-          name="file"
-          drag
-        />
-      </template>
-    </template>
-
-
-    <ul
-      v-if="$utils.isNotEmpty(items)"
-      :class="[
-        'el-upload-list',
-        'el-upload-list--' + listType,
-        { 'is-disabled': !editable }
-      ]"
-    >
-      <li
-        v-for="(file,index) in items"
-        :key="index"
-        :class="['el-upload-list__item', focusing ? 'focusing' : '']"
-        tabindex="0"
-        @focus="focusing = true"
-        @blur="focusing = false"
-        @click.stop="focusing = false"
-      >
-        <span :file="file" >
-          <a
-            class="el-upload-list__item-name"
-            :style="{
-              marginRight:toolsWidth
-            }"
-            :title="file"
-            @click.stop="handlePreview(index)"
-            >
-         <i class="el-icon-document" />{{ file | ellipsis }}
-          </a>
-          <label
-            class="tools"
-          >
-           <template v-if="operation_status!='none' && editable">
-              <el-tooltip effect="dark" content="编辑" placement="bottom-start">
-                <el-link type="primary" :underline="false" icon="el-icon-edit" @click.stop="handleEdit(index)">&nbsp;</el-link>
-              </el-tooltip>
-            </template>
-             <el-divider direction="vertical" />
-            <template v-if="editable">
-              <!--默认附件上传 -->
-              <el-tooltip effect="dark" content="重新选择" placement="bottom-start">
-                <el-link type="primary" :underline="false" icon="ibps-icon-undo" @click.stop="handleReselect(index)">&nbsp;</el-link>
-              </el-tooltip>
-              <el-divider direction="vertical" />
-              <el-tooltip effect="dark" content="删除" placement="bottom-start">
-                <el-link type="danger" :underline="false" icon="ibps-icon-delete" @click.stop="handleRemove(index)">&nbsp;</el-link>
-              </el-tooltip>
-              <el-divider v-if="download" direction="vertical" />
-            </template>
-            <template v-if="download">
-              <el-tooltip effect="dark" content="下载" placement="bottom-start">
-                <el-link type="primary" :underline="false" icon="ibps-icon-download" @click.stop="handleDownload(index)">&nbsp;</el-link>
-              </el-tooltip>
+    <div class="ibps-attachment-selector">
+        <template v-if="uploadable">
+            <!--ibps 附件上传方式-->
+            <template v-if="uploadType==='attachment'">
+                <ul
+                    :class="{disabled:disabled}"
+                    class="selector-list"
+                    @click="handleUpload"
+                >
+                    <label>
+                        <div class="plus">+</div>
+                        <div class="selector-empty">{{ placeholder }}</div>
+                    </label>
+                </ul>
             </template>
-          </label>
-        </span>
-
-
-      </li>
-    </ul>
+            <!--直接弹出选择文件框-->
+            <template v-else>
+                <el-upload
+                    ref="upload"
+                    :file-list="fileList"
+                    :on-success="handleSuccess"
+                    :on-error="handleError"
+                    :before-upload="beforeUpload"
+                    :http-request="httpRequest"
+                    :multiple="multiple"
+                    :accept="accept"
+                    :show-file-list="false"
+                    action="https://www.bpmhome.cn/post"
+                    name="file"
+                    drag
+                    class="ibps-default-upload"
+                >
+                    <ul
+                        :class="{disabled:disabled}"
+                        class="selector-list"
+                    >
+                        <label>
+                            <div class="plus">+</div>
+                            <div class="selector-empty">{{ placeholder }}</div>
+                        </label>
+                    </ul>
+                </el-upload>
 
+                <!--重选附件-->
+                <el-upload
+                    ref="defaultReselectUpload"
+                    style="display:none;"
+                    action="https://www.bpmhome.cn/post"
+                    :on-success="handleReselectSuccess"
+                    :before-upload="beforeUpload"
+                    :http-request="httpRequest"
+                    :file-list="fileList"
+                    :multiple="false"
+                    :accept="accept"
+                    name="file"
+                    drag
+                />
+            </template>
+        </template>
 
-  </div>
+        <ul
+            v-if="$utils.isNotEmpty(items)"
+            :class="['el-upload-list', 'el-upload-list--' + listType, { 'is-disabled': !editable }]"
+        >
+            <vue-draggable
+                v-model="sortList"
+                v-bind="draggableOptions"
+                class="list-group"
+                @start="isDragging = true"
+                @end="()=>{isDragging= false}"
+                @update="updateSort"
+            >
+                <li
+                    v-for="(file,index) in items"
+                    :key="index"
+                    :class="['el-upload-list__item', focusing ? 'focusing' : '']"
+                    tabindex="0"
+                    @focus="focusing = true"
+                    @blur="focusing = false"
+                    @click.stop="focusing = false"
+                >
+                    <span :file="file">
+                        <a
+                            class="el-upload-list__item-name"
+                            :style="{ marginRight:toolsWidth }"
+                            :title="file"
+                            @click.stop="handlePreview(index)"
+                        >
+                            <i class="el-icon-document" />{{ file | ellipsis }}
+                        </a>
+                        <label class="tools">
+                            <template v-if="operation_status!='none' && editable">
+                                <el-tooltip effect="dark" content="编辑" placement="bottom-start">
+                                    <el-link type="primary" :underline="false" icon="el-icon-edit" @click.stop="handleEdit(index)">&nbsp;</el-link>
+                                </el-tooltip>
+                            </template>
+                            <el-divider direction="vertical" />
+                            <template v-if="editable">
+                                <!--默认附件上传 -->
+                                <!-- <el-tooltip effect="dark" content="拖拽排序" placement="bottom-start">
+                                    <el-link type="info" :underline="false" icon="ibps-icon-arrows" class="draggable">&nbsp;</el-link>
+                                </el-tooltip>
+                                <el-divider direction="vertical" /> -->
+                                <el-tooltip effect="dark" content="重新选择" placement="bottom-start">
+                                    <el-link type="primary" :underline="false" icon="ibps-icon-undo" @click.stop="handleReselect(index)">&nbsp;</el-link>
+                                </el-tooltip>
+                                <el-divider direction="vertical" />
+                                <el-tooltip effect="dark" content="删除" placement="bottom-start">
+                                    <el-link type="danger" :underline="false" icon="ibps-icon-delete" @click.stop="handleRemove(index)">&nbsp;</el-link>
+                                </el-tooltip>
+                                <el-divider v-if="download" direction="vertical" />
+                            </template>
+                            <template v-if="download">
+                                <el-tooltip effect="dark" content="下载" placement="bottom-start">
+                                    <el-link type="primary" :underline="false" icon="ibps-icon-download" @click.stop="handleDownload(index)">&nbsp;</el-link>
+                                </el-tooltip>
+                            </template>
+                        </label>
+                    </span>
+                </li>
+            </vue-draggable>
+        </ul>
+    </div>
 </template>
 <script>
 
 import { fileTypes, allFileTypes, accept as acceptTypes } from '@/business/platform/file/constants/fileTypes'
 import { uploadFile } from '@/api/platform/file/attachment'
+import VueDraggable from 'vuedraggable'
 
 export default {
-  name: 'ibps-attachment-selector',
-  props: {
-    items: {
-      type: Array
-    },
-    operation_status: String, //编辑
-    value: {
-      type: [Array, Object]
-    },
-    mediaType: String,
-    media: String,
-    placeholder: {
-      type: String,
-      default: '请选择'
-    },
-    multiple: { // 是否多选
-      type: Boolean,
-      default: false
-    },
-    limit: { // 最大允许上传个数
-      type: Number
-    },
-    disabled: {
-      type: Boolean,
-      default: false
-    },
-    readonly: {
-      type: Boolean,
-      default: false
-    },
-    download: {
-      type: Boolean,
-      default: false
+    name: 'ibps-attachment-selector',
+    components: { VueDraggable },
+    filters: {
+        ellipsis (val) {
+            if (!val) return ''
+            if (val.length > 60) {
+                return val.slice(0, 60) + '...'
+            }
+            return val
+        }
     },
-    preview: {
-      type: Boolean,
-      default: true
+    props: {
+        items: {
+            type: Array
+        },
+        operation_status: String, // 编辑
+        value: {
+            type: [Array, Object]
+        },
+        mediaType: String,
+        media: String,
+        placeholder: {
+            type: String,
+            default: '请选择'
+        },
+        multiple: { // 是否多选
+            type: Boolean,
+            default: false
+        },
+        limit: { // 最大允许上传个数
+            type: Number
+        },
+        disabled: {
+            type: Boolean,
+            default: false
+        },
+        readonly: {
+            type: Boolean,
+            default: false
+        },
+        download: {
+            type: Boolean,
+            default: false
+        },
+        preview: {
+            type: Boolean,
+            default: true
+        },
+        uploadType: { // 上传方式 ( default:直接打开上传,attachment:ibps上传附件打开上传 )
+            type: String,
+            default: 'attachment'
+        },
+        accept: String, // 允许上传类型
+        fileSize: Number, // 尺寸
+        fileExt: {
+            type: Array,
+            default: () => []
+        }
     },
-    uploadType: { // 上传方式 ( default:直接打开上传,attachment:ibps上传附件打开上传 )
-      type: String,
-      default: 'attachment'
+    data () {
+        console.log(this.value)
+        return {
+            fileList: [],
+            targetExt: false,
+            fileTypes: fileTypes,
+            allFileTypes: allFileTypes,
+            acceptTypes: acceptTypes,
+            defaultSelectIndex: 0,
+            listType: 'text',
+            focusing: false,
+            defaultDisabled: true,
+            sortList: [],
+            isDragging: false,
+            draggableOptions: {
+                handle: '.draggable',
+                ghostClass: 'sortable-ghost',
+                distance: 1,
+                disabled: false,
+                animation: 200,
+                axis: 'y'
+            }
+        }
     },
-    accept: String, // 允许上传类型
-    fileSize: Number, // 尺寸
-    fileExt: {
-      type: Array,
-      default: () => []
-    }
-  },
-  filters:{
-    ellipsis(val){
-      if(!val) return ""
-      if(val.length>45){
-        return val.slice(0,45) +"...";
-      }
-      return val
-    }
-  },
-  data() {
-    return {
-      fileList: [],
-      targetExt: false,
-      fileTypes: fileTypes,
-      allFileTypes: allFileTypes,
-      acceptTypes: acceptTypes,
-      defaultSelectIndex: 0,
-      listType: 'text',
-      focusing: false,
-      defaultDisabled: true,
-    }
-  },
-  computed: {
+    computed: {
     // 是否允许上传
-    uploadable() {
-      if (this.readonly) return false
-      if (!this.multiple && this.items.length >= 1) return false
-      if (this.multiple && (this.limit && this.items.length >= this.limit)) return false
-      return true
-    },
-    editable() {
-      return !(this.readonly || this.disabled)
-    },
-    toolsWidth() {
-      const length = this.editable ? 3 : 1
-      return (30 * length) + 'px'
-    }
-  },
-  methods: {
-    init() {
-      this.fileList = []
-    },
-    handleUpload() {
-      if (!this.editable) return
-      this.$emit('action-event', 'select')
-    },
-    /* 在线编辑报表*/
-    handleEdit(index){
-       this.$emit('action-event', 'edit',index,this.value[index]||this.value,this.operation_status)
-    },
-    handleReselect(index) {
-      if (!this.editable) return
-      if (this.uploadType === 'attachment') {
-        this.$emit('action-event', 'reselect', index)
-      } else {
-        this.$refs.defaultReselectUpload.$refs['upload-inner'].handleClick()
-        this.defaultSelectIndex = index
-      }
-    },
-    handleRemove(index) {
-      if (!this.editable) return
-      this.$emit('action-event', 'remove', index)
-    },
-    handleDownload(index) {
-      this.$emit('action-event', 'download', index)
-    },
-    handlePreview(index) {
-      this.$emit('action-event', 'preview', index)
-    },
-    // 默认上传模块
-    httpRequest(options) {
-      return uploadFile(options.file, {})
-    },
-    handleSuccess(response, file, fileList) {
-      this.fileList = fileList
-      this.emitCallback(fileList, file)
-    },
-    emitCallback(list, file) {
-      let data = this.multiple ? [] : {}
-      if (this.multiple) {
-        data = this.getFileDataList(list)
-      } else {
-        data = file.response.data
-      }
-      this.$emit('action-event', 'confirm', data)
-    },
-    getFileDataList(fileList) {
-      if (this.$utils.isEmpty(fileList)) {
-        return []
-      }
-      return fileList.map((file) => {
-        return file.response.data
-      })
-    },
-    handleError() {
-      // TODO:
-    },
-    beforeUpload(file) {
-      if (this.limit && this.limit === 0) {
-        this.$message({
-          message: '上传文件个数不能为0,请重新设置',
-          type: 'warning'
-        })
-        return false
-      }
-      if (this.fileSize && file.size > this.fileSize) {
-        this.$message.closeAll()
-        this.$message({
-          message: `上传文件的尺寸大于${this.$utils.formatSize(this.fileSize, 2, ['B', 'K', 'M', 'G', 'TB'])}`,
-          type: 'warning'
-        })
-        return false
-      }
-      if (this.accept && !this.fileExtType(file)) {
-        this.$message.closeAll()
-        this.$message({
-          message: '不允许的文件类型',
-          type: 'warning'
-        })
-        return false
-      }
-    },
-    /**
-     * 文件类型的检测
-     */
-    fileExtType(file) {
-      const accept = this.accept
-      const acceptTypes = this.acceptTypes
-      const fileTypes = this.fileTypes
-      const arr = file.name.split('.')
-      const result = arr[arr.length - 1]
-      let type = ''
-      this.targetExt = false
-      for (const i in acceptTypes) {
-        if (acceptTypes[i] === accept) {
-          type = i
+        uploadable () {
+            if (this.readonly) return false
+            if (!this.multiple && this.items.length >= 1) return false
+            if (this.multiple && (this.limit && this.items.length >= this.limit)) return false
+            return true
+        },
+        editable () {
+            return !(this.readonly || this.disabled)
+        },
+        toolsWidth () {
+            const length = this.editable ? 3 : 1
+            return (30 * length) + 'px'
         }
-      }
-      if (type !== '' && this.accept !== '*') {
-        // 现存的附件类型
-        const targetFileTypes = fileTypes[type]
-        this.targetExt = targetFileTypes.includes(result)
-      } else {
-        if (this.accept === '*') {
-        // 不限制
-          this.targetExt = true
-        } else {
-        // 自定义
-          const targetFileTypes = this.accept.split(',')
-          this.targetExt = targetFileTypes.includes('.' + result)
-        }
-      }
-      return this.targetExt
     },
-
-    handleReselectSuccess(response, file, fileList) {
-      this.fileList = fileList
-      const targetFile = file.response.data
-      var data = this.value
-      if (this.multiple) {
-        data.splice(this.defaultSelectIndex, 1, targetFile)
-      } else {
-        data = targetFile
-      }
-      this.$emit('action-event', 'confirm', data)
+    methods: {
+        init () {
+            this.fileList = []
+        },
+        handleUpload () {
+            if (!this.editable) return
+            this.$emit('action-event', 'select')
+        },
+        // 在线编辑报表
+        handleEdit (index) {
+            this.$emit('action-event', 'edit', index, this.value[index] || this.value, this.operation_status)
+        },
+        handleReselect (index) {
+            if (!this.editable) return
+            if (this.uploadType === 'attachment') {
+                this.$emit('action-event', 'reselect', index)
+            } else {
+                this.$refs.defaultReselectUpload.$refs['upload-inner'].handleClick()
+                this.defaultSelectIndex = index
+            }
+        },
+        handleRemove (index) {
+            if (!this.editable) return
+            this.$emit('action-event', 'remove', index)
+        },
+        handleDownload (index) {
+            this.$emit('action-event', 'download', index)
+        },
+        handlePreview (index) {
+            this.$emit('action-event', 'preview', index)
+        },
+        // 默认上传模块
+        httpRequest (options) {
+            return uploadFile(options.file, {})
+        },
+        handleSuccess (response, file, fileList) {
+            this.fileList = fileList
+            this.emitCallback(fileList, file)
+        },
+        emitCallback (list, file) {
+            let data = this.multiple ? [] : {}
+            if (this.multiple) {
+                data = this.getFileDataList(list)
+            } else {
+                data = file.response.data
+            }
+            this.$emit('action-event', 'confirm', data)
+        },
+        getFileDataList (fileList) {
+            if (this.$utils.isEmpty(fileList)) {
+                return []
+            }
+            return fileList.map((file) => {
+                return file.response.data
+            })
+        },
+        handleError () {
+            // TODO:
+        },
+        beforeUpload (file) {
+            if (this.limit && this.limit === 0) {
+                this.$message({
+                    message: '上传文件个数不能为0,请重新设置',
+                    type: 'warning'
+                })
+                return false
+            }
+            if (this.fileSize && file.size > this.fileSize) {
+                this.$message.closeAll()
+                this.$message({
+                    message: `上传文件的尺寸大于${this.$utils.formatSize(this.fileSize, 2, ['B', 'K', 'M', 'G', 'TB'])}`,
+                    type: 'warning'
+                })
+                return false
+            }
+            if (this.accept && !this.fileExtType(file)) {
+                this.$message.closeAll()
+                this.$message({
+                    message: '不允许的文件类型',
+                    type: 'warning'
+                })
+                return false
+            }
+        },
+        /**
+         * 文件类型的检测
+         */
+        fileExtType (file) {
+            const accept = this.accept
+            const acceptTypes = this.acceptTypes
+            const fileTypes = this.fileTypes
+            const arr = file.name.split('.')
+            const result = arr[arr.length - 1]
+            let type = ''
+            this.targetExt = false
+            for (const i in acceptTypes) {
+                if (acceptTypes[i] === accept) {
+                    type = i
+                }
+            }
+            if (type !== '' && this.accept !== '*') {
+                // 现存的附件类型
+                const targetFileTypes = fileTypes[type]
+                this.targetExt = targetFileTypes.includes(result)
+            } else {
+                if (this.accept === '*') {
+                    // 不限制
+                    this.targetExt = true
+                } else {
+                    // 自定义
+                    const targetFileTypes = this.accept.split(',')
+                    this.targetExt = targetFileTypes.includes('.' + result)
+                }
+            }
+            return this.targetExt
+        },
+        handleReselectSuccess (response, file, fileList) {
+            this.fileList = fileList
+            const targetFile = file.response.data
+            var data = this.value
+            if (this.multiple) {
+                data.splice(this.defaultSelectIndex, 1, targetFile)
+            } else {
+                data = targetFile
+            }
+            this.$emit('action-event', 'confirm', data)
+        },
+        updateSort ({ to, from, item, clone, oldIndex, newlndex }) {
+            // console.log(to, from, item, clone, oldIndex, newlndex)
+            console.log(this.value)
+            console.log(this.sortList)
+        }
     }
-  }
 }
 </script>

+ 10 - 5
src/business/platform/file/uploader/online.vue

@@ -2,7 +2,10 @@
     <div :style="{ height: height }">
         <el-form :model="form" :inline="true" @keyup.enter.native="onSearch" @submit.native.prevent>
             <el-form-item label="文件名" prop="name">
-                <el-input v-model="form.name" placeholder="文件名" @keyup.enter.native="onSearch" />
+                <el-input v-model="form.name" placeholder="请输入文件名" clearable @keyup.enter.native="onSearch" />
+            </el-form-item>
+            <el-form-item label="扩展名" prop="ext">
+                <el-input v-model="form.ext" placeholder="请输入扩展名" clearable @keyup.enter.native="onSearch" />
             </el-form-item>
             <el-form-item>
                 <el-button type="primary" @click="onSearch">查询</el-button>
@@ -40,7 +43,7 @@
                 </template>
             </el-table-column>
             <el-table-column label="文件名" prop="fileName" />
-            <el-table-column label="扩展名" prop="ext" />
+            <el-table-column label="扩展名" prop="ext" width="100px" />
         </el-table>
         <el-pagination
             :current-page="currentPage"
@@ -82,14 +85,15 @@
                 pkKey: 'id',
                 currentPage: 0,
                 pageSizes: [10, 20, 50, 100],
-                pageSize: 20,
+                pageSize: 10,
                 totalKey: 'totalCount',
                 pageKey: 'page',
                 pageCountKey: 'totalPages',
                 selectionRow: true,
                 format: true,
                 form: {
-                    name: ''
+                    name: '',
+                    ext: ''
                 },
                 fileList: [],
                 multipleSelection: [],
@@ -262,7 +266,8 @@
             getSearcFormData() {
                 return ActionUtils.formatParams(
                     {
-                        'Q^FILE_NAME_^SL': this.form.name
+                        'Q^FILE_NAME_^SL': this.form.name,
+                        'Q^EXT_^SL': this.form.ext
                     },
                     this.pagination,
                     this.sorts

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

@@ -358,7 +358,7 @@
             this.timer = setInterval(() => {
                 // this.getMessage()
                 this.getData(this.activeTab)
-            }, 10 * 1000)
+            }, 30 * 1000)
         },
         beforeDestroy() {
             clearInterval(this.timer)

+ 23 - 24
src/views/system/dashboard/page.vue

@@ -8,7 +8,7 @@
         class="ibps-desktop-page"
         @scroll="({ x, y }) => { scrollTop = y }"
     >
-        <newHome v-if="cronTask.length" :plan="cronTask" @handleApprove="handleApprove" @handleUnreadMessage="handleUnreadMessage">
+        <newHome v-if="cronTask" :plan="cronTask" @handleApprove="handleApprove" @handleUnreadMessage="handleUnreadMessage">
             <template slot="myslot">
                 <el-upload
                     style="display: inline-block"
@@ -24,10 +24,10 @@
                 </el-upload>
 
                 <el-upload
+                    v-if="showRepost"
                     style="display: inline-block; margin-left: 10px"
                     class="upload-demo"
                     :action="reportPath"
-                    v-if="showRepost"
                     :headers="headers"
                     :before-upload="ReportBeforeUpload"
                     :show-file-list="false"
@@ -44,9 +44,7 @@
                     style="display: inline-block; margin-left: 10px"
                     icon="el-icon-download"
                     @click="downloadData()"
-                >
-                    下载桌面应用</el-button
-                >
+                >下载桌面应用</el-button>
             </template>
         </newHome>
         <ibps-back-to-top
@@ -154,7 +152,8 @@
 <script>
     import { getMyDesktop } from '@/api/platform/desktop/myLayout'
     import { initColumn, isInit, getComponents } from './components'
-    import { BASE_API, BUSINESS_BASE_URL } from '@/api/baseUrl' //引用导出地址
+    // 引用导出地址
+    import { BASE_API, BUSINESS_BASE_URL } from '@/api/baseUrl'
     //  网格布局组件
     import { GridLayout, GridItem } from 'vue-grid-layout'
     import IbpsBackToTop from '@/components/ibps-back-to-top'
@@ -170,7 +169,7 @@
     import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
 
     const _import = require('@/utils/util.import.' + process.env.NODE_ENV)
-    let cronTask = []
+    let cronTask = null
     export default {
         components: {
             'ibps-news-dialog': IbpsNewsDialog,
@@ -215,7 +214,6 @@
 
                 bpmnFormrenderDialogVisible: false, // 流程
                 defId: '',
-                taskId: '',
                 instanceId: '',
                 layoutIndex: '',
                 initInterval: null,
@@ -251,8 +249,10 @@
                 console.log(error)
             })
         },
-        mounted() {
-            if ('isNormal' == localStorage.getItem('statistic')) this.showRepost = false
+        mounted () {
+            if (localStorage.getItem('statistic') === 'isNormal') {
+                this.showRepost = false
+            }
             this.initLoading = false
             this.initData()
         },
@@ -265,10 +265,10 @@
                 this.getPeriodTask()
             }
             StatisticsData().then(data => {
-                //将参数替换成对应参数
+                // 将参数替换成对应参数
                 // if (data.state === 200 && data.variables.data.length > 0) {
-                //     let h = this.$createElement,
-                //         cont = data.variables.data
+                //     const h = this.$createElement
+                //     const cont = data.variables.data
                 //     for (let i = 0; i < cont.length; i++) {
                 //         window.setTimeout(() => {
                 //             this.infoMessage[i] = this.$notify.info({
@@ -279,7 +279,7 @@
                 //                     h('span', null, '任务内容: '),
                 //                     h('span', { style: 'color: #FF8C00;font-size:12px;' }, cont[i].ding_shi_ren_wu_n),
                 //                     h('br'),
-                //                     h('el-button',{
+                //                     h('el-button', {
                 //                         attrs: {
                 //                             size: 'mini',
                 //                             plain: true
@@ -539,8 +539,8 @@
                 }
             },
             // 获取所有用户id及姓名存储到store中
-            getUsersList() {
-                let usersList = this.$store.getters.usersList
+            getUsersList () {
+                const usersList = this.$store.getters.usersList
                 if (usersList.length) {
                     return
                 } else {
@@ -559,12 +559,11 @@
                 const sql = `select * from t_zqswtxb where shi_fou_ti_xing_ = '是' and zhi_xing_ren_yuan like '%${userId}%' order by field(zhi_xing_zhou_qi_, '1次/天', '1次/周', '1次/月', '1次/季度', '1次/半年', '1次/年')`
                 curdPost('sql', sql).then(res => {
                     const { data = [] } = res.variables || {}
-                    if (!data.length) {
-                        return
+                    if (data.length) {
+                        this.showMsg(data)
                     }
-                    this.showMsg(data)
                 }).catch(error => {
-                    this.$message.error('获取所有用户信息失败!')
+                    this.$message.error('获取周期事务信息失败!')
                     console.log(error)
                 })
             },
@@ -594,26 +593,26 @@
                     attrs: {
                         size: 'mini',
                         type: 'primary',
-                        plain: true,
+                        plain: true
                     },
                     on: {
                         click: () => {
                             this.doNotShowToday()
                         }
                     }
-                }, '今日不再提示');
+                }, '今日不再提示')
                 const confirmBtn = h('el-button', {
                     attrs: {
                         size: 'mini',
                         type: 'success',
-                        plain: true,
+                        plain: true
                     },
                     on: {
                         click: () => {
                             this.infoMessage.close()
                         }
                     }
-                }, '确认');
+                }, '确认')
                 Object.keys(result).forEach(key => {
                     // msg.push(h('p', {style: {
                     //     'font-weight': 'bold',