Browse Source

Merge branch '深圳三院' of http://119.23.210.103:3000/wy/zdqy_firm_former into 深圳三院

tianxinyu 1 năm trước cách đây
mục cha
commit
a6bff5784e

+ 28 - 29
src/business/platform/bpmn/form/action.js

@@ -750,60 +750,59 @@ export default {
         // 修改流程时间
 
         async handleTimeModification () {
-            // 表单
+            // 获取表单数
             const { code = '', name = '' } = this.getFormEL().formDefData || {}
+            const currentFormData = this.$common.replaceNullWithEmpty(this.getFormData())
             const jsonData = {
                 boCode: code,
                 version: 0,
                 formKey: this.dataResultitem.formKey,
                 pk: this.dataResultitem.bizKey,
-                data: JSON.stringify(this.$common.replaceNullWithEmpty(this.getFormData()))
+                data: JSON.stringify(currentFormData),
+                // 接口新增参数,是否记录操作日志
+                addLog: true
             }
-            // 流程参数
-            const defData = this.formParams.formOpinionData.opinionList
-            // 快照参数
 
+            // 获取流程意见数据
+            const { opinionList, formOpinionNodeData } = this.formParams.formOpinionData || {}
             const snapshot = { id: this.instanceId_ }
 
-            // console.log(JSON.stringify(this.$common.replaceNullWithEmpty(this.formDataBF)), JSON.stringify(this.$common.replaceNullWithEmpty(this.getFormData())))
-            // console.log(this.formDataBF)
-            if (this.timeModification_) {
-                if (JSON.stringify(this.$common.replaceNullWithEmpty(this.formDataBF)) === JSON.stringify(this.$common.replaceNullWithEmpty(this.getFormData()))) {
-                    // console.log('aa')
-                    if (JSON.stringify(defData) === JSON.stringify(this.opinionListBF)) {
-                        // console.log('aa')
-                    } else {
-                        await this.timeModify(defData)
-                    }
-                } else {
-                    if (JSON.stringify(defData) === JSON.stringify(this.opinionListBF)) {
-                        await this.saveData(jsonData, false, defData, snapshot)
-                    } else {
-                        await this.saveData(jsonData, true, defData, snapshot)
-                    }
-                }
-                // this.timeModification_ = false
-            } else {
+            if (!this.timeModification_) {
                 this.timeModification_ = true
+                return
+            }
+
+            // 检查数据变更状态
+            const isFormDataChanged = JSON.stringify(this.$common.replaceNullWithEmpty(this.formDataBF)) !== JSON.stringify(currentFormData)
+            const isOpinionChanged = JSON.stringify(opinionList) !== JSON.stringify(this.opinionListBF)
+
+            // 根据变更状态执行相应操作
+            if (!isFormDataChanged && isOpinionChanged) {
+                const opinionNodeList = Object.values(formOpinionNodeData).filter(Array.isArray).flat()
+                await this.timeModify(opinionNodeList)
+            } else if (isFormDataChanged) {
+                await this.saveData(jsonData, isOpinionChanged, opinionList, snapshot)
             }
         },
         // 保存流程数据生成快照
         async timeModify (data) {
-            await changeCompleteTime(data).then(response => {
+            try {
+                const response = await changeCompleteTime(data)
                 if (response.state === 200) {
                     this.$message.success('修改成功!')
                     this.callbackPage()
                 } else {
                     this.$message.error(response.message)
                 }
-            }).catch(() => {
-            })
+            } catch (error) {
+                console.error('修改时间失败:', error)
+            }
         },
         // 保存表单数据生成快照
-        async saveData (data, sflc, defData, snapshot) {
+        async saveData (data, sflc, opinionList, snapshot) {
             await saveFormData(data).then(response => {
                 if (sflc) {
-                    this.timeModify(defData)
+                    this.timeModify(opinionList)
                 } else {
                     this.repleceSnapshot(snapshot)
                 }

+ 1 - 1
src/business/platform/bpmn/form/index.vue

@@ -468,7 +468,7 @@ export default {
                 // 备份对比
                     this.$nextTick(() => {
                         setTimeout(() => {
-                            this.formDataBF = this.getFormData()
+                            this.formDataBF = JSON.parse(JSON.stringify(this.getFormData()))
                         }, 500)
                         this.opinionListBF = JSON.parse(JSON.stringify(this.formParams.formOpinionData.opinionList))
                     })

+ 9 - 2
src/business/platform/form/formrender/dynamic-form/dynamic-form-table.vue

@@ -146,7 +146,7 @@
                                     <el-button-group>
                                         <template v-for="(button, b) in toolbarButtons">
                                             <template v-if="!(button.key === 'remove' && dataModel.length === 1)">
-                                                <el-button :key="b" :type="button.type" :icon="button.icon" @click="handleActionEvent(button, b)">
+                                                <el-button :key="b" :type="button.type" :icon="button.icon" @click="handleActionEvent(button, index)">
                                                     {{ button.label }}
                                                 </el-button>
                                             </template>
@@ -605,6 +605,10 @@ export default {
             if (this.nameColumns && this.nameColumns.length > 0) {
                 this.nameColumns.forEach((column) => {
                     columnsRights[column.name] = 'e'
+                    // 层级组件和子表隐藏字段修改时不显示
+                    if (column.field_type === 'currentPosition' || column.field_options.hide_rights === true || !column.field_options.display) {
+                        columnsRights[column.name] = 'h'
+                    }
                 })
             }
             // console.log(columnsRights)
@@ -781,9 +785,12 @@ export default {
                 // 后置事件
                 this.afterScript(this.actionCode, this.actionPosition)
                 if (this.$refs.elTable) {
+                    this.$refs.elTable.clearSelection()
                     this.$refs.elTable.doLayout()
                 }
-            }).catch(() => {})
+            }).catch((e) => {
+            	this.$refs.elTable?.clearSelection()
+            })
         },
         /**
          * 获取选择的记录

+ 43 - 32
src/business/platform/form/formrender/dynamic-form/dynamic-form.vue

@@ -142,7 +142,7 @@ export default {
         permissions: {
             type: Object
         },
-        BpmnForm: {
+        bpmnForm: {
             type: Boolean,
             default: false
         },
@@ -268,6 +268,9 @@ export default {
             },
             deep: true,
             immediate: true
+        },
+        timeModification () {
+            this.initResponseFields()
         }
         // models: {
         //     handler (val) {
@@ -304,8 +307,8 @@ export default {
     },
     methods: {
         /**
-             * 初始化字段
-             */
+         * 初始化字段
+         */
         async initResponseFields () {
             let fields
             if (this.formDef && this.formDef.fields) fields = this.formDef.fields
@@ -319,8 +322,8 @@ export default {
             await this.initResponseOpinionData()
         },
         /**
-             * 生成modles
-             */
+         * 生成modles
+         */
         async generateModles (fields) {
             for (let i = 0; i < fields.length; i++) {
                 const field = fields[i]
@@ -406,8 +409,8 @@ export default {
             return data
         },
         /**
-             *  初始化表单扩展参数
-             */
+         *  初始化表单扩展参数
+         */
         initFormFieldParameter (field) {
             // ====== 初始化表单权限
             this.initFormRights(field)
@@ -420,10 +423,18 @@ export default {
             this.rights[field.name] = FormUtils.getDefaultApprovalOpinionRigths(field, this.params) || this.getPermissions(this.permissions, field) || FormUtils.getDefaultRigths(field)
         },
         /**
-             *  初始化表单权限
-             */
+         *  初始化表单权限
+         */
         initFormRights (field) {
-            this.rights[field.name] = this.getPermissions(this.permissions, field) || FormUtils.getDefaultRigths(field)
+            let fieldRights = this.getPermissions(this.permissions, field) || FormUtils.getDefaultRigths(field)
+            const fieldType = field.field_type
+            const isNonInputField = FormOptions.t.NON_INPUT_FIELD_TYPES.includes(fieldType)
+            const specialFields = ['table', 'approval_opinion', 'currentPosition']
+            // 体系运行记录盒修改数据时,主表中,普通字段权限都设置为可编辑
+            if (!isNonInputField && !specialFields.includes(fieldType)) {
+                fieldRights = this.timeModification && fieldRights !== 'h' ? FormOptions.t.PERMISSIONS.EDIT : fieldRights
+            }
+            this.rights[field.name] = fieldRights
         },
         // 获取权限
         getPermissions (permissions, field) {
@@ -446,8 +457,8 @@ export default {
                 isSpecial = true
                 rightsValue = permissions.tables[name] ? permissions.tables[name] : null
             } else {
-                // 字段
-                rightsValue = permissions.fields[name] ? permissions.fields[name] : null
+                // 其他字段
+                rightsValue = permissions.fields[name] || null
             }
             if (this.$route.path === '/xxgl/jssllb') {
                 return rightsValue
@@ -513,8 +524,8 @@ export default {
             }
         },
         /**
-             * 表单提交校验
-             */
+         * 表单提交校验
+         */
         formSubmitVerify (callback) {
             let flag = true
             const verifys = this.formAttrs ? this.formAttrs.verifys : []
@@ -535,8 +546,8 @@ export default {
             callback(flag)
         },
         /**
-             * 获取表单数据
-             */
+         * 获取表单数据
+         */
         getFormData () {
             const data = {}
             // 去除文本字段,表单意见字段
@@ -548,32 +559,32 @@ export default {
             return data
         },
         /**
-             * 设置表单字段数据
-             */
+         * 设置表单字段数据
+         */
         setFieldData (name, value) {
             this.models[name] = value
         },
         /**
-             * 设置表单权限
-             */
+         * 设置表单权限
+         */
         getFormRights (name) {
             return this.rights[name]
         },
         /**
-             * 设置表单权限
-             */
+         * 设置表单权限
+         */
         setFormRights (name, value) {
             this.rights[name] = value
         },
         /**
-             *  是否有审批意见字段
-             */
+         *  是否有审批意见字段
+         */
         hasFormOpinion () {
             return this.$utils.isNotEmpty(this.responseOpinionFields)
         },
         /**
-             * 获取审批意见数据
-             */
+         * 获取审批意见数据
+         */
         getFormOpinionData () {
             const data = {}
             for (var key in this.models) {
@@ -584,8 +595,8 @@ export default {
             return data
         },
         /**
-             * 获取审批意见验证
-             */
+         * 获取审批意见验证
+         */
         formOpinionValidate (callback, flag = false) {
             if (this.$utils.isEmpty(this.responseOpinionFields)) {
                 callback(true)
@@ -613,8 +624,8 @@ export default {
             }
         },
         /**
-             * 表单验证
-             */
+         * 表单验证
+         */
         validate (callback) {
             // 先移除校验再进行校验
             this.$refs.form.clearValidate()
@@ -632,8 +643,8 @@ export default {
             this.record = type
         }
         /**
-             * 获取表单字段的具体控件组件实例
-             */
+         * 获取表单字段的具体控件组件实例
+         */
         // getRefsField (fieldName) {
         //     const refs = this.getRefs(fieldName)
         //     if (this.$utils.isEmpty(refs) || this.$utils.isEmpty(refs[0]) || this.$utils.isEmpty(refs[0].$refs) || this.$utils.isEmpty(refs[0].$refs['formField'])) {

+ 1 - 1
src/business/platform/form/utils/custom/joinCURD.js

@@ -45,7 +45,7 @@ const dealData = (args, type) => {
     const data = typeof args === 'object' ? replaceNullWithEmpty(args) : args
     const plaintext = SHOW_PLAINTEXT ? { plaintext: data } : {}
     const res = {
-        ciphertext: encryptByAes(data),
+        ...encryptByAes(data),
         ...plaintext
     }
     return JSON.stringify(res)

+ 5 - 0
src/components/ibps-crud/index.vue

@@ -540,4 +540,9 @@ export default {
         display: flex;
         flex-wrap: wrap;
     }
+    /* 表单组件渲染时计算表单高度受转换元素影响(附件、人员、部门等) */
+    .elTable .el-table__body-wrapper{
+        height: v-bind(tableHeight);
+        overflow-y: auto;
+    }
 </style>

+ 29 - 2
src/components/ibps-fullcalendar/index.vue

@@ -27,14 +27,25 @@ export default {
     props: {
         options: {
             type: Object,
-            default: () => {}
+            default: () => ({})
+        },
+        // 新增配置项:是否隐藏其他月份日期
+        hideOtherMonthDays: {
+            type: Boolean,
+            default: false
         }
     },
     data () {
         return {
             calendarOptions: {
                 plugins: [dayGridPlugin, timeGridPlugin, listPlugin, bootstrapPlugin, interactionPlugin],
-                initialView: 'dayGridMonth'
+                initialView: 'dayGridMonth',
+                fixedWeekCount: false,
+                views: {
+                    dayGridMonth: {
+                        showNonCurrentDates: !this.hideOtherMonthDays // 是否隐藏非当前月日期
+                    }
+                }
             }
         }
     },
@@ -49,6 +60,22 @@ export default {
         locale () {
             return lang.localeMap[I18n.getLanguage()]
         }
+    },
+    watch: {
+        hideOtherMonthDays: {
+            handler (newVal) {
+                const calendarApi = this.$refs.fullCalendar?.getApi()
+                if (calendarApi) {
+                    calendarApi.setOption('views', {
+                        dayGridMonth: {
+                            showNonCurrentDates: !this.hideOtherMonthDays // 根据 prop 反转逻辑
+                        }
+                    })
+                    calendarApi.render() // 强制重新渲染
+                }
+            },
+            immediate: true
+        }
     }
 }
 </script>

+ 76 - 28
src/utils/encrypt.js

@@ -1,45 +1,93 @@
 import CryptoJS from 'crypto-js'
 const key1 = CryptoJS.enc.Utf8.parse('dmngJmmO+9GMw+tu')
-const iv1 = CryptoJS.enc.Utf8.parse('sanXyqhk8+U7LPP4')
 const key2 = CryptoJS.enc.Utf8.parse('49PBou+TREIOzSHj')
-const iv2 = CryptoJS.enc.Utf8.parse('5lDsNRe&UduJ97uS')
+// 固定IV 用于密码、get请求参数加密
+const defaultIv = CryptoJS.enc.Utf8.parse('5lDsNRe&UduJ97uS')
+
+// 动态IV生成器
+export const generateDynamicIV = () => {
+    // 1. 获取当前时间戳(8字节,64位)
+    const timestamp = Date.now()
+    // 将时间戳转换为8字节的WordArray(大端序)
+    const timestampBytes = CryptoJS.enc.Hex.parse(
+        timestamp.toString(16).padStart(16, '0')
+    )
+
+    // 2. 生成8字节随机数
+    const randomBytes = CryptoJS.lib.WordArray.random(8)
+
+    // 3. 构造IV(16字节)
+    const ivWords = [
+        // 前4字节:随机数的高4字节
+        randomBytes.words[0],
+        // 接下来4字节:时间戳的高4字节
+        timestampBytes.words[0],
+        // 接下来4字节:随机数的低4字节
+        randomBytes.words[1],
+        // 最后4字节:时间戳的低4字节
+        timestampBytes.words[1]
+    ]
+
+    return CryptoJS.lib.WordArray.create(ivWords, 16)
+}
 
 // AES加密
-export const encryptByAes = (pwd, type = 'normal') => {
+export const encryptByAes = (params, type = 'normal') => {
     let encrypted = ''
     const key = type === 'normal' ? key1 : key2
-    const iv = type === 'normal' ? iv1 : iv2
-    if (typeof pwd === 'string') {
-        const srcs = CryptoJS.enc.Utf8.parse(pwd)
-        const options = {
-            iv: iv,
-            mode: CryptoJS.mode.CBC, // 使用CBC模式
-            padding: CryptoJS.pad.Pkcs7 // 使用PKCS7填充
-        }
-        encrypted = CryptoJS.AES.encrypt(srcs, key, options)
-    } else if (typeof pwd === 'object') {
-        const data = JSON.stringify(pwd)
+    const iv = type === 'normal' ? generateDynamicIV() : defaultIv
+    if (typeof params === 'string' || typeof params === 'object') {
+        const data = typeof params === 'string' ? params : JSON.stringify(params)
         const srcs = CryptoJS.enc.Utf8.parse(data)
-        const options = {
+        encrypted = CryptoJS.AES.encrypt(srcs, key, {
             iv: iv,
-            mode: CryptoJS.mode.CBC, // 使用CBC模式
-            padding: CryptoJS.pad.Pkcs7 // 使用PKCS7填充
-        }
-        encrypted = CryptoJS.AES.encrypt(srcs, key, options)
+            mode: CryptoJS.mode.CBC,
+            padding: CryptoJS.pad.Pkcs7
+        })
+    }
+
+    return type === 'normal' ? {
+        ciphertext: encrypted.ciphertext.toString(CryptoJS.enc.Base64),
+        iv: iv.toString(CryptoJS.enc.Base64)
+    } : encrypted.ciphertext.toString(CryptoJS.enc.Base64)
+}
+
+const isValidBase64 = (str) => {
+    try {
+        return btoa(atob(str)) === str
+    } catch (e) {
+        return false
     }
-    return encrypted.ciphertext.toString(CryptoJS.enc.Base64)
 }
 
-export const decryptByAes = (encryptedText, type = 'normal') => {
+export const decryptByAes = (encryptedText, ivBase64 = null, type = 'normal') => {
     const key = type === 'normal' ? key1 : key2
-    const iv = type === 'normal' ? iv1 : iv2
+
+    if (!isValidBase64(ivBase64)) {
+        console.error('ivBase64不是有效的 Base64 字符串')
+        return ''
+    }
+    // 解析动态IV
+    const iv = CryptoJS.enc.Base64.parse(ivBase64)
+
     const options = {
         iv: iv,
-        mode: CryptoJS.mode.CBC, // 使用CBC模式
-        padding: CryptoJS.pad.Pkcs7 // 使用PKCS7填充
+        mode: CryptoJS.mode.CBC,
+        padding: CryptoJS.pad.Pkcs7
+    }
+
+    try {
+        const encryptedData = CryptoJS.enc.Base64.parse(encryptedText)
+        const decryptedData = CryptoJS.AES.decrypt(
+            { ciphertext: encryptedData },
+            key,
+            options
+        )
+
+        // 返回UTF-8解码的明文(去除首尾空格)
+        return decryptedData.toString(CryptoJS.enc.Utf8).trim()
+    } catch (error) {
+        console.error('AES解密失败:', error)
+        return ''
     }
-    const encryptedData = CryptoJS.enc.Base64.parse(encryptedText)
-    const decryptedData = CryptoJS.AES.decrypt({ ciphertext: encryptedData }, key, options)
-    const decryptedText = decryptedData.toString(CryptoJS.enc.Utf8)
-    return decryptedText.trim()
 }

+ 2 - 2
src/utils/request.js

@@ -97,7 +97,7 @@ service.interceptors.request.use(async config => {
     if (config.method.toUpperCase() === 'GET') {
         if (ENCRYPT_GET_PARAMS) {
             config.params = {
-                _p: Utils.isNotEmpty(config.params) ? encryptByAes(JSON.stringify(config.params)) : undefined,
+                _p: Utils.isNotEmpty(config.params) ? encryptByAes(JSON.stringify(config.params), 'get') : undefined,
                 _t: new Ids([32, 36, 1]).next()
             }
         } else {
@@ -277,4 +277,4 @@ service.interceptors.response.use(response => {
     return Promise.reject(error)
 })
 
-export default service
+export default service

+ 11 - 10
src/views/component/device/deviceDialog.vue

@@ -572,7 +572,7 @@
                                             <el-col :span="8">
                                                 <el-row>
                                                     <el-col>
-                                                        <el-form-item label="是否校准:" prop="shiFouXiaoZhun">
+                                                        <el-form-item label="是否校准:" prop="shiFouXiaoZhun" label-width="140px">
                                                             <el-select v-if="!readonly" v-model="form.shiFouXiaoZhun" placeholder="请选择" size="mini" style="width:100%">
                                                                 <el-option
                                                                     v-for="item in ['是','否']"
@@ -588,7 +588,7 @@
                                                 </el-row>
                                                 <el-row v-if="form.shiFouXiaoZhun==='是'">
                                                     <el-col>
-                                                        <el-form-item label="检定/校准周期(月):" label-width="140">
+                                                        <el-form-item label="检定/校准周期(月):" label-width="140px">
                                                             <el-input v-if="!readonly" v-model="form.xiaoZhunZQ" size="mini" type="number" style="width:100%" />
                                                             <span v-else>{{ form.xiaoZhunZQ ||'/' }}
                                                             </span>
@@ -597,7 +597,7 @@
                                                 </el-row>
                                                 <el-row v-if="form.shiFouXiaoZhun==='是'">
                                                     <el-col>
-                                                        <el-form-item label="检定/校准单位:">
+                                                        <el-form-item label="检定/校准单位:" label-width="140px">
                                                             <ibps-custom-dialog
                                                                 v-model="form.shiYongKeShi"
                                                                 size="mini"
@@ -614,7 +614,7 @@
                                                 </el-row>
                                                 <el-row v-if="form.shiFouXiaoZhun==='是'">
                                                     <el-col>
-                                                        <el-form-item label="最近校准时间:">
+                                                        <el-form-item label="最近校准时间:" label-width="140px">
                                                             <el-date-picker
                                                                 v-if="!readonly"
                                                                 v-model="form.yiXiaoRiQi"
@@ -632,7 +632,7 @@
                                                 </el-row>
                                                 <el-row v-if="form.shiFouXiaoZhun==='是'">
                                                     <el-col>
-                                                        <el-form-item label="校准有效期至:">
+                                                        <el-form-item label="检定/校准有效期至:" label-width="140px">
                                                             <el-date-picker
                                                                 v-if="!readonly"
                                                                 v-model="form.xiaoZhunYouXia"
@@ -650,7 +650,7 @@
                                                 </el-row>
                                                 <el-row v-if="form.shiFouXiaoZhun==='是'">
                                                     <el-col>
-                                                        <el-form-item label="校准证书编号:">
+                                                        <el-form-item label="检定/校准证书编号:" label-width="140px">
                                                             <el-input v-if="!readonly" v-model="form.zhengShuBianHa" size="mini" />
                                                             <span v-else>{{ form.zhengShuBianHa ||'/' }}
                                                             </span>
@@ -1030,7 +1030,8 @@ export default {
                 if (!val) return
                 const sql = `select fang_jian_ming_ha from t_jjqfjb where id_='${val}'`
                 const { variables: { data }} = await this.$common.request('sql', sql)
-                this.form.cunFangDiDian = data[0].fang_jian_ming_ha
+
+                this.form.cunFangDiDian = data && data[0] ? data[0].fang_jian_ming_ha : ''
             }
         },
         // 根据编制部门动态获取对应文件存放处数据
@@ -1053,9 +1054,9 @@ export default {
                         this.isFirstyiXiaoRiQi = false
                         return
                     }
-                    const zhouQi = this.form.xiaoZhunZQ || 0
-                    const result = this.$common.getFormatDate('string', 10, this.$common.getDate('month', Number(zhouQi), value))
-                    this.form.xiaoZhunYouXia = result
+                    const cycle = this.form.xiaoZhunZQ || 0
+                    const expiredDate = this.$common.getFormatDate('string', 10, this.$common.getDate('month', parseInt(cycle), value))
+                    this.form.xiaoZhunYouXia = this.$common.getFormatDate('string', 10, this.$common.getDate('day', -1, expiredDate))
                 }
             }
         }

+ 24 - 4
src/views/component/device/index.vue

@@ -299,8 +299,21 @@
                             />
                         </el-select>
                     </template>
-                    <template slot="place">
+                    <!-- <template slot="place">
                         <el-input v-model="search.place" size="mini" />
+                    </template> -->
+                    <template slot="place">
+                        <ibps-custom-dialog
+                            v-model="search.place"
+                            size="mini"
+                            template-key="fjxzkdd"
+                            multiple
+                            :disabled="false"
+                            type="dialog"
+                            class="custom-dialog"
+                            placeholder="请选择"
+                            icon="el-icon-search"
+                        />
                     </template>
                     <template slot="managePeople">
                         <ibps-user-selector
@@ -769,9 +782,16 @@ export default {
                 parameters.parameters.push(obj)
             }
             // 放置地点搜索
+            // if (this.search.place) {
+            //     const obj = { relation: 'AND', parameters: [] }
+            //     obj.parameters.push({ key: 'Q^cun_fang_di_dian_^SL', value: this.search.place, param: this.$utils.guid() })
+            //     parameters.parameters.push(obj)
+            // }
             if (this.search.place) {
-                const obj = { relation: 'AND', parameters: [] }
-                obj.parameters.push({ key: 'Q^cun_fang_di_dian_^SL', value: this.search.place, param: this.$utils.guid() })
+                const obj = { relation: 'OR', parameters: [] }
+                this.search.place.split(',').forEach(item => {
+                    obj.parameters.push({ key: 'Q^cun_fang_wei_zhi_^S', value: item, param: this.$utils.guid() })
+                })
                 parameters.parameters.push(obj)
             }
             // 保管人搜索(可多选)
@@ -786,7 +806,7 @@ export default {
             if (this.search.deviceClass) {
                 const obj = { relation: 'OR', parameters: [] }
                 this.search.deviceClass.split(',').forEach(item => {
-                    obj.parameters.push({ key: 'Q^wei_hu_fang_shi_^S', value: item, param: this.$utils.guid() })
+                    obj.parameters.push({ key: 'Q^wei_hu_fang_shi_^SL', value: item, param: this.$utils.guid() })
                 })
                 parameters.parameters.push(obj)
             }

+ 14 - 2
src/views/component/trainingManage/trainingStatic.vue

@@ -290,11 +290,23 @@ export default {
                     }
                 }]
             }
-
+            // 更新人员培训记录的培训人
+            const params2 = {
+                tableName: 't_xygpx',
+                updList: [{
+                    where: {
+                        pei_xun_ming_chen: row.id_
+                    },
+                    param: {
+                        parent_id_: buQianRen === '' ? this.params.peixunrenyuan : buQianRen + ',' + this.params.peixunrenyuan
+                    }
+                }]
+            }
             // 合并请求
             Promise.all([
                 this.$common.request('add', addParams),
-                this.$common.request('update', params)
+                this.$common.request('update', params),
+                this.$common.request('update', params2)
             ]).then(async ([addRes, updateRes]) => {
                 console.log('补签签到数据成功', addRes)
                 console.log('更新补签考试人员', updateRes)

+ 3 - 0
src/views/platform/bpmn/bpmInstHis/list.vue

@@ -717,6 +717,7 @@ export default {
                             this.$common.request('delete', deleteParams2)
                         })
                         this.$message.success('删除成功!')
+                        this.$refs['crud']?.clearSelection()
                         this.search()
                     })
                 }).catch(() => {
@@ -727,6 +728,8 @@ export default {
         handleNodeClick (typeId, typeName) {
             this.tableTitle = typeName.name
             this.typeId = typeId
+            // 切换分类清除选中数据
+            this.$refs['crud']?.clearSelection()
             this.templateData = this.reportAll.template.find(i => i.fen_lei_id_ === typeId) || {}
             if (!this.templateData.templateid_) {
                 this.templateShow = false

+ 18 - 6
src/views/platform/examination/exam/list.vue

@@ -73,6 +73,7 @@ import { examTypeOptions, statusOption, basicColumn, infoColumn, resultColumn }
 import ActionUtils from '@/utils/action'
 import FixHeight from '@/mixins/height'
 import { max, min, mean, sum, maxBy, minBy, meanBy, round, keyBy, mapValues } from 'lodash'
+import { removeFormData } from '@/api/platform/data/dataTemplate'
 
 const sortField = {
     CREATE_TIME_: 'ex.chuang_jian_shi_j',
@@ -624,7 +625,9 @@ export default {
                     end_time_: limitDate !== '不限' ? limitDate.slice(0, 10) : now,
                     emergency_state_: '2',
                     user_id_: i,
-                    user_name_: this.transformUser(i)
+                    user_name_: this.transformUser(i),
+                    data_source_id_: examId,
+                    data_info_: 't_exams'
                 }))
                 this.$common.request('add', {
                     tableName: 'ibps_party_user_calendar',
@@ -715,20 +718,29 @@ export default {
             if (!ids || !ids.length) {
                 return this.$message.warning('请选择要删除的考试!')
             }
-            this.$confirm('数据一旦删除无法恢复,确定要删除选中的考试吗?', '提示', {
+            this.$confirm('将删除所选考试及已产生的试卷数据,数据删除后无法恢复,确定要继续吗?', '提示', {
                 confirmButtonText: '确认',
                 cancelButtonText: '取消',
                 type: 'warning',
                 showClose: false,
                 closeOnClickModal: false
             }).then(() => {
-                this.$common.request('delete', {
-                    tableName: 't_exams',
-                    paramWhere: { id_: ids.join(',') }
+                removeFormData({
+                    formKey: 'examForDelete',
+                    ids: ids.join(',')
                 }).then(() => {
                     ActionUtils.removeSuccessMessage()
                     this.search()
-                })
+                }).catch(() => {})
+
+                // // 自定义删除方法,弃用,无法联动删除子表数据及考试对应日程数据
+                // this.$common.request('delete', {
+                //     tableName: 't_exams',
+                //     paramWhere: { id_: ids.join(',') }
+                // }).then(() => {
+                //     ActionUtils.removeSuccessMessage()
+                //     this.search()
+                // })
             })
         },
         transformUser (userId) {

+ 4 - 1
src/views/platform/risk/riskV2.vue

@@ -881,11 +881,14 @@ export default {
                 }
                 await this.showAlert()
             } else {
+                const { positions } = this.$store.getters.userInfo
+                // 默认编制部门是主部门,没有主部门默认第一个部门
+                const mainPost = positions.find(item => item.isMainPost === 'Y')?.id || positions[0].id
                 this.readonly = false
                 this.infoFxssbData.di_dian_ = this.level
                 this.infoFxssbData.ji_hua_bian_hao_ = await this.getNextAlias('fxjhlsh')
                 this.infoFxssbData.nian_du_ = dayjs().format('YYYY')
-                this.infoFxssbData.bian_zhi_bu_men_ = this.position
+                this.infoFxssbData.bian_zhi_bu_men_ = mainPost
                 this.infoFxssbData.bian_zhi_ren_ = this.userId
                 this.infoFxssbData.bian_zhi_shi_jian = dayjs().format('YYYY-MM-DD HH:mm:ss')
                 this.infoFxssbData.zu_chang_id_ = this.userId

+ 16 - 1
src/views/platform/system/tools/convertByAes.vue

@@ -55,6 +55,17 @@
                         />
                     </div>
                 </div>
+                <div class="item">
+                    <div class="label">ivBase64</div>
+                    <div class="value">
+                        <el-input
+                            v-model="ivBase64"
+                            type="textarea"
+                            :rows="1"
+                            placeholder="请输入ivBase64"
+                        />
+                    </div>
+                </div>
             </div>
         </div>
     </el-dialog>
@@ -72,6 +83,7 @@ export default {
         return {
             dialogVisible: this.visible,
             plaintext: '',
+            ivBase64: '',
             ciphertext: ''
         }
     },
@@ -102,7 +114,10 @@ export default {
             if (!this.ciphertext) {
                 return this.$message.warning('请输入密文!')
             }
-            const temp = this.$common.decryptByAes(this.ciphertext)
+            if (!this.ivBase64) {
+                return this.$message.warning('请输入ivBase64!')
+            }
+            const temp = this.$common.decryptByAes(this.ciphertext, this.ivBase64)
             if (this.$utils.isEmpty(temp)) {
                 return this.$message.error('密文无效,无法解密!')
             }

+ 1 - 1
src/views/system/fasc/facilityEnvConfig.vue

@@ -747,7 +747,7 @@ export default {
                 if (this.deviceIsRequired && item.deviceno1_ === '') {
                     return this.$message.warning(`子表第${i + 1}行设备信息缺失!`)
                 }
-                if (this.form.lei_xing_ === '01-室内温湿度监控' && item.fang_jian_ === '') {
+                if (this.shouldRequired('fang_jian_') && item.fang_jian_ === '') {
                     return this.$message.warning(`子表第${i + 1}行房间信息缺失!`)
                 }
                 if (item.lie_biao_shu_ju_) {

+ 6 - 6
src/views/system/fasc/fecDialog.vue

@@ -51,7 +51,10 @@
                     </el-row>
                     <el-row>
                         <el-col :span="12">
-                            <el-form-item v-if="lei_xing_!=='01-室内温湿度监控'" label="房间:">
+                            <el-form-item v-if="shouldRequired('fang_jian_')" label="房间:">
+                                <template slot="label">
+                                    <span class="required">房间:</span>
+                                </template>
                                 <ibps-link-data
                                     v-model="form.fang_jian_"
                                     style="width:80%"
@@ -67,9 +70,6 @@
                                 />
                             </el-form-item>
                             <el-form-item v-else label="房间:">
-                                <template slot="label">
-                                    <span class="required">房间:</span>
-                                </template>
                                 <ibps-link-data
                                     v-model="form.fang_jian_"
                                     style="width:80%"
@@ -640,8 +640,8 @@ export default {
             if (this.deviceIsRequired && this.form.deviceno1_ === '') {
                 throw new Error('请先选择设备!')
             }
-            if (this.lei_xing_ === '01-室内温湿度监控' && this.form.fang_jian_ === '') {
-                throw new Error('室内温湿度类型必须填写房间!')
+            if (this.shouldRequired('fang_jian_') && this.form.fang_jian_ === '') {
+                throw new Error('请先选择房间!')
             }
             if (this.form.lie_biao_shu_ju_) {
                 const lie_biao_shu_ju_ = JSON.parse(this.form.lie_biao_shu_ju_)

+ 1 - 0
src/views/system/homepage/components/mySchedule.vue

@@ -15,6 +15,7 @@
         <v-full-calendar
             ref="calendar"
             :options="scheduleConfig"
+            :hide-other-month-days="true"
             :style="{height: '100%', width: '100%'}"
         />
     </el-dialog>