From 2a3018105d22625b566752d9d841e12e2c80e1f3 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期四, 15 一月 2026 16:38:17 +0800
Subject: [PATCH] 计量器具台账 页面开发(100%)
---
src/views/equipmentManagement/measurementEquipment/index.vue | 142 ++++++++++++++++++++++++++--------------------
1 files changed, 80 insertions(+), 62 deletions(-)
diff --git a/src/views/equipmentManagement/measurementEquipment/index.vue b/src/views/equipmentManagement/measurementEquipment/index.vue
index 363a85a..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,25 +157,26 @@
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);
- // },
- // },
],
},
]);
const tableData = ref([]);
const tableLoading = ref(false);
+const rowClickData = ref([])
const filesDia = ref()
const page = reactive({
current: 1,
@@ -170,12 +187,13 @@
// 鎵撳紑闄勪欢寮规
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) => {
selectedRows.value = selection;
--
Gitblit v1.9.3