瀏覽代碼

近期改动同步

cfort 1 年之前
父節點
當前提交
2fbed95ad9

+ 76 - 102
src/views/platform/bpmn/bpmAgent/edit.vue

@@ -91,12 +91,8 @@
                             />
                             />
                             <el-tag
                             <el-tag
                                 v-else
                                 v-else
-                                :type="
-                                    bpmAgent.isEnabled | optionsFilter(statusOptions, 'type')
-                                "
-                            >{{
-                                bpmAgent.isEnabled | optionsFilter(statusOptions, "label")
-                            }}</el-tag>
+                                :type="bpmAgent.isEnabled | optionsFilter(statusOptions, 'type')"
+                            >{{ bpmAgent.isEnabled | optionsFilter(statusOptions, "label") }}</el-tag>
                         </el-form-item>
                         </el-form-item>
                     </el-col>
                     </el-col>
                 </el-row>
                 </el-row>
@@ -126,9 +122,7 @@
                     </el-col>
                     </el-col>
                     <el-col :span="12">
                     <el-col :span="12">
                         <el-form-item
                         <el-form-item
-                            v-if="
-                                bpmAgent.agentType === 'all' || bpmAgent.agentType === 'part'
-                            "
+                            v-if="bpmAgent.agentType === 'all' || bpmAgent.agentType === 'part'"
                             label="代理人:"
                             label="代理人:"
                             prop="agenterId"
                             prop="agenterId"
                         >
                         >
@@ -169,9 +163,7 @@
                                     :label="item.id"
                                     :label="item.id"
                                 >{{ item.name }}</el-checkbox>
                                 >{{ item.name }}</el-checkbox>
                             </el-checkbox-group>
                             </el-checkbox-group>
-                            <span v-else>{{
-                                getWeiTuoName(bpmAgent.bpmAgentRoleList, roleList)
-                            }}</span>
+                            <span v-else>{{ getWeiTuoName(bpmAgent.bpmAgentRoleList, roleList) }}</span>
                         </el-form-item>
                         </el-form-item>
                     </el-col>
                     </el-col>
                 </el-row>
                 </el-row>
@@ -200,12 +192,8 @@
                             </el-radio-group>
                             </el-radio-group>
                             <el-tag
                             <el-tag
                                 v-else
                                 v-else
-                                :type="
-                                    bpmAgent.agentType | optionsFilter(agentTypeOptions, 'type')
-                                "
-                            >{{
-                                bpmAgent.agentType | optionsFilter(agentTypeOptions, "label")
-                            }}</el-tag>
+                                :type="bpmAgent.agentType | optionsFilter(agentTypeOptions, 'type')"
+                            >{{ bpmAgent.agentType | optionsFilter(agentTypeOptions, "label") }}</el-tag>
                         </el-form-item>
                         </el-form-item>
                     </el-col>
                     </el-col>
                 </el-row>
                 </el-row>
@@ -240,9 +228,7 @@
                         >
                         >
                             <el-table-column v-if="!readonly" type="selection" width="45" />
                             <el-table-column v-if="!readonly" type="selection" width="45" />
                             <el-table-column label="流程名称">
                             <el-table-column label="流程名称">
-                                <template slot-scope="scope">{{
-                                    scope.row.procDefName ? scope.row.procDefName : scope.row.name
-                                }}</template>
+                                <template slot-scope="scope">{{ scope.row.procDefName ? scope.row.procDefName : scope.row.name }}</template>
                             </el-table-column>
                             </el-table-column>
                             <el-table-column v-if="!readonly" label="操作" width="55">
                             <el-table-column v-if="!readonly" label="操作" width="55">
                                 <template slot-scope="scope">
                                 <template slot-scope="scope">
@@ -293,9 +279,7 @@
                         >
                         >
                             <el-table-column type="selection" width="55" />
                             <el-table-column type="selection" width="55" />
                             <el-table-column label="代理人">
                             <el-table-column label="代理人">
-                                <template slot-scope="scope">{{
-                                    scope.row.agenterName
-                                }}</template>
+                                <template slot-scope="scope">{{ scope.row.agenterName }}</template>
                             </el-table-column>
                             </el-table-column>
                             <el-table-column label="条件名称">
                             <el-table-column label="条件名称">
                                 <template slot-scope="scope">{{ scope.row.name }}</template>
                                 <template slot-scope="scope">{{ scope.row.name }}</template>
@@ -418,12 +402,18 @@ export default {
                 delegatorId: [
                 delegatorId: [
                     { required: true, message: this.$t('validate.required') }
                     { required: true, message: this.$t('validate.required') }
                 ],
                 ],
-                agenterId: [{ required: true, message: this.$t('validate.required') }],
+                agenterId: [
+                    { required: true, message: this.$t('validate.required') }
+                ],
                 effectiveTime: [
                 effectiveTime: [
                     { required: true, message: this.$t('validate.required') }
                     { required: true, message: this.$t('validate.required') }
                 ],
                 ],
-                expiryTime: [{ required: true, message: this.$t('validate.required') }],
-                isEnabled: [{ required: true, message: this.$t('validate.required') }]
+                expiryTime: [
+                    { required: true, message: this.$t('validate.required') }
+                ],
+                isEnabled: [
+                    { required: true, message: this.$t('validate.required') }
+                ]
             },
             },
             toolbars: [
             toolbars: [
                 {
                 {
@@ -436,7 +426,6 @@ export default {
             ],
             ],
             url: '',
             url: '',
             srcList: [],
             srcList: [],
-
             // 委托人和代理人 选择器修改通用选择器,需要这些参数
             // 委托人和代理人 选择器修改通用选择器,需要这些参数
             type: 'user',
             type: 'user',
             filter: [
             filter: [
@@ -513,10 +502,9 @@ export default {
         })
         })
     },
     },
     methods: {
     methods: {
-    // 初始化
+        // 初始化
         getInit () {
         getInit () {
-            this.filter[0].partyId =
-        this.$store.getters.userInfo.employee.positions || ''
+            this.filter[0].partyId = this.$store.getters.userInfo.employee.positions || ''
         },
         },
         handleEdit () {
         handleEdit () {
             this.rowLoading = true
             this.rowLoading = true
@@ -536,7 +524,7 @@ export default {
         handleDelete (index, arr) {
         handleDelete (index, arr) {
             this.rowLoading = true
             this.rowLoading = true
             setTimeout(() => {
             setTimeout(() => {
-                if (arr !== []) {
+                if (Array.isArray(arr)) {
                     this.bpmAgent.bpmAgentDefPoList.splice(index, 1)
                     this.bpmAgent.bpmAgentDefPoList.splice(index, 1)
                 } else {
                 } else {
                     arr.forEach((i) => {
                     arr.forEach((i) => {
@@ -600,36 +588,30 @@ export default {
         // 提交保存数据
         // 提交保存数据
         saveData () {
         saveData () {
             const data = JSON.parse(JSON.stringify(this.bpmAgent))
             const data = JSON.parse(JSON.stringify(this.bpmAgent))
-            data.effectiveTime =
-        new Date(this.bpmAgent.effectiveTime).getTime() || ''
+            data.effectiveTime = new Date(this.bpmAgent.effectiveTime).getTime() || ''
             data.expiryTime = new Date(this.bpmAgent.expiryTime).getTime() || ''
             data.expiryTime = new Date(this.bpmAgent.expiryTime).getTime() || ''
             // 检测生效时间日期是否发布日期在之前。
             // 检测生效时间日期是否发布日期在之前。
             if (data.effectiveTime > data.expiryTime) {
             if (data.effectiveTime > data.expiryTime) {
                 ActionUtils.error('生效时间与失效时间范围不合法!')
                 ActionUtils.error('生效时间与失效时间范围不合法!')
                 return
                 return
             }
             }
-            if (
-                this.$utils.isEmpty(this.bpmAgent.bpmAgentDefPoList) &&
-        this.bpmAgent.agentType === 'part'
-            ) {
+            if (this.$utils.isEmpty(this.bpmAgent.bpmAgentDefPoList) && this.bpmAgent.agentType === 'part') {
                 ActionUtils.error('流程定义数据不能为空!')
                 ActionUtils.error('流程定义数据不能为空!')
                 return
                 return
             }
             }
-            save(this.bpmAgent)
-                .then((response) => {
-                    this.$emit('callback', this)
-                    ActionUtils.saveSuccessMessage(response.message, (rtn) => {
-                        if (this.$utils.isEmpty(this.formId)) {
-                            this.$refs[this.formName].resetFields()
-                        }
-                        if (rtn) {
-                            this.closeDialog()
-                        }
-                    })
-                })
-                .catch(() => {
-                    ActionUtils.error('无法保存,请稍后检查数据重新再试')
+            save(this.bpmAgent).then((response) => {
+                this.$emit('callback', this)
+                ActionUtils.saveSuccessMessage(response.message, (rtn) => {
+                    if (this.$utils.isEmpty(this.formId)) {
+                        this.$refs[this.formName].resetFields()
+                    }
+                    if (rtn) {
+                        this.closeDialog()
+                    }
                 })
                 })
+            }).catch(() => {
+                ActionUtils.error('无法保存,请稍后检查数据重新再试')
+            })
         },
         },
         // 关闭当前窗口
         // 关闭当前窗口
         closeDialog () {
         closeDialog () {
@@ -640,8 +622,8 @@ export default {
             // this.checkRoleList = []
             // this.checkRoleList = []
         },
         },
         /**
         /**
-     * 表单验证
-     */
+         * 表单验证
+         */
         formValidate () {
         formValidate () {
             if (this.readonly) return
             if (this.readonly) return
             this.$nextTick(() => {
             this.$nextTick(() => {
@@ -649,8 +631,8 @@ export default {
             })
             })
         },
         },
         /**
         /**
-     * 获取表单数据
-     */
+         * 获取表单数据
+         */
         getFormData () {
         getFormData () {
             if (this.$utils.isEmpty(this.formId)) {
             if (this.$utils.isEmpty(this.formId)) {
                 // 重置表单
                 // 重置表单
@@ -659,20 +641,15 @@ export default {
                 return
                 return
             }
             }
             this.dialogLoading = true
             this.dialogLoading = true
-            get({
-                id: this.formId
+            get({ id: this.formId }).then((response) => {
+                this.bpmAgent = response.data
+                // this.checkRoleList = response.data.bpmAgentRoleList || []
+                this.bpmAgent.bpmAgentRoleList = response.data.bpmAgentRoleList || []
+                this.formValidate()
+                this.dialogLoading = false
+            }).catch(() => {
+                this.dialogLoading = false
             })
             })
-                .then((response) => {
-                    this.bpmAgent = response.data
-
-                    // this.checkRoleList = response.data.bpmAgentRoleList || []
-                    this.bpmAgent.bpmAgentRoleList = response.data.bpmAgentRoleList || []
-                    this.formValidate()
-                    this.dialogLoading = false
-                })
-                .catch(() => {
-                    this.dialogLoading = false
-                })
         },
         },
         addDef () {
         addDef () {
             alert('打开流程选择器')
             alert('打开流程选择器')
@@ -704,8 +681,7 @@ export default {
                 if (this.$utils.isEmpty(this.bpmAgent.bpmAgentDefPoList)) {
                 if (this.$utils.isEmpty(this.bpmAgent.bpmAgentDefPoList)) {
                     this.bpmAgent.bpmAgentDefPoList = arr
                     this.bpmAgent.bpmAgentDefPoList = arr
                 } else {
                 } else {
-                    this.bpmAgent.bpmAgentDefPoList =
-            this.bpmAgent.bpmAgentDefPoList.concat(arr)
+                    this.bpmAgent.bpmAgentDefPoList = this.bpmAgent.bpmAgentDefPoList.concat(arr)
                 }
                 }
                 this.rowLoading = false
                 this.rowLoading = false
             })
             })
@@ -754,22 +730,20 @@ export default {
         getWeiTuo (id, type = 1, formId = '') {
         getWeiTuo (id, type = 1, formId = '') {
             if (!id) return
             if (!id) return
             return new Promise((resolve) => {
             return new Promise((resolve) => {
-                load({ employeeId: id })
-                    .then((response) => {
-                        const data = response
-                        const partyRole = response.variables.partyRoles
-                        if (type === 1) {
-                            this.yuanRoleList = partyRole || []
-                        }
-                        if (type === 2) {
-                            this.daiRoleList = partyRole || []
-                            const roleName = partyRole.map((item) => item.name)
-                            this.daiRoleName = roleName.join(',')
-                        }
-                        this.getRoleList()
-                        resolve(data)
-                    })
-                    .catch(() => {})
+                load({ employeeId: id }).then((response) => {
+                    const data = response
+                    const partyRole = response.variables.partyRoles
+                    if (type === 1) {
+                        this.yuanRoleList = partyRole || []
+                    }
+                    if (type === 2) {
+                        this.daiRoleList = partyRole || []
+                        const roleName = partyRole.map((item) => item.name)
+                        this.daiRoleName = roleName.join(',')
+                    }
+                    this.getRoleList()
+                    resolve(data)
+                }).catch(() => {})
             })
             })
         },
         },
         // 获取委托人角色信息
         // 获取委托人角色信息
@@ -803,29 +777,29 @@ export default {
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .bpmn-agent-dialog {
 .bpmn-agent-dialog {
-  ::v-deep .el-dialog__body {
-    height: calc(70vh - 110px) !important;
-  }
-  .dialog-right {
-    float: right;
-    div {
-      display: inline-block;
+    ::v-deep .el-dialog__body {
+        height: calc(70vh - 110px) !important;
+    }
+    .dialog-right {
+        float: right;
+        div {
+            display: inline-block;
+        }
     }
     }
-  }
 }
 }
 .imageListClass {
 .imageListClass {
-  display: flex;
-  flex-wrap: wrap;
+    display: flex;
+    flex-wrap: wrap;
 }
 }
 .bpmnForm {
 .bpmnForm {
-  padding: 20px;
+    padding: 20px;
 }
 }
 .time {
 .time {
-  width: 100%;
+    width: 100%;
 }
 }
 .sinImageList {
 .sinImageList {
-  width: 150px;
-  height: 150px;
-  margin: 10px;
+    width: 150px;
+    height: 150px;
+    margin: 10px;
 }
 }
 </style>
 </style>

+ 55 - 73
src/views/platform/bpmn/bpmAgent/list.vue

@@ -176,18 +176,16 @@ export default {
             },
             },
             // 委托人和代理人 选择器修改通用选择器,需要这些参数
             // 委托人和代理人 选择器修改通用选择器,需要这些参数
             type: 'user',
             type: 'user',
-            filter: [
-                {
-                    descVal: '2',
-                    includeSub: true,
-                    old: 'position',
-                    partyId: '',
-                    partyName: '',
-                    scriptContent: '',
-                    type: 'user',
-                    userType: 'position'
-                }
-            ],
+            filter: [{
+                descVal: '2',
+                includeSub: true,
+                old: 'position',
+                partyId: '',
+                partyName: '',
+                scriptContent: '',
+                type: 'user',
+                userType: 'position'
+            }],
             multiple: false,
             multiple: false,
             filtrate: true,
             filtrate: true,
             store: 'id',
             store: 'id',
@@ -202,12 +200,10 @@ export default {
         this.getInit()
         this.getInit()
         this.loadData()
         this.loadData()
     },
     },
-
     methods: {
     methods: {
-    // 初始化
+        // 初始化
         getInit () {
         getInit () {
-            this.filter[0].partyId =
-        this.$store.getters.userInfo.employee.positions || ''
+            this.filter[0].partyId = this.$store.getters.userInfo.employee.positions || ''
         },
         },
         getDelegatorId (value) {
         getDelegatorId (value) {
             this.searchDelegatorId = value
             this.searchDelegatorId = value
@@ -218,48 +214,44 @@ export default {
         // 加载数据
         // 加载数据
         loadData () {
         loadData () {
             this.loading = true
             this.loading = true
-            queryPageList(this.getSearcFormData())
-                .then((response) => {
-                    ActionUtils.handleListData(this, response.data)
-                    this.loading = false
-                })
-                .catch(() => {
-                    this.loading = false
-                })
+            queryPageList(this.getSearcFormData()).then((response) => {
+                ActionUtils.handleListData(this, response.data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
         },
         },
         /**
         /**
-     * 获取格式化参数
-     */
+         * 获取格式化参数
+         */
         getSearcFormData () {
         getSearcFormData () {
-            const params = this.$refs['crud']
-                ? this.$refs['crud'].getSearcFormData()
-                : {}
+            const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
             params['Q^AGENTER_ID_^S'] = this.searchDelegatorId
             params['Q^AGENTER_ID_^S'] = this.searchDelegatorId
             return ActionUtils.formatParams(params, this.pagination, this.sorts)
             return ActionUtils.formatParams(params, this.pagination, this.sorts)
         },
         },
         /**
         /**
-     * 处理分页事件
-     */
+         * 处理分页事件
+         */
         handlePaginationChange (page) {
         handlePaginationChange (page) {
             ActionUtils.setPagination(this.pagination, page)
             ActionUtils.setPagination(this.pagination, page)
             this.loadData()
             this.loadData()
         },
         },
         /**
         /**
-     * 处理排序
-     */
+         * 处理排序
+         */
         handleSortChange (sort) {
         handleSortChange (sort) {
             ActionUtils.setSorts(this.sorts, sort)
             ActionUtils.setSorts(this.sorts, sort)
             this.loadData()
             this.loadData()
         },
         },
         /**
         /**
-     * 查询
-     */
+         * 查询
+         */
         search () {
         search () {
             this.loadData()
             this.loadData()
         },
         },
         /**
         /**
-     * 处理按钮事件
-     */
+         * 处理按钮事件
+         */
         handleAction (command, position, selection, data) {
         handleAction (command, position, selection, data) {
             switch (command) {
             switch (command) {
                 case 'search': // 查询
                 case 'search': // 查询
@@ -271,30 +263,24 @@ export default {
                     this.title = '事务代理设置'
                     this.title = '事务代理设置'
                     break
                     break
                 case 'edit': // 编辑
                 case 'edit': // 编辑
-                    ActionUtils.selectedRecord(selection)
-                        .then((id) => {
-                            if (!this.isSuper && this.userId !== data[0].delegatorId) {
-                                return ActionUtils.noPowerMessage()
-                            }
-                            this.handleEdit(id)
-                            this.title = '编辑流程代理'
-                        })
-                        .catch(() => {})
+                    ActionUtils.selectedRecord(selection).then((id) => {
+                        if (!this.isSuper && this.userId !== data[0].delegatorId) {
+                            return ActionUtils.noPowerMessage()
+                        }
+                        this.handleEdit(id)
+                        this.title = '编辑流程代理'
+                    }).catch(() => {})
                     break
                     break
                 case 'detail': // 明细
                 case 'detail': // 明细
-                    ActionUtils.selectedRecord(selection)
-                        .then((id) => {
-                            this.handleEdit(id, true)
-                            this.title = '流程代理明细'
-                        })
-                        .catch(() => {})
+                    ActionUtils.selectedRecord(selection).then((id) => {
+                        this.handleEdit(id, true)
+                        this.title = '流程代理明细'
+                    }).catch(() => {})
                     break
                     break
                 case 'remove': // 删除
                 case 'remove': // 删除
-                    ActionUtils.removeRecord(selection)
-                        .then((ids) => {
-                            this.handleRemove(ids)
-                        })
-                        .catch(() => {})
+                    ActionUtils.removeRecord(selection).then((ids) => {
+                        this.handleRemove(ids)
+                    }).catch(() => {})
                     break
                     break
                 case 'enabled': // 启用
                 case 'enabled': // 启用
                     this.handleSetEnable(data.id, 'enabled')
                     this.handleSetEnable(data.id, 'enabled')
@@ -307,32 +293,28 @@ export default {
             }
             }
         },
         },
         /**
         /**
-     * 处理编辑。
-     */
+         * 处理编辑。
+         */
         handleEdit (id = '', readonly = false) {
         handleEdit (id = '', readonly = false) {
             this.editId = id
             this.editId = id
             this.readonly = readonly
             this.readonly = readonly
             this.dialogFormVisible = true
             this.dialogFormVisible = true
         },
         },
         /**
         /**
-     * 处理删除
-     */
+         * 处理删除
+         */
         handleRemove (ids) {
         handleRemove (ids) {
-            remove({ ids: ids })
-                .then((response) => {
-                    ActionUtils.removeSuccessMessage()
-                    this.search()
-                })
-                .catch(() => {})
+            remove({ ids: ids }).then((response) => {
+                ActionUtils.removeSuccessMessage()
+                this.search()
+            }).catch(() => {})
         },
         },
         handleSetEnable (id, status) {
         handleSetEnable (id, status) {
             const params = { id: id, isEnabled: status }
             const params = { id: id, isEnabled: status }
-            setEnable(params)
-                .then((response) => {
-                    ActionUtils.removeSuccessMessage(response.message)
-                    this.search()
-                })
-                .catch(() => {})
+            setEnable(params).then((response) => {
+                ActionUtils.removeSuccessMessage(response.message)
+                this.search()
+            }).catch(() => {})
         }
         }
     }
     }
 }
 }

+ 109 - 139
src/views/platform/org/employee/edit/index.vue

@@ -24,7 +24,7 @@
                     :readonly="readonly"
                     :readonly="readonly"
                     :data="employee"
                     :data="employee"
                     :form-type="formType"
                     :form-type="formType"
-                    @input="(data) => (employee = data)"
+                    @input="data => employee = data"
                 />
                 />
             </el-tab-pane>
             </el-tab-pane>
             <el-tab-pane v-if="isSuper" label="扩展属性" name="ext-attr">
             <el-tab-pane v-if="isSuper" label="扩展属性" name="ext-attr">
@@ -32,7 +32,7 @@
                     ref="attrInfo"
                     ref="attrInfo"
                     :readonly="readonly"
                     :readonly="readonly"
                     :data="employee.attrItemList"
                     :data="employee.attrItemList"
-                    @input="(data) => (employee.attrItemList = data)"
+                    @input="data => employee.attrItemList = data"
                 />
                 />
             </el-tab-pane>
             </el-tab-pane>
             <!-- <el-tab-pane
             <!-- <el-tab-pane
@@ -58,7 +58,7 @@
                     :readonly="readonly"
                     :readonly="readonly"
                     :org-id="orgId"
                     :org-id="orgId"
                     :data="employee.posItemList"
                     :data="employee.posItemList"
-                    @input="(data) => (employee.posItemList = data)"
+                    @input="data => employee.posItemList = data"
                 />
                 />
             </el-tab-pane>
             </el-tab-pane>
             <el-tab-pane
             <el-tab-pane
@@ -82,7 +82,7 @@
                     :span="span"
                     :span="span"
                     :readonly="readonly"
                     :readonly="readonly"
                     :data="employee.roleItemList"
                     :data="employee.roleItemList"
-                    @input="(data) => (employee.roleItemList = data)"
+                    @input="data => employee.roleItemList = data"
                 />
                 />
             </el-tab-pane>
             </el-tab-pane>
             <!-- <el-tab-pane label="用户组信息" name="group-info">
             <!-- <el-tab-pane label="用户组信息" name="group-info">
@@ -106,7 +106,7 @@
             :visible.sync="qrcodeVisible"
             :visible.sync="qrcodeVisible"
             :content="personalInfo"
             :content="personalInfo"
             :photo="employee.photo"
             :photo="employee.photo"
-            @close="(visible) => (qrcodeVisible = visible)"
+            @close="visible => (qrcodeVisible = visible)"
         />
         />
     </el-dialog>
     </el-dialog>
 </template>
 </template>
@@ -186,9 +186,7 @@ export default {
             toolbars: [
             toolbars: [
                 {
                 {
                     key: 'save',
                     key: 'save',
-                    hidden: () => {
-                        return this.readonly && this.formType === 'detail'
-                    }
+                    hidden: () => { return this.readonly && this.formType === 'detail' }
                 },
                 },
                 {
                 {
                     key: 'qrcode',
                     key: 'qrcode',
@@ -264,22 +262,20 @@ export default {
                 mobile: this.employee.mobile,
                 mobile: this.employee.mobile,
                 email: this.employee.email,
                 email: this.employee.email,
                 gender: this.employee.gender,
                 gender: this.employee.gender,
-                dept: this.employee.posItemList.map((i) => i.name).join(','),
-                role: this.employee.roleItemList.map((i) => i.name).join(',')
+                dept: this.employee.posItemList.map(i => i.name).join(','),
+                role: this.employee.roleItemList.map(i => i.name).join(',')
             })
             })
             this.qrcodeVisible = true
             this.qrcodeVisible = true
         },
         },
         checkPhone (value) {
         checkPhone (value) {
-            const reg =
-        /^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\d{8}$/
+            const reg = /^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\d{8}$/
             if (!reg.test(value)) {
             if (!reg.test(value)) {
                 return false
                 return false
             }
             }
             return true
             return true
         },
         },
         checkEmail (value) {
         checkEmail (value) {
-            const reg =
-        /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
+            const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
             if (!reg.test(value)) {
             if (!reg.test(value)) {
                 return false
                 return false
             }
             }
@@ -290,7 +286,7 @@ export default {
                 id: this.employee.id,
                 id: this.employee.id,
                 account: this.employee.account
                 account: this.employee.account
             }
             }
-            upEmployee(params).then((res) => {
+            upEmployee(params).then(res => {
                 if (res.state === 200) {
                 if (res.state === 200) {
                     const data = res.variables.data
                     const data = res.variables.data
                     if (data === 'Y') {
                     if (data === 'Y') {
@@ -302,44 +298,36 @@ export default {
             })
             })
         },
         },
         createTrain (id) {
         createTrain (id) {
-            const { isTrain, trainType, teacher, jianDingZiGeZ } =
-        this.employee || {}
+            const { isTrain, trainType, teacher, jianDingZiGeZ } = this.employee || {}
             const { first, second } = this.$store.getters.level || {}
             const { first, second } = this.$store.getters.level || {}
             const { userList } = this.$store.getters || {}
             const { userList } = this.$store.getters || {}
             if (isTrain !== 'Y') {
             if (isTrain !== 'Y') {
                 return
                 return
             }
             }
             const time = this.$common.getDateNow(19)
             const time = this.$common.getDateNow(19)
-            const userInfo = userList.find((item) => item.userId === teacher) || {}
+            const userInfo = userList.find(item => item.userId === teacher) || {}
             const addTrainData = {
             const addTrainData = {
                 tableName: 't_lhgqpxjh',
                 tableName: 't_lhgqpxjh',
-                paramWhere: [
-                    {
-                        di_dian_: second || first,
-                        nian_du_: time.slice(0, 4),
-                        bian_zhi_bu_men_: userInfo
-                            ? userInfo.positionId.split(',').pop()
-                            : '',
-                        bian_zhi_ren_: teacher,
-                        bian_zhi_shi_jian: time,
-                        shi_fou_guo_shen_: '已编制',
-                        bu_men_: '',
-                        pei_xun_lei_xing_: trainType,
-                        ru_zhi_zhuan_gang: time,
-                        yuan_gong_xing_mi: id,
-                        gong_hao_: jianDingZiGeZ
-                    }
-                ],
+                paramWhere: [{
+                    di_dian_: second || first,
+                    nian_du_: time.slice(0, 4),
+                    bian_zhi_bu_men_: userInfo ? userInfo.positionId.split(',').pop() : '',
+                    bian_zhi_ren_: teacher,
+                    bian_zhi_shi_jian: time,
+                    shi_fou_guo_shen_: '已编制',
+                    bu_men_: '',
+                    pei_xun_lei_xing_: trainType,
+                    ru_zhi_zhuan_gang: time,
+                    yuan_gong_xing_mi: id,
+                    gong_hao_: jianDingZiGeZ
+                }],
                 formKey: 'lhgqpxypjb',
                 formKey: 'lhgqpxypjb',
                 defKey: 'Process_1a66tzk'
                 defKey: 'Process_1a66tzk'
             }
             }
             this.$common.request('add', addTrainData)
             this.$common.request('add', addTrainData)
         },
         },
         saveData () {
         saveData () {
-            const attrValidator =
-        this.$refs['attrInfo'] && this.isSuper
-            ? this.$refs['attrInfo'].callback()
-            : null
+            const attrValidator = this.$refs['attrInfo'] && this.isSuper ? this.$refs['attrInfo'].callback() : null
             const vo = this.formatSubmitData()
             const vo = this.formatSubmitData()
             if (!this.$utils.isEmpty(this.formId) && !this.ceroParams) {
             if (!this.$utils.isEmpty(this.formId) && !this.ceroParams) {
                 delete vo.partyEmployeePo.password
                 delete vo.partyEmployeePo.password
@@ -377,13 +365,9 @@ export default {
                 return ActionUtils.warning('请选择带教老师')
                 return ActionUtils.warning('请选择带教老师')
             }
             }
             // 部门信息
             // 部门信息
-            vo.user.positions = vo.positionVoList.length
-                ? vo.positionVoList.map((i) => i.id).join(',')
-                : ''
+            vo.user.positions = vo.positionVoList.length ? vo.positionVoList.map(i => i.id).join(',') : ''
             // 角色信息
             // 角色信息
-            vo.user.job = vo.roleVoList.length
-                ? vo.roleVoList.map((i) => i.id).join(',')
-                : ''
+            vo.user.job = vo.roleVoList.length ? vo.roleVoList.map(i => i.id).join(',') : ''
             // 更新该表的job_字段
             // 更新该表的job_字段
             const updateParams = {
             const updateParams = {
                 tableName: 'ibps_party_employee',
                 tableName: 'ibps_party_employee',
@@ -401,58 +385,53 @@ export default {
             }
             }
 
 
             if (this.formId) {
             if (this.formId) {
-                update(vo)
-                    .then((response) => {
-                        this.dialogLoading = false
-                        if (this.wxyhId) {
-                            this.updateWxyh()
-                        }
-                        // 更新部门、岗位数据
-                        this.$common.request('update', updateParams)
-                        // 启动培训
-                        this.createTrain(response.variables.id)
-                        this.$emit('dialog-callback', this)
-                        if (this.formType === 'part') {
+                update(vo).then(response => {
+                    this.dialogLoading = false
+                    if (this.wxyhId) {
+                        this.updateWxyh()
+                    }
+                    // 更新部门、岗位数据
+                    this.$common.request('update', updateParams)
+                    // 启动培训
+                    this.createTrain(response.variables.id)
+                    this.$emit('dialog-callback', this)
+                    if (this.formType === 'part') {
+                        this.closeDialog()
+                        return this.$router.currentRoute.path === '/dashboard' ? location.reload() : this.$router.push('/')
+                    }
+                    ActionUtils.saveSuccessMessage(response.message, r => {
+                        // if (this.$utils.isEmpty(this.formId)) {
+                        //     this.$refs[this.formName].resetFields()
+                        // }
+                        if (r) {
                             this.closeDialog()
                             this.closeDialog()
-                            return this.$router.currentRoute.path === '/dashboard'
-                                ? location.reload()
-                                : this.$router.push('/')
                         }
                         }
-                        ActionUtils.saveSuccessMessage(response.message, (r) => {
-                            // if (this.$utils.isEmpty(this.formId)) {
-                            //     this.$refs[this.formName].resetFields()
-                            // }
-                            if (r) {
-                                this.closeDialog()
-                            }
-                        })
-                    })
-                    .catch(() => {
-                        this.dialogLoading = false
-                    })
+                    }
+                    )
+                }).catch(() => {
+                    this.dialogLoading = false
+                })
             } else {
             } else {
-                create(vo)
-                    .then((response) => {
-                        this.dialogLoading = false
-                        // 更新部门、岗位数据
-                        this.$common.request('update', updateParams)
-                        // 启动培训
-                        this.createTrain(response.variables.id)
-                        this.$emit('dialog-callback', this)
-                        ActionUtils.saveSuccessMessage(response.message, (r) => {
-                            if (r) {
-                                this.closeDialog()
-                            } else {
-                                this.init()
-                                if (this.isSuper) {
-                                    this.$refs.attrInfo.clearData()
-                                }
+                create(vo).then(response => {
+                    this.dialogLoading = false
+                    // 更新部门、岗位数据
+                    this.$common.request('update', updateParams)
+                    // 启动培训
+                    this.createTrain(response.variables.id)
+                    this.$emit('dialog-callback', this)
+                    ActionUtils.saveSuccessMessage(response.message, r => {
+                        if (r) {
+                            this.closeDialog()
+                        } else {
+                            this.init()
+                            if (this.isSuper) {
+                                this.$refs.attrInfo.clearData()
                             }
                             }
-                        })
-                    })
-                    .catch(() => {
-                        this.dialogLoading = false
+                        }
                     })
                     })
+                }).catch(() => {
+                    this.dialogLoading = false
+                })
             }
             }
         },
         },
         // 关闭当前窗口
         // 关闭当前窗口
@@ -491,54 +470,45 @@ export default {
             }
             }
             this.dialogLoading = true
             this.dialogLoading = true
             // 用户基本信息
             // 用户基本信息
-            load({ employeeId: this.formId })
-                .then((response) => {
-                    this.dialogLoading = false
-                    this.employee = response.data
-                    this.employee.orgItem = response.variables.partyOrg || {}
-                    this.employee.attrItemList = response.variables.partyAttrs || []
-                    this.employee.posItemList = response.variables.partyPositions || []
-                    this.employee.roleItemList = response.variables.partyRoles || []
-                    this.employee.userGroupItemList =
-            response.variables.partyGroups || []
-                    if (this.isSuper) {
-                        this.$nextTick(() => {
-                            this.$refs.attrInfo.loadAttrData()
-                        })
-                    } else {
-                        const list = []
-                        response.variables.partyAttrs.forEach((item) => {
-                            if (item.values.length > 0) {
-                                const obj = {
-                                    attrId: item.values[0].attrID,
-                                    value: item.values[0].value
-                                }
-                                list.push(obj)
+            load({ employeeId: this.formId }).then((response) => {
+                this.dialogLoading = false
+                this.employee = response.data
+                this.employee.orgItem = response.variables.partyOrg || {}
+                this.employee.attrItemList = response.variables.partyAttrs || []
+                this.employee.posItemList = response.variables.partyPositions || []
+                this.employee.roleItemList = response.variables.partyRoles || []
+                this.employee.userGroupItemList = response.variables.partyGroups || []
+                if (this.isSuper) {
+                    this.$nextTick(() => {
+                        this.$refs.attrInfo.loadAttrData()
+                    })
+                } else {
+                    const list = []
+                    response.variables.partyAttrs.forEach(item => {
+                        if (item.values.length > 0) {
+                            const obj = {
+                                attrId: item.values[0].attrID,
+                                value: item.values[0].value
                             }
                             }
-                        })
-                        this.employee.attrItemList = list
-                    }
+                            list.push(obj)
+                        }
+                    })
+                    this.employee.attrItemList = list
+                }
 
 
-                    // 添加更新 t_wxyh 用于扫码签到
-                    // if()
-                    this.getWxyh(this.employee)
-                })
-                .catch(() => {
-                    this.dialogLoading = false
-                })
+                // 添加更新 t_wxyh 用于扫码签到
+                // if()
+                this.getWxyh(this.employee)
+            }).catch(() => {
+                this.dialogLoading = false
+            })
         },
         },
         formatSubmitData () {
         formatSubmitData () {
             const vo = {}
             const vo = {}
             vo.partyEmployeePo = this.employee
             vo.partyEmployeePo = this.employee
             vo.user = this.employee
             vo.user = this.employee
-            vo.user.password =
-        this.formId === '' || this.ceroParams
-            ? this.employee.password
-            : this.defaultEmployee.password
-            vo.partyEmployeePo.groupID =
-        this.ceroParams !== {} && this.ceroParams
-            ? this.ceroParams.groundId
-            : this.formatOrgData()
+            vo.user.password = this.formId === '' || this.ceroParams ? this.employee.password : this.defaultEmployee.password
+            vo.partyEmployeePo.groupID = this.ceroParams !== {} && this.ceroParams ? this.ceroParams.groundId : this.formatOrgData()
             vo.positionVoList = this.formatPositionData()
             vo.positionVoList = this.formatPositionData()
             vo.roleVoList = this.formatRoleData()
             vo.roleVoList = this.formatRoleData()
             vo.attrValueVoList = this.employee.attrItemList
             vo.attrValueVoList = this.employee.attrItemList
@@ -592,7 +562,7 @@ export default {
         // 更新扫码签到表的数据
         // 更新扫码签到表的数据
         getWxyh (data) {
         getWxyh (data) {
             const sql = `select * from t_wxyh where xing_ming_ = '${data.name}' and shou_ji_ = '${data.mobile}'`
             const sql = `select * from t_wxyh where xing_ming_ = '${data.name}' and shou_ji_ = '${data.mobile}'`
-            this.$common.request('sql', sql).then((res) => {
+            this.$common.request('sql', sql).then(res => {
                 const { data = [] } = res.variables || {}
                 const { data = [] } = res.variables || {}
                 if (!data.length) {
                 if (!data.length) {
                     return
                     return
@@ -621,9 +591,9 @@ export default {
 }
 }
 </script>
 </script>
 <style lang="scss">
 <style lang="scss">
-.employee-dialog {
-  .el-dialog__body {
-    height: calc(100% - 110px) !important;
-  }
-}
+    .employee-dialog {
+        .el-dialog__body {
+            height: calc(100% - 110px) !important;
+        }
+    }
 </style>
 </style>

+ 4 - 12
src/views/platform/org/employee/edit/personal-qrcode.vue

@@ -132,12 +132,8 @@ export default {
             logo.setAttribute('crossOrigin', 'Anonymous') // 解决CORS 策略报错
             logo.setAttribute('crossOrigin', 'Anonymous') // 解决CORS 策略报错
             logo.src = getFile(this.photo)
             logo.src = getFile(this.photo)
             logo.onload = () => {
             logo.onload = () => {
-                const qrImg = document
-                    .getElementById('my-QRCode')
-                    .getElementsByTagName('img')[0]
-                const canvas = document
-                    .getElementById('my-QRCode')
-                    .getElementsByTagName('canvas')[0]
+                const qrImg = document.getElementById('my-QRCode').getElementsByTagName('img')[0]
+                const canvas = document.getElementById('my-QRCode').getElementsByTagName('canvas')[0]
                 const ctx = canvas.getContext('2d')
                 const ctx = canvas.getContext('2d')
                 ctx.drawImage(
                 ctx.drawImage(
                     logo,
                     logo,
@@ -163,17 +159,13 @@ export default {
         },
         },
         handleDownload () {
         handleDownload () {
             if (this.activeName === 'erweima') {
             if (this.activeName === 'erweima') {
-                const myCanvas = document
-                    .getElementById('my-QRCode')
-                    .getElementsByTagName('canvas')
+                const myCanvas = document.getElementById('my-QRCode').getElementsByTagName('canvas')
                 const a = document.createElement('a')
                 const a = document.createElement('a')
                 a.href = myCanvas[0].toDataURL('image/png')
                 a.href = myCanvas[0].toDataURL('image/png')
                 a.download = this.formatContent.name + '的二维码'
                 a.download = this.formatContent.name + '的二维码'
                 a.click()
                 a.click()
             } else if (this.activeName === 'tiaoxingma') {
             } else if (this.activeName === 'tiaoxingma') {
-                const svgElement = document
-                    .querySelector('.oneQr')
-                    .getElementsByTagName('svg')[0]
+                const svgElement = document.querySelector('.oneQr').getElementsByTagName('svg')[0]
                 const svgContent = svgElement.outerHTML
                 const svgContent = svgElement.outerHTML
                 const svgDataURL = 'data:image/svg+xml;base64,' + btoa(svgContent)
                 const svgDataURL = 'data:image/svg+xml;base64,' + btoa(svgContent)
                 const canvas = document.createElement('canvas')
                 const canvas = document.createElement('canvas')

+ 40 - 28
src/views/system/dashboard/components/calendar-alert.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
     <div class="calendar-alert">
     <div class="calendar-alert">
         <el-dialog
         <el-dialog
-            title="提醒事项"
+            title="近期日程提醒"
             :visible.sync="dialogFormVisible"
             :visible.sync="dialogFormVisible"
             width="30%"
             width="30%"
             :close-on-click-modal="false"
             :close-on-click-modal="false"
@@ -20,7 +20,7 @@
                         {{ key }}:
                         {{ key }}:
                     </div>
                     </div>
                     <div v-for="(item, index) in value" :key="item.id" class="message">
                     <div v-for="(item, index) in value" :key="item.id" class="message">
-                        {{ index + 1 }}.{{ item.title }}
+                        {{ index + 1 }}.{{ item.emergencyState | emergencyFilter }}{{ item.title }}
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
@@ -35,6 +35,19 @@
 
 
 <script>
 <script>
 export default {
 export default {
+    filters: {
+        emergencyFilter (value) {
+            if (value === '1') {
+                return '【急】'
+            } else if (value === '2') {
+                return '【重】'
+            } else if (value === '3') {
+                return '【轻】'
+            } else {
+                return '【缓】'
+            }
+        }
+    },
     props: {
     props: {
         calendarAlertData: {
         calendarAlertData: {
             default: () => {},
             default: () => {},
@@ -62,31 +75,30 @@ export default {
 }
 }
 </script>
 </script>
 
 
-<style>
-.item-container {
-  margin: 6px 6px 12px 6px;
-}
-
-.start-time {
-  font-weight: bold;
-  color: #333;
-  margin-left: 10px;
-  font-size: 18px;
-  margin-bottom: 4px;
-}
-
-.message {
-  color: #666;
-  margin-left: 16px;
-  font-size: 15px;
-  margin-bottom: 4px;
-}
-
-.dialog-footer {
-  display: flex;
-  justify-content: space-between;
-}
-.alertcolor {
-  color: red;
+<style lang="scss" scoped>
+.calendar-alert {
+    .item-container {
+        margin: 6px 6px 12px 6px;
+    }
+    .start-time {
+        font-weight: bold;
+        color: #333;
+        margin-left: 10px;
+        font-size: 18px;
+        margin-bottom: 4px;
+    }
+    .message {
+        color: #666;
+        margin-left: 16px;
+        font-size: 15px;
+        margin-bottom: 4px;
+    }
+    .dialog-footer {
+        display: flex;
+        justify-content: space-between;
+    }
+    .alertcolor {
+        color: red;
+    }
 }
 }
 </style>
 </style>

+ 3 - 7
src/views/system/dashboard/components/util.js

@@ -23,7 +23,7 @@ export function buildComponent (name, column, preview, vm) {
             props: {
             props: {
                 params: {
                 params: {
                     type: Object,
                     type: Object,
-                    default: () => { }
+                    default: () => {}
                 },
                 },
                 height: {
                 height: {
                     type: Number,
                     type: Number,
@@ -250,7 +250,7 @@ export function buildComponent (name, column, preview, vm) {
                 // 日程提醒
                 // 日程提醒
                 showAlert (data) {
                 showAlert (data) {
                     const calendarAlertData = this.filterAlertData(data)
                     const calendarAlertData = this.filterAlertData(data)
-                    this.handleCalendarAlert(calendarAlertData)
+                    this.$emit('action-event', 'calendarAlert', calendarAlertData)
                 },
                 },
                 getPhoto (photo) {
                 getPhoto (photo) {
                     return getFile(photo)
                     return getFile(photo)
@@ -418,10 +418,6 @@ export function buildComponent (name, column, preview, vm) {
                 handleUnreadMessage (id, tableId, tableName) {
                 handleUnreadMessage (id, tableId, tableName) {
                     this.$emit('action-event', 'unRead', { id, tableId, tableName })
                     this.$emit('action-event', 'unRead', { id, tableId, tableName })
                 },
                 },
-                // 日程提醒
-                handleCalendarAlert (calendarAlertData) {
-                    this.$emit('action-event', 'calendarAlert', { calendarAlertData })
-                },
                 // 处理全屏
                 // 处理全屏
                 handleFullscreen () {
                 handleFullscreen () {
                     this.emitActionEventHandler('fullscreen', { id: this.attrs.id })
                     this.emitActionEventHandler('fullscreen', { id: this.attrs.id })
@@ -483,7 +479,7 @@ export function buildComponent (name, column, preview, vm) {
                 },
                 },
                 formValidate (formName) {
                 formValidate (formName) {
                     this.$nextTick(() => {
                     this.$nextTick(() => {
-                        this.$refs[formName].validate(() => { })
+                        this.$refs[formName].validate(() => {})
                     })
                     })
                 },
                 },
                 getFormData () {
                 getFormData () {

+ 178 - 242
src/views/system/homepage/index.vue

@@ -6,11 +6,7 @@
         :scroll-delay="scrollDelay"
         :scroll-delay="scrollDelay"
         type="full"
         type="full"
         class="ibps-desktop-page"
         class="ibps-desktop-page"
-        @scroll="
-            ({ x, y }) => {
-                scrollTop = y;
-            }
-        "
+        @scroll="({ x, y }) => { scrollTop = y }"
     >
     >
         <ibps-back-to-top
         <ibps-back-to-top
             :visibility-height="150"
             :visibility-height="150"
@@ -23,7 +19,7 @@
             :visible="dialogPreviewVisible"
             :visible="dialogPreviewVisible"
             title="全屏预览"
             title="全屏预览"
             screen
             screen
-            @close="(visible) => (dialogPreviewVisible = visible)"
+            @close="visible => (dialogPreviewVisible = visible)"
         />
         />
         <bpmn-formrender
         <bpmn-formrender
             :visible="bpmnFormrenderDialogVisible"
             :visible="bpmnFormrenderDialogVisible"
@@ -31,7 +27,7 @@
             :task-id="taskId"
             :task-id="taskId"
             :instance-id="instanceId"
             :instance-id="instanceId"
             :title="flowName"
             :title="flowName"
-            @close="(visible) => (bpmnFormrenderDialogVisible = visible)"
+            @close="visible => (bpmnFormrenderDialogVisible = visible)"
             @callback="handleFlowCallback"
             @callback="handleFlowCallback"
         />
         />
 
 
@@ -40,7 +36,7 @@
             :title="newsTitle"
             :title="newsTitle"
             :visible="ibpsNewsDialogVisible"
             :visible="ibpsNewsDialogVisible"
             :readonly="true"
             :readonly="true"
-            @close="(visible) => (ibpsNewsDialogVisible = visible)"
+            @close="visible => (ibpsNewsDialogVisible = visible)"
         />
         />
 
 
         <ibps-message-dialog
         <ibps-message-dialog
@@ -51,7 +47,7 @@
             :readonly="true"
             :readonly="true"
             :visible="ibpsMessageDialogVisible"
             :visible="ibpsMessageDialogVisible"
             @callback="handleMessageCallback"
             @callback="handleMessageCallback"
-            @close="(visible) => (ibpsMessageDialogVisible = visible)"
+            @close="visible => (ibpsMessageDialogVisible = visible)"
         />
         />
         <div v-if="initLoading">
         <div v-if="initLoading">
             <template v-if="localSystem">
             <template v-if="localSystem">
@@ -86,9 +82,7 @@
                             :add-component-datas="addComponentDatas"
                             :add-component-datas="addComponentDatas"
                             @open="handleOpen"
                             @open="handleOpen"
                             @close="handleClose"
                             @close="handleClose"
-                            @action-event="
-                                (command, data) => handleActionEvent(command, data, index)
-                            "
+                            @action-event="(command,data)=> handleActionEvent(command,data,index)"
                         />
                         />
                     </ibps-grid-item>
                     </ibps-grid-item>
                 </ibps-grid-layout>
                 </ibps-grid-layout>
@@ -99,12 +93,7 @@
                     show-icon
                     show-icon
                     style="height: 50px"
                     style="height: 50px"
                 >
                 >
-                    <span
-                        slot="title"
-                    >未设置个人桌面布局,可以通过“<a
-                        href="javascript:void(0)"
-                        @click="goMyLayout"
-                    >个人办公-》个人桌面布局</a>”进行设置</span>
+                    <span slot="title">未设置个人桌面布局,可以通过“<a href="javascript:void(0)" @click="goMyLayout">个人办公-》个人桌面布局</a>”进行设置</span>
                 </el-alert>
                 </el-alert>
             </template>
             </template>
             <!--不是本地系统-->
             <!--不是本地系统-->
@@ -142,11 +131,7 @@
 
 
 <script>
 <script>
 import { getMyDesktop } from '@/api/platform/desktop/myLayout'
 import { getMyDesktop } from '@/api/platform/desktop/myLayout'
-import {
-    initColumn,
-    isInit,
-    getComponents
-} from '@/views/system/dashboard/components'
+import { initColumn, isInit, getComponents } from '@/views/system/dashboard/components'
 // 引用导出地址
 // 引用导出地址
 import { BASE_API, BUSINESS_BASE_URL } from '@/api/baseUrl'
 import { BASE_API, BUSINESS_BASE_URL } from '@/api/baseUrl'
 //  网格布局组件
 //  网格布局组件
@@ -182,10 +167,7 @@ export default {
         return {
         return {
             infoMessage: [],
             infoMessage: [],
             uloadPath: BASE_API() + BUSINESS_BASE_URL() + '/ck/task/importExcel',
             uloadPath: BASE_API() + BUSINESS_BASE_URL() + '/ck/task/importExcel',
-            reportPath:
-        BASE_API() +
-        BUSINESS_BASE_URL() +
-        '/sys/SysDataContext/replaceReportFile',
+            reportPath: BASE_API() + BUSINESS_BASE_URL() + '/sys/SysDataContext/replaceReportFile',
             layout: null,
             layout: null,
             colNum: 24,
             colNum: 24,
             rowHeight: 30,
             rowHeight: 30,
@@ -280,8 +262,7 @@ export default {
             this.infoMessage[num].close()
             this.infoMessage[num].close()
         },
         },
         downloadData () {
         downloadData () {
-            window.location.href =
-        BASE_API() + BUSINESS_BASE_URL() + '/sys/SysDataContext/downloadData'
+            window.location.href = BASE_API() + BUSINESS_BASE_URL() + '/sys/SysDataContext/downloadData'
         },
         },
         scrollToTop () {
         scrollToTop () {
             this.$refs.dashboardContainer.scrollToTop()
             this.$refs.dashboardContainer.scrollToTop()
@@ -307,20 +288,18 @@ export default {
                 if (isInit()) {
                 if (isInit()) {
                     getMyDesktop({
                     getMyDesktop({
                         systemAlias: this.systemAlias
                         systemAlias: this.systemAlias
+                    }).then(response => {
+                        try {
+                            this.layout = this.$utils.parseData(response.data)
+                            this.defaultData = this.$utils.parseData(response.data)
+                        } catch (error) {
+                            this.layout = []
+                            this.defaultData = []
+                        }
+                        this.loading = false
+                    }).catch(() => {
+                        this.loading = false
                     })
                     })
-                        .then((response) => {
-                            try {
-                                this.layout = this.$utils.parseData(response.data)
-                                this.defaultData = this.$utils.parseData(response.data)
-                            } catch (error) {
-                                this.layout = []
-                                this.defaultData = []
-                            }
-                            this.loading = false
-                        })
-                        .catch(() => {
-                            this.loading = false
-                        })
                     clearInterval(interval)
                     clearInterval(interval)
                 }
                 }
             }, 100)
             }, 100)
@@ -348,7 +327,7 @@ export default {
         },
         },
         resizedHandler (i, newH, newW, newHPx, newWPx) {
         resizedHandler (i, newH, newW, newHPx, newWPx) {
             if (!this.layout) return
             if (!this.layout) return
-            this.layout.layout.find((n) => {
+            this.layout.layout.find(n => {
                 if (i === n.i) {
                 if (i === n.i) {
                     n.widthPx = this.getWidth(n.w)
                     n.widthPx = this.getWidth(n.w)
                     n.heightPx = this.getHeight(n.h)
                     n.heightPx = this.getHeight(n.h)
@@ -386,34 +365,30 @@ export default {
             }
             }
         },
         },
         /**
         /**
-     * 日程提醒
-     */
-        handleCalendarAlert (calendarAlertData) {
-            this.calendarAlertData =
-        calendarAlertData.calendarAlertData.calendarAlertData
-            this.calendarIds = calendarAlertData.calendarAlertData.calendarIds
-            if (Object.keys(this.calendarAlertData).length > 0) {
+         * 日程提醒
+         */
+        handleCalendarAlert ({ calendarAlertData, calendarIds }) {
+            this.calendarAlertData = calendarAlertData
+            this.calendarIds = calendarIds
+            if (this.calendarIds.length) {
                 this.$refs.calendarRef.open()
                 this.$refs.calendarRef.open()
             }
             }
         },
         },
         /**
         /**
-     * 标记日程已读
-     */
+         * 标记日程已读
+         */
         onCalendarAlert (checked) {
         onCalendarAlert (checked) {
             if (checked) {
             if (checked) {
                 markReadCalendar({
                 markReadCalendar({
                     calendarIds: this.calendarIds + ''
                     calendarIds: this.calendarIds + ''
+                }).then(() => {}).catch((err) => {
+                    console.log(err)
                 })
                 })
-                    .then((res) => {})
-                    .catch((err) => {
-                        console.log(err)
-                    })
             }
             }
         },
         },
-
         /**
         /**
-     * 全屏展示切换
-     */
+         * 全屏展示切换
+         */
         handleFullscreen (id) {
         handleFullscreen (id) {
             this.dialogPreviewVisible = true
             this.dialogPreviewVisible = true
             this.id = id
             this.id = id
@@ -422,7 +397,7 @@ export default {
         handleCollapseExpansion (index, isCollapse) {
         handleCollapseExpansion (index, isCollapse) {
             this.layout[index].h = isCollapse ? 1.34 : this.defaultData[index].h
             this.layout[index].h = isCollapse ? 1.34 : this.defaultData[index].h
             this.layout.push({ i: '0' })
             this.layout.push({ i: '0' })
-            const deleteIndex = this.layout.findIndex((item) => item.i === '0')
+            const deleteIndex = this.layout.findIndex(item => item.i === '0')
             this.layout.splice(deleteIndex, 1)
             this.layout.splice(deleteIndex, 1)
         },
         },
         handleApprove (params) {
         handleApprove (params) {
@@ -522,22 +497,17 @@ export default {
         },
         },
         getPeriodTask () {
         getPeriodTask () {
             const { userId, role = [] } = this.$store.getters
             const { userId, role = [] } = this.$store.getters
-            const roles = role.map((i) => i.id)
-            const sql = `select * from t_zqswtxb where shi_fou_ti_xing_ = '是' and (zhi_xing_ren_yuan like '%${userId}%' or find_in_set(zhi_xing_jiao_se_, '${roles.join(
-                ','
-            )}')) order by field(zhi_xing_zhou_qi_, '1次/天', '1次/周', '1次/月', '1次/季度', '1次/半年', '1次/年')`
-            this.$common
-                .request('sql', sql)
-                .then((res) => {
-                    const { data = [] } = res.variables || {}
-                    if (data.length) {
-                        this.showMsg(data)
-                    }
-                })
-                .catch((error) => {
-                    this.$message.error('获取周期事务信息失败!')
-                    console.log(error)
-                })
+            const roles = role.map(i => i.id)
+            const sql = `select * from t_zqswtxb where shi_fou_ti_xing_ = '是' and (zhi_xing_ren_yuan like '%${userId}%' or find_in_set(zhi_xing_jiao_se_, '${roles.join(',')}')) order by field(zhi_xing_zhou_qi_, '1次/天', '1次/周', '1次/月', '1次/季度', '1次/半年', '1次/年')`
+            this.$common.request('sql', sql).then(res => {
+                const { data = [] } = res.variables || {}
+                if (data.length) {
+                    this.showMsg(data)
+                }
+            }).catch(error => {
+                this.$message.error('获取周期事务信息失败!')
+                console.log(error)
+            })
         },
         },
         showMsg (data) {
         showMsg (data) {
             const h = this.$createElement
             const h = this.$createElement
@@ -561,39 +531,31 @@ export default {
                 return acc
                 return acc
             }, {})
             }, {})
             const msg = []
             const msg = []
-            const doNotShowBtn = h(
-                'el-button',
-                {
-                    attrs: {
-                        size: 'mini',
-                        type: 'primary',
-                        plain: true
-                    },
-                    on: {
-                        click: () => {
-                            this.doNotShowToday()
-                        }
-                    }
+            const doNotShowBtn = h('el-button', {
+                attrs: {
+                    size: 'mini',
+                    type: 'primary',
+                    plain: true
                 },
                 },
-                '今日不再提示'
-            )
-            const confirmBtn = h(
-                'el-button',
-                {
-                    attrs: {
-                        size: 'mini',
-                        type: 'success',
-                        plain: true
-                    },
-                    on: {
-                        click: () => {
-                            this.infoMessage.close()
-                        }
+                on: {
+                    click: () => {
+                        this.doNotShowToday()
                     }
                     }
+                }
+            }, '今日不再提示')
+            const confirmBtn = h('el-button', {
+                attrs: {
+                    size: 'mini',
+                    type: 'success',
+                    plain: true
                 },
                 },
-                '确认'
-            )
-            Object.keys(result).forEach((key) => {
+                on: {
+                    click: () => {
+                        this.infoMessage.close()
+                    }
+                }
+            }, '确认')
+            Object.keys(result).forEach(key => {
                 // msg.push(h('p', {style: {
                 // msg.push(h('p', {style: {
                 //     'font-weight': 'bold',
                 //     'font-weight': 'bold',
                 //     'color': '#666',
                 //     'color': '#666',
@@ -604,44 +566,30 @@ export default {
                 //     msg.push(h('br'))
                 //     msg.push(h('br'))
                 // })
                 // })
                 const ul = [text[key]]
                 const ul = [text[key]]
-                result[key].forEach((i) => {
-                    ul.push(
-                        h(
-                            'li',
-                            {
-                                style: {
-                                    'font-weight': 'normal',
-                                    color: '#666',
-                                    'font-size': '14px',
-                                    cursor: 'pointer'
-                                },
-                                on: {
-                                    click: () => {
-                                        this.infoMessage.close()
-                                        this.$router.push(i.path)
-                                    }
-                                }
-                            },
-                            i.name
-                        )
-                    )
-                })
-                msg.push(
-                    h(
-                        'ul',
-                        {
-                            style: {
-                                'font-weight': 'bold',
-                                color: '#000',
-                                'font-size': '16px',
-                                margin: '0',
-                                padding: '0',
-                                'margin-bottom': '5px'
-                            }
+                result[key].forEach(i => {
+                    ul.push(h('li', {
+                        style: {
+                            'font-weight': 'normal',
+                            'color': '#666',
+                            'font-size': '14px',
+                            'cursor': 'pointer'
                         },
                         },
-                        ul
-                    )
-                )
+                        on: {
+                            click: () => {
+                                this.infoMessage.close()
+                                this.$router.push(i.path)
+                            }
+                        }
+                    }, i.name))
+                })
+                msg.push(h('ul', { style: {
+                    'font-weight': 'bold',
+                    'color': '#000',
+                    'font-size': '16px',
+                    'margin': '0',
+                    'padding': '0',
+                    'margin-bottom': '5px'
+                }}, ul))
             })
             })
             msg.push(doNotShowBtn, confirmBtn)
             msg.push(doNotShowBtn, confirmBtn)
             window.setTimeout(() => {
             window.setTimeout(() => {
@@ -660,8 +608,8 @@ export default {
             this.infoMessage.close()
             this.infoMessage.close()
         },
         },
         /**
         /**
-     * 关于预览日历日程组件的方法及属性,在预览处也有相同的逻辑
-     */
+         * 关于预览日历日程组件的方法及属性,在预览处也有相同的逻辑
+         */
         // 关闭指定弹框
         // 关闭指定弹框
         handleClose (state) {
         handleClose (state) {
             switch (state) {
             switch (state) {
@@ -681,19 +629,8 @@ export default {
                     this.calendarDialogVisible = true
                     this.calendarDialogVisible = true
                     for (const i of events) {
                     for (const i of events) {
                         // 根据指定日期A获取A在时间区间内的数据
                         // 根据指定日期A获取A在时间区间内的数据
-                        if (
-                            !(
-                                this.compareDates(i.start, dateArr[1]) > 0 ||
-                this.compareDates(i.jieShuShiJian, dateArr[0]) < 0
-                            )
-                        ) {
-                            i.label = i.zhuangTai
-                                ? `【${
-                                    status[Number(i.zhuangTai) - 1]
-                                        ? status[Number(i.zhuangTai) - 1]
-                                        : ''
-                                }】` + i.title
-                                : i.title
+                        if (!((this.compareDates(i.start, dateArr[1]) > 0) || (this.compareDates(i.jieShuShiJian, dateArr[0]) < 0))) {
+                            i.label = i.zhuangTai ? `【${status[Number(i.zhuangTai) - 1] ? status[Number(i.zhuangTai) - 1] : ''}】` + i.title : i.title
                             eventTrees.push(i)
                             eventTrees.push(i)
                         }
                         }
                     }
                     }
@@ -708,10 +645,10 @@ export default {
             }
             }
         },
         },
         /**
         /**
-     * date1(2024-01-01) 大于 date2(2023-01-01) 返回 1
-     * date1 小于 date2 返回 -1
-     * date1 等于 date2 返回 0
-     */
+         * date1(2024-01-01) 大于 date2(2023-01-01) 返回 1
+         * date1 小于 date2 返回 -1
+         * date1 等于 date2 返回 0
+         */
         compareDates (date1, date2) {
         compareDates (date1, date2) {
             var time1 = new Date(date1).getTime()
             var time1 = new Date(date1).getTime()
             var time2 = new Date(date2).getTime()
             var time2 = new Date(date2).getTime()
@@ -734,91 +671,90 @@ export default {
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-@import "~@/assets/styles/public.scss";
-.ibps-desktop-page {
-  .ibps-container-frame {
-    position: absolute;
-    top: 0px;
-    left: 0px;
-    height: 100%;
-    width: 100%;
-  }
+    @import '~@/assets/styles/public.scss';
+    .ibps-desktop-page {
+        .ibps-container-frame {
+            position: absolute;
+            top: 0px;
+            left: 0px;
+            height: 100%;
+            width: 100%;
+        }
 
 
-  .ibps-grid-item,
-  .el-card {
-    height: 100%;
-  }
-  .vue-grid-layout {
-    border-radius: 4px;
-    // margin: -10px;
-    .page_card {
-      height: 100%;
-      @extend %unable-select;
-    }
-    .vue-resizable-handle {
-      opacity: 0.3;
-      &:hover {
-        opacity: 1;
-      }
+        .ibps-grid-item, .el-card {
+            height: 100%;
+        }
+        .vue-grid-layout {
+            border-radius: 4px;
+            // margin: -10px;
+            .page_card {
+                height: 100%;
+                @extend %unable-select;
+            }
+            .vue-resizable-handle {
+                opacity: 0.3;
+                &:hover {
+                    opacity: 1;
+                }
+            }
+        }
     }
     }
-  }
-}
 </style>
 </style>
 
 
 <style lang="scss">
 <style lang="scss">
-.ibps-desktop-dashboard {
-  .item {
-    position: relative;
-    margin: 12px;
-    padding: 12px;
-    height: 90px;
-    border-radius: 4px;
-    box-sizing: border-box;
-    overflow: hidden;
-    color: #fff;
-  }
-  .item-header {
-    position: relative;
-    & > p {
-      margin: 0px;
-      font-size: 14px;
-    }
-    & > span {
-      position: absolute;
-      right: 0px;
-      top: 0px;
-      padding: 2px 8px;
-      border-radius: 4px;
-      font-size: 12px;
-      background: rgba(255, 255, 255, 0.3);
+    .ibps-desktop-dashboard {
+        .item {
+            position: relative;
+            margin: 12px;
+            padding: 12px;
+            height: 90px;
+            border-radius: 4px;
+            box-sizing: border-box;
+            overflow: hidden;
+            color: #fff;
+        }
+        .item-header {
+            position: relative;
+            & > p {
+                margin: 0px;
+                font-size: 14px;
+            }
+            & > span {
+                position: absolute;
+                right: 0px;
+                top: 0px;
+                padding: 2px 8px;
+                border-radius: 4px;
+                font-size: 12px;
+                background: rgba(255, 255, 255, 0.3);
+            }
+        }
+        .item-body {
+            & > h2 {
+                margin: 0;
+                font-size: 32px;
+                line-height: 60px;
+            }
+        }
+        .item-tip {
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            position: absolute;
+            width: 80px;
+            height: 80px;
+            bottom: -35px;
+            right: 50px;
+            border: 2px solid #fff;
+            border-radius: 100%;
+            font-size: 48px;
+            transform: rotate(-40deg);
+            opacity: 0.1;
+        }
     }
     }
-  }
-  .item-body {
-    & > h2 {
-      margin: 0;
-      font-size: 32px;
-      line-height: 60px;
+    .fc .fc-toolbar.fc-header-toolbar{
+        margin-top: -1em;
+        margin-bottom: 0em;
+        font-size: 10px;
     }
     }
-  }
-  .item-tip {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    position: absolute;
-    width: 80px;
-    height: 80px;
-    bottom: -35px;
-    right: 50px;
-    border: 2px solid #fff;
-    border-radius: 100%;
-    font-size: 48px;
-    transform: rotate(-40deg);
-    opacity: 0.1;
-  }
-}
-.fc .fc-toolbar.fc-header-toolbar {
-  margin-top: -1em;
-  margin-bottom: 0em;
-  font-size: 10px;
-}
 </style>
 </style>