基础管理关闭页面功能修改。
This commit is contained in:
parent
99f7f1ede0
commit
93ac98d15c
|
|
@ -180,7 +180,7 @@ aside {
|
||||||
.map-overlay {
|
.map-overlay {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 1%;
|
top: 1%;
|
||||||
right: 1%;
|
left: 1%;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
height: 5%;
|
height: 5%;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改设备类型对话框 -->
|
<!-- 添加或修改设备类型对话框 -->
|
||||||
<el-dialog width="50%" append-to-body :title="addOrEditFormTitle" :visible.sync="addOrEditFormVisible">
|
<el-dialog width="50%" append-to-body :title="addOrEditFormTitle" :visible.sync="addOrEditFormVisible" @close="closeAddOrEditFormDialog">
|
||||||
<AddOrEditForm ref="addOrEditComponentRef" @closeAddOrEditFormDialog="closeAddOrEditFormDialog"/>
|
<AddOrEditForm ref="addOrEditComponentRef" @closeAddOrEditFormDialog="closeAddOrEditFormDialog"/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -140,12 +140,12 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改岗位对话框 -->
|
<!-- 添加或修改岗位对话框 -->
|
||||||
<el-dialog width="40%" append-to-body :title="addOrEditFormTitle" :visible.sync="addOrEditFormVisible">
|
<el-dialog width="40%" append-to-body :title="addOrEditFormTitle" :visible.sync="addOrEditFormVisible" @close="closeAddOrEditFormDialog">
|
||||||
<AddOrEditForm ref="addOrEditComponentRef" @closeAddOrEditFormDialog="closeAddOrEditFormDialog"/>
|
<AddOrEditForm ref="addOrEditComponentRef" @closeAddOrEditFormDialog="closeAddOrEditFormDialog" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 领用或归还对话框 -->
|
<!-- 领用或归还对话框 -->
|
||||||
<el-dialog width="40%" append-to-body :title="useOrReturnFormTitle" :visible.sync="useOrReturnFormVisible">
|
<el-dialog width="40%" append-to-body :title="useOrReturnFormTitle" :visible.sync="useOrReturnFormVisible" @close="closeUseOrReturnFormDialog">
|
||||||
<UseOrReturnForm
|
<UseOrReturnForm
|
||||||
ref="useOrReturnFormComponentRef"
|
ref="useOrReturnFormComponentRef"
|
||||||
@closeUseOrReturnFormDialog="closeUseOrReturnFormDialog"
|
@closeUseOrReturnFormDialog="closeUseOrReturnFormDialog"
|
||||||
|
|
|
||||||
|
|
@ -1,210 +1,219 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 基础管理-层级 -->
|
<!-- 基础管理-层级 -->
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form size="small" :inline="true" ref="queryForm" :model="queryParams">
|
<el-form size="small" :inline="true" ref="queryForm" :model="queryParams">
|
||||||
<el-form-item label="层级配置名称" prop="configName">
|
<el-form-item label="层级配置名称" prop="configName">
|
||||||
<el-input
|
<el-input
|
||||||
clearable
|
clearable
|
||||||
placeholder="请输入层级配置名称"
|
placeholder="请输入层级配置名称"
|
||||||
v-model="queryParams.configName"
|
v-model="queryParams.configName"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button plain size="mini" type="primary" icon="el-icon-plus" @click="handleAddLevel">
|
|
||||||
新增层级
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="deviceList" border>
|
|
||||||
<el-table-column label="序号" align="center" type="index" />
|
|
||||||
<el-table-column
|
|
||||||
align="center"
|
|
||||||
:key="item.prop"
|
|
||||||
:label="item.label"
|
|
||||||
:prop="item.prop"
|
|
||||||
v-for="item in columnList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<el-table-column label="层级数量" align="center">
|
|
||||||
<template slot-scope="{ row }">
|
|
||||||
{{ row.nodes.length || 0 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" width="240">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-edit"
|
|
||||||
@click="handleEdit(scope.row)"
|
|
||||||
v-hasPermi="['basic:device:edit']"
|
|
||||||
>
|
|
||||||
编辑
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
style="color: #f56c6c"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['basic:device:remove']"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getDeviceList"
|
|
||||||
/>
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<!-- 添加或修改层级对话框 -->
|
<el-form-item>
|
||||||
<el-dialog width="50%" append-to-body :title="addOrEditFormTitle" :visible.sync="addOrEditFormVisible">
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||||
<AddOrEditForm ref="addOrEditComponentRef" @closeAddOrEditFormDialog="closeAddOrEditFormDialog" />
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
</el-dialog>
|
</el-form-item>
|
||||||
</div>
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button plain size="mini" type="primary" icon="el-icon-plus" @click="handleAddLevel">
|
||||||
|
新增层级
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="deviceList" border>
|
||||||
|
<el-table-column label="序号" align="center" type="index"/>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
:key="item.prop"
|
||||||
|
:label="item.label"
|
||||||
|
:prop="item.prop"
|
||||||
|
v-for="item in columnList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-table-column label="层级数量" align="center">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
{{ row.nodes.length || 0 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作" align="center" width="240">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleEdit(scope.row)"
|
||||||
|
v-hasPermi="['basic:device:edit']"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
style="color: #f56c6c"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['basic:device:remove']"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getDeviceList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改层级对话框 -->
|
||||||
|
<el-dialog width="50%" append-to-body :title="addOrEditFormTitle" :visible.sync="addOrEditFormVisible"
|
||||||
|
@close="handleDialogClose">
|
||||||
|
<AddOrEditForm ref="addOrEditComponentRef" @closeAddOrEditFormDialog="closeAddOrEditFormDialog"/>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AddOrEditForm from './addOrEditForm.vue'
|
import AddOrEditForm from './addOrEditForm.vue'
|
||||||
import { getLevelListApi, delLevelApi } from '@/api/basic/level-manage'
|
import {getLevelListApi, delLevelApi} from '@/api/basic/level-manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DeviceManage',
|
name: 'DeviceManage',
|
||||||
components: {
|
components: {
|
||||||
AddOrEditForm,
|
AddOrEditForm,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
total: 0, // 总条数
|
||||||
|
loading: false, // 加载中
|
||||||
|
addOrEditFormTitle: '新增', // 新增或编辑对话框标题
|
||||||
|
addOrEditFormVisible: false, // 新增或编辑对话框是否显示
|
||||||
|
useOrReturnFormTitle: '领用', // 领用或归还对话框标题
|
||||||
|
useOrReturnFormVisible: false, // 领用或归还对话框是否显示
|
||||||
|
useRecordFormVisible: false, // 使用记录对话框是否显示
|
||||||
|
// 设备列表
|
||||||
|
deviceList: [],
|
||||||
|
|
||||||
|
// 列配置
|
||||||
|
columnList: [
|
||||||
|
{
|
||||||
|
label: '层级名称',
|
||||||
|
prop: 'configName',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
configName: undefined,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getDeviceList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 查询按钮
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getDeviceList()
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
total: 0, // 总条数
|
|
||||||
loading: false, // 加载中
|
|
||||||
addOrEditFormTitle: '新增', // 新增或编辑对话框标题
|
|
||||||
addOrEditFormVisible: false, // 新增或编辑对话框是否显示
|
|
||||||
useOrReturnFormTitle: '领用', // 领用或归还对话框标题
|
|
||||||
useOrReturnFormVisible: false, // 领用或归还对话框是否显示
|
|
||||||
useRecordFormVisible: false, // 使用记录对话框是否显示
|
|
||||||
// 设备列表
|
|
||||||
deviceList: [],
|
|
||||||
|
|
||||||
// 列配置
|
// 重置按钮
|
||||||
columnList: [
|
resetQuery() {
|
||||||
{
|
this.resetForm('queryForm')
|
||||||
label: '层级名称',
|
this.handleQuery()
|
||||||
prop: 'configName',
|
},
|
||||||
},
|
|
||||||
],
|
|
||||||
|
|
||||||
// 查询参数
|
// 新增按钮操作
|
||||||
queryParams: {
|
handleAddLevel() {
|
||||||
pageNum: 1,
|
this.addOrEditFormTitle = '新增'
|
||||||
pageSize: 10,
|
this.editForm = null
|
||||||
configName: undefined,
|
this.addOrEditFormVisible = true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 获取设备列表
|
||||||
|
async getDeviceList() {
|
||||||
|
this.loading = true
|
||||||
|
const res = await getLevelListApi(this.queryParams)
|
||||||
|
console.log(res, '获取层级列表')
|
||||||
|
this.deviceList = res.rows
|
||||||
|
this.total = res.total
|
||||||
|
this.loading = false
|
||||||
|
},
|
||||||
|
|
||||||
|
// 领用或归还按钮
|
||||||
|
handleUseOrReturn(row) {
|
||||||
|
console.log(row)
|
||||||
|
this.useOrReturnFormTitle = row.status == '正常' ? '领用' : '归还'
|
||||||
|
this.useOrReturnFormVisible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查看记录按钮
|
||||||
|
handleViewRecord(row) {
|
||||||
|
console.log(row)
|
||||||
|
this.useRecordFormVisible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
// 编辑按钮
|
||||||
|
handleEdit(row) {
|
||||||
|
this.addOrEditFormTitle = '编辑'
|
||||||
|
this.addOrEditFormVisible = true
|
||||||
|
const {configName, nodes, configId} = row
|
||||||
|
const editForm = {configName, nodes, configId}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrEditComponentRef.setFormData(editForm)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.addOrEditFormTitle = '编辑'
|
||||||
|
this.addOrEditFormVisible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
// 删除按钮
|
||||||
|
handleDelete(row) {
|
||||||
|
this.$modal.confirm('是否确认删除层级编号为"' + row.configId + '"的数据项?').then(async () => {
|
||||||
|
const res = await delLevelApi([row.configId])
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$modal.msgSuccess('删除成功')
|
||||||
|
this.getDeviceList()
|
||||||
}
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
|
// 关闭新增或编辑对话框
|
||||||
|
closeAddOrEditFormDialog(isRefresh) {
|
||||||
|
this.$refs.addOrEditComponentRef.resetForm()
|
||||||
|
this.addOrEditFormVisible = false
|
||||||
|
if (isRefresh) {
|
||||||
this.getDeviceList()
|
this.getDeviceList()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
// 查询按钮
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1
|
|
||||||
this.getDeviceList()
|
|
||||||
},
|
|
||||||
|
|
||||||
// 重置按钮
|
// 关闭领用或归还对话框
|
||||||
resetQuery() {
|
closeUseOrReturnFormDialog() {
|
||||||
this.resetForm('queryForm')
|
this.$refs.useOrReturnFormComponentRef.resetForm()
|
||||||
this.handleQuery()
|
this.useOrReturnFormVisible = false
|
||||||
},
|
|
||||||
|
|
||||||
// 新增按钮操作
|
|
||||||
handleAddLevel() {
|
|
||||||
this.addOrEditFormTitle = '新增'
|
|
||||||
this.editForm = null
|
|
||||||
this.addOrEditFormVisible = true
|
|
||||||
},
|
|
||||||
|
|
||||||
// 获取设备列表
|
|
||||||
async getDeviceList() {
|
|
||||||
this.loading = true
|
|
||||||
const res = await getLevelListApi(this.queryParams)
|
|
||||||
console.log(res, '获取层级列表')
|
|
||||||
this.deviceList = res.rows
|
|
||||||
this.total = res.total
|
|
||||||
this.loading = false
|
|
||||||
},
|
|
||||||
|
|
||||||
// 领用或归还按钮
|
|
||||||
handleUseOrReturn(row) {
|
|
||||||
console.log(row)
|
|
||||||
this.useOrReturnFormTitle = row.status == '正常' ? '领用' : '归还'
|
|
||||||
this.useOrReturnFormVisible = true
|
|
||||||
},
|
|
||||||
|
|
||||||
// 查看记录按钮
|
|
||||||
handleViewRecord(row) {
|
|
||||||
console.log(row)
|
|
||||||
this.useRecordFormVisible = true
|
|
||||||
},
|
|
||||||
|
|
||||||
// 编辑按钮
|
|
||||||
handleEdit(row) {
|
|
||||||
this.addOrEditFormTitle = '编辑'
|
|
||||||
this.addOrEditFormVisible = true
|
|
||||||
const { configName, nodes, configId } = row
|
|
||||||
const editForm = { configName, nodes, configId }
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.addOrEditComponentRef.setFormData(editForm)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.addOrEditFormTitle = '编辑'
|
|
||||||
this.addOrEditFormVisible = true
|
|
||||||
},
|
|
||||||
|
|
||||||
// 删除按钮
|
|
||||||
handleDelete(row) {
|
|
||||||
this.$modal.confirm('是否确认删除层级编号为"' + row.configId + '"的数据项?').then(async () => {
|
|
||||||
const res = await delLevelApi([row.configId])
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.$modal.msgSuccess('删除成功')
|
|
||||||
this.getDeviceList()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 关闭新增或编辑对话框
|
|
||||||
closeAddOrEditFormDialog(isRefresh) {
|
|
||||||
this.$refs.addOrEditComponentRef.resetForm()
|
|
||||||
this.addOrEditFormVisible = false
|
|
||||||
if (isRefresh) {
|
|
||||||
this.getDeviceList()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 关闭领用或归还对话框
|
|
||||||
closeUseOrReturnFormDialog() {
|
|
||||||
this.$refs.useOrReturnFormComponentRef.resetForm()
|
|
||||||
this.useOrReturnFormVisible = false
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleDialogClose() {
|
||||||
|
if (this.$refs.addOrEditComponentRef) {
|
||||||
|
this.$refs.addOrEditComponentRef.resetForm()
|
||||||
|
}
|
||||||
|
this.addOrEditFormVisible = false
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog width="80%" append-to-body :title="useOrReturnFormTitle" :visible.sync="useOrReturnFormVisible">
|
<el-dialog width="80%" append-to-body :title="useOrReturnFormTitle" :visible.sync="useOrReturnFormVisible" @close="useOrReturnFormVisible = false">
|
||||||
<UseOrReturnForm
|
<UseOrReturnForm
|
||||||
ref="useOrReturnFormComponentRef"
|
ref="useOrReturnFormComponentRef"
|
||||||
v-if="useOrReturnFormVisible"
|
v-if="useOrReturnFormVisible"
|
||||||
|
|
@ -164,7 +164,7 @@
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 添加或修改岗位对话框 -->
|
<!-- 添加或修改岗位对话框 -->
|
||||||
<el-dialog width="40%" append-to-body :title="addOrEditFormTitle" :visible.sync="addOrEditFormVisible">
|
<el-dialog width="40%" append-to-body :title="addOrEditFormTitle" :visible.sync="addOrEditFormVisible" @close="closeAddOrEditFormDialog">
|
||||||
<AddOrEditForm ref="addOrEditComponentRef" @closeAddOrEditFormDialog="closeAddOrEditFormDialog"/>
|
<AddOrEditForm ref="addOrEditComponentRef" @closeAddOrEditFormDialog="closeAddOrEditFormDialog"/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改业主单位对话框 -->
|
<!-- 添加或修改业主单位对话框 -->
|
||||||
<el-dialog width="50%" append-to-body :title="addOrEditFormTitle" :visible.sync="addOrEditFormVisible">
|
<el-dialog width="50%" append-to-body :title="addOrEditFormTitle" :visible.sync="addOrEditFormVisible" @close="closeAddOrEditFormDialog">
|
||||||
<AddOrEditForm ref="addOrEditComponentRef" @closeAddOrEditFormDialog="closeAddOrEditFormDialog"/>
|
<AddOrEditForm ref="addOrEditComponentRef" @closeAddOrEditFormDialog="closeAddOrEditFormDialog"/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改项目类型对话框 -->
|
<!-- 添加或修改项目类型对话框 -->
|
||||||
<el-dialog width="50%" append-to-body :title="addOrEditFormTitle" :visible.sync="addOrEditFormVisible">
|
<el-dialog width="50%" append-to-body :title="addOrEditFormTitle" :visible.sync="addOrEditFormVisible" @close="closeAddOrEditFormDialog">
|
||||||
<AddOrEditForm ref="addOrEditComponentRef" @closeAddOrEditFormDialog="closeAddOrEditFormDialog"/>
|
<AddOrEditForm ref="addOrEditComponentRef" @closeAddOrEditFormDialog="closeAddOrEditFormDialog"/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -463,6 +463,7 @@ export default {
|
||||||
this.form = response.data
|
this.form = response.data
|
||||||
this.open = true
|
this.open = true
|
||||||
this.title = '修改项目'
|
this.title = '修改项目'
|
||||||
|
this.form.unit = response.data.unitId
|
||||||
this.form.level = response.data.proId
|
this.form.level = response.data.proId
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,20 @@
|
||||||
<div>
|
<div>
|
||||||
<div class="app-container home" id="map-content"></div>
|
<div class="app-container home" id="map-content"></div>
|
||||||
|
|
||||||
<div class="map-overlay">
|
<div class="map-overlay" style="display: flex">
|
||||||
<el-select v-model="queryParams.proId" placeholder="请选择工程" style="width: 100%" @change="getProjectList">
|
<el-row >
|
||||||
<el-option
|
<el-select v-model="queryParams.proId" placeholder="请选择工程" style="width: 100%" @change="getProjectList">
|
||||||
:key="item.proId"
|
<el-option
|
||||||
:value="item.proId"
|
:key="item.proId"
|
||||||
:label="item.proName"
|
:value="item.proId"
|
||||||
v-for="item in proList"
|
:label="item.proName"
|
||||||
/>
|
v-for="item in proList"
|
||||||
</el-select>
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-row>
|
||||||
|
<el-row style="margin-left: 2%;margin-top:0.5%;">
|
||||||
|
<el-button type="primary" size="small" @click="resetQuery">重置</el-button>
|
||||||
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -48,6 +52,10 @@ export default {
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
resetQuery(){
|
||||||
|
this.queryParams.proId = undefined
|
||||||
|
this.getProjectList()
|
||||||
|
},
|
||||||
|
|
||||||
// 获取所有项目
|
// 获取所有项目
|
||||||
async getProjectList() {
|
async getProjectList() {
|
||||||
|
|
@ -60,7 +68,7 @@ export default {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (!this.map) {
|
if (!this.map) {
|
||||||
this.initMap()
|
this.initMap()
|
||||||
}else{
|
} else {
|
||||||
this.map.clearOverlays(); // 清除所有覆盖物
|
this.map.clearOverlays(); // 清除所有覆盖物
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue