Compare commits

..

No commits in common. "466e58e82b6b3354670c6f52be2d4bee0cc544b4" and "94980033be7571f50cc999da61a15e9551d3324c" have entirely different histories.

11 changed files with 111 additions and 83 deletions

View File

@ -28,19 +28,12 @@
<el-button @click="select">筛选</el-button> <el-button @click="select">筛选</el-button>
</div> --> </div> -->
</div> </div>
<el-table <el-table ref="multipleTable" :data="wgpz" border style="margin-top: 10px; width: 100%" tooltip-effect="dark"
ref="multipleTable" @selection-change="handleSelectionChange">
:data="wgpz"
border
style="margin-top: 10px; width: 100%"
tooltip-effect="dark"
@selection-change="handleSelectionChange"
>
<el-table-column label="序号"> <el-table-column label="序号">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
</template></el-table-column </template></el-table-column>
>
<el-table-column type="selection" width="40"> </el-table-column> <el-table-column type="selection" width="40"> </el-table-column>
<el-table-column prop="wgid" label="网关ID"> </el-table-column> <el-table-column prop="wgid" label="网关ID"> </el-table-column>
<el-table-column prop="wgbh" label="网关编号"> </el-table-column> <el-table-column prop="wgbh" label="网关编号"> </el-table-column>
@ -50,46 +43,23 @@
<el-table-column prop="whsj" label="维护时间"> </el-table-column> <el-table-column prop="whsj" label="维护时间"> </el-table-column>
<el-table-column label="修改"> <el-table-column label="修改">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button type="text" size="small" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
type="text" </template></el-table-column>
size="small"
@click="handleDelete(scope.$index, scope.row)"
>删除</el-button
>
</template></el-table-column
>
<el-table-column label="详细"> <el-table-column label="详细">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button type="text" size="small" @click="chakan(scope.$index, scope.row)">查看</el-button>
type="text" </template></el-table-column>
size="small"
@click="chakan(scope.$index, scope.row)"
>查看</el-button
>
</template></el-table-column
>
<el-table-column label="参数配置"> <el-table-column label="参数配置">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button type="text" size="small" @click="$router.push('/ntmaintenance?' + scope.row.wgbh)">参数配置</el-button>
type="text"
size="small"
@click="$router.push('/ntmaintenance?' + scope.row.wgbh)"
>参数配置</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-dialog> </el-dialog>
<el-dialog title="新建网关" :visible.sync="flag"> <el-dialog title="新建网关" :visible.sync="flag">
<el-form <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px" class="demo-ruleForm"
:model="ruleForm" :label-position="labelPosition">
:rules="rules"
ref="ruleForm"
label-width="150px"
class="demo-ruleForm"
:label-position="labelPosition"
>
<el-form-item label="网关类型:" prop="wglx"> <el-form-item label="网关类型:" prop="wglx">
<el-col :span="12"> <el-col :span="12">
<el-select v-model="ruleForm.wglx"> <el-select v-model="ruleForm.wglx">
@ -198,7 +168,11 @@ export default {
// this.wgpz = JSON.parse(localStorage.getItem("wgpz")) || []; // this.wgpz = JSON.parse(localStorage.getItem("wgpz")) || [];
}, },
methods: { methods: {
handleSelectionChange() {}, getParameter(data) {
console.log(data);
this.user_id = data;
},
handleSelectionChange() { },
// //
saveinfo() { saveinfo() {
this.$refs["ruleForm"].validate((valid) => { this.$refs["ruleForm"].validate((valid) => {
@ -276,7 +250,7 @@ export default {
}); });
this.flag = true; this.flag = true;
} else { } else {
this.$message.error("保存失败"); this.$message.error(data.message);
return; return;
} }
}, },

View File

@ -253,10 +253,17 @@ export default {
}; };
}, },
created() { created() {
this.user_id = window.location.href.split("?")[1]; // let that = this;
// window.getParameter = that.getParameter;
this.user_id = this.$route.fullPath.split("?")[1];
this.GetUserAnswer(); this.GetUserAnswer();
// this.tableData = JSON.parse(localStorage.getItem("wgwh")) || [];
}, },
methods: { methods: {
// getParameter(data) {
// console.log(data);
// this.user_id = data;
// },
// //
async GetUserAnswer() { async GetUserAnswer() {
let { data } = await GetUserAnswer({ let { data } = await GetUserAnswer({

View File

@ -167,6 +167,7 @@
<script> <script>
import { SaveUserAnswer, GetUserAnswer } from "@/api/user"; import { SaveUserAnswer, GetUserAnswer } from "@/api/user";
import { isValidPrimaryDNS } from "../validate"; import { isValidPrimaryDNS } from "../validate";
import { Alert } from "element-ui";
export default { export default {
data() { data() {
return { return {
@ -255,6 +256,11 @@ export default {
}; };
}, },
methods: { methods: {
getParameter1(data) {
alert(data, "信息");
console.log(data, "信息");
this.user_id = data;
},
// //
Merge(value, value1, value2, value3, value4) { Merge(value, value1, value2, value3, value4) {
value = value1 + "." + value2 + "." + value3 + "." + value4; value = value1 + "." + value2 + "." + value3 + "." + value4;
@ -267,6 +273,7 @@ export default {
}, },
// , // ,
async saveAll() { async saveAll() {
this.dialogVisible = false;
this.ruleForm.ippz_ip = this.Merge( this.ruleForm.ippz_ip = this.Merge(
this.ruleForm.ippz_ip, this.ruleForm.ippz_ip,
this.ippz_ip1, this.ippz_ip1,
@ -310,6 +317,7 @@ export default {
// user_id: "USER202307301109254198", // user_id: "USER202307301109254198",
mark_value: JSON.stringify(datas), mark_value: JSON.stringify(datas),
}); });
console.log(res);
if (res.data.state) { if (res.data.state) {
sessionStorage.setItem("CKFWQ_yx", JSON.stringify(datas)); sessionStorage.setItem("CKFWQ_yx", JSON.stringify(datas));
this.$message({ this.$message({
@ -317,7 +325,7 @@ export default {
type: "success", type: "success",
}); });
} else { } else {
this.$message.error("保存失败"); this.$message.error(res.data.message);
} }
}, },
async GetUserAnswer() { async GetUserAnswer() {
@ -519,8 +527,13 @@ export default {
}, },
created() { created() {
this.user_id = window.location.href.split("?")[1]; this.user_id = window.location.href.split("?")[1];
alert(this.user_id, "信息111111111111111111111");
console.log(this.user_id, "信息1111111111111111111");
this.GetUserAnswer(); this.GetUserAnswer();
}, },
destroyed() {
window.getParameter = null;
},
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">

View File

@ -81,7 +81,11 @@ export default {
}; };
}, },
created() { created() {
this.user_id = window.location.href.split("?")[1]; // this.$answerObj.kqwk = "";
// console.log(this.$answerObj);
let that = this;
window.getParameter = that;
this.GetUserAnswer(); this.GetUserAnswer();
}, },
methods: { methods: {
@ -112,15 +116,16 @@ export default {
this.dialogVisible = false; this.dialogVisible = false;
console.log({ ...datas, ...this.ruleForm }, "存储"); console.log({ ...datas, ...this.ruleForm }, "存储");
} else { } else {
this.$message.error("保存失败"); this.$message.error(res.data.message);
} }
}, },
// //
async GetUserAnswer() { async GetUserAnswer() {
let res = await GetUserAnswer({ let res = await GetUserAnswer({
mark: "CKFWQ_wx", mark: "CKFWQ_wx",
user_id: this.user_id, user_id: `${this.user_id}`,
}); });
console.log(obj);
if (res.data.data && res.data.state) { if (res.data.data && 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.kqwk = obj.kqwk;

View File

@ -205,17 +205,21 @@ export default {
}; };
}, },
created() { created() {
let str = window.location.href.split("?")[1]; let that = this;
this.user_id = str.split("|")[0]; window.getParameter = that.getParameter;
let type = str.split("|")[1];
if (type == 1) {
this.$store.commit("setType", "GYWZ_yx");
} else {
this.$store.commit("setType", "GYWZ_wx");
}
this.GetUserAnswer(); this.GetUserAnswer();
}, },
methods: { methods: {
getParameter(data) {
console.log(data);
this.user_id = data.split("|")[0];
this.type = data.split("|")[1];
if (data.split("|")[1] == 1) {
this.$store.commit("setType", "GYWZ_yx");
} else {
this.$store.commit("setType", "GYWZ_wx");
}
},
async save() { async save() {
var obj = { var obj = {
wlgl_nw_name: this.tableData[0].wlgl_nw_name, wlgl_nw_name: this.tableData[0].wlgl_nw_name,
@ -266,7 +270,7 @@ export default {
}); });
this.dialogVisible = false; this.dialogVisible = false;
} else { } else {
this.$message.error("保存失败"); this.$message.error(data.message);
} }
}, },
// //

View File

@ -132,17 +132,20 @@ export default {
}; };
}, },
created() { created() {
let str = window.location.href.split("?")[1]; let that = this;
this.user_id = str.split("|")[0]; window.getParameter = that.getParameter;
let type = str.split("|")[1];
if (type == 1) {
this.$store.commit("setType", "GYWZ_yx");
} else {
this.$store.commit("setType", "GYWZ_wx");
}
this.GetUserAnswer(); this.GetUserAnswer();
}, },
methods: { methods: {
getParameter(data) {
console.log(data);
this.user_id = data.split("|")[0];
if (data.split("|")[1] == 1) {
this.$store.commit("setType", "GYWZ_yx");
} else {
this.$store.commit("setType", "GYWZ_wx");
}
},
//ip //ip
validateIpAddress(rule, value, callback) { validateIpAddress(rule, value, callback) {
if (this.ip1 + "." + this.ip2 + "." + this.ip3 + "." + this.ip4 === "") { if (this.ip1 + "." + this.ip2 + "." + this.ip3 + "." + this.ip4 === "") {
@ -201,7 +204,7 @@ export default {
this.dialogVisible1 = false; this.dialogVisible1 = false;
this.GetUserAnswer(); this.GetUserAnswer();
} else { } else {
this.$message.error("保存失败"); this.$message.error(data.message);
} }
}, },
async GetUserAnswer() { async GetUserAnswer() {

View File

@ -283,17 +283,20 @@ export default {
}; };
}, },
created() { created() {
let str = window.location.href.split("?")[1]; let that = this;
this.user_id = str.split("|")[0]; window.getParameter = that.getParameter;
let type = str.split("|")[1];
if (type == 1) {
this.$store.commit("setType", "GYWZ_yx");
} else {
this.$store.commit("setType", "GYWZ_wx");
}
this.GetUserAnswer(); this.GetUserAnswer();
}, },
methods: { methods: {
getParameter(data) {
console.log(data);
this.user_id = data.split("|")[0];
if (data.split("|")[1] == 1) {
this.$store.commit("setType", "GYWZ_yx");
} else {
this.$store.commit("setType", "GYWZ_wx");
}
},
addPolicy() { addPolicy() {
this.$router.push({ name: "addstrategy", query: { id: this.user_id } }); this.$router.push({ name: "addstrategy", query: { id: this.user_id } });
}, },

View File

@ -194,7 +194,8 @@ export default {
}; };
}, },
created() { created() {
this.user_id = window.location.href.split("?")[1]; let that = this;
window.getParameter = that.getParameter;
this.GetUserAnswer(); this.GetUserAnswer();
}, },
methods: { methods: {
@ -236,7 +237,7 @@ export default {
type: "success", type: "success",
}); });
} else { } else {
this.$message.error("保存失败"); this.$message.error(data.message);
} }
}, },
submitForm(formName) { submitForm(formName) {

View File

@ -90,10 +90,15 @@ export default {
}; };
}, },
created() { created() {
this.user_id = window.location.href.split("?")[1]; let that = this;
window.getParameter = that.getParameter;
this.GetUserAnswer(); this.GetUserAnswer();
}, },
methods: { methods: {
getParameter(data) {
console.log(data);
this.user_id = data;
},
async saveDatas() { async saveDatas() {
let datas = JSON.parse(sessionStorage.getItem("CKFWQ_wx")); let datas = JSON.parse(sessionStorage.getItem("CKFWQ_wx"));
let res = await SaveUserAnswer({ let res = await SaveUserAnswer({
@ -112,7 +117,7 @@ export default {
}); });
this.dialogVisible = false; this.dialogVisible = false;
} else { } else {
this.$message.error("保存失败"); this.$message.error(res.data.message);
} }
}, },
async GetUserAnswer() { async GetUserAnswer() {

View File

@ -178,6 +178,11 @@ export default {
}; };
}, },
methods: { methods: {
getParameter2(data) {
alert(data, "信息11");
console.log(data, "信息111111");
this.user_id = data;
},
// //
async saveDatas() { async saveDatas() {
this.Loading = true; this.Loading = true;
@ -197,11 +202,12 @@ export default {
type: "success", type: "success",
}); });
} else { } else {
this.$message.error("保存失败"); this.$message.error(res.data.message);
} }
}, },
// //
async GetUserAnswer() { async GetUserAnswer() {
this.loading = true;
let answers = await GetUserAnswer({ let answers = await GetUserAnswer({
mark: "CKFWQ_wx", mark: "CKFWQ_wx",
user_id: `${this.user_id}`, user_id: `${this.user_id}`,
@ -222,6 +228,7 @@ export default {
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.loading = false;
}, },
// //
@ -238,6 +245,8 @@ export default {
}, },
created() { created() {
this.user_id = window.location.href.split("?")[1]; this.user_id = window.location.href.split("?")[1];
alert(this.user_id, "信息111111111111111111111");
console.log(this.user_id, "信息1111111111111111111");
this.GetUserAnswer(); this.GetUserAnswer();
}, },
}; };

View File

@ -120,10 +120,8 @@ export default {
// 线 - ; // 线 - ;
// 线 - ; // 线 - ;
// 线; // 线;
let that = this;
this.user_id = window.location.href.split("?")[1].split("|")[0]; window.getParameter = that.getParameter;
this.toObj(window.location.href.split("?")[1].split("|")[1]);
this.time = this.$moment().format("HH:mm:ss"); this.time = this.$moment().format("HH:mm:ss");
this.productChartOption = productChart; this.productChartOption = productChart;
this.mainshaftChartOption = mainshaftChart; this.mainshaftChartOption = mainshaftChart;
@ -131,7 +129,9 @@ export default {
this.ratedChartOption = ratedChart; this.ratedChartOption = ratedChart;
this.CuttingSpeedChartOption = CuttingSpeedChart; this.CuttingSpeedChartOption = CuttingSpeedChart;
this.stopChartOption = stopChart; this.stopChartOption = stopChart;
// this.toObj(
// "USER202307301109254198|YXDBWG,False;YXCHWG,True;WXDBWG,False;WXCHWG,False;SerialServerYX,False;SerialServerWX,False;"
// );
this.getClGrade(); this.getClGrade();
this.getJtGrade(); this.getJtGrade();
this.getZzGrade(); this.getZzGrade();
@ -140,6 +140,10 @@ export default {
this.getWxGrade(); this.getWxGrade();
}, },
methods: { methods: {
getParameter(data) {
alert(data);
this.toObj(data);
},
// //
toObj(data) { toObj(data) {
const inputString = data; const inputString = data;