diff --git a/.eslintrc.js b/.eslintrc.js index 77cece1..aea2d4a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,5 +13,25 @@ module.exports = { 'import/no-unresolved': 0, 'import/extensions': 0, 'no-console': 0, + 'vue/html-self-closing': 'off', + 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'no-param-reassign': 'off', + 'max-len': ['error', { code: 140, tabWidth: 2 }], + 'object-curly-newline': ['error', { multiline: true }], + 'arrow-parens': ['error', 'as-needed'], + 'linebreak-style': 'off', + 'vue/attributes-order': 'off', + 'vue/singleline-html-element-content-newline': 'off', + 'vue/max-attributes-per-line': 'off', + 'vue/multiline-html-element-content-newline': 'off', + 'vue/html-indent': 'off', + 'vue/html-closing-bracket-newline': [ + 'error', + { + singleline: 'never', + multiline: 'always', + }, + ], }, }; diff --git a/mock/function-config.js b/mock/function-config.js new file mode 100644 index 0000000..032b02b --- /dev/null +++ b/mock/function-config.js @@ -0,0 +1,23 @@ +module.exports = { + frequency: { + so2: 0, // SO2采样频率 + metal: 0, // 金属腐蚀采样频率 + th: 0, // 温湿度 采样频率 + salt: 0, // 盐雾 采样频率 + }, // 采样频率 + count: 0, // 采集个数 + time: new Date(), // 设置时间 + batteryLow: 0, // 电池电压低阈值 + batteryHigh: 0, // 电池电压高阈值 + sunHigh: 0, // 太阳能电压高阈值 + humidityHigh: 0, // 湿度高阈值 + temperatureLow: 0, // 温度低阈值 + temperatureHigh: 0, // 温度高阈值 + securityMode: 0, // 安全模式 0->不加密 1->加密 + corrosiveType: '', // 金属腐蚀类型 + report: { + type: 0, // 上报周期类型 0->时间点 1->周期 + timePoints: [0, 0, 0, 0, 0, 0], // 设置时间点 + cycle: 0, // 上报周期分钟数 + }, +}; diff --git a/mock/network-config.js b/mock/network-config.js new file mode 100644 index 0000000..74dbdae --- /dev/null +++ b/mock/network-config.js @@ -0,0 +1,13 @@ +module.exports = { + ip1: '', + port1: '', + ip2: '', + port2: '', + ip3: '', + port3: '', + ipBackup: '', // 备用ip + portBackup: '', // 备用端口号 + account: '', // 账号 + password: '', // 密码 + apn: '', // apn +}; diff --git a/src/App.vue b/src/App.vue index 3405d4d..135d798 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,8 +1,8 @@