From 0345726cb118a0967989fb64159122117b297a97 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 02 二月 2026 13:59:01 +0800
Subject: [PATCH] 整改限制
---
src/views/safeProduction/dangerInvestigation/index.vue | 110 +++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 79 insertions(+), 31 deletions(-)
diff --git a/src/views/safeProduction/dangerInvestigation/index.vue b/src/views/safeProduction/dangerInvestigation/index.vue
index 1878370..90093fa 100644
--- a/src/views/safeProduction/dangerInvestigation/index.vue
+++ b/src/views/safeProduction/dangerInvestigation/index.vue
@@ -125,6 +125,7 @@
<el-button link
type="primary"
size="small"
+ :disabled="scope.row.isRectify"
@click="openForm('edit2', scope.row)">鏁存敼</el-button>
<el-button link
type="primary"
@@ -267,10 +268,11 @@
</el-col>
</el-row>
</el-form>
+ <div v-if="operationType === 'edit2' || operationType === 'edit3'"
+ class="classtitle">闅愭偅璇︽儏</div>
<el-descriptions :column="2"
style="margin-bottom: 20px;"
v-if="operationType === 'edit2' || operationType === 'edit3'"
- title="闅愭偅璇︽儏"
border>
<el-descriptions-item label="闅愭偅缂栧彿">
<span class="detail-title">{{ form.hiddenCode }}</span>
@@ -283,7 +285,7 @@
<span class="detail-title">{{ form.hiddenDesc }}</span>
</el-descriptions-item>
<el-descriptions-item label="闅愭偅绫诲瀷">
- <span class="detail-title">{{ form.type }}</span>
+ <span class="detail-title">{{ TypeLabel(form.type) }}</span>
</el-descriptions-item>
<el-descriptions-item label="闅愭偅椋庨櫓绛夌骇">
<el-tag :type="getTypeTagType(form.riskLevel)">
@@ -306,10 +308,12 @@
<span class="detail-title">{{ form.rectifyTime }}</span>
</el-descriptions-item>
</el-descriptions>
+ <div class="classtitle"
+ v-if="operationType === 'edit3'"
+ style="margin-top: 40px;">鏁存敼璇︽儏</div>
<el-descriptions :column="2"
style="margin-bottom: 20px;"
v-if="operationType === 'edit3'"
- title="鏁存敼璇︽儏"
border>
<el-descriptions-item label="鏁存敼鍏蜂綋鎺柦"
:span="2">
@@ -319,6 +323,9 @@
<span class="detail-title">{{ form2.rectifyActualTime }}</span>
</el-descriptions-item>
</el-descriptions>
+ <div class="classtitle"
+ v-if="operationType === 'edit2' || operationType === 'edit3'"
+ style="margin-top: 40px;margin-bottom: 30px;">楠屾敹鎯呭喌</div>
<el-form :model="form2"
v-if="operationType === 'edit2'"
label-width="140px"
@@ -413,8 +420,11 @@
v-model="fileListDialogVisible"
:show-upload-button="true"
:show-delete-button="true"
+ :is-show-pagination="true"
+ :page="filePagination"
:upload-method="handleUpload"
:delete-method="handleFileDelete"
+ @pagination="paginationSearch"
title="闄勪欢鍒楄〃" />
</div>
</template>
@@ -422,7 +432,7 @@
<script setup>
import { getToken } from "@/utils/auth";
import pagination from "@/components/PIMTable/Pagination.vue";
- import { onMounted, ref, getCurrentInstance } from "vue";
+ import { onMounted, ref, getCurrentInstance, computed } from "vue";
import { ElMessageBox, ElMessage } from "element-plus";
import useUserStore from "@/store/modules/user";
import { userListNoPage } from "@/api/system/user.js";
@@ -517,28 +527,12 @@
verifyResult: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
acceptDesc: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
};
- const typeList = ref([
- {
- value: "璁惧瀹夊叏",
- label: "璁惧瀹夊叏",
- },
- {
- value: "浜哄憳鎿嶄綔",
- label: "浜哄憳鎿嶄綔",
- },
- {
- value: "鐜椋庨櫓",
- label: "鐜椋庨櫓",
- },
- {
- value: "鐗╂枡绠℃帶",
- label: "鐗╂枡绠℃帶",
- },
- {
- value: "鍏朵粬",
- label: "鍏朵粬",
- },
- ]);
+ const { hidden_danger_type } = proxy.useDict("hidden_danger_type");
+ const typeList = computed(() => hidden_danger_type?.value || []);
+ const TypeLabel = val => {
+ const item = typeList.value.find(i => String(i.value) === String(val));
+ return item ? item.label : val;
+ };
const form2 = ref({
rectifyActualTime: "", // 瀹為檯鏁存敼瀹屾垚鏃堕棿
rectifyMeasures: "", // 鏁存敼鍏蜂綋鎺柦
@@ -569,8 +563,6 @@
label: "浣庨闄�",
},
]);
- // 闅愭偅绫诲瀷閫夐」
- const { type_qualification } = proxy.useDict("type_qualification");
const { form, rules } = toRefs(data);
const { form: searchForm } = useFormData(data.searchForm);
// 浜у搧琛ㄥ崟寮规鏁版嵁
@@ -667,6 +659,14 @@
tableLoading.value = false;
tableData.value = res.data.records;
total.value = res.data.total;
+ tableData.value.forEach(item => {
+ // console.log(item.rectifyUserId, currentUserId.value, "=======");
+ if (Number(item.rectifyUserId) != Number(currentUserId.value)) {
+ item.isRectify = true;
+ } else {
+ item.isRectify = false;
+ }
+ });
return res;
})
.catch(() => {
@@ -901,6 +901,9 @@
proxy.$modal.msg("宸插彇娑�");
});
};
+ const isPeople = rectifyUserId => {
+ return Number(rectifyUserId) == Number(currentUserId.value);
+ };
/**
* 鍒ゆ柇鏄惁鍙互鍙戣揣
@@ -925,6 +928,11 @@
const statusStr = shippingStatus ? String(shippingStatus).trim() : "";
return statusStr === "寰呭彂璐�" || statusStr === "瀹℃牳鎷掔粷";
};
+ const filePagination = ref({
+ current: 1,
+ size: 10,
+ total: 0,
+ });
/**
* 涓嬭浇鏂囦欢
@@ -936,9 +944,15 @@
const currentFileRow = ref(null);
const downLoadFile = row => {
currentFileRow.value = row;
- fileListPage({ safeHiddenId: row.id }).then(res => {
+ fileListPage({
+ safeHiddenId: row.id,
+ current: filePagination.value.current,
+ size: filePagination.value.size,
+ }).then(res => {
if (fileListRef.value) {
- fileListRef.value.open(res.data.records);
+ fileListRef.value.open(res.data.records || []);
+ console.log("res.data", res.data);
+ filePagination.value.total = res.data.total || 0;
}
});
};
@@ -970,11 +984,11 @@
};
onMounted(() => {
+ getCurrentFactoryName();
getList();
userListNoPage().then(res => {
userList.value = res.data;
});
- getCurrentFactoryName();
});
// 涓婁紶闄勪欢
const handleUpload = async () => {
@@ -1024,6 +1038,8 @@
// 閲嶆柊鍔犺浇鏂囦欢鍒楄〃
const listRes = await fileListPage({
safeHiddenId: currentFileRow.value.id,
+ current: filePagination.value.current,
+ size: filePagination.value.size,
});
if (listRes.code === 200 && fileListRef.value) {
const fileList = (listRes.data?.records || []).map(item => ({
@@ -1033,6 +1049,7 @@
...item,
}));
fileListRef.value.setList(fileList);
+ filePagination.value.total = listRes.data?.total || 0;
}
// 杩斿洖鏂版枃浠朵俊鎭�
resolve({
@@ -1060,6 +1077,26 @@
input.click();
});
};
+ // 鍒嗛〉鏌ヨ鏂囦欢鍒楄〃
+ const paginationSearch = async (page, size) => {
+ filePagination.value.current = page;
+ filePagination.value.size = size;
+ const listRes = await fileListPage({
+ safeHiddenId: currentFileRow.value.id,
+ current: filePagination.value.current,
+ size: filePagination.value.size,
+ });
+ if (listRes.code === 200) {
+ const fileList = (listRes.data?.records || []).map(item => ({
+ name: item.name,
+ url: item.url,
+ id: item.id,
+ ...item,
+ }));
+ fileListRef.value.setList(fileList);
+ filePagination.value.total = listRes.data?.total || 0;
+ }
+ };
// 鍒犻櫎闄勪欢
const handleFileDelete = async row => {
try {
@@ -1070,6 +1107,8 @@
if (currentFileRow.value && fileListRef.value) {
const listRes = await fileListPage({
safeHiddenId: currentFileRow.value.id,
+ current: filePagination.value.current,
+ size: filePagination.value.size,
});
if (listRes.code === 200) {
const fileList = (listRes.data?.records || []).map(item => ({
@@ -1079,6 +1118,7 @@
...item,
}));
fileListRef.value.setList(fileList);
+ filePagination.value.total = listRes.data?.total || 0;
}
}
return true; // 杩斿洖 true 琛ㄧず鍒犻櫎鎴愬姛锛岀粍浠朵細鏇存柊鍒楄〃
@@ -1290,4 +1330,12 @@
page-break-after: avoid;
}
}
+ .classtitle {
+ font-size: 16px;
+ font-weight: 600;
+ color: #303133;
+ border-left: 4px solid #409eff;
+ padding-left: 12px;
+ margin-bottom: 12px;
+ }
</style>
--
Gitblit v1.9.3