diff --git a/src/api/model/orders.js b/src/api/model/orders.js index 33be3e1..58c47b2 100644 --- a/src/api/model/orders.js +++ b/src/api/model/orders.js @@ -212,6 +212,13 @@ export default { post: async function (params) { return await http.post(this.url,params); } + }, + confirm:{ + url: `${config.API_URL}/repair.order.confirm`, + name: "维保计划确认", + post: async function (params) { + return await http.post(this.url,params); + } } }, sock: { diff --git a/src/config/table.js b/src/config/table.js index 2d09426..381b38e 100644 --- a/src/config/table.js +++ b/src/config/table.js @@ -94,7 +94,7 @@ export default { return } let data = { - column_config:column, + column_config:[], save_column:false, page:1, pageSize:this.pageSize diff --git a/src/layout/components/userbar.vue b/src/layout/components/userbar.vue index 284bcd7..a1d8534 100644 --- a/src/layout/components/userbar.vue +++ b/src/layout/components/userbar.vue @@ -20,6 +20,9 @@ + @@ -369,6 +372,20 @@ font-weight: inherit; } } + .msgTitle{ + display: flex;align-items: center; + } + .msg-tag{ + height: 18px; + line-height: 18px; + padding: 0 6px; + border-radius: 18px; + background: var(--el-color-danger); + color: var(--el-color-white); + font-size: 12px; + font-weight: initial; + margin-left: 15px; + } .dark .msg-list__main h2 { color: #d0d0d0; diff --git a/src/layout/index.vue b/src/layout/index.vue index e1dfebc..8d28a10 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -279,24 +279,39 @@ }, methods: { getWsResult(res){ - if(res.data && res.data.type == 21){ + if(res.data && (res.data.type == 21 || res.data.type == 23)){ if(res.data.list_count_info && res.data.list_count_info.main_order_count.length>0){ this.$store.commit("set_list_count_info", res.data.list_count_info.main_order_count); } + if(res.data.list_repair_info && res.data.list_repair_info.repair_count.length>0){ + this.$store.commit("set_repair_count", res.data.list_repair_info.repair_count); + } let apiMenu = tool.objCopy(tool.data.get("MENU")); apiMenu.forEach(item=>{ if(item.name == 'order'){ - item.meta.tag = null; + item.meta.tag = 0; if(item.children && item.children.length>0){ item.children.forEach(em=>{ - if(em.name == "orderList"){ - em.meta.tag = 0; + if(em.name == "orderList" && res.data.type == 21){ + let tag = 0; if(res.data.list_count_info && res.data.list_count_info.main_order_count && res.data.list_count_info.main_order_count.length>0){ res.data.list_count_info.main_order_count.forEach(li=>{ - em.meta.tag += li.value; + tag += li.value; }) } - item.meta.tag = em.meta.tag; + em.meta.tag = tag; + } + if(em.name == 'repairList' && res.data.type == 23){ + let tag = 0; + if(res.data.list_repair_info && res.data.list_repair_info.repair_count && res.data.list_repair_info.repair_count.length>0){ + res.data.list_repair_info.repair_count.forEach(li=>{ + tag += li.value; + }) + } + em.meta.tag = tag; + } + if(em.meta.tag){ + item.meta.tag += em.meta.tag } }) } diff --git a/src/store/modules/msg.js b/src/store/modules/msg.js index 6c24d26..6fa04f2 100644 --- a/src/store/modules/msg.js +++ b/src/store/modules/msg.js @@ -1,11 +1,15 @@ export default { state: { - main_order_count:[] + main_order_count:[], + repair_count:[], }, mutations: { set_list_count_info(state, list){ state.main_order_count = list; }, + set_repair_count(state, list){ + state.repair_count = list; + }, }, actions: { diff --git a/src/style/app.scss b/src/style/app.scss index 4dcd169..2d077e1 100644 --- a/src/style/app.scss +++ b/src/style/app.scss @@ -68,10 +68,10 @@ a,button,input,textarea{-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing: bo .adminui-side-bottom i {font-size: 16px;} .adminui-side-bottom:hover {color: var(--el-color-primary);} .aminui-side.isCollapse {width: 65px;} -.el-menu .menu-tag {position: absolute;height: 15px;line-height: 15px;background: var(--el-color-danger);font-size: 10px;color: #fff;right: 20px;border-radius:14px;padding:0 4px;} +.el-menu .menu-tag {position: absolute;height: 15px;line-height: 15px;background: var(--el-color-danger);font-size: 10px;color: #fff;right: 20px;border-radius:14px;padding:0 5px;} .el-menu .el-sub-menu__title .menu-tag {right: 40px;top: 10px;} .el-menu--horizontal > li .menu-tag {display: none;} -.aminui-side.isCollapse .el-menu > li .menu-tag{display: inline-block;width: auto;height: 15px;line-height: 15px;padding: 0 4px;visibility: initial;right: 18px;top: 4px;} +.aminui-side.isCollapse .el-menu > li .menu-tag{display: inline-block;width: auto;height: 15px;line-height: 15px;padding: 0 5px;visibility: initial;right: 18px;top: 4px;} /* 右侧内容 */ .aminui-body {flex: 1;display: flex;flex-flow: column;} diff --git a/src/views/order/components/infoSave.vue b/src/views/order/components/infoSave.vue index c98c0ee..58bb86a 100644 --- a/src/views/order/components/infoSave.vue +++ b/src/views/order/components/infoSave.vue @@ -13,12 +13,9 @@ - - - - - - + + +