fix(项目管理): 调整项目页
This commit is contained in:
parent
01c7b6b7f7
commit
f9efeb4859
|
@ -1,31 +1,31 @@
|
|||
<template>
|
||||
<div class="app-container e-project-space">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
v-show="showSearch"
|
||||
ref="queryForm"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
:model="queryParams"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="上级空间" prop="parentId">
|
||||
<treeselect
|
||||
style="width: 200px;"
|
||||
v-model="queryParams.parentId"
|
||||
:options="querySpaceOptions"
|
||||
:normalizer="normalizer"
|
||||
:options="querySpaceOptions"
|
||||
placeholder="请选择上级空间"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="空间名称" prop="spaceName">
|
||||
<el-input
|
||||
v-model="queryParams.spaceName"
|
||||
placeholder="空间名称"
|
||||
clearable
|
||||
placeholder="空间名称"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="空间类型" prop="spaceType">
|
||||
<el-select v-model="queryParams.spaceType" placeholder="空间类型" clearable>
|
||||
<el-select v-model="queryParams.spaceType" clearable placeholder="空间类型">
|
||||
<el-option
|
||||
v-for="dict in spaceTypeOptions"
|
||||
:key="dict.dictValue"
|
||||
|
@ -35,37 +35,37 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-search" type="primary" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" v-hasPermi="['project:space:add']" @click="handleAdd">新增</el-button>
|
||||
<el-button v-hasPermi="['project:space:add']" icon="el-icon-plus" plain type="primary" @click="handleAdd">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="spaceList"
|
||||
row-key="spaceId"
|
||||
default-expand-all
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
default-expand-all
|
||||
row-key="spaceId"
|
||||
>
|
||||
<el-table-column type="index" label="序号" align="center" :index="indexFormatter" width="80px"></el-table-column>
|
||||
<el-table-column label="空间名称" align="left" prop="spaceName" />
|
||||
<el-table-column label="空间类型" align="center" prop="spaceType" :formatter="statusFormat" />
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<el-table-column :index="indexFormatter" align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column align="left" label="空间名称" prop="spaceName" />
|
||||
<el-table-column :formatter="statusFormat" align="center" label="空间类型" prop="spaceType" />
|
||||
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-hasPermi="['project:space:device']"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-search"
|
||||
v-hasPermi="['project:space:device']"
|
||||
@click="handleDetails(scope.row)"
|
||||
>空间设备</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" v-hasPermi="['project:space:edit']" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button v-hasPermi="['project:space:edit']" icon="el-icon-edit" size="mini" type="text" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button
|
||||
v-hasPermi="['project:space:remove']"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-hasPermi="['project:space:remove']"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
|
@ -73,7 +73,7 @@
|
|||
</el-table>
|
||||
|
||||
<!-- 添加或修改项目空间对话框 -->
|
||||
<dialog-template class="eldialog-wrap" @close="open = false" :title="title" :visible.sync="open" width="500px">
|
||||
<dialog-template :title="title" :visible.sync="open" class="eldialog-wrap" width="500px" @close="open = false">
|
||||
<el-form ref="form" slot="dialog-center" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="上级空间:" prop="parentId">
|
||||
<treeselect v-model="form.parentId" :options="spaceOptions" placeholder="请选择上级空间" />
|
||||
|
@ -82,7 +82,7 @@
|
|||
<el-input v-model="form.spaceName" placeholder="请输入空间名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型:" prop="spaceType">
|
||||
<el-select v-model="form.spaceType" style="width: 100%;" placeholder="请选择空间类型">
|
||||
<el-select v-model="form.spaceType" placeholder="请选择空间类型" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="dict in spaceTypeOptions"
|
||||
:key="dict.dictValue"
|
||||
|
@ -99,18 +99,18 @@
|
|||
</dialog-template>
|
||||
|
||||
<el-dialog
|
||||
class="eldialog-wrap"
|
||||
:close-on-click-modal="false"
|
||||
:title="spaceDeviceTitle"
|
||||
:visible.sync="selectTableShow"
|
||||
width="75%"
|
||||
top="10vh"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body='true'
|
||||
class="eldialog-wrap"
|
||||
top="10vh"
|
||||
width="75%"
|
||||
>
|
||||
<e-object-space-device
|
||||
v-if="selectTableShow"
|
||||
:sourceId="sourceId"
|
||||
:projectId="infoData.projectId"
|
||||
:sourceId="sourceId"
|
||||
/>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['project:device:add']" >新增</el-button>
|
||||
<el-button v-hasPermi="['project:device:add1']" icon="el-icon-plus" plain size="mini" type="primary" @click="handleAdd" >新增</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
@ -13,21 +13,21 @@
|
|||
:default-sort="{prop: 'createTime', order: 'descending'}"
|
||||
@sort-change="sortChange"
|
||||
>
|
||||
<el-table-column type="index" label="序号" align="center" :index="indexFormatter" width="80px"></el-table-column>
|
||||
<el-table-column label="设备名称" align="left" width="200px" prop="deviceName" />
|
||||
<el-table-column label="所属型号" align="left" prop="modelName" />
|
||||
<el-table-column label="设备key" align="left" prop="deviceKey" />
|
||||
<el-table-column label="设备类型" align="left" width="120px" prop="deviceTypeName" />
|
||||
<el-table-column label="创建时间" sortable="custom" align="center" width="200" prop="createTime" />
|
||||
<el-table-column label="操作" width="150" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column :index="indexFormatter" align="center" label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column align="left" label="设备名称" prop="deviceName" width="200px" />
|
||||
<el-table-column align="left" label="所属型号" prop="modelName" />
|
||||
<el-table-column align="left" label="设备key" prop="deviceKey" />
|
||||
<el-table-column align="left" label="设备类型" prop="deviceTypeName" width="120px" />
|
||||
<el-table-column align="center" label="创建时间" prop="createTime" sortable="custom" width="200" />
|
||||
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.deviceType !== 'MINIATURE_BREAKER'"
|
||||
v-hasPermi="['project:device:relieve']"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-if="scope.row.deviceType !== 'MINIATURE_BREAKER'"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:device:relieve']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -35,15 +35,15 @@
|
|||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改空间设备对话框 -->
|
||||
<dialog-template :title="title" :visible.sync="open" width="500px" @close="open = false" >
|
||||
<el-form ref="form" :model="form" slot="dialog-center" :rules="rules" label-width="80px"></el-form>
|
||||
<el-form ref="form" slot="dialog-center" :model="form" :rules="rules" label-width="80px"></el-form>
|
||||
<div slot="dialog-footer" class="dialog-footer">
|
||||
<el-button size="mini" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button size="mini" @click="cancel">取 消</el-button>
|
||||
|
@ -51,21 +51,21 @@
|
|||
</dialog-template>
|
||||
|
||||
<el-dialog
|
||||
title="选择设备"
|
||||
:visible.sync="selectTableShow"
|
||||
width="75%"
|
||||
top="10vh"
|
||||
class="select-table-dialog"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="selectTableShow"
|
||||
append-to-body
|
||||
class="select-table-dialog"
|
||||
title="选择设备"
|
||||
top="10vh"
|
||||
width="75%"
|
||||
>
|
||||
<select-table-wrap
|
||||
v-if="selectTableShow"
|
||||
:tableOption="tableSelectOption.tableOpt"
|
||||
:otherOption="tableSelectOption.otherOption"
|
||||
:queryOption="tableSelectOption.queryOpt"
|
||||
:tableList="tableSelectOption.tableList"
|
||||
:tableOption="tableSelectOption.tableOpt"
|
||||
@parentGetList="childGetList($event)"
|
||||
:otherOption="tableSelectOption.otherOption"
|
||||
@returnEvent="returnEvent($event)"
|
||||
/>
|
||||
|
||||
|
|
Loading…
Reference in New Issue