From 0900103bf6cee7c74ba8b8550d04d8fccf91062b Mon Sep 17 00:00:00 2001 From: donghao Date: Fri, 23 Aug 2024 17:56:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8C=89UI=E5=9B=BE=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=82=B9=E4=BD=8D=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Action/src/isAction.tsx | 3 +- src/components/Action/src/isDelete.tsx | 81 ----------------- src/style/element-plus.scss | 10 ++- .../deviceSetting/components/deviceAttr.vue | 12 ++- .../deviceSetting/components/deviceSelect.vue | 90 ++++++++++++------- src/views/deviceSetting/index.scss | 35 +++++++- 6 files changed, 108 insertions(+), 123 deletions(-) delete mode 100644 src/components/Action/src/isDelete.tsx diff --git a/src/components/Action/src/isAction.tsx b/src/components/Action/src/isAction.tsx index b15a01d..2d9e810 100644 --- a/src/components/Action/src/isAction.tsx +++ b/src/components/Action/src/isAction.tsx @@ -2,7 +2,7 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2024-08-20 15:31:30 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-08-22 17:42:58 + * @LastEditTime: 2024-08-23 16:59:59 * @FilePath: \General-AI-Platform-Web-Client\src\components\TableActionCard\isAction.tsx * @Description: 是否操作行为 */ @@ -10,7 +10,6 @@ import { defineComponent, PropType } from "vue"; import { ElDialog, ElButton } from "element-plus"; import warnIcon from "@/assets/modelSetting/warn_icon.png"; import "./isAction.scss"; -// TODO 完善操作交互 export default defineComponent({ name: "IsDelete", props: { diff --git a/src/components/Action/src/isDelete.tsx b/src/components/Action/src/isDelete.tsx deleted file mode 100644 index b8c48ff..0000000 --- a/src/components/Action/src/isDelete.tsx +++ /dev/null @@ -1,81 +0,0 @@ -/* - * @Author: donghao donghao@supervision.ltd - * @Date: 2024-02-22 13:38:04 - * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2024-08-22 17:46:27 - * @FilePath: \General-AI-Platform-Web-Client\src\components\TableActionCard\isDelete.tsx - * @Description: 是否删除 - */ -import { defineComponent, PropType } from "vue"; -import { ElDialog, ElButton } from "element-plus"; -// TODO 完善删除交互 -export default defineComponent({ - name: "IsDelete", - props: { - title: { - type: String as PropType, - default: "提示" - }, - message: { - type: String as PropType, - default: "确定要删除吗?" - }, - visible: { - type: Boolean as PropType, - required: true - } - }, - emits: ["update:visible", "confirm"], - setup(props, { emit }) { - // const visible = ref(props.visible); - - const handleConfirm = () => { - emit("confirm"); - // visible.value = false; - // emit("update:visible", false); - }; - - const handleCancel = () => { - // visible.value = false; - emit("update:visible", false); - }; - - const handleClose = () => { - // visible.value = false; - emit("update:visible", false); - // done(); - }; - - watch( - () => props.visible, - val => { - visible.value = val; - } - ); - - return () => ( - <>123 - }} - v-slots={{ - footer: () => ( - <> - 取消 - - 删除 - - - ) - }} - > - {props.message} - - ); - } -}); diff --git a/src/style/element-plus.scss b/src/style/element-plus.scss index c849a0f..1f373c0 100644 --- a/src/style/element-plus.scss +++ b/src/style/element-plus.scss @@ -48,7 +48,7 @@ /* 自定义 tooltip 的类名 */ .pure-tooltip { - // 右侧操作面板right-panel类名的z-index为40000,tooltip需要大于它才能显示 + /* 右侧操作面板right-panel类名的z-index为40000,tooltip需要大于它才能显示 */ z-index: 41000 !important; } @@ -193,8 +193,6 @@ } /* table */ - -// 列表操作栏 .table_action_box { .el-button { padding: 0; @@ -207,3 +205,9 @@ .el-table__inner-wrapper::before { background-color: transparent !important; } + +/* 气泡框 */ + +.el-popover.el-popper { + padding: 16px !important; +} diff --git a/src/views/deviceSetting/components/deviceAttr.vue b/src/views/deviceSetting/components/deviceAttr.vue index abf6456..e1b1c4e 100644 --- a/src/views/deviceSetting/components/deviceAttr.vue +++ b/src/views/deviceSetting/components/deviceAttr.vue @@ -25,11 +25,12 @@ const { mixinState, canvasEditor } = useSelect(); const { fetchViewsBoundaries, isMoveDevice } = useDeviceObject(); /**业务属性 */ const formData = ref({ + name: "", icon: 1 }); const rules = { - icon: [{ required: true, message: "请选择图标类型", trigger: "change" }] + icon: [{ required: false, message: "请选择图标类型", trigger: "change" }] }; const iconOptions = ref([ @@ -307,6 +308,10 @@ onBeforeUnmount(() => { - - diff --git a/src/views/deviceSetting/index.scss b/src/views/deviceSetting/index.scss index 189a67f..b58cd0d 100644 --- a/src/views/deviceSetting/index.scss +++ b/src/views/deviceSetting/index.scss @@ -66,7 +66,7 @@ .point_detail_wrap { .deviceOfPoint_wrap { border: 1px dashed #ddd; - height: calc(100vh - 290px); + height: calc(100vh - 300px); } .footer_btns { padding: 16px 0; @@ -77,9 +77,12 @@ /* TODO 待使用 */ .right-bar { margin-left: 16px; - width: 241px; + width: 304.07px; height: calc(100vh - 300px); overflow-y: scroll; + background: #fafbff; + border-radius: 4px; + border: 1px solid rgba(21, 77, 221, 0.1); } #workspace { flex: 1; @@ -90,6 +93,7 @@ } /* 选择设备栏位 */ .deviceSelect_toolbar { + font-size: 14px; .deviceSelect_list { li { border-radius: 2px; @@ -99,11 +103,38 @@ } } } + .bind_tag { + width: 52px; + height: 24px; + background: rgba(82, 196, 26, 0.05); + border-radius: 2px; + border: 1px solid #52c41a; + font-size: 12px; + color: #52c41a; + line-height: 24px; + } + .device_info_btn { + color: #333333; + } +} +.device_info_box { + .device_info_items { + & > li { + padding-bottom: 12px; + &:last-child { + padding-bottom: 0; + } + } + } } /* 设备属性栏位 */ .deviceAtrr_toolbar { + padding: 12px; .el-radio__label { display: flex; align-items: center; } + .el-form-item__label { + color: #000000; + } }