使用真登录功能前拉取报错,提交代码

This commit is contained in:
GYYM
2024-11-20 11:22:05 +08:00
parent 963c0f5713
commit fdc7639887
19 changed files with 192 additions and 86 deletions

View File

@@ -25,7 +25,7 @@
</el-steps>
</div>
<div class="dialog-right">
<el-collapse :v-model="activeIndex" accordion>
<el-collapse v-model="collapseActiveName" accordion>
<el-collapse-item title="源通讯校验" name="1">
<div>
暂无数据等待检测开始
@@ -54,6 +54,7 @@
</template>
<script lang="tsx" setup name="preTest">
const collapseActiveName = ref('1')
const activeIndex = ref(0)
const activeTotalNum = ref(5)
//定义与预检测配置数组
@@ -108,6 +109,14 @@ const currentStepStatus = ref<'error' | 'finish' | 'wait' | 'success' | 'process
})
const testStatus = toRef(props, 'testStatus');
const ts = ref('');
watch(activeIndex, function (newValue, oldValue) {
if(activeIndex.value < activeTotalNum.value - 2)
collapseActiveName.value = (newValue+1).toString()
else
collapseActiveName.value = (activeTotalNum.value - 1).toString()
})
//监听goods_sn的变化
watch(testStatus, function (newValue, oldValue) {
ts.value = props.testStatus;

View File

@@ -54,29 +54,29 @@
<el-button
type="primary"
:icon="Clock"
@click="handleTest"
@click="handleTest('手动检测')"
v-if="form.activeTabs === 0"
>手动检测</el-button
>
<el-button
type="primary"
:icon="ChatLineRound"
@click="handleTest"
@click="handleTest('自动检测')"
v-if="form.activeTabs === 0"
>自动检测</el-button
>
<el-button type="primary" :icon="ChatLineSquare" v-if="form.activeTabs === 2"
<el-button type="primary" :icon="ChatLineSquare" @click="handleTest('不合格项复检')" v-if="form.activeTabs === 2"
>不合格项复检</el-button
>
<el-button type="primary" :icon="ChatDotSquare" v-if="form.activeTabs === 2"
<el-button type="primary" :icon="ChatDotSquare" @click="handleTest('全部复检')" v-if="form.activeTabs === 2"
>全部复检</el-button
>
<el-button type="primary" :icon="Postcard" v-if="form.activeTabs === 3"
<el-button type="primary" :icon="Postcard" @click="handleTest('批量生成')" v-if="form.activeTabs === 3"
>批量生成</el-button
>
<el-button type="primary" :icon="Notebook" v-if="form.activeTabs === 4"
<el-button type="primary" :icon="Notebook" @click="handleTest('批量归档')" v-if="form.activeTabs === 4"
>批量归档</el-button
>
</el-form-item>
@@ -742,8 +742,9 @@ function disablecheckResultList(val: string){
});
}
//启动自动检测/手动检测
const handleTest = () => {
const handleTest = (val:string) => {
//自动检测
if (form.value.activeTabs === 0) {
ElMessage.success("手动检测");

View File

@@ -36,7 +36,7 @@
</el-table>
</div>
<div class="dialog-log">
<el-collapse :v-model="1" accordion>
<el-collapse model-value="1" accordion>
<el-collapse-item title="检测日志:" name="1">
<div>
暂无数据等待检测开始

View File

@@ -1,10 +1,10 @@
<template>
<el-dialog :title="dialogTitle" :model-value="visible" @close="handleCancel" v-bind="dialogBig" width="900px">
<el-dialog :title="dialogTitle" :model-value="visible" @close="handleCancel" v-bind="dialogBig" width="1200px" height="900px">
<!-- simple -->
<!-- :style="{color:node.label=='未检测'?'#F56C6C':node.label=='检测中'?'#E6A23C':'#67C23A'}" -->
<el-steps class="test-head-steps" :space="200" :active="stepsActiveIndex" process-status="finish" finish-status="success" simple>
<el-step title="预检测" :icon="stepsActiveIndex > 0 ? SuccessFilled : Edit" />
<el-steps class="test-head-steps" :space="200" :active="stepsActiveIndex" process-status="finish" finish-status="success" >
<el-step title="预检测" :icon="stepsActiveIndex > 0 ? SuccessFilled : Edit" style="height:100px" />
<el-step title="守时检测" :icon="stepsActiveIndex > 1 ? SuccessFilled :UploadFilled"/>
<el-step title="系数校准" :icon="stepsActiveIndex > 2 ? SuccessFilled :Picture" />
<el-step title="正式检测" :icon="stepsActiveIndex > 3 ? SuccessFilled :Picture" />
@@ -376,45 +376,32 @@ const detectionOptions = ref([
<style scoped>
.test-head-steps{
height: 200px;
margin-bottom: 20px;
}
.test-dialog{
display: flex;
flex: 30% 65%; /* 控件宽度 */
flex-direction: row; /* 横向排列 */
/* .dialog-left{
margin-right: 20px;
} */
}
.form-grid {
display: flex;
flex-direction: row; /* 横向排列 */
flex-wrap: wrap; /* 允许换行 */
}
.form-grid .el-form-item {
flex: 1 1 30%; /* 控件宽度 */
margin-right: 20px; /* 控件间距 */
}
.form-grid .el-form-item:last-child {
margin-right: 0; /* 最后一个控件不需要右边距 */
}
.dialog-footer {
display: flex;
justify-content: flex-start;
margin-bottom: 10px; /* 调整这里的值以增加或减少间距 */
}
.el-tabs {
margin-bottom: 20px; /* 添加底部边距 */
.test-head-steps .el-step__line{
height:50px !important;
}
.el-table th, .el-table td {
text-align: center; /* 所有单元格文字居中 */
.test-head-steps .el-step__icon-inner{
width: 40px !important;
height:40px !important;
}
.table-container {
max-height: 400px; /* 根据需要调整高度 */
overflow-y: auto; /* 允许垂直滚动 */
overflow-x: hidden; /* 隐藏水平滚动条 */
.test-head-steps .el-step__icon{
width: 80px !important;
height:80px !important;
font-size: 40px !important; /* 调整图标大小 */
line-height: 80px !important; /* 使图标居中 */
}
.test-head-steps .el-step__title {
font-size: 20px !important; /* 设置标题字体大小 */
margin-top: 10px !important; /* 调整标题与图标的间距 */
}
.test-head-steps .el-step__description {
font-size: 20px !important; /* 设置描述字体大小 */
}
</style>

View File

@@ -34,6 +34,7 @@
import { useRouter } from "vue-router";
import { ElMessage } from "element-plus";
import { useAuthStore } from "@/stores/modules/auth";
import model from "./tabs/model.vue";
import dashboard from "./tabs/dashboard.vue";
import { onMounted } from "vue";

View File

@@ -28,7 +28,9 @@
<!-- <el-collapse v-model="activeNames" @change="handleChange">
<el-collapse-item title="检测进度展示" name="1"> -->
<!-- <div class="dialog-log">
<el-collapse model-value="1" accordion>
<el-collapse-item title="检测进度展示:" name="1"> -->
<!-- 饼图 -->
<div class="container_charts">
<div class="charts_info">
@@ -79,9 +81,9 @@
></pie>
</div>
</div>
<!-- </el-collapse-item>
</el-collapse> -->
<!-- </el-collapse-item>
</el-collapse>
</div> -->
<el-tabs type="border-card" @tab-change="handleTabsChange" v-model="editableTabsValue">
<el-tab-pane :label="tabLabel1">
@@ -337,7 +339,7 @@ onMounted(() => {
height: 100%;
display: flex;
justify-content: space-between;
// background-color: #eee;
//background-color: #eee;
.left_tree {
width: 14% !important;
@@ -353,9 +355,9 @@ onMounted(() => {
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
//justify-content: space-between;
//align-items: center;
//box-sizing: border-box;
.container_function {
width: 100%;
@@ -438,6 +440,16 @@ onMounted(() => {
}
}
.dialog-log{
width: 100% !important;
min-height: 200px !important;
height:auto;
background-color: #eee;
// display: flex;
// justify-content: space-between;
// padding-left: 2ch;
margin-bottom: 10px;
}
.el-collapse {
width: 100% !important;
// min-height: 200px !important;

View File

@@ -17,7 +17,7 @@
<el-button
size="small"
type="primary"
@click="handelOpen(item.isActive)"
@click="handelOpen(item)"
:disabled="item.isActive == false"
>进入检测</el-button
>
@@ -33,7 +33,9 @@
import { useRouter } from "vue-router";
import { ElMessage } from "element-plus";
import { useAuthStore } from "@/stores/modules/auth";
import { useModeStore } from "@/stores/modules/mode"; // 引入模式 store
const authStore = useAuthStore();
const modeStore = useModeStore(); // 使用模式 store
const activeIndex = ref("1-1");
const router = useRouter();
const modeList = [
@@ -56,8 +58,10 @@ const modeList = [
isActive: false,
},
];
const handelOpen = async (isActive: any) => {
const handelOpen = async (item: any) => {
await authStore.setShowMenu();
modeStore.setCurrentMode(item.name); // 将模式名称存入 store
return;
if (isActive) {
router.push({ path: "/static" });