This commit is contained in:
lll 2023-11-09 20:47:24 +08:00
parent f5ee084ffc
commit 077248470c
13 changed files with 1488 additions and 1084 deletions

View File

@ -935,8 +935,8 @@ export default {
// //
var json = JSON.parse(sessionStorage.getItem("GYWZ_yx")); var json = JSON.parse(sessionStorage.getItem("GYWZ_yx"));
let { data } = await SaveUserAnswer({ let { data } = await SaveUserAnswer({
mark: "GYWZ_yx", mark: `${this.$store.state.type}`,
user_id: "USER202307301114011710", user_id: `${this.$route.query.id}`,
mark_value: JSON.stringify({ ...json, ...obj }), mark_value: JSON.stringify({ ...json, ...obj }),
}); });
if (data.state) { if (data.state) {
@ -951,48 +951,50 @@ export default {
// //
async GetUserAnswer() { async GetUserAnswer() {
let { data } = await GetUserAnswer({ let { data } = await GetUserAnswer({
mark: "GYWZ_yx", mark: `${this.$store.state.type}`,
user_id: "USER202307301114011710", user_id: `${this.$route.query.id}`,
}); });
let res = JSON.parse(data.data.mark_value); if (data.data && data.state) {
if (res.clgl_ckip) { let res = JSON.parse(data.data.mark_value);
this.ruleForm1.clgl_ckip1 = res.clgl_ckip.split(".")[0]; if (res.clgl_ckip) {
this.ruleForm1.clgl_ckip2 = res.clgl_ckip.split(".")[1]; this.ruleForm1.clgl_ckip1 = res.clgl_ckip.split(".")[0];
this.ruleForm1.clgl_ckip3 = res.clgl_ckip.split(".")[2]; this.ruleForm1.clgl_ckip2 = res.clgl_ckip.split(".")[1];
this.ruleForm1.clgl_ckip4 = res.clgl_rkip.split(".")[3]; this.ruleForm1.clgl_ckip3 = res.clgl_ckip.split(".")[2];
this.ruleForm1.clgl_rkip1 = res.clgl_rkip.split(".")[0]; this.ruleForm1.clgl_ckip4 = res.clgl_rkip.split(".")[3];
this.ruleForm1.clgl_rkip2 = res.clgl_rkip.split(".")[1]; this.ruleForm1.clgl_rkip1 = res.clgl_rkip.split(".")[0];
this.ruleForm1.clgl_rkip3 = res.clgl_rkip.split(".")[2]; this.ruleForm1.clgl_rkip2 = res.clgl_rkip.split(".")[1];
this.ruleForm1.clgl_rkip4 = res.clgl_rkip.split(".")[3]; this.ruleForm1.clgl_rkip3 = res.clgl_rkip.split(".")[2];
this.ruleForm1.clgl_rkwg1 = res.clgl_rkwg.split(".")[0]; this.ruleForm1.clgl_rkip4 = res.clgl_rkip.split(".")[3];
this.ruleForm1.clgl_rkwg2 = res.clgl_rkwg.split(".")[1]; this.ruleForm1.clgl_rkwg1 = res.clgl_rkwg.split(".")[0];
this.ruleForm1.clgl_rkwg3 = res.clgl_rkwg.split(".")[2]; this.ruleForm1.clgl_rkwg2 = res.clgl_rkwg.split(".")[1];
this.ruleForm1.clgl_rkwg4 = res.clgl_rkwg.split(".")[3]; this.ruleForm1.clgl_rkwg3 = res.clgl_rkwg.split(".")[2];
this.ruleForm1.clgl_ckwg1 = res.clgl_ckwg.split(".")[0]; this.ruleForm1.clgl_rkwg4 = res.clgl_rkwg.split(".")[3];
this.ruleForm1.clgl_ckwg2 = res.clgl_ckwg.split(".")[1]; this.ruleForm1.clgl_ckwg1 = res.clgl_ckwg.split(".")[0];
this.ruleForm1.clgl_ckwg3 = res.clgl_ckwg.split(".")[2]; this.ruleForm1.clgl_ckwg2 = res.clgl_ckwg.split(".")[1];
this.ruleForm1.clgl_ckwg4 = res.clgl_ckwg.split(".")[3]; this.ruleForm1.clgl_ckwg3 = res.clgl_ckwg.split(".")[2];
this.ruleForm1.clgl_name = res.clgl_name; this.ruleForm1.clgl_ckwg4 = res.clgl_ckwg.split(".")[3];
this.ruleForm1.clgl_xy = res.clgl_xy; this.ruleForm1.clgl_name = res.clgl_name;
this.ruleForm1.clgl_gzms = res.clgl_gzms; this.ruleForm1.clgl_xy = res.clgl_xy;
this.ruleForm1.clgl_mddk = res.clgl_mddk; this.ruleForm1.clgl_gzms = res.clgl_gzms;
this.ruleForm1.clgl_ydx = res.clgl_ydx; this.ruleForm1.clgl_mddk = res.clgl_mddk;
this.ruleForm1.clgl_ydk = res.clgl_ydk; this.ruleForm1.clgl_ydx = res.clgl_ydx;
this.ruleForm1.clgl_mddk = res.clgl_mddk; this.ruleForm1.clgl_ydk = res.clgl_ydk;
this.ruleForm1.clgl_dldk = res.clgl_dldk; this.ruleForm1.clgl_mddk = res.clgl_mddk;
this.ruleForm1.clgl_rkwk = res.clgl_rkwk; this.ruleForm1.clgl_dldk = res.clgl_dldk;
this.ruleForm1.clgl_wdyml = res.clgl_wdyml; this.ruleForm1.clgl_rkwk = res.clgl_rkwk;
this.ruleForm1.clgl_ckwk = res.clgl_ckwk; this.ruleForm1.clgl_wdyml = res.clgl_wdyml;
this.tableData1 = [ this.ruleForm1.clgl_ckwk = res.clgl_ckwk;
{ this.tableData1 = [
cmdlist_ml: res.cmdlist_ml, {
cmdlist_sbid: res.cmdlist_sbid, cmdlist_ml: res.cmdlist_ml,
cmdlist_qsdz: res.cmdlist_qsdz, cmdlist_sbid: res.cmdlist_sbid,
cmdlist_dzcd: res.cmdlist_dzcd, cmdlist_qsdz: res.cmdlist_qsdz,
cmdlist_ms: res.cmdlist_ms, cmdlist_dzcd: res.cmdlist_dzcd,
cmdlist_dz: res.cmdlist_dz, cmdlist_ms: res.cmdlist_ms,
}, cmdlist_dz: res.cmdlist_dz,
]; },
];
}
} }
}, },
//- //-
@ -1018,8 +1020,8 @@ export default {
// //
var json = JSON.parse(sessionStorage.getItem("GYWZ_yx")); var json = JSON.parse(sessionStorage.getItem("GYWZ_yx"));
let { data } = await SaveUserAnswer({ let { data } = await SaveUserAnswer({
mark: "GYWZ_yx", mark: `${this.$store.state.type}`,
user_id: "USER202307301114011710", user_id: `${this.$route.query.id}`,
mark_value: JSON.stringify({ ...json, ...obj }), mark_value: JSON.stringify({ ...json, ...obj }),
}); });
if (data.state) { if (data.state) {
@ -1044,8 +1046,8 @@ export default {
obj.cmdlist_dz = ""; obj.cmdlist_dz = "";
localStorage.setItem("GYWZ_yx", JSON.stringify(obj)); localStorage.setItem("GYWZ_yx", JSON.stringify(obj));
let { data } = await SaveUserAnswer({ let { data } = await SaveUserAnswer({
mark: "GYWZ_yx", mark: `${this.$store.state.type}`,
user_id: "USER202307301114011710", user_id: `${this.$route.query.id}`,
mark_value: JSON.stringify(obj), mark_value: JSON.stringify(obj),
}); });
if (data.state) { if (data.state) {

View File

@ -4,15 +4,30 @@
<!-- <div v-click-outside="closeMenu"> --> <!-- <div v-click-outside="closeMenu"> -->
<!-- <el-button type="info" plain @click="dialogVisible = !dialogVisible">MQTT云</el-button> --> <!-- <el-button type="info" plain @click="dialogVisible = !dialogVisible">MQTT云</el-button> -->
<div v-show="dialogVisible" class="tree_menu"> <div v-show="dialogVisible" class="tree_menu">
<el-tree :data="trees" node-key="id" :props="defaultProps" default-expand-all @node-click="treeNodeClick" <el-tree
ref="tree"> :data="trees"
node-key="id"
:props="defaultProps"
default-expand-all
@node-click="treeNodeClick"
ref="tree"
>
<!-- :render-content="renderContent" --> <!-- :render-content="renderContent" -->
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<template v-if="data.editing == 1"> <template v-if="data.editing == 1">
<el-button type="mini" v-if="flag" style="right: 50px; top: 0; position: absolute; border: none" <el-button
@click.stop="done">完成</el-button> type="mini"
<el-button type="mini" style="right: 0; top: 0; position: absolute; border: none" v-if="flag"
@click.stop="edit">编辑</el-button> style="right: 50px; top: 0; position: absolute; border: none"
@click.stop="done"
>完成</el-button
>
<el-button
type="mini"
style="right: 0; top: 0; position: absolute; border: none"
@click.stop="edit"
>编辑</el-button
>
<span v-if="!flag">{{ data.label }}</span> <span v-if="!flag">{{ data.label }}</span>
<el-input v-else style="width: 150px" v-model="gateway"></el-input> <el-input v-else style="width: 150px" v-model="gateway"></el-input>
</template> </template>
@ -28,7 +43,12 @@
MQTT Client MQTT Client
</h3> </h3>
<el-divider></el-divider> <el-divider></el-divider>
<el-form :model="formData" :label-position="labelPosition" :rules="rules" ref="ruleForm"> <el-form
:model="formData"
:label-position="labelPosition"
:rules="rules"
ref="ruleForm"
>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item> <el-form-item>
@ -38,30 +58,50 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="服务器IP:" :label-width="formLabelWidth" prop="mqtt_ip"> <el-form-item
label="服务器IP:"
:label-width="formLabelWidth"
prop="mqtt_ip"
>
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="mqtt_ip1"> <el-form-item prop="mqtt_ip1">
<el-input v-model="mqtt_ip1" style="width: 43px; height: 30px" maxlength="3"> <el-input
v-model="mqtt_ip1"
style="width: 43px; height: 30px"
maxlength="3"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="1">. </el-col> <el-col :span="1">. </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="mqtt_ip2"> <el-form-item prop="mqtt_ip2">
<el-input v-model="mqtt_ip2" style="width: 43px; height: 30px" maxlength="3"></el-input> <el-input
v-model="mqtt_ip2"
style="width: 43px; height: 30px"
maxlength="3"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="1">.</el-col> <el-col :span="1">.</el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="mqtt_ip3"> <el-form-item prop="mqtt_ip3">
<el-input v-model="mqtt_ip3" style="width: 43px; height: 30px" maxlength="3"></el-input> <el-input
v-model="mqtt_ip3"
style="width: 43px; height: 30px"
maxlength="3"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="1">.</el-col> <el-col :span="1">.</el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item prop="mqtt_ip4"> <el-form-item prop="mqtt_ip4">
<el-input v-model="mqtt_ip4" style="width: 43px; height: 30px" maxlength="3"></el-input> <el-input
v-model="mqtt_ip4"
style="width: 43px; height: 30px"
maxlength="3"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -70,29 +110,63 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="端口号:" :label-width="formLabelWidth" prop="mqtt_port"> <el-form-item
<el-input v-model="formData.mqtt_port" placeholder="" style="width: 200px; height: 30px"></el-input> label="端口号:"
:label-width="formLabelWidth"
prop="mqtt_port"
>
<el-input
v-model="formData.mqtt_port"
placeholder=""
style="width: 200px; height: 30px"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="网关SN号:" :label-width="formLabelWidth" prop="mqtt_wgsn"> <el-form-item
<el-input v-model="formData.mqtt_wgsn" placeholder="" style="width: 200px; height: 30px"></el-input> label="网关SN号:"
:label-width="formLabelWidth"
prop="mqtt_wgsn"
>
<el-input
v-model="formData.mqtt_wgsn"
placeholder=""
style="width: 200px; height: 30px"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-divider></el-divider> <el-divider></el-divider>
<el-row class="theme"> <el-row class="theme">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="实时数据发布的主题" style="display: block" label-width="168px" prop="mqtt_sssjfbzt"> <el-form-item
label="实时数据发布的主题"
style="display: block"
label-width="168px"
prop="mqtt_sssjfbzt"
>
<el-row> <el-row>
<el-col :span="15"> <el-col :span="15">
<el-input v-model="formData.mqtt_sssjfbzt" placeholder="" style="width: 200px"></el-input> <el-input
v-model="formData.mqtt_sssjfbzt"
placeholder=""
style="width: 200px"
></el-input>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-select v-model="formData.mqtt_qos" placeholder="请选择" style="width: 99px"> <el-select
<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value"> v-model="formData.mqtt_qos"
placeholder="请选择"
style="width: 99px"
>
<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-col> </el-col>
@ -107,19 +181,39 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="上传模式:" :label-width="formLabelWidth" prop="mqtt_scms"> <el-form-item
<el-input v-model="formData.mqtt_scms" placeholder="" style="width: 200px; height: 30px"></el-input> label="上传模式:"
:label-width="formLabelWidth"
prop="mqtt_scms"
>
<el-input
v-model="formData.mqtt_scms"
placeholder=""
style="width: 200px; height: 30px"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="上传周期(s):" label-width="108px" prop="mqtt_sczq"> <el-form-item
<el-input v-model="formData.mqtt_sczq" placeholder="" style="width: 200px; height: 30px"></el-input> label="上传周期(s):"
label-width="108px"
prop="mqtt_sczq"
>
<el-input
v-model="formData.mqtt_sczq"
placeholder=""
style="width: 200px; height: 30px"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="数据过滤:" :label-width="formLabelWidth" prop="mqtt_sjgl"> <el-form-item
label="数据过滤:"
:label-width="formLabelWidth"
prop="mqtt_sjgl"
>
<el-checkbox-group v-model="formData.mqtt_sjgl"> <el-checkbox-group v-model="formData.mqtt_sjgl">
<el-checkbox label="值改变"></el-checkbox> <el-checkbox label="值改变"></el-checkbox>
<el-checkbox label="采集成功"></el-checkbox> <el-checkbox label="采集成功"></el-checkbox>
@ -148,16 +242,24 @@
<el-table-column property="mqtt_cjd_sbmc" label="设备名称"> <el-table-column property="mqtt_cjd_sbmc" label="设备名称">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.mqtt_cjd_sbmc" placeholder=""> <el-select v-model="scope.row.mqtt_cjd_sbmc" placeholder="">
<el-option v-for="(option, index) in options2" :key="index" :label="option.label" <el-option
:value="option.value"></el-option> v-for="(option, index) in options2"
:key="index"
:label="option.label"
:value="option.value"
></el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column property="mqtt_cjd_tagid" label="TagID"> <el-table-column property="mqtt_cjd_tagid" label="TagID">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.mqtt_cjd_tagid" placeholder=""> <el-select v-model="scope.row.mqtt_cjd_tagid" placeholder="">
<el-option v-for="(option, index) in options3" :key="index" :label="option.label" <el-option
:value="option.value"></el-option> v-for="(option, index) in options3"
:key="index"
:label="option.label"
:value="option.value"
></el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
@ -168,8 +270,14 @@
<!-- 添加按钮下显示出来的弹框信息 --> <!-- 添加按钮下显示出来的弹框信息 -->
<div> <div>
<el-dialog title="选择点" :visible.sync="choose_point" width="30%"> <el-dialog title="选择点" :visible.sync="choose_point" width="30%">
<el-tree :data="points" show-checkbox node-key="id" :default-expanded-keys="[1, 2]" <el-tree
:default-checked-keys="[3, 4, 5, 6]" :props="defaultProps"> :data="points"
show-checkbox
node-key="id"
:default-expanded-keys="[1, 2]"
:default-checked-keys="[3, 4, 5, 6]"
:props="defaultProps"
>
</el-tree> </el-tree>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="savePoint"> </el-button> <el-button type="primary" @click="savePoint"> </el-button>
@ -492,6 +600,9 @@ export default {
this.getTree(); this.getTree();
let that = this; let that = this;
window.getParameter = that.getParameter; window.getParameter = that.getParameter;
this.loading = true;
this.GetUserAnswer();
this.loading = false;
}, },
methods: { methods: {
// //
@ -623,16 +734,16 @@ export default {
user_id: "USER202307301114011710", user_id: "USER202307301114011710",
data: JSON.stringify(this.trees), data: JSON.stringify(this.trees),
type: "1", type: "1",
}) });
console.log(result); console.log(result);
}, },
async getTree() { async getTree() {
console.log("12341") console.log("12341");
let res = await GetTree({ user_id: "USER202307301114011710", type: "1", }) let res = await GetTree({ user_id: "USER202307301114011710", type: "1" });
console.log(res); console.log(res);
console.log(JSON.parse(res.data.data.data)); console.log(JSON.parse(res.data.data.data));
this.trees = JSON.parse(res.data.data.data); this.trees = JSON.parse(res.data.data.data);
} },
}, },
directives: { directives: {
"click-outside": { "click-outside": {
@ -660,11 +771,6 @@ export default {
}, },
}, },
}, },
created() {
this.loading = true;
this.GetUserAnswer();
this.loading = false;
},
}; };
</script> </script>

View File

@ -252,7 +252,7 @@ export default {
async GetUserAnswer() { async GetUserAnswer() {
let { data } = await GetUserAnswer({ let { data } = await GetUserAnswer({
mark: "YDPZYM_wgpz", mark: "YDPZYM_wgpz",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
}); });
console.log(data.data); console.log(data.data);
if (data.data && data.state) { if (data.data && data.state) {
@ -263,7 +263,7 @@ export default {
async SaveUserAnswer() { async SaveUserAnswer() {
let { data } = await SaveUserAnswer({ let { data } = await SaveUserAnswer({
mark: "YDPZYM_wgpz", mark: "YDPZYM_wgpz",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
mark_value: JSON.stringify(this.wgpz), mark_value: JSON.stringify(this.wgpz),
}); });
if (data.state) { if (data.state) {

View File

@ -266,7 +266,7 @@ export default {
async GetUserAnswer() { async GetUserAnswer() {
let { data } = await GetUserAnswer({ let { data } = await GetUserAnswer({
mark: "YDPZYM_wgwh", mark: "YDPZYM_wgwh",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
}); });
console.log(data); console.log(data);
if (data.data && data.state) { if (data.data && data.state) {
@ -329,7 +329,7 @@ export default {
async SaveUserAnswer() { async SaveUserAnswer() {
let { data } = await SaveUserAnswer({ let { data } = await SaveUserAnswer({
mark: "YDPZYM_wgwh", mark: "YDPZYM_wgwh",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
mark_value: JSON.stringify(this.tableData), mark_value: JSON.stringify(this.tableData),
}); });
if (data.state) { if (data.state) {

View File

@ -1,11 +1,22 @@
<!-- ip设置页面 --> <!-- ip设置页面 -->
<template> <template>
<div> <div>
<el-dialog title="IP配置" :visible.sync="dialogVisible" width="30%" v-loading="loading"> <el-dialog
title="IP配置"
:visible.sync="dialogVisible"
width="30%"
v-loading="loading"
>
<p class="txt">本页面涉及排错请检查修改默认值</p> <p class="txt">本页面涉及排错请检查修改默认值</p>
<div class="ip_setting"> <div class="ip_setting">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="140px" class="demo-ruleForm" <el-form
:label-position="labelPosition"> :model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="140px"
class="demo-ruleForm"
:label-position="labelPosition"
>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="IP获取方式" prop="ippz_ip_hqfs"> <el-form-item label="IP获取方式" prop="ippz_ip_hqfs">
@ -19,7 +30,10 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="DNS获取方式" prop="ippz_dns_hqfs"> <el-form-item label="DNS获取方式" prop="ippz_dns_hqfs">
<el-select v-model="ruleForm.ippz_dns_hqfs" style="width: 200px"> <el-select
v-model="ruleForm.ippz_dns_hqfs"
style="width: 200px"
>
<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>
@ -295,7 +309,7 @@ export default {
datas = { ...JSON.parse(datas), ...this.ruleForm }; datas = { ...JSON.parse(datas), ...this.ruleForm };
let res = await SaveUserAnswer({ let res = await SaveUserAnswer({
mark: "CKFWQ_yx", mark: "CKFWQ_yx",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
mark_value: JSON.stringify(datas), mark_value: JSON.stringify(datas),
}); });
console.log(res); console.log(res);
@ -312,7 +326,7 @@ export default {
async GetUserAnswer() { async GetUserAnswer() {
let answers = await GetUserAnswer({ let answers = await GetUserAnswer({
mark: "CKFWQ_yx", mark: "CKFWQ_yx",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
}); });
console.log(answers.data); console.log(answers.data);
if (answers.data.data && answers.data.state) { if (answers.data.data && answers.data.state) {

View File

@ -87,7 +87,7 @@ export default {
let datas = JSON.parse(sessionStorage.getItem("CKFWQ_wx")); let datas = JSON.parse(sessionStorage.getItem("CKFWQ_wx"));
let res = await SaveUserAnswer({ let res = await SaveUserAnswer({
mark: "CKFWQ_wx", mark: "CKFWQ_wx",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
mark_value: JSON.stringify(datas), mark_value: JSON.stringify(datas),
}); });
console.log(res); console.log(res);
@ -111,11 +111,11 @@ export default {
this.loading = true; this.loading = true;
let res = await GetUserAnswer({ let res = await GetUserAnswer({
mark: "CKFWQ_wx", mark: "CKFWQ_wx",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
}); });
var obj = JSON.parse(res.data.data.mark_value);
console.log(obj); 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);
this.ruleForm.kqwk = obj.kqwk; this.ruleForm.kqwk = obj.kqwk;
this.ruleForm.wkgzfs = obj.wkgzfs; this.ruleForm.wkgzfs = obj.wkgzfs;
this.ruleForm.wkms = obj.wkms; this.ruleForm.wkms = obj.wkms;

View File

@ -246,8 +246,8 @@ export default {
this.wlgl_ww_zwym4, this.wlgl_ww_zwym4,
}; };
let { data } = await SaveUserAnswer({ let { data } = await SaveUserAnswer({
mark: "GYWZ_yx", mark: `${this.$store.state.type}`,
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
mark_value: JSON.stringify(obj), mark_value: JSON.stringify(obj),
}); });
if (data.state) { if (data.state) {
@ -262,8 +262,8 @@ export default {
// //
async GetUserAnswer() { async GetUserAnswer() {
var { data } = await GetUserAnswer({ var { data } = await GetUserAnswer({
mark: "GYWZ_yx", mark: `${this.$store.state.type}`,
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
}); });
console.log(data); console.log(data);
if (data.data && data.state) { if (data.data && data.state) {

View File

@ -146,8 +146,8 @@ export default {
ip: this.ip1 + "." + this.ip2 + "." + this.ip3 + "." + this.ip4, ip: this.ip1 + "." + this.ip2 + "." + this.ip3 + "." + this.ip4,
}); });
let { data } = await SaveUserAnswer({ let { data } = await SaveUserAnswer({
mark: "GYWZ_yx", mark: `${this.$store.state.type}`,
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
mark_value: JSON.stringify({ ...json, ...{ dxgl: this.dxgl } }), mark_value: JSON.stringify({ ...json, ...{ dxgl: this.dxgl } }),
}); });
console.log(data.data); console.log(data.data);
@ -164,8 +164,8 @@ export default {
}, },
async GetUserAnswer() { async GetUserAnswer() {
let { data } = await GetUserAnswer({ let { data } = await GetUserAnswer({
mark: "GYWZ_yx", mark: `${this.$store.state.type}`,
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
}); });
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);
@ -179,8 +179,8 @@ export default {
this.dxgl.splice(index, 1); this.dxgl.splice(index, 1);
var json = JSON.parse(sessionStorage.getItem("GYWZ_yx")); var json = JSON.parse(sessionStorage.getItem("GYWZ_yx"));
let { data } = await SaveUserAnswer({ let { data } = await SaveUserAnswer({
mark: "GYWZ_yx", mark: `${this.$store.state.type}`,
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
mark_value: JSON.stringify({ ...json, ...{ dxgl: this.dxgl } }), mark_value: JSON.stringify({ ...json, ...{ dxgl: this.dxgl } }),
}); });
console.log(data.data); console.log(data.data);

View File

@ -292,12 +292,12 @@ export default {
this.user_id = data; this.user_id = data;
}, },
addPolicy() { addPolicy() {
this.$router.push("/addstrategy"); this.$router.push({ name: "addstrategy", query: { id: this.user_id } });
}, },
async del(index, a) { async del(index, a) {
let { data } = await SaveUserAnswer({ let { data } = await SaveUserAnswer({
mark: "GYWZ_yx", mark: `${this.$store.state.type}`,
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
mark_value: JSON.stringify(localStorage.getItem("GYWZ_yx")), mark_value: JSON.stringify(localStorage.getItem("GYWZ_yx")),
}); });
if (data.state) { if (data.state) {
@ -333,8 +333,8 @@ export default {
async GetUserAnswer() { async GetUserAnswer() {
this.loading = true; this.loading = true;
let { data } = await GetUserAnswer({ let { data } = await GetUserAnswer({
mark: "GYWZ_yx", mark: `${this.$store.state.type}`,
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
}); });
this.loading = false; this.loading = false;
if (data.data && data.state) { if (data.data && data.state) {

View File

@ -206,7 +206,7 @@ export default {
async GetUserAnswer() { async GetUserAnswer() {
let { data } = await GetUserAnswer({ let { data } = await GetUserAnswer({
mark: "CKFWQ_yx", mark: "CKFWQ_yx",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
}); });
if (data.data) { if (data.data) {
let obj = JSON.parse(data.data.mark_value); let obj = JSON.parse(data.data.mark_value);
@ -227,7 +227,7 @@ export default {
datas = { ...JSON.parse(datas), ...this.ruleForm }; datas = { ...JSON.parse(datas), ...this.ruleForm };
SaveUserAnswer({ SaveUserAnswer({
mark: "CKFWQ_yx", mark: "CKFWQ_yx",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
mark_value: JSON.stringify(datas), mark_value: JSON.stringify(datas),
}).then((res) => { }).then((res) => {
console.log(res); console.log(res);

File diff suppressed because it is too large Load Diff

View File

@ -102,10 +102,9 @@ export default {
let datas = JSON.parse(sessionStorage.getItem("CKFWQ_wx")); let datas = JSON.parse(sessionStorage.getItem("CKFWQ_wx"));
let res = await SaveUserAnswer({ let res = await SaveUserAnswer({
mark: "CKFWQ_wx", mark: "CKFWQ_wx",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
mark_value: JSON.stringify(datas), mark_value: JSON.stringify(datas),
}); });
console.log(this.ruleForm, "存");
if (res.status == 200) { if (res.status == 200) {
sessionStorage.setItem( sessionStorage.setItem(
"CKFWQ_wx", "CKFWQ_wx",
@ -123,7 +122,7 @@ export default {
async GetUserAnswer() { async GetUserAnswer() {
let { data } = await GetUserAnswer({ let { data } = await GetUserAnswer({
mark: "CKFWQ_wx", mark: "CKFWQ_wx",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
}); });
console.log(obj); console.log(obj);
if (data.data && data.state) { if (data.data && data.state) {

View File

@ -192,7 +192,7 @@ export default {
datas = { ...JSON.parse(datas), ...this.ruleForm }; datas = { ...JSON.parse(datas), ...this.ruleForm };
let res = await SaveUserAnswer({ let res = await SaveUserAnswer({
mark: "CKFWQ_wx", mark: "CKFWQ_wx",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
mark_value: JSON.stringify(datas), mark_value: JSON.stringify(datas),
}); });
console.log(res); console.log(res);
@ -212,7 +212,7 @@ export default {
this.loading = true; this.loading = true;
let answers = await GetUserAnswer({ let answers = await GetUserAnswer({
mark: "CKFWQ_wx", mark: "CKFWQ_wx",
user_id: "USER202307301114011710", user_id: `${this.user_id}`,
}); });
let obj = JSON.parse(answers.data.data.mark_value); let obj = JSON.parse(answers.data.data.mark_value);
console.log(answers); console.log(answers);