Commit 5b5a4f26 authored by Cai Wei's avatar Cai Wei

feat(*): 修改样式

parent a9cb58ff
......@@ -19,7 +19,7 @@
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item :icon="Plus" @click="logout">退出登录</el-dropdown-item>
<el-dropdown-item @click="logout">退出登录</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
......@@ -39,7 +39,7 @@
</template>
<script>
import menuCom from "./menuCom.vue";
import { CaretBottom, Plus } from "@element-plus/icons-vue";
import { CaretBottom } from "@element-plus/icons-vue";
import { useRoute, useRouter } from 'vue-router';
import { watch, ref, onMounted } from 'vue';
import { getToken } from '@/utils/auth';
......
......@@ -21,10 +21,11 @@ export function getCloseLoopNum() {
}
export function getProductionLine() {
export function getProductionLine(params) {
return request({
url: "/transaction/getProductionLine",
method: "get",
params,
});
}
......
......@@ -83,7 +83,7 @@
<script setup>
import { ref, reactive, onMounted, watch } from 'vue';
import { getVisDusterList, getProductionLine } from "@/request/api/dustOverview";
import { getToken } from "@/utils/auth";
const props = defineProps({
modelValue: {
type: Boolean,
......@@ -226,7 +226,9 @@ const handleSearch = (query) => {
};
const productionLine = () => {
getProductionLine().then(res => {
getProductionLine({
branchFactoryId: getToken("dataBranchFactoryId")
}).then(res => {
processOptions.value = res.data;
})
}
......
......@@ -108,12 +108,8 @@ import { ref, watch, computed } from "vue";
const props = defineProps({
modelValue: Boolean,
totalValves: {
type: Number,
required: true
},
statusData: {
type: Array,
data: {
type: Object,
default: () => []
}
});
......@@ -160,19 +156,22 @@ const validateValveCount = computed(() => {
const initializeState = () => {
if (props.modelValue) {
valveForm.value.total = props.totalValves;
statusData.value = [...props.statusData]; // 深拷贝状态数据
errorMessage.value = "";
console.log(props.data)
// valveForm.value.total = props.totalValves;
// statusData.value = [...props.statusData]; // 深拷贝状态数据
// errorMessage.value = "";
// 如果有数据,默认选中第一个仓室
if (statusData.value.length > 0) {
valveForm.value.roomNo = statusData.value[0].index;
valveForm.value.valveCount = statusData.value[0].count;
valveForm.value.distribution = statusData.value[0].count; // 默认布阀数量等于电磁阀数量
}
// // 如果有数据,默认选中第一个仓室
// if (statusData.value.length > 0) {
// valveForm.value.roomNo = statusData.value[0].index;
// valveForm.value.valveCount = statusData.value[0].count;
// valveForm.value.distribution = statusData.value[0].count; // 默认布阀数量等于电磁阀数量
// }
}
};
// getToken("customerId"),
// 当选中的仓室改变时,更新电磁阀分布数量
const handleRoomChange = (roomIndex) => {
const selectedRoom = statusData.value.find(cell => cell.index === roomIndex);
......
......@@ -151,8 +151,7 @@
<!-- 使用新的电磁阀数量设置弹窗组件 -->
<ValveSettingDialog
v-model="valveSettingVisible"
:total-valves="valveForm.total"
:status-data="currentEditingRow?.status || []"
:data="currentEditingRow"
@confirm="handleValveSettingConfirm"
/>
......@@ -168,6 +167,7 @@
<script setup>
import { ref, onMounted, onBeforeUnmount, computed, watch } from "vue";
import { getDusterLeakNum, getHealthPercent, getCloseLoopNum, getProductionLine, getDusterList, postAddDuster, postUpdateDuster, postAddCompartAllocation } from "@/request/api/dustOverview";
import { getToken } from "@/utils/auth";
import CommonTable from "@/components/commonTable/index.vue";
import { ElMessageBox, ElMessage } from "element-plus";
import RoomSettingDialog from "./components/roomSettingDialog.vue";
......@@ -346,9 +346,9 @@ const handleRoomSettingConfirm = (data) => {
const handleValveNumClick = (row) => {
// 创建一个扁平化的状态数组用于电磁阀设置
currentEditingRow.value = JSON.parse(JSON.stringify(row));
const flattenedStatus = row.status.flat().map(item => ({...item}));
currentEditingRow.value.status = flattenedStatus;
valveForm.value.total = row.valveNum;
// const flattenedStatus = row.status.flat().map(item => ({...item}));
// currentEditingRow.value.status = flattenedStatus;
// valveForm.value.total = row.valveNum;
valveSettingVisible.value = true;
};
......@@ -436,7 +436,9 @@ const IcloseLoopNum = () => {
}
const IproductionLine = () => {
getProductionLine().then(res => {
getProductionLine({
branchFactoryId: getToken("dataBranchFactoryId")
}).then(res => {
productionLine.value = res.data || [];
// 默认显示全部
productionLineFiltered.value = res.data || [];
......
......@@ -1128,6 +1128,7 @@ $cursor: #ccc;
}
.el-input__wrapper {
width: 100%;
box-sizing: border-box;
}
.captcha {
......@@ -1142,6 +1143,7 @@ $cursor: #ccc;
border-bottom: 1px solid #fff;
background: #fff;
}
}
</style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment