Commit 36d99014 authored by Cai Wei's avatar Cai Wei

fix(*): 合并冲突

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