diff --git a/src/views/main-sidebar-hover.vue b/src/views/main-sidebar-hover.vue index bd53c1f..021c77c 100644 --- a/src/views/main-sidebar-hover.vue +++ b/src/views/main-sidebar-hover.vue @@ -249,6 +249,9 @@ export default { // 添加全局点击监听,点击其他地方时收起菜单 document.addEventListener('click', this.handleDocumentClick) this.todoBadgeTimer = setInterval(this.refreshTodoPendingCount, 60000) + if (typeof window !== 'undefined') { + window.addEventListener('todo-badge-refresh', this.handleTodoBadgeRefresh) + } }, beforeDestroy() { // 移除全局点击监听 @@ -257,8 +260,14 @@ export default { clearInterval(this.todoBadgeTimer) this.todoBadgeTimer = null } + if (typeof window !== 'undefined') { + window.removeEventListener('todo-badge-refresh', this.handleTodoBadgeRefresh) + } }, methods: { + handleTodoBadgeRefresh () { + this.refreshTodoPendingCount() + }, refreshTodoPendingCount () { const site = this.$store.state.user.site if (!site) { diff --git a/src/views/main-sidebar.vue b/src/views/main-sidebar.vue index 7946a1c..e013d64 100644 --- a/src/views/main-sidebar.vue +++ b/src/views/main-sidebar.vue @@ -128,14 +128,23 @@ export default { }, mounted () { this.todoBadgeTimer = setInterval(this.refreshTodoPendingCount, 60000) + if (typeof window !== 'undefined') { + window.addEventListener('todo-badge-refresh', this.handleTodoBadgeRefresh) + } }, beforeDestroy () { if (this.todoBadgeTimer) { clearInterval(this.todoBadgeTimer) this.todoBadgeTimer = null } + if (typeof window !== 'undefined') { + window.removeEventListener('todo-badge-refresh', this.handleTodoBadgeRefresh) + } }, methods: { + handleTodoBadgeRefresh () { + this.refreshTodoPendingCount() + }, refreshTodoPendingCount () { const site = this.$store.state.user.site if (!site) { diff --git a/src/views/modules/todo/todoCenter.vue b/src/views/modules/todo/todoCenter.vue index b40ddd5..421417c 100644 --- a/src/views/modules/todo/todoCenter.vue +++ b/src/views/modules/todo/todoCenter.vue @@ -167,7 +167,7 @@ :close-on-click-modal="false" :visible.sync="detailDialogVisible" width="820px" - class="customer-dialog todo-cache-detail-dialog" + class="todo-cache-detail-dialog" append-to-body>
@@ -196,6 +196,7 @@
@@ -258,29 +244,15 @@ @@ -296,6 +268,7 @@
@@ -575,6 +548,7 @@ export default { this.$message.success('代办审核成功') this.getTodoStats() this.getDataList() + this.notifyTodoBadgeRefresh() } else { this.$message.error((data && data.msg) || '代办审核失败') } @@ -584,6 +558,11 @@ export default { this.currentAuditTodo = null }) }, + notifyTodoBadgeRefresh () { + if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function') { + window.dispatchEvent(new Event('todo-badge-refresh')) + } + }, showDetail (row) { if (!row) { return @@ -875,19 +854,35 @@ export default { .todo-cache-detail-dialog .readonly-number { width: 100%; + line-height: 20px; + padding: 0; + margin: 0; text-align: center; color: #606266; } -.todo-cache-detail-dialog /deep/ .readonly-qty-input .el-input__inner { - text-align: center; - color: #606266; - padding: 0 6px; +.todo-cache-detail-dialog /deep/ .todo-detail-table .el-table__header-wrapper th { + height: 40px; + padding-top: 0 !important; + padding-bottom: 0 !important; } -.todo-cache-detail-dialog /deep/ .readonly-qty-input.good-qty-input .el-input__inner { - color: #67c23a; - font-weight: bold; +.todo-cache-detail-dialog /deep/ .todo-detail-table .el-table__header-wrapper th .cell { + height: 40px; + line-height: 40px !important; + white-space: nowrap; + padding-top: 0; + padding-bottom: 0; +} + +.todo-cache-detail-dialog /deep/ .todo-detail-table .el-table__body-wrapper td { + vertical-align: middle; + padding-top: 4px !important; + padding-bottom: 4px !important; +} + +.todo-cache-detail-dialog /deep/ .todo-detail-table .el-table__body-wrapper td .cell { + line-height: 20px; } .todo-cache-detail-dialog .readonly-number.good { @@ -905,27 +900,27 @@ export default { font-weight: bold; } -.todo-cache-detail-dialog /deep/ .el-table td.remark-column, -.todo-cache-detail-dialog /deep/ .el-table td.packing-list-column { +.todo-cache-detail-dialog /deep/ .todo-detail-table td.remark-column, +.todo-cache-detail-dialog /deep/ .todo-detail-table td.packing-list-column { padding: 0 !important; position: relative !important; } -.todo-cache-detail-dialog .remark-wrapper { - width: 100%; - height: 100%; -} - -.todo-cache-detail-dialog .remark-textarea { +.todo-cache-detail-dialog .readonly-text-cell { width: 100%; height: 100%; + padding: 2px 8px; + background: #fafafa; + box-sizing: border-box; + text-align: left; } -.todo-cache-detail-dialog /deep/ .remark-textarea .el-textarea__inner { - border: none !important; - resize: none !important; - border-radius: 0 !important; - min-height: 68px !important; - background: #fafafa !important; +.todo-cache-detail-dialog .readonly-text-scroll { + max-height: 68px; + overflow-y: auto; + white-space: pre-wrap; + word-break: break-all; + line-height: 18px; + color: #606266; } diff --git a/src/views/modules/yieldReport/com_mrb_register.vue b/src/views/modules/yieldReport/com_mrb_register.vue index 7c86054..df3a6d7 100644 --- a/src/views/modules/yieldReport/com_mrb_register.vue +++ b/src/views/modules/yieldReport/com_mrb_register.vue @@ -31,6 +31,10 @@ export default { visible: { type: Boolean, default: false + }, + loadHistory: { + type: Boolean, + default: true } }, data() { @@ -92,8 +96,10 @@ export default { } }); - // 查询原有的MRB数据 - this.loadMrbData(); + // 根据场景决定是否回填历史MRB数据 + if (this.loadHistory) { + this.loadMrbData(); + } }, /** diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue index a2845ff..f92cac0 100644 --- a/src/views/modules/yieldReport/com_produce_report_normal.vue +++ b/src/views/modules/yieldReport/com_produce_report_normal.vue @@ -4890,11 +4890,8 @@ export default { }) }, - onSeparateRuleLockPage (resultMap) { - this.$alert((resultMap && resultMap.message) || '触发强制异常规则,当前页面已锁定。', '提示', { - confirmButtonText: '确定', - type: 'warning' - }) + onSeparateRuleLockPage () { + // 锁定提示改为仅在创建分卷弹窗内显示遮罩,不再弹出提示框 }, onSeparateRuleUnlockPage () { diff --git a/src/views/modules/yieldReport/com_separate_roll.vue b/src/views/modules/yieldReport/com_separate_roll.vue index 09ea51f..50b9154 100644 --- a/src/views/modules/yieldReport/com_separate_roll.vue +++ b/src/views/modules/yieldReport/com_separate_roll.vue @@ -1885,7 +1885,6 @@ export default { if (action === 'LOCK_PAGE') { this.exceptionRuleLocked = true this.exceptionRuleLockMessage = message - this.$message.error(message) this.$emit('lockPageByExceptionRule', resultMap) this.startSplitRuleLockPolling() return false