From ec9159301e174288bf276b85b52639dcd90feb19 Mon Sep 17 00:00:00 2001
From: shj <1790240199@qq.com>
Date: 星期六, 30 七月 2022 15:51:39 +0800
Subject: [PATCH] 对接
---
src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue | 3 +--
src/views/facilityManagement/InstrumentationInformation/index.vue | 45 ++++++++++++++++++++++++++-------------------
src/components/DailogSearchUser/index.vue | 1 -
src/components/equipmentDailog/Dailog.vue | 2 +-
4 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/src/components/DailogSearchUser/index.vue b/src/components/DailogSearchUser/index.vue
index dd4eb9f..7bfe7f2 100644
--- a/src/components/DailogSearchUser/index.vue
+++ b/src/components/DailogSearchUser/index.vue
@@ -119,7 +119,6 @@
//左边树形部分点击获取回调
const names = ref<any>();
const handleNodeClick = (data: Tree) => {
- console.log(data);
goalManagementApi()
.getManName(data.depId)
.then((res) => {
diff --git a/src/components/equipmentDailog/Dailog.vue b/src/components/equipmentDailog/Dailog.vue
index 6e2aed7..4898767 100644
--- a/src/components/equipmentDailog/Dailog.vue
+++ b/src/components/equipmentDailog/Dailog.vue
@@ -1,5 +1,5 @@
<template>
- <el-dialog v-model="dialogVisible" :fullscreen="full" title="新建仪器仪表" width="60%">
+ <el-dialog v-model="dialogVisible" :fullscreen="full" draggable title="新建仪器仪表" width="60%">
<el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button>
<el-form :model="form" label-width="120px" class="formType">
<el-form-item label="装置设施名称" size="default">
diff --git a/src/views/facilityManagement/InstrumentationInformation/index.vue b/src/views/facilityManagement/InstrumentationInformation/index.vue
index d975b7a..3a8d289 100644
--- a/src/views/facilityManagement/InstrumentationInformation/index.vue
+++ b/src/views/facilityManagement/InstrumentationInformation/index.vue
@@ -17,9 +17,11 @@
</el-form>
<el-row>
<el-col :span="4">
+ <el-input v-model="filterText" style="height: 30px" placeholder="请输入关键字" />
<div class="tree">
- <el-input v-model="filterText" style="height: 30px" placeholder="Filter keyword" />
- <el-tree ref="treeRef" class="filter-tree" :data="data" :props="props" :filter-node-method="filterNode" />
+
+ <!-- <el-tree ref="treeRef" class="filter-tree" :data="data" :props="props" :filter-node-method="filterNode" /> -->
+ <el-tree ref="treeRef" :data="data" :props="props" @node-click="handleNodeClick" :filter-node-method="filterNode" />
</div>
</el-col>
<el-col :span="20">
@@ -81,7 +83,7 @@
</el-tabs>
</template>
</el-table-column>
- <el-table-column property="qName" label="装置设施名称" align="center" sortable/>
+ <el-table-column property="qName" label="装置设施名称" align="center" sortable />
<el-table-column property="positionNum" align="center" label="装置设施位号" sortable />
<el-table-column property="qUsage" align="center" label="装置设施用途" sortable />
<el-table-column property="model" label="装置设施型号" align="center" sortable show-overflow-tooltip />
@@ -89,8 +91,8 @@
<el-table-column property="setPart" label="设施部位" align="center" sortable show-overflow-tooltip />
<el-table-column label="操作" align="center" width="250">
<template #default="scope">
- <el-button link type="primary" size="default" :icon="View">查看</el-button>
- <el-button link type="primary" size="default" :icon="EditPen">修改</el-button>
+ <el-button link type="primary" size="default" :icon="View" @click="openD('查看', scope.row.id)">查看</el-button>
+ <el-button link type="primary" size="default" :icon="EditPen" @click="openD('修改', scope.row.id)">修改</el-button>
<el-button link type="primary" size="default" :icon="Delete" @click="onDelete(scope.row.id)">删除</el-button>
</template>
</el-table-column>
@@ -99,9 +101,9 @@
<el-pagination
v-model:currentPage="currentPage4"
v-model:page-size="pageSize4"
- :page-sizes="[100, 200, 300, 400]"
+ :page-sizes="[10, 20, 30, 40]"
layout="total, sizes, prev, pager, next, jumper"
- :total="400"
+ :total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
@@ -119,7 +121,7 @@
import Dailog from '/@/components/equipmentDailog/Dailog.vue';
import { ElTree, TabsPaneContext, ElMessage, ElMessageBox } from 'element-plus';
import { facilityManagementApi } from '/@/api/facilityManagement';
-import { EditPen, Plus, Delete, Download, Refresh, Upload } from '@element-plus/icons-vue';
+import { EditPen, View, Plus, Delete, Download, Refresh, Upload } from '@element-plus/icons-vue';
interface Tree {
label: string;
children?: Tree[];
@@ -264,19 +266,13 @@
};
const filterText = ref('');
const treeRef = ref<InstanceType<typeof ElTree>>();
-
- const props = {
- value: 'id',
- lable: 'typeName',
- children: 'childList',
- };
// 树形
const listApiTree = () => {
facilityManagementApi()
.getequipmentTypeMngTreeData()
.then((res) => {
if (res.data.code == 200) {
- data.value = res.data.data;
+ data.value= res.data.data;
} else {
ElMessage({
showClose: true,
@@ -286,28 +282,38 @@
}
});
};
+ const props = {
+ label: 'typeName',
+ children: 'childList',
+ value: 'id',
+ }
watch(filterText, (val) => {
treeRef.value!.filter(val);
});
const filterNode = (value: string, data: Tree) => {
if (!value) return true;
- return data.label.includes(value);
+ return data.typeName.includes(value);
};
-
- const data = ref([]);
+ const handleNodeClick=(data: Tree)=>{
+ ruleForm.searchParams.positionNum=data.id
+ listApi();
+ }
+ const data=ref([])
onMounted(() => {
listApiTree();
});
const handleClicks = (tab: TabsPaneContext, event: Event) => {
console.log(tab, event);
};
- const activeName=ref("first")
+
+ const activeName = ref('first');
// const Show=ref()
// const openUp=()=>{
// Show.value.openDialog()
// }
return {
+ handleNodeClick,
ruleForm,
resetForm,
listApi,
@@ -339,6 +345,7 @@
Delete,
Download,
Refresh,
+ View,
Upload,
};
},
diff --git a/src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue b/src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue
index 1c862ac..0d19e41 100644
--- a/src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue
+++ b/src/views/goalManagement/targetDecompositionYear/component/DailogAdd.vue
@@ -138,13 +138,12 @@
value:"depId"
};
onMounted(() => {
-
+ department()
});
const disabled=ref(false)
// 开启弹窗
const dialogVisible = ref(false);
const openDailog = (title:string,data:any) => {
- department();
if(title=='查看'){
disabled.value=true
form.value=data
--
Gitblit v1.9.2