From dacc95761cf7090c628fc37a5d4f8bb825ccbbb0 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期六, 16 五月 2026 15:41:45 +0800
Subject: [PATCH] 企业新闻和通知公告
---
src/views/productionManagement/productionProcess/index.vue | 61 +++++++++++++++++++++---------
1 files changed, 42 insertions(+), 19 deletions(-)
diff --git a/src/views/productionManagement/productionProcess/index.vue b/src/views/productionManagement/productionProcess/index.vue
index ae1732f..6d007a4 100644
--- a/src/views/productionManagement/productionProcess/index.vue
+++ b/src/views/productionManagement/productionProcess/index.vue
@@ -52,6 +52,11 @@
:type="process.isQuality ? 'warning' : 'info'">
{{ process.isQuality ? '璐ㄦ' : '闈炶川妫�' }}
</el-tag>
+ <el-tag size="small"
+ style="margin-left: 8px"
+ :type="process.isProduction ? 'warning' : 'info'">
+ {{ process.isProduction ? '鐢熶骇' : '涓嶇敓浜�' }}
+ </el-tag>
<el-tag v-if="process.type !== null && process.type !== undefined"
size="small"
:type="process.type == 1 ? 'primary' : 'success'"
@@ -123,6 +128,10 @@
prop="isQuality">
<el-switch v-model="processForm.isQuality" />
</el-form-item>
+ <el-form-item label="鏄惁鐢熶骇"
+ prop="isProduction">
+ <el-switch v-model="processForm.isProduction" />
+ </el-form-item>
<el-form-item label="璁¤垂绫诲瀷"
prop="type">
<el-radio-group v-model="processForm.type">
@@ -153,9 +162,9 @@
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button @click="processDialogVisible = false">鍙栨秷</el-button>
<el-button type="primary"
@click="handleProcessSubmit">纭畾</el-button>
+ <el-button @click="processDialogVisible = false">鍙栨秷</el-button>
</span>
</template>
</el-dialog>
@@ -243,10 +252,10 @@
</div>
<template #footer>
<span class="dialog-footer">
- <el-button @click="paramDialogVisible = false">鍙栨秷</el-button>
<el-button type="primary"
:disabled="!selectedParam"
@click="handleParamSubmit">纭畾</el-button>
+ <el-button @click="paramDialogVisible = false">鍙栨秷</el-button>
</span>
</template>
</el-dialog>
@@ -269,9 +278,9 @@
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button @click="editParamDialogVisible = false">鍙栨秷</el-button>
<el-button type="primary"
@click="handleEditParamSubmit">纭畾</el-button>
+ <el-button @click="editParamDialogVisible = false">鍙栨秷</el-button>
</span>
</template>
</el-dialog>
@@ -279,7 +288,7 @@
</template>
<script setup>
- import { ref, reactive, onMounted } from "vue";
+ import { ref, reactive, computed, onMounted } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { Plus, Edit, Delete, Search } from "@element-plus/icons-vue";
import PIMTable from "@/components/PIMTable/PIMTable.vue";
@@ -304,8 +313,19 @@
const processLoading = ref(false);
const deviceOptions = ref([]);
- // 鍙傛暟鍒楄〃鏁版嵁
- const paramList = ref([]);
+ // 宸ュ簭宸查�夊弬鏁拌〃鏍煎垎椤碉紙鎺ュ彛涓�娆¤繑鍥炲叏閲忥級
+ const paramPage2 = ref({
+ current: 1,
+ size: 10,
+ total: 0,
+ });
+ const paramListRaw = ref([]);
+ const paramList = computed(() => {
+ const all = paramListRaw.value;
+ const { current, size } = paramPage2.value;
+ const start = (current - 1) * size;
+ return all.slice(start, start + size);
+ });
const paramLoading = ref(false);
// 鏁版嵁瀛楀吀
@@ -321,6 +341,7 @@
name: "",
salaryQuota: null,
isQuality: false,
+ isProduction: false,
remark: "",
deviceLedgerId: null,
type: 0,
@@ -475,21 +496,21 @@
}
};
- const paramPage2 = ref({
- current: 1,
- size: 10,
- total: 0,
- });
-
// 鑾峰彇鍙傛暟鍒楄〃
const getParamList = processId => {
paramLoading.value = true;
- console.log(paramPage2.value, "paramPage2.value");
getProcessParamList({ technologyOperationId: processId })
.then(res => {
- console.log(res, "res");
- paramList.value = res.data || [];
- paramPage2.value.total = 0;
+ const list = res.data || [];
+ paramListRaw.value = Array.isArray(list) ? list : [];
+ paramPage2.value.total = paramListRaw.value.length;
+ const maxPage = Math.max(
+ 1,
+ Math.ceil(paramPage2.value.total / paramPage2.value.size) || 1
+ );
+ if (paramPage2.value.current > maxPage) {
+ paramPage2.value.current = maxPage;
+ }
})
.catch(() => {
ElMessage.error("鑾峰彇鍙傛暟鍒楄〃澶辫触");
@@ -502,6 +523,7 @@
// 閫夋嫨宸ュ簭
const selectProcess = process => {
selectedProcess.value = process;
+ paramPage2.value.current = 1;
getParamList(process.id);
};
@@ -513,6 +535,7 @@
processForm.name = "";
processForm.salaryQuota = null;
processForm.isQuality = false;
+ processForm.isProduction = false;
processForm.remark = "";
processForm.deviceLedgerId = null;
processForm.type = 0;
@@ -526,6 +549,7 @@
processForm.name = process.name;
processForm.salaryQuota = process.salaryQuota;
processForm.isQuality = !!process.isQuality;
+ processForm.isProduction = !!process.isProduction;
processForm.remark = process.remark || "";
processForm.deviceLedgerId = Number(process.deviceLedgerId);
processForm.type = process.type;
@@ -544,7 +568,8 @@
getProcessList();
if (selectedProcess.value?.id === process.id) {
selectedProcess.value = null;
- paramList.value = [];
+ paramListRaw.value = [];
+ paramPage2.value.total = 0;
}
})
.catch(() => {
@@ -732,10 +757,8 @@
};
const handleParamPagination = obj => {
- console.log(obj, "obj");
paramPage2.value.current = obj.page;
paramPage2.value.size = obj.limit;
- getParamList(selectedProcess.value.id);
};
// 鑾峰彇鏁版嵁瀛楀吀
--
Gitblit v1.9.3