diff --git a/components.d.ts b/components.d.ts
index 36a3eb55..01a36e5e 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -11,6 +11,8 @@ declare module '@vue/runtime-core' {
ACol: typeof import('ant-design-vue/es')['Col']
ARow: typeof import('ant-design-vue/es')['Row']
ATooltip: typeof import('ant-design-vue/es')['Tooltip']
+ BadgeStatus: typeof import('./src/components/BadgeStatus/index.vue')['default']
+ CardBox: typeof import('./src/components/CardBox/index.vue')['default']
GeoComponent: typeof import('./src/components/GeoComponent/index.vue')['default']
MonacoEditor: typeof import('./src/components/MonacoEditor/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
diff --git a/src/components/BadgeStatus/index.vue b/src/components/BadgeStatus/index.vue
new file mode 100644
index 00000000..47870618
--- /dev/null
+++ b/src/components/BadgeStatus/index.vue
@@ -0,0 +1,33 @@
+
+
+
+
+
diff --git a/src/components/CardBox/index.vue b/src/components/CardBox/index.vue
new file mode 100644
index 00000000..7eda82d6
--- /dev/null
+++ b/src/components/CardBox/index.vue
@@ -0,0 +1,382 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/GeoComponent/index.vue b/src/components/GeoComponent/index.vue
index c22186a3..d2b051bf 100644
--- a/src/components/GeoComponent/index.vue
+++ b/src/components/GeoComponent/index.vue
@@ -1,3 +1,4 @@
+
@@ -23,6 +24,7 @@
@click="clickMap"
>
+
{{ mapPoint }}
@@ -49,7 +51,7 @@ const props = defineProps({
});
const emit = defineEmits();
-// 手动输入的坐标点
+// 手动输入的坐标点(经纬度字符串)
const inputPoint = computed({
get: () => {
return props.point;
@@ -67,13 +69,15 @@ const handleModalSubmit = () => {
modalVis.value = false;
};
-// 地图拾取的坐标点
+// 地图拾取的坐标点(经纬度字符串)
const mapPoint = ref('');
const zoom = ref(12);
const center = ref([106.55, 29.56]);
let map: any = null;
-let marker: any = null;
+
+// 地图经纬度
+const position = ref([]);
/**
* 地图初始化
@@ -83,11 +87,7 @@ const initMap = (e: any) => {
map = e;
const pointStr = mapPoint.value as string;
- if (marker) map.remove(marker);
- marker = new AMap.Marker({
- position: pointStr ? pointStr.split(',') : center.value,
- });
- map.add(marker);
+ position.value = pointStr ? pointStr.split(',') : center.value;
};
/**
@@ -96,13 +96,7 @@ const initMap = (e: any) => {
*/
const clickMap = (e: any) => {
mapPoint.value = `${e.lnglat.lng},${e.lnglat.lat}`;
-
- if (marker) map.remove(marker);
-
- marker = new AMap.Marker({
- position: [e.lnglat.lng, e.lnglat.lat],
- });
- map.add(marker);
+ position.value = [e.lnglat.lng, e.lnglat.lat];
};
/**
diff --git a/src/components/ValueItem/index.vue b/src/components/ValueItem/index.vue
index d48729ce..f5387595 100644
--- a/src/components/ValueItem/index.vue
+++ b/src/components/ValueItem/index.vue
@@ -1,14 +1,15 @@
+
@@ -32,11 +33,11 @@
diff --git a/src/components/ValueItem/types.d.ts b/src/components/ValueItem/types.d.ts
new file mode 100644
index 00000000..5da7e778
--- /dev/null
+++ b/src/components/ValueItem/types.d.ts
@@ -0,0 +1,19 @@
+export type ItemData = {
+ type: string
+}
+
+export type ITypes = {
+ int: string
+ long: string
+ float: string
+ double: string
+ string: string
+ array: string
+ password: string
+ enum: string
+ boolean: string
+ date: string
+ object: string
+ geoPoint: string
+ file: string
+}
\ No newline at end of file
diff --git a/src/utils/consts.ts b/src/utils/consts.ts
index 49022e9a..68b9fbaa 100644
--- a/src/utils/consts.ts
+++ b/src/utils/consts.ts
@@ -17,3 +17,14 @@ export const STATE_COLOR = {
// 已停止
'stopped': '#F2994A'
}
+
+/**
+ * 卡片组件状态
+ */
+export const StatusColorEnum = {
+ 'success': 'success',
+ 'error': 'error',
+ 'processing': 'processing',
+ 'warning': 'warning',
+ 'default': 'default',
+}
diff --git a/src/views/demo/index.vue b/src/views/demo/index.vue
index 03fc9182..839a08d8 100644
--- a/src/views/demo/index.vue
+++ b/src/views/demo/index.vue
@@ -3,13 +3,78 @@
父级: {{ testValue }}
+
+
卡片组件:
+
+
+
+
+
+
+
+ 设备名称
+
+
+
+ 设备类型
+
+ 直连设备
+
+
+
+ 产品名称
+
+ 测试固定地址
+
+
+
+
+
+
-
+