Преглед на файлове

Merge branch '17025' of http://119.23.210.103:3000/wy/lh_firm_former into 17025

wy преди 1 година
родител
ревизия
2efe773408

BIN
src/assets/images/icons/closeFile.png


BIN
src/assets/images/icons/hadColetc.png


BIN
src/assets/images/icons/noColect.png


BIN
src/assets/images/icons/openFile.png


BIN
src/assets/images/icons/parse.png


BIN
src/assets/images/icons/play.png


BIN
src/assets/images/icons/word.png


+ 228 - 0
src/views/component/fileTraining/fileDialog.vue

@@ -0,0 +1,228 @@
+<template>
+    <el-dialog
+        width="80%"
+        title="文件信息"
+        :visible="innerVisible"
+        append-to-body
+        :close-on-click-modal="false"
+        @close="closeDiag"
+    >
+        <!--  close-on-click-modal="false"//禁止点击遮罩层关闭弹窗。 -->
+        <!-- $emit('update-inner-visible', false) -->
+        <el-row class="row">
+            <el-col :span="12">
+                <el-row>
+                    <el-col :span="5" class="nameClass">文件名称:</el-col>
+                    <el-col :span="19" class="contentClass">{{ digData?digData.FILE_NAME_:'/' }}</el-col>
+                </el-row>
+            </el-col>
+            <el-col :span="12">
+                <el-row>
+                    <el-col :span="5" class="nameClass">版本号:</el-col>
+                    <el-col :span="19" class="contentClass">{{ digData?(digData.ban_ben_?digData.ban_ben_:(digData.xiu_ding_ban_ben_?digData.xiu_ding_ban_ben_:'/')):'/' }}</el-col>
+                </el-row>
+            </el-col>
+        </el-row>
+        <el-row class="row">
+            <el-col :span="12">
+                <el-row>
+                    <el-col v-if="digData.cao_zuo_lei_xing_=='新增'" :span="5" class="nameClass">创建人:</el-col>
+                    <el-col v-else :span="5" class="nameClass">修订人:</el-col>
+                    <el-col :span="19" class="contentClass">{{ digData?(digData.fileInfos.CREATOR_NAME_?digData.fileInfos.CREATOR_NAME_:'/'):'/' }}</el-col>
+                </el-row>
+            </el-col>
+            <el-col :span="12">
+                <el-row>
+                    <el-col v-if="digData.cao_zuo_lei_xing_=='新增'" :span="5" class="nameClass">创建日期:</el-col>
+                    <el-col v-else :span="5" class="nameClass">修订日期:</el-col>
+                    <el-col :span="19" class="contentClass">{{ digData?(digData.fileInfos.CREATE_TIME_?formattedTimestamp(digData.fileInfos.CREATE_TIME_):'/'):'/' }}</el-col>
+                </el-row>
+            </el-col>
+        </el-row>
+        <el-row v-if="digData.cao_zuo_lei_xing_=='修订'" class="row">
+            <el-col :span="3" class="nameClass">修订内容:</el-col>
+            <el-col :span="21" class="contentClass">{{ digData.xiu_ding_nei_rong?digData.xiu_ding_nei_rong:'/' }}</el-col>
+        </el-row>
+        <el-row v-if="digData.cao_zuo_lei_xing_=='修订'" class="row">
+            <el-col :span="3" class="nameClass">修订原因:</el-col>
+            <el-col :span="21" class="contentClass">{{ digData.yuan_yin_?digData.yuan_yin_:'/' }}</el-col>
+        </el-row>
+        <el-table
+            :data="listData"
+            stripe
+            border
+            max-height="380px"
+            highlight-current-row
+            style="width: 100%;padding:10px;"
+        >
+            <el-table-column
+                label="用户"
+                width="300"
+            >
+                <template slot-scope="scope">
+                    <span style="margin-left: 10px">{{ changUserName(scope.row.create_by_) }}</span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                label="最近阅读时间"
+                width="300"
+            >
+                <template slot-scope="scope">
+                    <span style="margin-left: 10px">{{ formattedTimestamp(scope.row.create_time_) }}</span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                label="累计阅读时长"
+            >
+                <template slot-scope="scope">
+                    <span style="margin-left: 10px">{{ formatDuration(scope.row.shi_chang_) }}</span>
+                </template>
+            </el-table-column>
+        </el-table>
+        <el-pagination
+            style="margin-top: 5px; padding-bottom: 10px"
+            :current-page="currentPage"
+            :page-sizes="[10, 20,30, 50,100]"
+            :page-size="pageSize"
+            layout="prev,pager,next,jumper,sizes,->,total"
+            :total="showList.length"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+        />
+    </el-dialog>
+</template>
+<script>
+export default {
+    props: {
+        showList: {
+            type: Array,
+            default: () => []
+        },
+        digData: {
+            type: Object,
+            default: () => {}
+        },
+        innerVisible: {
+            type: Boolean,
+            default: false
+        },
+        fileIndex: {
+            type: Number }
+    },
+    data () {
+        const { userList } = this.$store.getters
+        return {
+            userList: userList,
+            listData: [],
+            currentPage: 1,
+            pageSize: 10,
+            timer: null,
+            controlShow: false
+        }
+    },
+
+    watch: {
+        innerVisible: {
+            immediate: true,
+            handler (val) {
+                if (val) {
+                    this.updateShowList()
+                }
+            }
+        }
+    },
+    mounted () {
+        this.setInterfaceTime()
+    },
+    methods: {
+        updateShowList () {
+            const start = (this.currentPage - 1) * this.pageSize
+            const end = start + this.pageSize
+            this.listData = this.showList.slice(start, end)
+        },
+        handleSizeChange (val) {
+            this.pageSize = val
+            this.updateShowList()
+        },
+        handleCurrentChange (val) {
+            this.currentPage = val
+            this.updateShowList()
+        },
+        // 定时器
+        setInterfaceTime () {
+            this.timer = setTimeout(() => {
+                this.$emit('pause')
+            }, 180000)
+        },
+        formattedTimestamp (timestamp) {
+            const date = new Date(timestamp)
+            // 获取年月日时分秒
+            const year = date.getFullYear()
+            const month = String(date.getMonth() + 1).padStart(2, '0')
+            const day = String(date.getDate()).padStart(2, '0')
+            const hours = String(date.getHours()).padStart(2, '0')
+            const minutes = String(date.getMinutes()).padStart(2, '0')
+            const seconds = String(date.getSeconds()).padStart(2, '0')
+
+            // 格式化日期
+            return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
+        },
+
+        // id转name
+        changUserName (id) {
+            const user = this.userList.find(item => item.userId === id)
+            if (user) {
+                return user.userName
+            }
+        },
+        // 查阅时长的转化
+        formatDuration (data) {
+            // 定义变量
+            let hours = 0
+            let minutes = 0
+            let seconds = data
+
+            // 处理大于 60 分钟的情况
+            if (data >= 3600) { // 3600 秒 = 1 小时
+                hours = Math.floor(data / 3600)
+                data %= 3600
+            }
+
+            // 处理大于 60 秒的情况
+            if (data >= 60) {
+                minutes = Math.floor(data / 60)
+                seconds = data % 60
+            }
+
+            // 格式化输出
+            const formattedHours = hours > 0 ? `${hours}小时` : ''
+            const formattedMinutes = minutes > 0 ? `${minutes}分钟` : ''
+            const formattedSeconds = seconds > 0 ? `${seconds}秒` : ''
+
+            // 返回格式化的字符串
+            return `${formattedHours}${formattedMinutes}${formattedSeconds}`
+        },
+        closeDiag () {
+            this.$emit('update-inner-visible', false)
+            this.$emit('start')
+            clearTimeout(this.timer)
+        }
+    }
+
+}
+</script>
+<style scoped lang="scss">
+        .row{
+            padding: 1% 2%;
+           .nameClass{
+            font-size: 16px;
+            color: #555;
+            font-weight: 600;
+           }
+           .contentClass{
+            font-size: 16px;
+            color: #777;
+           }
+        }
+</style>
+

+ 802 - 0
src/views/component/fileTraining/index.vue

@@ -0,0 +1,802 @@
+<!--
+ * @Descripttion: POCT文件培训
+ * @version: 1.0
+ * @Author: Liu_jiaYin
+ * @Date: 2024-03-01 13:47:32
+ * @LastEditors: Do not edit
+ * @LastEditTime: 2024-04-26 16:04:02
+-->
+<template>
+    <!-- <el-dialog
+        :visible.sync="dialogVisible"
+        fullscreen
+        :title="title"
+        append-to-body
+        custom-class="ibps-file-preview-dialog"
+    >
+        <div>
+            <fView v-if="refresh" ref="fvView" :option-file="optionFile" :operation_status="operation_status" @hadLoadedFile="hadLoadedFile" />
+        </div>
+    </el-dialog> -->
+
+    <!--个人修改  -->
+    <el-dialog
+        :visible.sync="dialogVisible"
+        fullscreen
+        append-to-body
+        custom-class="ibps-file-preview-dialog"
+        :show-close="false"
+    >
+        <template #title>
+            <el-row>
+                <el-col :span="11" class="titleHander">{{ title }}</el-col>
+                <el-col
+                    :span="3"
+                    class="read"
+                    style="text-align: right"
+                >阅读量:{{ lookNum }}</el-col>
+                <el-col :span="10" style="text-align: right">
+                    <el-popover
+                        v-model="deleteVisible"
+                        placement="top"
+                        width="160"
+                    >
+                        <p>文件删除之后将不能查看,确定要删除该文件吗?</p>
+                        <div style="text-align: right; margin: 0">
+                            <el-button
+                                size="mini"
+                                type="text"
+                                @click="deleteVisible = false"
+                            >取消</el-button>
+                            <el-button
+                                type="primary"
+                                size="mini"
+                                @click="deleteFile"
+                            >确定</el-button>
+                        </div>
+                        <el-button
+                            v-if="deleteShow"
+                            slot="reference"
+                            type="danger"
+                            icon="el-icon-delete"
+                            class="deleteBtn"
+                            @click="deleteVisible = true"
+                        >删除</el-button>
+                    </el-popover>
+                    <el-button
+                        type="primary"
+                        icon="el-icon-view"
+                        @click="lookFile"
+                    >查看文件信息</el-button>
+                    <el-button
+                        type="primary"
+                        icon="el-icon-s-fold"
+                        @click="hideLeft"
+                    >{{ leftContent }}</el-button>
+                    <el-button
+                        v-if="updateShow"
+                        type="primary"
+                        icon="el-icon-download"
+                        @click="updateFile"
+                    >下载文件</el-button>
+                    <el-button
+                        type="danger"
+                        icon="el-icon-close"
+                        @click="closeDialog"
+                    >关闭</el-button>
+                </el-col>
+            </el-row>
+        </template>
+        <div>
+            <el-row>
+                <el-col v-if="leftShow" :span="4" class="left-content">
+                    <div class="left-title">文件修订历史</div>
+                    <el-timeline :reverse="reverse">
+                        <el-timeline-item
+                            v-for="(activity, index) in leftData"
+                            :key="index"
+                            :timestamp="'发布日期:' + activity.fa_bu_shi_jian_"
+                            :type="index === activeIndex ? type : ''"
+                            @click.stop.native="toggleActive(activity, index)"
+                        >
+                            <div class="timeline-content">
+                                <el-tooltip
+                                    class="itemStyle"
+                                    effect="dark"
+                                    placement="right-end"
+                                    :content="showContent(activity, index)"
+                                >
+                                    <div>
+                                        <!-- <div>版本号:{{ activity.ban_ben_ }}/修订人:{{ getUserName(activity.bian_zhi_ren_) }}</div> -->
+                                        <el-collapse
+                                            v-model="activeName"
+                                            accordion
+                                        >
+                                            <el-collapse-item :name="index + 1">
+                                                <template slot="title">
+                                                    <div>
+                                                        版本号:{{
+                                                            activity.ban_ben_
+                                                        }}&nbsp;&nbsp;&nbsp;&nbsp;修订人:{{
+                                                            getUserName(
+                                                                activity.bian_zhi_ren_
+                                                            )
+                                                        }}
+                                                    </div>
+                                                </template>
+                                                <!-- 附件 -->
+                                                <div
+                                                    v-if="
+                                                        activity.zhen_fu_jian_
+                                                    "
+                                                >
+                                                    <ibps-attachment
+                                                        v-model="
+                                                            activity.zhen_fu_jian_
+                                                        "
+                                                        allow-download
+                                                        download
+                                                        multiple
+                                                        accept="*"
+                                                        store="id"
+                                                        readonly
+                                                    />
+                                                </div>
+                                                <div v-else>
+                                                    <i
+                                                        class="el-icon-warning-outline"
+                                                        type="warning"
+                                                    >
+                                                        暂无附件</i>
+                                                </div>
+                                            </el-collapse-item>
+                                        </el-collapse>
+                                    </div>
+                                </el-tooltip>
+                            </div>
+                        </el-timeline-item>
+                    </el-timeline>
+                </el-col>
+                <el-col
+                    :span="computedSpan"
+                ><fView
+                    v-if="refresh"
+                    ref="fvView"
+                    :option-file="optionFile"
+                    :operation_status="operation_status"
+                    :copy="updateShow"
+                    @hadLoadedFile="hadLoadedFile"
+                /></el-col>
+            </el-row>
+        </div>
+        <!-- 查看文件信息弹窗 @close="closeDialog"-->
+        <FileDialog
+            v-if="innerVisible"
+            :show-list="showList"
+            :dig-data="digData"
+            :inner-visible="innerVisible"
+            :file-index="fileIndex"
+            @pause="pauseTimer"
+            @start="startTimer"
+            @update-inner-visible="updateInnerVisible"
+        />
+    </el-dialog>
+</template>
+<script>
+/**
+ * 文件预览
+ * 1、'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'  类型支持
+ * 2、图片支持缩放
+ * 3、音频,语音支持
+ * ==================
+ * 下一版本支持
+ * 1、pdf支持缩放
+ * 2、音频,语音多格式支持
+ * 3、压缩包支持
+ */
+import fView from '@/business/platform/file/attachment/editFile/fView.vue'
+import { SYSTEM_URL, BASE_API } from '@/api/baseUrl'
+import ViewFile from '@/views/viewFile/index.vue'
+import Template from '@/business/platform/form/form-print/template.vue'
+import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
+import FileDialog from './fileDialog.vue'
+import IbpsAttachment from '@/business/platform/file/attachment/selector'
+// import * as selectbox from 'bpmn-js-properties-panel/lib/factory/SelectEntryFactory'
+// import func from 'vue-editor-bridge'
+export default {
+    name: 'file-training',
+    components: {
+        fView,
+        ViewFile,
+        Template,
+        FileDialog,
+        'ibps-attachment': IbpsAttachment
+    },
+    props: {
+        visible: {
+            type: Boolean,
+            default: false
+        },
+        // fileInfos: {
+        //     type: Object,
+        //     default: () => {}
+        // },
+        fileInfos: {
+            type: Array,
+            default: () => {}
+        }
+        // template: {
+        //     type: Object,
+        //     default: () => {}
+        // }
+    },
+    data () {
+        const { userList, userId, role, isSuper } = this.$store.getters
+        // const userId = this.$store.getters.userInfo.employee.id// 本人修改
+
+        return {
+            activeName: 1,
+            updateShow: false,
+            type: 'success',
+            curFileName: '',
+            curZid: '',
+            timeId: '',
+            dialogVisible: false,
+            operation_status: 'fileTraining',
+            title: '',
+            browseTime: 0, // 浏览时长初始值为 0
+            clearTimeSet: null,
+            optionFile: {},
+            tmpId: '',
+            upFunc: () => {},
+            height: 0,
+            out: false, // 记录鼠标是否离开过被监听的位置,未离开过则startTimer不启用
+            hadLoad: false,
+            refresh: false,
+            // 本人修改
+            leftShow: true,
+            scrollTimeout: null,
+            reverse: false,
+            fileInfo: '',
+            fileJie: '',
+            leftData: [],
+            activeIndex: 0,
+            userList: userList,
+            userId: userId,
+            innerVisible: false,
+            currentPage: 1,
+            pageSize: 10,
+            lookNum: null,
+            showList: [],
+            digData: null,
+            paused: false,
+            role: role,
+            isSuper: isSuper,
+            deleteVisible: false,
+            deleteShow: false,
+            leftContent: '隐藏修订历史'
+        }
+    },
+    // 本人修改
+    computed: {
+        computedSpan () {
+            return this.leftShow ? 20 : 24
+        },
+        fileIndex () {
+            if (this.leftData.length <= 0) {
+                return 0
+            }
+            return this.leftData.findIndex((i) => i === this.digData)
+        }
+    },
+    watch: {
+        visible: {
+            immediate: true,
+            handler (val) {
+                this.digData = this.leftData[0]
+            }
+        },
+        leftShow: {
+            immediate: true, // 强制执行一次
+            handler (val) {
+                if (val) {
+                    this.leftContent = '隐藏修订历史'
+                    return
+                }
+                this.leftContent = '显示修订历史'
+            }
+        },
+        // 本人修改
+        fileInfos: {
+            handler (newVal) {
+                this.leftData = newVal
+                const temp = JSON.parse(JSON.stringify(newVal))
+                temp.sort((a, b) => {
+                    return (
+                        new Date(b.fa_fang_shi_jian_).getTime() -
+                        new Date(a.fa_fang_shi_jian_).getTime()
+                    )
+                })
+                if (newVal !== temp) {
+                    this.leftData = temp
+                }
+                temp.forEach((val) => {
+                    this.fileShow(temp[0])
+                })
+                // newVal.forEach(val => {
+                //     this.fileShow(val)
+                // })
+            },
+            deep: true, // 深度监听,确保对象属性变化也能触发(本人修改)
+            immediate: true
+        },
+
+        browseTime: {
+            handler: function (val, oldVal) {
+                if (this.curFileName) {
+                    this.title = `文件:《 ${this.curFileName} 》,查阅时长:${val}秒`
+                } else {
+                    this.title = `文件:《 ${this.leftData[0]?.FILE_NAME_} 》,查阅时长:${val}秒`
+                }
+                if (!this.lookNum) {
+                    if (this.leftData[0]?.id) {
+                        this.checkNum(this.leftData[0])
+                    }
+                }
+            },
+            immediate: true
+        },
+        dialogVisible: {
+            handler: function (val, oldVal) {
+                if (!val) {
+                    this.closeDialog()
+                }
+            }
+        }
+    },
+    beforeDestroy () {
+        this.fileType = ''
+        this.option = {}
+        // 本人修改
+        this.removeMouseMoveListener()
+    },
+    mounted () {
+        this.height = this.getDialogHeightHeight()
+        // 页面切换时改变计时状态
+        document.addEventListener('visibilitychange', this.handlePageChange)
+        this.checkDialogBody()
+        const roleKey = ['xtgljs']
+        const curRole = this.role.map((i) => i.alias)
+        const isPower = curRole.some((item) => roleKey.includes(item))
+        this.deleteShow = !!(isPower || this.isPower)
+        const hasRole = localStorage.getItem('hasHighRole') === '1'
+        if (this.isSuper || hasRole) {
+            this.updateShow = true
+        }
+    },
+    methods: {
+        getUserName (data) {
+            const user = this.userList.find((item) => item.userId === data)
+            return user ? user.userName : '未知用户'
+        },
+        showContent (activity, index) {
+            if (activity.cao_zuo_lei_xing_ === '新增') {
+                return '第一版本'
+            }
+            return activity.xiu_ding_nei_rong
+                ? activity.xiu_ding_nei_rong
+                : '无修订原因'
+        },
+
+        handlePageChange () {
+            if (document.visibilityState === 'hidden') {
+                this.pauseTimer()
+            } else {
+                this.startTimer()
+            }
+        },
+
+        closeDialog () {
+            // 关闭时存入查阅时间
+            if (this.browseTime && this.browseTime > 0 && this.timeId) {
+                this.handleUpdate()
+            }
+            this.$emit('colseVisible', false)
+            const fvView = this.$refs.fvView
+            // 销毁子组件方法
+            fvView.destoryZiComponent()
+            if (this.browseTime >= 30) {
+                this.upFunc(this.tmpId, this.browseTime)
+            }
+
+            // 针对关闭窗口或者浏览器的
+            if (this.clearTimeSet != null) {
+                clearInterval(this.clearTimeSet)
+                this.clearTimeSet = null
+            }
+            this.leftShow = true
+            this.out = false
+            this.browseTime = 0
+            // this.curFileName = ''// 本人添加
+            // this.lookNum = null
+            // this.showList = []
+            // this.leftData = []
+            // this.digData = null
+        },
+        hadLoadedFile (v) {
+            // 计时开始,添加查看记录
+            if (!this.curZid) {
+                this.handleAdd(this.leftData[0]?.zId, 0)
+            }
+            this.setBrowseTime()
+            this.hadLoad = true
+        },
+        setBrowseTime () {
+            // 设置定时器
+            this.clearTimeSet = setInterval(() => {
+                this.browseTime++
+            }, 1000)
+        },
+        getDialogHeightHeight () {
+            return (
+                (document.documentElement.clientHeight ||
+                    document.body.clientHeight) -
+                60 +
+                'px'
+            )
+        },
+        startTimer () {
+            if (
+                this.dialogVisible &&
+                this.hadLoad &&
+                this.out &&
+                this.clearTimeSet == null
+            ) {
+                this.clearTimeSet = setInterval(() => {
+                    this.browseTime++
+                }, 1000)
+            }
+        },
+        pauseTimer () {
+            if (this.dialogVisible) {
+                this.out = true
+                clearInterval(this.clearTimeSet)
+                this.clearTimeSet = null
+            }
+        },
+        // 本人修改
+        // id转换
+        async idChange (id) {
+            const sql = `select id_ FROM t_wjxxb WHERE shu_ju_lai_yuan_ = '${id}'`
+            return new Promise((resolve, reject) => {
+                this.$common
+                    .request('sql', sql)
+                    .then((res) => {
+                        const { data = [] } = res.variables || {}
+                        const firstId = data[0]?.id_
+                        resolve(firstId) // 解析 Promise 时返回 firstId
+                    })
+                    .catch((error) => {
+                        reject(error) // 捕获错误并拒绝 Promise
+                    })
+            })
+        },
+
+        toggleActive (activity, index) {
+            if (this.activeIndex === index) {
+                return
+            }
+            // 切换文件修订历史时,保存上一个文件查看记录,新增当前文件查看记录
+            if (this.browseTime && this.browseTime > 0 && this.timeId) {
+                this.handleUpdate()
+                this.handleAdd(this.curZid || this.leftData[0]?.zId, 0)
+            }
+            this.activeIndex = index
+            this.digData = activity
+            this.curZid = activity.zid
+            this.fileShow(activity)
+            if (this.browseTime >= 30) {
+                this.upFunc(this.tmpId, this.browseTime)
+            }
+
+            clearInterval(this.clearTimeSet)
+            this.browseTime = 0
+            this.curFileName = activity.FILE_NAME_
+            this.checkNum(activity) // 阅读量
+            // this.$forceUpdate()// 触发监听器
+        },
+        // 阅读量函数
+        async checkNum (activity) {
+            const sql = `select t_wjcyjl.* from t_wjcyjl
+                INNER JOIN t_wjxxb ON t_wjcyjl.parent_id_ = t_wjxxb.id_
+                WHERE t_wjxxb.shu_ju_lai_yuan_ = '${activity.id}' order by create_time_ desc`
+            // const sql1 = `select * from t_wjcyjl where parent_id_= '${activity.id}' order by create_time_ desc`
+            await this.$common.request('sql', sql).then((res) => {
+                const { data = [] } = res.variables || {}
+                this.lookNum = data.length
+                this.showList = data
+            })
+        },
+        handleAdd (fileId, time) {
+            const addParams = {
+                tableName: 't_wjcyjl',
+                paramWhere: [
+                    {
+                        bian_zhi_ren_: this.userId,
+                        bian_zhi_shi_jian: this.$common.getDateNow(19),
+                        parent_id_: fileId,
+                        shi_chang_: time
+                    }
+                ]
+            }
+            curdPost('add', addParams).then((res) => {
+                // this.refreshData()
+                const { cont = [] } = res.variables || {}
+                this.timeId = cont[0]?.id_ || ''
+            })
+        },
+        handleUpdate () {
+            const updateParams = {
+                tableName: 't_wjcyjl',
+                updList: [
+                    {
+                        where: {
+                            id_: this.timeId
+                        },
+                        param: {
+                            // shi_chang_: this.browseTime
+                            shi_chang_: 20
+                        }
+                    }
+                ]
+            }
+            curdPost('update', updateParams).then((res) => {})
+        },
+        hideLeft () {
+            this.leftShow = !this.leftShow
+        },
+
+        async lookFile () {
+            // console.log(document.querySelector('iframe').contentWindow.document)
+            // console.log(document.querySelector('iframe').contentWindow.document.body.innerHTML);
+            if (this.digData) {
+                await this.checkNum(this.digData)
+            } else {
+                this.digData = this.leftData[0]
+                await this.checkNum(this.digData)
+            }
+            this.innerVisible = true
+        },
+        a () {
+            fetch(this.optionFile.url)
+                .then((response) => {
+                    if (response.ok) {
+                        // 如果响应状态码为 200-299,则创建下载链接
+                        const a = document.createElement('a')
+                        a.href = this.optionFile.url
+                        a.download = this.optionFile.data.fileName
+                        document.body.appendChild(a)
+                        a.click()
+                        a.remove()
+                    } else {
+                        // 如果响应状态码不是 200-299,则显示错误消息
+                        this.$message({
+                            message: '文件未找到,请联系管理员',
+                            type: 'warning'
+                        })
+                        console.error(
+                            '文件未找到:',
+                            response.status,
+                            response.statusText
+                        )
+                    }
+                })
+                .catch((error) => {
+                    // 捕获网络请求错误
+                    this.$message({
+                        message: '网络请求失败,请联系管理员',
+                        type: 'warning'
+                    })
+                    console.error('网络请求失败:', error)
+                })
+        },
+        deleteFile () {
+            this.deleteVisible = false
+            // const roleKey = ['xtgljs', 'syszr', 'wjgly', 'wjglzzc']
+            const roleKey = ['xtgljs']
+            const curRole = this.role.map((i) => i.alias)
+            const isPower = curRole.some((item) => roleKey.includes(item))
+            if (this.isSuper || isPower) {
+                const deleteParams = {
+                    tableName: 't_wjxxb',
+                    paramWhere: { id_: this.leftData[0].zId }
+                }
+                curdPost('delete', deleteParams).then(() => {
+                    this.$message({
+                        message: '删除成功!',
+                        type: 'warning'
+                    })
+                    this.dialogVisible = false
+                })
+                return
+            }
+            this.$message({
+                message: '您还没有权限,请联系管理员',
+                type: 'warning'
+            })
+        },
+        // closeDialog1 (val) {
+        //     this.innerVisible = val
+        // },
+        updateFile () {
+            const hasRole = localStorage.getItem('hasHighRole') === '1'
+            // const roleKey = ['xtgljs', 'wjglzzc', 'wjgly', 'zhsfzr']
+            // const curRole = this.role.map(i => i.alias)
+            // const isPower = curRole.some(i => roleKey.includes(i))
+            if (this.isSuper || hasRole) {
+                const a = document.createElement('a')
+                a.href = this.optionFile.url
+                a.download = this.optionFile.data.fileName
+                document.body.appendChild(a)
+                a.click()
+                a.remove()
+                return
+            }
+            this.$message({
+                message: '您还没有权限,请联系管理员',
+                type: 'warning'
+            })
+        },
+        fileShow (val) {
+            return new Promise((resolve, reject) => {
+                try {
+                    this.dialogVisible = true
+                    this.title = `文件:《${val.FILE_NAME_}》`
+                    this.idChange(val.id).then((res) => {
+                        this.tmpId = res
+                        if (val.func) {
+                            this.upFunc = val.func
+                        }
+                        const data = {
+                            ext: val.fileInfos.EXT_,
+                            fileName: val.fileInfos.FILE_NAME_,
+                            id: val.fileInfos.ID_,
+                            index: 0,
+                            totalBytes: val.fileInfos.TOTAL_BYTES_
+                        }
+
+                        this.optionFile.url = `${this.$onlyofficeApi}/file/download?attachmentId=${data.id}`
+                        this.optionFile.editUrl = `${this.$onlyofficeApi}/file/editCallback?fileName=${data.fileName}&fileType=${data.ext}&type=fileTraining&id=${data.id}`
+                        this.optionFile.title = data.fileName // 文件名称
+                        this.optionFile.fileType = data.ext // 类型
+                        this.optionFile.data = data // 记录编制的位置,需要替换。
+                        this.optionFile.data.index = data.index
+
+                        // 使用 v-if 实现组件刷新功能
+                        this.refresh = false
+                        this.$nextTick(() => {
+                            this.refresh = true
+                            resolve() // 异步操作完成后 resolve
+                        })
+                    })
+                } catch (error) {
+                    reject(error)
+                }
+            })
+        },
+        // 排序函数
+        sortByFabushijianDesc (data) {
+            return data.sort((a, b) => {
+                const dateA = new Date(a.fa_fang_shi_jian_)
+                const dateB = new Date(b.fa_fang_shi_jian_)
+                return dateB - dateA // 降序排序
+            })
+        },
+        formattedTimestamp (timestamp) {
+            const date = new Date(timestamp)
+            // 获取年月日时分秒
+            const year = date.getFullYear()
+            const month = String(date.getMonth() + 1).padStart(2, '0')
+            const day = String(date.getDate()).padStart(2, '0')
+            const hours = String(date.getHours()).padStart(2, '0')
+            const minutes = String(date.getMinutes()).padStart(2, '0')
+            const seconds = String(date.getSeconds()).padStart(2, '0')
+
+            // 格式化日期
+            return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
+        },
+
+        checkDialogBody () {
+            const intervalId = setInterval(() => {
+                if (document.querySelector('iframe')) {
+                    this.dialogBody = document.querySelector('iframe')
+                    this.addMouseMoveListener()
+                    clearInterval(intervalId)
+                }
+            }, 200)
+        },
+        addMouseMoveListener () {
+            if (this.dialogBody && !this.mouseMoveHandler) {
+                this.mouseMoveHandler = () => {
+                    console.log('鼠标移动事件!!!!')
+                }
+                this.dialogBody.addEventListener(
+                    'mousemove',
+                    this.mouseMoveHandler,
+                    true
+                )
+            }
+        },
+        removeMouseMoveListener () {
+            if (this.dialogBody && this.mouseMoveHandler) {
+                this.dialogBody.removeEventListener(
+                    'mousemove',
+                    this.mouseMoveHandler,
+                    true
+                )
+                this.mouseMoveHandler = null
+            }
+        },
+        updateInnerVisible (newVal) {
+            this.innerVisible = newVal
+        }
+    }
+}
+</script>
+<style lang="scss">
+.ibps-file-preview-dialog {
+    width: 80%;
+    z-index: 99999;
+    .el-dialog__body {
+        padding: 0;
+    }
+    .file-type-txt {
+        height: calc(88vh) !important;
+    }
+    .itemStyle:hover {
+        cursor: pointer;
+    }
+    .titleHander,
+    .read {
+        line-height: 32px;
+    }
+    .deleteBtn {
+        margin: 0 10px 0 0;
+    }
+}
+.left-content {
+    .left-title {
+        text-align: left;
+        padding: 15px;
+        font-size: 18px;
+        font-weight: 600;
+    }
+    .el-timeline {
+        padding: 0 15px;
+    }
+    /* 清除分割线 */
+    .el-collapse-item__wrap,
+    .el-collapse-item__header {
+        border-bottom: none !important;
+    }
+    .el-collapse {
+        border: none !important;
+    }
+    .el-collapse-item__header {
+        height: 30px;
+        line-height: 30px;
+    }
+    .el-collapse-item__content {
+        padding: 0px;
+    }
+    .el-timeline-item {
+        padding-bottom: 10px;
+    }
+}
+// .file-read-num{
+//     display: inline-block;
+//     margin-left: 60px;
+// }
+
+</style>
+

+ 1052 - 0
src/views/infosManage/fileIE.vue

@@ -0,0 +1,1052 @@
+<template>
+    <div class="main-container">
+        <!-- 外部 -->
+        <div slot="west">
+            <div class="box">
+                <!-- 选择内外部文件的侧边栏 -->
+                <ibps-type-tree
+                    :width="width"
+                    :height="height"
+                    :category-key="categoryKey"
+                    :has-permission="true"
+                    @node-click="handleNodeClick"
+                    @expand-collapse="handleExpandCollapse"
+                />
+            </div>
+            <ibps-container :margin-left="width + 'px'" class="page">
+                <el-alert
+                    v-if="!show"
+                    :closable="false"
+                    title="请选择点击记录分类菜单进行操作!"
+                    type="warning"
+                    show-icon
+                    style="height: 50px"
+                />
+                <!-- 选择文件,展示在右边 -->
+                <template v-else>
+                    <ibps-crud
+                        key="istree"
+                        ref="crud"
+                        :data="listData"
+                        :toolbars="listConfig.toolbars"
+                        :search-form="listConfig.searchForm"
+                        :pk-key="pkKey"
+                        :columns="listConfig.columns"
+                        :loading="loading"
+                        :pagination="pagination"
+                        :display-field="tableTitle"
+                        :index-row="false"
+                        @sort-change="handleSortChange"
+                        @action-event="handleAction"
+                        @pagination-change="handlePaginationChange"
+                    >
+                        <template slot="position">
+                            <ibps-user-selector
+                                v-model="pos"
+                                type="position"
+                                readonly-text="text"
+                                :multiple="true"
+                            />
+                        </template>
+                        <template
+                            v-if="scope.row.fu_jian_"
+                            slot="file"
+                            slot-scope="scope"
+                        >
+                            <ibps-attachment
+                                v-model="scope.row.fu_jian_"
+                                allow-download
+                                download
+                                multiple
+                                accept="*"
+                                store="id"
+                                readonly
+                            />
+                        </template>
+                        <template
+                            v-if="scope.row.file_info_"
+                            slot="wenjinachayue"
+                            slot-scope="scope"
+                        >
+                            <div>
+                                <!-- <img
+                                    :src="wordPng"
+                                    style="vertical-align: middle; height: 20px;"
+                                > -->
+                                <i class="el-icon-document" />
+                                <el-tag
+                                    type="info"
+                                    style="cursor: pointer"
+                                    @click="handleClickTag(scope.row)"
+                                >{{ scope.row.file_info_ }}</el-tag>
+                            </div>
+                        </template>
+                        <template
+                            v-if="showCaoZuoColumn"
+                            slot="caozuo"
+                            slot-scope="scope"
+                        >
+                            <div
+                                style="color: #1e90ff"
+                                class="hover-hand"
+                                @click="updateDate(scope)"
+                            >
+                                <i
+                                    class="el-icon-edit-outline"
+                                    style="cursor: pointer"
+                                />
+                                <span style="cursor: pointer"> 更新</span>
+                            </div>
+                        </template>
+                        <template
+                            slot="customButton"
+                            slot-scope="{row}"
+                        >
+                            <el-button type="text" icon="el-icon-edit-outline" @click="goEdit(row)">修改</el-button>
+                        </template>
+                    </ibps-crud>
+                </template>
+            </ibps-container>
+            <bpmn-formrender
+                :visible="dialogFormVisible"
+                :template-key="templateKey"
+                :def-id="defId"
+                :pk-value="pkValue"
+                :form-key="formKey"
+                :add-data-cont="addDataCont"
+                @close="closeHandle"
+            />
+
+            <el-dialog
+                :close-on-click-modal="false"
+                :close-on-press-escape="false"
+                :top="'3vh'"
+                :width="'90%'"
+                class="js-custom-dialog"
+                append-to-body
+                :fullscreen="false"
+                :visible.sync="visible"
+            >
+                <iframe
+                    :src="srcUrl"
+                    :height="'100%'"
+                    :width="'100%'"
+                    frameborder="0"
+                    scrolling="no"
+                />
+            </el-dialog>
+            <!-- <file-lookup
+                :visible="dialogVisible"
+                :file-infos="fileInfos"
+            /> -->
+            <file-lookup
+                v-if="dialogVisible"
+                :visible="dialogVisible"
+                :file-infos="fileArray"
+                @colseVisible="colseVisible"
+            />
+        </div>
+        <UpdateFile
+            v-if="dialogFormVisibles"
+            :visidial="dialogFormVisibles"
+            :son-data="sonData"
+            @getcolse="getcolse"
+        />
+        <data-template-formrender-dialog
+            :visible="editDialogVisible"
+            form-key="ywyxjlb"
+            :pk-value="editPkValue"
+            :toolbars="editToolbars"
+            :readonly="false"
+            :add-data-cont="addDataCont"
+            @close="editClose"
+        />
+    </div>
+</template>
+<script>
+import ActionUtils from '@/utils/action'
+import IbpsAttachment from '@/business/platform/file/attachment/selector'
+import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
+import FixHeight from '@/mixins/height'
+import IbpsTypeTree from '@/business/platform/cat/type/tree'
+import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
+import closeFilePng from '@/assets/images/icons/closeFile.png'
+import openFilePng from '@/assets/images/icons/openFile.png'
+import wordPng from '@/assets/images/icons/word.png'
+import fileTraining from '@/views/component/fileTraining'
+import UpdateFile from './updateFile'
+import DataTemplateFormrenderDialog from '@/business/platform/data/templaterender/form/dialog.vue'
+import ibpsUserSelector from '@/business/platform/org/selector'
+export default {
+    components: {
+        IbpsTypeTree,
+        BpmnFormrender,
+        UpdateFile,
+        'ibps-attachment': IbpsAttachment,
+        'file-lookup': fileTraining,
+        DataTemplateFormrenderDialog,
+        ibpsUserSelector
+    },
+    mixins: [FixHeight],
+    data () {
+        const { isSuper, deptList = [], role } = this.$store.getters || {}
+        const hasRole = localStorage.getItem('hasHighRole') === '1'
+        const depArrs = deptList.map(
+            (i) => `wj.bian_zhi_bu_men_ like '${i.positionId}'`
+        )
+        return {
+            role,
+            isSuper,
+            hasRole,
+            depArrs,
+            dialogFormVisibles: false,
+            fileLookShow: false,
+            sonData: '',
+            showCaoZuoColumn: false,
+            //   treeData: [],
+            show: '',
+            //   rightsArr: ['join', 'delete'],
+            //   rowHandle: true,
+            width: 210,
+            oldorgId: null,
+            height: document.clientHeight,
+            loading: false,
+            filterText: '',
+            pkKey: 'id', // 主键  如果主键不是pk需要传主键
+            formKey: 'ywyxjl', // 编辑dialog需要使用
+            pkValue: '',
+            templateKey: 'ywyxjlsc',
+            visible: false,
+            categoryKey: '',
+            tableTitle: '',
+            listData: [],
+            selectListData: [],
+            bianlistData: {
+                dataResult: [],
+                pageResult: {
+                    limit: 0,
+                    page: 0,
+                    totalCount: 0,
+                    totalPages: 0
+                }
+            },
+            //   listTreeData: [],
+            listConfig: {
+                // 工具栏
+                toolbars: [{ key: 'search' }],
+                // 查询条件
+                searchForm: {
+                    forms: []
+                },
+                // 表格字段配置
+                columns: []
+            },
+            //   listOptions: {
+            //     border: true,
+            //     stripe: true
+            //   },
+            pagination: {
+                limit: 20,
+                page: 1
+            },
+            sorts: {},
+            sqlWhere: {},
+            searchWhere: {},
+            pageKey: '',
+            dialogFormVisible: false,
+            defId: '',
+            addDataCont: {},
+            srcUrl: '', // 报表字段
+            fileTypesDatas: {
+                comAuthority: [],
+                buMenAuthority: [],
+                authority: []
+            }, // 存放所点击列表的分类信息
+            closeFilePng,
+            openFilePng,
+            wordPng,
+            dialogVisible: false,
+            fileInfos: {},
+            // 本人修改
+            fileArray: [],
+            editDialogVisible: false,
+            editPkValue: '',
+            editToolbars: [{
+                button_type: 'close',
+                label: '关闭',
+                key: 'close'
+            },
+            {
+                button_type: 'save',
+                label: '保存',
+                key: 'save'
+            }],
+            pos: ''
+        }
+    },
+    watch: {
+        filterText (val) {
+            this.$refs.tree.filter(val)
+        },
+        showCaoZuoColumn (val) {
+            this.showCaoZuoColumn = val
+        }
+    },
+    created () {
+        this.pageKey = this.$route.name
+        this.categoryKey = this.pageKey === 'nbwj' ? 'FILE_TYPE' : 'FLOW_TYPE'
+        this.userId = this.$store.getters.userInfo.employee.id
+        const roleList = this.$store.getters.userInfo.role
+        // 系统管理角色添加删除按钮
+        const hasRole = roleList.some((item) => item.name === '系统管理角色')
+        if (this.pageKey === 'wjkzgl-ywyxjlsc' || this.pageKey === 'ywtxyxjl') {
+            // 系统管理角色不做分类过滤
+            this.listConfig.toolbars.push({ key: 'remove' })
+            this.selection = true
+        }
+        if (this.pageKey === 'nbwj') {
+            this.listConfig.searchForm.forms = [
+                { prop: 'wen_jian_bian_hao', label: '文件编号' },
+                { prop: 'wen_jian_ming_che', label: '文件名称' }
+            ]
+            this.listConfig.columns = [
+                // { prop: 'wen_jian_xi_lei_', label: '文件细类', sortable: 'custom', minWidth: 100 },
+                {
+                    prop: 'wen_jian_bian_hao',
+                    label: '文件编号',
+                    sortable: 'custom',
+                    width: 150
+                },
+                { prop: 'wen_jian_ming_che', label: '文件名称', minWidth: 150 },
+                { prop: 'ban_ben_', label: '版本', width: 65 },
+                {
+                    prop: 'file_info_',
+                    label: '查阅',
+                    slotName: 'wenjinachayue',
+                    minWidth: 150
+                },
+                {
+                    prop: 'fa_fang_shi_jian_',
+                    label: '发布日期',
+                    sortable: 'custom',
+                    width: 150
+                },
+                {
+                    prop: 'cha_yue_jie_zhi_s',
+                    label: '查阅截止时间',
+                    sortable: 'custom',
+                    minWidth: 120
+                }
+            ]
+        }
+        if (this.pageKey === 'wjkzgl-ywyxjlsc' || this.pageKey === 'ywtxyxjl') {
+            this.listConfig.searchForm.forms = [
+                {
+                    prop: 'nian_du_',
+                    label: '记录月份',
+                    fieldType: 'date',
+                    dateType: 'year',
+                    width: 50
+                },
+                {
+                    prop: 'bian_zhi_shi_jian',
+                    label: '上传时间',
+                    fieldType: 'daterange',
+                    width: 200
+                },
+                { prop: 'org_name', label: '部门', fieldType: 'slot', slotName: 'position' },
+                { prop: 'biao_dan_ming_che', label: '表单名称', width: 150 },
+                { prop: 'shi_wu_shuo_ming_', label: '事务说明', width: 150 }
+            ]
+            this.listConfig.columns = [
+                // { prop: 'fen_lei_', label: '表单分类', width: 120 },
+                {
+                    prop: 'nian_du_',
+                    label: '记录年份',
+                    dateFormat: 'yyyy-MM',
+                    width: 100
+                },
+                { prop: 'org_name', label: '部门', width: 100 },
+                { prop: 'biao_dan_ming_che', label: '表单名称', width: 250 },
+                { prop: 'shi_wu_shuo_ming_', label: '事务说明', width: 250 },
+                {
+                    prop: 'fu_jian_',
+                    label: '附件',
+                    slotName: 'file',
+                    minWidth: 250
+                },
+                { prop: 'bian_zhi_shi_jian', label: '上传时间', width: 140 },
+                { prop: 'ry_name', label: '上传人', width: 90 }
+            ]
+            const roleList = ['xtgljs', 'wjglzzc', 'wjgly'] // 系统管理员 文件管理组组长 文件管理员可修改
+            const hasRole = this.role.some(r => roleList.includes(r.alias))
+            if (hasRole) this.listConfig.columns.push({ prop: '', label: '操作', width: 100, slotName: 'customButton' })
+        }
+    },
+    methods: {
+        editClose (visible) {
+            this.editDialogVisible = visible
+            this.refreshData()
+        },
+        goEdit (row) {
+            this.editPkValue = row.id_
+            this.editDialogVisible = true
+        },
+        unitConversions (str) {
+            // 使用正则表达式匹配括号内的数字
+            const match = str.match(/((\d+))/)
+            // console.log('match', match)
+            // 如果找到了匹配,则返回匹配到的数字;否则返回空字符串
+            if (!match) {
+                return
+            }
+            if (match[1] < 1024) {
+                return match[0] + match[1]
+            }
+            return match[0] + (match[1] / 1024).toFixed(2) + 'M'
+        },
+        colseVisible (val) {
+            this.dialogVisible = val
+        },
+        getcolse () {
+            this.dialogFormVisibles = false
+        },
+        // 外部文件更新
+        updateDate (data) {
+            this.sonData = data
+            this.dialogFormVisibles = true
+        },
+        handleClose (done) {
+            this.$confirm('确认关闭?')
+                .then((_) => {
+                    done()
+                })
+                .catch((_) => {})
+        },
+        handleExpandCollapse (isExpand, readonly = false) {
+            this.width = isExpand ? 200 : 50
+        },
+
+        loadNode () {
+            this.loading = true
+        },
+        getDatas () {
+            const { comAuthority, buMenAuthority, authority } =
+                this.fileTypesDatas
+            // fileType存放点击文件id,如有孩子,则还有孩子id
+            const { fileType, sorts } = this.sqlWhere
+            this.listData = []
+            let wheres1 = '' // 共用
+            let wheres2 = '' // 部门
+            let wheres3 = '' // 受限
+
+            let start = ''
+            const positionsDatas = this.$store.getters.userInfo.positions
+            const needSelType = []
+            if (this.$store.getters.userInfo.positions === 0) {
+                this.$message({
+                    message: '该账户并没有所属部门,请先归属部门再来操作。',
+                    type: 'error'
+                })
+                return
+            }
+            for (var i in this.searchWhere) {
+                if (i === 'b') {
+                    start = this.searchWhere[i]
+                }
+                if (i === 'i') {
+                    wheres1 =
+                        wheres1 +
+                        ` and bian_zhi_shi_jian between '${start} 00:00:00' and '${this.searchWhere[i]} 23:59:59'`
+                    wheres2 =
+                        wheres2 +
+                        ` and bian_zhi_shi_jian between '${start} 00:00:00' and '${this.searchWhere[i]} 23:59:59'`
+                    wheres3 =
+                        wheres3 +
+                        ` and bian_zhi_shi_jian between '${start} 00:00:00' and '${this.searchWhere[i]} 23:59:59'`
+                }
+                if (i !== 'i' && i !== 'b') {
+                    const likeWhere =
+                        i === 'nian_du_'
+                            ? this.searchWhere[i].getFullYear()
+                            : this.searchWhere[i]
+                    wheres1 = wheres1 + ` and wj.${i} like '%${likeWhere}%'`
+                    wheres2 = wheres2 + ` and wj.${i} like '%${likeWhere}%'`
+                    wheres3 = wheres3 + ` and wj.${i} like '%${likeWhere}%'`
+                }
+            }
+            // fileType存放文件的id和有孩子的id
+            if (fileType) {
+                if (this.pageKey === 'nbwj') {
+                    if (comAuthority.length !== 0) {
+                        wheres1 =
+                            wheres1 +
+                            ` and FIND_IN_SET (wj.xi_lei_id_,'${comAuthority}')`
+                    }
+                    if (buMenAuthority.length !== 0) {
+                        let orSql = ''
+                        positionsDatas.forEach((item, index) => {
+                            orSql += `${
+                                index === 0 ? '' : 'OR'
+                            } wj.quan_xian_xin_xi_ LIKE '%${item.id}%'`
+                        })
+                        wheres2 =
+                            wheres2 +
+                            ` and (${orSql}) and FIND_IN_SET (wj.xi_lei_id_,'${buMenAuthority}')`
+                    }
+                    if (authority.length !== 0) {
+                        wheres3 =
+                            wheres3 +
+                            ` and FIND_IN_SET (wj.xi_lei_id_,'${authority}')`
+                    }
+                } else {
+                    wheres1 =
+                        wheres1 +
+                        ` and FIND_IN_SET (wj.fen_lei_id_,'${fileType}')`
+                }
+            }
+            let ascDesc = 'desc'
+            if (sorts && JSON.stringify(sorts) !== '{}') {
+                wheres1 =
+                    wheres1 +
+                    ` order by  ${sorts.sortBy}  ${
+                        sorts.order === 'ascending' ? 'asc' : 'desc'
+                    }`
+                wheres2 =
+                    wheres2 +
+                    ` order by  ${sorts.sortBy}  ${
+                        sorts.order === 'ascending' ? 'asc' : 'desc'
+                    }`
+                ascDesc = sorts.order === 'ascending' ? 'asc' : 'desc'
+            }
+            const isSuper = this.$store.getters.isSuper
+            const roleLists = this.$store.getters.userInfo.role
+            const roleKey = ['wjgly']
+            const curRole = roleLists.map((i) => i.alias)
+            const isPower = curRole.some((i) => roleKey.includes(i))
+            // 重复发放的文件,在权限表会存在重复的文件信息
+            //   let fileSearchSql = `select  wj.wen_jian_xi_lei_,wj.wen_jian_bian_hao,wj.wen_jian_ming_che,wj.ban_ben_,wj.wen_jian_fu_jian_ AS fu_jian_,qx.bian_zhi_shi_jian
+            //    FROM (SELECT *FROM (SELECT * FROM t_wjcysqb  ORDER BY create_time_ DESC LIMIT 99999999) a GROUP BY a.yong_hu_id_,a.wen_jian_id_) qx LEFT JOIN t_wjxxb wj ON qx.wen_jian_id_=wj.wen_jian_fu_jian_ WHERE qx.yong_hu_id_='${this.userId}' AND qx.shou_quan_='1' ${wheres1} GROUP BY qx.yong_hu_id_,qx.wen_jian_id_`
+            const selectSql = `select  wj.id_ as id,cy.id_ as cy_id_,sc.id_ as sc_id_,wj.shu_ju_lai_yuan_ AS shu_ju_lai_yuan_,file.ext_ AS ext_,
+			file.FILE_PATH_ AS file_path_,concat(file.file_name_,'.',file.ext_,'(大小:',
+               CASE
+                WHEN file.total_bytes_ >= 1024 * 1024 THEN CONCAT(ROUND(file.total_bytes_ / (1024.0 * 1024), 2), ' M')
+                WHEN file.total_bytes_ >= 1024 THEN CONCAT(ROUND(file.total_bytes_ / 1024.0, 2), ' K')
+                ELSE CONCAT(file.total_bytes_, 'B')
+            END
+            ,')') as file_info_,
+            wj.wen_jian_xi_lei_,wj.wen_jian_bian_hao,wj.wen_jian_ming_che,wj.ban_ben_,wj.wen_jian_fu_jian_ AS fu_jian_,wj.fa_bu_shi_jian_ as fa_fang_shi_jian_,'' AS cha_yue_jie_zhi_s  from`
+
+            // const selectSql = `select  wj.id_ as id,cy.id_ as cy_id_,sc.id_ as sc_id_,concat(file.file_name_,'.',file.ext_,'(大小:',file.total_bytes_,')') as file_info_,
+            // wj.wen_jian_xi_lei_,wj.wen_jian_bian_hao,wj.wen_jian_ming_che,wj.ban_ben_,wj.wen_jian_fu_jian_ AS fu_jian_,wj.fa_bu_shi_jian_ as fa_fang_shi_jian_,"" AS cha_yue_jie_zhi_s  from`
+            const leftSql = `left join (select id_,parent_id_ from t_wjcyjl group by parent_id_) cy on cy.parent_id_ = wj.id_
+            left join (select id_,parent_id_ from t_wjscjl group by parent_id_) sc on sc.parent_id_ = wj.id_
+            left join ibps_file_attachment file on file.id_ = wj.wen_jian_fu_jian_`
+            // 内外部文件查阅时候查所有文件
+            const allSql = ``
+            // 共用文件
+            const comSql = `${selectSql} t_wjxxb wj ${leftSql} 
+             where wj.shi_fou_guo_shen_ ='有效' and (${this.depArrs.join(
+        ' or '
+    )}) ${wheres1} `
+            // 部门权限文件
+            const buMenSql = `${selectSql}  t_wjxxb wj ${leftSql}
+            where wj.shi_fou_guo_shen_ in ('有效','使用') ${wheres2} `
+            // 受限文件:结合查阅授权模块的截止时间
+            // select wj.id_ as id,cy.id_ as cy_id_,sc.id_ as sc_id_,concat(file.file_name_,'.',file.ext_,'(',file.total_bytes_,')') as file_info_,
+
+            const authoritySql = `select wj.id_ as id,cy.id_ as cy_id_,sc.id_ as sc_id_,wj.shu_ju_lai_yuan_ AS shu_ju_lai_yuan_,file.ext_ AS ext_,
+			file.FILE_PATH_ AS file_path_,concat(file.file_name_,'.',file.ext_,'(',
+                     CASE
+                    WHEN file.total_bytes_ >= 1024 * 1024 THEN CONCAT(ROUND(file.total_bytes_ / (1024.0 * 1024), 2), ' M')
+                    WHEN file.total_bytes_ >= 1024 THEN CONCAT(ROUND(file.total_bytes_ / 1024.0, 2), ' K')
+                    ELSE CONCAT(file.total_bytes_, 'B')
+                END
+                ,')') as file_info_,
+                wj.wen_jian_xi_lei_,wj.wen_jian_bian_hao,wj.wen_jian_ming_che,wj.ban_ben_,wj.wen_jian_fu_jian_ AS fu_jian_,wj.fa_bu_shi_jian_ as fa_fang_shi_jian_,sq.cha_yue_jie_zhi_s  from
+            t_wjxxb wj
+            left join (select *from t_skwjcysqsqzb order by create_time_ desc limit 1) sq on wj.id_=sq.wen_jian_id_
+            ${leftSql}
+            WHERE wj.shi_fou_guo_shen_ ='有效'and ((sq.cha_yue_jie_zhi_s >DATE_FORMAT(NOW(), '%Y-%m-%d')) OR (sq.cha_yue_jie_zhi_s =DATE_FORMAT(NOW(), '%Y-%m-%d')))
+            and wj.quan_xian_xin_xi_ like '%${this.userId}%'  ${wheres3} `
+            // and (${isPower} or wj.quan_xian_xin_xi_ like '%${this.userId}%')  ${wheres3}
+            // 深圳三院(受限文件查阅权限)
+            //     const authoritySql = `select wj.id_ as id,cy.id_ as cy_id_,sc.id_ as sc_id_,
+            //     CONCAT(file.file_name_, '.', file.ext_, '(',
+            //     CASE
+            //        WHEN file.total_bytes_ >= 1024 * 1024 THEN CONCAT(ROUND(file.total_bytes_ / (1024.0 * 1024), 2), ' M')
+            //        WHEN file.total_bytes_ >= 1024 THEN CONCAT(ROUND(file.total_bytes_ / 1024.0, 2), ' K')
+            //        ELSE CONCAT(file.total_bytes_, 'B')
+            //     END
+            //  , ')') as file_info_,wj.wen_jian_xi_lei_,wj.wen_jian_bian_hao,wj.wen_jian_ming_che,wj.ban_ben_,wj.wen_jian_fu_jian_ AS fu_jian_,wj.fa_bu_shi_jian_ as fa_fang_shi_jian_,sq.cha_yue_jie_zhi_s FROM t_wjxxb wj
+            //  LEFT JOIN (SELECT * FROM t_skwjcysqsqzb ORDER BY create_time_ DESC LIMIT 1) sq ON wj.id_ = sq.wen_jian_id_ ${leftSql}
+            //  WHERE wj.shi_fou_guo_shen_ = '有效' AND (${isSuper} OR ${isPower}
+            // 	OR EXISTS (SELECT 1 FROM t_wjxdzb wjxdzb
+            // 		JOIN t_wjxzxdjlb wjxzxdjlb ON wjxdzb.id_ = wjxzxdjlb.parent_id_
+            // 		JOIN t_wjxxb wjxxb ON wjxxb.shu_ju_lai_yuan_ = wjxzxdjlb.id_
+            // 	WHERE wjxxb.id_ = wj.id_  AND CONCAT_WS(',',
+            //         IF ( wjxdzb.bian_zhi_ren_ != '', wjxdzb.bian_zhi_ren_, NULL ),
+            // 		IF( wjxdzb.zhu_shen_he_ren_ != '', wjxdzb.zhu_shen_he_ren_, NULL ),
+            // 		IF( wjxdzb.zhu_shen_pi_ren_ != '', wjxdzb.zhu_shen_pi_ren_, NULL )
+            // 		) LIKE '%${this.userId}%'
+            // 	)
+            // ) ${wheres3}`
+            const sqlArr = [comSql, buMenSql, authoritySql]
+            let oldRecordSql = ''
+            const buMenWhere = []
+            if (this.pageKey !== 'nbwj') {
+                if (this.$store.getters.deptList.length !== 0) {
+                    // eslint-disable-next-line no-redeclare
+                    if (this.pos) {
+                        for (var a of this.pos.split(',')) {
+                            buMenWhere.push(
+                                `bian_zhi_bu_men_ like '%${a}%'`
+                            )
+                        }
+                    } else {
+                        for (var b of this.$store.getters.deptList) {
+                            buMenWhere.push(
+                                `bian_zhi_bu_men_ like '%${b.positionId}%'`
+                            )
+                        }
+                    }
+
+                    oldRecordSql = `select wj.*,en.name_ AS org_name,ee.name_ as ry_name FROM t_ywyxjlb wj 
+                    left join ibps_party_employee ee on wj.bian_zhi_ren_ = ee.id_ 
+                    LEFT JOIN ibps_party_entity en ON en.id_= bian_zhi_bu_men_ 
+                    where (${buMenWhere.join(
+        ' or '
+    )}) ${wheres1}  order by bian_zhi_shi_jian desc`
+                } else {
+                    console.log('没有部门组织')
+                    return
+                }
+            }
+            // eslint-disable-next-line no-redeclare
+            for (var i in Object.keys(this.fileTypesDatas)) {
+                var key = Object.keys(this.fileTypesDatas)[i] // key
+                var value = this.fileTypesDatas[key] // value
+                if (value.length !== 0) {
+                    needSelType.push(`(${sqlArr[i]})`)
+                }
+            }
+            const fileSearchSql = needSelType.join('union all')
+            // ` order by  ${sorts.sortBy}  ${sorts.order === 'ascending' ? 'asc' : 'desc'}`
+            const sql =
+                this.pageKey === 'nbwj'
+                    ? `select sq.id,sq.cy_id_,sq.sc_id_,sq.shu_ju_lai_yuan_,sq.file_info_,sq.wen_jian_xi_lei_,sq.wen_jian_bian_hao,sq.wen_jian_ming_che,sq.ban_ben_,sq.ext_,sq.file_path_,COALESCE(wjxz.gai_zhang_fu_jian,sq.fu_jian_) AS fu_jian_,sq.fa_fang_shi_jian_,sq.cha_yue_jie_zhi_s from (${fileSearchSql}) sq LEFT JOIN t_wjxzxdjlb wjxz ON sq.shu_ju_lai_yuan_ = wjxz.id_ ORDER BY sq.wen_jian_bian_hao ${ascDesc},sq.wen_jian_ming_che DESC`
+                    : oldRecordSql
+            // console.log(sql, 'sssssssssssssssssss')
+            curdPost('sql', sql)
+                .then((res) => {
+                    const tableDatas = res.variables.data
+                    this.selectListData = JSON.parse(JSON.stringify(tableDatas))
+                    let filterDatas = []
+                    this.bianlistData.pageResult.totalCount = tableDatas.length
+                    this.bianlistData.pageResult.totalPages = Math.ceil(
+                        tableDatas.length / this.pagination.limit
+                    )
+                    this.bianlistData.pageResult.limit = this.pagination.limit
+                    this.bianlistData.pageResult.page = this.pagination.page
+                    if (this.pagination.limit > tableDatas.length) {
+                        filterDatas = JSON.parse(JSON.stringify(tableDatas))
+                    } else {
+                        for (let index = 0; index < 20; index++) {
+                            filterDatas.push(tableDatas[index])
+                        }
+                    }
+                    this.bianlistData.dataResult = filterDatas
+                    ActionUtils.handleListData(this, this.bianlistData)
+                })
+                .catch((res) => {
+                    this.loading = false
+                    this.listData = []
+                })
+        },
+        //  and ((sq.cha_yue_jie_zhi_s >DATE_FORMAT(NOW(), '%Y-%m-%d')) OR (sq.cha_yue_jie_zhi_s =DATE_FORMAT(NOW(), '%Y-%m-%d')))
+        refreshData () {
+            this.listData = []
+            this.getSearcFormData()
+            this.getDatas()
+        },
+        hasColumnByProp (columns, prop) {
+            return columns.some((column) => column.prop === prop)
+        },
+        removeColumnByProp (columns, prop) {
+            return columns.filter((column) => column.prop !== prop)
+        },
+        handleNodeClick (nodeId, nodeData, treeDatas) {
+            // 判断是否显示外部文件更新按钮
+            if (nodeData.depth !== 0) {
+                const pathId = nodeData.path ? nodeData.path.split('.') : []
+                const pathNameList = pathId.map((id) => {
+                    const node = treeDatas.find((item) => item.id === id)
+                    return node ? node.name : ''
+                })
+                if (pathNameList.includes('外部文件') && this.isSuper) {
+                    this.showCaoZuoColumn = true
+                    if (
+                        !this.hasColumnByProp(
+                            this.listConfig.columns,
+                            'cao_zuo'
+                        )
+                    ) {
+                        this.listConfig.columns.push({
+                            prop: 'cao_zuo',
+                            label: '操作',
+                            slotName: 'caozuo',
+                            width: 100
+                        })
+                    }
+                } else {
+                    this.showCaoZuoColumn = false
+                    this.listConfig.columns = this.removeColumnByProp(
+                        this.listConfig.columns,
+                        'cao_zuo'
+                    )
+                }
+            }
+            this.show = 'detail'
+            this.addDataCont = { fenLei: nodeData.name, fenLeiId: nodeId }
+            const fileTypes = []
+            // 避免重复请求
+            if (this.oldorgId === nodeId) {
+                return
+            }
+            // 判断是否存在下级菜单
+            const noHadNext = !nodeData.children || !nodeData.children.length
+            if (noHadNext && this.pageKey === 'wjkzgl-ywyxjlsc') {
+                const chongfu = this.listConfig.toolbars.filter((el) => {
+                    return el.key === 'add'
+                })
+                if (chongfu.length === 0 && this.depth !== 0) {
+                    this.listConfig.toolbars.splice(1, 0, { key: 'add' })
+                }
+            } else {
+                this.listConfig.toolbars = this.listConfig.toolbars.filter(
+                    (el) => {
+                        return el.key !== 'add'
+                    }
+                )
+            }
+            this.fileTypesDatas = {
+                comAuthority: [],
+                buMenAuthority: [],
+                authority: [],
+                shiJiSql: [],
+                sheBeiSql: []
+            }
+            const processAuthority = (nodeId, authorityName) => {
+                fileTypes.push(nodeId)
+                if (!authorityName || !authorityName.chaYue) {
+                    return
+                }
+                switch (authorityName.chaYue) {
+                    case '公用查阅':
+                        this.fileTypesDatas.comAuthority.push(nodeId)
+                        break
+                    case '部门查阅':
+                        this.fileTypesDatas.buMenAuthority.push(nodeId)
+                        break
+                    case '受限查阅':
+                        this.fileTypesDatas.authority.push(nodeId)
+                        break
+                }
+            }
+            // 递归获取所有子节点
+            // 存在子节点时,需获取当前节点及所有子节点信息 - task3329
+            const getTail = (item) => {
+                const result = [item] // 将自身信息添加到结果中
+                if (item.children && item.children.length > 0) {
+                    // 如果有子节点,则递归获取子节点的信息
+                    item.children.forEach((child) => {
+                        result.push(...getTail(child)) // 将子节点信息添加到结果中
+                    })
+                }
+                return result
+            }
+
+            const result = getTail(nodeData)
+            result.forEach(({ id, authorityName }) => {
+                const parsedAuthority = JSON.parse(authorityName)
+                processAuthority(id, parsedAuthority)
+            })
+            this.oldorgId = nodeId
+            this.sqlWhere = {
+                fileType: fileTypes.join(',')
+            }
+            this.getDatas()
+        },
+        // 开启表单页面
+        openTask (id) {
+            this.dialogFormVisible = true
+            this.defId = id
+        },
+        // 关闭编辑表单
+        closeHandle (v) {
+            this.dialogFormVisible = v
+            this.refreshData()
+        },
+        /**
+         * 获取格式化参数
+         */
+        getSearcFormData () {
+            this.searchWhere = this.$refs['crud']
+                ? this.$refs['crud'].getSearcFormData()
+                : {}
+            //   this.getDatas()
+        },
+        /**
+         * 处理按钮事件
+         */
+        handleAction (command, position, selection, data, index, button) {
+            switch (command) {
+                case 'search': // 查询
+                    this.refreshData()
+                    break
+                case 'remove':
+                    if (!data || !data.length) {
+                        this.$message({
+                            message: '请选择数据再进行删除',
+                            type: 'error'
+                        })
+                    }
+                    // eslint-disable-next-line no-case-declarations
+                    const ids = []
+                    for (var i of data) {
+                        ids.push(i.id_)
+                    }
+                    // eslint-disable-next-line no-case-declarations
+                    const deleteParams = {
+                        tableName: 't_ywyxjlb',
+                        paramWhere: { id_: ids.join(',') }
+                    }
+                    curdPost('delete', deleteParams).then(() => {
+                        this.$message({
+                            message: '删除成功!',
+                            type: 'warning'
+                        })
+                        this.refreshData()
+                    })
+
+                    break
+                case 'add': // 添加
+                    this.openTask('1072813170935988224')
+                    break
+                case 'colect': // 收藏或取消收藏
+                    if (!data || !data.length) {
+                        return this.$message({
+                            message: '请先选择数据再进行操作~',
+                            type: 'warning'
+                        })
+                    }
+                    this.handleColect(data)
+                    break
+                default:
+                    break
+            }
+        },
+        /**
+         * 处理排序
+         */
+        handleSortChange (sort) {
+            this.sqlWhere.sorts = sort
+            this.getDatas()
+        },
+        // 处理分页事件
+        handlePaginationChange (page) {
+            ActionUtils.setPagination(this.pagination, page)
+            this.bianlistData.pageResult.limit = page.limit
+            this.bianlistData.pageResult.page = page.page
+            const filterDatas = []
+            if (this.selectListData.length >= page.limit * page.page) {
+                for (
+                    let index = page.limit * page.page - page.limit;
+                    index < page.limit * page.page;
+                    index++
+                ) {
+                    filterDatas.push(this.selectListData[index])
+                }
+                this.bianlistData.dataResult = JSON.parse(
+                    JSON.stringify(filterDatas)
+                )
+            } else {
+                for (
+                    let index = page.limit * page.page - page.limit;
+                    index < this.selectListData.length;
+                    index++
+                ) {
+                    filterDatas.push(this.selectListData[index])
+                }
+                this.bianlistData.dataResult = JSON.parse(
+                    JSON.stringify(filterDatas)
+                )
+            }
+            ActionUtils.handleListData(this, this.bianlistData)
+        },
+        async handleColect (data) {
+            const addScDatas = []
+            const delIds = []
+            const scTableName = 't_wjscjl'
+            for (const i of data) {
+                // 如果是有sc_id_说明是已经收藏过的,再次点击按钮的时候就取消收藏
+                if (i.sc_id_) {
+                    delIds.push(i.sc_id_)
+                } else {
+                    addScDatas.push({
+                        bian_zhi_ren_: this.userId,
+                        bian_zhi_shi_jian: this.$common.getDateNow(19),
+                        parent_id_: i.id
+                    })
+                }
+            }
+            if (addScDatas.length) {
+                const addParams = {
+                    tableName: scTableName,
+                    paramWhere: addScDatas
+                }
+                await curdPost('add', addParams).then((res) => {})
+            }
+            if (delIds.length) {
+                const deleteParams = {
+                    tableName: scTableName,
+                    paramWhere: { id_: delIds.join(',') }
+                }
+                await curdPost('delete', deleteParams).then(() => {})
+            }
+            this.refreshData()
+        },
+        handleClickTag (val) {
+            // this.$common.request('sql', sql).then(res => {
+            //     console.log('res', res)
+            //     this.fileInfos = {}
+            //     const { data = [] } = res.variables || {}
+            //     if (!data.length) {
+            //         this.$message.warning('没有可查阅的文件,请查明原因!')
+            //         return
+            //     }
+            //     this.fileInfos = { id: val.id, FILE_NAME_: val.wen_jian_ming_che, fileInfos: data[0], func: this.handleUpdate, ban_ben_: val.ban_ben_ }
+            //     this.dialogVisible = true
+            // 查看文件
+            this.fileArray = []
+            // this.handleFileInfo(val)
+            const sql1 = `select t_wjxxb.*, t_wjxzxdjlb.xiu_ding_ban_ben_, t_wjxzxdjlb.xiu_ding_nei_rong,t_wjxzxdjlb.yuan_yin_
+            from  t_wjxxb
+            INNER JOIN t_wjxzxdjlb ON  t_wjxxb.shu_ju_lai_yuan_ = t_wjxzxdjlb.id_ WHERE  tou_ban_wen_jian_='${val.id}' AND t_wjxxb.shi_fou_guo_shen_='有效'`
+            // 查看文件修订历史记录
+            const sql = `select w.* FROM t_wjxzxdjlb w JOIN (select zuo_fei_cao_zuo_ FROM t_wjxzxdjlb WHERE id_ = (select shu_ju_lai_yuan_ FROM t_wjxxb WHERE id_ = '${val.id}') and zuo_fei_cao_zuo_ IS NOT NULL and zuo_fei_cao_zuo_!='' ) sub ON w.zuo_fei_cao_zuo_ = sub.zuo_fei_cao_zuo_ where w.zuo_fei_cao_zuo_ IS NOT NULL and w.zuo_fei_cao_zuo_!=''and w.shi_fou_guo_shen_='已完成' `
+            this.$common.request('sql', sql).then(async (res) => {
+                const list = res.variables.data
+                for (let i = 0; i < list.length; i++) {
+                    const el = list[i]
+                    const obj = {
+                        zId: val.id,
+                        id: el.id_,
+                        wen_jian_ming_che: el.wen_jian_ming_che,
+                        ban_ben_: el.ban_ben_,
+                        // fu_jian_: el.wen_jian_fu_jian_,
+                        fu_jian_: el.gai_zhang_fu_jian
+                            ? el.gai_zhang_fu_jian
+                            : el.wen_jian_fu_jian_,
+                        xiu_ding_nei_rong: el.xiu_ding_nei_rong,
+                        yuan_yin_: el.yuan_yin_,
+                        fa_fang_shi_jian_: el.bian_zhi_shi_jian,
+                        fa_bu_shi_jian_: el.fa_bu_shi_jian_,
+                        xiu_ding_ban_ben_: el.xiu_ding_ban_ben_,
+                        xiu_ding_wen_jian_: el.xiu_ding_wen_jian_,
+                        wen_jian_bian_hao: el.wen_jian_bian_hao,
+                        bian_zhi_ren_: el.bian_zhi_ren_,
+                        cao_zuo_lei_xing_: el.cao_zuo_lei_xing_,
+                        xiu_ding_fu_jian_: el.xiu_ding_fu_jian_,
+                        zhen_fu_jian_: el.fu_jian_
+                    }
+                    await this.handleFileInfo(obj)
+                }
+
+                this.dialogVisible = true
+            })
+        },
+        async handleFileInfo (val) {
+            // 修订附件作废附件不再使用,修订在文件附件上操作
+            const sql = `select * from ibps_file_attachment where id_= '${val.fu_jian_}'`
+            //  let sql = ''
+            // if (val.cao_zuo_lei_xing_ === '修订') {
+            //     sql = `select * from ibps_file_attachment where id_= '${val.xiu_ding_fu_jian_}'`
+            // } else {
+            //     sql = `select * from ibps_file_attachment where id_= '${val.fu_jian_}'`
+            // }
+            const res = await this.$common.request('sql', sql)
+            this.fileInfos = {} // 本人添加
+            const { data = [] } = res.variables || {}
+            if (!data.length) {
+                this.$message.warning('没有可查阅的文件,请查明原因!')
+                return
+            }
+            this.fileInfos = {
+                id: val.id,
+                FILE_NAME_: val.wen_jian_ming_che,
+                fileInfos: data[0],
+                func: this.handleUpdate,
+                ban_ben_: val.ban_ben_,
+                xiu_ding_nei_rong: val.xiu_ding_nei_rong
+                    ? val.xiu_ding_nei_rong
+                    : '',
+                yuan_yin_: val.yuan_yin_ ? val.yuan_yin_ : '',
+                xiu_ding_ban_ben_: val.xiu_ding_ban_ben_
+                    ? val.xiu_ding_ban_ben_
+                    : '',
+                wen_jian_bian_hao: val.wen_jian_bian_hao,
+                fa_fang_shi_jian_: val.fa_fang_shi_jian_,
+                bian_zhi_ren_: val.bian_zhi_ren_,
+                cao_zuo_lei_xing_: val.cao_zuo_lei_xing_,
+                zId: val.zId,
+                xiu_ding_fu_jian_: val.xiu_ding_fu_jian_,
+                zhen_fu_jian_: val.zhen_fu_jian_,
+                fa_bu_shi_jian_: val.fa_bu_shi_jian_
+            }
+            this.fileArray.push(this.fileInfos)
+        },
+        handleUpdate (fileId, time) {
+            const addParams = {
+                tableName: 't_wjcyjl',
+                paramWhere: [
+                    {
+                        bian_zhi_ren_: this.userId,
+                        bian_zhi_shi_jian: this.$common.getDateNow(19),
+                        parent_id_: fileId,
+                        shi_chang_: time
+                    }
+                ]
+            }
+            curdPost('add', addParams).then((res) => {
+                this.refreshData()
+            })
+        }
+    }
+}
+</script>
+<style lang="less" scoped>
+.box {
+    width: 230px;
+}
+
+.title {
+    font-size: 14px;
+    margin: 21px 5px 5px;
+    padding: 0;
+}
+
+/deep/ .el-tree-node__content {
+    display: block;
+}
+
+/deep/ .el-form-item__label {
+    text-align: left;
+}
+
+/deep/ .el-dialog__footer {
+    display: flex;
+    justify-content: center;
+}
+</style>
+

+ 187 - 0
src/views/infosManage/updateFile.vue

@@ -0,0 +1,187 @@
+<template>
+    <el-dialog
+        :visible.sync="visivle"
+        :close-on-click-modal="false"
+        :close-on-press-escape="false"
+        :show-close="true"
+        class="dialog paper-detail-dialog"
+        append-to-body
+        @close="closeDialog"
+    >
+        <template slot="title">
+            <div class="dialog-title" style="">更新文件信息</div>
+        </template>
+        <el-form ref="dialogForm" :model="dialogForm" label-width="120px" :rules="rules">
+            <el-row :gutter="80" style="margin:2% 0">
+                <el-col :span="12"> <el-form-item label="文件类型:">
+                    <div>{{ dialogForm.wen_jian_lei_xing?dialogForm.wen_jian_lei_xing:'/' }}</div>
+                </el-form-item></el-col>
+                <el-col :span="12"> <el-form-item label="文件编号:">
+                    <div>{{ dialogForm.wen_jian_bian_hao?dialogForm.wen_jian_bian_hao:'/' }}</div>
+                </el-form-item></el-col>
+            </el-row>
+            <el-row :gutter="80" style="margin:2% 0">
+                <el-col :span="12"> <el-form-item label="原文件名称:">
+                    <div>{{ dialogForm.yuan_wen_jian_min?dialogForm.yuan_wen_jian_min:'/' }}</div>
+                </el-form-item></el-col>
+                <el-col :span="12"> <el-form-item label="新文件名称:">
+                    <el-input v-model="dialogForm.xin_wen_jian_ming" placeholder="请输入内容" />
+                </el-form-item></el-col>
+            </el-row>
+            <el-row :gutter="80" style="margin:2% 0">
+                <el-col :span="12"> <el-form-item label="发布时间:" prop="fa_bu_shi_jian_">
+                    <el-date-picker
+                        v-model="dialogForm.fa_bu_shi_jian_"
+                        :picker-options="{ disabledDate(time) { return time.getTime() > Date.now(); } }"
+                        type="datetime"
+                        placeholder="选择日期时间"
+                        format="yyyy-MM-dd HH:mm"
+                        value-format="yyyy-MM-dd HH:mm"
+                        style="width:100%"
+                    />
+                </el-form-item></el-col>
+                <el-col :span="12"> <el-form-item label="生效时间:" prop="sheng_xiao_shi_">
+                    <el-date-picker v-model="dialogForm.sheng_xiao_shi_" :picker-options="{ disabledDate(time) { return time.getTime() <= Date.now(); } }" type="date" placeholder="选择日期" style="width:100%" />
+                </el-form-item></el-col>
+            </el-row>
+            <el-row :gutter="80" style="margin:2% 0">
+                <el-col :span="12"> <el-form-item label="上传文件:" prop="wen_jian_fu_jian_">
+                    <ibps-attachment
+                        v-model="dialogForm.wen_jian_fu_jian_"
+                        allow-download
+                        download
+                        multiple
+                        accept="*"
+                        store="id"
+                        :readonly="false"
+                    />
+                </el-form-item></el-col>
+
+            </el-row>
+            <el-row :gutter="80" style="margin:2% 0">
+                <el-col :span="12"> <el-form-item label="更新内容:">
+                    <el-input v-model="dialogForm.geng_xin_nei_rong" placeholder="请输入内容" />
+                </el-form-item></el-col>
+
+            </el-row>
+            <el-row :gutter="80" style="margin:2% 0">
+                <el-col :span="12"> <el-form-item label="更新原因:">
+                    <el-input v-model="dialogForm.geng_xin_yuan_yin" placeholder="请输入内容" />
+                </el-form-item></el-col>
+            </el-row>
+        </el-form>
+        <div slot="footer" class="el-dialog--center">
+            <ibps-toolbar
+                :actions="toolbars"
+                @action-event="handleActionEvent"
+            />
+        </div>
+    </el-dialog>
+</template>
+<script>
+import IbpsAttachment from '@/business/platform/file/attachment/selector'
+export default {
+    components: {
+        'ibps-attachment': IbpsAttachment
+    },
+    props: {
+        visidial: {
+            type: Boolean,
+            default: false
+        },
+        sonData: {
+            type: Object,
+            default: () => {}
+        }
+    },
+    data () {
+        return {
+            visivle: this.visidial,
+            toolbars: [
+                {
+                    key: 'confirm'
+                },
+                {
+                    key: 'cancel'
+                }
+            ],
+            rules: {
+                fa_bu_shi_jian_: [{ required: true, message: this.$t('validate.required') }],
+                sheng_xiao_shi_: [{ required: true, message: this.$t('validate.required') }],
+                wen_jian_fu_jian_: [{ required: true, message: this.$t('validate.required') }]
+            },
+            dialogForm: {
+                yuan_wen_jian_id_: this.sonData.row.id,
+                wen_jian_lei_xing: this.sonData.row.wen_jian_xi_lei_,
+                wen_jian_bian_hao: this.sonData.row.wen_jian_bian_hao,
+                yuan_wen_jian_min: this.sonData.row.wen_jian_ming_che,
+                ji_lu_id_: this.sonData.row.id,
+                xin_wen_jian_ming: '',
+                fa_bu_shi_jian_: '',
+                sheng_xiao_shi_: '',
+                wen_jian_fu_jian_: '',
+                geng_xin_nei_rong: '',
+                geng_xin_yuan_yin: ''
+            }
+        }
+    },
+    watch: {
+        visidial (val) {
+            this.visivle = val
+        },
+        sonData (val) {
+            this.dialogForm.wen_jian_lei_xing = val.row.wen_jian_xi_lei_
+            this.dialogForm.wen_jian_bian_hao = val.row.wen_jian_bian_hao
+            this.dialogForm.yuan_wen_jian_min = val.row.wen_jian_ming_che
+            this.dialogForm.yuan_wen_jian_id_ = val.row.id
+            this.dialogForm.ji_lu_id_ = val.row.id
+        }
+    },
+    methods: {
+        handleActionEvent ({ key }) {
+            switch (key) {
+                case 'confirm':
+                    this.dialogVisibleClick('dialogForm')
+                    break
+                case 'cancel':
+                    this.closeDialog()
+                    break
+                default:
+                    break
+            }
+        },
+        closeDialog () {
+            this.$emit('getcolse')
+        },
+        dialogVisibleClick (dialogForm) {
+            this.$refs[dialogForm]?.validate((valid) => {
+                if (valid) {
+                    const params = {
+                        tableName: 't_wjxxgxb',
+                        paramWhere: [this.dialogForm]
+                    }
+                    this.$common.request('add', params).then(res => {
+                        this.$message.success('添加成功!')
+                        this.closeDialog()
+                    }).catch(err => {
+                        console.log(err)
+                        this.$message.error('添加失败')
+                    })
+                }
+            })
+        }
+    }
+}
+</script>
+<style scoped lang="less">
+.el-dialog{
+    .dialog-title{
+       width:100%;
+       color:#555;
+       text-align:center;
+       font-size:20px;
+       font-weight:600;
+    }
+}
+
+</style>