diff --git a/public/images/access-config-diaabled.png b/public/images/access-config-disabled.png
similarity index 100%
rename from public/images/access-config-diaabled.png
rename to public/images/access-config-disabled.png
diff --git a/src/components/BadgeStatus/color.ts b/src/components/BadgeStatus/color.ts
index 6d9f18d3..c3f05abf 100644
--- a/src/components/BadgeStatus/color.ts
+++ b/src/components/BadgeStatus/color.ts
@@ -1,12 +1,12 @@
const color = {
- 'processing': '64, 169, 255',
- 'error': '247, 79, 70',
- 'success': '74, 234, 220',
- 'warning': '250, 178, 71',
- 'default': '63, 73, 96'
+ 'processing': '9, 46, 231',
+ 'error': '229, 0, 18',
+ 'success': '36, 178, 118',
+ 'warning': '255, 144, 0',
+ 'default': '102, 102, 102'
}
-export const getHexColor = (code: string, pe: number = 0.3) => {
+export const getHexColor = (code: string, pe: number = 0.1) => {
const _color = color[code] || color.default
if (code === 'default') {
pe = 0.1
diff --git a/src/components/CardBox/index.vue b/src/components/CardBox/index.vue
index 6174471a..4ef5c521 100644
--- a/src/components/CardBox/index.vue
+++ b/src/components/CardBox/index.vue
@@ -6,6 +6,18 @@
@click="handleClick"
>
+
+
-
-
import BadgeStatus from '@/components/BadgeStatus/index.vue';
-import { getHexColor } from '../BadgeStatus/color'
+import color, { getHexColor } from '../BadgeStatus/color';
import type { ActionsType } from '@/components/Table';
import { PropType } from 'vue';
@@ -123,6 +133,15 @@ const props = defineProps({
},
});
+const getBackgroundColor = (code: string) => {
+ const _color = color[code] || color.default;
+ return `linear-gradient(
+ 188.4deg,
+ rgba(${_color}, 0.03) 22.94%,
+ rgba(${_color}, 0) 94.62%
+ )`;
+};
+
const handleClick = () => {
emit('click', props.value);
};
@@ -257,6 +276,33 @@ const handleClick = () => {
}
}
+ .card-content-bg1 {
+ position: absolute;
+ right: -5%;
+ height: 100%;
+ width: 44.65%;
+ top: 0;
+ background: linear-gradient(
+ 188.4deg,
+ rgba(229, 0, 18, 0.03) 22.94%,
+ rgba(229, 0, 18, 0) 94.62%
+ );
+ transform: skewX(-15deg);
+ }
+
+ .card-content-bg2 {
+ position: absolute;
+ right: -5%;
+ height: 100%;
+ width: calc(44.65% + 34px);
+ top: 0;
+ background: linear-gradient(
+ 188.4deg,
+ rgba(229, 0, 18, 0.03) 22.94%,
+ rgba(229, 0, 18, 0) 94.62%
+ );
+ transform: skewX(-15deg);
+ }
.card-mask {
position: absolute;
top: 0;
@@ -268,7 +314,7 @@ const handleClick = () => {
width: 100%;
height: 100%;
color: #fff;
- background-color: rgba(#000, .5);
+ background-color: rgba(#000, 0.5);
visibility: hidden;
cursor: pointer;
transition: all 0.3s;
diff --git a/src/components/PermissionButton/index.vue b/src/components/PermissionButton/index.vue
index 8ef32c2e..44733152 100644
--- a/src/components/PermissionButton/index.vue
+++ b/src/components/PermissionButton/index.vue
@@ -83,7 +83,7 @@ const props = defineProps({
type: Object as PropType,
},
hasPermission: {
- type: String || Array,
+ type: String || Array || Boolean,
},
style: {
type: Object as PropType
@@ -96,7 +96,7 @@ const props = defineProps({
const permissionStore = usePermissionStore()
const isPermission = computed(() => {
- if (!props.hasPermission) {
+ if (!props.hasPermission || props.hasPermission === true) {
return true
}
return permissionStore.hasPermission(props.hasPermission)
diff --git a/src/store/product.ts b/src/store/product.ts
index 0cf68527..7c23a80c 100644
--- a/src/store/product.ts
+++ b/src/store/product.ts
@@ -29,5 +29,9 @@ export const useProductStore = defineStore({
setTabActiveKey(key: string) {
this.tabActiveKey = key
},
+ reSet(){
+ this.current = {} as ProductItem
+ this.detail = {} as ProductItem
+ }
}
})
\ No newline at end of file
diff --git a/src/views/Northbound/AliCloud/index.vue b/src/views/Northbound/AliCloud/index.vue
index ec33051d..e5acf97c 100644
--- a/src/views/Northbound/AliCloud/index.vue
+++ b/src/views/Northbound/AliCloud/index.vue
@@ -27,11 +27,12 @@
@@ -39,19 +40,20 @@
-
- {{ slotProps.name }}
-
-
+
+
+ {{ slotProps.name }}
+
+
+
网桥产品
- {{ slotProps?.bridgeProductName }}
+
+ {{ slotProps?.bridgeProductName }}
+
@@ -85,9 +87,13 @@
-
@@ -100,7 +106,7 @@
:disabled="i.disabled"
:popConfirm="i.popConfirm"
:tooltip="i.tooltip"
- style="padding: 0px"
+ style="padding: 0 5px"
@click="i.onClick"
type="link"
:hasPermission="'Northbound/AliCloud:' + i.key"
@@ -116,20 +122,17 @@
\ No newline at end of file
+const onChange = () => {
+ _emit('update:modelValue', modelRef.dataSource);
+};
+
+const onSave = () =>
+ new Promise((resolve, reject) => {
+ formRef.value
+ .validate()
+ .then(() => {
+ resolve([...modelRef.dataSource]);
+ })
+ .catch(() => {
+ reject(false);
+ });
+ });
+
+defineExpose({ onSave });
+
+
+
\ No newline at end of file
diff --git a/src/views/Northbound/DuerOS/Detail/command/index.vue b/src/views/Northbound/DuerOS/Detail/command/index.vue
index efd19ebc..fc2ec36c 100644
--- a/src/views/Northbound/DuerOS/Detail/command/index.vue
+++ b/src/views/Northbound/DuerOS/Detail/command/index.vue
@@ -1,76 +1,156 @@
-
+
-
-
- 读取属性
- 修改属性
- 调用功能
+
+
+ 读取属性
+ 修改属性
+ 调用功能
-
-
-
- {{i.name}}
+
+
+
+ {{ i.name }}
-
-
+
+
-
-
- {{i.name}}
+
+
+ {{ i.name }}
-
-
-
+
+
+
@@ -78,101 +158,106 @@
\ No newline at end of file
diff --git a/src/views/Northbound/DuerOS/Detail/index.vue b/src/views/Northbound/DuerOS/Detail/index.vue
index 36894c24..46d2d739 100644
--- a/src/views/Northbound/DuerOS/Detail/index.vue
+++ b/src/views/Northbound/DuerOS/Detail/index.vue
@@ -171,7 +171,8 @@
>
保存
@@ -626,12 +631,11 @@ const saveBtn = async () => {
loading.value = true;
const resp = await savePatch(data).finally(() => {
loading.value = false;
- })
+ });
if (resp.status === 200) {
message.success('操作成功!');
formRef.value.resetFields();
menuStory.jumpPage('Northbound/DuerOS');
-
}
}
})
diff --git a/src/views/Northbound/DuerOS/index.vue b/src/views/Northbound/DuerOS/index.vue
index 7d4b4f02..c9e735d9 100644
--- a/src/views/Northbound/DuerOS/index.vue
+++ b/src/views/Northbound/DuerOS/index.vue
@@ -27,11 +27,12 @@
@@ -39,13 +40,12 @@
-
- {{ slotProps.name }}
-
-
+
+
+ {{ slotProps.name }}
+
+
+
产品
@@ -85,9 +85,13 @@
-
@@ -105,7 +109,7 @@
:tooltip="{
...i.tooltip,
}"
- style="padding: 0px"
+ style="padding: 0 5px"
@click="i.onClick"
type="link"
:hasPermission="'Northbound/DuerOS:' + i.key"
@@ -132,15 +136,12 @@ import type { ActionsType } from '@/views/device/Instance/typings';
import { getImage } from '@/utils/comm';
import { message } from 'jetlinks-ui-components';
import { useMenuStore } from 'store/menu';
+import BadgeStatus from '@/components/BadgeStatus/index.vue';
const instanceRef = ref>({});
const params = ref>({});
const menuStory = useMenuStore();
-const statusMap = new Map();
-statusMap.set('enabled', 'success');
-statusMap.set('disabled', 'error');
-
const columns = [
{
title: '名称',
@@ -193,6 +194,7 @@ const columns = [
title: '说明',
dataIndex: 'description',
key: 'description',
+ ellipsis: true,
},
{
title: '状态',
@@ -211,7 +213,7 @@ const columns = [
title: '操作',
key: 'action',
fixed: 'right',
- width: 250,
+ width: 200,
scopedSlots: true,
},
];
diff --git a/src/views/device/Category/index.vue b/src/views/device/Category/index.vue
index 64ed3cb2..9018bc36 100644
--- a/src/views/device/Category/index.vue
+++ b/src/views/device/Category/index.vue
@@ -76,6 +76,7 @@ import type { ActionsType } from '@/components/Table/index.vue';
import ModifyModal from './components/modifyModal/index.vue';
import type { TableColumnType, TableProps } from 'ant-design-vue';
import { message } from 'ant-design-vue';
+const expandedRowKeys = ref([]);
const tableRef = ref>({});
const modifyRef = ref();
const dataSource = ref([]);
@@ -126,7 +127,7 @@ let params = ref();
* 搜索
*/
const handleSearch = (e: any) => {
- params.value = e
+ params.value = e;
};
/**
* 操作栏按钮
diff --git a/src/views/device/Instance/Detail/index.vue b/src/views/device/Instance/Detail/index.vue
index cd613b7e..5ef614f4 100644
--- a/src/views/device/Instance/Detail/index.vue
+++ b/src/views/device/Instance/Detail/index.vue
@@ -8,20 +8,25 @@
-
-
+
返回
+
{{ instanceStore.current.name }}
-
+
+ 状态:
+
+ {{ instanceStore.current.state?.text }}
+
+
{{
instanceStore.current.id
@@ -199,8 +204,8 @@ watch(
);
onMounted(() => {
- instanceStore.tabActiveKey = history.state?.params?.tab || 'Info'
-})
+ instanceStore.tabActiveKey = history.state?.params?.tab || 'Info';
+});
const onBack = () => {
menuStory.jumpPage('device/Instance');
@@ -284,7 +289,10 @@ watchEffect(() => {
tab: 'OPC UA',
});
}
- if (instanceStore.current.deviceType?.value === 'gateway' && !keys.includes('ChildDevice')) {
+ if (
+ instanceStore.current.deviceType?.value === 'gateway' &&
+ !keys.includes('ChildDevice')
+ ) {
// 产品类型为网关的情况下才显示此模块
list.value.push({
key: 'ChildDevice',
diff --git a/src/views/device/Instance/index.vue b/src/views/device/Instance/index.vue
index 54f908da..82b6bd6a 100644
--- a/src/views/device/Instance/index.vue
+++ b/src/views/device/Instance/index.vue
@@ -143,7 +143,7 @@
:status="slotProps.state?.value"
:statusText="slotProps.state?.text"
:statusNames="{
- online: 'success',
+ online: 'processing',
offline: 'error',
notActive: 'warning',
}"
@@ -202,9 +202,14 @@
-
@@ -226,7 +231,7 @@
}"
@click="i.onClick"
type="link"
- style="padding: 0px"
+ style="padding: 0 5px"
:hasPermission="'device/Instance:' + i.key"
>
@@ -289,6 +294,7 @@ import { queryTree } from '@/api/device/category';
import { useMenuStore } from '@/store/menu';
import type { ActionsType } from './typings';
import dayjs from 'dayjs';
+import BadgeStatus from '@/components/BadgeStatus/index.vue';
const instanceRef = ref>({});
const params = ref>({});
@@ -303,11 +309,6 @@ const type = ref('');
const menuStory = useMenuStore();
-const statusMap = new Map();
-statusMap.set('online', 'success');
-statusMap.set('offline', 'error');
-statusMap.set('notActive', 'warning');
-
const columns = [
{
title: 'ID',
@@ -479,6 +480,7 @@ const columns = [
title: '说明',
dataIndex: 'describe',
key: 'describe',
+ ellipsis: true,
search: {
type: 'string',
},
@@ -487,7 +489,7 @@ const columns = [
title: '操作',
key: 'action',
fixed: 'right',
- width: 250,
+ width: 200,
scopedSlots: true,
},
];
@@ -525,10 +527,10 @@ const paramsFormat = (
};
onMounted(() => {
- if(history.state?.params?.type === 'add'){
- handleAdd()
+ if (history.state?.params?.type === 'add') {
+ handleAdd();
}
-})
+});
const handleParams = (config: Record) => {
const _terms: Record = {};
diff --git a/src/views/device/Product/Detail/DeviceAccess/index.vue b/src/views/device/Product/Detail/DeviceAccess/index.vue
index 5f8d872d..5925057d 100644
--- a/src/views/device/Product/Detail/DeviceAccess/index.vue
+++ b/src/views/device/Product/Detail/DeviceAccess/index.vue
@@ -589,6 +589,7 @@ const search = (e: any) => {
};
};
+const stepsRef = reactive({current:0})
//引导页数据
const steps = [
{
@@ -673,19 +674,19 @@ const driver = new Driver({
nextBtnText: '下一步',
prevBtnText: '上一步',
onNext: () => {
- // ref.current = ref.current + 1;
+ stepsRef.current = stepsRef.current + 1;
},
onPrevious: () => {
- // ref.current = ref.current - 1;
+ stepsRef.current = stepsRef.current - 1;
},
onReset: () => {
- // if (ref.current !== 3) {
- // guide({
- // name: 'guide',
- // content: 'skip',
- // });
- // }
- // ref.current = 0;
+ if (stepsRef.current !== 3) {
+ guide({
+ name: 'guide',
+ content: 'skip',
+ });
+ }
+ stepsRef.current = 0;
},
});
@@ -695,16 +696,20 @@ const driver1 = new Driver({
closeBtnText: '不再提示',
nextBtnText: '下一步',
prevBtnText: '上一步',
- onNext: () => {},
- onPrevious: () => {},
+ onNext: () => {
+ stepsRef.current = stepsRef.current + 1;
+ },
+ onPrevious: () => {
+ stepsRef.current = stepsRef.current - 1;
+ },
onReset: () => {
- // if (ref.current !== 4) {
- // // guide({
- // // name: 'guide',
- // // content: 'skip',
- // // });
- // }
- // ref.current = 0;
+ if (stepsRef.current !== 4) {
+ guide({
+ name: 'guide',
+ content: 'skip',
+ });
+ }
+ stepsRef.current = 0;
},
});
@@ -969,9 +974,11 @@ const submitData = async () => {
productStore.current = { ...res.result };
access.value = res.result;
message.success('操作成功!');
+ getData();
}
visible.value = false;
queryParams.value = {};
+
});
}
} else {
@@ -1085,11 +1092,11 @@ const add = () => {
/**
* 初始化
*/
-watchEffect(() => {
- if (productStore.current?.accessId) {
- getData();
- }
-});
+// watchEffect(() => {
+// if (productStore.current?.accessId) {
+// getData();
+// }
+// });