From 4d9249d2a4e7091e2099f8257cd8f5655d8171ad Mon Sep 17 00:00:00 2001 From: easy <1358086367@qq.com> Date: Wed, 8 Mar 2023 11:25:59 +0800 Subject: [PATCH 01/39] =?UTF-8?q?update:=20=E9=A6=96=E9=A1=B5=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=9B=BF=E6=8D=A2=E3=80=81=E6=9D=83=E9=99=90=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=96=B9=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/components/BasicCountCard.vue | 77 +++++++++++++------ src/views/home/components/BootCard.vue | 11 ++- .../components/ComprehensiveHome/index.vue | 65 +++++----------- .../home/components/DevOpsHome/index.vue | 58 +++++--------- .../home/components/DeviceHome/index.vue | 21 +++-- src/views/home/components/StepCard.vue | 2 +- src/views/home/{typing.ts => typing.d.ts} | 4 +- 7 files changed, 118 insertions(+), 120 deletions(-) rename src/views/home/{typing.ts => typing.d.ts} (93%) diff --git a/src/views/home/components/BasicCountCard.vue b/src/views/home/components/BasicCountCard.vue index 44b11b0c..6fb3c62e 100644 --- a/src/views/home/components/BasicCountCard.vue +++ b/src/views/home/components/BasicCountCard.vue @@ -1,58 +1,91 @@ From dfdfbb30bd9774ebf81b9b36783d506e6a95af09 Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Wed, 8 Mar 2023 14:59:21 +0800 Subject: [PATCH 07/39] =?UTF-8?q?update:=20=E8=A7=86=E9=A2=91=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E7=BB=84=E4=BB=B6=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/media/Home/index.vue | 135 +++++++++++++++++++++++- src/views/notice/Config/Log/index.vue | 3 +- src/views/notice/Template/Log/index.vue | 3 +- 3 files changed, 136 insertions(+), 5 deletions(-) diff --git a/src/views/media/Home/index.vue b/src/views/media/Home/index.vue index a6ba21cb..aa888616 100644 --- a/src/views/media/Home/index.vue +++ b/src/views/media/Home/index.vue @@ -21,6 +21,56 @@ /> + + + + + + + + @@ -33,6 +83,13 @@ import BasicCountCard from '@/views/media/Home/components/BasicCountCard.vue'; import { usePermissionStore } from '@/store/permission'; import type { bootConfig, recommendList } from '@/views/home/typing'; +import deviceApi from '@/api/media/device'; +import { message } from 'ant-design-vue'; + +import { useMenuStore } from 'store/menu'; + +const menuStory = useMenuStore(); + // 权限控制 const hasPermission = usePermissionStore().hasPermission; @@ -54,6 +111,7 @@ const deviceBootConfig: bootConfig[] = [ link: 'media/Cascade', }, ]; + const deviceStepDetails: recommendList[] = [ { title: '添加视频设备', @@ -66,8 +124,16 @@ const deviceStepDetails: recommendList[] = [ title: '查看通道', details: '查看设备下的通道数据,可以进行直播、录制等操作。', iconUrl: '/images/home/bottom-7.png', - linkUrl: 'media/Device/Channel', + // linkUrl: 'media/Device/Channel', + linkUrl: '', auth: hasPermission('media/Device:view'), + onClick: (row: any) => { + if (hasPermission('media/Device:view')) { + visible.value = true; + } else { + message.warning('暂无权限,请联系管理员'); + } + }, }, { title: '分屏展示', @@ -76,4 +142,71 @@ const deviceStepDetails: recommendList[] = [ linkUrl: 'media/SplitScreen', }, ]; + +// 选择设备 +const visible = ref(false); +const columns = [ + { + title: 'ID', + dataIndex: 'id', + key: 'id', + search: { + type: 'string', + }, + }, + { + title: '名称', + dataIndex: 'name', + key: 'name', + search: { + type: 'string', + }, + }, + { + title: '通道数量', + dataIndex: 'channelNumber', + key: 'channelNumber', + }, + { + title: '状态', + dataIndex: 'state', + key: 'state', + scopedSlots: true, + search: { + type: 'select', + options: [ + { label: '在线', value: 'online' }, + { label: '离线', value: 'offline' }, + ], + handleValue: (v: any) => { + return v; + }, + }, + }, +]; +const params = ref>({}); + +/** + * 搜索 + * @param params + */ +const handleSearch = (e: any) => { + params.value = e; +}; + +const deviceItem = ref(); +const handleSubmit = () => { + if (deviceItem.value && deviceItem.value.id) { + menuStory.jumpPage( + 'media/Device/Channel', + {}, + { + id: deviceItem.value.id, + type: deviceItem.value.provider, + }, + ); + } else { + message.warning('请选择设备'); + } +}; diff --git a/src/views/notice/Config/Log/index.vue b/src/views/notice/Config/Log/index.vue index 8865041d..c0edb899 100644 --- a/src/views/notice/Config/Log/index.vue +++ b/src/views/notice/Config/Log/index.vue @@ -1,9 +1,8 @@ - - +
- - - - + - - - + + - - - + - - - + - - +
- - - + OAuth2 - - + + 基本认证 - - + + bearer认证 - - - + + +
- - - + - - - + 请求体 - - + + 请求头 - - - + + + - - - - + - - +
- - - - + - - +
- - - +
- + - - - + - - - - + @@ -685,12 +685,12 @@ tooltip="授权完成后跳转到具体页面的回调地址" /> - - - + - + > - - + + - {{ name }} - + - +
- + - - - - + + - +
- + - @@ -815,7 +815,7 @@
- - - + - - - - + - - - + - - +
- - - +
- - - - + + -
+
-
点击上传图片
- + - - - - + - - - + - - - - + + - +
- - - + - - - + - - - + - - - +
- + - - +
- - - - + - - + - - + + > - - - + + {{ name }} - + - +
- - + + - - + - - + + - 保存 - +
@@ -1415,7 +1414,6 @@ const menuStory = useMenuStore(); const deptPermission = 'system/Department'; const rolePermission = 'system/Role'; -const dialogRef = ref(); // 初始化表单 const initForm: formType = { name: '', @@ -1584,6 +1582,12 @@ const joinOptions = computed(() => { ]; }); +const dialog = reactive({ + visible: false, + selectId: '', + selectProvider: '' as any, +}); + init(); function init() { @@ -1703,11 +1707,9 @@ function clickSave() { const isPage = params.integrationModes.includes('page'); if (isPage) { form.data = params; - dialogRef.value && - dialogRef.value.openDialog( - routeQuery.id || resp.result.id, - form.data.provider, - ); + dialog.selectId = routeQuery.id || resp.result.id; + dialog.selectProvider = form.data.provider; + dialog.visible = true; } else { message.success('保存成功'); menuStory.jumpPage('system/Apply'); @@ -1783,7 +1785,7 @@ function clearNullProp(obj: object) { max-width: 150px; max-height: 150px; - >.ant-upload { + > .ant-upload { height: 150px; } } diff --git a/src/views/system/Apply/Save/components/FormLabel.vue b/src/views/system/Apply/Save/components/FormLabel.vue index 4be698bd..e7842dcd 100644 --- a/src/views/system/Apply/Save/components/FormLabel.vue +++ b/src/views/system/Apply/Save/components/FormLabel.vue @@ -2,10 +2,10 @@
{{ props.text }} * - + - +
diff --git a/src/views/system/Apply/Save/components/RequestTable.vue b/src/views/system/Apply/Save/components/RequestTable.vue index 4c8ff9ee..7ebb7f31 100644 --- a/src/views/system/Apply/Save/components/RequestTable.vue +++ b/src/views/system/Apply/Save/components/RequestTable.vue @@ -1,52 +1,52 @@ @@ -120,7 +120,6 @@ function addRow() { label: '', value: '', }; - console.log(111); emits('update:value', [...props.value, newRow]); } diff --git a/src/views/system/Apply/Save/index.vue b/src/views/system/Apply/Save/index.vue index b18dfb58..8797e473 100644 --- a/src/views/system/Apply/Save/index.vue +++ b/src/views/system/Apply/Save/index.vue @@ -1,13 +1,13 @@ @@ -21,3 +21,10 @@ const chengeType = (newType: applyType) => { rightType.value = newType; }; + + diff --git a/src/views/system/Apply/componenets/MenuDialog.vue b/src/views/system/Apply/componenets/MenuDialog.vue index bc4a5d7a..a5c306b0 100644 --- a/src/views/system/Apply/componenets/MenuDialog.vue +++ b/src/views/system/Apply/componenets/MenuDialog.vue @@ -1,30 +1,30 @@ - - + + diff --git a/src/components/index.ts b/src/components/index.ts index a41944b2..f27cd374 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1,5 +1,5 @@ import type { App } from 'vue' -import AIcon from './AIcon' +// import AIcon from './AIcon' import PermissionButton from './PermissionButton/index.vue' import JTable from './Table/index' import TitleComponent from "./TitleComponent/index.vue"; @@ -10,7 +10,7 @@ import NormalUpload from './NormalUpload/index.vue' import FileFormat from './FileFormat/index.vue' import JProUpload from './JUpload/index.vue' import { BasicLayoutPage, BlankLayoutPage } from './Layout' -import { PageContainer } from 'jetlinks-ui-components' +import { PageContainer, AIcon } from 'jetlinks-ui-components' import Ellipsis from './Ellipsis/index.vue' import JEmpty from './Empty/index.vue' import AMapComponent from './AMapComponent/index.vue' diff --git a/src/views/rule-engine/Scene/Save/components/DropdownButton.vue b/src/views/rule-engine/Scene/Save/components/DropdownButton.vue deleted file mode 100644 index 36de7ff3..00000000 --- a/src/views/rule-engine/Scene/Save/components/DropdownButton.vue +++ /dev/null @@ -1,153 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/DropdownButton/DropdownButton.vue b/src/views/rule-engine/Scene/Save/components/DropdownButton/DropdownButton.vue new file mode 100644 index 00000000..52992e07 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/components/DropdownButton/DropdownButton.vue @@ -0,0 +1,143 @@ + + + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/DropdownButton/Menus.vue b/src/views/rule-engine/Scene/Save/components/DropdownButton/Menus.vue new file mode 100644 index 00000000..0a48897a --- /dev/null +++ b/src/views/rule-engine/Scene/Save/components/DropdownButton/Menus.vue @@ -0,0 +1,81 @@ + + + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/DropdownButton/Time.vue b/src/views/rule-engine/Scene/Save/components/DropdownButton/Time.vue new file mode 100644 index 00000000..ab9a7983 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/components/DropdownButton/Time.vue @@ -0,0 +1,89 @@ + + + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/DropdownButton/index.less b/src/views/rule-engine/Scene/Save/components/DropdownButton/index.less new file mode 100644 index 00000000..359d9041 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/components/DropdownButton/index.less @@ -0,0 +1,44 @@ +.dropdown-button { + display: flex; + align-items: center; + padding: 6px 8px; + border: 1px solid #d9d9d9; + border-radius: 8px; + cursor: pointer; +} + +.scene-select-content { + position: relative; + min-width: 220px; + padding: 4px; + background: #fff; + border-radius: 2px; + box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d; +} + +.column { + color: #00a4fe; + background-color: rgba(154, 219, 255, 0.3); + border-color: rgba(0, 164, 254, 0.3); +} + +.termType { + color: #2f54eb; + background-color: rgba(163, 202, 255, 0.3); + border-color: rgba(47, 84, 235, 0.3); +} + +.value { + color: #692ca7; + background-color: rgba(188, 125, 238, 0.1); + border-color: rgba(188, 125, 238, 0.5); +} + +.type { + padding: 5px 10px; +} + +.tree-title-description { + padding-left: 5px; + color: grey; +} \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/DropdownButton/index.ts b/src/views/rule-engine/Scene/Save/components/DropdownButton/index.ts new file mode 100644 index 00000000..214d6ef1 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/components/DropdownButton/index.ts @@ -0,0 +1,9 @@ +import Dropdown from './DropdownButton.vue' +import DropdownMenus from './Menus.vue' +import DropdownTimePicker from './Time.vue' + +export default Dropdown + +export { + DropdownMenus, DropdownTimePicker +} \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/DropdownButton/util.ts b/src/views/rule-engine/Scene/Save/components/DropdownButton/util.ts new file mode 100644 index 00000000..ba64375e --- /dev/null +++ b/src/views/rule-engine/Scene/Save/components/DropdownButton/util.ts @@ -0,0 +1,42 @@ +export type DropdownButtonOptions = { + label: string; + value: string; + children?: DropdownButtonOptions[]; + [key: string]: any; +}; + +export const getComponent = (type: string): string => { + switch (type) { + case 'int': + case 'long': + case 'float': + case 'double': + return 'number' + case 'metric': + case 'enum': + case 'boolean': + return 'menu' + case 'date': + return 'date' + case 'tree': + return 'tree' + default: + return 'input' + } +} + +export const getOption = (data: any[], value?: string | number | boolean, key: string = 'name'): DropdownButtonOptions | any => { + let option = {} + if (!value) return option + for (let i = 0; i < data.length; i++) { + const item = data[i] + if (item[key] === value) { + option = data[i] + break + } else if (item.children && item.children.length){ + option = getOption(item.children, value, key) + if (option) break + } + } + return option +} \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/ParamsDropdown.vue b/src/views/rule-engine/Scene/Save/components/ParamsDropdown.vue deleted file mode 100644 index bc101782..00000000 --- a/src/views/rule-engine/Scene/Save/components/ParamsDropdown.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/ParamsDropdown/Double.vue b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/Double.vue new file mode 100644 index 00000000..79c03073 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/Double.vue @@ -0,0 +1,49 @@ + + + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/ParamsDropdown/index.ts b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/index.ts new file mode 100644 index 00000000..dca9540f --- /dev/null +++ b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/index.ts @@ -0,0 +1,8 @@ +import ParamsDropdown from './index.vue' +import DoubleParamsDropdown from './Double.vue' + +export default ParamsDropdown + +export { + DoubleParamsDropdown +} \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/ParamsDropdown/index.vue b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/index.vue new file mode 100644 index 00000000..65010591 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/index.vue @@ -0,0 +1,159 @@ + + + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/components/ParamsDropdown/typings.ts b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/typings.ts new file mode 100644 index 00000000..dfbf0a62 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/typings.ts @@ -0,0 +1,58 @@ +import type { PropType } from 'vue' + +export type LabelType = string | number | undefined + +export type DropdownButtonOptions = { + label: string; + value: string; + children?: DropdownButtonOptions[]; + [key: string]: any; +}; + +export type TabsOption = { + label: string; + key: string; + component: string, + options: DropdownButtonOptions[] +} +type ValueArrayType = [string, number] +export type ValueType = string | number | undefined | ValueArrayType + +export const defaultSetting = { + icon: { + type: String, + default: '' + }, + placeholder: { + type: String, + default: undefined + }, + value: { + type: [String, Number, Array] as PropType, + default: undefined + }, + valueName: { + type: String, + default: 'value' + }, + labelName: { + type: String, + default: 'label' + }, + source: { + type: String, + default: 'fixed' + }, + options: { + type: Array as PropType>, + default: () => [] + }, + metricOptions: { // 指标值 + type: Array as PropType>, + default: () => [] + }, + tabsOptions: { + type: Array as PropType>, + default: () => [] + } +} diff --git a/src/views/rule-engine/Scene/Save/components/Terms/ParamsItem.vue b/src/views/rule-engine/Scene/Save/components/Terms/ParamsItem.vue index 60c55ac2..fa8d0d84 100644 --- a/src/views/rule-engine/Scene/Save/components/Terms/ParamsItem.vue +++ b/src/views/rule-engine/Scene/Save/components/Terms/ParamsItem.vue @@ -16,8 +16,11 @@ @mouseout='mouseout' > - - - + +
-
+
@@ -48,7 +74,9 @@ + + \ No newline at end of file diff --git a/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue new file mode 100644 index 00000000..e28e2733 --- /dev/null +++ b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue @@ -0,0 +1,212 @@ + + + + + \ No newline at end of file diff --git a/src/views/device/Instance/Detail/ChildDevice/EdgeMap/index.vue b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/index.vue new file mode 100644 index 00000000..6d3434ac --- /dev/null +++ b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/index.vue @@ -0,0 +1,337 @@ + + + + + \ No newline at end of file diff --git a/src/views/device/Instance/Detail/ChildDevice/SaveChild/index.vue b/src/views/device/Instance/Detail/ChildDevice/SaveChild/index.vue new file mode 100644 index 00000000..acabb451 --- /dev/null +++ b/src/views/device/Instance/Detail/ChildDevice/SaveChild/index.vue @@ -0,0 +1,106 @@ + + + + \ No newline at end of file diff --git a/src/views/device/Instance/Detail/ChildDevice/index.vue b/src/views/device/Instance/Detail/ChildDevice/index.vue index 214a9491..14c50cdc 100644 --- a/src/views/device/Instance/Detail/ChildDevice/index.vue +++ b/src/views/device/Instance/Detail/ChildDevice/index.vue @@ -1,91 +1,113 @@ @@ -97,11 +119,17 @@ import { useInstanceStore } from '@/store/instance'; import { storeToRefs } from 'pinia'; import { message } from 'ant-design-vue'; import BindChildDevice from './BindChildDevice/index.vue'; +import { usePermissionStore } from '@/store/permission'; +import SaveChild from './SaveChild/index.vue'; const instanceStore = useInstanceStore(); const { detail } = storeToRefs(instanceStore); const router = useRouter(); - +const childVisible = ref(false); +const permissionStore = usePermissionStore(); +// watchEffect(() => { +// console.log(detail.value); +// }); const statusMap = new Map(); statusMap.set('online', 'success'); statusMap.set('offline', 'error'); @@ -111,6 +139,7 @@ const childDeviceRef = ref>({}); const params = ref>({}); const _selectedRowKeys = ref([]); const visible = ref(false); +const current = ref({}); const columns = [ { @@ -192,7 +221,7 @@ const getActions = (data: Partial>): ActionsType[] => { }, }, { - key: 'unbind', + key: 'action', text: '解绑', tooltip: { title: '解绑', @@ -215,6 +244,18 @@ const getActions = (data: Partial>): ActionsType[] => { }, }, }, + { + key: 'update', + text: '编辑', + tooltip: { + title: '编辑', + }, + icon: 'EditOutlined', + onClick: () => { + current.value = data; + childVisible.value = true; + }, + }, ]; }; @@ -252,6 +293,10 @@ const closeBindDevice = (val: boolean) => { childDeviceRef.value?.reload(); } }; + +const closeChildSave = () => { + childVisible.value = false; +}; \ No newline at end of file + \ No newline at end of file From 37e381f961c0c4b35264fd01ba2b9dccdd23e93d Mon Sep 17 00:00:00 2001 From: easy <1358086367@qq.com> Date: Thu, 9 Mar 2023 17:28:35 +0800 Subject: [PATCH 23/39] =?UTF-8?q?fix:=20=E4=B8=AA=E4=BA=BA=E4=B8=AD?= =?UTF-8?q?=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AIcon/index.tsx | 1 + .../Center/components/EditInfoDialog.vue | 27 ++++++++++-- .../Center/components/EditPasswordDialog.vue | 17 +++++--- src/views/account/Center/index.vue | 43 ++++++++++++++++--- .../components/EditDialog.vue | 19 +++++--- src/views/home/index.vue | 29 ++++++++++--- src/views/system/Platforms/Api/index.vue | 17 +++++--- 7 files changed, 119 insertions(+), 34 deletions(-) diff --git a/src/components/AIcon/index.tsx b/src/components/AIcon/index.tsx index e480afc3..390fe993 100644 --- a/src/components/AIcon/index.tsx +++ b/src/components/AIcon/index.tsx @@ -77,6 +77,7 @@ const iconKeys = [ 'CloudDownloadOutlined', 'PauseCircleOutlined',, 'FormOutlined', + 'EyeInvisibleOutlined', ] const Icon = (props: {type: string}) => { diff --git a/src/views/account/Center/components/EditInfoDialog.vue b/src/views/account/Center/components/EditInfoDialog.vue index fbbbd69d..dc39e839 100644 --- a/src/views/account/Center/components/EditInfoDialog.vue +++ b/src/views/account/Center/components/EditInfoDialog.vue @@ -5,6 +5,7 @@ @ok="handleOk" width="770px" @cancel="emits('update:visible', false)" + :confirmLoading="loading" > @@ -12,7 +13,10 @@ - + - + (); +const loading = ref(false) const form = ref(props.data); const formRef = ref(); const handleOk = () => { formRef.value?.validate().then(() => { + loading.value = true updateMeInfo_api(form.value).then((resp) => { if (resp.status === 200) { message.success('保存成功'); emits('ok'); emits('update:visible', false); } - }); + }).finally(()=>loading.value = false) }); }; diff --git a/src/views/account/Center/components/EditPasswordDialog.vue b/src/views/account/Center/components/EditPasswordDialog.vue index 768d3521..566f2bf0 100644 --- a/src/views/account/Center/components/EditPasswordDialog.vue +++ b/src/views/account/Center/components/EditPasswordDialog.vue @@ -4,6 +4,7 @@ title="重置密码" @ok="handleOk" width="520px" + :confirmLoading="loading" @cancel="emits('update:visible', false)" > @@ -11,7 +12,7 @@ label="旧密码" name="oldPassword" :rules="[ - { required: true }, + { required: true, message: '请输入密码' }, { validator: checkMothods.old, trigger: 'blur' }, ]" > @@ -24,7 +25,7 @@ label="密码" name="newPassword" :rules="[ - { required: true }, + { required: true,message:'请输入密码' }, { validator: checkMothods.new, trigger: 'blur' }, ]" > @@ -37,7 +38,7 @@ label="确认密码" name="confirmPassword" :rules="[ - { required: true }, + { required: true, message: '请输入确认密码' }, { validator: checkMothods.confirm, trigger: 'blur' }, ]" > @@ -63,6 +64,7 @@ const emits = defineEmits(['ok', 'update:visible']); const props = defineProps<{ visible: boolean; }>(); +const loading = ref(false) const formRef = ref(); const form = ref({ oldPassword: '', @@ -72,7 +74,7 @@ const form = ref({ const checkMothods = { old: async (_rule: Rule, value: string) => { - if (!value) return Promise.reject('请输入密码'); + if (!value) return Promise.reject(); try { const resp: any = await checkOldPassword_api(value); if (resp.status === 200 && !resp.result.passed) @@ -83,7 +85,7 @@ const checkMothods = { } }, new: async (_rule: Rule, value: string) => { - if (!value) return Promise.reject('请输入密码'); + if (!value) return Promise.reject(); else if ( form.value.confirmPassword && value !== form.value.confirmPassword @@ -99,7 +101,7 @@ const checkMothods = { } }, confirm: async (_rule: Rule, value: string) => { - if (!value) return Promise.reject('请输入确认密码'); + if (!value) return Promise.reject(); try { const resp: any = await validateField_api('password', value); @@ -114,6 +116,7 @@ const checkMothods = { const handleOk = () => { formRef.value?.validate().then(() => { + loading.value = true const params = { oldPassword: form.value.oldPassword, newPassword: form.value.newPassword, @@ -124,7 +127,7 @@ const handleOk = () => { emits('ok'); emits('update:visible', false); } - }); + }).finally(()=>loading.value = false) }); }; console.clear(); diff --git a/src/views/account/Center/index.vue b/src/views/account/Center/index.vue index 9d0a09ff..f3b392d0 100644 --- a/src/views/account/Center/index.vue +++ b/src/views/account/Center/index.vue @@ -8,10 +8,15 @@ style="width: 350px; justify-content: center" > +
+ +
+
@@ -51,11 +57,17 @@

注册时间

-

{{ moment(userInfo.createTime).format('YYYY-MM-DD HH:mm:ss') }}

+

+ {{ + moment(userInfo.createTime).format( + 'YYYY-MM-DD HH:mm:ss', + ) + }} +

电话

-

{{ userInfo.telephone }}

+

{{ userInfo.telephone || '-' }}

姓名

@@ -117,7 +129,7 @@ type="link" @click="editPasswordVisible = true" > - +
@@ -205,7 +217,7 @@ { + const imageTypes = ['jpg', 'png', 'jfif', 'pjp', 'pjpeg', 'jpeg']; + const typeBool = + imageTypes.filter((typeStr) => type.includes(typeStr)).length > 0; + const sizeBool = size < 4 * 1024 * 1024; + + (typeBool && sizeBool) || message.error('请上传正确格式的图片'); + return typeBool && sizeBool; + }, }); // 首页视图 const isApiUser = ref(); @@ -346,7 +367,7 @@ function getViews() { background-color: #f0f2f5; min-height: 100vh; .card { - margin: 24px; + margin: 16px 0; padding: 24px; background-color: #fff; position: relative; @@ -370,6 +391,18 @@ function getViews() { flex-wrap: wrap; .content-item { margin-right: 24px; + + .default-avatar { + background-color: #ccc; + color: #fff; + border-radius: 50%; + font-size: 70px; + width: 140px; + height: 140px; + display: flex; + justify-content: center; + align-items: center; + } .info-card { width: 25%; diff --git a/src/views/account/NotificationSubscription/components/EditDialog.vue b/src/views/account/NotificationSubscription/components/EditDialog.vue index b006439d..f164c35f 100644 --- a/src/views/account/NotificationSubscription/components/EditDialog.vue +++ b/src/views/account/NotificationSubscription/components/EditDialog.vue @@ -3,6 +3,7 @@ visible :title="props.data.id ? '编辑' : '新增'" width="865px" + :confirmLoading="loading" @ok="confirm" @cancel="emits('update:visible', false)" > @@ -92,6 +93,7 @@ const props = defineProps<{ data: rowType; }>(); +const loading = ref(false); const initForm = { subscribeName: '', topicConfig: {}, @@ -106,13 +108,16 @@ const form = ref({ const confirm = () => { formRef.value && formRef.value.validate().then(() => { - save_api(form.value).then((resp) => { - if (resp.status === 200) { - message.success('操作成功'); - emits('ok') - emits('update:visible', false); - } - }); + loading.value = true; + save_api(form.value) + .then((resp) => { + if (resp.status === 200) { + message.success('操作成功'); + emits('ok'); + emits('update:visible', false); + } + }) + .finally(() => (loading.value = false)); }); }; diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 9ace54d0..72e5709a 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -17,12 +17,22 @@

基本信息

- clientId: - {{ clientId }} + clientId: + {{ clientId }}

- secureKey: - {{ secureKey }} + secureKey: + + {{ showKey ? secureKey : '****************' }} + +

@@ -47,7 +57,7 @@ const currentView = ref(''); const loading = ref(true); const clientId = useUserInfo().$state.userInfos.id; const secureKey = ref(''); - +const showKey = ref(false); // 获取选择的视图 const setCurrentView = () => { getView_api().then((resp: any) => { @@ -91,6 +101,15 @@ if (isNoCommunity) { p { margin: 0; font-size: 16px; + + .label { + font-weight: bold; + margin-right: 3px; + } + .value { + margin-right: 10px; + font-size: 14px; + } } } } diff --git a/src/views/system/Platforms/Api/index.vue b/src/views/system/Platforms/Api/index.vue index 5e4c3fe1..2a337461 100644 --- a/src/views/system/Platforms/Api/index.vue +++ b/src/views/system/Platforms/Api/index.vue @@ -3,7 +3,7 @@
- + .api-page-container { - .tree-content { - padding-bottom: 30px; - height: calc(100vh - 230px); - overflow-y: auto; - border-right: 1px solid #e9e9e9; + .content { + background-color: #fff; + padding: 24px; + margin: 0 !important; + .tree-content { + padding-bottom: 30px; + height: calc(100vh - 230px); + overflow-y: auto; + border-right: 1px solid #e9e9e9; + } } } From 9cd78db1f68c0d150b1cba9ae68863758c134c8f Mon Sep 17 00:00:00 2001 From: wangshuaiswim Date: Thu, 9 Mar 2023 17:39:17 +0800 Subject: [PATCH 24/39] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=89=A9?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E8=A7=84=E5=88=99=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FRuleEditor/Debug/index.vue | 39 ++++++++++++++-------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/src/components/FRuleEditor/Debug/index.vue b/src/components/FRuleEditor/Debug/index.vue index 1d89dd9a..0cc843e0 100644 --- a/src/components/FRuleEditor/Debug/index.vue +++ b/src/components/FRuleEditor/Debug/index.vue @@ -15,7 +15,7 @@