Commit 0ef832d54baebe768f82c85aa0d5754e03fa5b40
1 parent
6296d469
feat: 列表下的表格 设备最新数据轮播列表,修改选择了产品,清除选择设备下拉选择值
Showing
2 changed files
with
21 additions
and
9 deletions
@@ -45,17 +45,25 @@ export const useChartInteract = ( | @@ -45,17 +45,25 @@ export const useChartInteract = ( | ||
45 | }) | 45 | }) |
46 | } else { | 46 | } else { |
47 | if (targetItem.id === item.interactComponentId) { | 47 | if (targetItem.id === item.interactComponentId) { |
48 | - const { Params, Header } = toRefs(targetItem.request.requestParams) | ||
49 | - Object.keys(item.interactFn).forEach(key => { | ||
50 | - if (Params.value[key]) { | ||
51 | - Params.value[key] = param[item.interactFn[key]] | ||
52 | - console.log(Params.value[key]) | 48 | + const { Params, Header } = toRefs(targetItem.request.requestParams) |
49 | + //特殊处理 只针对两个下拉选择器,一个是产品下拉,一个是设备下拉,选择了产品,设备列表选择值清空 | ||
50 | + if (targetItem.chartConfig.title.includes('设备列表下拉选择器')) { | ||
51 | + if (window.location.href.includes('preview')) { | ||
52 | + if (window.sessionStorage.getItem('deviceProfileSelectStatus') === 'selected') { | ||
53 | + targetItem.option.selectValue = "'" | ||
53 | } | 54 | } |
54 | - if (Header.value[key]) { | ||
55 | - Header.value[key] = param[item.interactFn[key]] | ||
56 | - } | ||
57 | - }) | 55 | + } |
58 | } | 56 | } |
57 | + // | ||
58 | + Object.keys(item.interactFn).forEach(key => { | ||
59 | + if (Params.value[key]) { | ||
60 | + Params.value[key] = param[item.interactFn[key]] | ||
61 | + } | ||
62 | + if (Header.value[key]) { | ||
63 | + Header.value[key] = param[item.interactFn[key]] | ||
64 | + } | ||
65 | + }) | ||
66 | + } | ||
59 | } | 67 | } |
60 | // | 68 | // |
61 | }) | 69 | }) |
@@ -45,6 +45,10 @@ const onChange = (v: string[] | string) => { | @@ -45,6 +45,10 @@ const onChange = (v: string[] | string) => { | ||
45 | { [ComponentInteractParamsEnum.DATA]: v }, | 45 | { [ComponentInteractParamsEnum.DATA]: v }, |
46 | InteractEventOn.CHANGE | 46 | InteractEventOn.CHANGE |
47 | ) | 47 | ) |
48 | + // 特殊处理 只针对两个下拉选择器,一个是产品下拉,一个是设备下拉,选择了产品,存储到sessionStorage里,用来判断预览时点击产品下拉,清除设备下拉值 | ||
49 | + if (window.location.href.includes('preview')) { | ||
50 | + window.sessionStorage.setItem('deviceProfileSelectStatus', 'selected') | ||
51 | + } | ||
48 | } | 52 | } |
49 | 53 | ||
50 | // 手动更新 | 54 | // 手动更新 |