添加更多

This commit is contained in:
魏啾
2024-03-07 16:14:53 +08:00
parent 4a5b52fa45
commit d648781ea3
8 changed files with 450 additions and 47 deletions

View File

@@ -2,13 +2,11 @@
<el-drawer size="100%" :with-header="false" direction="btt" v-model="dialogVisible">
<div class="box">
<div class="box_top">
<router-link to="/">
<div class="box_top_left">
<router-link to="/" class="box_top_left">
<el-icon size="20">
<ArrowLeft />
</el-icon>
<div style="margin-left: 10px;"> 交班</div>
</div>
<div style="margin-left: 10px;">返回</div>
</router-link>
<router-link to='/workrecord' class="box_top_right">
交班记录
@@ -110,9 +108,11 @@
{{ infoData.userName }}
</div>
</div>
<div class="box_content_right_tiembutton">
关班/退出
<div class="box_content_right_tiembutton" :loading="loading" @click="exit">
<span v-if="!loading">交班/关班</span>
<span v-else>交班/关班中....</span>
</div>
</div>
</div>
</div>
@@ -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 {