Compare commits
2 Commits
94980033be
...
466e58e82b
| Author | SHA1 | Date |
|---|---|---|
|
|
466e58e82b | |
|
|
2009d3a86f |
|
|
@ -28,12 +28,19 @@
|
|||
<el-button @click="select">筛选</el-button>
|
||||
</div> -->
|
||||
</div>
|
||||
<el-table ref="multipleTable" :data="wgpz" border style="margin-top: 10px; width: 100%" tooltip-effect="dark"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="wgpz"
|
||||
border
|
||||
style="margin-top: 10px; width: 100%"
|
||||
tooltip-effect="dark"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="序号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
</template></el-table-column>
|
||||
</template></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="wgbh" label="网关编号"> </el-table-column>
|
||||
|
|
@ -43,23 +50,46 @@
|
|||
<el-table-column prop="whsj" label="维护时间"> </el-table-column>
|
||||
<el-table-column label="修改">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
</template></el-table-column>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="handleDelete(scope.$index, scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column label="详细">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="chakan(scope.$index, scope.row)">查看</el-button>
|
||||
</template></el-table-column>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="chakan(scope.$index, scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column label="参数配置">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="$router.push('/ntmaintenance?' + scope.row.wgbh)">参数配置</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="$router.push('/ntmaintenance?' + scope.row.wgbh)"
|
||||
>参数配置</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="新建网关" :visible.sync="flag">
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px" class="demo-ruleForm"
|
||||
:label-position="labelPosition">
|
||||
<el-form
|
||||
:model="ruleForm"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
label-width="150px"
|
||||
class="demo-ruleForm"
|
||||
:label-position="labelPosition"
|
||||
>
|
||||
<el-form-item label="网关类型:" prop="wglx">
|
||||
<el-col :span="12">
|
||||
<el-select v-model="ruleForm.wglx">
|
||||
|
|
@ -168,11 +198,7 @@ export default {
|
|||
// this.wgpz = JSON.parse(localStorage.getItem("wgpz")) || [];
|
||||
},
|
||||
methods: {
|
||||
getParameter(data) {
|
||||
console.log(data);
|
||||
this.user_id = data;
|
||||
},
|
||||
handleSelectionChange() { },
|
||||
handleSelectionChange() {},
|
||||
//新建网关保存
|
||||
saveinfo() {
|
||||
this.$refs["ruleForm"].validate((valid) => {
|
||||
|
|
@ -250,7 +276,7 @@ export default {
|
|||
});
|
||||
this.flag = true;
|
||||
} else {
|
||||
this.$message.error(data.message);
|
||||
this.$message.error("保存失败");
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -253,17 +253,10 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
// let that = this;
|
||||
// window.getParameter = that.getParameter;
|
||||
this.user_id = this.$route.fullPath.split("?")[1];
|
||||
this.user_id = window.location.href.split("?")[1];
|
||||
this.GetUserAnswer();
|
||||
// this.tableData = JSON.parse(localStorage.getItem("wgwh")) || [];
|
||||
},
|
||||
methods: {
|
||||
// getParameter(data) {
|
||||
// console.log(data);
|
||||
// this.user_id = data;
|
||||
// },
|
||||
//读缓存
|
||||
async GetUserAnswer() {
|
||||
let { data } = await GetUserAnswer({
|
||||
|
|
|
|||
|
|
@ -167,7 +167,6 @@
|
|||
<script>
|
||||
import { SaveUserAnswer, GetUserAnswer } from "@/api/user";
|
||||
import { isValidPrimaryDNS } from "../validate";
|
||||
import { Alert } from "element-ui";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -256,11 +255,6 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
getParameter1(data) {
|
||||
alert(data, "信息");
|
||||
console.log(data, "信息");
|
||||
this.user_id = data;
|
||||
},
|
||||
// 封装合并输入框的数据
|
||||
Merge(value, value1, value2, value3, value4) {
|
||||
value = value1 + "." + value2 + "." + value3 + "." + value4;
|
||||
|
|
@ -273,7 +267,6 @@ export default {
|
|||
},
|
||||
// 保存数据,发送请求
|
||||
async saveAll() {
|
||||
this.dialogVisible = false;
|
||||
this.ruleForm.ippz_ip = this.Merge(
|
||||
this.ruleForm.ippz_ip,
|
||||
this.ippz_ip1,
|
||||
|
|
@ -317,7 +310,6 @@ export default {
|
|||
// user_id: "USER202307301109254198",
|
||||
mark_value: JSON.stringify(datas),
|
||||
});
|
||||
console.log(res);
|
||||
if (res.data.state) {
|
||||
sessionStorage.setItem("CKFWQ_yx", JSON.stringify(datas));
|
||||
this.$message({
|
||||
|
|
@ -325,7 +317,7 @@ export default {
|
|||
type: "success",
|
||||
});
|
||||
} else {
|
||||
this.$message.error(res.data.message);
|
||||
this.$message.error("保存失败");
|
||||
}
|
||||
},
|
||||
async GetUserAnswer() {
|
||||
|
|
@ -527,13 +519,8 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.user_id = window.location.href.split("?")[1];
|
||||
alert(this.user_id, "信息111111111111111111111");
|
||||
console.log(this.user_id, "信息1111111111111111111");
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
destroyed() {
|
||||
window.getParameter = null;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
|
|
|
|||
|
|
@ -81,11 +81,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
// this.$answerObj.kqwk = "你好";
|
||||
|
||||
// console.log(this.$answerObj);
|
||||
let that = this;
|
||||
window.getParameter = that;
|
||||
this.user_id = window.location.href.split("?")[1];
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -116,16 +112,15 @@ export default {
|
|||
this.dialogVisible = false;
|
||||
console.log({ ...datas, ...this.ruleForm }, "存储");
|
||||
} else {
|
||||
this.$message.error(res.data.message);
|
||||
this.$message.error("保存失败");
|
||||
}
|
||||
},
|
||||
// 拿缓存
|
||||
async GetUserAnswer() {
|
||||
let res = await GetUserAnswer({
|
||||
mark: "CKFWQ_wx",
|
||||
user_id: `${this.user_id}`,
|
||||
user_id: this.user_id,
|
||||
});
|
||||
console.log(obj);
|
||||
if (res.data.data && res.data.state) {
|
||||
var obj = JSON.parse(res.data.data.mark_value);
|
||||
this.ruleForm.kqwk = obj.kqwk;
|
||||
|
|
|
|||
|
|
@ -205,21 +205,17 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
let that = this;
|
||||
window.getParameter = that.getParameter;
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
methods: {
|
||||
getParameter(data) {
|
||||
console.log(data);
|
||||
this.user_id = data.split("|")[0];
|
||||
this.type = data.split("|")[1];
|
||||
if (data.split("|")[1] == 1) {
|
||||
let str = window.location.href.split("?")[1];
|
||||
this.user_id = str.split("|")[0];
|
||||
let type = str.split("|")[1];
|
||||
if (type == 1) {
|
||||
this.$store.commit("setType", "GYWZ_yx");
|
||||
} else {
|
||||
this.$store.commit("setType", "GYWZ_wx");
|
||||
}
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
methods: {
|
||||
async save() {
|
||||
var obj = {
|
||||
wlgl_nw_name: this.tableData[0].wlgl_nw_name,
|
||||
|
|
@ -270,7 +266,7 @@ export default {
|
|||
});
|
||||
this.dialogVisible = false;
|
||||
} else {
|
||||
this.$message.error(data.message);
|
||||
this.$message.error("保存失败");
|
||||
}
|
||||
},
|
||||
//拿缓存
|
||||
|
|
|
|||
|
|
@ -132,20 +132,17 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
let that = this;
|
||||
window.getParameter = that.getParameter;
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
methods: {
|
||||
getParameter(data) {
|
||||
console.log(data);
|
||||
this.user_id = data.split("|")[0];
|
||||
if (data.split("|")[1] == 1) {
|
||||
let str = window.location.href.split("?")[1];
|
||||
this.user_id = str.split("|")[0];
|
||||
let type = str.split("|")[1];
|
||||
if (type == 1) {
|
||||
this.$store.commit("setType", "GYWZ_yx");
|
||||
} else {
|
||||
this.$store.commit("setType", "GYWZ_wx");
|
||||
}
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
methods: {
|
||||
//ip地址验证
|
||||
validateIpAddress(rule, value, callback) {
|
||||
if (this.ip1 + "." + this.ip2 + "." + this.ip3 + "." + this.ip4 === "") {
|
||||
|
|
@ -204,7 +201,7 @@ export default {
|
|||
this.dialogVisible1 = false;
|
||||
this.GetUserAnswer();
|
||||
} else {
|
||||
this.$message.error(data.message);
|
||||
this.$message.error("保存失败");
|
||||
}
|
||||
},
|
||||
async GetUserAnswer() {
|
||||
|
|
|
|||
|
|
@ -283,20 +283,17 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
let that = this;
|
||||
window.getParameter = that.getParameter;
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
methods: {
|
||||
getParameter(data) {
|
||||
console.log(data);
|
||||
this.user_id = data.split("|")[0];
|
||||
if (data.split("|")[1] == 1) {
|
||||
let str = window.location.href.split("?")[1];
|
||||
this.user_id = str.split("|")[0];
|
||||
let type = str.split("|")[1];
|
||||
if (type == 1) {
|
||||
this.$store.commit("setType", "GYWZ_yx");
|
||||
} else {
|
||||
this.$store.commit("setType", "GYWZ_wx");
|
||||
}
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
methods: {
|
||||
addPolicy() {
|
||||
this.$router.push({ name: "addstrategy", query: { id: this.user_id } });
|
||||
},
|
||||
|
|
|
|||
|
|
@ -194,8 +194,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
let that = this;
|
||||
window.getParameter = that.getParameter;
|
||||
this.user_id = window.location.href.split("?")[1];
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -237,7 +236,7 @@ export default {
|
|||
type: "success",
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.message);
|
||||
this.$message.error("保存失败");
|
||||
}
|
||||
},
|
||||
submitForm(formName) {
|
||||
|
|
|
|||
|
|
@ -90,15 +90,10 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
let that = this;
|
||||
window.getParameter = that.getParameter;
|
||||
this.user_id = window.location.href.split("?")[1];
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
methods: {
|
||||
getParameter(data) {
|
||||
console.log(data);
|
||||
this.user_id = data;
|
||||
},
|
||||
async saveDatas() {
|
||||
let datas = JSON.parse(sessionStorage.getItem("CKFWQ_wx"));
|
||||
let res = await SaveUserAnswer({
|
||||
|
|
@ -117,7 +112,7 @@ export default {
|
|||
});
|
||||
this.dialogVisible = false;
|
||||
} else {
|
||||
this.$message.error(res.data.message);
|
||||
this.$message.error("保存失败");
|
||||
}
|
||||
},
|
||||
async GetUserAnswer() {
|
||||
|
|
|
|||
|
|
@ -178,11 +178,6 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
getParameter2(data) {
|
||||
alert(data, "信息11");
|
||||
console.log(data, "信息111111");
|
||||
this.user_id = data;
|
||||
},
|
||||
//保存
|
||||
async saveDatas() {
|
||||
this.Loading = true;
|
||||
|
|
@ -202,12 +197,11 @@ export default {
|
|||
type: "success",
|
||||
});
|
||||
} else {
|
||||
this.$message.error(res.data.message);
|
||||
this.$message.error("保存失败");
|
||||
}
|
||||
},
|
||||
//拿到缓存数据
|
||||
async GetUserAnswer() {
|
||||
this.loading = true;
|
||||
let answers = await GetUserAnswer({
|
||||
mark: "CKFWQ_wx",
|
||||
user_id: `${this.user_id}`,
|
||||
|
|
@ -228,7 +222,6 @@ export default {
|
|||
this.ruleForm.qtsz_zdyxtb = obj.qtsz_zdyxtb;
|
||||
this.ruleForm.qtsz_tjzffgn = obj.qtsz_tjzffgn;
|
||||
}
|
||||
this.loading = false;
|
||||
},
|
||||
//交互方法
|
||||
|
||||
|
|
@ -245,8 +238,6 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.user_id = window.location.href.split("?")[1];
|
||||
alert(this.user_id, "信息111111111111111111111");
|
||||
console.log(this.user_id, "信息1111111111111111111");
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -120,8 +120,10 @@ export default {
|
|||
// 有线串口 - 负载电流;
|
||||
// 无线串口 - 额定电流;
|
||||
// 这两个只要设备连线和设备配置信息对就展示数据;
|
||||
let that = this;
|
||||
window.getParameter = that.getParameter;
|
||||
|
||||
this.user_id = window.location.href.split("?")[1].split("|")[0];
|
||||
this.toObj(window.location.href.split("?")[1].split("|")[1]);
|
||||
|
||||
this.time = this.$moment().format("HH:mm:ss");
|
||||
this.productChartOption = productChart;
|
||||
this.mainshaftChartOption = mainshaftChart;
|
||||
|
|
@ -129,9 +131,7 @@ export default {
|
|||
this.ratedChartOption = ratedChart;
|
||||
this.CuttingSpeedChartOption = CuttingSpeedChart;
|
||||
this.stopChartOption = stopChart;
|
||||
// this.toObj(
|
||||
// "USER202307301109254198|YXDBWG,False;YXCHWG,True;WXDBWG,False;WXCHWG,False;SerialServerYX,False;SerialServerWX,False;"
|
||||
// );
|
||||
|
||||
this.getClGrade();
|
||||
this.getJtGrade();
|
||||
this.getZzGrade();
|
||||
|
|
@ -140,10 +140,6 @@ export default {
|
|||
this.getWxGrade();
|
||||
},
|
||||
methods: {
|
||||
getParameter(data) {
|
||||
alert(data);
|
||||
this.toObj(data);
|
||||
},
|
||||
//获取三维数据
|
||||
toObj(data) {
|
||||
const inputString = data;
|
||||
|
|
|
|||
Loading…
Reference in New Issue