Merge branch 'master' of http://gitea.umayle.com/chengdandan/InternetCompetition
This commit is contained in:
commit
a50d6172d2
|
@ -697,7 +697,7 @@ export default {
|
|||
// },
|
||||
async saveClone() {
|
||||
var obj = {
|
||||
// mqtt_qiyong: String(Number(this.formData.mqtt_qiyong)),
|
||||
mqtt_qiyong: String(Number(this.mqtt_qiyong)),
|
||||
mqtt_ip:
|
||||
this.mqtt_ip1 +
|
||||
"." +
|
||||
|
@ -715,6 +715,7 @@ export default {
|
|||
mqtt_cjd_tagid: this.tableData[0].mqtt_cjd_tagid,
|
||||
};
|
||||
let datas = { ...this.formData, ...obj };
|
||||
console.log(this.formData,'xxxxxxxxxx');
|
||||
let res = await SaveUserAnswer({
|
||||
mark: "CHGYWG_yx",
|
||||
user_id: this.user_id,
|
||||
|
@ -752,7 +753,7 @@ export default {
|
|||
// console.log(JSON.parse(data.data.mark_value));
|
||||
let obj = JSON.parse(data.data.mark_value);
|
||||
if (obj.mqtt_ip) {
|
||||
// this.formData.mqtt_qiyong = Boolean(Number(obj.mqtt_qiyong));
|
||||
this.mqtt_qiyong = Boolean(Number(obj.mqtt_qiyong));
|
||||
// console.log(obj.mqtt_qiyong);
|
||||
// console.log(this.formData.mqtt_qiyong);
|
||||
this.mqtt_ip1 = obj.mqtt_ip.split(".")[0];
|
||||
|
@ -810,7 +811,7 @@ export default {
|
|||
// console.log(JSON.parse(data.data.mark_value));
|
||||
let obj = JSON.parse(res.data.data.r3);
|
||||
if (obj.mqtt_ip) {
|
||||
// this.formData.mqtt_qiyong = Boolean(Number(obj.mqtt_qiyong));
|
||||
this.mqtt_qiyong = Boolean(Number(obj.mqtt_qiyong));
|
||||
// console.log(obj.mqtt_qiyong);
|
||||
// console.log(this.formData.mqtt_qiyong);
|
||||
this.mqtt_ip1 = obj.mqtt_ip.split(".")[0];
|
||||
|
|
|
@ -360,7 +360,6 @@ export default {
|
|||
// mqtt_tls: false,
|
||||
// mqtt_clearsession: false,
|
||||
mqtt_qos: "0",
|
||||
|
||||
ippz_ssid: "",
|
||||
ippz_rzfs: "", //答案:WPA2-PSK
|
||||
ippz_jmfs: "", //答案:AES
|
||||
|
@ -670,7 +669,7 @@ export default {
|
|||
// },
|
||||
async saveClone() {
|
||||
var obj = {
|
||||
mqtt_qiyong: String(Number(this.formData.mqtt_qiyong)),
|
||||
mqtt_qiyong: this.mqtt_qiyong?'1':'0',
|
||||
mqtt_ip:
|
||||
this.mqtt_ip1 +
|
||||
"." +
|
||||
|
@ -730,6 +729,7 @@ export default {
|
|||
}
|
||||
let obj = JSON.parse(data.data.mark_value);
|
||||
if (obj.mqtt_ip) {
|
||||
this.mqtt_qiyong = obj.mqtt_qiyong==='1';
|
||||
this.formData.mqtt_ip = obj.mqtt_ip;
|
||||
this.mqtt_ip1 = obj.mqtt_ip.split(".")[0];
|
||||
this.mqtt_ip2 = obj.mqtt_ip.split(".")[1];
|
||||
|
@ -781,6 +781,7 @@ export default {
|
|||
}
|
||||
let obj = JSON.parse(res.data.data.r3);
|
||||
if (obj.mqtt_ip) {
|
||||
this.mqtt_qiyong = obj.mqtt_qiyong==='1';
|
||||
this.formData.mqtt_ip = obj.mqtt_ip;
|
||||
this.mqtt_ip1 = obj.mqtt_ip.split(".")[0];
|
||||
this.mqtt_ip2 = obj.mqtt_ip.split(".")[1];
|
||||
|
@ -824,7 +825,7 @@ export default {
|
|||
this.tableData[0].mqtt_cjd_tagid = obj.cjdpz_tagid;
|
||||
})
|
||||
}
|
||||
|
||||
console.log(this.formData,'手机壳i');
|
||||
},
|
||||
async sendTree() {
|
||||
let result = await SendTree({
|
||||
|
|
|
@ -461,22 +461,7 @@ export default {
|
|||
sbpz_ip3: "",
|
||||
sbpz_ip4: "",
|
||||
firstlabel: "",
|
||||
options1: [
|
||||
{
|
||||
value: "有线区精雕2",
|
||||
label: "有线区精雕2",
|
||||
},
|
||||
{
|
||||
value: "无线区精雕2",
|
||||
label: "无线区精雕2",
|
||||
},
|
||||
],
|
||||
options2: [
|
||||
{
|
||||
value: "05",
|
||||
label: "05",
|
||||
},
|
||||
],
|
||||
options1: this.$t('reconnoitreConfiguration.options1'),
|
||||
options3: [
|
||||
{
|
||||
value: "06",
|
||||
|
@ -988,9 +973,11 @@ export default {
|
|||
user_id: this.user_id,
|
||||
type: "3",
|
||||
});
|
||||
console.log(res);
|
||||
console.log(JSON.parse(res.data.data.data));
|
||||
if(this.$i18n.locale==='zh'){
|
||||
this.trees = JSON.parse(res.data.data.r2);
|
||||
}else{
|
||||
this.trees = JSON.parse(res.data.data.data);
|
||||
}
|
||||
},
|
||||
//网关配置的信息
|
||||
async submitGate() {
|
||||
|
|
|
@ -404,7 +404,7 @@ export default {
|
|||
}
|
||||
}
|
||||
/deep/ .zhContent{
|
||||
margin: 62px;
|
||||
margin: 30px;
|
||||
}
|
||||
|
||||
/deep/ .footer {
|
||||
|
|
|
@ -170,9 +170,11 @@ export default {
|
|||
user_id: this.user_id,
|
||||
type: "3",
|
||||
});
|
||||
console.log(res);
|
||||
console.log(JSON.parse(res.data.data.data));
|
||||
if(this.$i18n.locale==='zh'){
|
||||
this.trees = JSON.parse(res.data.data.r2);
|
||||
}else{
|
||||
this.trees = JSON.parse(res.data.data.data);
|
||||
}
|
||||
},
|
||||
// 登陆时进行校验
|
||||
submitForm() {
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="$t('wiredgatewayip.networkType')" :label-width="formLabelWidth" prop="ippz_wllx">
|
||||
<el-select v-model="formData.ippz_wllx" placeholder="静态IP" style="width: 200px">
|
||||
<el-option label="静态IP" value="静态IP"></el-option>
|
||||
<el-select v-model="formData.ippz_wllx" :placeholder="$t('wiredgatewayip.staticIP')" style="width: 200px">
|
||||
<el-option :label="$t('wiredgatewayip.staticIP')" :value="$t('wiredgatewayip.staticIP')"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
|
@ -871,7 +871,11 @@ export default {
|
|||
let res = await GetTree({ user_id: this.user_id, type: "2" });
|
||||
// console.log(res);
|
||||
// console.log(JSON.parse(res.data.data.data));
|
||||
if(this.$i18n.locale==='zh'){
|
||||
this.trees = JSON.parse(res.data.data.r2);
|
||||
}else{
|
||||
this.trees = JSON.parse(res.data.data.data);
|
||||
}
|
||||
},
|
||||
|
||||
//网关信息配置
|
||||
|
|
|
@ -802,25 +802,16 @@ export default {
|
|||
// },
|
||||
rulesGate: {
|
||||
wgpz_wgmc: [
|
||||
{ required: true, message: "请选择网关名称", trigger: "blur" },
|
||||
{ required: true, message: this.$t('dbcollectiongate.rules.wgpz_wgmc'), trigger: "blur" },
|
||||
],
|
||||
wgpz_wgid: [
|
||||
{ required: true, message: "请选择网关id", trigger: "blur" },
|
||||
{ required: true, message: this.$t('dbcollectiongate.rules.wgpz_wgid'), trigger: "blur" },
|
||||
],
|
||||
wgpz_wglx: [
|
||||
{ required: true, message: "请选择网关类型", trigger: "blur" },
|
||||
{ required: true, message: this.$t('dbcollectiongate.rules.wgpz_wglx'), trigger: "blur" },
|
||||
],
|
||||
},
|
||||
opts1: [
|
||||
{
|
||||
value: "有线区网关1",
|
||||
label: "有线区网关1",
|
||||
},
|
||||
{
|
||||
value: "无线区网关1",
|
||||
label: "无线区网关1",
|
||||
},
|
||||
],
|
||||
opts1: this.$t('dbcollectiongate.options1'),
|
||||
opts2: [
|
||||
{
|
||||
value: "LAN-BOX1",
|
||||
|
@ -831,32 +822,7 @@ export default {
|
|||
label: "WLAN-BOX1",
|
||||
},
|
||||
],
|
||||
opts3: [
|
||||
{
|
||||
value: "loT Lite网关",
|
||||
label: "loT Lite网关",
|
||||
},
|
||||
{
|
||||
value: "MODBUS网关",
|
||||
label: "MODBUS网关",
|
||||
},
|
||||
{
|
||||
value: "BACNET网关",
|
||||
label: "BACNET网关",
|
||||
},
|
||||
{
|
||||
value: "OPC UA网关",
|
||||
label: "OPC UA网关",
|
||||
},
|
||||
{
|
||||
value: "OPC DA网关",
|
||||
label: "OPC DA网关",
|
||||
},
|
||||
{
|
||||
value: "loT网关",
|
||||
label: "loT网关",
|
||||
},
|
||||
],
|
||||
opts3: this.$t('dbcollectiongate.options3'),
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -1342,11 +1308,11 @@ export default {
|
|||
});
|
||||
console.log(res);
|
||||
console.log(JSON.parse(res.data.data.data));
|
||||
// if(this.$i18n.locale==='zh'){
|
||||
// this.trees = JSON.parse(res.data.data.r2);
|
||||
// }else{
|
||||
if(this.$i18n.locale==='zh'){
|
||||
this.trees = JSON.parse(res.data.data.r2);
|
||||
}else{
|
||||
this.trees = JSON.parse(res.data.data.data);
|
||||
// }
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
|
|
@ -1156,9 +1156,11 @@ export default {
|
|||
// user_id: "USER202307301114011710",
|
||||
type: "2",
|
||||
});
|
||||
console.log(res);
|
||||
console.log(JSON.parse(res.data.data.data));
|
||||
if(this.$i18n.locale==='zh'){
|
||||
this.trees = JSON.parse(res.data.data.r2);
|
||||
}else{
|
||||
this.trees = JSON.parse(res.data.data.data);
|
||||
}
|
||||
},
|
||||
|
||||
//网关信息配置
|
||||
|
|
|
@ -1329,7 +1329,11 @@ export default {
|
|||
}).then((res) => {
|
||||
console.log(res);
|
||||
console.log(JSON.parse(res.data.data.data));
|
||||
if(this.$i18n.locale==='zh'){
|
||||
this.trees = JSON.parse(res.data.data.r2);
|
||||
}else{
|
||||
this.trees = JSON.parse(res.data.data.data);
|
||||
}
|
||||
});
|
||||
}
|
||||
this.GetUserAnswer();
|
||||
|
|
|
@ -32,6 +32,7 @@ export default {
|
|||
copy: '复制',//拷贝
|
||||
networkType: '网络类型',//网络类型
|
||||
gateWay: '网关:',//网关
|
||||
staticIP: '静态IP',//静态IP
|
||||
// 校验
|
||||
rules: {
|
||||
ippz_wllx: '请输入网络类型',//请输入网络类型
|
||||
|
@ -324,7 +325,17 @@ export default {
|
|||
sbpz_cjcgsj: "请输入采集超过时间",//请输入采集超过时间
|
||||
sbpz_zqsbonchange: "周期上报Onchange数据",//周期上报Onchange数据
|
||||
sbpz_txsjjg: "请输入通讯时间间隔",//请输入通讯时间间隔
|
||||
}
|
||||
},
|
||||
options1: [
|
||||
{
|
||||
value: "有线区精雕2",
|
||||
label: "有线区精雕2",
|
||||
},
|
||||
{
|
||||
value: "无线区精雕2",
|
||||
label: "无线区精雕2",
|
||||
},
|
||||
]
|
||||
},
|
||||
// 斥候网关mqtt
|
||||
chmqtt: {
|
||||
|
|
|
@ -7,7 +7,7 @@ Vue.use(VueI18n)
|
|||
//注册i18n实例并引入语言文件
|
||||
|
||||
const i18n = new VueI18n({
|
||||
locale: 'en', // 语言标识(缓存里面没有就用中文)
|
||||
locale: 'zh', // 语言标识(缓存里面没有就用中文)
|
||||
fallbackLocale:'en' , //没有英文的时候默认中文语言
|
||||
messages: {
|
||||
zh,
|
||||
|
|
|
@ -33,6 +33,7 @@ export default{
|
|||
DNS:'DNS',//DNS
|
||||
networkType:'Network type:',//网络类型
|
||||
gateWay:'Gateway:',//网关
|
||||
staticIP:'Static IP',//静态IP
|
||||
// 校验
|
||||
rules: {
|
||||
ippz_wllx: 'Please enter the network type',//请输入网络类型
|
||||
|
@ -42,7 +43,17 @@ export default{
|
|||
ippz_zwym1: 'Please enter a valid subnet mask',
|
||||
ippz_dns_by: 'Please enter a alternative DNS server address',//请输入备用的DNS服务器地址
|
||||
ippz_dns_by1: 'Please enter a valid alternative DNS server address'
|
||||
}
|
||||
},
|
||||
options1: [
|
||||
{
|
||||
value: "Wired area precision carving equipment 2",//有线区精雕
|
||||
label: "Wired area precision carving equipment 2",
|
||||
},
|
||||
{
|
||||
value: "Wireless area precision carving equipment 2",//无线区精雕
|
||||
label: "Wireless area precision carving equipment 2",
|
||||
},
|
||||
]
|
||||
},
|
||||
//DB/斥候-ip配置无线网关
|
||||
wirelessgatewayip: {
|
||||
|
|
11
src/main.js
11
src/main.js
|
@ -20,7 +20,16 @@ Vue.prototype.$moment = moment;
|
|||
Vue.prototype.$store = store;
|
||||
|
||||
Vue.use(ElementUI);
|
||||
|
||||
// 切换中英文方法
|
||||
function switchLanguage(string){
|
||||
if(string=='zh'){
|
||||
i18n.locale = 'zh'
|
||||
}else{
|
||||
i18n.locale = 'en'
|
||||
}
|
||||
}
|
||||
window.updateLanguage = switchLanguage
|
||||
// updateLanguage()
|
||||
new Vue({
|
||||
router,
|
||||
i18n,
|
||||
|
|
Loading…
Reference in New Issue