wenhongquan 2 лет назад
Родитель
Сommit
7682180434

+ 1 - 0
ruoyi-ui-vue3/package.json

@@ -15,6 +15,7 @@
   },
   "dependencies": {
     "@element-plus/icons-vue": "2.0.10",
+    "@layui/layui-vue": "^2.12.0",
     "@vueup/vue-quill": "1.2.0",
     "@vueuse/core": "9.5.0",
     "axios": "0.27.2",

+ 1 - 0
ruoyi-ui-vue3/src/main.js

@@ -12,6 +12,7 @@ import router from './router'
 import directive from './directive' // directive
 
 
+
 // 注册指令
 import plugins from './plugins' // plugins
 import { download } from '@/utils/request'

+ 173 - 0
ruoyi-ui-vue3/src/views/device/camera/index.vue

@@ -0,0 +1,173 @@
+<template>
+  <div style="padding: 10px 15px">
+    <el-row>
+      <el-col :span="6" style="padding-right: 10px">
+        <el-card class="box-card" style="min-height: 80vh;">
+          <template #header>
+            <div class="card-header">
+              <span>视频设备</span>
+            </div></template
+          >
+          <div class="tree">
+            <LayTree
+              :data="data"
+              :tail-node-icon="false"
+              :onlyIconControl="true"
+              v-model:selectedKey="selectedKey"
+              @node-click="handleClick"
+            >
+            </LayTree>
+          </div>
+        </el-card>
+      </el-col>
+      <el-col :span="18">
+        <el-card class="box-card">
+          <div style="display: flex; flex-direction: row; justify-content: space-between">
+            <div>
+              <div
+                style="
+                  display: flex;
+                  flex-direction: row;
+                  flex-wrap: nowrap;
+                  align-items: center;
+                "
+              >
+                <div style="font-size: 12px; width: 80px">设备名称:</div>
+                <el-input
+                  v-model="searchform.devicename"
+                  placeholder="设备名称"
+                ></el-input>
+              </div>
+            </div>
+            <div>
+              <el-button type="primary" plain>重置</el-button>
+              <el-button type="primary">搜索</el-button>
+            </div>
+          </div>
+        </el-card>
+
+        <el-card class="box-card" style="margin-top: 10px;">
+             <template #header>
+            <div class="card-header">
+              <span>主要设备</span>
+              <el-button type="warning">同步</el-button>
+            </div></template>
+
+            <el-row>
+        <el-col :span="24" style="padding-left: 10px">
+          <el-table :data="devicetabledata" :border="true">
+            <el-table-column label="设备名称"></el-table-column>
+            <el-table-column label="平台编码"></el-table-column>
+            <el-table-column label="主要设备协议类型"></el-table-column>
+            <el-table-column label="设备互联编码"></el-table-column>
+            <el-table-column label="设备型号"></el-table-column>
+            <el-table-column label="操作">
+              <template #default="scope">
+                <div>
+                  <el-button link>
+                    <el-tooltip effect="dark" content="编辑">
+                      <el-icon>
+                        <Edit />
+                      </el-icon>
+                    </el-tooltip>
+                  </el-button>
+                  <el-popconfirm title="确定删除该标签?">
+                    <template #reference>
+                      <el-button link
+                        ><el-tooltip effect="dark" content="删除"
+                          ><el-icon><Delete /></el-icon></el-tooltip
+                      ></el-button>
+                    </template>
+                  </el-popconfirm>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+
+
+        </el-col>
+        <el-col :span="24" style="margin-top: 10px;">
+          <el-pagination style="float: right;"
+            small
+            background
+            layout="prev, pager, next"
+            :total="50"
+            class="mt-4"
+          />
+        </el-col>
+      </el-row>
+        </el-card>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup lang="ts" name="Units">
+import { ref } from "vue";
+import { LayTree } from "@layui/layui-vue";
+import "@layui/layui-vue/lib/index.css";
+
+const handleClick = (node) => {
+  console.log("Click Node:" + JSON.stringify(node));
+};
+const selectedKey = ref(1);
+const data = ref([
+  {
+    title: "大华西门nvr1",
+    id: 1,
+    checked: true,
+    spread: true,
+    children: [
+      {
+        title: "东门立柱摄像机",
+        id: 2,
+        href: "https://www.layui.com/",
+      },
+      {
+        title: "东门立柱摄像机",
+        id: 3,
+        href: "https://www.layui.com/",
+      },
+      {
+        title: "东门立柱摄像机",
+        id: 4,
+        href: "https://www.layui.com/",
+      },
+      {
+        title: "东门立柱摄像机",
+        id: 5,
+        href: "https://www.layui.com/",
+      },
+      {
+        title: "东门立柱摄像机",
+        id: 6,
+        href: "https://www.layui.com/",
+      },
+    ],
+  },
+]);
+
+
+const devicetabledata = ref([1]);
+
+const searchform = ref({
+  devicename: "",
+});
+</script>
+
+<style></style>
+
+<style lang="scss" scoped>
+.card-header {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+}
+.tree {
+  *,
+  *:before,
+  *:after {
+    box-sizing: content-box !important;
+  }
+}
+</style>

+ 105 - 0
ruoyi-ui-vue3/src/views/device/device/index.vue

@@ -0,0 +1,105 @@
+<template>
+  <div style="padding: 10px 15px">
+    <el-card class="box-card">
+      <div style="display: flex; flex-direction: row; justify-content: space-between">
+        <div>
+          <div
+            style="
+              display: flex;
+              flex-direction: row;
+              flex-wrap: nowrap;
+              align-items: center;
+            "
+          >
+            <div style="font-size: 12px; width: 80px">设备名称:</div>
+            <el-input v-model="searchform.devicename" placeholder="设备名称"></el-input>
+          </div>
+        </div>
+        <div>
+          <el-button type="primary" plain>重置</el-button>
+          <el-button type="primary">搜索</el-button>
+        </div>
+      </div>
+    </el-card>
+    <el-card class="box-card" style="margin-top: 10px">
+      <template #header>
+        <div class="card-header">
+          <span>设备管理</span>
+
+          <div>
+            <el-button type="primary">添加</el-button>
+            <el-button type="danger">批量删除</el-button>
+            <el-button type="primary" plain>显示字段</el-button>
+          </div>
+        </div>
+      </template>
+
+      <el-row>
+        <el-col :span="24" style="padding-left: 10px">
+          <el-table :data="devicetabledata" :border="true">
+            <el-table-column type="selection" width="55"></el-table-column>
+            <el-table-column label="设备名称"></el-table-column>
+            <el-table-column label="型号"></el-table-column>
+            <el-table-column label="设备类型"></el-table-column>
+            <el-table-column label="生产厂商"></el-table-column>
+            <el-table-column label="制造商"></el-table-column>
+            <el-table-column label="操作">
+              <template #default="scope">
+                <div>
+                  <el-button link>
+                    <el-tooltip effect="dark" content="编辑">
+                      <el-icon>
+                        <Edit />
+                      </el-icon>
+                    </el-tooltip>
+                  </el-button>
+                  <el-popconfirm title="确定删除该标签?">
+                    <template #reference>
+                      <el-button link
+                        ><el-tooltip effect="dark" content="删除"
+                          ><el-icon><Delete /></el-icon></el-tooltip
+                      ></el-button>
+                    </template>
+                  </el-popconfirm>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+
+
+        </el-col>
+        <el-col :span="24" style="margin-top: 10px;">
+          <el-pagination style="float: right;"
+            small
+            background
+            layout="prev, pager, next"
+            :total="50"
+            class="mt-4"
+          />
+        </el-col>
+      </el-row>
+    </el-card>
+  </div>
+</template>
+
+<script setup lang="ts" name="Units">
+import { ref } from "vue";
+
+const searchform = ref({
+  devicename: "",
+});
+
+const gettbheight = () => {
+  return window.innerHeight - 280;
+};
+
+const devicetabledata = ref([1]);
+</script>
+
+<style lang="scss" scoped>
+.card-header {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+}
+</style>

+ 126 - 0
ruoyi-ui-vue3/src/views/device/equipmentdash/index.vue

@@ -0,0 +1,126 @@
+<template>
+  <div style="padding: 10px 15px">
+    <el-card class="box-card">
+      <template #header>
+        <div class="card-header">
+          <span>设备标签管理</span>
+
+          <el-button
+            type="primary"
+            @click="
+              detailshow = true;
+              edittype = 1;
+            "
+            >添加</el-button
+          >
+        </div>
+      </template>
+      <el-row>
+
+        <el-col :span="24" style="padding-left: 10px">
+          <el-table :data="dwtabledata" :border="true" :height="gettbheight()">
+            <el-table-column label="编码"></el-table-column>
+            <el-table-column label="名称"></el-table-column>
+            <el-table-column label="备注"></el-table-column>
+            <el-table-column label="操作">
+              <template #default="scope">
+                <div>
+                  <el-button
+                    link
+                    @click="
+                      detailshow = true;
+                      edittype = 2;
+                    "
+                  >
+                    <el-tooltip effect="dark" content="编辑">
+                      <el-icon>
+                        <Edit />
+                      </el-icon>
+                    </el-tooltip>
+                  </el-button>
+                  <el-popconfirm title="确定删除该标签?">
+                    <template #reference>
+                      <el-button link
+                        ><el-tooltip effect="dark" content="删除"
+                          ><el-icon><Delete /></el-icon></el-tooltip
+                      ></el-button>
+                    </template>
+                  </el-popconfirm>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-col>
+      </el-row>
+    </el-card>
+
+    <el-dialog
+      :title="`${edittype == 1 ? '新增' : edittype == 2 ? '编辑' : '查看'}设备标签`"
+      v-model="detailshow"
+    >
+      <el-form  :model="dwform" label-width="120px">
+        <el-form-item label="编码">
+          <el-input v-model="dwform.name"  :disabled="edittype==3"/>
+        </el-form-item>
+        <el-form-item label="名称">
+          <el-input v-model="dwform.name"  :disabled="edittype==3"/>
+        </el-form-item>
+        <el-form-item label="备注">
+          <el-input type="textarea" v-model="dwform.name" :disabled="edittype==3"/>
+        </el-form-item>
+      </el-form>
+      <template #footer>
+      <div class="dialog-footer">
+         <el-button @click="detailshow=false;"> 取消 </el-button>
+          <el-button type="primary" @click="dosavedw"> 保存 </el-button>
+      </div>
+    </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup lang="ts" name="Units">
+import { ref } from "vue";
+
+const dwtypetabledata = ref([]);
+const dwtabledata = ref([1,1,1,1,1,1]);
+
+const edittype = ref(1);
+const detailshow = ref(false);
+
+const dwform = ref({
+  id: 0,
+  name: "",
+  unitSymbol: "",
+  unitName: "",
+  isStandard: "",
+  unitType: "",
+  toStandardRatio: 0,
+  toOffset: 0,
+  remark: "",
+  creator: "",
+  ctime: "",
+  modifier: "",
+  utime: "",
+});
+
+const gettbheight = () => {
+
+  return window.innerHeight - 200;
+}
+
+const dosavedw = () => {
+
+  detailshow.value = false;
+
+};
+
+</script>
+
+<style lang="scss" scoped>
+.card-header {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+}
+</style>

+ 126 - 0
ruoyi-ui-vue3/src/views/device/sensordash/index.vue

@@ -0,0 +1,126 @@
+<template>
+  <div style="padding: 10px 15px">
+    <el-card class="box-card">
+      <template #header>
+        <div class="card-header">
+          <span>设备标签管理</span>
+
+          <el-button
+            type="primary"
+            @click="
+              detailshow = true;
+              edittype = 1;
+            "
+            >添加</el-button
+          >
+        </div>
+      </template>
+      <el-row>
+
+        <el-col :span="24" style="padding-left: 10px">
+          <el-table :data="dwtabledata" :border="true" :height="gettbheight()">
+            <el-table-column label="编码"></el-table-column>
+            <el-table-column label="名称"></el-table-column>
+            <el-table-column label="备注"></el-table-column>
+            <el-table-column label="操作">
+              <template #default="scope">
+                <div>
+                  <el-button
+                    link
+                    @click="
+                      detailshow = true;
+                      edittype = 2;
+                    "
+                  >
+                    <el-tooltip effect="dark" content="编辑">
+                      <el-icon>
+                        <Edit />
+                      </el-icon>
+                    </el-tooltip>
+                  </el-button>
+                  <el-popconfirm title="确定删除该标签?">
+                    <template #reference>
+                      <el-button link
+                        ><el-tooltip effect="dark" content="删除"
+                          ><el-icon><Delete /></el-icon></el-tooltip
+                      ></el-button>
+                    </template>
+                  </el-popconfirm>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-col>
+      </el-row>
+    </el-card>
+
+    <el-dialog
+      :title="`${edittype == 1 ? '新增' : edittype == 2 ? '编辑' : '查看'}设备标签`"
+      v-model="detailshow"
+    >
+      <el-form  :model="dwform" label-width="120px">
+        <el-form-item label="编码">
+          <el-input v-model="dwform.name"  :disabled="edittype==3"/>
+        </el-form-item>
+        <el-form-item label="名称">
+          <el-input v-model="dwform.name"  :disabled="edittype==3"/>
+        </el-form-item>
+        <el-form-item label="备注">
+          <el-input type="textarea" v-model="dwform.name" :disabled="edittype==3"/>
+        </el-form-item>
+      </el-form>
+      <template #footer>
+      <div class="dialog-footer">
+         <el-button @click="detailshow=false;"> 取消 </el-button>
+          <el-button type="primary" @click="dosavedw"> 保存 </el-button>
+      </div>
+    </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup lang="ts" name="Units">
+import { ref } from "vue";
+
+const dwtypetabledata = ref([]);
+const dwtabledata = ref([1,1,1,1,1,1]);
+
+const edittype = ref(1);
+const detailshow = ref(false);
+
+const dwform = ref({
+  id: 0,
+  name: "",
+  unitSymbol: "",
+  unitName: "",
+  isStandard: "",
+  unitType: "",
+  toStandardRatio: 0,
+  toOffset: 0,
+  remark: "",
+  creator: "",
+  ctime: "",
+  modifier: "",
+  utime: "",
+});
+
+const gettbheight = () => {
+
+  return window.innerHeight - 200;
+}
+
+const dosavedw = () => {
+
+  detailshow.value = false;
+
+};
+
+</script>
+
+<style lang="scss" scoped>
+.card-header {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+}
+</style>