Compare commits

...

2 Commits

Author SHA1 Message Date
wangqiujuan0808 ae9fcf8996 。。 2023-12-26 11:48:03 +08:00
wangqiujuan0808 b734e6745f 。。 2023-12-26 11:47:03 +08:00
11 changed files with 264 additions and 261 deletions

View File

@ -11,9 +11,9 @@
:rules="rules"
ref="ruleFormRef"
>
<el-form-item label="规则标题:" prop="name">
<el-form-item label="规则标题:" prop="title">
<el-input
v-model="addForm.name"
v-model="addForm.title"
placeholder="请输入规则标题"
clearable
:disabled="type === 'I' ? false: true"
@ -46,9 +46,12 @@ export default {
setup(props, ctx) {
const ruleFormRef = ref(null);
const state = reactive({
addForm: {},
addForm: {
title: '',
description: ''
},
rules: {
name: [
title: [
{ required: true, message: "请输入规则标题", trigger: "blur" }
],
description: [
@ -63,7 +66,7 @@ export default {
return props.type;
});
onMounted(() => {
// state.addForm = props.formData;
state.addForm = props.formData;
});
const closeDialog = () => {

View File

@ -1,17 +1,17 @@
syntax = "proto3";
option go_package = "data/";
message com_list{
repeated com_info com = 1;
}
message com_info{
string name = 1;
string path = 2;
bool used = 3;
int32 baud_rate = 4;
int32 data_bits = 5;
int32 stop_bits = 6;
string parity = 7;
int32 timeout = 8;
syntax = "proto3";
option go_package = "data/";
message com_list{
repeated com_info com = 1;
}
message com_info{
string name = 1;
string path = 2;
bool used = 3;
int32 baud_rate = 4;
int32 data_bits = 5;
int32 stop_bits = 6;
string parity = 7;
int32 timeout = 8;
}

View File

@ -1,30 +1,30 @@
syntax = "proto3";
option go_package = "data/";
message m_properties{
string name = 1;
string value = 2;
}
message m_point_list{
repeated m_point points = 1;
}
message m_point{
string name = 1;
string path = 2;
string value = 3;
repeated m_properties properties = 4;
}
message m_device_list{
repeated m_device devices = 1;
}
message m_device{
string name = 1;
string value = 2;
string path = 3;
repeated m_properties properties = 4;
repeated m_point points = 5;
syntax = "proto3";
option go_package = "data/";
message m_properties{
string name = 1;
string value = 2;
}
message m_point_list{
repeated m_point points = 1;
}
message m_point{
string name = 1;
string path = 2;
string value = 3;
repeated m_properties properties = 4;
}
message m_device_list{
repeated m_device devices = 1;
}
message m_device{
string name = 1;
string value = 2;
string path = 3;
repeated m_properties properties = 4;
repeated m_point points = 5;
}

View File

@ -1,54 +1,54 @@
syntax = "proto3";
option go_package = "data/";
message info{
Basicinfo basicinfo = 1;
Hostinfo hostinfo = 2;
Meminfo meminfo = 3;
repeated Diskinfo diskinfo = 4;
repeated Netinfo netinfo = 5;
}
//
message Basicinfo{
string model = 1; //
string sn = 2; // SN
string first_time = 3; //
}
//
message Hostinfo{
int32 cpu = 1; // cpu
string uptime = 2; //
string boottime = 3; //
}
//
message Meminfo{
double total = 1; //
double available = 2; //
double used = 3; //
double used_percent = 4; //
double free = 5; //
double buffers = 6; //
double cached = 7; //
}
//
message Diskinfo{
string name = 1; //
string path = 2; //
double total = 3; //
double free = 4; //
double used = 5; //
double used_percent = 6; //
}
//
message Netinfo{
string name = 1; //
uint64 bytesSent = 2; // number of bytes sent
uint64 bytesRecv = 3; // number of bytes received
uint64 packetsSent = 4; // number of packets sent
uint64 packetsRecv = 5; // number of packets received
syntax = "proto3";
option go_package = "data/";
message info{
Basicinfo basicinfo = 1;
Hostinfo hostinfo = 2;
Meminfo meminfo = 3;
repeated Diskinfo diskinfo = 4;
repeated Netinfo netinfo = 5;
}
//
message Basicinfo{
string model = 1; //
string sn = 2; // SN
string first_time = 3; //
}
//
message Hostinfo{
int32 cpu = 1; // cpu
string uptime = 2; //
string boottime = 3; //
}
//
message Meminfo{
double total = 1; //
double available = 2; //
double used = 3; //
double used_percent = 4; //
double free = 5; //
double buffers = 6; //
double cached = 7; //
}
//
message Diskinfo{
string name = 1; //
string path = 2; //
double total = 3; //
double free = 4; //
double used = 5; //
double used_percent = 6; //
}
//
message Netinfo{
string name = 1; //
uint64 bytesSent = 2; // number of bytes sent
uint64 bytesRecv = 3; // number of bytes received
uint64 packetsSent = 4; // number of packets sent
uint64 packetsRecv = 5; // number of packets received
}

View File

@ -1,20 +1,20 @@
syntax = "proto3";
option go_package = "data/";
message net_info{
repeated ip_info ip = 1;
dns_info dns = 2;
}
message ip_info{
string name = 1;
string mode = 2;
string ip = 3;
string mk = 4;
string gw = 5;
}
message dns_info{
string dns1 = 1;
string dns2 = 2;
syntax = "proto3";
option go_package = "data/";
message net_info{
repeated ip_info ip = 1;
dns_info dns = 2;
}
message ip_info{
string name = 1;
string mode = 2;
string ip = 3;
string mk = 4;
string gw = 5;
}
message dns_info{
string dns1 = 1;
string dns2 = 2;
}

View File

@ -1,8 +1,8 @@
syntax = "proto3";
option go_package = "data/";
message response{
uint32 code = 1;
bytes data = 2;
string msg = 3;
syntax = "proto3";
option go_package = "data/";
message response{
uint32 code = 1;
bytes data = 2;
string msg = 3;
}

View File

@ -1,41 +1,41 @@
syntax = "proto3";
option go_package = "data/";
message sb_list{
repeated sb_info sb = 1;
}
message sb_host{
repeated string host = 1;
}
message sb_info{
string name = 1;
string drive = 2;
string host = 3;
uint32 status = 4;
string description = 5;
bool enable = 6;
repeated string device_name = 7;
}
message sb_add{
string name = 1;
string drive = 2;
string description = 3;
bytes config = 4;
}
message sb_drive_list{
repeated sb_drive_info sb_drive = 1;
}
message sb_drive_info{
string name = 1;
bytes config = 2;
}
// message tx_drive_config_modbusTCP{
// string host = 1;
// string port = 2;
syntax = "proto3";
option go_package = "data/";
message sb_list{
repeated sb_info sb = 1;
}
message sb_host{
repeated string host = 1;
}
message sb_info{
string name = 1;
string drive = 2;
string host = 3;
uint32 status = 4;
string description = 5;
bool enable = 6;
repeated string device_name = 7;
}
message sb_add{
string name = 1;
string drive = 2;
string description = 3;
bytes config = 4;
}
message sb_drive_list{
repeated sb_drive_info sb_drive = 1;
}
message sb_drive_info{
string name = 1;
bytes config = 2;
}
// message tx_drive_config_modbusTCP{
// string host = 1;
// string port = 2;
// }

View File

@ -1,67 +1,67 @@
syntax = "proto3";
option go_package = "data/";
import "data.proto";
message tx_list{
repeated tx_info tx = 1;
}
message tx_host{
repeated string host = 1;
}
message tx_info{
string name = 1;
string drive = 2;
bool serial = 3;
string host = 4;
uint32 status = 5;
string description = 6;
bool enable = 7;
repeated tx_device_info device = 8;
}
message tx_add{
string name = 1;
string drive = 2;
bool serial = 3;
string description = 4;
bytes config = 5;
}
message tx_add_device{
string name = 1;
repeated tx_device_info device = 2;
}
message tx_drive_list{
repeated tx_drive_info tx_drive = 1;
}
message tx_drive_info{
string name = 1;
bool serial = 2;
bytes config = 3;
}
message tx_drive_config_modbusTCP{
string host = 1;
string port = 2;
}
message tx_device_info{
string name = 1;
string template = 2;
repeated m_properties properties = 3;
}
message mb_list{
repeated mb_info mb = 1;
}
message mb_info{
string name = 1;
string type = 2;
string description = 3;
repeated m_point points = 4;
syntax = "proto3";
option go_package = "data/";
import "data.proto";
message tx_list{
repeated tx_info tx = 1;
}
message tx_host{
repeated string host = 1;
}
message tx_info{
string name = 1;
string drive = 2;
bool serial = 3;
string host = 4;
uint32 status = 5;
string description = 6;
bool enable = 7;
repeated tx_device_info device = 8;
}
message tx_add{
string name = 1;
string drive = 2;
bool serial = 3;
string description = 4;
bytes config = 5;
}
message tx_add_device{
string name = 1;
repeated tx_device_info device = 2;
}
message tx_drive_list{
repeated tx_drive_info tx_drive = 1;
}
message tx_drive_info{
string name = 1;
bool serial = 2;
bytes config = 3;
}
message tx_drive_config_modbusTCP{
string host = 1;
string port = 2;
}
message tx_device_info{
string name = 1;
string template = 2;
repeated m_properties properties = 3;
}
message mb_list{
repeated mb_info mb = 1;
}
message mb_info{
string name = 1;
string type = 2;
string description = 3;
repeated m_point points = 4;
}

View File

@ -1,22 +1,22 @@
syntax = "proto3";
option go_package = "data/";
message user{
string name = 1;
string password = 2;
fixed64 timestamp = 3;
}
message token{
string name = 1;
string token = 2;
fixed64 timestamp = 3;
fixed64 expiration_time = 4;
}
message passwd{
string name = 1;
string old_password = 2;
string new_password = 3;
string new_password2 = 4;
syntax = "proto3";
option go_package = "data/";
message user{
string name = 1;
string password = 2;
fixed64 timestamp = 3;
}
message token{
string name = 1;
string token = 2;
fixed64 timestamp = 3;
fixed64 expiration_time = 4;
}
message passwd{
string name = 1;
string old_password = 2;
string new_password = 3;
string new_password2 = 4;
}

View File

@ -97,8 +97,8 @@ export default {
if (ret.code == 0) {
//
console.log(rule.decode(ret.data));
state.tableData = rule.decode(ret.data);
// state.tableData = rule_info.decode(ret.data);
// console.log(rule_info.decode(ret.data));
} else {
console.log(res);
}
@ -138,13 +138,13 @@ export default {
};
//
const addData = () => {
state.dialogVisible = true;
//
state.formData = {
title: '',
description: ''
}
state.type = 'I';
state.dialogVisible = true;
};
//
const changeStatus = async (item) => {

View File

@ -24,8 +24,8 @@ export default ({ mode }) => defineConfig({
server: {
proxy: {
'/api': {
// target: 'http://api.shikicc.com:58909',
target: 'http://10.10.14.247',
target: 'http://frp.shikicc.com:58951',
// target: 'http://10.10.14.123',
// target: 'https://cdcmapi.shikicc.com',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '/api')