基坑管理-测点管理
parent
cd158636f1
commit
1c28b1c19b
|
|
@ -10,26 +10,35 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="pitElementList" >
|
||||
<el-table-column label="编号" align="center" prop="id" width="100"/>
|
||||
<el-table-column label="构件名称" align="center" prop="name" />
|
||||
<el-table-column label="监测项名称(EN)" align="center" prop="nameEn" >
|
||||
<template v-slot="scope">
|
||||
<span class="ignore">{{ scope.row.nameEn}}</span>
|
||||
<el-table v-loading="loading" :data="pitElementList" stripe ref="expandTable">
|
||||
<el-table-column type="expand">
|
||||
<template #default="props">
|
||||
<el-table :data="props.row.children" border stripe>
|
||||
<el-table-column label="子项名称" align="center" prop="name" />
|
||||
<el-table-column label="子项步长" align="center" prop="step" />
|
||||
<el-table-column label="子项单位" align="center" prop="unit" />
|
||||
<el-table-column label="子项值范围" align="center" prop="valueRange" />
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="构件类型" align="center" prop="type" >
|
||||
<template v-slot="scope">
|
||||
<span class="ignore">{{ scope.row.type}}</span>
|
||||
<el-table-column label="编号" align="center" prop="srvId" width="80" />
|
||||
<el-table-column label="项目名称" align="center" prop="prjName" width="250" />
|
||||
<el-table-column label="总包单位" align="center" prop="deptName" width="250" />
|
||||
<el-table-column label="监测项名称" align="center" prop="name" />
|
||||
<el-table-column label="监测项名称(EN)" align="center" prop="nameEn">
|
||||
<template #default="scope">
|
||||
<code>{{ scope.row.nameEn }}</code>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" align="center" prop="type">
|
||||
<template #default="scope">
|
||||
<code>{{ scope.row.type }}</code>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total>0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -79,7 +88,26 @@ export default {
|
|||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
mounted() {
|
||||
// 页面加载完成后默认展开所有行
|
||||
this.$nextTick(() => {
|
||||
this.expandAllRows();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 展开所有行
|
||||
expandAllRows() {
|
||||
this.$nextTick(() => {
|
||||
if (this.pitElementList && this.pitElementList.length > 0) {
|
||||
this.pitElementList.forEach((row, index) => {
|
||||
// 确保行有子数据才展开
|
||||
if (row.children && row.children.length > 0) {
|
||||
this.$refs.expandTable.toggleRowExpansion(row, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
doQuerySub() {
|
||||
let prjId=this.queryParams.projectId;
|
||||
let tmps = this.prjDept2 && this.prjDept2[prjId] ? this.prjDept2[prjId] || [] : [];
|
||||
|
|
@ -91,6 +119,10 @@ export default {
|
|||
this.queryParams.subDeptId = '';
|
||||
}
|
||||
this.getList();
|
||||
// 数据更新后重新展开所有行
|
||||
this.$nextTick(() => {
|
||||
this.expandAllRows();
|
||||
});
|
||||
return;
|
||||
}
|
||||
queryUnitList({
|
||||
|
|
@ -109,6 +141,10 @@ export default {
|
|||
this.queryParams.subDeptId = '';
|
||||
}
|
||||
this.getList();
|
||||
// 数据更新后重新展开所有行
|
||||
this.$nextTick(() => {
|
||||
this.expandAllRows();
|
||||
});
|
||||
});
|
||||
},
|
||||
init() {
|
||||
|
|
@ -127,6 +163,10 @@ export default {
|
|||
console.log("pitElementList==",response)
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
// 数据更新后重新展开所有行
|
||||
this.$nextTick(() => {
|
||||
this.expandAllRows();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
|
@ -148,4 +188,4 @@ export default {
|
|||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
|
@ -1,81 +1,58 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="测点名称" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入测点名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleQuery">
|
||||
<el-icon style="margin-right: 5px;"><Search /></el-icon>搜索
|
||||
</el-button>
|
||||
<el-button @click="resetQuery">
|
||||
<el-icon style="margin-right: 5px;"><Refresh /></el-icon>重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="small" @click="handleAdd"
|
||||
v-hasPermi="['device:pitSurveyPoint:add']">新增</el-button>
|
||||
<el-button type="primary" plain @click="handlePosition">
|
||||
<el-icon style="margin-right: 5px;"><Location /></el-icon>标注
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-edit" size="small" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['device:pitSurveyPoint:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="small" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['device:pitSurveyPoint:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="small" @click="handleExport"
|
||||
v-hasPermi="['device:pitSurveyPoint:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch="showSearch" @update:showSearch="showSearch = $event" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="pitSurveyPointList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table v-loading="loading" :data="pitSurveyPointList">
|
||||
<el-table-column label="编号" align="center" prop="spId" width="80" />
|
||||
<el-table-column label="项目名称" align="center" prop="prjName" width="180" />
|
||||
<el-table-column label="总包单位" align="center" prop="deptName" width="180" />
|
||||
<el-table-column label="所属监测点组名称" align="center" prop="groupName" />
|
||||
<el-table-column label="监测项名称" align="center" prop="meName" />
|
||||
<el-table-column label="监测项英文标识名" align="center" prop="meNameEn" />
|
||||
<el-table-column label="测点名称" align="center" prop="name" />
|
||||
<el-table-column label="测点类型" align="center" prop="type" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="small" type="primary" text icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['device:pitSurveyPoint:edit']">修改</el-button>
|
||||
<el-button size="small" type="danger" text icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['device:pitSurveyPoint:remove']">删除</el-button>
|
||||
</template>
|
||||
<el-table-column label="数据来源形式" align="center" prop="dataSource">
|
||||
<template #default="scope">{{ ["人工上传", "设备"][scope.row.dataSource] }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total>0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改基坑测点对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="测点名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入测点名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测点类型" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择测点类型">
|
||||
<el-option v-for="dict in dict.type.pit_survey_point_type" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<surveyPointPositionDrawer ref="ptDrawer" @success="handleQuery"></surveyPointPositionDrawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPitSurveyPoint, getPitSurveyPoint, delPitSurveyPoint, addPitSurveyPoint, updatePitSurveyPoint } from "@/api/device/pitSurveyPoint";
|
||||
|
||||
import { Search, Refresh, Location } from '@element-plus/icons-vue';
|
||||
import surveyPointPositionDrawer from './surveyPointPositionDrawer.vue'
|
||||
export default {
|
||||
name: "PitSurveyPoint",
|
||||
components: {
|
||||
surveyPointPositionDrawer,
|
||||
Search,
|
||||
Refresh,
|
||||
Location
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
|
@ -113,6 +90,9 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handlePosition() {
|
||||
this.$refs.ptDrawer.show(this.pitSurveyPointList, this.queryParams);
|
||||
},
|
||||
/** 查询测点管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
|
@ -122,20 +102,6 @@ export default {
|
|||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
name: null,
|
||||
type: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
|
|
@ -146,64 +112,6 @@ export default {
|
|||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加测点管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getPitSurveyPoint(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改测点管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePitSurveyPoint(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPitSurveyPoint(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除测点管理编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delPitSurveyPoint(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('device/pitSurveyPoint/export', {
|
||||
...this.queryParams
|
||||
}, `pitSurveyPoint_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
Loading…
Reference in New Issue