diff --git a/.eslintrc.js b/.eslintrc.js index 6449dea..2b9b596 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,6 +13,7 @@ module.exports = { 'import/no-unresolved': 0, 'import/extensions': 0, 'no-plusplus': 0, + 'consistent-return': 0, 'vue/html-self-closing': 'off', 'no-unused-expressions': 'off', 'vue/no-mutating-props': 'off', diff --git a/.vscode/settings.json b/.vscode/settings.json index 4f31ac9..091fa60 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,4 @@ { - "cSpell.words": ["browserslist", "commitlint", "unplugin", "windi", "windicss"], + "cSpell.words": ["browserslist", "commitlint", "datas", "unplugin", "windi", "windicss"], "vue3snippets.enable-compile-vue-file-on-did-save-code": true } diff --git a/src/apis/index.js b/src/apis/index.js index cdc31ff..10778ea 100644 --- a/src/apis/index.js +++ b/src/apis/index.js @@ -44,7 +44,7 @@ export const createConfigNetwork = data => http.post(`${corrosion}/config/networ export const createConfigFunction = data => http.post(`${corrosion}/config/function`, data); // 查历史数据 -export const getHistories = params => http.post(`${corrosion}/histories`, params); +export const getHistories = params => http.post(`${corrosion}/datas`, params); // 导出历史数据 export const exportHistory = params => http.post(`${corrosion}/export`, params); diff --git a/src/components/device-select-and-status.vue b/src/components/device-select-and-status.vue index 657e237..166441b 100644 --- a/src/components/device-select-and-status.vue +++ b/src/components/device-select-and-status.vue @@ -2,7 +2,7 @@ import { computed, ref, watch, defineProps } from 'vue'; import { useStore } from 'vuex'; -const props = defineProps({ status: Object }); +const props = defineProps({ status: String }); const store = useStore(); const devices = computed(() => store.state.device.devices); // 设备/站点列表 @@ -57,8 +57,9 @@ function onChange(event) { - - 设置状态: - {{ props.status || 'PENDING' }} + diff --git a/src/components/function-config-applied.vue b/src/components/function-config-applied.vue new file mode 100644 index 0000000..ac67d66 --- /dev/null +++ b/src/components/function-config-applied.vue @@ -0,0 +1,150 @@ + + + diff --git a/src/components/function-config-pending.vue b/src/components/function-config-pending.vue new file mode 100644 index 0000000..49f6f8e --- /dev/null +++ b/src/components/function-config-pending.vue @@ -0,0 +1,239 @@ + + + diff --git a/src/components/history-data.vue b/src/components/history-data.vue index 7bf4e1b..ce4cfba 100644 --- a/src/components/history-data.vue +++ b/src/components/history-data.vue @@ -8,6 +8,7 @@ diff --git a/src/views/network-config.vue b/src/views/network-config.vue index 2e368a4..725081c 100644 --- a/src/views/network-config.vue +++ b/src/views/network-config.vue @@ -1,6 +1,6 @@