zyh
This commit is contained in:
commit
6f632d9ff1
249
src/App.vue
249
src/App.vue
|
@ -1,12 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<router-view></router-view>
|
<transition name="fade" mode="out-in">
|
||||||
|
<router-view></router-view>
|
||||||
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import { Alert } from "element-ui";
|
|
||||||
// import { queryallanswer } from "./api/answer";
|
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App",
|
||||||
data() {
|
data() {
|
||||||
|
@ -24,209 +24,8 @@ export default {
|
||||||
YDPZYM_wgwh: [],
|
YDPZYM_wgwh: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {},
|
||||||
// this.queryallanswer();
|
methods: {},
|
||||||
console.log(this.$annswerObj, "变化没用");
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 请求正确答案
|
|
||||||
// async queryallanswer() {
|
|
||||||
// let { data } = await queryallanswer();
|
|
||||||
// console.log(JSON.parse(JSON.stringify(data.data)));
|
|
||||||
// let arr = [];
|
|
||||||
// arr = data.data;
|
|
||||||
// arr.forEach((item) => {
|
|
||||||
// if (item.mark == "DB-IotLite_yx") {
|
|
||||||
// this.DB_IotLite_yx = JSON.parse(item.answer);
|
|
||||||
// }
|
|
||||||
// if (item.mark == "CHGYWG_yx") {
|
|
||||||
// this.CHGYWG_yx = JSON.parse(item.answer);
|
|
||||||
// }
|
|
||||||
// if (item.mark == "CHGYWG_wx") {
|
|
||||||
// this.CHGYWG_wx = JSON.parse(item.answer);
|
|
||||||
// }
|
|
||||||
// if (item.mark == "DB_IotLite_wx") {
|
|
||||||
// this.DB_IotLite_wx = JSON.parse(item.answer);
|
|
||||||
// }
|
|
||||||
// if (item.mark == "CKFWQ_yx") {
|
|
||||||
// this.CKFWQ_yx = JSON.parse(item.answer);
|
|
||||||
// }
|
|
||||||
// if (item.mark == "CKFWQ_wx") {
|
|
||||||
// this.CKFWQ_wx = JSON.parse(item.answer);
|
|
||||||
// }
|
|
||||||
// if (item.mark == "GYWZ_yx") {
|
|
||||||
// this.GYWZ_yx = JSON.parse(item.answer);
|
|
||||||
// }
|
|
||||||
// if (item.mark == "GYWZ_wx") {
|
|
||||||
// this.GYWZ_wx = JSON.parse(item.answer);
|
|
||||||
// }
|
|
||||||
// if (item.mark == "YDPZYM_wgpz") {
|
|
||||||
// this.YDPZYM_wgpz = JSON.parse(item.answer);
|
|
||||||
// }
|
|
||||||
// if (item.mark == "YDPZYM_wgwh") {
|
|
||||||
// this.YDPZYM_wgwh = JSON.parse(item.answer);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// console.log(arr);
|
|
||||||
// let obj = {
|
|
||||||
// cjdpz_beilv: "2",
|
|
||||||
// cjdpz_cjsjlx: "uint16",
|
|
||||||
// cjdpz_dxsx: "只读131111",
|
|
||||||
// cjdpz_jcqdz: "8195",
|
|
||||||
// cjdpz_mc: "产量",
|
|
||||||
// cjdpz_sjq: "4X (Holding Register)",
|
|
||||||
// cjdpz_tagid: "MachinePamHID910",
|
|
||||||
// cjdpz_zjx: "Null",
|
|
||||||
// ippz_dns_by: "114.114.114.114",
|
|
||||||
// ippz_dns_sx: "8.8.8.8",
|
|
||||||
// ippz_ip: "192.168.32.3",
|
|
||||||
// ippz_mac: "3C:2D:50:20:30:3D",
|
|
||||||
// ippz_mrwg: "192.168.32.1",
|
|
||||||
// ippz_wangkou: "ETH1",
|
|
||||||
// ippz_zwym: "255.255.255.192",
|
|
||||||
// mqtt_cjd_sbmc: "有线区精雕1",
|
|
||||||
// mqtt_cjd_tagid: "MachinePamHID910",
|
|
||||||
// mqtt_ip: "124.70.210.118",
|
|
||||||
// mqtt_port: "1883",
|
|
||||||
// mqtt_qiyong: "1",
|
|
||||||
// mqtt_qos: "qos1",
|
|
||||||
// mqtt_retained: "0",
|
|
||||||
// mqtt_scms: "周期上传",
|
|
||||||
// mqtt_sczq: "5",
|
|
||||||
// mqtt_sjgl: "采集成功",
|
|
||||||
// mqtt_sssjfbzt: "dbzn/gateway/iotlite/2000808010",
|
|
||||||
// mqtt_wgsn: "2000808010",
|
|
||||||
// sbpz_jdzxz: "1",
|
|
||||||
// sbpz_jysb: "0",
|
|
||||||
// sbpz_mac: "3C:2D:50:20:30:3D",
|
|
||||||
// sbpz_sbid: "有线区加工设备1",
|
|
||||||
// sbpz_sbmc: "有线区精雕1",
|
|
||||||
// tdpz_050F: "auto",
|
|
||||||
// tdpz_0610: "auto",
|
|
||||||
// tdpz_cfcs: "3",
|
|
||||||
// tdpz_cjsylxdz: "1",
|
|
||||||
// tdpz_cssj: "500",
|
|
||||||
// tdpz_dxzkb: "1:1",
|
|
||||||
// tdpz_ip: "192.168.32.2",
|
|
||||||
// tdpz_jgsj: "500",
|
|
||||||
// tdpz_lxsj: "0",
|
|
||||||
// tdpz_port: "502",
|
|
||||||
// tdpz_qdmc: "ModbusTCPClient",
|
|
||||||
// tdpz_td: "网口",
|
|
||||||
// tdpz_tdmc: "有线区Channel1",
|
|
||||||
// tdpz_watchtime: "1",
|
|
||||||
// wgpz_wgid: "LAN-BOX1",
|
|
||||||
// wgpz_wglx: "MODBUS网关",
|
|
||||||
// wgpz_wgmc: "有线区网关1",
|
|
||||||
// };
|
|
||||||
// let newArr = [
|
|
||||||
// {
|
|
||||||
// cskey: "MachinePamHID917",
|
|
||||||
// csname: "主轴转速",
|
|
||||||
// pcz: "100",
|
|
||||||
// sdz: "2000",
|
|
||||||
// sfbjbz: "是",
|
|
||||||
// sfyxbz: "是",
|
|
||||||
// sswg: "lan-box2",
|
|
||||||
// xsws: "0",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// cskey: "MachinePamHID910",
|
|
||||||
// csname: "产量",
|
|
||||||
// pcz: "5",
|
|
||||||
// sdz: "20",
|
|
||||||
// sfbjbz: "是",
|
|
||||||
// sfyxbz: "是",
|
|
||||||
// sswg: "lan-box1",
|
|
||||||
// xsws: "0",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// cskey: "MachinePamHID909",
|
|
||||||
// csname: "急停状态",
|
|
||||||
// pcz: "0",
|
|
||||||
// sdz: "1",
|
|
||||||
// sfbjbz: "是",
|
|
||||||
// sfyxbz: "是",
|
|
||||||
// sswg: "wlan-box1",
|
|
||||||
// xsws: "0",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// cskey: "MachinePamHID928",
|
|
||||||
// csname: "切削速度",
|
|
||||||
// pcz: "50",
|
|
||||||
// sdz: "500",
|
|
||||||
// sfbjbz: "是",
|
|
||||||
// sfyxbz: "是",
|
|
||||||
// sswg: "wlan-box2",
|
|
||||||
// xsws: "0",
|
|
||||||
// },
|
|
||||||
// ];
|
|
||||||
// // console.log(this.getAllGrades(arr[0].answer, obj, arr[0].r1));
|
|
||||||
// console.log(this.getAllGrades(newArr, newArr, arr[9].r1));
|
|
||||||
// // this.getAllGrades(arr[9].answer, newArr, arr[9].r1);
|
|
||||||
// },
|
|
||||||
// obj1:答案对象 obj:用户对象 r1 模块分数
|
|
||||||
// getAllGrades(obj1, obj2, r1) {
|
|
||||||
// var arr = [];
|
|
||||||
// let grade = 0;
|
|
||||||
// if (!Array.isArray(obj1)) {
|
|
||||||
// const keys = Object.keys(obj1);
|
|
||||||
// for (let key of keys) {
|
|
||||||
// if (obj1[key] !== obj2[key]) {
|
|
||||||
// arr.push({
|
|
||||||
// [key]: {
|
|
||||||
// answer: obj1[key],
|
|
||||||
// user: obj2[key],
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (arr.length > 0) {
|
|
||||||
// grade = 0;
|
|
||||||
// } else {
|
|
||||||
// grade = r1;
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// if (obj1.length !== obj2.length) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// let flagArr = [];
|
|
||||||
// for (let i = 0; i < obj1.length; i++) {
|
|
||||||
// for (let j = 0; j < obj2.length; j++) {
|
|
||||||
// let flag = this.isArrEqual(
|
|
||||||
// Object.values(obj1[i]),
|
|
||||||
// Object.values(obj2[j])
|
|
||||||
// );
|
|
||||||
// flagArr.push(flag);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// let counter = 0;
|
|
||||||
// let target = true;
|
|
||||||
// for (let a of flagArr) {
|
|
||||||
// if (a == target) {
|
|
||||||
// counter++;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (counter == obj1.length) {
|
|
||||||
// grade = r1;
|
|
||||||
// console.log(grade);
|
|
||||||
// } else {
|
|
||||||
// grade = 0;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// // 返回此模块分数以及错误的字段;
|
|
||||||
// return {
|
|
||||||
// arr,
|
|
||||||
// grade: Number(grade),
|
|
||||||
// };
|
|
||||||
// },
|
|
||||||
// isArrEqual(arr1, arr2) {
|
|
||||||
// return (
|
|
||||||
// arr1.length === arr2.length && arr1.every((ele) => arr2.includes(ele))
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
},
|
|
||||||
mounted() {},
|
mounted() {},
|
||||||
components: {},
|
components: {},
|
||||||
};
|
};
|
||||||
|
@ -241,7 +40,6 @@ export default {
|
||||||
#app {
|
#app {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
/* background-color: white !important; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.v-modal {
|
.v-modal {
|
||||||
|
@ -270,7 +68,7 @@ export default {
|
||||||
.el-form-item label {
|
.el-form-item label {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.el-dialog{
|
.el-dialog {
|
||||||
margin-top: 8vh !important;
|
margin-top: 8vh !important;
|
||||||
}
|
}
|
||||||
.el-dialog,
|
.el-dialog,
|
||||||
|
@ -308,25 +106,22 @@ export default {
|
||||||
.el-form-item label {
|
.el-form-item label {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
.el-dialog__wrapper {
|
||||||
// .el-button {
|
pointer-events: none;
|
||||||
// width: 80px;
|
|
||||||
// height: 30px;
|
|
||||||
// line-height: 0.5 !important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
/* .el-tree-node__content:hover {
|
|
||||||
background-image: url(./assets/image/bg.png);
|
|
||||||
background-size: cover;
|
|
||||||
}
|
}
|
||||||
.el-tree-node.is-current>.el-tree-node__content {
|
|
||||||
background-image: url(./assets/image/bg.png);
|
|
||||||
background-size: cover;
|
|
||||||
}
|
|
||||||
.el-tree-node:focus>.el-tree-node__content {
|
|
||||||
background-image: url(./assets/image/bg.png);
|
|
||||||
background-size: cover;
|
|
||||||
} */
|
|
||||||
|
|
||||||
/* 弹窗 */
|
.el-dialog {
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
.el-dialog {
|
||||||
|
margin-top: 8vh !important;
|
||||||
|
}
|
||||||
|
.fade-enter-active,
|
||||||
|
.fade-leave-active {
|
||||||
|
transition: opacity 0.5s;
|
||||||
|
}
|
||||||
|
.fade-enter,
|
||||||
|
.fade-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -27,8 +27,3 @@ export const getGrade = (data) => {
|
||||||
`/Handler/Config.ashx?action=displaychart&user_id=${data.user_id}&mark=${data.mark}`
|
`/Handler/Config.ashx?action=displaychart&user_id=${data.user_id}&mark=${data.mark}`
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
//避免考生中途换电脑的解决方案 在每次拿取考试缓存数据的时候本地存储一份
|
|
||||||
// function(mark,data) {
|
|
||||||
// sessionStorage.setItem(`${mark}`,JSON.stringify(data))
|
|
||||||
// }
|
|
||||||
|
|
|
@ -300,12 +300,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog
|
<el-dialog title="新增命令" :visible.sync="flag" width="30%">
|
||||||
title="新增命令"
|
|
||||||
:visible.sync="flag"
|
|
||||||
width="30%"
|
|
||||||
:before-close="handleClose"
|
|
||||||
>
|
|
||||||
<el-form
|
<el-form
|
||||||
center
|
center
|
||||||
:model="ruleForm2"
|
:model="ruleForm2"
|
||||||
|
@ -396,8 +391,8 @@ export default {
|
||||||
clgl_qidong: true,
|
clgl_qidong: true,
|
||||||
options1: [
|
options1: [
|
||||||
{
|
{
|
||||||
label: "",
|
label: "有线区策略",
|
||||||
value: "",
|
value: "有线区策略",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "无线区策略",
|
label: "无线区策略",
|
||||||
|
@ -554,7 +549,36 @@ export default {
|
||||||
// cmdlist_dz: "",
|
// cmdlist_dz: "",
|
||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
|
clgl_name: "数来服务器",
|
||||||
|
cmdlist_qsdz: "192.168.89.21",
|
||||||
|
clgl_xy: "Modbus(TCP)",
|
||||||
|
clgl_gzms: "透明模式",
|
||||||
|
clgl_ydx: "有线区交换机",
|
||||||
|
clgl_ydk: "5200",
|
||||||
|
clgl_rkwk: "有线区网闸(内网)",
|
||||||
|
clgl_rkip: "",
|
||||||
|
clgl_rkwg: "",
|
||||||
|
clgl_ckwk: "有线区网闸(外网)",
|
||||||
|
clgl_ckip: "",
|
||||||
|
clgl_ckwg: "",
|
||||||
|
clgl_mddx: "无限区路由器",
|
||||||
|
clgl_mddk: "",
|
||||||
|
clgl_dldk: "",
|
||||||
|
wlgl_nw_name: "",
|
||||||
|
wlgl_nw_ip: "",
|
||||||
|
wlgl_nw_zwym: "",
|
||||||
|
wlgl_ww_name: "",
|
||||||
|
wlgl_ww_ip: "",
|
||||||
|
wlgl_ww_zwym: "",
|
||||||
|
dxgl: [],
|
||||||
|
cmdlist_ml: "",
|
||||||
|
cmdlist_sbid: "",
|
||||||
|
cmdlist_qsdz: "",
|
||||||
|
cmdlist_dzcd: "",
|
||||||
|
cmdlist_ms: "",
|
||||||
|
cmdlist_dz: "",
|
||||||
ruleForm1: {
|
ruleForm1: {
|
||||||
|
wlgl_nw_name: "",
|
||||||
clgl_name: "",
|
clgl_name: "",
|
||||||
clgl_xy: [],
|
clgl_xy: [],
|
||||||
clgl_gzms: "",
|
clgl_gzms: "",
|
||||||
|
@ -569,9 +593,7 @@ export default {
|
||||||
clgl_ckwg: "",
|
clgl_ckwg: "",
|
||||||
clgl_ckwk: "",
|
clgl_ckwk: "",
|
||||||
clgl_ckip: "",
|
clgl_ckip: "",
|
||||||
clgl_wdyml: "",
|
clgl_wdyml: "拒绝",
|
||||||
dlport: "",
|
|
||||||
wdyml: "",
|
|
||||||
clgl_rkip1: "",
|
clgl_rkip1: "",
|
||||||
clgl_rkip2: "",
|
clgl_rkip2: "",
|
||||||
clgl_rkip3: "",
|
clgl_rkip3: "",
|
||||||
|
@ -748,12 +770,12 @@ export default {
|
||||||
async SaveUserAnswer() {
|
async SaveUserAnswer() {
|
||||||
var obj = {
|
var obj = {
|
||||||
clgl_name: this.ruleForm1.clgl_name,
|
clgl_name: this.ruleForm1.clgl_name,
|
||||||
cmdlist_qsdz: this.ruleForm1.cmdlist_qsdz,
|
|
||||||
clgl_xy: this.ruleForm1.clgl_xy,
|
clgl_xy: this.ruleForm1.clgl_xy,
|
||||||
clgl_gzms: this.ruleForm1.clgl_gzms,
|
clgl_gzms: this.ruleForm1.clgl_gzms,
|
||||||
clgl_ydx: this.ruleForm1.clgl_ydx,
|
clgl_ydx: this.ruleForm1.clgl_ydx,
|
||||||
clgl_ydk: this.ruleForm1.clgl_ydk,
|
clgl_ydk: this.ruleForm1.clgl_ydk,
|
||||||
clgl_rkwk: this.ruleForm1.clgl_rkwk,
|
clgl_rkwk: this.ruleForm1.clgl_rkwk,
|
||||||
|
clgl_dldk: this.ruleForm1.clgl_dldk,
|
||||||
clgl_rkip:
|
clgl_rkip:
|
||||||
this.ruleForm1.clgl_rkip1 +
|
this.ruleForm1.clgl_rkip1 +
|
||||||
"." +
|
"." +
|
||||||
|
@ -790,19 +812,29 @@ export default {
|
||||||
clgl_mddx: this.ruleForm1.clgl_mddx,
|
clgl_mddx: this.ruleForm1.clgl_mddx,
|
||||||
clgl_mddk: this.ruleForm1.clgl_mddk,
|
clgl_mddk: this.ruleForm1.clgl_mddk,
|
||||||
clgl_wdyml: this.ruleForm1.clgl_wdyml,
|
clgl_wdyml: this.ruleForm1.clgl_wdyml,
|
||||||
|
wlgl_nw_name: this.wlgl_nw_name,
|
||||||
|
wlgl_nw_ip: this.wlgl_nw_ip,
|
||||||
|
wlgl_nw_zwym: this.wlgl_nw_zwym,
|
||||||
|
wlgl_ww_name: this.wlgl_ww_name,
|
||||||
|
wlgl_ww_ip: this.wlgl_ww_ip,
|
||||||
|
wlgl_ww_zwym: this.wlgl_ww_zwym,
|
||||||
|
dxgl: this.dxgl,
|
||||||
|
cmdlist_ml: this.ruleForm2.cmdlist_ml,
|
||||||
|
cmdlist_sbid: this.ruleForm2.cmdlist_sbid,
|
||||||
|
cmdlist_qsdz: this.ruleForm2.cmdlist_qsdz,
|
||||||
|
cmdlist_dzcd: this.ruleForm2.cmdlist_dzcd,
|
||||||
|
cmdlist_ms: this.ruleForm2.cmdlist_ms,
|
||||||
|
cmdlist_dz: this.ruleForm2.cmdlist_dz,
|
||||||
};
|
};
|
||||||
//拿缓存数据
|
console.log(obj);
|
||||||
var json = JSON.parse(sessionStorage.getItem(this.$store.state.type));
|
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: `${this.$store.state.type}`,
|
mark: `${this.$store.state.type}`,
|
||||||
user_id: `${this.$route.query.id}`,
|
user_id: `${this.$route.query.id}`,
|
||||||
mark_value: JSON.stringify({ ...json, ...obj }),
|
// mark: "GYWZ_yx",
|
||||||
|
// user_id: "USER202307301109254198",
|
||||||
|
mark_value: JSON.stringify(obj),
|
||||||
});
|
});
|
||||||
if (data.state) {
|
if (data.state) {
|
||||||
sessionStorage.setItem(
|
|
||||||
this.$store.state.type,
|
|
||||||
JSON.stringify({ ...json, ...obj })
|
|
||||||
);
|
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "缓存成功",
|
message: "缓存成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -817,48 +849,36 @@ export default {
|
||||||
let { data } = await GetUserAnswer({
|
let { data } = await GetUserAnswer({
|
||||||
mark: `${this.$store.state.type}`,
|
mark: `${this.$store.state.type}`,
|
||||||
user_id: `${this.$route.query.id}`,
|
user_id: `${this.$route.query.id}`,
|
||||||
|
// mark: "GYWZ_yx",
|
||||||
|
// user_id: "USER202307301109254198",
|
||||||
});
|
});
|
||||||
if (data.data && data.state) {
|
if (data.data && data.state) {
|
||||||
let res = JSON.parse(data.data.mark_value);
|
let res = JSON.parse(data.data.mark_value);
|
||||||
if (res.clgl_ckip) {
|
console.log(res);
|
||||||
this.ruleForm1.clgl_ckip1 = res.clgl_ckip.split(".")[0];
|
this.clgl_name = res.clgl_name;
|
||||||
this.ruleForm1.clgl_ckip2 = res.clgl_ckip.split(".")[1];
|
this.clgl_xy = res.clgl_xy;
|
||||||
this.ruleForm1.clgl_ckip3 = res.clgl_ckip.split(".")[2];
|
this.clgl_gzms = res.clgl_gzms;
|
||||||
this.ruleForm1.clgl_ckip4 = res.clgl_rkip.split(".")[3];
|
this.clgl_mddk = res.clgl_mddk;
|
||||||
this.ruleForm1.clgl_rkip1 = res.clgl_rkip.split(".")[0];
|
this.clgl_ydx = res.clgl_ydx;
|
||||||
this.ruleForm1.clgl_rkip2 = res.clgl_rkip.split(".")[1];
|
this.clgl_ydk = res.clgl_ydk;
|
||||||
this.ruleForm1.clgl_rkip3 = res.clgl_rkip.split(".")[2];
|
this.clgl_mddk = res.clgl_mddk;
|
||||||
this.ruleForm1.clgl_rkip4 = res.clgl_rkip.split(".")[3];
|
this.clgl_dldk = res.clgl_dldk;
|
||||||
this.ruleForm1.clgl_rkwg1 = res.clgl_rkwg.split(".")[0];
|
this.clgl_rkwk = res.clgl_rkwk;
|
||||||
this.ruleForm1.clgl_rkwg2 = res.clgl_rkwg.split(".")[1];
|
this.clgl_wdyml = res.clgl_wdyml;
|
||||||
this.ruleForm1.clgl_rkwg3 = res.clgl_rkwg.split(".")[2];
|
this.clgl_ckwk = res.clgl_ckwk;
|
||||||
this.ruleForm1.clgl_rkwg4 = res.clgl_rkwg.split(".")[3];
|
this.wlgl_nw_name = res.wlgl_nw_name;
|
||||||
this.ruleForm1.clgl_ckwg1 = res.clgl_ckwg.split(".")[0];
|
this.wlgl_nw_ip = res.wlgl_nw_ip;
|
||||||
this.ruleForm1.clgl_ckwg2 = res.clgl_ckwg.split(".")[1];
|
this.wlgl_nw_zwym = res.wlgl_nw_zwym;
|
||||||
this.ruleForm1.clgl_ckwg3 = res.clgl_ckwg.split(".")[2];
|
this.wlgl_ww_name = res.wlgl_ww_name;
|
||||||
this.ruleForm1.clgl_ckwg4 = res.clgl_ckwg.split(".")[3];
|
this.wlgl_ww_ip = res.wlgl_ww_ip;
|
||||||
this.ruleForm1.clgl_name = res.clgl_name;
|
this.wlgl_ww_zwym = res.wlgl_ww_zwym;
|
||||||
this.ruleForm1.clgl_xy = res.clgl_xy;
|
this.dxgl = [].concat(res.dxgl);
|
||||||
this.ruleForm1.clgl_gzms = res.clgl_gzms;
|
this.cmdlist_ml = res.cmdlist_ml;
|
||||||
this.ruleForm1.clgl_mddk = res.clgl_mddk;
|
this.cmdlist_sbid = res.cmdlist_sbid;
|
||||||
this.ruleForm1.clgl_ydx = res.clgl_ydx;
|
this.cmdlist_qsdz = res.cmdlist_qsdz;
|
||||||
this.ruleForm1.clgl_ydk = res.clgl_ydk;
|
this.cmdlist_dzcd = res.cmdlist_dzcd;
|
||||||
this.ruleForm1.clgl_mddk = res.clgl_mddk;
|
this.cmdlist_ms = res.cmdlist_ms;
|
||||||
this.ruleForm1.clgl_dldk = res.clgl_dldk;
|
this.cmdlist_dz = res.cmdlist_dz;
|
||||||
this.ruleForm1.clgl_rkwk = res.clgl_rkwk;
|
|
||||||
this.ruleForm1.clgl_wdyml = res.clgl_wdyml;
|
|
||||||
this.ruleForm1.clgl_ckwk = res.clgl_ckwk;
|
|
||||||
this.tableData1 = [
|
|
||||||
{
|
|
||||||
cmdlist_ml: res.cmdlist_ml,
|
|
||||||
cmdlist_sbid: res.cmdlist_sbid,
|
|
||||||
cmdlist_qsdz: res.cmdlist_qsdz,
|
|
||||||
cmdlist_dzcd: res.cmdlist_dzcd,
|
|
||||||
cmdlist_ms: res.cmdlist_ms,
|
|
||||||
cmdlist_dz: res.cmdlist_dz,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//新增命令-保存
|
//新增命令-保存
|
||||||
|
@ -880,20 +900,47 @@ export default {
|
||||||
cmdlist_dzcd: this.ruleForm2.cmdlist_dzcd,
|
cmdlist_dzcd: this.ruleForm2.cmdlist_dzcd,
|
||||||
cmdlist_ms: this.ruleForm2.cmdlist_ms,
|
cmdlist_ms: this.ruleForm2.cmdlist_ms,
|
||||||
cmdlist_dz: this.ruleForm2.cmdlist_dz,
|
cmdlist_dz: this.ruleForm2.cmdlist_dz,
|
||||||
|
clgl_name: this.ruleForm1.clgl_name,
|
||||||
|
clgl_xy: this.ruleForm1.clgl_xy,
|
||||||
|
clgl_gzms: this.ruleForm1.clgl_gzms,
|
||||||
|
clgl_ydx: this.ruleForm1.clgl_ydx,
|
||||||
|
clgl_ydk: this.ruleForm1.clgl_ydk,
|
||||||
|
clgl_mddx: this.ruleForm1.clgl_mddx,
|
||||||
|
clgl_mddk: this.ruleForm1.clgl_mddk,
|
||||||
|
clgl_rkwg: this.ruleForm1.clgl_rkwg,
|
||||||
|
clgl_rkwk: this.ruleForm1.clgl_rkwk,
|
||||||
|
clgl_rkip: this.ruleForm1.clgl_rkip,
|
||||||
|
clgl_dldk: this.ruleForm1.clgl_dldk,
|
||||||
|
clgl_ckwg: this.ruleForm1.clgl_ckwg,
|
||||||
|
clgl_ckwk: this.ruleForm1.clgl_ckwk,
|
||||||
|
clgl_ckip: this.ruleForm1.clgl_ckip,
|
||||||
|
clgl_wdyml: this.ruleForm1.clgl_wdyml,
|
||||||
|
wlgl_nw_name: this.wlgl_nw_name,
|
||||||
|
wlgl_nw_ip: this.wlgl_nw_ip,
|
||||||
|
wlgl_nw_zwym: this.wlgl_nw_zwym,
|
||||||
|
wlgl_ww_name: this.wlgl_ww_name,
|
||||||
|
wlgl_ww_ip: this.wlgl_ww_ip,
|
||||||
|
wlgl_ww_zwym: this.wlgl_ww_zwym,
|
||||||
|
dxgl: this.dxgl,
|
||||||
};
|
};
|
||||||
//拿缓存数据
|
|
||||||
var json = JSON.parse(sessionStorage.getItem(this.$store.state.type));
|
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: `${this.$store.state.type}`,
|
mark: `${this.$store.state.type}`,
|
||||||
user_id: `${this.$route.query.id}`,
|
user_id: `${this.$route.query.id}`,
|
||||||
mark_value: JSON.stringify({ ...json, ...obj }),
|
// mark: "GYWZ_yx",
|
||||||
|
// user_id: "USER202307301109254198",
|
||||||
|
mark_value: JSON.stringify(obj),
|
||||||
});
|
});
|
||||||
if (data.state) {
|
if (data.state) {
|
||||||
this.tableData1 = [obj];
|
this.tableData1 = [
|
||||||
sessionStorage.setItem(
|
{
|
||||||
this.$store.state.type,
|
cmdlist_ml: this.ruleForm2.cmdlist_ml,
|
||||||
JSON.stringify({ ...json, ...obj })
|
cmdlist_sbid: this.ruleForm2.cmdlist_sbid,
|
||||||
);
|
cmdlist_qsdz: this.ruleForm2.cmdlist_qsdz,
|
||||||
|
cmdlist_dzcd: this.ruleForm2.cmdlist_dzcd,
|
||||||
|
cmdlist_ms: this.ruleForm2.cmdlist_ms,
|
||||||
|
cmdlist_dz: this.ruleForm2.cmdlist_dz,
|
||||||
|
},
|
||||||
|
];
|
||||||
this.flag = false;
|
this.flag = false;
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "新增成功",
|
message: "新增成功",
|
||||||
|
@ -906,17 +953,41 @@ export default {
|
||||||
//删除命令
|
//删除命令
|
||||||
async handleDel(index, row) {
|
async handleDel(index, row) {
|
||||||
this.tableData1 = [];
|
this.tableData1 = [];
|
||||||
let obj = JSON.parse(sessionStorage.getItem(this.$store.state.type));
|
var obj = {
|
||||||
obj.cmdlist_ml = "";
|
cmdlist_ml: "",
|
||||||
obj.cmdlist_sbid = "";
|
cmdlist_sbid: "",
|
||||||
obj.cmdlist_qsdz = "";
|
cmdlist_qsdz: "",
|
||||||
obj.cmdlist_dzcd = "";
|
cmdlist_dzcd: "",
|
||||||
obj.cmdlist_ms = "";
|
cmdlist_ms: "",
|
||||||
obj.cmdlist_dz = "";
|
cmdlist_dz: "",
|
||||||
localStorage.setItem(this.$store.state.type, JSON.stringify(obj));
|
clgl_name: this.ruleForm1.clgl_name,
|
||||||
|
clgl_xy: this.ruleForm1.clgl_xy,
|
||||||
|
clgl_gzms: this.ruleForm1.clgl_gzms,
|
||||||
|
clgl_ydx: this.ruleForm1.clgl_ydx,
|
||||||
|
clgl_ydk: this.ruleForm1.clgl_ydk,
|
||||||
|
clgl_mddx: this.ruleForm1.clgl_mddx,
|
||||||
|
clgl_mddk: this.ruleForm1.clgl_mddk,
|
||||||
|
clgl_rkwg: this.ruleForm1.clgl_rkwg,
|
||||||
|
clgl_rkwk: this.ruleForm1.clgl_rkwk,
|
||||||
|
clgl_rkip: this.ruleForm1.clgl_rkip,
|
||||||
|
clgl_dldk: this.ruleForm1.clgl_dldk,
|
||||||
|
clgl_ckwg: this.ruleForm1.clgl_ckwg,
|
||||||
|
clgl_ckwk: this.ruleForm1.clgl_ckwk,
|
||||||
|
clgl_ckip: this.ruleForm1.clgl_ckip,
|
||||||
|
clgl_wdyml: this.ruleForm1.clgl_wdyml,
|
||||||
|
wlgl_nw_name: this.wlgl_nw_name,
|
||||||
|
wlgl_nw_ip: this.wlgl_nw_ip,
|
||||||
|
wlgl_nw_zwym: this.wlgl_nw_zwym,
|
||||||
|
wlgl_ww_name: this.wlgl_ww_name,
|
||||||
|
wlgl_ww_ip: this.wlgl_ww_ip,
|
||||||
|
wlgl_ww_zwym: this.wlgl_ww_zwym,
|
||||||
|
dxgl: this.dxgl,
|
||||||
|
};
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: `${this.$store.state.type}`,
|
mark: this.$store.state.type,
|
||||||
user_id: `${this.$route.query.id}`,
|
user_id: this.$route.query.id,
|
||||||
|
// mark: "GYWZ_yx",
|
||||||
|
// user_id: "USER202307301109254198",
|
||||||
mark_value: JSON.stringify(obj),
|
mark_value: JSON.stringify(obj),
|
||||||
});
|
});
|
||||||
if (data.state) {
|
if (data.state) {
|
||||||
|
|
|
@ -8,12 +8,30 @@
|
||||||
</div>
|
</div>
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<el-form :model="formData" :label-position="labelPosition" :rules="rules" ref="formData">
|
<el-form
|
||||||
|
:model="formData"
|
||||||
|
:label-position="labelPosition"
|
||||||
|
:rules="rules"
|
||||||
|
ref="formData"
|
||||||
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="网关名称:" :label-width="formLabelWidth" prop="wgpz_wgmc">
|
<el-form-item
|
||||||
<el-select v-model="formData.wgpz_wgmc" placeholder="请选择" style="width: 200px">
|
label="网关名称:"
|
||||||
<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value">
|
:label-width="formLabelWidth"
|
||||||
|
prop="wgpz_wgmc"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="formData.wgpz_wgmc"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 200px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options1"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -21,9 +39,22 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="网关ID:" :label-width="formLabelWidth" prop="wgpz_wgid">
|
<el-form-item
|
||||||
<el-select v-model="formData.wgpz_wgid" placeholder="请选择" style="width: 200px">
|
label="网关ID:"
|
||||||
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value">
|
:label-width="formLabelWidth"
|
||||||
|
prop="wgpz_wgid"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="formData.wgpz_wgid"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 200px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options2"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -38,16 +69,40 @@
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="gateway">
|
<div class="gateway">
|
||||||
<el-dialog title="新建网关" :visible.sync="outerVisible" width="382px">
|
<el-dialog title="新建网关" :visible.sync="outerVisible" width="382px">
|
||||||
<el-form :model="formData" :rules="rules" ref="formData" label-width="85px" class="demo-ruleForm">
|
<el-form
|
||||||
|
:model="formData"
|
||||||
|
:rules="rules"
|
||||||
|
ref="formData"
|
||||||
|
label-width="85px"
|
||||||
|
class="demo-ruleForm"
|
||||||
|
>
|
||||||
<el-form-item label="网关名称:" prop="wgpz_wgmc">
|
<el-form-item label="网关名称:" prop="wgpz_wgmc">
|
||||||
<el-select v-model="formData.wgpz_wgmc" placeholder="请选择" style="width: 200px">
|
<el-select
|
||||||
<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value">
|
v-model="formData.wgpz_wgmc"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 200px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options1"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="网关ID:" prop="wgpz_wgid">
|
<el-form-item label="网关ID:" prop="wgpz_wgid">
|
||||||
<el-select v-model="formData.wgpz_wgid" placeholder="请选择" style="width: 200px">
|
<el-select
|
||||||
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value">
|
v-model="formData.wgpz_wgid"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 200px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options2"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -59,7 +114,12 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog title="系统提示" :visible.sync="innerVisible" append-to-body width="382px">
|
<el-dialog
|
||||||
|
title="系统提示"
|
||||||
|
:visible.sync="innerVisible"
|
||||||
|
append-to-body
|
||||||
|
width="382px"
|
||||||
|
>
|
||||||
<p class="inner_content">
|
<p class="inner_content">
|
||||||
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
请确认选择的网关类型与网关实体一致:否则该工程无法下载至实体网关
|
||||||
</p>
|
</p>
|
||||||
|
@ -160,7 +220,9 @@ export default {
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
sessionStorage.setItem("CHGYWG_yx", JSON.stringify(this.formData));
|
sessionStorage.setItem("CHGYWG_yx", JSON.stringify(this.formData));
|
||||||
this.$router.push(`/configuration?user_id=${this.user_id}&firstlabel=${this.formData.wgpz_wgid}`);
|
this.$router.push(
|
||||||
|
`/configuration?user_id=${this.user_id}&firstlabel=${this.formData.wgpz_wgid}`
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: `保存失败,原因是${res.data.message}`,
|
message: `保存失败,原因是${res.data.message}`,
|
||||||
|
@ -168,7 +230,6 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
|
|
||||||
},
|
},
|
||||||
async GetUserAnswer() {
|
async GetUserAnswer() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -193,8 +254,8 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
created() {},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -173,10 +173,8 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.user_id = window.location.href.split("?")[1];
|
this.user_id = window.location.href.split("?")[1];
|
||||||
this.GetUserAnswer();
|
this.GetUserAnswer();
|
||||||
// this.wgpz = JSON.parse(localStorage.getItem("wgpz")) || [];
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSelectionChange() {},
|
|
||||||
//新建网关保存
|
//新建网关保存
|
||||||
saveinfo() {
|
saveinfo() {
|
||||||
this.$refs["ruleForm"].validate((valid) => {
|
this.$refs["ruleForm"].validate((valid) => {
|
||||||
|
@ -203,7 +201,7 @@ export default {
|
||||||
localStorage.setItem("wgpz", JSON.stringify(this.wgpz));
|
localStorage.setItem("wgpz", JSON.stringify(this.wgpz));
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: "YDPZYM_wgpz",
|
mark: "YDPZYM_wgpz",
|
||||||
user_id: `${this.user_id}`,
|
user_id: this.user_id,
|
||||||
// user_id: "USER202307301109254198",
|
// user_id: "USER202307301109254198",
|
||||||
mark_value: JSON.stringify(this.wgpz),
|
mark_value: JSON.stringify(this.wgpz),
|
||||||
});
|
});
|
||||||
|
@ -237,7 +235,7 @@ export default {
|
||||||
localStorage.setItem("wgpz", JSON.stringify(this.wgpz));
|
localStorage.setItem("wgpz", JSON.stringify(this.wgpz));
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: "YDPZYM_wgpz",
|
mark: "YDPZYM_wgpz",
|
||||||
user_id: `${this.user_id}`,
|
user_id: this.user_id,
|
||||||
// user_id: "USER202307301109254198",
|
// user_id: "USER202307301109254198",
|
||||||
mark_value: JSON.stringify(this.wgpz),
|
mark_value: JSON.stringify(this.wgpz),
|
||||||
});
|
});
|
||||||
|
@ -260,7 +258,7 @@ export default {
|
||||||
async GetUserAnswer() {
|
async GetUserAnswer() {
|
||||||
let { data } = await GetUserAnswer({
|
let { data } = await GetUserAnswer({
|
||||||
mark: "YDPZYM_wgpz",
|
mark: "YDPZYM_wgpz",
|
||||||
user_id: `${this.user_id}`,
|
user_id: this.user_id,
|
||||||
// user_id: "USER202307301109254198",
|
// user_id: "USER202307301109254198",
|
||||||
});
|
});
|
||||||
console.log(data.data);
|
console.log(data.data);
|
||||||
|
@ -278,7 +276,7 @@ export default {
|
||||||
});
|
});
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: "YDPZYM_wgpz",
|
mark: "YDPZYM_wgpz",
|
||||||
user_id: `${this.user_id}`,
|
user_id: this.user_id,
|
||||||
// user_id: "USER202307301109254198",
|
// user_id: "USER202307301109254198",
|
||||||
mark_value: JSON.stringify(this.wgpz),
|
mark_value: JSON.stringify(this.wgpz),
|
||||||
});
|
});
|
||||||
|
|
|
@ -274,7 +274,6 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.tableData.length < 4) {
|
if (this.tableData.length < 4) {
|
||||||
this.SaveUserAnswer();
|
this.SaveUserAnswer();
|
||||||
localStorage.setItem("wgwh", JSON.stringify(this.tableData));
|
|
||||||
this.flag = false;
|
this.flag = false;
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
@ -292,7 +291,6 @@ export default {
|
||||||
//删除
|
//删除
|
||||||
async handleDelete(a, b) {
|
async handleDelete(a, b) {
|
||||||
this.tableData.splice(a, 1);
|
this.tableData.splice(a, 1);
|
||||||
localStorage.setItem("wgwh", JSON.stringify(this.tableData));
|
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: "YDPZYM_wgwh",
|
mark: "YDPZYM_wgwh",
|
||||||
user_id: this.user_id,
|
user_id: this.user_id,
|
||||||
|
@ -325,7 +323,6 @@ export default {
|
||||||
(row) => !this.multipleSelection.includes(row)
|
(row) => !this.multipleSelection.includes(row)
|
||||||
);
|
);
|
||||||
this.multipleSelection = [];
|
this.multipleSelection = [];
|
||||||
localStorage.setItem("wgwh", JSON.stringify(this.tableData));
|
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: "YDPZYM_wgwh",
|
mark: "YDPZYM_wgwh",
|
||||||
user_id: this.user_id,
|
user_id: this.user_id,
|
||||||
|
@ -348,10 +345,16 @@ export default {
|
||||||
},
|
},
|
||||||
//保存数据
|
//保存数据
|
||||||
async SaveUserAnswer() {
|
async SaveUserAnswer() {
|
||||||
if (!this.user_id) {
|
let obj = {
|
||||||
this.$message.error("操作失败");
|
sswg: this.ruleForm.sswg,
|
||||||
return;
|
csname: this.ruleForm.csname,
|
||||||
}
|
// sfyxbz: "",
|
||||||
|
sdz: this.ruleForm.sdz,
|
||||||
|
cskey: this.ruleForm.cskey,
|
||||||
|
xsws: this.ruleForm.xsws,
|
||||||
|
pcz: this.ruleForm.pcz,
|
||||||
|
};
|
||||||
|
this.tableData.push(obj);
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: "YDPZYM_wgwh",
|
mark: "YDPZYM_wgwh",
|
||||||
user_id: this.user_id,
|
user_id: this.user_id,
|
||||||
|
@ -359,16 +362,6 @@ export default {
|
||||||
mark_value: JSON.stringify(this.tableData),
|
mark_value: JSON.stringify(this.tableData),
|
||||||
});
|
});
|
||||||
if (data.state) {
|
if (data.state) {
|
||||||
let obj = {
|
|
||||||
sswg: this.ruleForm.sswg,
|
|
||||||
csname: this.ruleForm.csname,
|
|
||||||
// sfyxbz: "",
|
|
||||||
sdz: this.ruleForm.sdz,
|
|
||||||
cskey: this.ruleForm.cskey,
|
|
||||||
xsws: this.ruleForm.xsws,
|
|
||||||
pcz: this.ruleForm.pcz,
|
|
||||||
};
|
|
||||||
this.tableData.push(obj);
|
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "操作成功",
|
message: "操作成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
width="30%"
|
width="30%"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<p class="txt">本页面涉及排错,请检查修改默认值</p>
|
<p class="txt">本页面涉及排错,请检查修改默认值</p>
|
||||||
<div class="ip_setting">
|
<div class="ip_setting">
|
||||||
|
@ -203,6 +204,15 @@ export default {
|
||||||
ippz_mrwg: "",
|
ippz_mrwg: "",
|
||||||
ippz_dns_zy: "",
|
ippz_dns_zy: "",
|
||||||
ippz_dns_by: "",
|
ippz_dns_by: "",
|
||||||
|
dkpz_btl: "",
|
||||||
|
dkpz_sjw: "",
|
||||||
|
dkpz_jyw: "",
|
||||||
|
dkpz_tzw: "",
|
||||||
|
dkpz_lkms: "",
|
||||||
|
dkpz_dbcd: "",
|
||||||
|
dkpz_dbsj: "",
|
||||||
|
dkpz_tbbtl: "",
|
||||||
|
dkpz_snckxtb: "",
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
ippz_ip_hqfs: [
|
ippz_ip_hqfs: [
|
||||||
|
@ -302,16 +312,15 @@ export default {
|
||||||
this.ippz_dns_by3,
|
this.ippz_dns_by3,
|
||||||
this.ippz_dns_by4
|
this.ippz_dns_by4
|
||||||
);
|
);
|
||||||
let datas = sessionStorage.getItem("CKFWQ_yx");
|
|
||||||
datas = { ...JSON.parse(datas), ...this.ruleForm };
|
|
||||||
let res = await SaveUserAnswer({
|
let res = await SaveUserAnswer({
|
||||||
mark: "CKFWQ_yx",
|
mark: "CKFWQ_yx",
|
||||||
user_id: this.user_id,
|
user_id: this.user_id,
|
||||||
// user_id: "USER202307301109254198",
|
// user_id: "USER202307301109254198",
|
||||||
mark_value: JSON.stringify(datas),
|
mark_value: JSON.stringify(this.ruleForm),
|
||||||
});
|
});
|
||||||
|
console.log(this.ruleForm);
|
||||||
if (res.data.state) {
|
if (res.data.state) {
|
||||||
sessionStorage.setItem("CKFWQ_yx", JSON.stringify(datas));
|
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "保存成功",
|
message: "保存成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -327,12 +336,9 @@ export default {
|
||||||
user_id: this.user_id,
|
user_id: this.user_id,
|
||||||
// user_id: "USER202307301109254198",
|
// user_id: "USER202307301109254198",
|
||||||
});
|
});
|
||||||
console.log(answers.data);
|
|
||||||
if (answers.data.data && answers.data.state) {
|
if (answers.data.data && answers.data.state) {
|
||||||
let obj = JSON.parse(answers.data.data.mark_value);
|
let obj = JSON.parse(answers.data.data.mark_value);
|
||||||
console.log(obj);
|
console.log(obj.ippz_dns_hqfs);
|
||||||
this.ruleForm.ippz_ip_hqfs = obj.ippz_ip_hqfs;
|
|
||||||
this.ruleForm.ippz_dns_hqfs = obj.ippz_dns_hqfs;
|
|
||||||
if (obj.ippz_ip) {
|
if (obj.ippz_ip) {
|
||||||
this.ippz_ip1 = obj.ippz_ip.split(".")[0];
|
this.ippz_ip1 = obj.ippz_ip.split(".")[0];
|
||||||
this.ippz_ip2 = obj.ippz_ip.split(".")[1];
|
this.ippz_ip2 = obj.ippz_ip.split(".")[1];
|
||||||
|
@ -354,6 +360,17 @@ export default {
|
||||||
this.ippz_dns_by2 = obj.ippz_dns_by.split(".")[1];
|
this.ippz_dns_by2 = obj.ippz_dns_by.split(".")[1];
|
||||||
this.ippz_dns_by3 = obj.ippz_dns_by.split(".")[2];
|
this.ippz_dns_by3 = obj.ippz_dns_by.split(".")[2];
|
||||||
this.ippz_dns_by4 = obj.ippz_dns_by.split(".")[3];
|
this.ippz_dns_by4 = obj.ippz_dns_by.split(".")[3];
|
||||||
|
this.ruleForm.ippz_ip_hqfs = obj.ippz_ip_hqfs;
|
||||||
|
this.ruleForm.ippz_dns_hqfs = obj.ippz_dns_hqfs;
|
||||||
|
this.ruleForm.dkpz_btl = obj.dkpz_btl;
|
||||||
|
this.ruleForm.dkpz_sjw = obj.dkpz_sjw;
|
||||||
|
this.ruleForm.dkpz_jyw = obj.dkpz_jyw;
|
||||||
|
this.ruleForm.dkpz_tzw = obj.dkpz_tzw;
|
||||||
|
this.ruleForm.dkpz_lkms = obj.dkpz_lkms;
|
||||||
|
this.ruleForm.dkpz_dbcd = obj.dkpz_dbcd;
|
||||||
|
this.ruleForm.dkpz_dbsj = obj.dkpz_dbsj;
|
||||||
|
this.ruleForm.dkpz_tbbtl = obj.dkpz_tbbtl;
|
||||||
|
this.ruleForm.dkpz_snckxtb = obj.dkpz_snckxtb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
|
@ -16,14 +16,14 @@
|
||||||
class="demo-ruleForm"
|
class="demo-ruleForm"
|
||||||
:label-position="labelPosition"
|
:label-position="labelPosition"
|
||||||
>
|
>
|
||||||
<el-form-item label="开启网口:" prop="kqwk">
|
<el-form-item label="开启网口:" prop="ytwgn_kqwk">
|
||||||
<el-select v-model="ruleForm.kqwk">
|
<el-select v-model="ruleForm.ytwgn_kqwk">
|
||||||
<el-option label="开启" value="开启"></el-option>
|
<el-option label="开启" value="开启"></el-option>
|
||||||
<el-option label="关闭" value="关闭"></el-option>
|
<el-option label="关闭" value="关闭"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="网口工作方式:" prop="wkgzfs">
|
<el-form-item label="网口工作方式:" prop="ytwgn_wkgzfs">
|
||||||
<el-select v-model="ruleForm.wkgzfs">
|
<el-select v-model="ruleForm.ytwgn_wkgzfs">
|
||||||
<el-option label="LAN口" value="LAN口"></el-option>
|
<el-option label="LAN口" value="LAN口"></el-option>
|
||||||
<el-option label="WAN口" value="WAN口"></el-option>
|
<el-option label="WAN口" value="WAN口"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -39,8 +39,8 @@
|
||||||
class="demo-ruleForm"
|
class="demo-ruleForm"
|
||||||
:label-position="labelPosition"
|
:label-position="labelPosition"
|
||||||
>
|
>
|
||||||
<el-form-item label="网口模式:" prop="wkms">
|
<el-form-item label="网口模式:" prop="wkmssz_wkms">
|
||||||
<el-select v-model="ruleForm.wkms">
|
<el-select v-model="ruleForm.wkmssz_wkms">
|
||||||
<el-option label="n" value="n"></el-option>
|
<el-option label="n" value="n"></el-option>
|
||||||
<el-option label="z" value="z"></el-option>
|
<el-option label="z" value="z"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -49,7 +49,6 @@
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">保存</el-button>
|
<el-button type="primary" @click="submitForm">保存</el-button>
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
<el-button @click="change">改变</el-button>
|
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
@ -65,15 +64,33 @@ export default {
|
||||||
user_id: "",
|
user_id: "",
|
||||||
loading: false,
|
loading: false,
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
kqwk: "开启",
|
ckcssz_btl: "",
|
||||||
wkgzfs: "LAN口",
|
ckcssz_jyw: "",
|
||||||
wkms: "n",
|
ckcssz_lk: "",
|
||||||
|
ckcssz_zdybtl: "",
|
||||||
|
ckcssz_sjw: "",
|
||||||
|
ckcssz_tzw: "",
|
||||||
|
ckcssz_485: "",
|
||||||
|
qtsz_ckzdcz: "",
|
||||||
|
qtsz_zcblx: "",
|
||||||
|
qtsz_zdyxtb: "",
|
||||||
|
qtsz_tjzffgn: "",
|
||||||
|
ytwgn_kqwk: "",
|
||||||
|
ytwgn_wkgzfs: "",
|
||||||
|
wkmssz_wkms: "",
|
||||||
|
wxpz_gzms: "",
|
||||||
|
wxpz_wlmc: "",
|
||||||
|
wxpz_mac: "",
|
||||||
|
wxpz_jmms: "",
|
||||||
|
wxpz_jmsf: "",
|
||||||
|
wxpz_mm: "",
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
kqwk: [{ required: true, trigger: "change", message: "必填项" }],
|
ytwgn_kqwk: [{ required: true, trigger: "change", message: "必填项" }],
|
||||||
wkgzfs: [{ required: true, trigger: "change", message: "必填项" }],
|
ytwgn_wkgzfs: [
|
||||||
wkms: [{ required: true, trigger: "change", message: "必填项" }],
|
{ required: true, trigger: "change", message: "必填项" },
|
||||||
|
],
|
||||||
|
wkmssz_wkms: [{ required: true, trigger: "change", message: "必填项" }],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -82,26 +99,15 @@ export default {
|
||||||
this.GetUserAnswer();
|
this.GetUserAnswer();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getParameter(data) {
|
|
||||||
console.log(data);
|
|
||||||
this.user_id = data;
|
|
||||||
},
|
|
||||||
change() {
|
|
||||||
this.$set(answer, "kqwk", "11111111");
|
|
||||||
},
|
|
||||||
async saveDatas() {
|
async saveDatas() {
|
||||||
let datas = JSON.parse(sessionStorage.getItem("CKFWQ_wx"));
|
|
||||||
let res = await SaveUserAnswer({
|
let res = await SaveUserAnswer({
|
||||||
mark: "CKFWQ_wx",
|
mark: "CKFWQ_wx",
|
||||||
user_id: `${this.user_id}`,
|
user_id: `${this.user_id}`,
|
||||||
mark_value: JSON.stringify(datas),
|
// user_id: "USER202307301109254198",
|
||||||
|
mark_value: JSON.stringify(this.ruleForm),
|
||||||
});
|
});
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.data.state) {
|
if (res.data.state) {
|
||||||
sessionStorage.setItem(
|
|
||||||
"CKFWQ_wx",
|
|
||||||
JSON.stringify({ ...datas, ...this.ruleForm })
|
|
||||||
);
|
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "保存成功",
|
message: "保存成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -115,12 +121,30 @@ export default {
|
||||||
let res = await GetUserAnswer({
|
let res = await GetUserAnswer({
|
||||||
mark: "CKFWQ_wx",
|
mark: "CKFWQ_wx",
|
||||||
user_id: this.user_id,
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301109254198",
|
||||||
});
|
});
|
||||||
if (JSON.parse(res.data.data.mark_value) && res.data.state) {
|
if (JSON.parse(res.data.data.mark_value) && res.data.state) {
|
||||||
var obj = JSON.parse(res.data.data.mark_value);
|
var obj = JSON.parse(res.data.data.mark_value);
|
||||||
this.ruleForm.kqwk = obj.kqwk;
|
this.ruleForm.ytwgn_kqwk = obj.ytwgn_kqwk;
|
||||||
this.ruleForm.wkgzfs = obj.wkgzfs;
|
this.ruleForm.ytwgn_wkgzfs = obj.ytwgn_wkgzfs;
|
||||||
this.ruleForm.wkms = obj.wkms;
|
this.ruleForm.wkmssz_wkms = obj.wkmssz_wkms;
|
||||||
|
this.ruleForm.ckcssz_btl = obj.ckcssz_btl;
|
||||||
|
this.ruleForm.ckcssz_jyw = obj.ckcssz_jyw;
|
||||||
|
this.ruleForm.ckcssz_lk = obj.ckcssz_lk;
|
||||||
|
this.ruleForm.ckcssz_zdybtl = obj.ckcssz_zdybtl;
|
||||||
|
this.ruleForm.ckcssz_sjw = obj.ckcssz_sjw;
|
||||||
|
this.ruleForm.ckcssz_tzw = obj.ckcssz_tzw;
|
||||||
|
this.ruleForm.ckcssz_485 = obj.ckcssz_485;
|
||||||
|
this.ruleForm.qtsz_ckzdcz = obj.qtsz_ckzdcz;
|
||||||
|
this.ruleForm.qtsz_zcblx = obj.qtsz_zdyxtb;
|
||||||
|
this.ruleForm.qtsz_zdyxtb = obj.qtsz_zdyxtb;
|
||||||
|
this.ruleForm.qtsz_tjzffgn = obj.qtsz_tjzffgn;
|
||||||
|
this.ruleForm.wxpz_gzms = obj.wxpz_gzms;
|
||||||
|
this.ruleForm.wxpz_wlmc = obj.wxpz_wlmc;
|
||||||
|
this.ruleForm.wxpz_mac = obj.wxpz_mac;
|
||||||
|
this.ruleForm.wxpz_jmms = obj.wxpz_jmms;
|
||||||
|
this.ruleForm.wxpz_jmsf = obj.wxpz_jmsf;
|
||||||
|
this.ruleForm.wxpz_mm = obj.wxpz_mm;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submitForm(formName) {
|
submitForm(formName) {
|
||||||
|
|
|
@ -167,6 +167,28 @@ export default {
|
||||||
wlgl_ww_zwym2: "",
|
wlgl_ww_zwym2: "",
|
||||||
wlgl_ww_zwym3: "",
|
wlgl_ww_zwym3: "",
|
||||||
wlgl_ww_zwym4: "",
|
wlgl_ww_zwym4: "",
|
||||||
|
dxgl: [],
|
||||||
|
clgl_name: "",
|
||||||
|
clgl_xy: "",
|
||||||
|
clgl_gzms: "",
|
||||||
|
clgl_ydx: "",
|
||||||
|
clgl_ydk: "",
|
||||||
|
clgl_mddx: "",
|
||||||
|
clgl_mddk: "",
|
||||||
|
clgl_rkwg: "",
|
||||||
|
clgl_rkwk: "",
|
||||||
|
clgl_rkip: "",
|
||||||
|
clgl_dldk: "",
|
||||||
|
clgl_ckwg: "",
|
||||||
|
clgl_ckwk: "",
|
||||||
|
clgl_ckip: "",
|
||||||
|
clgl_wdyml: "",
|
||||||
|
cmdlist_ml: "",
|
||||||
|
cmdlist_sbid: "",
|
||||||
|
cmdlist_qsdz: "",
|
||||||
|
cmdlist_dzcd: "",
|
||||||
|
cmdlist_ms: "",
|
||||||
|
cmdlist_dz: "",
|
||||||
options1: [
|
options1: [
|
||||||
{
|
{
|
||||||
label: "有线区网闸(内网)",
|
label: "有线区网闸(内网)",
|
||||||
|
@ -253,14 +275,37 @@ export default {
|
||||||
this.wlgl_ww_zwym3 +
|
this.wlgl_ww_zwym3 +
|
||||||
"." +
|
"." +
|
||||||
this.wlgl_ww_zwym4,
|
this.wlgl_ww_zwym4,
|
||||||
|
dxgl: this.dxgl,
|
||||||
|
clgl_name: this.clgl_name,
|
||||||
|
clgl_xy: this.clgl_xy,
|
||||||
|
clgl_gzms: this.clgl_gzms,
|
||||||
|
clgl_ydx: this.clgl_ydx,
|
||||||
|
clgl_ydk: this.clgl_ydk,
|
||||||
|
clgl_mddx: this.clgl_mddx,
|
||||||
|
clgl_mddk: this.clgl_mddk,
|
||||||
|
clgl_rkwg: this.clgl_rkwg,
|
||||||
|
clgl_rkwk: this.clgl_rkwk,
|
||||||
|
clgl_rkip: this.clgl_ckip,
|
||||||
|
clgl_dldk: this.clgl_dldk,
|
||||||
|
clgl_ckwg: this.clgl_ckwg,
|
||||||
|
clgl_ckwk: this.clgl_rkwk,
|
||||||
|
clgl_ckip: this.clgl_ckip,
|
||||||
|
clgl_wdyml: this.clgl_wdyml,
|
||||||
|
cmdlist_ml: this.cmdlist_ml,
|
||||||
|
cmdlist_sbid: this.cmdlist_sbid,
|
||||||
|
cmdlist_qsdz: this.cmdlist_qsdz,
|
||||||
|
cmdlist_dzcd: this.cmdlist_dzcd,
|
||||||
|
cmdlist_ms: this.cmdlist_ms,
|
||||||
|
cmdlist_dz: this.cmdlist_dz,
|
||||||
};
|
};
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: `${this.$store.state.type}`,
|
mark: this.$store.state.type,
|
||||||
user_id: `${this.user_id}`,
|
user_id: this.user_id,
|
||||||
|
// mark: "GYWZ_yx",
|
||||||
|
// user_id: "USER202307301109254198",
|
||||||
mark_value: JSON.stringify(obj),
|
mark_value: JSON.stringify(obj),
|
||||||
});
|
});
|
||||||
if (data.state) {
|
if (data.state) {
|
||||||
sessionStorage.setItem("GYWZ_yx", JSON.stringify(obj));
|
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "保存成功",
|
message: "保存成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -272,12 +317,15 @@ export default {
|
||||||
//拿缓存
|
//拿缓存
|
||||||
async GetUserAnswer() {
|
async GetUserAnswer() {
|
||||||
var { data } = await GetUserAnswer({
|
var { data } = await GetUserAnswer({
|
||||||
mark: `${this.$store.state.type}`,
|
mark: this.$store.state.type,
|
||||||
user_id: `${this.user_id}`,
|
user_id: this.user_id,
|
||||||
|
// mark: "GYWZ_yx",
|
||||||
|
// user_id: "USER202307301109254198",
|
||||||
});
|
});
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if (data.data && data.state) {
|
if (data.data && data.state) {
|
||||||
let res = JSON.parse(data.data.mark_value);
|
let res = JSON.parse(data.data.mark_value);
|
||||||
|
console.log(res);
|
||||||
this.tableData[0].wlgl_nw_name = res.wlgl_nw_name;
|
this.tableData[0].wlgl_nw_name = res.wlgl_nw_name;
|
||||||
this.wlgl_nw_ip1 = res.wlgl_nw_ip.split(".")[0];
|
this.wlgl_nw_ip1 = res.wlgl_nw_ip.split(".")[0];
|
||||||
this.wlgl_nw_ip2 = res.wlgl_nw_ip.split(".")[1];
|
this.wlgl_nw_ip2 = res.wlgl_nw_ip.split(".")[1];
|
||||||
|
@ -296,6 +344,28 @@ export default {
|
||||||
this.wlgl_ww_zwym2 = res.wlgl_ww_zwym.split(".")[1];
|
this.wlgl_ww_zwym2 = res.wlgl_ww_zwym.split(".")[1];
|
||||||
this.wlgl_ww_zwym3 = res.wlgl_ww_zwym.split(".")[2];
|
this.wlgl_ww_zwym3 = res.wlgl_ww_zwym.split(".")[2];
|
||||||
this.wlgl_ww_zwym4 = res.wlgl_ww_zwym.split(".")[3];
|
this.wlgl_ww_zwym4 = res.wlgl_ww_zwym.split(".")[3];
|
||||||
|
this.dxgl = res.dxgl;
|
||||||
|
this.clgl_name = res.clgl_name;
|
||||||
|
this.clgl_xy = res.clgl_xy;
|
||||||
|
this.clgl_gzms = res.clgl_gzms;
|
||||||
|
this.clgl_ydx = res.clgl_ydx;
|
||||||
|
this.clgl_ydk = res.clgl_ydk;
|
||||||
|
this.clgl_mddx = res.clgl_mddx;
|
||||||
|
this.clgl_mddk = res.clgl_mddk;
|
||||||
|
this.clgl_rkwg = res.clgl_rkwg;
|
||||||
|
this.clgl_rkwk = res.clgl_rkwk;
|
||||||
|
this.clgl_rkip = res.clgl_rkip;
|
||||||
|
this.clgl_dldk = res.clgl_dldk;
|
||||||
|
this.clgl_ckwg = res.clgl_ckwg;
|
||||||
|
this.clgl_ckwk = res.clgl_ckwk;
|
||||||
|
this.clgl_ckip = res.clgl_ckip;
|
||||||
|
this.clgl_wdyml = res.clgl_wdyml;
|
||||||
|
this.cmdlist_ml = res.cmdlist_ml;
|
||||||
|
this.cmdlist_sbid = res.cmdlist_sbid;
|
||||||
|
this.cmdlist_qsdz = res.cmdlist_qsdz;
|
||||||
|
this.cmdlist_dzcd = res.cmdlist_dzcd;
|
||||||
|
this.cmdlist_ms = res.cmdlist_ms;
|
||||||
|
this.cmdlist_dz = res.cmdlist_dz;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -104,7 +104,6 @@ export default {
|
||||||
user_id: "",
|
user_id: "",
|
||||||
dialogVisible1: false,
|
dialogVisible1: false,
|
||||||
labelPosition: "left",
|
labelPosition: "left",
|
||||||
dxgl: [],
|
|
||||||
ip1: "",
|
ip1: "",
|
||||||
ip2: "",
|
ip2: "",
|
||||||
ip3: "",
|
ip3: "",
|
||||||
|
@ -129,6 +128,37 @@ export default {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
json: {},
|
json: {},
|
||||||
|
wlgl_nw_name: "",
|
||||||
|
wlgl_nw_ip: "",
|
||||||
|
wlgl_nw_zwym: "",
|
||||||
|
wlgl_ww_name: "",
|
||||||
|
wlgl_ww_ip: "",
|
||||||
|
wlgl_ww_zwym: "",
|
||||||
|
|
||||||
|
dxgl: [],
|
||||||
|
clgl_name: "",
|
||||||
|
clgl_xy: "",
|
||||||
|
clgl_gzms: "",
|
||||||
|
clgl_ydx: "",
|
||||||
|
clgl_ydk: "",
|
||||||
|
|
||||||
|
clgl_mddx: "",
|
||||||
|
clgl_mddk: "",
|
||||||
|
clgl_rkwg: "",
|
||||||
|
clgl_rkwk: "",
|
||||||
|
clgl_rkip: "",
|
||||||
|
clgl_dldk: "",
|
||||||
|
clgl_ckwg: "",
|
||||||
|
clgl_ckwk: "",
|
||||||
|
clgl_ckip: "",
|
||||||
|
clgl_wdyml: "",
|
||||||
|
|
||||||
|
cmdlist_ml: "",
|
||||||
|
cmdlist_sbid: "",
|
||||||
|
cmdlist_qsdz: "",
|
||||||
|
cmdlist_dzcd: "",
|
||||||
|
cmdlist_ms: "",
|
||||||
|
cmdlist_dz: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -178,15 +208,46 @@ export default {
|
||||||
iplx: this.ruleForm.iplx,
|
iplx: this.ruleForm.iplx,
|
||||||
ip: this.ip1 + "." + this.ip2 + "." + this.ip3 + "." + this.ip4,
|
ip: this.ip1 + "." + this.ip2 + "." + this.ip3 + "." + this.ip4,
|
||||||
});
|
});
|
||||||
var json = JSON.parse(sessionStorage.getItem(this.$store.state.type));
|
|
||||||
|
|
||||||
|
let obj = {
|
||||||
|
wlgl_nw_name: this.wlgl_nw_name,
|
||||||
|
wlgl_nw_ip: this.wlgl_ww_ip,
|
||||||
|
wlgl_nw_zwym: this.wlgl_nw_zwym,
|
||||||
|
wlgl_ww_name: this.wlgl_ww_name,
|
||||||
|
wlgl_ww_ip: this.wlgl_ww_ip,
|
||||||
|
wlgl_ww_zwym: this.wlgl_ww_zwym,
|
||||||
|
|
||||||
|
dxgl: this.dxgl,
|
||||||
|
clgl_name: this.clgl_name,
|
||||||
|
clgl_xy: this.clgl_xy,
|
||||||
|
clgl_gzms: this.clgl_gzms,
|
||||||
|
clgl_ydx: this.clgl_ydk,
|
||||||
|
clgl_ydk: this.clgl_ydk,
|
||||||
|
|
||||||
|
clgl_mddx: this.clgl_mddk,
|
||||||
|
clgl_mddk: this.clgl_mddk,
|
||||||
|
clgl_rkwg: this.clgl_rkwg,
|
||||||
|
clgl_rkwk: this.clgl_ckwk,
|
||||||
|
clgl_rkip: this.clgl_rkip,
|
||||||
|
clgl_dldk: this.clgl_dldk,
|
||||||
|
clgl_ckwg: this.clgl_ckwg,
|
||||||
|
clgl_ckwk: this.clgl_ckwk,
|
||||||
|
clgl_ckip: this.clgl_ckip,
|
||||||
|
clgl_wdyml: this.clgl_wdyml,
|
||||||
|
|
||||||
|
cmdlist_ml: this.cmdlist_ml,
|
||||||
|
cmdlist_sbid: this.cmdlist_sbid,
|
||||||
|
cmdlist_qsdz: this.cmdlist_qsdz,
|
||||||
|
cmdlist_dzcd: this.cmdlist_dzcd,
|
||||||
|
cmdlist_ms: this.cmdlist_ms,
|
||||||
|
cmdlist_dz: this.cmdlist_dz,
|
||||||
|
};
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: `${this.$store.state.type}`,
|
mark: this.$store.state.type,
|
||||||
// mark: "GYWZ_yx",
|
|
||||||
user_id: this.user_id,
|
user_id: this.user_id,
|
||||||
|
// mark: "GYWZ_yx",
|
||||||
// user_id: "USER202307301109254198",
|
// user_id: "USER202307301109254198",
|
||||||
|
mark_value: JSON.stringify(obj),
|
||||||
mark_value: JSON.stringify({ ...json, ...{ dxgl: this.dxgl } }),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (data.state) {
|
if (data.state) {
|
||||||
|
@ -215,28 +276,88 @@ export default {
|
||||||
async GetUserAnswer() {
|
async GetUserAnswer() {
|
||||||
let { data } = await GetUserAnswer({
|
let { data } = await GetUserAnswer({
|
||||||
mark: `${this.$store.state.type}`,
|
mark: `${this.$store.state.type}`,
|
||||||
// mark: "GYWZ_yx",
|
|
||||||
user_id: this.user_id,
|
user_id: this.user_id,
|
||||||
|
// mark: "GYWZ_yx",
|
||||||
// user_id: "USER202307301109254198",
|
// user_id: "USER202307301109254198",
|
||||||
});
|
});
|
||||||
if (data.state && data.data) {
|
if (data.state && data.data) {
|
||||||
console.log(JSON.parse(data.data.mark_value).dxgl);
|
console.log(JSON.parse(data.data.mark_value).dxgl);
|
||||||
if (JSON.parse(data.data.mark_value).dxgl) {
|
let res = JSON.parse(data.data.mark_value);
|
||||||
this.dxgl = JSON.parse(data.data.mark_value).dxgl;
|
if (res.dxgl) {
|
||||||
|
this.wlgl_nw_name = res.wlgl_nw_name;
|
||||||
|
this.wlgl_nw_ip = res.wlgl_nw_ip;
|
||||||
|
this.wlgl_nw_zwym = res.wlgl_nw_zwym;
|
||||||
|
this.wlgl_ww_name = res.wlgl_ww_name;
|
||||||
|
this.wlgl_ww_ip = res.wlgl_ww_ip;
|
||||||
|
this.wlgl_ww_zwym = res.wlgl_ww_zwym;
|
||||||
|
this.dxgl = res.dxgl;
|
||||||
|
this.clgl_name = res.clgl_name;
|
||||||
|
this.clgl_xy = res.clgl_xy;
|
||||||
|
this.clgl_gzms = res.clgl_gzms;
|
||||||
|
this.clgl_ydx = res.clgl_ydx;
|
||||||
|
this.clgl_ydk = res.clgl_ydk;
|
||||||
|
this.clgl_mddx = res.clgl_mddx;
|
||||||
|
this.clgl_mddk = res.clgl_mddk;
|
||||||
|
this.clgl_rkwg = res.clgl_rkwg;
|
||||||
|
this.clgl_rkwk = res.clgl_rkwk;
|
||||||
|
this.clgl_rkip = res.clgl_rkip;
|
||||||
|
this.clgl_dldk = res.clgl_dldk;
|
||||||
|
this.clgl_ckwg = res.clgl_ckwg;
|
||||||
|
this.clgl_ckwk = res.clgl_ckwk;
|
||||||
|
this.clgl_ckip = res.clgl_ckip;
|
||||||
|
this.clgl_wdyml = res.clgl_wdyml;
|
||||||
|
this.cmdlist_ml = res.cmdlist_ml;
|
||||||
|
this.cmdlist_sbid = res.cmdlist_sbid;
|
||||||
|
this.cmdlist_qsdz = res.cmdlist_qsdz;
|
||||||
|
this.cmdlist_dzcd = res.cmdlist_dzcd;
|
||||||
|
this.cmdlist_ms = res.cmdlist_ms;
|
||||||
|
this.cmdlist_dz = res.cmdlist_dz;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//删除
|
//删除
|
||||||
async deleteRow(index, rows) {
|
async deleteRow(index, rows) {
|
||||||
var json = JSON.parse(sessionStorage.getItem(this.$store.state.type));
|
|
||||||
var json = JSON.parse(sessionStorage.getItem("GYWZ_yx"));
|
|
||||||
this.dxgl.splice(index, 1);
|
this.dxgl.splice(index, 1);
|
||||||
|
|
||||||
|
let obj = {
|
||||||
|
wlgl_nw_name: this.wlgl_nw_name,
|
||||||
|
wlgl_nw_ip: this.wlgl_ww_ip,
|
||||||
|
wlgl_nw_zwym: this.wlgl_nw_zwym,
|
||||||
|
wlgl_ww_name: this.wlgl_ww_name,
|
||||||
|
wlgl_ww_ip: this.wlgl_ww_ip,
|
||||||
|
wlgl_ww_zwym: this.wlgl_ww_zwym,
|
||||||
|
|
||||||
|
dxgl: this.dxgl,
|
||||||
|
clgl_name: this.clgl_name,
|
||||||
|
clgl_xy: this.clgl_xy,
|
||||||
|
clgl_gzms: this.clgl_gzms,
|
||||||
|
clgl_ydx: this.clgl_ydk,
|
||||||
|
clgl_ydk: this.clgl_ydk,
|
||||||
|
|
||||||
|
clgl_mddx: this.clgl_mddk,
|
||||||
|
clgl_mddk: this.clgl_mddk,
|
||||||
|
clgl_rkwg: this.clgl_rkwg,
|
||||||
|
clgl_rkwk: this.clgl_ckwk,
|
||||||
|
clgl_rkip: this.clgl_rkip,
|
||||||
|
clgl_dldk: this.clgl_dldk,
|
||||||
|
clgl_ckwg: this.clgl_ckwg,
|
||||||
|
clgl_ckwk: this.clgl_ckwk,
|
||||||
|
clgl_ckip: this.clgl_ckip,
|
||||||
|
clgl_wdyml: this.clgl_wdyml,
|
||||||
|
|
||||||
|
cmdlist_ml: this.cmdlist_ml,
|
||||||
|
cmdlist_sbid: this.cmdlist_sbid,
|
||||||
|
cmdlist_qsdz: this.cmdlist_qsdz,
|
||||||
|
cmdlist_dzcd: this.cmdlist_dzcd,
|
||||||
|
cmdlist_ms: this.cmdlist_ms,
|
||||||
|
cmdlist_dz: this.cmdlist_dz,
|
||||||
|
};
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: `${this.$store.state.type}`,
|
mark: `${this.$store.state.type}`,
|
||||||
// mark: "GYWZ_yx",
|
|
||||||
user_id: this.user_id,
|
user_id: this.user_id,
|
||||||
|
// mark: "GYWZ_yx",
|
||||||
// user_id: "USER202307301109254198",
|
// user_id: "USER202307301109254198",
|
||||||
mark_value: JSON.stringify({ ...json, ...{ dxgl: this.dxgl } }),
|
mark_value: JSON.stringify(obj),
|
||||||
});
|
});
|
||||||
console.log(data.data);
|
console.log(data.data);
|
||||||
if (data.state) {
|
if (data.state) {
|
||||||
|
|
|
@ -220,16 +220,19 @@ export default {
|
||||||
// clgl_mddk: "",
|
// clgl_mddk: "",
|
||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
tableData1: [
|
cmdlist_ml: "",
|
||||||
{
|
cmdlist_sbid: "",
|
||||||
cmdlist_ml: "读线圈状态",
|
cmdlist_qsdz: "",
|
||||||
// cmdlist_sbid: "有线区交换机命令",
|
cmdlist_dzcd: "",
|
||||||
cmdlist_qsdz: "0",
|
cmdlist_ms: "",
|
||||||
cmdlist_dzcd: 65535,
|
cmdlist_dz: "",
|
||||||
cmdlist_ms: "有线区交换机命令,允许Modbus(TCP)协议通行",
|
wlgl_nw_name: "",
|
||||||
cmdlist_dz: "允许",
|
wlgl_nw_ip: "",
|
||||||
},
|
wlgl_nw_zwym: "",
|
||||||
],
|
wlgl_ww_name: "",
|
||||||
|
wlgl_ww_ip: "",
|
||||||
|
wlgl_ww_zwym: "",
|
||||||
|
dxgl: [],
|
||||||
ruleForm1: {
|
ruleForm1: {
|
||||||
clgl_name: "有线区策略",
|
clgl_name: "有线区策略",
|
||||||
clgl_xy: ["Modbus(TCP)"],
|
clgl_xy: ["Modbus(TCP)"],
|
||||||
|
@ -246,8 +249,7 @@ export default {
|
||||||
clgl_ckwk: "有线区网闸(外网)",
|
clgl_ckwk: "有线区网闸(外网)",
|
||||||
clgl_ckip: "",
|
clgl_ckip: "",
|
||||||
clgl_wdyml: "拒绝",
|
clgl_wdyml: "拒绝",
|
||||||
dlport: "",
|
clgl_dldk: "",
|
||||||
wdyml: "",
|
|
||||||
},
|
},
|
||||||
rules1: {
|
rules1: {
|
||||||
clgl_name: [{ required: true, trigger: "change" }],
|
clgl_name: [{ required: true, trigger: "change" }],
|
||||||
|
@ -263,21 +265,6 @@ export default {
|
||||||
clgl_mddx: [{ required: true, trigger: "change" }],
|
clgl_mddx: [{ required: true, trigger: "change" }],
|
||||||
clgl_wdyml: [{ required: true, trigger: "change" }],
|
clgl_wdyml: [{ required: true, trigger: "change" }],
|
||||||
},
|
},
|
||||||
ruleForm2: {
|
|
||||||
cmdlist_ml: "有线区交换机命令",
|
|
||||||
cmdlist_sbid: "",
|
|
||||||
cmdlist_qsdz: "",
|
|
||||||
cmdlist_dzcd: "",
|
|
||||||
cmdlist_ms: "",
|
|
||||||
cmdlist_dz: "",
|
|
||||||
},
|
|
||||||
rules2: {
|
|
||||||
cmdlist_ml: [{ required: true, trigger: "change" }],
|
|
||||||
cmdlist_sbid: [{ required: true, trigger: "change" }],
|
|
||||||
cmdlist_qsdz: [{ required: true, trigger: "change" }],
|
|
||||||
cmdlist_dzcd: [{ required: true, trigger: "change" }],
|
|
||||||
cmdlist_dz: [{ required: true, trigger: "change" }],
|
|
||||||
},
|
|
||||||
value: "",
|
value: "",
|
||||||
flag: false,
|
flag: false,
|
||||||
};
|
};
|
||||||
|
@ -295,41 +282,54 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addPolicy() {
|
addPolicy() {
|
||||||
this.$router.push({ name: "addstrategy", query: { id: this.user_id } });
|
this.$router.push({
|
||||||
|
name: "addstrategy",
|
||||||
|
query: { id: this.user_id },
|
||||||
|
});
|
||||||
},
|
},
|
||||||
async del(index, a) {
|
async del(index, a) {
|
||||||
|
this.tableData = [];
|
||||||
|
let newSessObj = {
|
||||||
|
clgl_name: "",
|
||||||
|
clgl_xy: "",
|
||||||
|
clgl_gzms: "",
|
||||||
|
clgl_ydx: "",
|
||||||
|
clgl_ydk: "",
|
||||||
|
clgl_rkwk: "",
|
||||||
|
clgl_rkip: "",
|
||||||
|
clgl_ckip: "",
|
||||||
|
clgl_rkwg: "",
|
||||||
|
clgl_ckwk: "",
|
||||||
|
clgl_dldk: "",
|
||||||
|
clgl_ckwg: "",
|
||||||
|
clgl_mddx: "",
|
||||||
|
clgl_mddk: "",
|
||||||
|
clgl_wdyml: "",
|
||||||
|
cmdlist_ml: this.cmdlist_ml,
|
||||||
|
cmdlist_sbid: this.cmdlist_sbid,
|
||||||
|
cmdlist_qsdz: this.cmdlist_qsdz,
|
||||||
|
cmdlist_dzcd: this.cmdlist_dzcd,
|
||||||
|
cmdlist_ms: this.cmdlist_ms,
|
||||||
|
cmdlist_dz: this.cmdlist_dz,
|
||||||
|
dxgl: this.dxgl,
|
||||||
|
wlgl_nw_name: this.wlgl_nw_name,
|
||||||
|
wlgl_nw_ip: this.wlgl_nw_ip,
|
||||||
|
wlgl_nw_zwym: this.wlgl_nw_zwym,
|
||||||
|
wlgl_ww_name: this.wlgl_ww_name,
|
||||||
|
wlgl_ww_ip: this.wlgl_ww_ip,
|
||||||
|
wlgl_ww_zwym: this.wlgl_ww_zwym,
|
||||||
|
};
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: `${this.$store.state.type}`,
|
mark: this.$store.state.type,
|
||||||
user_id: `${this.user_id}`,
|
user_id: this.user_id,
|
||||||
mark_value: JSON.stringify(
|
// mark: "GYWZ_yx",
|
||||||
localStorage.getItem(this.$store.state.type)
|
// user_id: "USER202307301109254198",
|
||||||
),
|
mark_value: JSON.stringify(newSessObj),
|
||||||
});
|
});
|
||||||
if (data.state) {
|
if (data.state) {
|
||||||
this.tableData.splice(index, 1);
|
this.tableData.splice(index, 1);
|
||||||
var obj = JSON.parse(sessionStorage.getItem(this.$store.state.type));
|
|
||||||
let newSessObj = {
|
|
||||||
clgl_name: "",
|
|
||||||
cmdlist_qsdz: "",
|
|
||||||
clgl_xy: "",
|
|
||||||
clgl_gzms: "",
|
|
||||||
clgl_ydx: "",
|
|
||||||
clgl_ydk: "",
|
|
||||||
clgl_rkwk: "",
|
|
||||||
clgl_rkip: "",
|
|
||||||
clgl_rkwg: "",
|
|
||||||
clgl_ckwk: "",
|
|
||||||
clgl_ckip: "",
|
|
||||||
clgl_ckwg: "",
|
|
||||||
clgl_mddx: "",
|
|
||||||
clgl_mddk: "",
|
|
||||||
};
|
|
||||||
sessionStorage.setItem(
|
|
||||||
this.$store.state.type,
|
|
||||||
JSON.stringify({ ...obj, ...newSessObj })
|
|
||||||
);
|
|
||||||
this.$message({
|
this.$message({
|
||||||
message: data.message,
|
message: "删除成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -338,14 +338,41 @@ export default {
|
||||||
async GetUserAnswer() {
|
async GetUserAnswer() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let { data } = await GetUserAnswer({
|
let { data } = await GetUserAnswer({
|
||||||
mark: `${this.$store.state.type}`,
|
mark: this.$store.state.type,
|
||||||
user_id: `${this.user_id}`,
|
user_id: this.user_id,
|
||||||
|
// mark: "GYWZ_yx",
|
||||||
|
// user_id: "USER202307301109254198",
|
||||||
});
|
});
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (data.data && data.state) {
|
if (data.data && data.state) {
|
||||||
let obj = JSON.parse(data.data.mark_value);
|
let obj = JSON.parse(data.data.mark_value);
|
||||||
|
(this.ruleForm1.clgl_xy = obj.clgl_xy),
|
||||||
|
(this.ruleForm1.clgl_gzms = obj.clgl_gzms),
|
||||||
|
(this.ruleForm1.clgl_ydx = obj.clgl_ydx),
|
||||||
|
(this.ruleForm1.clgl_ydk = obj.clgl_ydk),
|
||||||
|
(this.ruleForm1.clgl_rkwk = obj.clgl_rkwk),
|
||||||
|
(this.ruleForm1.clgl_rkip = obj.clgl_rkip),
|
||||||
|
(this.ruleForm1.clgl_rkwg = obj.clgl_rkwg),
|
||||||
|
(this.ruleForm1.clgl_ckwk = obj.clgl_ckwk),
|
||||||
|
(this.ruleForm1.clgl_ckip = obj.clgl_ckip),
|
||||||
|
(this.ruleForm1.clgl_ckwg = obj.clgl_ckwg),
|
||||||
|
(this.ruleForm1.clgl_mddx = obj.clgl_mddx),
|
||||||
|
(this.ruleForm1.clgl_mddk = obj.clgl_mddk),
|
||||||
|
(this.ruleForm1.clgl_dldk = obj.clgl_dldk),
|
||||||
|
(this.dxgl = obj.dxgl),
|
||||||
|
(this.wlgl_nw_name = obj.wlgl_nw_name),
|
||||||
|
(this.wlgl_nw_ip = obj.wlgl_nw_ip),
|
||||||
|
(this.wlgl_nw_zwym = obj.wlgl_ww_zwym),
|
||||||
|
(this.wlgl_ww_name = obj.wlgl_ww_name),
|
||||||
|
(this.wlgl_ww_ip = obj.wlgl_ww_ip),
|
||||||
|
(this.wlgl_ww_zwym = obj.wlgl_ww_zwym),
|
||||||
|
(this.cmdlist_ml = obj.cmdlist_ml),
|
||||||
|
(this.cmdlist_sbid = obj.cmdlist_sbid),
|
||||||
|
(this.cmdlist_qsdz = obj.cmdlist_qsdz),
|
||||||
|
(this.cmdlist_dzcd = obj.cmdlist_dzcd),
|
||||||
|
(this.cmdlist_ms = obj.cmdlist_ms),
|
||||||
|
(this.cmdlist_dz = obj.cmdlist_dz);
|
||||||
if (obj.hasOwnProperty("clgl_name")) {
|
if (obj.hasOwnProperty("clgl_name")) {
|
||||||
console.log(obj.clgl_name);
|
|
||||||
this.tableData = [
|
this.tableData = [
|
||||||
{
|
{
|
||||||
clgl_name: obj.clgl_name,
|
clgl_name: obj.clgl_name,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<!-- <el-button @click="dialogVisible = true">端口配置</el-button> -->
|
|
||||||
<div v-show="dialogVisible" class="tree_menu">
|
<div v-show="dialogVisible" class="tree_menu">
|
||||||
<el-tree
|
<el-tree
|
||||||
:data="datas"
|
:data="datas"
|
||||||
|
@ -148,6 +147,13 @@ export default {
|
||||||
dialogVisible: true,
|
dialogVisible: true,
|
||||||
labelPosition: "left",
|
labelPosition: "left",
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
|
ippz_ip_hqfs: "",
|
||||||
|
ippz_dns_hqfs: "",
|
||||||
|
ippz_ip: "",
|
||||||
|
ippz_zwym: "",
|
||||||
|
ippz_mrwg: "",
|
||||||
|
ippz_dns_zy: "",
|
||||||
|
ippz_dns_by: "",
|
||||||
dkpz_btl: "",
|
dkpz_btl: "",
|
||||||
dkpz_sjw: "8",
|
dkpz_sjw: "8",
|
||||||
dkpz_jyw: "",
|
dkpz_jyw: "",
|
||||||
|
@ -195,17 +201,15 @@ export default {
|
||||||
this.GetUserAnswer();
|
this.GetUserAnswer();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getParameter(data) {
|
|
||||||
console.log(data);
|
|
||||||
this.user_id = data;
|
|
||||||
},
|
|
||||||
async GetUserAnswer() {
|
async GetUserAnswer() {
|
||||||
let { data } = await GetUserAnswer({
|
let { data } = await GetUserAnswer({
|
||||||
mark: "CKFWQ_yx",
|
mark: "CKFWQ_yx",
|
||||||
user_id: `${this.user_id}`,
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301109254198",
|
||||||
});
|
});
|
||||||
if (data.data) {
|
if (data.data) {
|
||||||
let obj = JSON.parse(data.data.mark_value);
|
let obj = JSON.parse(data.data.mark_value);
|
||||||
|
console.log(obj);
|
||||||
this.ruleForm.dkpz_btl = obj.dkpz_btl;
|
this.ruleForm.dkpz_btl = obj.dkpz_btl;
|
||||||
this.ruleForm.dkpz_sjw = obj.dkpz_sjw;
|
this.ruleForm.dkpz_sjw = obj.dkpz_sjw;
|
||||||
this.ruleForm.dkpz_jyw = obj.dkpz_jyw;
|
this.ruleForm.dkpz_jyw = obj.dkpz_jyw;
|
||||||
|
@ -215,19 +219,23 @@ export default {
|
||||||
this.ruleForm.dkpz_dbsj = obj.dkpz_dbsj;
|
this.ruleForm.dkpz_dbsj = obj.dkpz_dbsj;
|
||||||
this.ruleForm.dkpz_tbbtl = obj.dkpz_tbbtl;
|
this.ruleForm.dkpz_tbbtl = obj.dkpz_tbbtl;
|
||||||
this.ruleForm.dkpz_snckxtb = Boolean(obj.dkpz_snckxtb);
|
this.ruleForm.dkpz_snckxtb = Boolean(obj.dkpz_snckxtb);
|
||||||
|
this.ruleForm.ippz_ip_hqfs = obj.ippz_ip_hqfs;
|
||||||
|
this.ruleForm.ippz_dns_hqfs = obj.ippz_dns_hqfs;
|
||||||
|
this.ruleForm.ippz_ip = obj.ippz_ip;
|
||||||
|
this.ruleForm.ippz_zwym = obj.ippz_ip;
|
||||||
|
this.ruleForm.ippz_mrwg = obj.ippz_mrwg;
|
||||||
|
this.ruleForm.ippz_dns_zy = obj.ippz_dns_zy;
|
||||||
|
this.ruleForm.ippz_dns_by = obj.ippz_dns_by;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async savePort() {
|
async savePort() {
|
||||||
this.ruleForm.dkpz_snckxtb = String(Number(this.ruleForm.dkpz_snckxtb));
|
|
||||||
let datas = localStorage.getItem("CKFWQ_yx");
|
|
||||||
datas = { ...JSON.parse(datas), ...this.ruleForm };
|
|
||||||
let { data } = await SaveUserAnswer({
|
let { data } = await SaveUserAnswer({
|
||||||
mark: "CKFWQ_yx",
|
mark: "CKFWQ_yx",
|
||||||
user_id: `${this.user_id}`,
|
// user_id: "USER202307301109254198",
|
||||||
mark_value: JSON.stringify(datas),
|
user_id: this.user_id,
|
||||||
|
mark_value: JSON.stringify(this.ruleForm),
|
||||||
});
|
});
|
||||||
if (data.state) {
|
if (data.state) {
|
||||||
localStorage.setItem("CKFWQ_yx", JSON.stringify(datas));
|
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "保存成功",
|
message: "保存成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
|
|
@ -71,6 +71,20 @@ export default {
|
||||||
wxpz_jmms: "WPA2PSK",
|
wxpz_jmms: "WPA2PSK",
|
||||||
wxpz_jmsf: "AES",
|
wxpz_jmsf: "AES",
|
||||||
wxpz_mm: "",
|
wxpz_mm: "",
|
||||||
|
ckcssz_btl: "",
|
||||||
|
ckcssz_jyw: "",
|
||||||
|
ckcssz_lk: "",
|
||||||
|
ckcssz_zdybtl: "",
|
||||||
|
ckcssz_sjw: "",
|
||||||
|
ckcssz_tzw: "",
|
||||||
|
ckcssz_485: "",
|
||||||
|
qtsz_ckzdcz: "",
|
||||||
|
qtsz_zcblx: "",
|
||||||
|
qtsz_zdyxtb: "",
|
||||||
|
qtsz_tjzffgn: "",
|
||||||
|
ytwgn_kqwk: "",
|
||||||
|
ytwgn_wkgzfs: "",
|
||||||
|
wkmssz_wkms: "",
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
wxpz_gzms: [{ required: true, trigger: "change", message: "必填" }],
|
wxpz_gzms: [{ required: true, trigger: "change", message: "必填" }],
|
||||||
|
@ -88,17 +102,13 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async saveDatas() {
|
async saveDatas() {
|
||||||
let datas = JSON.parse(sessionStorage.getItem("CKFWQ_wx"));
|
|
||||||
let res = await SaveUserAnswer({
|
let res = await SaveUserAnswer({
|
||||||
mark: "CKFWQ_wx",
|
mark: "CKFWQ_wx",
|
||||||
user_id: `${this.user_id}`,
|
user_id: this.user_id,
|
||||||
mark_value: JSON.stringify(datas),
|
// user_id: "USER202307301109254198",
|
||||||
|
mark_value: JSON.stringify(this.ruleForm),
|
||||||
});
|
});
|
||||||
if (res.data.state) {
|
if (res.data.state) {
|
||||||
sessionStorage.setItem(
|
|
||||||
"CKFWQ_wx",
|
|
||||||
JSON.stringify({ ...datas, ...this.ruleForm })
|
|
||||||
);
|
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "保存成功",
|
message: "保存成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -110,14 +120,29 @@ export default {
|
||||||
async GetUserAnswer() {
|
async GetUserAnswer() {
|
||||||
let { data } = await GetUserAnswer({
|
let { data } = await GetUserAnswer({
|
||||||
mark: "CKFWQ_wx",
|
mark: "CKFWQ_wx",
|
||||||
user_id: `${this.user_id}`,
|
user_id: this.user_id,
|
||||||
|
// user_id: "USER202307301109254198",
|
||||||
});
|
});
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if (JSON.parse(data.data.mark_value) && data.state) {
|
if (JSON.parse(data.data.mark_value) && data.state) {
|
||||||
var obj = JSON.parse(data.data.mark_value);
|
var obj = JSON.parse(data.data.mark_value);
|
||||||
|
this.ruleForm.ytwgn_kqwk = obj.ytwgn_kqwk;
|
||||||
|
this.ruleForm.ytwgn_wkgzfs = obj.ytwgn_wkgzfs;
|
||||||
|
this.ruleForm.wkmssz_wkms = obj.wkmssz_wkms;
|
||||||
|
this.ruleForm.ckcssz_btl = obj.ckcssz_btl;
|
||||||
|
this.ruleForm.ckcssz_jyw = obj.ckcssz_jyw;
|
||||||
|
this.ruleForm.ckcssz_lk = obj.ckcssz_lk;
|
||||||
|
this.ruleForm.ckcssz_zdybtl = obj.ckcssz_zdybtl;
|
||||||
|
this.ruleForm.ckcssz_sjw = obj.ckcssz_sjw;
|
||||||
|
this.ruleForm.ckcssz_tzw = obj.ckcssz_tzw;
|
||||||
|
this.ruleForm.ckcssz_485 = obj.ckcssz_485;
|
||||||
|
this.ruleForm.qtsz_ckzdcz = obj.qtsz_ckzdcz;
|
||||||
|
this.ruleForm.qtsz_zcblx = obj.qtsz_zdyxtb;
|
||||||
|
this.ruleForm.qtsz_zdyxtb = obj.qtsz_zdyxtb;
|
||||||
|
this.ruleForm.qtsz_tjzffgn = obj.qtsz_tjzffgn;
|
||||||
this.ruleForm.wxpz_gzms = obj.wxpz_gzms;
|
this.ruleForm.wxpz_gzms = obj.wxpz_gzms;
|
||||||
this.ruleForm.wxpz_wlmc = obj.wxpz_wlmc;
|
this.ruleForm.wxpz_wlmc = obj.wxpz_wlmc;
|
||||||
// this.ruleForm.wxpz_mac = obj.wxpz_mac;
|
this.ruleForm.wxpz_mac = obj.wxpz_mac;
|
||||||
this.ruleForm.wxpz_jmms = obj.wxpz_jmms;
|
this.ruleForm.wxpz_jmms = obj.wxpz_jmms;
|
||||||
this.ruleForm.wxpz_jmsf = obj.wxpz_jmsf;
|
this.ruleForm.wxpz_jmsf = obj.wxpz_jmsf;
|
||||||
this.ruleForm.wxpz_mm = obj.wxpz_mm;
|
this.ruleForm.wxpz_mm = obj.wxpz_mm;
|
||||||
|
|
|
@ -161,6 +161,15 @@ export default {
|
||||||
qtsz_zcblx: "",
|
qtsz_zcblx: "",
|
||||||
qtsz_zdyxtb: "",
|
qtsz_zdyxtb: "",
|
||||||
qtsz_tjzffgn: "",
|
qtsz_tjzffgn: "",
|
||||||
|
ytwgn_kqwk: "",
|
||||||
|
ytwgn_wkgzfs: "",
|
||||||
|
wkmssz_wkms: "",
|
||||||
|
wxpz_gzms: "",
|
||||||
|
wxpz_wlmc: "",
|
||||||
|
wxpz_mac: "",
|
||||||
|
wxpz_jmms: "",
|
||||||
|
wxpz_jmsf: "",
|
||||||
|
wxpz_mm: "",
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
ckcssz_btl: [{ required: true, trigger: "change", message: "必选" }],
|
ckcssz_btl: [{ required: true, trigger: "change", message: "必选" }],
|
||||||
|
@ -181,16 +190,15 @@ export default {
|
||||||
//保存
|
//保存
|
||||||
async saveDatas() {
|
async saveDatas() {
|
||||||
this.Loading = true;
|
this.Loading = true;
|
||||||
let datas = sessionStorage.getItem("CKFWQ_wx");
|
|
||||||
datas = { ...JSON.parse(datas), ...this.ruleForm };
|
|
||||||
let res = await SaveUserAnswer({
|
let res = await SaveUserAnswer({
|
||||||
mark: "CKFWQ_wx",
|
mark: "CKFWQ_wx",
|
||||||
user_id: `${this.user_id}`,
|
user_id: `${this.user_id}`,
|
||||||
mark_value: JSON.stringify(datas),
|
// user_id: "USER202307301109254198",
|
||||||
|
mark_value: JSON.stringify(this.ruleForm),
|
||||||
});
|
});
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.data.state) {
|
if (res.data.state) {
|
||||||
sessionStorage.setItem("CKFWQ_wx", JSON.stringify(datas));
|
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "保存成功",
|
message: "保存成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -204,6 +212,7 @@ export default {
|
||||||
let answers = await GetUserAnswer({
|
let answers = await GetUserAnswer({
|
||||||
mark: "CKFWQ_wx",
|
mark: "CKFWQ_wx",
|
||||||
user_id: `${this.user_id}`,
|
user_id: `${this.user_id}`,
|
||||||
|
// user_id: "USER202307301109254198",
|
||||||
});
|
});
|
||||||
console.log(answers);
|
console.log(answers);
|
||||||
if (answers.data.data && answers.data.state) {
|
if (answers.data.data && answers.data.state) {
|
||||||
|
@ -219,6 +228,15 @@ export default {
|
||||||
this.ruleForm.qtsz_zcblx = obj.qtsz_zcblx;
|
this.ruleForm.qtsz_zcblx = obj.qtsz_zcblx;
|
||||||
this.ruleForm.qtsz_zdyxtb = obj.qtsz_zdyxtb;
|
this.ruleForm.qtsz_zdyxtb = obj.qtsz_zdyxtb;
|
||||||
this.ruleForm.qtsz_tjzffgn = obj.qtsz_tjzffgn;
|
this.ruleForm.qtsz_tjzffgn = obj.qtsz_tjzffgn;
|
||||||
|
this.ruleForm.ytwgn_kqwk = obj.ytwgn_kqwk;
|
||||||
|
this.ruleForm.ytwgn_wkgzfs = obj.ytwgn_wkgzfs;
|
||||||
|
this.ruleForm.wkmssz_wkms = obj.wkmssz_wkms;
|
||||||
|
this.ruleForm.wxpz_gzms = obj.wxpz_gzms;
|
||||||
|
this.ruleForm.wxpz_wlmc = obj.wxpz_wlmc;
|
||||||
|
this.ruleForm.wxpz_mac = obj.wxpz_mac;
|
||||||
|
this.ruleForm.wxpz_jmms = obj.wxpz_jmms;
|
||||||
|
this.ruleForm.wxpz_jmsf = obj.wxpz_jmsf;
|
||||||
|
this.ruleForm.wxpz_mm = obj.wxpz_mm;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//交互方法
|
//交互方法
|
||||||
|
|
|
@ -19,6 +19,7 @@ Vue.prototype.$store = store;
|
||||||
Vue.prototype.$answerObj = answerObj;
|
Vue.prototype.$answerObj = answerObj;
|
||||||
|
|
||||||
Vue.use(ElementUI);
|
Vue.use(ElementUI);
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
router,
|
router,
|
||||||
render: (h) => h(App),
|
render: (h) => h(App),
|
||||||
|
|
|
@ -122,7 +122,7 @@ export default {
|
||||||
// 这两个只要设备连线和设备配置信息对就展示数据;
|
// 这两个只要设备连线和设备配置信息对就展示数据;
|
||||||
this.user_id = window.location.href.split("?")[1].split("|")[0];
|
this.user_id = window.location.href.split("?")[1].split("|")[0];
|
||||||
this.toObj(window.location.href.split("?")[1].split("|")[1]);
|
this.toObj(window.location.href.split("?")[1].split("|")[1]);
|
||||||
alert(this.user_id);
|
alert(window.location.href.split("?")[1]);
|
||||||
|
|
||||||
this.time = this.$moment().format("HH:mm:ss");
|
this.time = this.$moment().format("HH:mm:ss");
|
||||||
this.productChartOption = productChart;
|
this.productChartOption = productChart;
|
||||||
|
@ -142,9 +142,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
//获取三维数据
|
//获取三维数据
|
||||||
toObj(data) {
|
toObj(data) {
|
||||||
const inputString = data;
|
const str = data;
|
||||||
this.user_id = inputString.split("|")[0];
|
|
||||||
let str = inputString.split("|")[1];
|
|
||||||
// 分割成键值对数组
|
// 分割成键值对数组
|
||||||
const keyValuePairs = str.split(";");
|
const keyValuePairs = str.split(";");
|
||||||
keyValuePairs.splice(keyValuePairs.length - 1, 1);
|
keyValuePairs.splice(keyValuePairs.length - 1, 1);
|
||||||
|
@ -263,7 +261,6 @@ export default {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
// background-image: url("../assets/image/图片 2 Copy@1x.png");
|
|
||||||
background-size: cover; /* 图像大小适应容器 */
|
background-size: cover; /* 图像大小适应容器 */
|
||||||
background-repeat: no-repeat; /* 防止图像平铺 */
|
background-repeat: no-repeat; /* 防止图像平铺 */
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
@ -343,31 +340,12 @@ export default {
|
||||||
margin-left: 45px;
|
margin-left: 45px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
// .mainshaftChart {
|
|
||||||
// margin-left: 45px;
|
|
||||||
// margin-top: 45px;
|
|
||||||
// position: relative;
|
|
||||||
// }
|
|
||||||
.loadChart {
|
.loadChart {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 45px;
|
right: 45px;
|
||||||
top: 180px;
|
top: 180px;
|
||||||
}
|
}
|
||||||
// .ratedChart {
|
|
||||||
// position: absolute;
|
|
||||||
// right: 45px;
|
|
||||||
// top: 533px;
|
|
||||||
// }
|
|
||||||
// .one {
|
|
||||||
// position: absolute;
|
|
||||||
// right: 560px;
|
|
||||||
// top: 533px;
|
|
||||||
// }
|
|
||||||
// .two {
|
|
||||||
// position: absolute;
|
|
||||||
// left: 560px;
|
|
||||||
// top: 533px;
|
|
||||||
// }
|
|
||||||
.chartsDiv {
|
.chartsDiv {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
|
@ -5,25 +5,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import GatewayConfiguration from '@/components/GatewayConfiguration.vue';
|
import GatewayConfiguration from "@/components/GatewayConfiguration.vue";
|
||||||
export default {
|
export default {
|
||||||
name: 'InternetCompetitionNtConfig',
|
name: "InternetCompetitionNtConfig",
|
||||||
components: {
|
components: {
|
||||||
GatewayConfiguration
|
GatewayConfiguration,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {};
|
||||||
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {},
|
||||||
|
|
||||||
},
|
methods: {},
|
||||||
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue