工控系统同步上层平台

This commit is contained in:
zhangjunwen 2024-06-19 11:54:34 +08:00
parent 7b2edd89c5
commit 4aa0bc0f5d
2 changed files with 239 additions and 172 deletions

View File

@ -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">

View File

@ -1,5 +1,39 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-row :gutter="20">
<!--部门数据-->
<el-col
:span="4"
:xs="24"
>
<div class="head-container">
<el-input
v-model="deptName"
placeholder="请输入部门名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
</div>
<div class="head-container">
<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 <el-form
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
@ -78,7 +112,7 @@
: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
@ -87,7 +121,7 @@
@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"
@ -210,7 +244,7 @@
align="center" align="center"
prop="remark" prop="remark"
/> />
<el-table-column <!-- <el-table-column
label="操作" label="操作"
align="center" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
@ -238,9 +272,10 @@
v-hasPermi="['equip:category:remove']" v-hasPermi="['equip:category:remove']"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
</el-col>
</el-row>
<!-- 添加或修改设备分类对话框 --> <!-- 添加或修改设备分类对话框 -->
<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;
}, },