Commit 3083eb9f by qianmo

update

parent 487c0cea
...@@ -21,10 +21,18 @@ ...@@ -21,10 +21,18 @@
</template> </template>
<script setup> <script setup>
import {ref} from 'vue' import {ref, onMounted } from 'vue'
import CollapseTable from "./collapse-table.vue"; import CollapseTable from "./collapse-table.vue";
import {DeviceProtocol} from "../dao/device";
async function getDeviceProtocol(){
let data = await DeviceProtocol()
console.log(data)
}
onMounted(() => {
getDeviceProtocol()
})
</script> </script>
<style> <style>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<el-table :data="tableData" style="width: 100%"> <el-table :data="tableData" style="width: 100%">
<el-table-column fixed prop="FieldName" label="字段名" style="width: 25%" /> <el-table-column fixed prop="FieldName" label="字段名" style="width: 25%" />
<el-table-column prop="FieldLength" label="字段长度" style="width: 25%" /> <el-table-column prop="FieldLength" label="字段长度" style="width: 25%" />
<el-table-column prop="Value" label="值" style="width: 25%" /> <el-table-column prop="Value" label="默认值" style="width: 25%" />
<el-table-column fixed="right" style="width: 25%"> <el-table-column fixed="right" style="width: 25%">
<template #default="{row}"> <template #default="{row}">
<div style="display: flex; justify-content: space-between;"> <div style="display: flex; justify-content: space-between;">
......
import {request} from '/lib/request'
/// 删除
// * id : integer :
export async function CompareCategoryDel(params){
const {data} = await request('/rest/compare/category/del', params)
return data.data
}
/// 列表
export async function CompareCategoryList(){
const {data} = await request('/rest/compare/category/list')
return data.data
}
/// 增加和修改
// id : integer :
// name : string :
// extend : string :
export async function CompareCategoryUpdate(params){
const {data} = await request('/rest/compare/category/update', params)
return data.data
}
/// 删除
// * id : integer :
export async function CompareDel(params){
const {data} = await request('/rest/compare/del', params)
return data.data
}
/// 列表
// * category : integer :
export async function CompareList(params){
const {data} = await request('/rest/compare/list', params)
return data.data
}
/// 增加和修改
// id : integer :
// category : integer :
// leftValue : string :
// rightValue : string :
// extend : string :
export async function CompareUpdate(params){
const {data} = await request('/rest/compare/update', params)
return data.data
}
import axios from "axios"
export function DeviceProtocol(){
axios.get('http://192.168.0.216:8000/op/dev_cmd_name_poll').then(
function (response){
return response.data
}
)
}
\ No newline at end of file
import {request} from '/lib/request'
/// 删除
// * id : string :
export async function NameConfigDel(params){
const {data} = await request('/rest/nameConfig/del', params)
return data.data
}
/// 产品详情
// * id : string :
export async function NameConfigDetail(params){
const {data} = await request('/rest/nameConfig/detail', params)
return data.data
}
/// 列表
export async function NameConfigList(){
const {data} = await request('/rest/nameConfig/list')
return data.data
}
/// 增加和修改
// * id : string :
// name : string :
// category : integer :
// separator : string : 分隔符
// postfix : string : 后缀 需要以 . 开头
// fieldConfig : string : [{index-序号,adType-匹配类型,多条件使用 - (0-不解析,1-固定适配(多值固定适配,value使用预设分隔符隔开),2-对照表适配,3-日期时间适配,4-小写字母,5-大写字母,6-数字,7-特殊字符,8-自定义正则),length-字符长度(不限制使用 -1 ),value-根据适配类型解析,分 固定值/对照表/日期格式/特殊字符(除预定的分隔符外的字符),labelFlag-是否作为特征标签}]
// outDirConfig : string : 从SWAP的同级目录开始 也可以单独设置
// extend : string :
export async function NameConfigUpdate(params){
const {data} = await request('/rest/nameConfig/update', params)
return data.data
}
/// 增加和修改
// * id : string :
// outDirConfig : string : 从SWAP的同级目录开始
// extend : string :
export async function NameConfigUpdateDir(params){
const {data} = await request('/rest/nameConfig/update/dir', params)
return data.data
}
import {download,request} from '/lib/request'
import {configKit} from "../../lib/store";
/// 公共下载
// * name : string :
export async function ProductsDownload(params,filename){
await download('/rest/products/download', params,{filename})
}
/// 列表
// siteNo : string :
// start : string :
// end : string :
export async function ProductsList(params){
const {data} = await request('/rest/products/list', params)
return data.data
}
/// 可选站点列表
export async function ProductsSiteList(){
const {data} = await request('/rest/products/site/list')
return data.data
}
import {request} from '/lib/request'
/// role新增
// * name : string :
// * privilegesJson : string : 数组json字符串:[a,b,c]
// departmentId : integer :
export async function RoleCreate(params){
const {data} = await request('/rest/role/create', params)
return data.data
}
/// role删除
// * id : integer :
export async function RoleDel(params){
const {data} = await request('/rest/role/del', params)
return data.data
}
/// 部门新增
// no : string :
// * name : string :
// description : string :
// parentId : integer :
export async function RoleDepartmentCreate(params){
const {data} = await request('/rest/role/department/create', params)
return data.data
}
/// 部门删除
// * id : integer :
export async function RoleDepartmentDel(params){
const {data} = await request('/rest/role/department/del', params)
return data.data
}
/// 部门列表
export async function RoleDepartmentList(){
const {data} = await request('/rest/role/department/list')
return data.data
}
/// 部门修改
// * id : integer :
// no : string :
// name : string :
// description : string :
// parentId : integer :
export async function RoleDepartmentUpdate(params){
const {data} = await request('/rest/role/department/update', params)
return data.data
}
/// role列表
// root : integer : 指定根department
export async function RoleList(params){
const {data} = await request('/rest/role/list', params)
return data.data
}
/// 列出所有角色,附带所属users
// * roleId : integer :
export async function RoleListRolesWithUser(params){
const {data} = await request('/rest/role/listRolesWithUser', params)
return data.data
}
/// 所有权限列表
export async function RolePrivilegeList(){
const {data} = await request('/rest/role/privilege/list')
return data.data
}
/// role修改
// * id : integer :
// name : string :
// privilegesJson : string : 数组json字符串:[a,b,c]
// departmentId : integer :
export async function RoleUpdate(params){
const {data} = await request('/rest/role/update', params)
return data.data
}
import {request} from '/lib/request'
/// 分类删除
// * id : integer :
export async function SearchCategoryDel(params){
const {data} = await request('/rest/search/category/del', params)
return data.data
}
/// 分类列表
export async function SearchCategoryList(){
const {data} = await request('/rest/search/category/list')
return data.data
}
/// 分类增加和修改
// id : integer :
// searchColumnId : integer :
// searchKey : string :
// name : string :
// extend : string :
export async function SearchCategoryUpdate(params){
const {data} = await request('/rest/search/category/update', params)
return data.data
}
/// 栏目删除
// * id : integer :
export async function SearchColumnDel(params){
const {data} = await request('/rest/search/column/del', params)
return data.data
}
/// 栏目列表
// categoryFlag : boolean :
export async function SearchColumnList(params){
const {data} = await request('/rest/search/column/list', params)
return data.data
}
/// 栏目增加和修改
// id : integer :
// name : string :
// extend : string :
export async function SearchColumnUpdate(params){
const {data} = await request('/rest/search/column/update', params)
return data.data
}
/// 产品详情
// * id : integer :
export async function SearchDetail(params){
const {data} = await request('/rest/search/detail', params)
return data.data
}
/// 产品列表
// searchIdArray : string :
export async function SearchList(params){
const {data} = await request('/rest/search/list', params)
return data.data
}
/// 产品添加备注run
// * id : integer :
// remark : string :
export async function SearchUpdate(params){
const {data} = await request('/rest/search/update', params)
return data.data
}
import {request} from '/lib/request'
/// 增加和修改
export async function SettingGet(){
const {data} = await request('/rest/setting/get')
return data.data
}
/// 删除
// moveDirs : string :
// searchDirs : string : 搜索目录 [{label-特征标签,dir-目录到SWAP父目录}]
// monitorDirs : string :
export async function SettingSet(params){
const {data} = await request('/rest/setting/set', params)
return data.data
}
...@@ -5,30 +5,54 @@ ...@@ -5,30 +5,54 @@
<el-button style="width: 15%" class="ml-4">连接mqtt</el-button> <el-button style="width: 15%" class="ml-4">连接mqtt</el-button>
</div> </div>
<div class="flex mt-4"> <div class="flex mt-4" style="height: 80%;">
<el-input <div style="width: 40%; height: 100%">
style="width: 40%" <div style="height: 90%; border: 1px solid">
:rows="24"
type="textarea"
disabled
/>
</div>
<div class="flex mt-4">
<el-input></el-input>
<el-button class="ml-4">设置指令</el-button>
<el-button>发送指令</el-button>
</div>
</div>
<div style="width: 58%; height: 100%; border: 1px solid" class="ml-4">
</div>
</div> </div>
<div class="mt-4"> <div class="flex mt-4 items-center" style="height: 10%">
<el-input <div style="width: 90%; height: 100%;border: 1px solid;overflow: auto;" ref="messageContainer">
style="width: 80%" <span v-for="message in messages">
:rows="4" {{ message }}
type="textarea" <br />
disabled </span>
/> </div>
<el-button class="ml-4">导出</el-button> <el-button class="ml-4" size="large">导出</el-button>
</div> </div>
</template> </template>
<script setup> <script setup>
import {ref, watchEffect} from 'vue'
const messages = ref([1,2,3,4,5,6,7,8])
const messageContainer = ref(null);
function scrollToBottom() {
if (messageContainer.value) {
messageContainer.value.scrollTop = messageContainer.value.scrollHeight;
}
}
watchEffect(() => {
// 在 messages 更新后滚动到底部
scrollToBottom();
});
</script> </script>
<style>
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment