工控系统同步上层平台
This commit is contained in:
parent
7b2edd89c5
commit
4aa0bc0f5d
@ -7,7 +7,7 @@
|
|||||||
/> -->
|
/> -->
|
||||||
<!-- <top-nav id="topmenu-container" class="topmenu-container" v-if="true" /> -->
|
<!-- <top-nav id="topmenu-container" class="topmenu-container" v-if="true" /> -->
|
||||||
<div class="left-content">
|
<div class="left-content">
|
||||||
<div class="pro-log"></div>
|
<!-- <div class="pro-log"></div> -->
|
||||||
<div class="pro-title">扁鸿设备工控管理系统</div>
|
<div class="pro-title">扁鸿设备工控管理系统</div>
|
||||||
<div class="top-title-container">
|
<div class="top-title-container">
|
||||||
<template v-for="(item, index) in topNavRouters">
|
<template v-for="(item, index) in topNavRouters">
|
||||||
|
@ -1,54 +1,88 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form
|
<el-row :gutter="20">
|
||||||
:model="queryParams"
|
<!--部门数据-->
|
||||||
ref="queryForm"
|
<el-col
|
||||||
size="small"
|
:span="4"
|
||||||
:inline="true"
|
:xs="24"
|
||||||
v-show="showSearch"
|
|
||||||
label-width="90px"
|
|
||||||
style="text-align:right"
|
|
||||||
>
|
|
||||||
<el-form-item
|
|
||||||
label="设备类别名称"
|
|
||||||
prop="categoryName"
|
|
||||||
>
|
>
|
||||||
<el-input
|
<div class="head-container">
|
||||||
v-model="queryParams.categoryName"
|
<el-input
|
||||||
placeholder="请输入设备类别名称"
|
v-model="deptName"
|
||||||
clearable
|
placeholder="请输入部门名称"
|
||||||
@keyup.enter.native="handleQuery"
|
clearable
|
||||||
/>
|
size="small"
|
||||||
</el-form-item>
|
prefix-icon="el-icon-search"
|
||||||
<el-form-item
|
style="margin-bottom: 20px"
|
||||||
label="设备类别简称"
|
|
||||||
prop="categoryAbbr"
|
|
||||||
>
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.categoryAbbr"
|
|
||||||
placeholder="请输入设备类别简称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
label="设备类别状态"
|
|
||||||
prop="status"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
v-model="queryParams.status"
|
|
||||||
placeholder="请选择节点状态"
|
|
||||||
clearable
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.equip_category_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</div>
|
||||||
</el-form-item>
|
<div class="head-container">
|
||||||
<!-- <el-form-item
|
<el-tree
|
||||||
|
:data="deptOptions"
|
||||||
|
:props="defaultProps"
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
:filter-node-method="filterNode"
|
||||||
|
ref="tree"
|
||||||
|
node-key="id"
|
||||||
|
default-expand-all
|
||||||
|
highlight-current
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col
|
||||||
|
:span="20"
|
||||||
|
:xs="24"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="90px"
|
||||||
|
style="text-align:right"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
label="设备类别名称"
|
||||||
|
prop="categoryName"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.categoryName"
|
||||||
|
placeholder="请输入设备类别名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="设备类别简称"
|
||||||
|
prop="categoryAbbr"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.categoryAbbr"
|
||||||
|
placeholder="请输入设备类别简称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="设备类别状态"
|
||||||
|
prop="status"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.status"
|
||||||
|
placeholder="请选择节点状态"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.equip_category_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item
|
||||||
label="设备类别所属部门"
|
label="设备类别所属部门"
|
||||||
prop="deptId"
|
prop="deptId"
|
||||||
>
|
>
|
||||||
@ -59,36 +93,36 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
>搜索</el-button>
|
>搜索</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-refresh"
|
icon="el-icon-refresh"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="resetQuery"
|
@click="resetQuery"
|
||||||
>重置</el-button>
|
>重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row
|
<el-row
|
||||||
:gutter="10"
|
:gutter="10"
|
||||||
class="mb8"
|
class="mb8"
|
||||||
>
|
>
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['equip:category:add']"
|
v-hasPermi="['equip:category:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
plain
|
plain
|
||||||
@ -120,36 +154,36 @@
|
|||||||
v-hasPermi="['system:category:export']"
|
v-hasPermi="['system:category:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<right-toolbar
|
<right-toolbar
|
||||||
:showSearch.sync="showSearch"
|
:showSearch.sync="showSearch"
|
||||||
@queryTable="getList"
|
@queryTable="getList"
|
||||||
></right-toolbar>
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
v-if="refreshTable"
|
v-if="refreshTable"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="categoryList"
|
:data="categoryList"
|
||||||
row-key="categoryId"
|
row-key="categoryId"
|
||||||
:default-expand-all="isExpandAll"
|
:default-expand-all="isExpandAll"
|
||||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||||
v-hasPermi="['ipc:faultTreeConfig:list']"
|
v-hasPermi="['ipc:faultTreeConfig:list']"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="设备类别名称"
|
label="设备类别名称"
|
||||||
prop="categoryName"
|
prop="categoryName"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="设备类别简称"
|
label="设备类别简称"
|
||||||
prop="categoryAbbr"
|
prop="categoryAbbr"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="设备类别描述"
|
label="设备类别描述"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
align="center"
|
align="center"
|
||||||
prop="categoryDescription"
|
prop="categoryDescription"
|
||||||
/>
|
/>
|
||||||
<!-- <el-table-column
|
<!-- <el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
align="center"
|
align="center"
|
||||||
prop="createdTime"
|
prop="createdTime"
|
||||||
@ -174,73 +208,74 @@
|
|||||||
align="center"
|
align="center"
|
||||||
prop="parentCategoryId"
|
prop="parentCategoryId"
|
||||||
/>-->
|
/>-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="图片"
|
label="图片"
|
||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="hasPath(scope.row)"
|
v-if="hasPath(scope.row)"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="clickPic(scope.row)"
|
@click="clickPic(scope.row)"
|
||||||
>设备类别图片</el-button>
|
>设备类别图片</el-button>
|
||||||
<el-image-viewer
|
<el-image-viewer
|
||||||
v-if="showViewer"
|
v-if="showViewer"
|
||||||
:on-close="closeViewer"
|
:on-close="closeViewer"
|
||||||
:url-list="tableImageList"
|
:url-list="tableImageList"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="设备类别状态"
|
||||||
|
align="center"
|
||||||
|
prop="status"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag
|
||||||
|
:options="dict.type.equip_category_status"
|
||||||
|
:value="scope.row.status"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="备注"
|
||||||
|
show-overflow-tooltip
|
||||||
|
align="center"
|
||||||
|
prop="remark"
|
||||||
/>
|
/>
|
||||||
</template>
|
<!-- <el-table-column
|
||||||
</el-table-column>
|
label="操作"
|
||||||
<el-table-column
|
align="center"
|
||||||
label="设备类别状态"
|
class-name="small-padding fixed-width"
|
||||||
align="center"
|
>
|
||||||
prop="status"
|
<template slot-scope="scope">
|
||||||
>
|
<el-button
|
||||||
<template slot-scope="scope">
|
size="mini"
|
||||||
<dict-tag
|
type="text"
|
||||||
:options="dict.type.equip_category_status"
|
icon="el-icon-edit"
|
||||||
:value="scope.row.status"
|
@click="handleUpdate(scope.row)"
|
||||||
/>
|
v-hasPermi="['equip:category:edit']"
|
||||||
</template>
|
>修改</el-button>
|
||||||
</el-table-column>
|
<el-button
|
||||||
<el-table-column
|
size="mini"
|
||||||
label="备注"
|
type="text"
|
||||||
show-overflow-tooltip
|
icon="el-icon-plus"
|
||||||
align="center"
|
@click="handleAdd(scope.row)"
|
||||||
prop="remark"
|
v-hasPermi="['equip:category:add']"
|
||||||
/>
|
>新增</el-button>
|
||||||
<el-table-column
|
<el-button
|
||||||
label="操作"
|
size="mini"
|
||||||
align="center"
|
type="text"
|
||||||
class-name="small-padding fixed-width"
|
icon="el-icon-delete"
|
||||||
>
|
@click="handleDelete(scope.row)"
|
||||||
<template slot-scope="scope">
|
v-hasPermi="['equip:category:remove']"
|
||||||
<el-button
|
>删除</el-button>
|
||||||
size="mini"
|
</template>
|
||||||
type="text"
|
</el-table-column> -->
|
||||||
icon="el-icon-edit"
|
</el-table>
|
||||||
@click="handleUpdate(scope.row)"
|
</el-col>
|
||||||
v-hasPermi="['equip:category:edit']"
|
</el-row>
|
||||||
>修改</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
@click="handleAdd(scope.row)"
|
|
||||||
v-hasPermi="['equip:category:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['equip:category:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<!-- 添加或修改设备分类对话框 -->
|
<!-- 添加或修改设备分类对话框 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="title"
|
:title="title"
|
||||||
@ -410,6 +445,7 @@ import FileUpload from "@/components/FileUpload";
|
|||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import { Loading } from "element-ui";
|
import { Loading } from "element-ui";
|
||||||
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
|
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
|
||||||
|
import { deptTreeSelect } from "@/api/system/user";
|
||||||
export default {
|
export default {
|
||||||
name: "Category",
|
name: "Category",
|
||||||
components: {
|
components: {
|
||||||
@ -510,12 +546,43 @@ export default {
|
|||||||
files: [],
|
files: [],
|
||||||
tableImageList: [],
|
tableImageList: [],
|
||||||
showViewer: false,
|
showViewer: false,
|
||||||
|
// 部门名称
|
||||||
|
deptName: undefined,
|
||||||
|
// 部门树选项
|
||||||
|
deptOptions: undefined,
|
||||||
|
defaultProps: {
|
||||||
|
children: "children",
|
||||||
|
label: "label",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
// 根据名称筛选部门树
|
||||||
|
deptName(val) {
|
||||||
|
this.$refs.tree.filter(val);
|
||||||
|
},
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getDeptTree();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/** 查询部门下拉树结构 */
|
||||||
|
getDeptTree() {
|
||||||
|
deptTreeSelect().then((response) => {
|
||||||
|
this.deptOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 筛选节点
|
||||||
|
filterNode(value, data) {
|
||||||
|
if (!value) return true;
|
||||||
|
return data.label.indexOf(value) !== -1;
|
||||||
|
},
|
||||||
|
// 节点单击事件
|
||||||
|
handleNodeClick(data) {
|
||||||
|
this.queryParams.deptId = data.id;
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
hasPath(data) {
|
hasPath(data) {
|
||||||
return data.picPath == null || data.picPath == "" ? false : true;
|
return data.picPath == null || data.picPath == "" ? false : true;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user