From a3ff86d0726ce9bdbb7fa7167e01a3037137e7d7 Mon Sep 17 00:00:00 2001
From: 13937891274 <kxc0822>
Date: Wed, 10 Aug 2022 15:47:52 +0800
Subject: [PATCH] 对接
---
src/views/facilityManagement/ProductionEquipment/index.vue | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/views/facilityManagement/ProductionEquipment/index.vue b/src/views/facilityManagement/ProductionEquipment/index.vue
index c932fbc..2ad3c20 100644
--- a/src/views/facilityManagement/ProductionEquipment/index.vue
+++ b/src/views/facilityManagement/ProductionEquipment/index.vue
@@ -28,7 +28,7 @@
<div class="btns">
<div>
<el-button size="default" type="primary" :icon="Plus" @click="openD('新建')">新建</el-button>
- <el-button size="default" :disabled="warning" type="warning" plain :icon="EditPen">修改</el-button>
+ <!-- <el-button size="default" :disabled="warning" type="warning" plain :icon="EditPen">修改</el-button> -->
<el-button size="default" :disabled="danger" type="danger" :icon="Delete" @click="onDeleteAll" plain>删除</el-button>
</div>
<div>
@@ -38,7 +38,7 @@
</div>
</div>
<div style="padding-left: 10px">
- <el-table ref="multipleTableRef" :data="tableData" style="width: 100%">
+ <el-table ref="multipleTableRef" :data="tableData" @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="selection" align="center" width="55" />
<el-table-column type="expand">
<template #default="scope">
@@ -136,12 +136,13 @@
searchParams: {
qName: '', ////名称
positionNum: '', ////位号
- infoType: 0, ////具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施
+ infoType: 1, ////具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施
},
});
// 重置
const resetForm = () => {
ruleForm.searchParams.qName = '';
+ ruleForm.searchParams.positionNum = '';
listApi();
};
const listApi = () => {
@@ -183,10 +184,12 @@
// 弹窗
const openAdd = ref();
const openD = (title: String, id: number) => {
- openAdd.value.openDailog(title,false,id,1);
+ openAdd.value.openDailog(title,true,id,1);
};
// 删除
const onDelete = (id: number) => {
+ let arr=[]
+ arr.push(id)
ElMessageBox.confirm('确定删除所选项吗?', 'Warning', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -194,7 +197,7 @@
})
.then(() => {
facilityManagementApi()
- .getequipmentInfoDelete(id)
+ .getequipmentInfoDelete(arr)
.then((res) => {
if (res.data.code == 200) {
ElMessage({
@@ -224,15 +227,15 @@
for (let i = 0; i < valId.length; i++) {
arr.push(valId[i].id);
}
- deletAll.value = arr.toString();
+ deletAll.value = arr
if (val.length == 1) {
- // warning.value = false;
+ warning.value = false;
danger.value = false;
} else if (val.length == 0) {
- // warning.value = true;
+ warning.value = true;
danger.value = true;
} else {
- // warning.value = true;
+ warning.value = true;
danger.value = false;
}
};
@@ -296,7 +299,7 @@
return data.typeName.includes(value);
};
const handleNodeClick=(data: Tree)=>{
- ruleForm.searchParams.positionNum=data.id
+ ruleForm.searchParams.positionNum=data.sortNum
listApi();
}
const data=ref([])
--
Gitblit v1.9.2