cc 2023-12-26 03:56:08 +00:00
parent ae9fcf8996
commit 16fd1f9fab
1 changed files with 31 additions and 4 deletions

View File

@ -97,8 +97,14 @@ export default {
if (ret.code == 0) {
//
// state.tableData = rule_info.decode(ret.data);
// console.log(rule_info.decode(ret.data));
// state.tableData = rule.decode(ret.data);
console.log(rule.decode(ret.data));
/**
* 组长看这里
*
*/
// lable
// info
} else {
console.log(res);
}
@ -122,8 +128,14 @@ export default {
}).finish();
//
const req_data = req_databuf.slice(0, req_databuf.length);
const req_databuf1 = post.encode({
cmd: 2,
data: req_data,
}).finish();
//
const req_data1 = req_databuf1.slice(0, req_databuf1.length);
const res = await infoApi.delRules(req_data);
const res = await infoApi.postJsonRequest(req_data1);
const ret = response.decode(new Uint8Array(res));
if (ret.code == 0) {
ElMessage.success(res.msg || "请求成功");
@ -154,7 +166,22 @@ export default {
//
const req_data = req_databuf.slice(0, req_databuf.length);
const res = item.enable==='启动' ? await infoApi.startStatus(req_data) : await infoApi.stopStatus(req_data);
const req_databuf1 = post.encode({
cmd: 3,
data: req_data,
}).finish();
//
const req_data1 = req_databuf1.slice(0, req_databuf1.length);
const req_databuf2 = post.encode({
cmd: 3,
data: req_data,
}).finish();
//
const req_data2 = req_databuf2.slice(0, req_databuf2.length);
const res = item.enable==='启动' ? await infoApi.postJsonRequest(req_data2) : await infoApi.postJsonRequest(req_data1);
const ret = response.decode(new Uint8Array(res));
if (ret.code == 0) {
ElMessage.success(res.msg || "更新成功");