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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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