From d648781ea3f92a0259d9b73a9db68cfc23fa70ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com> Date: Thu, 7 Mar 2024 16:14:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9B=B4=E5=A4=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/work/index.js | 13 +++ src/components/leftMenu.vue | 83 ++++++++++++- src/components/more.vue | 182 +++++++++++++++++++++++++++++ src/components/screen.vue | 109 +++++++++++++++++ src/views/order/components/add.vue | 23 +--- src/views/order/index.vue | 7 +- src/views/work/index.vue | 55 ++++++--- src/views/work/record.vue | 25 ++-- 8 files changed, 450 insertions(+), 47 deletions(-) create mode 100644 src/components/more.vue create mode 100644 src/components/screen.vue diff --git a/src/api/work/index.js b/src/api/work/index.js index c0c2e42..e26d336 100644 --- a/src/api/work/index.js +++ b/src/api/work/index.js @@ -25,3 +25,16 @@ export function shopinfoqueryDutyFlow(params) { params }); } +/** + * 登出 + + * @param {*} params + * @returns + */ +export function loginlogout(params) { + return request({ + method: "post", + url: "login/logout", + params + }); +} \ No newline at end of file diff --git a/src/components/leftMenu.vue b/src/components/leftMenu.vue index bcefb94..a92e1f3 100644 --- a/src/components/leftMenu.vue +++ b/src/components/leftMenu.vue @@ -13,19 +13,23 @@ {{ item.label }} -
+
更多
+ + \ No newline at end of file diff --git a/src/components/screen.vue b/src/components/screen.vue new file mode 100644 index 0000000..0d88d04 --- /dev/null +++ b/src/components/screen.vue @@ -0,0 +1,109 @@ + + + + + \ No newline at end of file diff --git a/src/views/order/components/add.vue b/src/views/order/components/add.vue index 60dee38..a39bdba 100644 --- a/src/views/order/components/add.vue +++ b/src/views/order/components/add.vue @@ -13,11 +13,8 @@
-
- {{ - item1 }} -
- {{ item.orderNo }} +
{{item.names && item.names.join(',') }}
+
{{ item.orderNo }}
@@ -69,6 +66,7 @@ const clickitemboxshow = (e) => { .demo_tabs_boxitem_one { display: flex; justify-content: flex-start; + flex-shrink: 0; .demo_tabs_boxitem_oneone { display: flex; @@ -79,25 +77,14 @@ const clickitemboxshow = (e) => { } .demo_tabs_boxitem_onetow { - width: 40%; - display: flex; + flex: 1; margin-left: 20px; - flex-direction: column; - height: 70px; - justify-content: space-around; - - div { - width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } } } } .demo_tabs_boxitem_tow { - width: 20%; + flex-shrink: 0; display: flex; flex-direction: column; height: 70px; diff --git a/src/views/order/index.vue b/src/views/order/index.vue index 954b830..7afa054 100644 --- a/src/views/order/index.vue +++ b/src/views/order/index.vue @@ -428,7 +428,6 @@ onMounted(() => { .demo_tabs_boxitem_one { display: flex; justify-content: flex-start; - .demo_tabs_boxitem_oneone { display: flex; margin-left: 20px; @@ -438,7 +437,7 @@ onMounted(() => { } .demo_tabs_boxitem_onetow { - width: 40%; + // width: 40%; display: flex; margin-left: 20px; flex-direction: column; @@ -446,7 +445,7 @@ onMounted(() => { justify-content: space-around; div { - width: 100%; + // width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -456,7 +455,7 @@ onMounted(() => { } .demo_tabs_boxitem_tow { - width: 20%; + // width: 20%; display: flex; flex-direction: column; height: 70px; diff --git a/src/views/work/index.vue b/src/views/work/index.vue index 90a303f..18e702c 100644 --- a/src/views/work/index.vue +++ b/src/views/work/index.vue @@ -2,13 +2,11 @@
- -
+ -
交班
-
+
返回
交班记录 @@ -110,9 +108,11 @@ {{ infoData.userName }}
-
- 关班/退出 +
+ 交班/关班 + 交班/关班中....
+
@@ -124,19 +124,46 @@ import { ref, onMounted } from 'vue' import { useRoute } from 'vue-router' import { ElMessage, dayjs } from 'element-plus' -import { shopInfoqueryDuty } from '@/api/work/index.js' +import { shopInfoqueryDuty, loginlogout } from '@/api/work/index.js' +import useStorage from '@/utils/useStorage' +import { useRouter } from "vue-router"; + +const router = useRouter(); const dialogVisible = ref(true) //交班 //详情数据 const infoData = ref({}) +const loading = ref(false); +const exit = async () => { + try { + loading.value = true; + let res = await loginlogout({ + status:1 + }) + useStorage.clear() + ElMessage.success("交班成功"); + setTimeout(() => { + router.replace({ + name: "login", + }); + }, 1000); + loading.value = false; + } catch (error) { + loading.value = false; + } +} const infoshopInfoqueryDutys = async () => { - let res = await shopInfoqueryDuty({ - page: 1, - pageSize: 10 - }) - infoData.value = res - console.log(res) + try { + let res = await shopInfoqueryDuty({ + page: 1, + pageSize: 10 + }) + infoData.value = res + } catch (error) { + + } + } onMounted(() => { infoshopInfoqueryDutys() @@ -163,6 +190,8 @@ onMounted(() => { display: flex; justify-content: flex-start; align-items: center; + color: #161718; + text-decoration: none; } .box_top_right { diff --git a/src/views/work/record.vue b/src/views/work/record.vue index 4641133..7f918e0 100644 --- a/src/views/work/record.vue +++ b/src/views/work/record.vue @@ -2,14 +2,14 @@
-
+ - +
交班记录 - -
+
+
@@ -160,12 +160,14 @@ onMounted(() => { background: #fff; padding: 6px 10px; border-radius: 6px; - + /* 取消下划线效果 */ .box_top_left { display: flex; justify-content: flex-start; align-items: center; + text-decoration: none; + /* 取消下划线效果 */ } .box_top_right { @@ -214,17 +216,18 @@ onMounted(() => { width: 100%; height: 80%; padding: 0 20px; - + .box_content_left_bouttomox::after { + content: ''; + display: inline-block; + width: 32%; + } .box_content_left_bouttomox { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; - .box_content_left_bouttom_item::after { - content: ''; - width: 32%; - } - .box_content_left_bouttom_item { + + .box_content_left_bouttom_item { margin-top: 10px; width: 32%; background: #eeeeee;