From 9289a4fbacafcc7a80385fc3a3167f383d5cf991 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 15 一月 2026 18:00:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New' into dev_New
---
src/views/equipmentManagement/measurementEquipment/index.vue | 148 ++++++++++++++++++++++++++----------------------
1 files changed, 80 insertions(+), 68 deletions(-)
diff --git a/src/views/equipmentManagement/measurementEquipment/index.vue b/src/views/equipmentManagement/measurementEquipment/index.vue
index e983a99..129f23b 100644
--- a/src/views/equipmentManagement/measurementEquipment/index.vue
+++ b/src/views/equipmentManagement/measurementEquipment/index.vue
@@ -40,11 +40,13 @@
@selection-change="handleSelectionChange"
:tableLoading="tableLoading"
@pagination="pagination"
+ :dbRowClick="dbRowClick"
></PIMTable>
</div>
<form-dia ref="formDia" @close="handleQuery"></form-dia>
<calibration-dia ref="calibrationDia" @close="handleQuery"></calibration-dia>
<files-dia ref="filesDia"></files-dia>
+ <rowClickDataForm ref="rowClickData"></rowClickDataForm>
</div>
</template>
@@ -55,10 +57,11 @@
import useUserStore from "@/store/modules/user.js";
import CalibrationDia from "@/views/equipmentManagement/measurementEquipment/components/calibrationDia.vue";
import {
- measuringInstrumentDelete,
- measuringInstrumentListPage
+ measuringInstrumentDelete,
+ measuringInstrumentListPage,
} from "@/api/equipmentManagement/measurementEquipment.js";
import FilesDia from "./filesDia.vue";
+import rowClickDataForm from "./components/rowClickData.vue"
const { proxy } = getCurrentInstance();
const userStore = useUserStore()
@@ -73,67 +76,80 @@
const tableColumn = ref([
{
- label: "鐘舵��",
- prop: "status",
- dataType: "tag",
- formatData: (params) => {
- if (params == 1) {
- return "鏈夋晥";
- } else if (params == 2) {
- return "閫炬湡";
- } else {
- return null;
- }
- },
- formatType: (params) => {
- if (params == 1) {
- return "success";
- } else if (params == 2) {
- return "danger";
- } else {
- return null;
- }
- },
+ label: "鍑哄巶缂栧彿",
+ prop: "code",
+ minWidth:150,
+ align:"center"
},
{
- label: "鏈�杩戜竴娆℃瀹氭棩鏈�",
+ label: "閮ㄩ棬",
+ prop: "deptName",
+ width: 130,
+ align:"center"
+ },
+ {
+ label: "瀹夎浣嶇疆",
+ prop: "installationLocation",
+ width: 150,
+ align:"center"
+ },
+ {
+ label: "妫�瀹氬崟浣�",
+ prop: "unit",
+ width: 200,
+ align:"center"
+ },
+ {
+ label: "璇佷功缂栧彿",
+ prop: "model",
+ width:200,
+ align:"center"
+ },
+ {
+ label: "鏈�鏂伴壌瀹氭棩鏈�",
prop: "mostDate",
width: 130,
- },
- {
- label: "璁¢噺鍣ㄥ叿缂栧彿",
- prop: "code",
- width: 150,
- },
- {
- label: "璁¢噺鍣ㄥ叿鍚嶇О",
- prop: "name",
- width: 200,
- },
- {
- label: "瑙勬牸鍨嬪彿",
- prop: "model",
- width:200
- },
- {
- label: "鏈夋晥鏈�",
- prop: "valid",
- width: 130,
- },
- {
- label: "棰勮涓嬫妫�瀹氭棩鏈�",
- prop: "nextDate",
- width: 130,
+ align:"center"
},
{
label: "褰曞叆浜�",
prop: "userName",
+ width: 130,
+ align:"center"
},
{
label: "褰曞叆鏃ユ湡",
prop: "recordDate",
- width: 130,
+ align:"center",
+ minWidth: 130
},
+ {
+ label: "鏈夋晥鏃ユ湡",
+ prop: "valid",
+ width: 130,
+ align:"center"
+ },
+ {
+ label: "妫�瀹氬懆鏈�(澶�)",
+ prop: "cycle",
+ width: 130,
+ align:"center"
+ },
+ {
+ label: "鐘舵��",
+ prop: "status",
+ width: 130,
+ align: "center",
+ formatData: (params) => {
+ if (params === 1) {
+ return "鏈夋晥";
+ } else if (params === 2) {
+ return "閫炬湡";
+ } else {
+ return null;
+ }
+ }
+ },
{
dataType: "action",
label: "鎿嶄綔",
@@ -141,18 +157,18 @@
width: '130',
fixed: 'right',
operation: [
+ {
+ name: "闄勪欢",
+ type: "text",
+ clickFun: (row) => {
+ openFilesFormDia(row);
+ },
+ },
{
- name: "妫�瀹氭牎鍑�",
+ name: "鏌ョ湅",
type: "text",
clickFun: (row) => {
openCalibrationDia("verifying", row);
- },
- },
- {
- name: "闄勪欢",
- type: "text",
- clickFun: (row) => {
- openFilesFormDia(row);
},
},
],
@@ -160,6 +176,7 @@
]);
const tableData = ref([]);
const tableLoading = ref(false);
+const rowClickData = ref([])
const filesDia = ref()
const page = reactive({
current: 1,
@@ -170,11 +187,12 @@
// 鎵撳紑闄勪欢寮规
const openFilesFormDia = (row) => {
- console.log(row)
- nextTick(() => {
- filesDia.value?.openDialog( row,'璁¢噺鍣ㄥ叿鍙拌处')
- })
+ filesDia.value?.openDialog(row,'璁¢噺鍣ㄥ叿鍙拌处')
};
+
+const dbRowClick = (row)=>{
+ rowClickData.value?.openDialog(row)
+}
// 琛ㄦ牸閫夋嫨鏁版嵁
const handleSelectionChange = (selection) => {
@@ -221,12 +239,6 @@
const handleDelete = () => {
let ids = [];
if (selectedRows.value.length > 0) {
- // 妫�鏌ユ槸鍚︽湁浠栦汉缁存姢鐨勬暟鎹�
- const unauthorizedData = selectedRows.value.filter(item => item.userId !== userStore.id);
- if (unauthorizedData.length > 0) {
- proxy.$modal.msgWarning("涓嶅彲鍒犻櫎浠栦汉缁存姢鐨勬暟鎹�");
- return;
- }
ids = selectedRows.value.map((item) => item.id);
} else {
proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
--
Gitblit v1.9.3