From 26bef3f7242fca4f2895b8ac163d28d8a14792ae Mon Sep 17 00:00:00 2001
From: Teo <2642673902@qq.com>
Date: Thu, 4 Sep 2025 17:56:01 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 4 +-
src/views/design/drawing/indexEdit.vue | 9 +-
.../formalitiesAreConsolidated/index.vue | 4 +-
.../materialReceive/index.vue | 138 ++++++++++--------
src/views/progress/progressCategory/index.vue | 8 +-
.../BasicData/landBlock/index.vue | 22 +--
src/views/tender/bidd/index.vue | 27 +++-
7 files changed, 125 insertions(+), 87 deletions(-)
diff --git a/.env.development b/.env.development
index beee2bd..6c8eb32 100644
--- a/.env.development
+++ b/.env.development
@@ -6,13 +6,13 @@ VITE_APP_ENV = 'development'
# 开发环境
# 李陈杰 209
-VITE_APP_BASE_API = 'http://192.168.110.209:8899'
+# VITE_APP_BASE_API = 'http://192.168.110.209:8899'
# 曾涛
# VITE_APP_BASE_API = 'http://192.168.110.180:8899'
# 罗成
# VITE_APP_BASE_API = 'http://192.168.110.188:8899'
# 朱银
-# VITE_APP_BASE_API = 'http://192.168.110.149:8899'
+VITE_APP_BASE_API = 'http://192.168.110.149:8899'
#曾涛
# VITE_APP_BASE_API = 'http://192.168.110.171:8899'
diff --git a/src/views/design/drawing/indexEdit.vue b/src/views/design/drawing/indexEdit.vue
index 42b1999..53ab0ec 100644
--- a/src/views/design/drawing/indexEdit.vue
+++ b/src/views/design/drawing/indexEdit.vue
@@ -50,7 +50,7 @@
@@ -98,6 +98,7 @@ const flowCodeOptions = ref([
label: '资金设计变更审批'
}
]);
+const optionIndex = ref(0);
const flowCode = ref('');
const status = ref('');
@@ -272,12 +273,12 @@ const submit = async (status, data) => {
} else {
if ((form.value.status === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
if (form.value.costEstimation == '0') {
- flowCodeOptions.value = [flowCodeOptions.value[0]];
+ optionIndex.value = 0;
} else {
console.log('🚀 ~ submit ~ flowCodeOptions.value:', flowCodeOptions.value[1]);
- flowCodeOptions.value = [flowCodeOptions.value[1]];
+ optionIndex.value = 1;
}
- flowCode.value = flowCodeOptions.value[0].value;
+ flowCode.value = flowCodeOptions.value[optionIndex.value].value;
dialogVisible.visible = true;
return;
}
diff --git a/src/views/formalities/formalitiesAreConsolidated/index.vue b/src/views/formalities/formalitiesAreConsolidated/index.vue
index e3d349a..834f4cd 100644
--- a/src/views/formalities/formalitiesAreConsolidated/index.vue
+++ b/src/views/formalities/formalitiesAreConsolidated/index.vue
@@ -63,7 +63,7 @@
-
+
diff --git a/src/views/materials/materialsEquipment/materialReceive/index.vue b/src/views/materials/materialsEquipment/materialReceive/index.vue
index 3f1d4c0..90f6d3d 100644
--- a/src/views/materials/materialsEquipment/materialReceive/index.vue
+++ b/src/views/materials/materialsEquipment/materialReceive/index.vue
@@ -1,14 +1,13 @@
-
+
-
+
@@ -16,8 +15,7 @@
-
+
@@ -38,8 +36,7 @@
- 新增
+ 新增
@@ -50,8 +47,9 @@
- {{ scope.row.materialSource == '1' ?
- '甲供材料' : '乙供材料' }}
+ {{
+ scope.row.materialSource == '1' ? '甲供材料' : '乙供材料'
+ }}
@@ -77,20 +75,28 @@
- 查看
- 删除
+ 查看
+ 删除
-
+
-
+
@@ -108,10 +114,8 @@
-
-
+
+
@@ -130,11 +134,20 @@
+
+
+
-
+
@@ -149,48 +162,59 @@
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
+
*自动计算(数量-验收数量)
@@ -212,26 +236,22 @@
-
+
-
+
-
+
-
+
@@ -412,7 +432,7 @@ const { queryParams, form, rules } = toRefs(data);
const getList = async () => {
loading.value = true;
try {
- if(queryParams.value.materialSource=='0'){
+ if (queryParams.value.materialSource == '0') {
delete queryParams.value.materialSource;
}
const res = await listMaterialReceive(queryParams.value);
@@ -506,9 +526,9 @@ const handleUpdate = async (row?: MaterialReceiveVO) => {
watchItemChanges(index);
// 手动触发当前条目的数量、验收数量、缺件数量验证
if (materialReceiveFormRef.value) {
- materialReceiveFormRef.value.validateField(`itemList.${index}.quantity`, () => { });
- materialReceiveFormRef.value.validateField(`itemList.${index}.acceptedQuantity`, () => { });
- materialReceiveFormRef.value.validateField(`itemList.${index}.shortageQuantity`, () => { });
+ materialReceiveFormRef.value.validateField(`itemList.${index}.quantity`, () => {});
+ materialReceiveFormRef.value.validateField(`itemList.${index}.acceptedQuantity`, () => {});
+ materialReceiveFormRef.value.validateField(`itemList.${index}.shortageQuantity`, () => {});
}
});
@@ -619,9 +639,9 @@ const handleAcceptedInput = (index: number) => {
// 手动验证数量和验收数量字段
const validateQuantityField = (index: number) => {
if (materialReceiveFormRef.value) {
- materialReceiveFormRef.value.validateField(`itemList.${index}.quantity`, () => { });
- materialReceiveFormRef.value.validateField(`itemList.${index}.acceptedQuantity`, () => { });
- materialReceiveFormRef.value.validateField(`itemList.${index}.shortageQuantity`, () => { });
+ materialReceiveFormRef.value.validateField(`itemList.${index}.quantity`, () => {});
+ materialReceiveFormRef.value.validateField(`itemList.${index}.acceptedQuantity`, () => {});
+ materialReceiveFormRef.value.validateField(`itemList.${index}.shortageQuantity`, () => {});
}
};
diff --git a/src/views/progress/progressCategory/index.vue b/src/views/progress/progressCategory/index.vue
index 0344712..dc775dd 100644
--- a/src/views/progress/progressCategory/index.vue
+++ b/src/views/progress/progressCategory/index.vue
@@ -298,6 +298,11 @@ const getList = async () => {
const res = await getProjectSquare(currentProject.value?.id);
if (res.data.length === 0) {
proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
+ matrixOptions.value = [];
+ queryParams.value.projectId = '';
+ form.value.projectId = '';
+ tabList.value = [];
+ activeTab.value = '';
} else {
let matrixList = res.data.map((item) => {
return {
@@ -472,6 +477,7 @@ const matrixValue = ref(matrixOptions.value.length > 0 ? mat
const resetMatrix = () => {
matrixValue.value = undefined;
queryParams.value.matrixId = undefined;
+ queryParams.value.projectId = undefined;
matrixOptions.value = [];
};
@@ -491,8 +497,6 @@ onMounted(() => {
const listeningProject = watch(
() => currentProject.value?.id,
(nid, oid) => {
- queryParams.value.projectId = nid;
- form.value.projectId = nid;
resetMatrix();
getList();
}
diff --git a/src/views/project/landTransfer/BasicData/landBlock/index.vue b/src/views/project/landTransfer/BasicData/landBlock/index.vue
index 3c45c71..45a08a1 100644
--- a/src/views/project/landTransfer/BasicData/landBlock/index.vue
+++ b/src/views/project/landTransfer/BasicData/landBlock/index.vue
@@ -234,7 +234,7 @@ const showSearch = ref(true);
const uploadRef = ref(null);
// 方阵表单模型(核心修复:使用reactive并显式声明结构)
-const formM = reactive({
+const formM = ref({
landId: undefined,
unitBoList: [{ unitProjectArea: '', unitProjectStatus: '', unitProjectId: [] }]
});
@@ -424,11 +424,11 @@ const getfangzhenList = async () => {
/** 关联方阵 */
const handleView = async (row: LandBlockVO) => {
if (!row?.id) return proxy?.$modal.msgWarning('请选择有效的地块');
-
+ console.log('🚀 ~ handleView ~ row:', row);
// 重置方阵表单
resetMatrix();
// 绑定当前地块ID
- formM.landId = row.id;
+ formM.value.landId = row.id;
// 打开弹窗
dialogMatrix.visible = true;
@@ -437,7 +437,7 @@ const handleView = async (row: LandBlockVO) => {
/** 新增方阵表单项 */
const addUnitBoItem = () => {
- formM.unitBoList.push({
+ formM.value.unitBoList.push({
unitProjectArea: '',
unitProjectStatus: '',
unitProjectId: []
@@ -448,10 +448,10 @@ const addUnitBoItem = () => {
/** 删除方阵表单项 */
const removeUnitBoItem = (index: number) => {
- if (formM.unitBoList.length <= 1) {
+ if (formM.value.unitBoList.length <= 1) {
return proxy?.$modal.msgWarning('至少保留一项方阵配置');
}
- formM.unitBoList.splice(index, 1);
+ formM.value.unitBoList.splice(index, 1);
landBlockFormMatrixRef.value?.clearValidate();
};
@@ -459,11 +459,11 @@ const removeUnitBoItem = (index: number) => {
const submitFormMatrix = () => {
landBlockFormMatrixRef.value?.validate(async (valid: boolean) => {
if (!valid) return;
- if (!formM.landId) return proxy?.$modal.msgWarning('地块ID异常,请重新选择地块');
+ if (!formM.value.landId) return proxy?.$modal.msgWarning('地块ID异常,请重新选择地块');
try {
// 处理方阵数据(修复ID拆分逻辑)
- const unitBoListParams = formM.unitBoList.map((item) => {
+ const unitBoListParams = formM.value.unitBoList.map((item) => {
// 取级联选择的最后一层值
const lastLevelValue = item.unitProjectId[item.unitProjectId.length - 1];
if (!lastLevelValue) throw new Error('请选择完整的方阵');
@@ -482,7 +482,7 @@ const submitFormMatrix = () => {
// 调用关联接口
const res = await LandUnit({
- landId: formM.landId,
+ landId: formM.value.landId,
unitBoList: unitBoListParams
});
@@ -507,12 +507,12 @@ const cancelMatrix = () => {
/** 方阵表单重置 */
const resetMatrix = () => {
- formM.landId = undefined;
- formM.unitBoList = [{ unitProjectArea: '', unitProjectStatus: '', unitProjectId: [] }];
if (landBlockFormMatrixRef.value) {
landBlockFormMatrixRef.value.resetFields();
landBlockFormMatrixRef.value.clearValidate();
}
+ formM.value.landId = undefined;
+ formM.value.unitBoList = [{ unitProjectArea: '', unitProjectStatus: '', unitProjectId: [] }];
};
/** 监听项目变化,刷新数据 */
diff --git a/src/views/tender/bidd/index.vue b/src/views/tender/bidd/index.vue
index 72953a1..decefba 100644
--- a/src/views/tender/bidd/index.vue
+++ b/src/views/tender/bidd/index.vue
@@ -17,7 +17,7 @@
- {{ isExpandAll ? '一键收起' : '一键展开' }}
+ {{ isExpandAll ? '一键收起' : '一键展开' }}
@@ -58,7 +58,16 @@
-
+
@@ -159,12 +168,16 @@ const changeVersions = (value) => {
const changeSheet = (val: any) => {
getTableData();
};
-//展开树
-const toggleExpandAll = () => {
+
+const handleToggleExpandAll = () => {
isExpandAll.value = !isExpandAll.value;
- console.log(isExpandAll.value);
- tableData.value.forEach((row) => {
- tableRef.value.toggleRowExpansion(row, isExpandAll.value);
+ toggleExpandAll(tableData.value, isExpandAll.value);
+};
+//展开树
+const toggleExpandAll = (data: any[], status: boolean) => {
+ data.forEach((item) => {
+ tableRef.value[0]?.toggleRowExpansion(item, status);
+ if (item.children && item.children.length > 0) toggleExpandAll(item.children, status);
});
};