diff --git a/src/layout/navBars/topBar/breadcrumb.vue b/src/layout/navBars/topBar/breadcrumb.vue
index 80cc226..62c49c8 100644
--- a/src/layout/navBars/topBar/breadcrumb.vue
+++ b/src/layout/navBars/topBar/breadcrumb.vue
@@ -6,20 +6,20 @@
:size="16"
@click="onThemeConfigChange"
/>
-
-
-
-
-
- {{ v.meta.title }}
- {{ v.meta.tagsViewName }}
-
-
- {{ v.meta.title }}
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/layout/routerView/parent.vue b/src/layout/routerView/parent.vue
index 97c8fa0..a1e45a9 100644
--- a/src/layout/routerView/parent.vue
+++ b/src/layout/routerView/parent.vue
@@ -3,7 +3,9 @@
-
+
+
+
diff --git a/src/router/route.js b/src/router/route.js
index 3672612..41fdfc7 100644
--- a/src/router/route.js
+++ b/src/router/route.js
@@ -25,7 +25,7 @@ export const dynamicRoutes = [
component: () => import('/@/layout/index.vue'),
redirect: '/southdirection',
meta: {
- isKeepAlive: true,
+ // isKeepAlive: true,
},
children: [
// {
diff --git a/src/views/gateway/northboundtask.vue b/src/views/gateway/northboundtask.vue
index 00ca80c..dfb5beb 100644
--- a/src/views/gateway/northboundtask.vue
+++ b/src/views/gateway/northboundtask.vue
@@ -113,10 +113,10 @@
-
上报测点 {{ activeDeviceConfig.taskId }}
+
上报测点 {{ activeTask.taskId}}
-
+
加密算法配置
@@ -391,15 +391,17 @@ const getDeviceConfig = () => {
}) || [];
// taskList.value = taskDataList;
console.log('格式化后数据', taskList.value);
+ // debugger
if (!platConfigList.value.length) {
addDeviceConfig();
}
- if (platConfigList.value.length) {
- if (platConfigList.value.length > ActiveRowIndex.value) {
- activeDeviceConfig.value = platConfigList.value[ActiveRowIndex.value];
+ if (taskList.value.length) {
+ if (taskList.value.length > ActiveRowIndex.value) {
+ activeTask.value = taskList.value[ActiveRowIndex.value];
} else {
- activeDeviceConfig.value = platConfigList.value[0];
+ activeTask.value = taskList.value[0];
}
+ platConfigTableRef.value.toggleRowSelection(activeTask.value, true);
}
} else {
ElMessage.error(response.message);
@@ -481,6 +483,13 @@ const editCollection = () => {
collectionModelShow.value = false;
};
+const activeTask = ref({
+ taskId: '',
+ dataIdEntire: [],
+ taskType: '',
+ uploadMode: 'timer 1 || change 0.1'
+});
+
const activeDeviceConfig = ref({
PlatformIp: '',
tasks: ['T1', 'T2', 'T3', 'T4', 'T5'],
@@ -530,15 +539,23 @@ const activeDeviceConfig = ref({
},
});
+
watch(
() => ({ ...activeDeviceConfig.value }),
(newVal) => {
- console.log('数据变化', newVal);
platConfigList.value[ActiveRowIndex.value] = newVal;
},
{ deep: true }
);
+watch(
+ () => ({ ...activeTask.value }),
+ (newVal) => {
+ taskList.value[ActiveRowIndex.value] = newVal;
+ },
+ { deep: true }
+);
+
// const saveDeviceDataConfig = () => {
// platConfigList.value[ActiveRowIndex.value] = activeDeviceConfig.value;
// }
@@ -552,10 +569,11 @@ const tableRowClassName = ({ row, rowIndex }) => {
//选择设备配置
const taskConfigClick = (e) => {
console.log(`current page:`, e);
- activeDeviceConfig.value = e;
+ // activeDeviceConfig.value = e;
+ activeTask.value = e;
platConfigTableRef.value.toggleRowSelection(e);
- ActiveRowIndex.value = platConfigList.value.indexOf(e);
+ ActiveRowIndex.value = taskList.value.indexOf(e);
// e.isDoubleClicked = !e.isDoubleClicked;
};
diff --git a/src/views/gateway/southdirection.vue b/src/views/gateway/southdirection.vue
index 2113172..c5d7e4a 100644
--- a/src/views/gateway/southdirection.vue
+++ b/src/views/gateway/southdirection.vue
@@ -26,7 +26,7 @@
height="187"
:style="{ width: tabelBox + 'px', background: '#f2f2f2' }"
empty-text="配置为空"
- row-key="index"
+ row-key="id"
@row-click="deviceConfigClick"
>
@@ -85,33 +85,34 @@
size="small"
height="100%"
:style="{ width: tabelBox + 'px' }"
+ row-key="index"
empty-text="配置为空"
>
-
+
-
+
-
+
-
+
-
+
- {{ item.type }}
+ {{ item.type }}
@@ -144,12 +145,12 @@
-
+
-
+
@@ -163,22 +164,22 @@
-
+
-
+
-
+
-
+
@@ -205,14 +206,14 @@
-
+
-
+
@@ -235,7 +236,7 @@
-
+
@@ -500,6 +501,16 @@ const getDeviceConfig = () => {
//缓存上下行主题
deviceConfigList.value = response.data.equips || [];
taskList.value = response.data.tasks || [];
+ if(response.data.tasks && response.data.tasks.length > 0 ){
+ uploadModeList.value = response.data.tasks.map(item=>{
+ return {
+ value: item.uploadMode,
+ link: item.uploadMode,
+ };
+ });
+ }else{
+ uploadModeList.value = [];
+ }
if (deviceConfigList.value.length) {
if (deviceConfigList.value.length > ActiveRowIndex.value) {
activeDeviceConfig.value = deviceConfigList.value[ActiveRowIndex.value];
diff --git a/vite.config.js b/vite.config.js
index ae20aaf..0d1e1fa 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -23,7 +23,7 @@ const viteConfig = defineConfig((mode) => {
root: process.cwd(),
resolve: { alias },
// base: mode.command === 'serve' ? '/gy-gateway' : '/gy-gateway',
- base: mode.command === 'serve' ? '/gy-gateway' : '/',
+ base: mode.command === 'serve' ? '/' : '/',
optimizeDeps: {
exclude: ['vue-demi'],
},